/*
 * QuantumHQ Design Tokens — "Fleet Console" industrial theme
 * Source of truth: UI-001 §3.1 (Semantic Color Palette) and §3.3 (CSS
 * variables), revised 2026-07-21 to the operator-approved Fleet Console
 * palette (qhq-redux mockup #3, approved 2026-07-20). Variable NAMES are
 * unchanged — only values — so the theme.go per-tenant override allowlist
 * keeps working. Do not alter these values without updating UI-001 first.
 * Per-tenant overrides are injected at runtime by the Theme API (UI-001
 * §12), not by editing this file.
 */

:root {
  /* Dark-only theme: tell the UA so native chrome (select popups,
     date pickers, checkboxes, scrollbars) renders dark, not white. */
  color-scheme: dark;

  /* Background layers (dark → light): room / chassis / raised / popover */
  --bg-base: #0a1628;
  --bg-surface: #122035;
  --bg-elevated: #1a3048;
  --bg-overlay: #1c3450;
  --bg-input: #081120;
  --bg-subtle: var(--bg-input);

  /* Borders — green-tinted machine lines */
  --border-subtle: rgba(119, 186, 100, 0.10);
  --border-default: rgba(119, 186, 100, 0.16);
  --border-strong: rgba(119, 186, 100, 0.32);

  /* Text */
  --text-primary: #e8f4e5;
  --text-secondary: #8ba89e;
  --text-tertiary: #74938a;
  --text-inverse: #0a1628;

  /* Accent — green primary, steel-blue secondary */
  --accent-primary: #77BA64;
  --accent-primary-hover: #8cc97a;
  --accent-primary-muted: rgba(119, 186, 100, 0.12);
  --accent-secondary: #285A84;
  --accent-secondary-muted: rgba(40, 90, 132, 0.18);

  /* Status (functional — do NOT override arbitrarily).
     Amber is for warnings ONLY, never decoration. */
  --status-healthy: #77BA64;
  --status-healthy-muted: rgba(119, 186, 100, 0.12);
  --status-warning: #e8b644;
  --status-warning-muted: rgba(232, 182, 68, 0.12);
  --status-critical: #d45454;
  --status-critical-muted: rgba(212, 84, 84, 0.12);
  --status-error: var(--status-critical);
  --status-info: #64a0ba;
  --status-info-muted: rgba(100, 160, 186, 0.12);
  --status-unknown: #5f7a72;
  --status-unknown-muted: rgba(95, 122, 114, 0.12);
  --status-maintenance: #a78bfa;

  /* Interactive */
  --focus-ring: rgba(119, 186, 100, 0.5);
  --hover-overlay: rgba(119, 186, 100, 0.06);
  --active-overlay: rgba(119, 186, 100, 0.10);
  --drag-overlay: rgba(119, 186, 100, 0.06);

  /* Typography
   * Inter and JetBrains Mono are self-hostable — see UI-001 §4.1.
   * We rely on system-font fallbacks + font-display: swap rather than
   * Google Fonts CDN. When the shared UI package ships bundled webfonts,
   * @font-face declarations should land in this file.
   */
  --font-display: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-focus: 0 0 0 3px var(--focus-ring);

  /* Transitions */
  --transition-fast: 100ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease;

  /* Layout */
  --sidebar-width-collapsed: 56px;
  --sidebar-width-expanded: 240px;
  --topbar-height: 72px;
  --content-max-width: 1600px;
  --panel-gap: var(--space-4);

  /* ---- Fleet Console machined-metal tokens (additive; UI-001 §3.4) ---- */
  --qhq-inset: #081120;                        /* milled recess bg */
  --qhq-panel-a: #16273d;                      /* panel top sheen */
  --qhq-panel-c: #0d1a2c;                      /* panel base */
  --qhq-etch: #050c18;                         /* engraved line */
  --qhq-line: rgba(119, 186, 100, 0.16);
  --qhq-line-hi: rgba(119, 186, 100, 0.32);
  --qhq-green: #77BA64;
  --qhq-green-dk: #4a9a78;
  --qhq-blue: #285A84;
  --qhq-blue-lt: #64a0ba;
  --qhq-warn: #e8b644;
  --qhq-bad: #d45454;
  --qhq-steel-ink: #0a1628;                    /* text stamped into steel */
  --qhq-grad: linear-gradient(135deg, #77BA64, #285A84);
  --qhq-grad-v: linear-gradient(180deg, #8cc97a, #77BA64 40%, #3f6f7e 80%, #285A84);
  --qhq-rail: linear-gradient(90deg, transparent, rgba(119, 186, 100, 0.55), rgba(40, 90, 132, 0.55), transparent);
  --qhq-ease: cubic-bezier(0.2, 0.7, 0.25, 1);
  /* Tinted ink for chips/notes (readable on dark) */
  --qhq-ink-ok: #a5d896;
  --qhq-ink-warn: #f0cd7f;
  --qhq-ink-bad: #f0a49a;
  --qhq-ink-agent: #9cc6da;
}
