/* site/tokens.css — Fonts (Inter) and the design tokens: light, then dark. Order: wwwroot/README.md. */
/* VB ERP back-office theme tokens for the server-rendered Razor interface.
   Values follow the product's supplied screen references and keep all fonts and assets local.
   LIGHT is the default whatever the OS says; dark is an explicit choice (<html data-theme="dark">), set by the server from
   the "theme" cookie so there is no flash. Layout and component rules live in the adjacent site stylesheets. */

/* ---------- Font: Inter 4.1 (SIL OFL 1.1, fonts/OFL-Inter.txt), self-hosted variable woff2 (weights 100–900, Latin +
   Cyrillic + ₴ in one file), see docs/dependencies.md. Made for screens: open shapes at 13–14 px, tabular figures. ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../../fonts/inter-variable.woff2") format("woff2");
}
/* A local fallback with Inter's metrics: text does not jump when the web font arrives. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
  size-adjust: 107.12%;
}

/* ---------- Tokens (light) ---------- */
:root {
  --font: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: Monaco, Menlo, Consolas, "Courier Prime", Courier, "Courier New", monospace;       /* fontFamilyMonospace */

  /* Surfaces */
  --bg: #f2f4f7;              /* the page canvas: cards sit on it */
  --surface: #ffffff;
  --surface-2: #f8f9fb;       /* totals rows, footers, shaded cells */
  --surface-3: #eceef2;       /* tracks, chips, disabled controls */
  --border: #e1e4ea;          /* containers, dividers */
  --line: #edeff3;            /* table row separators */
  --border-strong: #8a92a1;   /* inputs: 3:1 against white (WCAG 1.4.11) */

  /* Text: every grey that carries meaning passes WCAG AA on white and on the tinted rows */
  --text: #111418;
  --heading: #0b0d11;
  --text-2: #3f4552;          /* column headers, side navigation */
  --muted: #5c6370;           /* counters, descriptions: 4.5:1 on the canvas too */
  --faint: #5c6370;
  --decor: #9aa1ad;
  --row-hover: #f6f8fb;
  --selected: #eef3ff;
  --selected-border: #2f5bea;

  /* Product accent */
  --accent: #2f5bea;          /* primary button, links, focus: 5.2:1 on white */
  --accent-hover: #2347c4;
  --accent-press: #1c3aa3;
  --accent-soft: #f1f5ff;
  --accent-active: #e0e8ff;
  --accent-text: #2f5bea;
  --link: #2f5bea;
  --link-hover: #1c3aa3;
  --focus: #2f5bea;
  --accent-ring: rgba(47, 91, 234, .25);
  --on-accent: #ffffff;       /* colorTextButtonPrimaryDefault */

  /* Status (colorTextStatus*, colorBackgroundStatus*, colorBackgroundNotification*): green only for success */
  --ok: #00802f;
  --ok-fill: #00802f;
  --ok-soft: #effff1;
  --ok-border: #00802f;
  --danger: #db0000;
  --danger-strong: #c20000;
  --danger-fill: #db0000;
  --danger-soft: #fff5f5;
  --danger-border: #db0000;
  --warn: #855900;
  --warn-fill: #ffe347;       /* the warning flash: dark text on yellow */
  --warn-soft: #fffef0;
  --warn-border: #855900;
  --info: #2f5bea;
  --info-soft: #f1f5ff;
  --info-border: #2f5bea;
  --info-fill: #2f5bea;
  --neutral-fill: #424650;    /* grey badge, the tools trigger */
  --on-fill: #f9f9fa;         /* colorTextNotificationDefault: text on status fills */

  /* An applied filter (a pressed toggle button) */
  --chip-on: #e0e8ff;
  --chip-on-text: #1c3aa3;
  --chip-on-border: #2f5bea;

  /* App layout: top navigation, side navigation */
  --sb-bg: #fbfbfc;
  --sb-border: #e6e8ec;
  --sb-text: #3f4552;
  --sb-icon: #7b8290;
  --sb-link: #3f4552;
  --sb-hover: #eff1f5;
  --sb-active: #2f5bea;
  --logo-bg: #111418;

  /* Shadows (shadowDropdown, shadowSticky, shadowSplitSide) */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-pop: 0 16px 40px -12px rgba(16, 24, 40, .22), 0 4px 10px -4px rgba(16, 24, 40, .10);
  --shadow-sticky: 0 4px 8px 1px rgba(0, 7, 22, .10);
  --shadow-side: -1px 0 1px 0 #e9ebed, -36px 6px 36px -36px rgba(0, 7, 22, .10);
  --backdrop: rgba(35, 43, 55, .7);   /* colorGreyOpaque70 */
  --skeleton: #ebebf0;

  /* Shape (borderRadius*) */
  --radius: 12px;             /* container, modal, split panel */
  --radius-sm: 8px;           /* input, dropdown, item */
  --radius-lg: 16px;
  --radius-btn: 8px;          /* buttons */
  --radius-badge: 6px;
  --radius-alert: 10px;

  /* Sizes and spacing (space*: 2 4 8 12 16 20 24 32 40) */
  --topnav-h: 56px;
  --sidebar-w: 280px;
  --rail-w: 52px;             /* sizeSideNavigationCollapsedWidth */
  --gutter: 28px;             /* the content's side padding (Design 2.0) */
  --row-h: 40px;
  --control-h: 32px;          /* sizeVerticalInput */
  --sticky-top: var(--topnav-h);
  --panel-w: 480px;           /* the split panel (side) */
  --tools-w: 320px;           /* the tools / help drawer */

  /* Motion */
  --ease: cubic-bezier(0, 0, 0, 1);   /* motionEasingResponsive */
  --dur-fast: 90ms;
  --dur: 135ms;
  --dur-slow: 180ms;
  color-scheme: light;
}

