/* ============================================================
   Дизайн-система Sorro Dashboards — тема night.
   Токены перенесены дословно из local/designs/night.html:
   имена, значения и пояснения сохранены как в макете.

   Светлый вариант той же системы — violet.html: имена токенов
   там идентичны, отличаются только значения.
   ============================================================ */

:root {

  /* Sorro Dashboards — colour tokens. Values copied verbatim from the source dashboard. */
  --grey-950: #131A28;
  --grey-900: #1A2231;
  --grey-880: #1A2334;
  --grey-860: #1F2839;
  --grey-840: #20293C;
  --grey-820: #222B3E;
  --grey-800: #232B3C;
  --grey-780: #262F44;
  --grey-760: #283044;
  --grey-740: #283245;
  --grey-720: #29334A;
  --grey-700: #2B3446;
  --grey-680: #2C374E;
  --grey-660: #2D3648;
  --grey-640: #303950;
  --grey-620: #313B54;
  --grey-600: #32405E;
  --grey-580: #343E56;
  --grey-560: #35405C;
  --grey-540: #3A4359;
  --grey-520: #3B4C6D;
  --grey-500: #414C68;                           /* ---- blue-tinted surfaces (icon tiles, active nav) ---- */
  --blue-tint-900: #1F2A3E;
  --blue-tint-800: #26334B;
  --blue-tint-700: #2B3852;                      /* ---- text ramp ---- */
  --ink-100: #F3F7FF;
  --ink-200: #DCE4F2;
  --ink-250: #DBE3F1;
  --ink-300: #BCC7DA;
  --ink-400: #A2AEC5;
  --ink-450: #949FB6;
  --ink-500: #8B97AE;
  --ink-550: #8390A7;
  --ink-600: #7E8B9F;
  --ink-650: #74809A;
  --ink-700: #66738C;                            /* ---- accent: brand blue ---- */
  --blue-100: #DFE9F8;
  --blue-200: #C3D3F0;
  --blue-300: #B0C9EC;
  --blue-350: #ADC5EC;
  --blue-400: #95B6EA;
  --blue-450: #A0B6DD;
  --blue-500: #89AEE8;
  --blue-550: #96AFDE;
  --blue-600: #77A2E6;
  --blue-650: #6394E4;
  --blue-700: #5C90E4;
  --blue-750: #5A93ED;
  --blue-800: #5F9AF2;
  --blue-850: #4C8AEC;
  --blue-900: #3F82EA;
  --blue-950: #3576DE;                           /* ---- semantic: success / warning / danger ---- */
  --green-400: #55CB84;
  --green-500: #4CC77E;
  --green-600: #39B364;
  --green-bg: #1B3527;
  --amber-300: #EFDCB4;
  --amber-350: #EDD296;
  --amber-400: #ECC689;
  --amber-450: #EBC978;
  --amber-500: #EBC076;
  --amber-550: #E8BE5C;
  --amber-600: #E4B342;
  --amber-650: #E4B061;
  --amber-700: #E8A93E;
  --amber-750: #E3A741;
  --amber-800: #E39F35;
  --amber-bg: #3A2E19;
  --red-300: #E5A4AE;
  --red-400: #EE8B95;
  --red-500: #F0757F;
  --red-600: #D9505F;
  --red-bg: #3A2029;                             /* ---- categorical: series & entity families ---- */
  --teal-500: #52BCC4;
  --teal-400: #6DC5D8;
  --teal-bg: #183440;
  --violet-500: #9686DA;
  --violet-bg: #2A2542;                          /* broker ramp (blue family) */
  --series-broker-1: #5C90E4;
  --series-broker-2: #77A2E6;
  --series-broker-3: #95B6EA;
  --series-broker-4: #ADC5EC;
  --series-broker-5: #C3D3F0;                    /* merchant ramp (amber family) */
  --series-merchant-1: #E4B342;
  --series-merchant-2: #E8BE5C;
  --series-merchant-3: #EBC978;
  --series-merchant-4: #EDD296;
  --series-merchant-5: #EFDCB4;                  /* per-client overlay lines */
  --series-line-1: #9686DA;
  --series-line-2: #E8B247;
  --series-line-3: #F0757F;
  --series-line-4: #EBC076;
  --series-line-5: #6DC5D8;                      /* density heatmap: 5 steps + matching legible label colour per step */
  --heat-0: #1A2231;
  --heat-1: #20293C;
  --heat-2: #26344E;
  --heat-3: #2E4571;
  --heat-4: #3A5A9B;
  --heat-fg-0: #74809A;
  --heat-fg-1: #95A6C2;
  --heat-fg-2: #B0C0DE;
  --heat-fg-3: #CBD8EE;
  --heat-fg-4: #DFE9F8;                          /* ================= semantic aliases ================= */
  --bg-page: var(--grey-950);
  --surface-card: var(--grey-880);
  --surface-sunken: var(--grey-860);             /* table head, inset rows */
  --surface-raised: var(--grey-820);             /* icon buttons, count pills */
  --surface-hover: var(--grey-740);
  --surface-active: var(--blue-tint-900);        /* selected nav, icon tiles */
  --surface-active-strong: var(--blue-tint-700);
  --surface-tooltip: rgba(44,55,78,.97);
  --scrim: rgba(4,8,16,.5);
  --border-hairline: var(--grey-720);            /* row dividers */
  --border-subtle: var(--grey-780);              /* vertical rules */
  --border-field: var(--grey-640);               /* inputs, outline buttons */
  --border-strong: var(--grey-560);
  --border-control: var(--grey-520);             /* checkbox */
  --border-focus: var(--blue-500);
  --grid-line: var(--grey-800);
  --grid-line-h: var(--grey-760);
  --axis-line: var(--grey-700);
  --text-primary: var(--ink-200);
  --text-secondary: var(--ink-400);
  --text-muted: var(--ink-500);
  --text-faint: var(--ink-600);
  --text-disabled: var(--ink-700);
  --text-axis: var(--ink-650);
  --text-on-accent: var(--ink-100);
  --text-link: var(--blue-800);
  --text-link-hover: var(--blue-900);
  --accent: var(--blue-900);
  --accent-hover: var(--blue-950);
  --accent-fg: var(--ink-100);
  --accent-quiet: var(--blue-800);
  --status-ok-bg: var(--green-bg);
  --status-ok-fg: var(--green-400);
  --status-warn-bg: var(--amber-bg);
  --status-warn-fg: var(--amber-650);
  --status-risk-bg: var(--red-bg);
  --status-risk-fg: var(--red-400);
  --status-neutral-bg: var(--grey-860);
  --status-neutral-fg: var(--ink-400);
  --trend-up: var(--green-500);
  --trend-down: var(--red-500);
  --dot-risk: var(--red-600);
  --dot-warn: var(--amber-800);
  --dot-live: var(--green-600);

  /* Sorro Dashboards — type tokens. Geist for the interface, Golos Text for headline figures. */
  --font-ui: 'Geist',system-ui,sans-serif;
  --font-numeric: 'Golos Text',system-ui,sans-serif;
  --font-mono: 'Geist Mono',ui-monospace,monospace;  /* the UI runs on half-pixel steps — copied exactly, do not snap to a 4px grid */
  --text-2xs: 12px;
  --text-xs: 12.5px;
  --text-sm: 13px;
  --text-base: 13.5px;                               /* the workhorse: table cells, menu items, chips, buttons */
  --text-md: 14px;
  --text-lg: 14.5px;
  --text-title: 16px;                                /* card titles + page title */
  --text-brand: 17px;                                /* wordmark in the drawer */
  --text-figure: 30px;                               /* KPI tile figure */
  --text-figure-lg: 34px;                            /* chart headline figure */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --leading-tight: 1.35;
  --leading-normal: 1.45;
  --track-title: -.01em;
  --track-brand: -.015em;
  --track-figure: -.04em;
  --track-figure-loose: -.02em;
  --track-caps: .04em;

  /* Sorro Dashboards — spacing tokens. Odd values are deliberate; copy them exactly. */
  --space-1: 1px;
  --space-2: 2px;
  --space-3: 3px;
  --space-4: 4px;
  --space-5: 5px;
  --space-6: 6px;
  --space-7: 7px;
  --space-8: 8px;
  --space-9: 9px;
  --space-10: 10px;
  --space-11: 11px;
  --space-12: 12px;
  --space-13: 13px;
  --space-14: 14px;
  --space-16: 16px;
  --space-18: 18px;
  --space-20: 20px;
  --space-22: 22px;
  --space-24: 24px;
  --space-26: 26px;
  --space-28: 28px;
  --space-32: 32px;
  --space-40: 40px;            /* recurring composites */
  --gap-inline: 8px;           /* toolbar buttons, chip rows */
  --gap-stack: 6px;
  --gap-card: 24px;            /* between dashboard cards */
  --pad-card: 22px 24px;       /* chart card */
  --pad-kpi: 26px 28px;        /* KPI tile */
  --pad-table-head: 9px 12px;
  --pad-table-cell: 11px 12px;
  --pad-table-edge: 20px;      /* first / last cell horizontal pad */
  --pad-popover: 12px;
  --pad-tooltip: 10px 13px;
  --page-pad-x: 32px;
  --page-max: 1560px;
  --page-min: 1280px;          /* the dashboard does not reflow below this */
  --drawer-w: 260px;
  --topbar-h: 58px;
  --row-h-client: 70px;
  --row-h-tx: 56px;
  --control-h: 34px;
  --control-h-sm: 32px;
  --control-h-xs: 30px;

  /* Sorro Dashboards — corner radii. Nothing is square; nothing is fully soft either. */
  --radius-xs: 2px;      /* legend swatch, sparkline bar */
  --radius-sm: 5px;      /* status tag corner, checkbox, chart bar cap */
  --radius-md: 8px;      /* hover row */
  --radius-lg: 9px;      /* chips, tooltips, icon tiles, heat cell */
  --radius-xl: 10px;     /* buttons, inputs, icon buttons */
  --radius-2xl: 14px;    /* popovers and menus */
  --radius-card: 20px;   /* every dashboard card */
  --radius-drawer: 22px; /* nav drawer (right side only) */
  --radius-pill: 999px;

  /* Sorro Dashboards — shadows. Layered pairs: a tight contact shadow plus a wide ambient one. */
  --shadow-topbar: 0 1px 3px rgba(0,0,0,.24);
  --shadow-card: 0 2px 4px rgba(0,0,0,.18),0 8px 24px rgba(0,0,0,.22);
  --shadow-card-hover: 0 4px 8px rgba(0,0,0,.22),0 14px 34px rgba(0,0,0,.28);
  --shadow-popover: 0 6px 14px rgba(0,0,0,.25),0 18px 40px rgba(0,0,0,.3);
  --shadow-menu: 0 10px 26px rgba(0,0,0,.34);
  --shadow-tooltip: 0 6px 16px rgba(0,0,0,.28);
  --shadow-pill-tooltip: 0 2px 6px rgba(0,0,0,.28),0 8px 20px rgba(0,0,0,.32);
  --shadow-drawer: 8px 0 24px rgba(0,0,0,.28);
  --shadow-accent-button: 0 2px 6px rgba(95,154,242,.3);
  --shadow-heat-hover: 0 4px 10px rgba(0,0,0,.32);
  --shadow-float-tip: 0 6px 20px rgba(0,0,0,.36);                              /* focus/highlight rings are spread shadows, never outlines */
  --ring-chart-tip: 0 0 0 4px rgba(245,181,63,.20),0 6px 20px rgba(0,0,0,.25);
  --ring-heat-tip: 0 0 0 4px rgba(90,155,255,.16),0 6px 20px rgba(0,0,0,.28);
  --ring-alert: inset 0 0 0 .5px #D9505F;                                      /* @kind shadow */

  /* Sorro Dashboards — motion. One signature ease; short, non-bouncy durations. */
  --ease-standard: cubic-bezier(.32,.72,.35,1);     /* @kind other; the house curve: drawers, tooltips, lift */
  --ease-draw: cubic-bezier(.16,.56,.24,1);         /* @kind other; long chart line reveals only */
  --ease-linear: linear;                            /* @kind other */
  --dur-instant: .15s;                              /* @kind other */
  --dur-fast: .18s;                                 /* @kind other */
  --dur-quick: .2s;                                 /* @kind other */
  --dur-tip: .22s;                                  /* @kind other */
  --dur-base: .25s;                                 /* @kind other */
  --dur-drawer: .28s;                               /* @kind other */
  --dur-heat: .34s;                                 /* @kind other */
  --dur-draw: 3s;                                   /* @kind other */
  --motion-hover-lift: translateY(-2px);            /* @kind other */
  --motion-heat-lift: translateY(-2px) scale(1.03); /* @kind other */
}
