/* Окошко — общие токены для приложения клиента, кабинета бизнеса и виджета.
   Светлая тема по умолчанию; тёмная — по системе или <html data-theme="dark">. Меняйте цвета только здесь. */

@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 {
  /* бренд: «окошко» — тёплый закатный оранжевый */
  --brand-50: #fff2ec; --brand-100: #ffe1d6; --brand-200: #ffc6b2; --brand-300: #ffa183;
  --brand-400: #f97450; --brand-500: #e14e23; --brand-600: #c43100; --brand-700: #a31c00; --brand-800: #800b00;
  --brand: #E8552B;            /* знак, акценты, графика (не для мелкого текста на белом) */
  --primary: #c43100;          /* кнопки и ссылки: белый текст 5.5:1 */
  --primary-hover: #a31c00;
  --on-primary: #ffffff;
  --primary-soft: #fff2ec;     /* фон выбранного/подсветки */
  --primary-soft-ink: #a31c00;

  /* «свободно» — зелёный */
  --free: #278062; --free-soft: #ddf1e7; --free-ink: #13674d;

  /* нейтральные — тёплые */
  --bg: #f7f5f2;               /* фон страницы */
  --surface: #ffffff;          /* карточки, панели */
  --surface-2: #f1eee9;        /* вложенные поля, полосы */
  --surface-3: #e9e4de;
  --line: #e6e1da;             /* разделители */
  --line-strong: #d4cdc4;
  --ink: #1c1917;              /* основной текст */
  --ink-2: #44403c;
  --muted: #6b635c;            /* вторичный текст: 5.6:1 на белом */
  --faint: #a29a91;            /* подписи на крупном, плейсхолдеры */

  /* статусы */
  --ok: #278062; --ok-soft: #ddf1e7;
  --warn: #b45309; --warn-soft: #fef3c7;
  --danger: #c0262d; --danger-soft: #fde8e8;
  --info: #2563eb; --info-soft: #e0ebff;

  /* статусы записи в журнале (фон блока / полоска слева) */
  --st-new: #f59e0b;  --st-new-bg: #fff6e0;
  --st-confirmed: #2f80ed; --st-confirmed-bg: #e6f0ff;
  --st-arrived: #8b5cf6; --st-arrived-bg: #f1eaff;
  --st-done: #278062; --st-done-bg: #e3f4ec;
  --st-no_show: #c0262d; --st-no_show-bg: #fde8e8;
  --st-cancelled: #a29a91; --st-cancelled-bg: #f1eee9;

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

  --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: #ff6a3d;
    --primary: #f97450; --primary-hover: #ffa183; --on-primary: #1a0a04;
    --primary-soft: #3a1d12; --primary-soft-ink: #ffb59c;
    --free: #69b395; --free-soft: #12382b; --free-ink: #97cfb7;
    --bg: #12100e; --surface: #1c1916; --surface-2: #24201c; --surface-3: #2e2924;
    --line: #2f2a25; --line-strong: #3d3731;
    --ink: #f3efea; --ink-2: #d6cfc7; --muted: #a79e95; --faint: #776f67;
    --ok: #69b395; --ok-soft: #12382b; --warn: #f0b44c; --warn-soft: #3a2a0c;
    --danger: #f2777b; --danger-soft: #3d1416; --info: #7aa7ff; --info-soft: #14244a;
    --st-new-bg: #3a2a0c; --st-confirmed-bg: #14244a; --st-arrived-bg: #2a1d4a; --st-done-bg: #12382b;
    --st-no_show-bg: #3d1416; --st-cancelled-bg: #24201c;
    --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);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #ff6a3d;
  --primary: #f97450; --primary-hover: #ffa183; --on-primary: #1a0a04;
  --primary-soft: #3a1d12; --primary-soft-ink: #ffb59c;
  --free: #69b395; --free-soft: #12382b; --free-ink: #97cfb7;
  --bg: #12100e; --surface: #1c1916; --surface-2: #24201c; --surface-3: #2e2924;
  --line: #2f2a25; --line-strong: #3d3731;
  --ink: #f3efea; --ink-2: #d6cfc7; --muted: #a79e95; --faint: #776f67;
  --ok: #69b395; --ok-soft: #12382b; --warn: #f0b44c; --warn-soft: #3a2a0c;
  --danger: #f2777b; --danger-soft: #3d1416; --info: #7aa7ff; --info-soft: #14244a;
  --st-new-bg: #3a2a0c; --st-confirmed-bg: #14244a; --st-arrived-bg: #2a1d4a; --st-done-bg: #12382b;
  --st-no_show-bg: #3d1416; --st-cancelled-bg: #24201c;
  --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);
  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); 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: var(--ink); }
.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; }
}
