/* ── Light theme ─────────────────────────────── */
.theme-light {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #1e40af;
  --accent-fg: #ffffff;
  --success: #166534;
  --success-bg: #f0fdf4;
  --warning: #92400e;
  --warning-bg: #fffbeb;
  --danger: #991b1b;
}

/* ── Navy theme ──────────────────────────────── */
.theme-navy {
  --bg: #0a1628;
  --surface: #0d1f3c;
  --surface-2: #1e3a5f;
  --border: #1e3a5f;
  --text: #e2e8f0;
  --text-muted: #64748b;
  --accent: #3b82f6;
  --accent-fg: #ffffff;
  --success: #86efac;
  --success-bg: #1a2e1a;
  --warning: #fbbf24;
  --warning-bg: #1c1a00;
  --danger: #f87171;
}

/* ── Warm Neutral theme ──────────────────────── */
.theme-warm {
  --bg: #faf9f7;
  --surface: #ffffff;
  --surface-2: #f5f4f2;
  --border: #e8e3dd;
  --text: #18181b;
  --text-muted: #78716c;
  --accent: #18181b;
  --accent-fg: #fafafa;
  --success: #166534;
  --success-bg: #f0fdf4;
  --warning: #92400e;
  --warning-bg: #fef9ee;
  --danger: #991b1b;
}

/* ── Base styles using variables ─────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, sans-serif;
  margin: 0;
}

/* Top bar only (direct child of body); scoped so nested navs like the
   admin sidebar don't inherit the blue background + horizontal flex. */
body > nav {
  background: var(--accent);
  color: var(--accent-fg);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

body > nav a { color: var(--accent-fg); text-decoration: none; font-size: 0.875rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.btn {
  background: var(--accent);
  color: var(--accent-fg);
  border: none;
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.btn-ghost {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

input, select, textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  width: 100%;
  box-sizing: border-box;
}

label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.25rem;
}
