/* =====================================================================
   РЕПЕТИТУМ — Дизайн-токены (формат shadcn/ui)
   ---------------------------------------------------------------------
   Светлая тема — :root. Тёмная — те же переменные под классом .dark.
   Никаких инлайн-литералов в UI: всё через var(--name).
   Шрифт Inter — self-hosted (см. @font-face ниже), без CDN.
   Базовый бренд-синий #2990DC; --primary взят как глубокий #1D73B3
   (проходит контраст белого текста на заливке), #2990DC — glow/ring.
   Нейтрали слегка тёплые (мягче холодного slate).
   ===================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0400-04FF;
  src: url('fonts/Inter-cyrillic.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/Inter-latin.woff2') format('woff2');
}

:root {
  /* --- Поверхности и текст --- */
  --background:            #FBFAF8;
  --foreground:            #1C1A17;
  --card:                  #FFFFFF;
  --card-foreground:       #1C1A17;
  --popover:               #FFFFFF;
  --popover-foreground:    #1C1A17;

  /* --- Primary (бренд-синий) --- */
  --primary:               #1D73B3;
  --primary-foreground:    #FFFFFF;

  /* --- Secondary / muted / accent (нейтральные роли) --- */
  --secondary:             #F3F1ED;
  --secondary-foreground:  #34302B;
  --muted:                 #F3F1ED;
  --muted-foreground:      #726B62;
  --accent:                #E9F2FA;   /* бренд-тинт: hover/выбранное */
  --accent-foreground:     #14598E;

  /* --- Destructive --- */
  --destructive:           #DC2626;
  --destructive-foreground:#FFFFFF;

  /* --- Линии и фокус --- */
  --border:                #E7E3DC;
  --input:                 #DED8D0;
  --ring:                  #2990DC;

  /* --- Радиус (базовый) --- */
  --radius:                10px;

  /* --------- Расширения поверх shadcn (нужны продукту) --------- */
  /* Статусы: заливка + мягкая подложка (chip/alert) */
  --success:               #1F9D5B;
  --success-foreground:    #FFFFFF;
  --success-muted:         #E6F5EC;
  --success-muted-foreground:#136B3E;

  --warning:               #C77A0A;
  --warning-foreground:    #FFFFFF;
  --warning-muted:         #FAEFD9;
  --warning-muted-foreground:#845205;

  --info:                  #1D73B3;
  --info-muted:            #E9F2FA;
  --info-muted-foreground: #14598E;

  --destructive-muted:            #FCE9E7;
  --destructive-muted-foreground: #A31D1D;

  /* Доска в видеокомнате — «бумага». Единственная поверхность продукта, НЕ зависящая
     от темы: палитра маркеров в RoomToolRail захардкожена под светлый фон (#1a1a1a,
     #e53935, …) и не может стать var() — цвет штриха синкается между участниками как
     литерал (LOCKED-1, см. whiteboard.js). На тёмном --card тёмный маркер по умолчанию
     просто не виден. Пара paper/ink — как --reader-bg/--reader-fg у читалки: --wb-ink нужен,
     потому что накладки над квадратом (rp-chip без модификатора — «Подключаемся к занятию…»,
     «Ждём учителя…») не задают своего цвета и наследуют его; без пиннинга в тёмной теме они
     стали бы светлым текстом на белой бумаге. НЕ переопределять в .dark. */
  --wb-paper:              #FFFFFF;
  --wb-ink:                #1C1A17;

  /* Бренд-константы (для лого/акцентов, не для UI-заливок) */
  --brand-blue:            #2990DC;
  --brand-blue-deep:       #1D73B3;
  --brand-orange:          #F39322;

  /* Производные радиусы */
  --radius-sm:  6px;
  --radius-md:  8px;
  --radius-lg:  10px;
  --radius-xl:  14px;
  --radius-2xl: 18px;

  /* Тени — тёплый оттенок, сдержанные (глубину держат hairline-бордеры) */
  --shadow-xs: 0 1px 2px 0 rgba(28, 26, 23, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(28, 26, 23, 0.07), 0 1px 2px -1px rgba(28, 26, 23, 0.05);
  --shadow-md: 0 4px 14px -3px rgba(28, 26, 23, 0.10), 0 2px 4px -2px rgba(28, 26, 23, 0.05);
  --shadow-lg: 0 14px 34px -8px rgba(28, 26, 23, 0.16), 0 4px 8px -4px rgba(28, 26, 23, 0.07);
  --shadow-focus: 0 0 0 3px rgba(41, 144, 220, 0.30);

  /* Отступы (шаг 4px) */
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px;
  --space-5:20px; --space-6:24px; --space-8:32px; --space-10:40px;
  --space-12:48px; --space-16:64px;

  /* Типографика */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'JetBrains Mono', Menlo, Consolas, monospace;
}

