/* Copyright (c) 2026 LouieAuto. Unified design tokens — apply everywhere.
 *
 * Warm luxury dark: gold on warm cream, not cold gray. Built for a car
 * guy at the desk 8am–9pm. Premium car-brand aesthetic, not generic SaaS.
 */

:root {
  /* Navy system — THE primary dark color */
  --navy: #0d1b2e;
  --navy-deep: #0a0f1e;
  --navy-light: #1a2744;

  /* Gold system — THE accent color */
  --gold: #8b6a2a;
  --gold-light: #a5795a;
  --gold-dark: #6b4f1e;

  /* Light system — THE background color */
  --cream: #f8fafc;
  --cream-dark: #f1f5f9;
  --cream-dim: rgba(248, 250, 252, 0.65);

  /* Text colors */
  --ink: #0d1b2e;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  /* Backgrounds */
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --bg-gold: #f0fdfa;

  /* Borders */
  --border-light: #e2e8f0;
  --border-muted: #e2e8f0;

  /* Semantic */
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Consolidated semantic aliases */
  --color-success: #22c55e;
  --color-danger: #dc2626;
  --color-warning: #d97706;

  /* Typography */
  --font-serif: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'JetBrains Mono', 'Courier New', monospace;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* ── Shared button primitives — 3 types, max ── */
.btn-primary,
.louie-btn-primary {
  background: var(--gold);
  color: var(--navy-deep);
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.2s;
  font-size: 14px;
}
.btn-primary:hover,
.louie-btn-primary:hover { background: var(--gold-dark); }

.btn-secondary,
.louie-btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.2s;
  font-size: 14px;
}
.btn-secondary:hover,
.louie-btn-secondary:hover { background: var(--bg-gold); }

.btn-ghost,
.louie-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.2s;
  font-size: 14px;
}
.btn-ghost:hover,
.louie-btn-ghost:hover { background: var(--bg-light); }

/* ── Sidebar category badges — consistent cross-OS ── */
.sidebar-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 5px;
  border-radius: 3px;
  margin-right: 8px;
  font-family: var(--font-sans);
}
.sidebar-badge.gold { background: var(--gold); color: var(--navy-deep); }
.sidebar-badge.dark { background: var(--navy-deep); color: var(--gold); }
.sidebar-badge.muted { background: rgba(255, 255, 255, 0.08); color: var(--text-muted); }

/* ── Status / metric badges ── */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-sans);
}
.status-badge.success { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.status-badge.warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.status-badge.danger  { background: rgba(239, 68, 68, 0.1);  color: var(--danger); }
.status-badge.info    { background: rgba(59, 130, 246, 0.1);    color: var(--info); }

/* ── Card primitive ── */
.louie-card {
  background: var(--color-card);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  transition: background 0.15s, box-shadow 0.15s;
}
.louie-card:hover { background: var(--color-card-hover); box-shadow: var(--shadow-md); }

/* ── Modal primitive ── */
.louie-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.7);
  display: none;
  align-items: center; justify-content: center;
  z-index: 300;
  padding: 40px 20px;
}
.louie-modal-overlay.open { display: flex; }
.louie-modal {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  max-width: 780px; width: 100%;
  max-height: 85vh;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.louie-modal-header {
  background: var(--color-dark-1);
  color: var(--color-text-on-dark);
  padding: 18px 24px;
  border-left: 4px solid var(--color-gold);
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px;
}
.louie-modal-header .title { font-size: 16px; font-weight: 600; font-family: var(--font-sans); }
.louie-modal-header .subtitle { font-size: 12px; color: var(--color-text-muted-dark); margin-top: 2px; }
.louie-modal-header .close {
  background: none; border: none; color: var(--color-gold);
  font-size: 22px; cursor: pointer; line-height: 1; padding: 0;
}
.louie-modal-body {
  padding: 24px; overflow-y: auto; flex: 1;
  background: var(--color-card); color: var(--color-text-primary);
}
.louie-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex; justify-content: flex-end; gap: 12px;
  background: var(--color-panel);
}
