/*
 * Author:  Daryl Jones <daryl@tcomeng.com>
 * Date Created: 08/04/2026
 * Copyright: (c) Daryl D. Jones, Inc. 2026
 * Revision History:  <placeholder>
 *
 * TRAK-ORC shared design system — Modern Dark UI.
 * These tokens are the single source of truth for styling. Copied verbatim
 * from the shared design system; do not hardcode hex values elsewhere.
 */

:root {
  /* Backgrounds */
  --bg-canvas: #0f1115;      /* page background */
  --bg-surface: #161a21;     /* cards, panels */
  --bg-surface-raised: #1e232c; /* modals, dropdowns, popovers */
  --bg-hover: #262c37;       /* hover state on surfaces */

  /* Borders / dividers */
  --border-subtle: #2a2f3a;
  --border-strong: #3a4150;

  /* Text */
  --text-primary: #e6e8eb;
  --text-secondary: #9aa3af;
  --text-disabled: #5b6472;

  /* Brand / accent */
  --accent: #6366f1;        /* primary actions, links, focus rings */
  --accent-hover: #7c7ff2;
  --accent-muted: #6366f11a; /* accent at low opacity for subtle backgrounds */

  /* Semantic */
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Shadows (dark UIs need subtle depth, not drop shadows) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);

  /* Spacing scale (8px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;

  /* Radius */
  --radius-input: 6px;
  --radius-card: 10px;
  --radius-pill: 999px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
}

/*
 * Light "day" theme — for well-lit offices and, especially, sunlit patrol-car
 * mobile computers where a dark UI washes out. Additive: the dark theme above
 * stays the default; this block only overrides the color tokens when the root
 * carries data-theme="light" (set from the user's saved preference). Components
 * read the tokens, so they adapt without per-component changes. Text/accent are
 * pushed to high-contrast shades so they hold up in direct sunlight.
 */
:root[data-theme="light"] {
  --bg-canvas: #f4f5f7;         /* soft off-white page (less glare than pure #fff) */
  --bg-surface: #ffffff;        /* cards, panels */
  --bg-surface-raised: #ffffff; /* modals/dropdowns (elevation via shadow) */
  --bg-hover: #eceff3;          /* hover on surfaces */

  --border-subtle: #dfe3e8;
  --border-strong: #c2c8d2;

  --text-primary: #171a1f;      /* ~16:1 on white */
  --text-secondary: #4d5561;    /* ~8:1 on white — readable in sunlight */
  --text-disabled: #9aa1ab;

  --accent: #4f46e5;            /* indigo-600: stronger contrast on white than #6366f1 */
  --accent-hover: #4338ca;
  --accent-muted: #4f46e51f;

  --success: #15803d;
  --warning: #b45309;
  --danger: #dc2626;
  --info: #2563eb;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 6px 16px rgba(16, 24, 40, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  line-height: 1.5;
  background: var(--bg-canvas);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 var(--space-4);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5625rem; }
h3 { font-size: 1.25rem; }

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { color: var(--accent-hover); text-decoration: underline; }

code, pre, .mono { font-family: var(--font-mono); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  a, button, input, .btn { transition: all 150ms ease-out; }
}