.dark {
  --background:            #171614;
  --foreground:            #F3F1ED;
  --card:                  #201E1B;
  --card-foreground:       #F3F1ED;
  --popover:               #201E1B;
  --popover-foreground:    #F3F1ED;

  --primary:               #3D9BE0;
  --primary-foreground:    #06121C;

  --secondary:             #2A2723;
  --secondary-foreground:  #EDE9E3;
  --muted:                 #262320;
  --muted-foreground:      #A8A199;
  --accent:                #17324A;
  --accent-foreground:     #BFE0F7;

  --destructive:           #F0574F;
  --destructive-foreground:#1A0B0A;

  --border:                #322E28;
  --input:                 #39342D;
  --ring:                  #3D9BE0;

  --success:               #34C285;
  --success-foreground:    #06120C;
  --success-muted:         #16311F;
  --success-muted-foreground:#79DDAC;

  --warning:               #E9A63B;
  --warning-foreground:    #1E1405;
  --warning-muted:         #382A12;
  --warning-muted-foreground:#F0C079;

  --info:                  #3D9BE0;
  --info-muted:            #17324A;
  --info-muted-foreground: #BFE0F7;

  --destructive-muted:            #3A1A17;
  --destructive-muted-foreground: #F5A79F;

  --brand-blue:            #2990DC;
  --brand-blue-deep:       #1D73B3;
  --brand-orange:          #F5A94D;

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.30);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.36), 0 1px 2px -1px rgba(0, 0, 0, 0.30);
  --shadow-md: 0 4px 14px -3px rgba(0, 0, 0, 0.44), 0 2px 4px -2px rgba(0, 0, 0, 0.30);
  --shadow-lg: 0 14px 34px -8px rgba(0, 0, 0, 0.55), 0 4px 8px -4px rgba(0, 0, 0, 0.35);
  --shadow-focus: 0 0 0 3px rgba(61, 155, 224, 0.35);
}

/* =====================================================================
   Site-template fonts — self-hosted, mirrored from
   Repetitum.Tenants.Web/wwwroot/css/site-templates.css (lines 106-355).
   Lazy: a family only downloads when a .rp-tpl-scope[data-template] preview
   on /settings/site actually renders with it. NO preload.
   ===================================================================== */
/* === Lora (OFL) === */
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/lora-cyrillic-400.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/lora-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/lora-cyrillic-600.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/lora-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/lora-cyrillic-700.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/lora-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* === Nunito (OFL) === */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/nunito-cyrillic-400.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/nunito-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/nunito-cyrillic-700.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/nunito-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/nunito-cyrillic-800.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/nunito-latin-800.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* === Onest (OFL) === */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/onest-cyrillic-400.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/onest-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/onest-cyrillic-600.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/onest-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/onest-cyrillic-700.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/onest-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* === Unbounded (OFL) === */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/unbounded-cyrillic-600.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/unbounded-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/unbounded-cyrillic-700.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/unbounded-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/unbounded-cyrillic-800.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/unbounded-latin-800.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* === Manrope (OFL) === */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/manrope-cyrillic-400.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/manrope-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/manrope-cyrillic-600.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/manrope-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/manrope-cyrillic-700.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/manrope-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