/* ---------- Tokens (dark theme) ---------- */
:root[data-theme="dark"] {
  --bg: #0e1116;
  --surface: #151920;
  --surface-2: #1a1f27;
  --surface-3: #232934;
  --border: #2a303b;
  --line: #1f242d;
  --border-strong: #5f6775;

  --text: #d5d9e0;
  --heading: #f1f3f6;
  --text-2: #b8bec9;
  --muted: #959dab;
  --faint: #959dab;
  --decor: #6b7280;
  --row-hover: #1a1f27;
  --selected: #18213a;
  --selected-border: #7c9bff;

  --accent: #7c9bff;
  --accent-hover: #a6bbff;
  --accent-press: #a6bbff;
  --accent-soft: #1a2033;
  --accent-active: #222b45;
  --accent-text: #7c9bff;
  --link: #7c9bff;
  --link-hover: #a6bbff;
  --focus: #7c9bff;
  --accent-ring: rgba(124, 155, 255, .35);
  --on-accent: #0b0d11;       /* dark text on the light primary button */

  --ok: #2bb534;
  --ok-fill: #00802f;
  --ok-soft: #001401;
  --ok-border: #2bb534;
  --danger: #ff7a7a;
  --danger-strong: #ff7a7a;
  --danger-fill: #db0000;
  --danger-soft: #1f0000;
  --danger-border: #ff7a7a;
  --warn: #fbd332;
  --warn-fill: #ffe347;
  --warn-soft: #191100;
  --warn-border: #fbd332;
  --info: #7c9bff;
  --info-soft: #18213a;
  --info-border: #7c9bff;
  --info-fill: #2f5bea;
  --neutral-fill: #656871;
  --on-fill: #f9f9fa;

  --chip-on: #222b45;
  --chip-on-text: #a6bbff;
  --chip-on-border: #7c9bff;

  --sb-bg: #12151b;
  --sb-border: #232934;
  --sb-text: #b8bec9;
  --sb-icon: #8a92a1;
  --sb-link: #b8bec9;
  --sb-hover: #1a1f27;
  --sb-active: #a6bbff;
  --logo-bg: #2f5bea;          /* the «VB» tile in accent: near-black vanished on the dark bar */

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-pop: 0 16px 40px -12px rgba(0, 0, 0, .7);
  --shadow-sticky: 0 4px 8px 1px rgba(0, 7, 22, .5);
  --shadow-side: -1px 0 1px 0 #192534, -36px 6px 36px -36px rgba(0, 7, 22, 1);
  --backdrop: rgba(15, 20, 26, .7);
  --skeleton: #232b37;
  color-scheme: dark;
}

