/* ============================================================
   MALA OS v2 — Design Tokens
   Luxury Maritime Command Center
   ============================================================ */

:root {
  /* ── Brand Palette ── */
  --navy-950: #050d18;
  --navy-900: #0a1628;
  --navy-800: #0f1f38;
  --navy-700: #162a4a;
  --navy-600: #1e3a5f;
  --navy-500: #2a4d7a;
  --navy-400: #3d6a9e;
  --navy-300: #5c8ab8;

  /* ── Surface Colors ── */
  --surface-deep: #0a1628;
  --surface-panel: #0f1f38;
  --surface-elevated: #162a4a;
  --surface-hover: #1e3a5f;
  --surface-glass: rgba(15, 31, 56, 0.72);
  --surface-glass-border: rgba(255, 255, 255, 0.06);

  /* ── Accent: Brushed Gold ── */
  --gold-500: #c9a227;
  --gold-400: #d4b84a;
  --gold-300: #e0c96e;
  --gold-600: #a68420;
  --gold-glow: rgba(201, 162, 39, 0.25);

  /* ── Semantic Colors ── */
  --success: #0d9f6e;
  --success-soft: rgba(13, 159, 110, 0.12);
  --warning: #e09b2d;
  --warning-soft: rgba(224, 155, 45, 0.12);
  --danger: #e85d4e;
  --danger-soft: rgba(232, 93, 78, 0.12);
  --info: #3b82f6;
  --info-soft: rgba(59, 130, 246, 0.12);

  /* ── Text ── */
  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0a1628;

  /* ── Typography Scale ── */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 15px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 36px;

  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

  /* ── Spacing Scale (8px base) ── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* ── Radii ── */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* ── Shadows ── */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-gold: 0 0 20px var(--gold-glow);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.04);

  /* ── Transitions ── */
  --transition-fast: 120ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 350ms ease;

  /* ── Z-Index Scale ── */
  --z-base: 1;
  --z-sticky: 10;
  --z-dropdown: 20;
  --z-modal-backdrop: 40;
  --z-modal: 50;
  --z-toast: 60;

  /* ── Layout ── */
  --sidebar-width: 260px;
  --sidebar-collapsed: 64px;
  --header-height: 64px;
  --rail-width: 56px;
  --content-max: 1440px;
}

/* ── Light Mode Overrides ── */
[data-theme="light"] {
  --surface-deep: #f0f2f7;
  --surface-panel: #ffffff;
  --surface-elevated: #f8f9fc;
  --surface-hover: #eef0f5;
  --surface-glass: rgba(255, 255, 255, 0.85);
  --surface-glass-border: rgba(0, 0, 0, 0.06);

  --text-primary: #1a2332;
  --text-secondary: #4a5568;
  --text-muted: #8896a8;
  --text-inverse: #ffffff;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-inset: inset 0 1px 0 rgba(0, 0, 0, 0.03);
}

[data-theme="light"] body {
  background: #f0f2f7;
  color: var(--text-primary);
}

[data-theme="light"] .rail {
  background: #ffffff;
  border-right-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .main {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201, 162, 39, 0.03), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(230, 235, 245, 0.5), transparent),
    #f0f2f7;
}

[data-theme="light"] .header-search input {
  background: #f0f2f7;
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
}

[data-theme="light"] .header-btn {
  background: #f0f2f7;
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--text-muted);
}

[data-theme="light"] .header-btn:hover {
  background: #e8ecf2;
  color: var(--text-secondary);
}

[data-theme="light"] .rail-item:hover {
  background: #f0f2f7;
}

[data-theme="light"] .rail-item.active {
  background: var(--gold-500);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #c8cdd6;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: #a8b0bd;
}
  --sidebar-width: 260px;
  --sidebar-collapsed: 64px;
  --header-height: 64px;
  --rail-width: 56px;
  --content-max: 1440px;

  /* ── Animations ── */
  --pulse-gold: pulse-gold 2s ease-in-out infinite;
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 var(--gold-glow); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
