/* VNSOFT Design System - общие дизайн-токены панели VNSOFT (admin) и сайта BEZPALEVA GPT (2026-11-30).
   Один файл на оба продукта: панель отдаёт его как /assets/tokens.css, сайт - /static/tokens.css.
   Монохром: цвет только у статусов (ошибка, предупреждение, успех, информация).
   Тема: html[data-theme="dark" | "light" | "auto"]; auto - по системе (prefers-color-scheme). */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(inter-cyrillic.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: 100 900; font-display: swap;
  src: url(inter-latin.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; }

:root {
  /* шрифты */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --fs-xs: 12px; --fs-sm: 13px; --fs: 14px; --fs-md: 15px; --fs-lg: 16px; --fs-h3: 17px; --fs-h2: 20px; --fs-h1: 26px;
  --lh: 1.5; --lh-read: 1.7;
  --w-regular: 400; --w-medium: 500; --w-semi: 600;
  /* отступы и размеры */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --r-xs: 6px; --r-sm: 8px; --r: 10px; --r-lg: 14px; --r-xl: 20px; --r-full: 999px;
  --h-ctl: 36px; --h-ctl-sm: 30px; --h-ctl-lg: 44px;
  --sb-w: 248px; --sb-w-min: 64px; --read-w: 800px;
  /* движение */
  --t-fast: 100ms; --t: 150ms; --t-slow: 180ms; --ease: cubic-bezier(.2, .7, .2, 1);
  /* статусы (функциональный цвет) */
  --ok: #16a34a; --warn: #d97706; --bad: #dc2626; --info: #2563eb;
}

/* ---------- тёмная тема (по умолчанию для auto без светлой системы) ---------- */
:root, html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171717; --sidebar: #0d0d0d; --surface: #212121; --field: #262626; --active: #2f2f2f; --hover: #262626;
  --line: #333333; --line-soft: #2a2a2a;
  --text: #ececec; --text-2: #a1a1a1; --text-3: #737373;
  --primary: #ffffff; --on-primary: #171717;
  --code-bg: #0d0d0d; --overlay: rgba(0, 0, 0, .6); --shadow: 0 8px 24px rgba(0, 0, 0, .4), 0 1px 2px rgba(0, 0, 0, .3);
  --ok-bg: rgba(22, 163, 74, .14); --warn-bg: rgba(217, 119, 6, .16); --bad-bg: rgba(220, 38, 38, .14); --info-bg: rgba(37, 99, 235, .16);
  --ok-fg: #4ade80; --warn-fg: #fbbf24; --bad-fg: #f87171; --info-fg: #93c5fd;
  /* робот BZP GPT */
  --bot-box: #0d0d0d; --bot-box-line: #3a3a3a; --bot-shell: #f2f2f2; --bot-ink: #0d0d0d; --bot-screen: #171717; --bot-glyph: #f2f2f2;
}

/* ---------- светлая тема ---------- */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff; --sidebar: #f7f7f7; --surface: #fafafa; --field: #ffffff; --active: #efefef; --hover: #f3f3f3;
  --line: #e5e5e5; --line-soft: #efefef;
  --text: #171717; --text-2: #737373; --text-3: #a3a3a3;
  --primary: #171717; --on-primary: #ffffff;
  --code-bg: #f7f7f7; --overlay: rgba(0, 0, 0, .35); --shadow: 0 8px 24px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .06);
  --ok-bg: #ecfdf3; --warn-bg: #fffbeb; --bad-bg: #fef2f2; --info-bg: #eff6ff;
  --ok-fg: #15803d; --warn-fg: #b45309; --bad-fg: #b91c1c; --info-fg: #1d4ed8;
  --bot-box: #171717; --bot-box-line: #171717; --bot-shell: #f2f2f2; --bot-ink: #0d0d0d; --bot-screen: #171717; --bot-glyph: #f2f2f2;
}
@media (prefers-color-scheme: light) {
  html[data-theme="auto"] {
    color-scheme: light;
    --bg: #ffffff; --sidebar: #f7f7f7; --surface: #fafafa; --field: #ffffff; --active: #efefef; --hover: #f3f3f3;
    --line: #e5e5e5; --line-soft: #efefef;
    --text: #171717; --text-2: #737373; --text-3: #a3a3a3;
    --primary: #171717; --on-primary: #ffffff;
    --code-bg: #f7f7f7; --overlay: rgba(0, 0, 0, .35); --shadow: 0 8px 24px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .06);
    --ok-bg: #ecfdf3; --warn-bg: #fffbeb; --bad-bg: #fef2f2; --info-bg: #eff6ff;
    --ok-fg: #15803d; --warn-fg: #b45309; --bad-fg: #b91c1c; --info-fg: #1d4ed8;
    --bot-box: #171717; --bot-box-line: #171717; --bot-shell: #f2f2f2; --bot-ink: #0d0d0d; --bot-screen: #171717; --bot-glyph: #f2f2f2;
  }
}

/* ---------- база, общая для обоих продуктов ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: var(--w-regular) var(--fs)/var(--lh) var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01"; }
::selection { background: color-mix(in srgb, var(--text) 22%, transparent); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.i { width: 16px; height: 16px; flex: none; display: inline-block; vertical-align: -3px; stroke: currentColor; fill: none;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.i.lg { width: 20px; height: 20px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
