/* binlyWms design tokens v2 ("Warstwy") - single source of truth for apps/web
   and apps/site. apps/site/public/tokens.css is an identical copy: after editing
   this file run `cp apps/web/src/styles/tokens.css apps/site/public/tokens.css`.
   Names follow the shadcn/ui vocabulary where one exists, so Tailwind 4 + shadcn
   can map them 1:1 (.claude/skills/binly-design/references/libraries.md).
   Contrast of every pair: .claude/skills/binly-design/references/tokens.md.

   Theme: no attribute = follow the OS; data-theme="light|dark" on <html> forces
   one (app only - the site always follows the OS). Light mode is light
   everywhere: no black tiles or buttons. */

:root {
  color-scheme: light dark;

  /* Page: cool neutral canvas + faint aurora; light tiles are white glass. */
  --canvas: oklch(0.975 0.005 250);
  --aurora-1: oklch(0.93 0.06 160 / 0.45);
  --aurora-2: oklch(0.93 0.045 285 / 0.4);
  --aurora-3: oklch(0.95 0.035 230 / 0.35);
  --noise-opacity: 0.03;

  /* Glass surfaces. --card is translucent (use with --blur); --card-solid where
     blur is unavailable or text must sit on an opaque fill (inputs, tables). */
  --background: oklch(0.985 0.003 250);
  --card: oklch(1 0 0 / 0.86);
  --card-solid: oklch(1 0 0);
  --popover: oklch(1 0 0 / 0.95);
  --muted: oklch(0.96 0.005 250);
  --glass-border: oklch(1 0 0);
  --glass-edge: oklch(0.25 0.02 260 / 0.07);
  --blur: blur(22px) saturate(160%);

  --foreground: oklch(0.22 0.025 260);
  --card-foreground: var(--foreground);
  --popover-foreground: var(--foreground);
  --muted-foreground: oklch(0.5 0.02 260);

  /* --border is decorative; anything a user must see to operate (field
     outline, checkbox, switch track) uses --input (3:1+). */
  --border: oklch(0.25 0.02 260 / 0.09);
  --input: oklch(0.63 0.015 260);

  /* Brand: emerald. --cta is the gradient fill of the one main action. */
  --primary: oklch(0.52 0.13 158);
  --primary-foreground: oklch(0.995 0.005 155);
  --primary-strong: oklch(0.74 0.15 158);
  --cta: linear-gradient(135deg, oklch(0.54 0.135 152), oklch(0.5 0.115 172));
  --cta-foreground: oklch(0.995 0.005 155);
  --cta-glow: oklch(0.55 0.14 158 / 0.4);
  /* shadcn "accent" = hover / selected fill, not a second brand color. */
  --accent: oklch(0.955 0.04 160);
  --accent-foreground: oklch(0.42 0.12 158);
  --secondary: var(--muted);
  --secondary-foreground: var(--foreground);
  --ring: oklch(0.56 0.14 158);

  --nav-active: oklch(0.94 0.05 160);
  --nav-active-foreground: oklch(0.3 0.08 158);

  /* Hero tile (the one featured tile per screen) and the shift card.
     Light: white like every tile (stands out by size, number and chart);
     dark: deep green gradient. */
  --hero: oklch(1 0 0);
  --hero-foreground: oklch(0.22 0.025 260);
  --hero-muted: oklch(0.5 0.02 260);
  --hero-line: oklch(0.25 0.02 260 / 0.08);
  --hero-chip: oklch(0.955 0.04 160);
  --hero-chart: oklch(0.6 0.15 157);
  /* Soft brand glow in the hero tile's corner. */
  --hero-glow: oklch(0.9 0.09 160 / 0.28);

  /* Status: text/icon color + subtle fill. */
  --success: oklch(0.5 0.13 155);
  --success-subtle: oklch(0.955 0.045 158);
  --warning: oklch(0.5 0.11 62);
  --warning-subtle: oklch(0.95 0.06 85);
  --destructive: oklch(0.53 0.19 27);
  --destructive-subtle: oklch(0.95 0.03 25);
  --info: oklch(0.5 0.13 248);
  --info-subtle: oklch(0.94 0.03 245);
  /* Violet: icon tint for categories (inbound), never a status. */
  --violet: oklch(0.52 0.17 290);
  --violet-subtle: oklch(0.94 0.035 290);

  /* Signal: rack-label yellow. Only location codes and the scan target. */
  --signal: oklch(0.9 0.16 98);
  --signal-foreground: oklch(0.25 0.04 98);

  /* Warehouse occupancy heatmap (sequential, one hue) + "full" marker. */
  --heat-low: oklch(0.95 0.02 165);
  --heat-high: oklch(0.6 0.14 158);
  --heat-full: oklch(0.76 0.13 70);

  /* Categorical chart series, fixed order (CVD-validated, both modes). */
  --chart-1: oklch(0.52 0.1 165);
  --chart-2: oklch(0.56 0.14 255);
  --chart-3: oklch(0.66 0.15 60);
  --chart-4: oklch(0.5 0.17 300);
  --chart-5: oklch(0.6 0.18 15);

  --shadow-tile: 0 1px 2px oklch(0.25 0.03 260 / 0.05), 0 12px 32px -14px oklch(0.25 0.03 260 / 0.16);
  --shadow-pop: 0 1px 2px oklch(0.25 0.03 260 / 0.06), 0 24px 48px -16px oklch(0.25 0.03 260 / 0.24);

  /* Shape. Nested corners: inner radius = outer radius - padding. */
  --radius-sm: 8px; /* chips, location labels, checkboxes */
  --radius: 12px; /* inputs, menu items, icon tiles */
  --radius-lg: 20px; /* inner blocks, table rows, popovers */
  --radius-xl: 26px; /* tiles, dialogs, sheets */
  --radius-2xl: 30px; /* sidebar rail */
  --radius-pill: 999px; /* buttons, nav items, filters, badges */

  --font-sans: "Instrument Sans Variable", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration: 160ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: oklch(0.155 0.018 210);
    --aurora-1: oklch(0.5 0.13 170 / 0.45);
    --aurora-2: oklch(0.45 0.16 290 / 0.32);
    --aurora-3: oklch(0.5 0.1 230 / 0.22);
    --noise-opacity: 0.07;
    --background: oklch(0.19 0.018 205);
    --card: oklch(0.26 0.02 200 / 0.55);
    --card-solid: oklch(0.235 0.02 200);
    --popover: oklch(0.25 0.02 200 / 0.94);
    --muted: oklch(0.27 0.02 200);
    --glass-border: oklch(1 0 0 / 0.09);
    --glass-edge: oklch(1 0 0 / 0.03);
    --foreground: oklch(0.96 0.01 190);
    --muted-foreground: oklch(0.75 0.02 200);
    --border: oklch(1 0 0 / 0.08);
    --input: oklch(0.59 0.02 200);
    --primary: oklch(0.82 0.15 162);
    --primary-foreground: oklch(0.18 0.04 180);
    --primary-strong: oklch(0.86 0.17 160);
    --cta: linear-gradient(135deg, oklch(0.86 0.16 160), oklch(0.8 0.13 195));
    --cta-foreground: oklch(0.18 0.04 180);
    --cta-glow: oklch(0.75 0.15 165 / 0.35);
    --accent: oklch(0.82 0.15 162 / 0.14);
    --accent-foreground: oklch(0.88 0.12 162);
    --ring: oklch(0.78 0.14 162);
    --nav-active: oklch(1 0 0 / 0.1);
    --nav-active-foreground: oklch(0.98 0.01 180);
    --hero: radial-gradient(120% 100% at 100% 0%, oklch(0.36 0.07 175), oklch(0.25 0.045 185) 55%, oklch(0.21 0.03 200));
    --hero-foreground: oklch(0.97 0.01 180);
    --hero-muted: oklch(0.8 0.03 185);
    --hero-line: oklch(1 0 0 / 0.08);
    --hero-chip: oklch(1 0 0 / 0.1);
    --hero-chart: oklch(0.86 0.16 160);
    --hero-glow: oklch(0.86 0.17 160 / 0.4);
    --success: oklch(0.82 0.14 158);
    --success-subtle: oklch(0.82 0.15 162 / 0.15);
    --warning: oklch(0.83 0.13 80);
    --warning-subtle: oklch(0.83 0.13 80 / 0.15);
    --destructive: oklch(0.77 0.15 25);
    --destructive-subtle: oklch(0.74 0.16 25 / 0.16);
    --info: oklch(0.79 0.11 240);
    --info-subtle: oklch(0.79 0.11 240 / 0.15);
    --violet: oklch(0.77 0.13 290);
    --violet-subtle: oklch(0.77 0.13 290 / 0.16);
    --signal: oklch(0.88 0.15 98);
    --signal-foreground: oklch(0.22 0.04 98);
    --heat-low: oklch(0.3 0.03 190);
    --heat-high: oklch(0.78 0.15 162);
    --heat-full: oklch(0.8 0.14 70);
    --chart-1: oklch(0.66 0.12 165);
    --chart-2: oklch(0.64 0.13 255);
    --chart-3: oklch(0.67 0.13 70);
    --chart-4: oklch(0.62 0.15 300);
    --chart-5: oklch(0.65 0.16 15);
    --shadow-tile: inset 0 1px 0 oklch(1 0 0 / 0.06), 0 24px 48px -20px oklch(0 0 0 / 0.6);
    --shadow-pop: inset 0 1px 0 oklch(1 0 0 / 0.08), 0 28px 56px -16px oklch(0 0 0 / 0.7);
  }
}

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

