/* Design tokens — nautical / ship's-bridge palette.
   Everything downstream maps back to these primitives. */

:root {
  /* Text ink — deep marine, four levels of hierarchy */
  --ink: hsl(207 46% 13%);
  --ink-soft: hsl(207 22% 33%);
  --ink-faint: hsl(207 15% 49%);
  --ink-muted: hsl(207 13% 66%);
  --ink-invert: hsl(200 30% 97%);

  /* Surfaces — canvas is chart paper, cards rise via shadow (white is ceiling) */
  --canvas: hsl(200 33% 97%);
  --surface: hsl(0 0% 100%);
  --surface-sunken: hsl(202 28% 97.5%);   /* inputs sit inset, slightly darker */
  --surface-raised: hsl(0 0% 100%);      /* dropdowns/menus — white + shadow */
  --row-hover: hsl(214 90% 98%);         /* table row hover — light azure tint, lifts instead of dims */

  /* Operations-list row tint by aggregate urgency (red → orange → blue → green) */
  --row-overdue: hsl(4 74% 96.5%);
  --row-overdue-hover: hsl(4 72% 93%);
  --row-soon: hsl(34 86% 95.5%);
  --row-soon-hover: hsl(34 84% 91%);
  --row-active: hsl(214 84% 97.5%);
  --row-active-hover: hsl(214 84% 94.5%);
  --row-done: hsl(150 44% 96.5%);
  --row-done-hover: hsl(150 42% 92.5%);
  /* FB22-01: cancelled is terminal without being an achievement — grey, so it
     never reads as one of the files that closed */
  --row-cancelled: hsl(207 14% 96.5%);
  --row-cancelled-hover: hsl(207 14% 92.5%);

  /* Borders — low-alpha ink so edges blend until needed */
  --border-subtle: hsl(207 40% 20% / 0.07);
  --border: hsl(207 40% 20% / 0.12);
  --border-strong: hsl(207 40% 20% / 0.2);
  --focus-ring: hsl(202 90% 42% / 0.4);

  /* Brand / action — marine azure, deliberately not red/amber/green */
  --accent: hsl(204 82% 34%);
  --accent-hover: hsl(204 84% 28%);
  --accent-soft: hsl(204 70% 94%);
  --accent-ink: hsl(0 0% 100%);

  /* Navigation-light status system (the signature) */
  --status-pending: hsl(4 68% 50%);      /* port red   — Pendiente */
  --status-pending-soft: hsl(4 74% 95%);
  /* FB22-01: the cancellation banner — the same red as the text, at a tenth */
  --status-pending-tint: hsl(4 68% 50% / 0.1);
  --status-progress: hsl(34 92% 46%);    /* amber      — In progress / upcoming */
  --status-progress-soft: hsl(34 90% 94%);
  --status-done: hsl(150 52% 38%);       /* starboard green — Cumplido */
  --status-done-soft: hsl(150 45% 94%);
  --status-na: hsl(207 12% 60%);         /* gray       — No aplicable */
  --status-na-soft: hsl(207 18% 94%);

  /* Direction of change in reports. Darker and more saturated than the status
     system: a delta is small bold text on its own tint, so it needs the extra
     contrast (~4.8:1) that a chip carrying a word does not. */
  --delta-up: hsl(152 60% 28%);
  --delta-up-soft: hsl(150 45% 90%);
  --delta-down: hsl(20 95% 37%);
  --delta-down-soft: hsl(20 90% 92%);

  /* Risk alert — distinct from the deadline semaphore, per scope */
  --risk: hsl(280 52% 52%);
  --risk-soft: hsl(280 60% 96%);

  /* Urgency accents — critical deadlines and deadline events (FB8-10 dropped
     the Priority field; these remain the accents of the deadline semaphore) */
  --urgency-high: hsl(34 92% 46%);
  --urgency-crit: hsl(4 68% 50%);

  /* Spacing — 4px base */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Radius */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Shadows — subtle lift, never dramatic */
  --shadow-sm: 0 1px 2px hsl(207 40% 20% / 0.06);
  --shadow: 0 2px 8px hsl(207 40% 20% / 0.08), 0 1px 2px hsl(207 40% 20% / 0.06);
  --shadow-lg: 0 12px 32px hsl(207 40% 20% / 0.14), 0 2px 8px hsl(207 40% 20% / 0.08);

  /* Typography */
  --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Code", "SF Mono", ui-monospace, Consolas, "Liberation Mono", monospace;

  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 20px;
  --text-xl: 26px;
  --text-2xl: 34px;

  --leading-tight: 1.2;
  --leading: 1.5;

  /* Layout metrics */
  --topbar-h: 60px;
  --sidebar-w: 248px;
  --sidebar-w-collapsed: 68px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --dur-fast: 120ms;
  --dur: 200ms;
  /* The sidebar sweeps a much longer distance than a hover state, so it gets its
     own, slower beat — at 200ms the rail snapped open under the pointer. */
  --dur-nav: 280ms;
}
