/* =============================================================================
   StatDistrict — design tokens
   -----------------------------------------------------------------------------
   Единственный источник правды для типографики, цвета, теней и отступов.
   Подключается первым, до bootstrap-переопределений и компонентов.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Шрифты. Хранятся локально в /static/fonts — приложение не зависит от внешних
   CDN и корректно отображает кириллицу.
   -------------------------------------------------------------------------- */

/* Inter — кириллица */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/inter-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/inter-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/inter-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/inter-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Inter — латиница */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/inter-latin-400-normal.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+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/inter-latin-500-normal.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+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/inter-latin-600-normal.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+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/inter-latin-700-normal.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+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Inter — расширенная латиница */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/inter-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/inter-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/inter-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/inter-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* JetBrains Mono — для числовых матриц и кодов */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+2215;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+2215;
}

/* -----------------------------------------------------------------------------
   Токены — StatDistrict · Liquid Glass (голубое «жидкое стекло»)
   -------------------------------------------------------------------------- */

:root {
  /* --- Типографика --- */
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font-ui);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;

  --text-2xs: 0.6875rem;
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.875rem;
  --text-md: 0.9375rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.5rem;
  --text-2xl: 1.875rem;
  --text-3xl: 2.5rem;

  /* --- Нейтральная шкала (холодный голубо-серый) --- */
  --n-0: #ffffff;
  --n-25: #fbfdff;
  --n-50: #f3f8fc;
  --n-100: #e8f1f8;
  --n-200: #d3e4f0;
  --n-300: #b3cddd;
  --n-400: #7fa3bb;
  --n-500: #5a7f98;
  --n-600: #426278;
  --n-700: #314b5e;
  --n-800: #203445;
  --n-900: #122230;
  --n-950: #0a141c;

  /* --- Семантические поверхности --- */
  --bg: #d6eef8;
  --surface: rgba(232, 245, 252, 0.52);
  --surface-2: rgba(224, 242, 254, 0.4);
  --surface-3: rgba(214, 238, 248, 0.55);
  --line: rgba(148, 201, 224, 0.42);
  --line-soft: rgba(148, 201, 224, 0.28);
  --line-strong: rgba(125, 186, 214, 0.48);
  --sky-mesh:
    radial-gradient(920px 520px at 50% -8%, rgba(255, 255, 255, 0.5), transparent 62%),
    radial-gradient(720px 480px at 0% 100%, rgba(168, 216, 236, 0.38), transparent 58%),
    radial-gradient(720px 480px at 100% 100%, rgba(168, 216, 236, 0.38), transparent 58%),
    linear-gradient(180deg, #d9f1fa 0%, #c7e7f4 52%, #d4eef8 100%);
  --ink-grad: linear-gradient(180deg, #0a446f 0%, #055186 46%, #0078c9 100%);

  /* --- Текст --- */
  --ink: var(--n-900);
  --ink-soft: var(--n-700);
  --muted: var(--n-500);
  --muted-2: var(--n-400);

  /* --- Бренд: небесно-голубой Liquid Glass --- */
  --brand-50: #eff8ff;
  --brand-100: #def0ff;
  --brand-200: #b6e0ff;
  --brand-300: #7cc8ff;
  --brand-400: #36aef8;
  --brand-500: #0c96e8;
  --brand-600: #0078c9;
  --brand-700: #0060a3;
  --brand-800: #055186;
  --brand-900: #0a446f;
  --brand: var(--brand-600);
  --brand-ink: var(--brand-700);

  --accent-cyan: #22d3ee;
  --accent-magenta: #67e8f9;

  /* --- Навигация (админ): светлое матовое стекло --- */
  --nav-bg: rgba(232, 245, 252, 0.48);
  --nav-bg-2: rgba(220, 240, 250, 0.36);
  --nav-fg: rgba(18, 34, 48, 0.68);
  --nav-fg-strong: #122230;
  --nav-fg-dim: rgba(90, 127, 152, 0.82);
  --nav-hover: rgba(232, 245, 252, 0.62);
  --nav-active: rgba(236, 248, 253, 0.78);
  --nav-accent: var(--brand-600);
  --nav-border: rgba(148, 201, 224, 0.42);
  --nav-inset: inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(125, 211, 252, 0.08);

  /* --- Статусы --- */
  --ok: #047857;
  --ok-500: #059669;
  --ok-bg: #ecfdf5;
  --ok-line: #a7f3d0;

  --warn: #b45309;
  --warn-500: #d97706;
  --warn-bg: #fffbeb;
  --warn-line: #fde68a;

  --bad: #b91c1c;
  --bad-500: #dc2626;
  --bad-bg: #fef2f2;
  --bad-line: #fecaca;

  --info: #0060a3;
  --info-500: #0078c9;
  --info-bg: #eff8ff;
  --info-line: #b6e0ff;

  /* --- Категориальная палитра для графиков --- */
  --cat-1: #0078c9;
  --cat-2: #06b6d4;
  --cat-3: #2563eb;
  --cat-4: #d97706;
  --cat-5: #dc2626;
  --cat-6: #0ea5e9;
  --cat-7: #0d9488;
  --cat-8: #65a30d;
  --cat-9: #db2777;
  --cat-10: #ea580c;
  --cat-11: #4f46e5;
  --cat-12: #0891b2;

  /* --- Последовательная шкала --- */
  --seq-1: #eff8ff;
  --seq-2: #def0ff;
  --seq-3: #b6e0ff;
  --seq-4: #7cc8ff;
  --seq-5: #36aef8;
  --seq-6: #0c96e8;
  --seq-7: #0078c9;
  --seq-8: #0060a3;

  /* --- Расходящаяся шкала --- */
  --div-neg-3: #b91c1c;
  --div-neg-2: #ef4444;
  --div-neg-1: #fca5a5;
  --div-mid: #e4eef5;
  --div-pos-1: #6ee7b7;
  --div-pos-2: #10b981;
  --div-pos-3: #047857;

  /* --- Радиусы: continuous / liquid --- */
  --r-xs: 12px;
  --r-sm: 16px;
  --r-md: 20px;
  --r-lg: 24px;
  --r-xl: 28px;
  --r-2xl: 36px;
  --r-pill: 999px;

  /* --- Тени: полированное стекло --- */
  --sh-xs: 0 2px 8px rgba(12, 74, 110, 0.05);
  --sh-sm: 0 6px 18px rgba(12, 74, 110, 0.06), 0 1px 3px rgba(12, 74, 110, 0.03);
  --sh-md: 0 12px 32px -10px rgba(12, 74, 110, 0.14), 0 4px 12px rgba(12, 74, 110, 0.05);
  --sh-lg: 0 24px 48px -16px rgba(12, 74, 110, 0.18), 0 10px 20px rgba(12, 74, 110, 0.05);
  --sh-focus: 0 0 0 4px rgba(12, 150, 232, 0.22);
  --sh-glass:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(125, 211, 252, 0.08),
    0 8px 28px rgba(12, 74, 110, 0.06);
  --sh-bloom: 0 12px 32px rgba(14, 165, 233, 0.08);
  --sh-neon-brand: 0 8px 22px rgba(14, 165, 233, 0.14);
  --sh-neon-ok: 0 8px 22px rgba(16, 185, 129, 0.12);
  --sh-neon-warn: 0 8px 22px rgba(217, 119, 6, 0.12);
  --sh-neon-bad: 0 8px 22px rgba(220, 38, 38, 0.12);

  --glass: rgba(232, 245, 252, 0.42);
  --glass-strong: rgba(236, 248, 253, 0.55);
  --glass-tint: rgba(214, 238, 248, 0.38);
  --glass-edge: rgba(148, 201, 224, 0.46);
  --glass-blur: 22px;
  --glass-sat: 1.25;

  --sidebar-w: 280px;
  --sidebar-w-collapsed: 76px;
  --topbar-h: 64px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.2, 0.64, 1);
}
