/*
 * ProducerLens shared design tokens.
 *
 * Extracted from dashboard.html / admin.html / login.html to eliminate
 * drift between surfaces and to give new surfaces (agent drawer, command
 * palette, clusters, leaderboard, etc.) a single source of truth.
 *
 * Slogan: "No more spreadsheets". The visual vocabulary here is deliberately
 * magazine/product-dashboard rather than ops-console — elevated surfaces,
 * legible monospace for data, playful accents on state.
 */

:root {
  /* ── Surfaces ─────────────────────────────────────────────────────────── */
  --bg: #080c10;
  --surface: #0e1318;
  --surface2: #141b22;
  --surface3: #1c2530;          /* hover / elevated */
  --surface-glass: rgba(20, 27, 34, 0.72);
  --overlay: rgba(8, 12, 16, 0.78);

  /* ── Borders ──────────────────────────────────────────────────────────── */
  --border: rgba(255, 255, 255, 0.07);
  --border-bright: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.22);

  /* ── Typography ───────────────────────────────────────────────────────── */
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --muted: #4a5568;
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Syne", "DM Sans", system-ui, sans-serif;
  --font-mono: "DM Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  /* ── Accent palette ───────────────────────────────────────────────────── */
  --blue: #3b82f6;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --purple: #8b5cf6;
  --cyan: #06b6d4;
  --pink: #ec4899;

  /* ── Data-viz palette (ordered, high-contrast, color-blind aware) ─────── */
  --viz-1: #3b82f6;
  --viz-2: #10b981;
  --viz-3: #f59e0b;
  --viz-4: #8b5cf6;
  --viz-5: #06b6d4;
  --viz-6: #ec4899;
  --viz-7: #ef4444;
  --viz-8: #a3e635;

  /* ── Spacing scale (4px 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-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 999px;

  /* ── Elevation ────────────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 0 1px rgba(59, 130, 246, 0.35), 0 12px 40px rgba(59, 130, 246, 0.2);

  /* ── Motion ───────────────────────────────────────────────────────────── */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-emphasized: cubic-bezier(0.2, 0, 0, 1);
  --duration-fast: 120ms;
  --duration-base: 180ms;
  --duration-slow: 320ms;

  /* ── Layout ───────────────────────────────────────────────────────────── */
  --page-max: 1440px;
  --z-header: 100;
  --z-drawer: 200;
  --z-overlay: 250;
  --z-palette: 300;
  --z-toast: 400;
}

/* Global resets that used to live in dashboard.html. Surfaces that want
   their own box-sizing / margin strategy can override locally. */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0ms !important;
    transition-duration: 0ms !important;
  }
}
