/* Мастерская — общие токены для конструктора, страницы для бизнеса и мини-приложения.
   Светлая тема по умолчанию; тёмная — по системе или <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: #edfaf9; --brand-100: #d7f1f1; --brand-200: #b4e4e3; --brand-300: #84d1d0;
  --brand-400: #48b5b4; --brand-500: #009a9a; --brand-600: #008182; --brand-700: #006869; --brand-800: #004f50;
  --brand: #0FA3A3;            /* знак, акценты, графика (не для мелкого текста на белом) */
  --primary: #0A7778;          /* кнопки и ссылки: белый текст 5.3:1 */
  --primary-hover: #006869;
  --on-primary: #ffffff;
  --primary-soft: #e6f6f5;     /* фон выбранного/подсветки */
  --primary-soft-ink: #005859;
  --accent-2: #ff8a3d;         /* тёплый второй цвет: метки «новое», конфетти */

  --free: #278062; --free-soft: #ddf1e7; --free-ink: #13674d;

  /* нейтральные — чуть холодные */
  --bg: #f4f6f6;               /* фон страницы */
  --surface: #ffffff;          /* карточки, панели */
  --surface-2: #eef2f2;        /* вложенные поля, полосы */
  --surface-3: #e3e9e9;
  --line: #e1e7e7;             /* разделители */
  --line-strong: #cbd5d5;
  --ink: #142022;              /* основной текст */
  --ink-2: #364648;
  --muted: #5b6b6d;            /* вторичный текст: 5.6:1 на белом */
  --faint: #93a1a3;            /* подписи на крупном, плейсхолдеры */

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

  /* статусы заявок: новая / в работе / готово / отменена */
  --st-new: #f08a00;  --st-new-bg: #fff4e0;
  --st-work: #2f80ed; --st-work-bg: #e6f0ff;
  --st-done: #278062; --st-done-bg: #e3f4ec;
  --st-cancel: #93a1a3; --st-cancel-bg: #eef2f2;

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

  --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: #2cc2c0;
    --primary: #33c4c2; --primary-hover: #6fd8d6; --on-primary: #032222;
    --primary-soft: #0f3333; --primary-soft-ink: #8fe3e1;
    --free: #69b395; --free-soft: #12382b; --free-ink: #97cfb7;
    --bg: #0d1415; --surface: #141d1e; --surface-2: #1b2627; --surface-3: #243233;
    --line: #243031; --line-strong: #33433f;
    --ink: #e9f1f1; --ink-2: #c6d3d3; --muted: #93a5a6; --faint: #637576;
    --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-work-bg: #14244a; --st-done-bg: #12382b; --st-cancel-bg: #1b2627;
    --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: #2cc2c0;
  --primary: #33c4c2; --primary-hover: #6fd8d6; --on-primary: #032222;
  --primary-soft: #0f3333; --primary-soft-ink: #8fe3e1;
  --free: #69b395; --free-soft: #12382b; --free-ink: #97cfb7;
  --bg: #0d1415; --surface: #141d1e; --surface-2: #1b2627; --surface-3: #243233;
  --line: #243031; --line-strong: #33433f;
  --ink: #e9f1f1; --ink-2: #c6d3d3; --muted: #93a5a6; --faint: #637576;
  --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-work-bg: #14244a; --st-done-bg: #12382b; --st-cancel-bg: #1b2627;
  --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; }
}
