/* ============================================================================
   Tokens, ported from Delphi Forge (`app/app/assets/tokens.css`) — the house
   standard for an operator console. Named for the roles the components here
   already use, so this is a change of VALUES and of MECHANISM, not a rename of
   every class.

   Three things came across and each replaced something worse:

   1. ONE theme statement. `light-dark()` states both grounds on one line, so a
      colour cannot exist in light and be missing in dark. The file this
      replaces had two full blocks and every token had to be added twice.

   2. NO WEBFONT. The previous file asked for 'Inter Tight' and 'Bricolage
      Grotesque' and loaded neither — so the display face silently fell back to
      system-ui while the file claimed otherwise. That is exactly the defect the
      sibling app shipped (`font-family: 'Inter'` with no `@font-face`
      anywhere), and plain Inter is on the reject list to begin with. The system
      stack is what actually rendered, so it is what is written down.

   3. FIVE type steps, named for the job. A ramp of seven invites "one step
      smaller"; a closed set of roles does not.
   ============================================================================ */

:root {
  color-scheme: light dark;

  /* -- surface ----------------------------------------------------------- */
  --bg:       light-dark(#ffffff, #141417);
  --bg-2:     light-dark(#fafafa, #1a1a1e);
  --bg-3:     light-dark(#f4f4f5, #202024);
  --raised:   light-dark(#ffffff, #1e1e22);
  --border:   light-dark(#e7e7ea, #2b2b31);
  --border-2: light-dark(#d4d4d8, #3f4650);

  /* -- ink: four rungs, each AA against its own ground -------------------- */
  --fg:   light-dark(#18181b, #f4f4f5);
  --fg-2: light-dark(#52525b, #a1a1aa);
  --fg-3: light-dark(#63636c, #9a9aa5);
  --fg-4: light-dark(#6e6e77, #8b8b94);

  /* The one solid control, in ink rather than a hue. A primary button is the
     most-pressed thing on a console; a coloured one puts colour in the chrome
     of every screen that has an action. */
  --solid:    light-dark(#18181b, #f4f4f5);
  --on-solid: light-dark(#fafafa, #18181b);

  /* -- brand: the accent stroke, and only that -----------------------------
     Read off the real marks in OMMAX-INT/ommax-atrium
     (`src/public/ommax-logo*.svg`): #23FCF0 is the accent stroke inside the
     wordmark. It appears ONLY in the lockup; a brand colour that leaks into a
     table cell is the same defect as an accent in the chrome.

     `--brand-ground: #00022C` lived here until 2026-09-20 and is gone rather
     than deprecated. It existed because the wordmark was an un-recolourable
     <img>, which forced a fixed dark panel in both themes; the mark is inline
     and takes `currentColor` now, so the lockup is ordinary chrome on --bg-2
     and there is no second ground to keep in step. */
  --brand-accent: #23FCF0;

  /* -- state: the only colour, one meaning each --------------------------- */
  --accent:      light-dark(#1a56db, #5b9dff);
  --accent-fg:   #ffffff;
  --accent-soft: light-dark(rgba(26, 86, 219, 0.07), rgba(91, 157, 255, 0.14));
  --ok:        light-dark(#15803d, #4ade80);
  --ok-soft:   light-dark(#f0fdf4, rgba(74, 222, 128, 0.12));
  --warn:      light-dark(#ca8a04, #facc15);
  --warn-soft: light-dark(#fefce8, rgba(250, 204, 21, 0.12));
  --bad:       light-dark(#b91c1c, #f87171);
  --bad-soft:  light-dark(#fef2f2, rgba(248, 113, 113, 0.12));
  --idle:      light-dark(#d4d4d8, #3f4650);
  --scrim:     light-dark(rgba(24, 24, 27, 0.32), rgba(0, 0, 0, 0.55));

  --shadow-sm: light-dark(0 1px 2px rgba(24,24,27,.05), 0 1px 2px rgba(0,0,0,.4));
  --shadow-md: light-dark(0 4px 12px -2px rgba(24,24,27,.07), 0 4px 12px -2px rgba(0,0,0,.5));
  --shadow-lg: light-dark(0 20px 44px -12px rgba(24,24,27,.16), 0 20px 44px -12px rgba(0,0,0,.6));
  --topbar-bg: var(--bg);

  /* -- type: five steps, named for the job -------------------------------- */
  --font-sans: ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: var(--font-sans);
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --t-xs:  11px;   /* micro: table heads, meta, hints */
  --t-sm:  13px;   /* ui: every control and every row */
  --t-md:  13px;
  --t-lg:  15px;   /* body prose */
  --t-xl:  19px;   /* title */
  --t-2xl: 24px;   /* display, and nothing above it */
  --t-3xl: 24px;

  --leading: 1.5;
  --leading-tight: 1.3;
  --track-label: 0.07em;
  --track-display: -0.02em;

  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 12px;
  --r-pill: 999px;

  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-7: 32px;

  /* Control heights are SET, never derived from padding. A derived height is
     how a row ends up stacking a 27px button beside a 30px one. */
  --h-sm: 28px; --h-md: 32px; --h-lg: 40px;

  --rail-w: 224px;
  /* Odd on purpose: the bottom border is inside the box, so an even bar leaves
     an even control on a half pixel and every glyph in it renders soft. */
  --topbar-h: 53px;

  --ease: cubic-bezier(0.2, 0.8, 0.25, 1);
  --dur: 120ms;
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }

@media (prefers-reduced-motion: reduce) {
  :root { --dur: 0ms; }
}

/* A scrollbar that reserves layout width makes every scrolling pane narrower
   than the fixed rows above and below it. */
* { scrollbar-width: none; }
*::-webkit-scrollbar { width: 0; height: 0; }