/* Same values as the media block above - keep both in sync. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: oklch(0.155 0.018 210);
  --aurora-1: oklch(0.5 0.13 170 / 0.45);
  --aurora-2: oklch(0.45 0.16 290 / 0.32);
  --aurora-3: oklch(0.5 0.1 230 / 0.22);
  --noise-opacity: 0.07;
  --background: oklch(0.19 0.018 205);
  --card: oklch(0.26 0.02 200 / 0.55);
  --card-solid: oklch(0.235 0.02 200);
  --popover: oklch(0.25 0.02 200 / 0.94);
  --muted: oklch(0.27 0.02 200);
  --glass-border: oklch(1 0 0 / 0.09);
  --glass-edge: oklch(1 0 0 / 0.03);
  --foreground: oklch(0.96 0.01 190);
  --muted-foreground: oklch(0.75 0.02 200);
  --border: oklch(1 0 0 / 0.08);
  --input: oklch(0.59 0.02 200);
  --primary: oklch(0.82 0.15 162);
  --primary-foreground: oklch(0.18 0.04 180);
  --primary-strong: oklch(0.86 0.17 160);
  --cta: linear-gradient(135deg, oklch(0.86 0.16 160), oklch(0.8 0.13 195));
  --cta-foreground: oklch(0.18 0.04 180);
  --cta-glow: oklch(0.75 0.15 165 / 0.35);
  --accent: oklch(0.82 0.15 162 / 0.14);
  --accent-foreground: oklch(0.88 0.12 162);
  --ring: oklch(0.78 0.14 162);
  --nav-active: oklch(1 0 0 / 0.1);
  --nav-active-foreground: oklch(0.98 0.01 180);
  --hero: radial-gradient(120% 100% at 100% 0%, oklch(0.36 0.07 175), oklch(0.25 0.045 185) 55%, oklch(0.21 0.03 200));
  --hero-foreground: oklch(0.97 0.01 180);
  --hero-muted: oklch(0.8 0.03 185);
  --hero-line: oklch(1 0 0 / 0.08);
  --hero-chip: oklch(1 0 0 / 0.1);
  --hero-chart: oklch(0.86 0.16 160);
  --hero-glow: oklch(0.86 0.17 160 / 0.4);
  --success: oklch(0.82 0.14 158);
  --success-subtle: oklch(0.82 0.15 162 / 0.15);
  --warning: oklch(0.83 0.13 80);
  --warning-subtle: oklch(0.83 0.13 80 / 0.15);
  --destructive: oklch(0.77 0.15 25);
  --destructive-subtle: oklch(0.74 0.16 25 / 0.16);
  --info: oklch(0.79 0.11 240);
  --info-subtle: oklch(0.79 0.11 240 / 0.15);
  --violet: oklch(0.77 0.13 290);
  --violet-subtle: oklch(0.77 0.13 290 / 0.16);
  --signal: oklch(0.88 0.15 98);
  --signal-foreground: oklch(0.22 0.04 98);
  --heat-low: oklch(0.3 0.03 190);
  --heat-high: oklch(0.78 0.15 162);
  --heat-full: oklch(0.8 0.14 70);
  --chart-1: oklch(0.66 0.12 165);
  --chart-2: oklch(0.64 0.13 255);
  --chart-3: oklch(0.67 0.13 70);
  --chart-4: oklch(0.62 0.15 300);
  --chart-5: oklch(0.65 0.16 15);
  --shadow-tile: inset 0 1px 0 oklch(1 0 0 / 0.06), 0 24px 48px -20px oklch(0 0 0 / 0.6);
  --shadow-pop: inset 0 1px 0 oklch(1 0 0 / 0.08), 0 28px 56px -16px oklch(0 0 0 / 0.7);
}

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