/**
 * Florida Predictor — Public Dashboard Design Tokens v3.0
 * STANDALONE — No dependency on admin's main.css
 * 
 * Palette: "Deep Ocean Command"
 * Fonts: Play (display) + Roboto Condensed (body)
 */

/* ============================================================================
   DESIGN TOKENS
   ============================================================================ */

:root {
  /* ===== BRAND COLORS ===== */
  --fp-primary: #074b78;
  --fp-primary-dark: #053a5a;
  --fp-primary-light: #0a5d96;
  --fp-secondary: #00a8ff;
  --fp-secondary-dark: #0088cc;
  --fp-secondary-light: #33b9ff;

  /* ===== BLUE SCALE ===== */
  --blue-50: #f0f9ff;
  --blue-100: #e0f2fe;
  --blue-200: #bae6fd;
  --blue-300: #7dd3fc;
  --blue-400: #38bdf8;
  --blue-500: #00a8ff;
  --blue-600: #0284c7;
  --blue-700: #0369a1;
  --blue-800: #074b78;
  --blue-900: #053a5a;

  /* ===== FUNCTIONAL ACCENTS ===== */
  --color-success: #10b981;
  --color-success-dark: #059669;
  --color-success-light: #34d399;
  --color-warning: #f59e0b;
  --color-warning-dark: #d97706;
  --color-warning-light: #fbbf24;
  --color-danger: #ef4444;
  --color-danger-dark: #dc2626;
  --color-danger-light: #f87171;
  --color-info: #3b82f6;
  --color-info-dark: #2563eb;
  --color-info-light: #60a5fa;
  --color-gold: #f59e0b;
  --color-violet: #8b5cf6;

  /* ===== LIGHT THEME (default) ===== */
  --bg-main: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f8fafc;
  --bg-elevated: #ffffff;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --text-inverse: #ffffff;

  /* ===== SIDEBAR (always dark) ===== */
  --sidebar-bg: linear-gradient(180deg, #0c1222 0%, #1a2332 100%);
  --sidebar-text: #e2e8f0;
  --sidebar-text-dim: #64748b;
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-hover: rgba(255, 255, 255, 0.05);
  --sidebar-active: rgba(0, 168, 255, 0.12);
  --sidebar-active-text: #38bdf8;
  --sidebar-width: 260px;

  /* ===== GRADIENTS ===== */
  --gradient-primary: linear-gradient(135deg, #074b78, #00a8ff);
  --gradient-hero: linear-gradient(135deg, #0a5d96, #00a8ff, #0369a1);
  --gradient-gold: linear-gradient(135deg, #f59e0b, #d97706);
  --gradient-success: linear-gradient(135deg, #10b981, #059669);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(255,255,255,0.6));
  --gradient-glow: radial-gradient(circle at center, rgba(0,168,255,0.1) 0%, transparent 70%);

  /* ===== GLASSMORPHISM ===== */
  --glass-white: rgba(255, 255, 255, 0.7);
  --glass-white-strong: rgba(255, 255, 255, 0.9);
  --glass-blue: rgba(7, 75, 120, 0.06);
  --glass-blue-med: rgba(7, 75, 120, 0.1);

  /* ===== SHADOWS (brand-tinted) ===== */
  --shadow-sm: 0 1px 2px rgba(7, 75, 120, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(7, 75, 120, 0.08), 0 2px 4px -2px rgba(7, 75, 120, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(7, 75, 120, 0.1), 0 4px 6px -4px rgba(7, 75, 120, 0.06);
  --shadow-xl: 0 20px 25px -5px rgba(7, 75, 120, 0.12), 0 8px 10px -6px rgba(7, 75, 120, 0.05);
  --shadow-glow: 0 0 20px rgba(0, 168, 255, 0.25);
  --shadow-glow-strong: 0 0 30px rgba(0, 168, 255, 0.45);
  --shadow-inset-ball: inset 0 2px 4px rgba(255,255,255,0.15), inset 0 -3px 6px rgba(0,0,0,0.15);

  /* ===== TYPOGRAPHY ===== */
  --font-display: 'Play', sans-serif;
  --font-body: 'Roboto Condensed', sans-serif;

  /* ===== SPACING (8px scale) ===== */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */

  /* Legacy spacing aliases (for JS-generated inline styles) */
  --spacing-xs: var(--space-1);
  --spacing-sm: var(--space-2);
  --spacing-md: var(--space-4);
  --spacing-lg: var(--space-6);
  --spacing-xl: var(--space-8);
  --spacing-2xl: var(--space-12);

  /* ===== BORDER RADIUS ===== */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-full: 9999px;

  /* ===== TRANSITIONS ===== */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-swift: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: 150ms var(--ease-smooth);
  --transition-base: 300ms var(--ease-smooth);
  --transition-slow: 500ms var(--ease-smooth);

  /* ===== Z-INDEX SCALE ===== */
  --z-base: 1;
  --z-sidebar: 100;
  --z-overlay: 200;
  --z-mobile-header: 90;
  --z-dropdown: 300;
  --z-tooltip: 400;

  /* ===== LAYOUT ===== */
  --mobile-header-h: 56px;
  --top-bar-h: 72px;
  --container-max: 1400px;
}

/* ============================================================================
   DARK THEME OVERRIDES
   ============================================================================ */

:root.dark {
  --bg-main: #0c1222;
  --bg-surface: #1a2332;
  --bg-surface-hover: #243044;
  --bg-elevated: #1e293b;
  --border-color: #2d3a4a;
  --border-light: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;

  --glass-white: rgba(26, 35, 50, 0.8);
  --glass-white-strong: rgba(26, 35, 50, 0.95);
  --glass-blue: rgba(0, 168, 255, 0.06);
  --glass-blue-med: rgba(0, 168, 255, 0.1);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.35);
  --shadow-inset-ball: inset 0 2px 4px rgba(0,168,255,0.05), inset 0 -3px 6px rgba(0,0,0,0.2);
}

/* ============================================================================
   BASE RESET (minimal — no Tailwind dependency)
   ============================================================================ */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus visible */
*:focus-visible {
  outline: 3px solid var(--fp-secondary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

/* High contrast */
@media (prefers-contrast: high) {
  :root {
    --border-color: var(--blue-800);
  }
}