/* Подмога — общие токены для приложения и админки.
   Светлая тема по умолчанию; тёмная — по системе или <html data-theme="dark">. Меняйте цвета только здесь.
   Бренд — янтарная (медовая) гамма: шар-задача в знаке. Кнопки — янтарные с тёмным текстом (как знак на значке);
   ссылки и акцентный текст на белом — тёмный янтарь --primary-ink (янтарь сам по себе на белом не читается).
   Соседи по экосистеме: Окошко — оранжевый, Отклик — зелёный, Лавочка — фиолетовый, Tarif — синий. */

@font-face {
  font-family: 'Onest';
  src: url('/shared/fonts/onest-cyrillic-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  src: url('/shared/fonts/onest-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20B8, U+20BD, U+2122, U+2190-2199, U+2212, U+2215;
}

:root {
  /* бренд: янтарь (шкала OKLCH от #F2A20C) */
  --brand-50: #fff5e9; --brand-100: #fce8ce; --brand-200: #f7d2a4; --brand-300: #edb56a;
  --brand-400: #d79116; --brand-500: #bb7400; --brand-600: #9c5f00; --brand-700: #7e4b00; --brand-800: #613700;
  --brand: #F2A20C;            /* шар в знаке, графика, полосы прогресса, выделения */
  --brand-ink: #2B1E0A;        /* «ладони» знака: тёплый почти чёрный */
  --primary: #F5AB14;          /* фон главных кнопок */
  --primary-hover: #E89D05;
  --on-primary: #261A00;       /* текст на главной кнопке: 8,7:1 */
  --primary-ink: #8A5300;      /* ссылки и акцентный текст на светлом: 6,3:1 на белом */
  --primary-soft: #fff1d6;     /* фон выбранного/подсветки */
  --primary-soft-ink: #7a4a00; /* текст на --primary-soft: 6,7:1 */

  /* второй акцент — глубокий бирюзовый: «выполнено», «проверено», ход работы. Не путать с «Откликом» (зелёный) */
  --accent: #0F7C80; --accent-soft: #dcf2f2; --accent-ink: #0b5e61;
  /* «срочно» */
  --urgent: #d9480f; --urgent-soft: #ffe8dc;

  /* нейтральные — тёплые, с каплей янтаря */
  --bg: #faf7f1;               /* фон страницы */
  --surface: #ffffff;          /* карточки, панели */
  --surface-2: #f3eee4;        /* вложенные поля, полосы */
  --surface-3: #e9e2d4;
  --line: #ebe4d6;             /* разделители */
  --line-strong: #d6ccb8;
  --ink: #1d170e;              /* основной текст */
  --ink-2: #3d3426;
  --muted: #6b6152;            /* вторичный текст: 6:1 на белом */
  --faint: #a59a88;            /* подписи на крупном, плейсхолдеры */

  /* статусы */
  --ok: #1f7a4f; --ok-soft: #dff3e8;
  --warn: #9a5a00; --warn-soft: #fff0cf;
  --danger: #c0262d; --danger-soft: #fde8e8;
  --info: #2459c9; --info-soft: #e3ecff;

  /* статусы заказа (цвет метки / её фон) */
  --st-draft: #6b6152;       --st-draft-bg: #f3eee4;
  --st-open: #7a4a00;        --st-open-bg: #fff1d6;
  --st-assigned: #2459c9;    --st-assigned-bg: #e3ecff;
  --st-in_progress: #0b5e61; --st-in_progress-bg: #dcf2f2;
  --st-done: #1f7a4f;        --st-done-bg: #dff3e8;
  --st-cancelled: #6b6152;   --st-cancelled-bg: #e9e2d4;
  --st-dispute: #c0262d;     --st-dispute-bg: #fde8e8;

  /* форма */
  --r-xs: 6px; --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 28px; --r-full: 999px;
  --sh-1: 0 1px 2px rgba(43,30,10,.06), 0 1px 1px rgba(43,30,10,.04);
  --sh-2: 0 4px 16px rgba(43,30,10,.08), 0 1px 3px rgba(43,30,10,.06);
  --sh-3: 0 18px 50px rgba(43,30,10,.18), 0 4px 12px rgba(43,30,10,.08);
  --ring: 0 0 0 3px rgba(242,162,12,.45);

  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: 12px; --fs-sm: 13px; --fs: 15px; --fs-md: 17px; --fs-lg: 20px; --fs-xl: 26px; --fs-2xl: 34px; --fs-3xl: 46px;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px;

  --ease: cubic-bezier(.2,.8,.2,1);
  --t-fast: 120ms; --t: 200ms; --t-slow: 360ms;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #F5B23A; --brand-ink: #F3E7D3;
    --primary: #F5B23A; --primary-hover: #FFC45C; --on-primary: #1f1500;
    --primary-ink: #FFC45C; --primary-soft: #3a2a0c; --primary-soft-ink: #ffd58a;
    --accent: #4fc2c4; --accent-soft: #0e3334; --accent-ink: #8fdcdd;
    --urgent: #ff8a5c; --urgent-soft: #3d1c0e;
    --bg: #13100b; --surface: #1c1812; --surface-2: #252017; --surface-3: #2f281d;
    --line: #322b20; --line-strong: #43392a;
    --ink: #f5efe4; --ink-2: #ddd3c2; --muted: #b0a594; --faint: #7c7262;
    --ok: #6fcf9c; --ok-soft: #12321f; --warn: #f0b44c; --warn-soft: #3a2a0c;
    --danger: #f2777b; --danger-soft: #3d1416; --info: #8ab0ff; --info-soft: #14244a;
    --st-draft: #b0a594; --st-draft-bg: #252017; --st-open: #ffd58a; --st-open-bg: #3a2a0c;
    --st-assigned: #8ab0ff; --st-assigned-bg: #14244a; --st-in_progress: #8fdcdd; --st-in_progress-bg: #0e3334;
    --st-done: #6fcf9c; --st-done-bg: #12321f; --st-cancelled: #b0a594; --st-cancelled-bg: #2f281d;
    --st-dispute: #f2777b; --st-dispute-bg: #3d1416;
    --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 6px 20px rgba(0,0,0,.45); --sh-3: 0 20px 60px rgba(0,0,0,.6);
    --ring: 0 0 0 3px rgba(245,178,58,.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #F5B23A; --brand-ink: #F3E7D3;
  --primary: #F5B23A; --primary-hover: #FFC45C; --on-primary: #1f1500;
  --primary-ink: #FFC45C; --primary-soft: #3a2a0c; --primary-soft-ink: #ffd58a;
  --accent: #4fc2c4; --accent-soft: #0e3334; --accent-ink: #8fdcdd;
  --urgent: #ff8a5c; --urgent-soft: #3d1c0e;
  --bg: #13100b; --surface: #1c1812; --surface-2: #252017; --surface-3: #2f281d;
  --line: #322b20; --line-strong: #43392a;
  --ink: #f5efe4; --ink-2: #ddd3c2; --muted: #b0a594; --faint: #7c7262;
  --ok: #6fcf9c; --ok-soft: #12321f; --warn: #f0b44c; --warn-soft: #3a2a0c;
  --danger: #f2777b; --danger-soft: #3d1416; --info: #8ab0ff; --info-soft: #14244a;
  --st-draft: #b0a594; --st-draft-bg: #252017; --st-open: #ffd58a; --st-open-bg: #3a2a0c;
  --st-assigned: #8ab0ff; --st-assigned-bg: #14244a; --st-in_progress: #8fdcdd; --st-in_progress-bg: #0e3334;
  --st-done: #6fcf9c; --st-done-bg: #12321f; --st-cancelled: #b0a594; --st-cancelled-bg: #2f281d;
  --st-dispute: #f2777b; --st-dispute-bg: #3d1416;
  --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 6px 20px rgba(0,0,0,.45); --sh-3: 0 20px 60px rgba(0,0,0,.6);
  --ring: 0 0 0 3px rgba(245,178,58,.45);
  color-scheme: dark;
}

/* ── база ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--fs)/1.45 var(--font); font-feature-settings: 'tnum' 0;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.01em; font-weight: 700; }
p { margin: 0; }
a { color: var(--primary-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
.ic { display: inline-flex; flex: none; line-height: 0; }
.num, .tnum { font-variant-numeric: tabular-nums; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-xs); }
::selection { background: var(--brand-200); color: #1d170e; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
