/* ============================================
   5LAW Client Intelligence Dashboard
   Design Tokens
   ============================================ */

:root {
  /* Colors — Background */
  --bg-primary: #080810;
  --bg-surface: #12121e;
  --bg-surface-hover: #1a1a2a;
  --bg-elevated: #1e1e30;
  --bg-input: #0e0e1a;

  /* Colors — Background (aliases) */
  --bg-card: #12121e;

  /* Colors — Border */
  --border-default: #1e1e2e;
  --border-subtle: #1e1e2e;
  --border-hover: #2a2a3e;
  --border-focus: #ea7228;

  /* Colors — Accent */
  --accent: #ea7228;
  --accent-hover: #f58534;
  --accent-muted: rgba(234, 114, 40, 0.15);
  --accent-text: #ea7228;

  /* Colors — Text */
  --text-primary: #EFE9DB;
  --text-secondary: #8a8a9a;
  --text-muted: #5a5a6a;
  --text-inverse: #080810;

  /* Colors — Semantic / Aliases */
  --accent-red: #ef4444;
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.12);
  --warning: #eab308;
  --warning-bg: rgba(234, 179, 8, 0.12);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.12);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.12);

  /* Typography */
  --font-heading: 'Libre Caslon Display', 'Libre Caslon Text', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'DM Mono', 'SF Mono', 'Fira Code', monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Spacing */
  --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;
  --space-16: 4rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --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.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

  /* Layout */
  --sidebar-width: 260px;
  --topbar-height: 64px;
  --content-max-width: 1400px;
}

/* ========== LIGHT THEME ========== */
[data-theme="light"] {
  --bg-primary: #f5f5f7;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f0f0f2;
  --bg-elevated: #f0f0f2;
  --bg-input: #ffffff;
  --bg-subtle: #f8f8fa;

  --bg-card: #ffffff;

  --border-default: #e0e0e5;
  --border-subtle: #ebebf0;
  --border-hover: #d0d0d5;
  --border-focus: #ea7228;

  --text-primary: #1a1a2e;
  --text-secondary: #4a4a5a;
  --text-muted: #8a8a9a;
  --text-inverse: #ffffff;

  --accent: #ea7228;
  --accent-hover: #d4621e;
  --accent-muted: rgba(234, 114, 40, 0.1);
  --accent-text: #ea7228;

  --success: #16a34a;
  --success-bg: rgba(22, 163, 74, 0.1);
  --warning: #ca8a04;
  --warning-bg: rgba(202, 138, 4, 0.1);
  --error: #dc2626;
  --error-bg: rgba(220, 38, 38, 0.1);
  --info: #2563eb;
  --info-bg: rgba(37, 99, 235, 0.1);

  --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.12);
}

/* Sidebar stays dark even in light theme */
[data-theme="light"] .sidebar {
  background: #1a1a2e;
  border-right-color: #2a2a3e;
}
[data-theme="light"] .sidebar-logo,
[data-theme="light"] .sidebar-section-title,
[data-theme="light"] .sidebar-link,
[data-theme="light"] .sidebar-footer button {
  color: #ccc;
}
[data-theme="light"] .sidebar-link:hover,
[data-theme="light"] .sidebar-link.active {
  background: rgba(234, 114, 40, 0.15);
  color: #fff;
}
