/* ═══════════════════════════════════════════════════════════════════
   THEME ENGINE - 6 radically different visual identities
   Switching via data-theme on <html>, persisted in localStorage
   Default "indigo" = :root vars in layout.css (untouched)
   ═══════════════════════════════════════════════════════════════════ */


/* ╔══════════════════════════════════════════════════════════════════╗
   ║  2. MIDNIGHT - Linear/Raycast surgical precision                ║
   ║  Monospace accents · 1px borders · no shadows · dotted seps     ║
   ║  Tight density · outlined badges · top-glow cards               ║
   ╚══════════════════════════════════════════════════════════════════╝ */

html[data-theme="midnight"] {
  /* Palette */
  --accent: #8b5cf6;
  --accent-hover: #7c3aed;
  --accent-light: rgba(139,92,246,.1);
  --accent-muted: rgba(139,92,246,.25);
  --accent-subtle: rgba(139,92,246,.06);
  --accent-glow: rgba(139,92,246,.18);
  --bg: #09090b;
  --bg-card: #111113;
  --bg-hover: #1a1a1f;
  --bg-active: rgba(139,92,246,.1);
  --border: #27272a;
  --border-light: #222225;
  --text: #e4e4e7;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;
  --success: #34d399;
  --success-bg: rgba(52,211,153,.08);
  --warning: #fbbf24;
  --warning-bg: rgba(251,191,36,.08);
  --danger: #f87171;
  --danger-bg: rgba(248,113,113,.08);
  --info: #60a5fa;
  --info-bg: rgba(96,165,250,.08);
  /* Kill all shadows - borders only in dark */
  --shadow-sm: none;
  --shadow: none;
  --shadow-md: none;
  --shadow-lg: 0 4px 24px rgba(0,0,0,.5);
  --shadow-xl: 0 12px 48px rgba(0,0,0,.6);
  /* Tight radii */
  --radius: 6px;
  --radius-sm: 4px;
  --radius-lg: 8px;
  --radius-xl: 10px;
  /* Typography */
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
}

/* Monospace labels + stats - the surgical feel */
html[data-theme="midnight"] .kpi-card .kpi-label,
html[data-theme="midnight"] .kpi-card .kpi-sub,
html[data-theme="midnight"] .col-header,
html[data-theme="midnight"] .form-label,
html[data-theme="midnight"] .step-type,
html[data-theme="midnight"] .log-row,
html[data-theme="midnight"] .draft-step,
html[data-theme="midnight"] .seq-stat-label,
html[data-theme="midnight"] .activity-time,
html[data-theme="midnight"] .sent-total,
html[data-theme="midnight"] .filter-pill,
html[data-theme="midnight"] .nav-badge {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* KPI values: massive tabular nums */
html[data-theme="midnight"] .kpi-card .kpi-value {
  font-size: 38px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.04em;
}

/* Top-glow on cards instead of shadows */
html[data-theme="midnight"] .kpi-card,
html[data-theme="midnight"] .card,
html[data-theme="midnight"] .step-card,
html[data-theme="midnight"] .activity-item {
  box-shadow: none;
  border: 1px solid var(--border);
  border-top: 1px solid rgba(139,92,246,.15);
}
html[data-theme="midnight"] .kpi-card:hover,
html[data-theme="midnight"] .card:hover,
html[data-theme="midnight"] .step-card:hover,
html[data-theme="midnight"] .activity-item:hover {
  box-shadow: none;
  border-top-color: rgba(139,92,246,.35);
  transform: none;
}

/* KPI top bar: brighter glow */
html[data-theme="midnight"] .kpi-card::before {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,.4), transparent);
}
html[data-theme="midnight"] .kpi-card.accent::before { background: linear-gradient(90deg, transparent, rgba(139,92,246,.6), transparent); }
html[data-theme="midnight"] .kpi-card.success::before { background: linear-gradient(90deg, transparent, rgba(52,211,153,.6), transparent); }
html[data-theme="midnight"] .kpi-card.warning::before { background: linear-gradient(90deg, transparent, rgba(251,191,36,.6), transparent); }
html[data-theme="midnight"] .kpi-card.danger::before { background: linear-gradient(90deg, transparent, rgba(248,113,113,.6), transparent); }

/* Active nav: left accent bar, no background */
html[data-theme="midnight"] .sidebar-nav-item.active {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 2px 0 0 var(--accent);
  border-radius: 0;
}

/* Tighter padding - 80% of base */
html[data-theme="midnight"] .sidebar-nav-item { padding: 5px 10px; font-size: 12.5px; }
html[data-theme="midnight"] .kpi-card { padding: 14px 16px; gap: 4px; }
html[data-theme="midnight"] .list-item { padding: 8px 14px; }
html[data-theme="midnight"] .col-header { padding: 10px 14px; height: 40px; }
html[data-theme="midnight"] .sidebar-header { height: 40px; padding: 10px 14px; }
html[data-theme="midnight"] .dashboard-grid { gap: 10px; padding: 16px; }

/* Outlined badges instead of filled */
html[data-theme="midnight"] .badge {
  background: transparent !important;
  border: 1px solid currentColor;
  padding: 1px 7px;
}
html[data-theme="midnight"] .badge-draft { color: #fbbf24; }
html[data-theme="midnight"] .badge-active { color: #34d399; }
html[data-theme="midnight"] .badge-paused { color: #71717a; }
html[data-theme="midnight"] .badge-archived { color: #52525b; }
html[data-theme="midnight"] .badge-completed { color: #60a5fa; }
html[data-theme="midnight"] .badge-pending { color: #fbbf24; }
html[data-theme="midnight"] .badge-sent { color: #34d399; }
html[data-theme="midnight"] .badge-bounced,
html[data-theme="midnight"] .badge-failed { background: rgba(248,113,113,.15); color: #f87171; }
html[data-theme="midnight"] .badge-rejected { background: rgba(248,113,113,.15); color: #f87171; }
html[data-theme="midnight"] .badge-soft-bounce { background: rgba(251,191,36,.15); color: #fbbf24; }
html[data-theme="midnight"] .badge-replied { color: #a78bfa; }
html[data-theme="midnight"] .badge-skipped { color: #52525b; }
html[data-theme="midnight"] .badge-approved { color: #34d399; }
html[data-theme="midnight"] .badge-warming_up { color: #fbbf24; }
html[data-theme="midnight"] .badge-suspended { color: #f87171; }
html[data-theme="midnight"] .badge-edited { color: #60a5fa; }
html[data-theme="midnight"] .badge-dismissed { color: #52525b; }
html[data-theme="midnight"] .badge-opted_out { color: #f87171; }
html[data-theme="midnight"] .badge-reply { color: #c4b5fd; }

/* Dotted separators */
html[data-theme="midnight"] .sidebar-sep { background: none; border-top: 1px dotted var(--border); height: 0; }
html[data-theme="midnight"] .divider { background: none; border-top: 1px dotted var(--border); height: 0; }
html[data-theme="midnight"] .step-delay-badge { border-style: dotted; }

/* Ultra-thin scrollbar */
html[data-theme="midnight"] ::-webkit-scrollbar { width: 4px; }
html[data-theme="midnight"] ::-webkit-scrollbar-thumb { background: #27272a; border-radius: 2px; }
html[data-theme="midnight"] ::-webkit-scrollbar-thumb:hover { background: #3f3f46; }

/* Buttons: flat, border-only secondary */
html[data-theme="midnight"] .btn-primary {
  box-shadow: none;
  background: var(--accent);
}
html[data-theme="midnight"] .btn-primary:hover {
  box-shadow: 0 0 12px rgba(139,92,246,.25);
  transform: none;
}
html[data-theme="midnight"] .btn-secondary {
  box-shadow: none;
  border-color: var(--border);
}

/* Forms */
html[data-theme="midnight"] .form-input,
html[data-theme="midnight"] .form-select,
html[data-theme="midnight"] .form-textarea {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
  box-shadow: none;
}

/* Toasts */
html[data-theme="midnight"] .toast-success { background: #064e3b; }
html[data-theme="midnight"] .toast-error { background: #7f1d1d; }
html[data-theme="midnight"] .toast-info { background: #1e3a5f; }
html[data-theme="midnight"] .toast-warning { background: #78350f; }

/* Tooltip override */
html[data-theme="midnight"] .sidebar.folded .sidebar-nav-item::after {
  background: var(--bg-card); color: var(--text); border: 1px solid var(--border);
}

/* Table headers */
html[data-theme="midnight"] .data-table th {
  background: var(--bg-card);
  font-family: var(--font-mono);
  font-size: 10px;
}

/* Filter pills: outlined */
html[data-theme="midnight"] .filter-pill {
  background: transparent;
  border-color: var(--border);
}
html[data-theme="midnight"] .filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
}


/* ╔══════════════════════════════════════════════════════════════════╗
   ║  3. PAPER - Notion/Attio editorial calm                        ║
   ║  Serif headings · no shadows · sharp corners · generous space   ║
   ║  Hide nav icons · text-only underline active · newspaper KPIs   ║
   ╚══════════════════════════════════════════════════════════════════╝ */

html[data-theme="paper"] {
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-light: rgba(29,78,216,.06);
  --accent-muted: rgba(29,78,216,.2);
  --accent-subtle: rgba(29,78,216,.04);
  --accent-glow: rgba(29,78,216,.1);
  --bg: #f5f2ed;
  --bg-card: #faf8f5;
  --bg-hover: #efe9e1;
  --bg-active: rgba(29,78,216,.06);
  --border: #d6cfc4;
  --border-light: #e8e2d9;
  --text: #1c1917;
  --text-secondary: #57534e;
  --text-muted: #a8a29e;
  /* Zero shadows - pure editorial flatness */
  --shadow-sm: none;
  --shadow: none;
  --shadow-md: none;
  --shadow-lg: 0 4px 16px rgba(0,0,0,.06);
  --shadow-xl: 0 8px 32px rgba(0,0,0,.08);
  /* Almost-square corners */
  --radius: 3px;
  --radius-sm: 2px;
  --radius-lg: 4px;
  --radius-xl: 6px;
  /* Typography */
  --font: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-display: 'Instrument Serif', 'Source Serif 4', Georgia, serif;
}

/* Serif body text - larger, more generous */
html[data-theme="paper"] body {
  font-size: 14.5px;
  line-height: 1.7;
  letter-spacing: 0;
}

/* Display headings - elegant italic serif */
html[data-theme="paper"] .sidebar-logo,
html[data-theme="paper"] .seq-title,
html[data-theme="paper"] .kpi-card .kpi-value,
html[data-theme="paper"] .modal-header,
html[data-theme="paper"] .empty-state-title,
html[data-theme="paper"] .preview-contact-name {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* Section titles: italic editorial style */
html[data-theme="paper"] .dashboard-section-title,
html[data-theme="paper"] .cmd-palette-group {
  font-family: var(--font-display);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-secondary);
}

/* Col headers: editorial, not shouty */
html[data-theme="paper"] .col-header {
  text-transform: none;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text);
  font-style: italic;
}

/* Form labels: sentence case */
html[data-theme="paper"] .form-label {
  text-transform: none;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

/* Hide nav icons - text-only sidebar */
html[data-theme="paper"] .sidebar-nav-item .nav-icon { display: none; }
html[data-theme="paper"] .sidebar-nav-item { gap: 0; font-family: var(--font); font-size: 14px; }

/* Active nav: bold underline, no background */
html[data-theme="paper"] .sidebar-nav-item.active {
  background: transparent;
  color: var(--text);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
html[data-theme="paper"] .sidebar-nav-item:hover {
  background: transparent;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}

/* KPI cards: newspaper column style - no card, just content + divider */
html[data-theme="paper"] .kpi-card {
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  padding: 12px 16px 16px;
}
html[data-theme="paper"] .kpi-card::before { display: none; }
html[data-theme="paper"] .kpi-card:hover {
  box-shadow: none;
  transform: none;
}
html[data-theme="paper"] .kpi-card .kpi-value {
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.03em;
}
html[data-theme="paper"] .kpi-card .kpi-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* List items: underline hover, no background */
html[data-theme="paper"] .list-item:hover {
  background: transparent;
}
html[data-theme="paper"] .list-item:hover .list-item-title {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 2px;
}
html[data-theme="paper"] .list-item.active {
  background: transparent;
  box-shadow: none;
  border-right: 3px solid var(--accent);
}

/* Cards: minimal borders, no shadows */
html[data-theme="paper"] .card,
html[data-theme="paper"] .step-card,
html[data-theme="paper"] .activity-item {
  box-shadow: none;
  border-radius: var(--radius);
}
html[data-theme="paper"] .card:hover,
html[data-theme="paper"] .step-card:hover,
html[data-theme="paper"] .activity-item:hover {
  box-shadow: none;
  transform: none;
}

/* Badges: small caps editorial */
html[data-theme="paper"] .badge {
  border-radius: 2px;
  font-variant: small-caps;
  font-size: 12px;
  letter-spacing: 0.04em;
  font-weight: 400;
}

/* Sidebar */
html[data-theme="paper"] .sidebar { border-right-color: var(--border); }
html[data-theme="paper"] .sidebar-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
}

/* Generous whitespace */
html[data-theme="paper"] .dashboard-grid { gap: 20px; padding: 28px 32px; }
html[data-theme="paper"] .dashboard-section { padding: 0 32px 28px; }

/* Buttons: outlined, understated */
html[data-theme="paper"] .btn-primary {
  background: var(--accent);
  box-shadow: none;
  font-family: 'DM Sans', sans-serif;
}
html[data-theme="paper"] .btn-primary:hover { transform: none; box-shadow: none; }
html[data-theme="paper"] .btn-secondary { box-shadow: none; }

/* Table: clean horizontal rules only */
html[data-theme="paper"] .data-table th {
  text-transform: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--text);
  color: var(--text);
}
html[data-theme="paper"] .data-table tr:hover td:first-child { box-shadow: none; }
html[data-theme="paper"] .data-table tr:hover td { background: var(--bg-hover); }


/* ╔══════════════════════════════════════════════════════════════════╗
   ║  4. NEON - Arc/Vercel bold energy                               ║
   ║  Pill shapes · gradient buttons · glassmorphism KPIs            ║
   ║  Rose-tinted shadows · scale hover · chunky typography          ║
   ╚══════════════════════════════════════════════════════════════════╝ */

html[data-theme="neon"] {
  --accent: #f43f5e;
  --accent-hover: #e11d48;
  --accent-light: rgba(244,63,94,.06);
  --accent-muted: rgba(244,63,94,.2);
  --accent-subtle: rgba(244,63,94,.04);
  --accent-glow: rgba(244,63,94,.15);
  --bg: #fafafa;
  --bg-card: #ffffff;
  --bg-hover: #f5f5f5;
  --bg-active: rgba(244,63,94,.06);
  --border: #e5e5e5;
  --border-light: #f0f0f0;
  --text: #0a0a0a;
  --text-secondary: #404040;
  --text-muted: #a3a3a3;
  /* Rose-tinted shadows */
  --shadow-sm: 0 1px 3px rgba(244,63,94,.05);
  --shadow: 0 2px 8px rgba(244,63,94,.06);
  --shadow-md: 0 6px 16px rgba(244,63,94,.08);
  --shadow-lg: 0 12px 32px rgba(244,63,94,.1);
  --shadow-xl: 0 24px 56px rgba(244,63,94,.12);
  /* Pill radii */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  /* Bold font */
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Chunky headings */
html[data-theme="neon"] .seq-title,
html[data-theme="neon"] .sidebar-logo,
html[data-theme="neon"] .kpi-card .kpi-value,
html[data-theme="neon"] .preview-contact-name,
html[data-theme="neon"] .modal-header,
html[data-theme="neon"] .empty-state-title {
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* Gradient primary buttons */
html[data-theme="neon"] .btn-primary {
  background: linear-gradient(135deg, #f43f5e, #ec4899, #a855f7);
  box-shadow: 0 2px 12px rgba(244,63,94,.3);
  border: none;
  font-weight: 600;
}
html[data-theme="neon"] .btn-primary:hover {
  background: linear-gradient(135deg, #e11d48, #db2777, #9333ea);
  box-shadow: 0 4px 20px rgba(244,63,94,.35);
  transform: translateY(-1px);
}

/* KPI cards: glass border with gradient */
html[data-theme="neon"] .kpi-card {
  border: 1px solid rgba(244,63,94,.12);
  position: relative;
  overflow: hidden;
}
html[data-theme="neon"] .kpi-card::before {
  height: 3px;
  background: linear-gradient(90deg, #f43f5e, #ec4899, #a855f7);
}
html[data-theme="neon"] .kpi-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(244,63,94,.02), rgba(168,85,247,.02));
  pointer-events: none;
}

/* Scale hover on cards */
html[data-theme="neon"] .kpi-card:hover {
  transform: scale(1.02);
}
html[data-theme="neon"] .card:hover,
html[data-theme="neon"] .step-card:hover,
html[data-theme="neon"] .activity-item:hover {
  transform: translateY(-2px) scale(1.005);
}

/* Nav items: pill-shaped with gradient active */
html[data-theme="neon"] .sidebar-nav-item { border-radius: 20px; font-weight: 500; }
html[data-theme="neon"] .sidebar-nav-item.active {
  background: linear-gradient(135deg, rgba(244,63,94,.1), rgba(168,85,247,.08));
  color: #e11d48;
  font-weight: 600;
  border: 1px solid rgba(244,63,94,.15);
}

/* Badges: pill-shaped, vibrant */
html[data-theme="neon"] .badge { border-radius: 20px; font-weight: 700; letter-spacing: 0; }

/* Health bars: gradient fills */
html[data-theme="neon"] .health-fill.good { background: linear-gradient(90deg, #34d399, #10b981); }
html[data-theme="neon"] .health-fill.warning { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
html[data-theme="neon"] .health-fill.bad { background: linear-gradient(90deg, #f87171, #ef4444); }

/* Funnel bars: gradient */
html[data-theme="neon"] .funnel-bar {
  background: linear-gradient(90deg, #f43f5e, #ec4899);
}

/* Toast: bounce animation */
html[data-theme="neon"] .toast {
  animation: neonToastIn 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 20px;
}
@keyframes neonToastIn {
  0% { opacity: 0; transform: translateY(30px) scale(0.9); }
  60% { opacity: 1; transform: translateY(-4px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

/* Filter pills: more pill */
html[data-theme="neon"] .filter-pill { border-radius: 20px; }
html[data-theme="neon"] .filter-pill.active {
  background: linear-gradient(135deg, #f43f5e, #a855f7);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(244,63,94,.25);
}

/* Sidebar logo */
html[data-theme="neon"] .sidebar-logo {
  font-size: 18px;
  background: linear-gradient(135deg, #f43f5e, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Step order circles: gradient */
html[data-theme="neon"] .step-order {
  background: linear-gradient(135deg, rgba(244,63,94,.15), rgba(168,85,247,.15));
  color: #e11d48;
}


/* ╔══════════════════════════════════════════════════════════════════╗
   ║  5. CORPORATE - Salesforce/HubSpot enterprise density           ║
   ║  Square corners · 2px borders · uppercase everything            ║
   ║  Horizontal KPIs · dense padding · no animations                ║
   ╚══════════════════════════════════════════════════════════════════╝ */

html[data-theme="corporate"] {
  --accent: #0369a1;
  --accent-hover: #075985;
  --accent-light: rgba(3,105,161,.06);
  --accent-muted: rgba(3,105,161,.2);
  --accent-subtle: rgba(3,105,161,.04);
  --accent-glow: rgba(3,105,161,.1);
  --bg: #f1f5f9;
  --bg-card: #ffffff;
  --bg-hover: #e2e8f0;
  --bg-active: rgba(3,105,161,.06);
  --border: #94a3b8;
  --border-light: #cbd5e1;
  --text: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  /* Minimal shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 2px 6px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.1);
  --shadow-xl: 0 8px 24px rgba(0,0,0,.12);
  /* Square corners */
  --radius: 3px;
  --radius-sm: 2px;
  --radius-lg: 4px;
  --radius-xl: 6px;
  /* System font */
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

/* Kill all animations and transforms */
html[data-theme="corporate"] .kpi-card:hover,
html[data-theme="corporate"] .card:hover,
html[data-theme="corporate"] .step-card:hover,
html[data-theme="corporate"] .activity-item:hover,
html[data-theme="corporate"] .btn-primary:hover {
  transform: none !important;
}
html[data-theme="corporate"] .empty-state svg { animation: none; }

/* Borders: 2px on structural cards */
html[data-theme="corporate"] .kpi-card,
html[data-theme="corporate"] .card,
html[data-theme="corporate"] .step-card {
  border-width: 2px;
}

/* UPPERCASE EVERYTHING for labels */
html[data-theme="corporate"] .form-label,
html[data-theme="corporate"] .kpi-card .kpi-label,
html[data-theme="corporate"] .col-header,
html[data-theme="corporate"] .dashboard-section-title,
html[data-theme="corporate"] .step-type,
html[data-theme="corporate"] .data-table th,
html[data-theme="corporate"] .sent-table th {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  font-weight: 700;
}

/* Dense padding - 75% of base */
html[data-theme="corporate"] .sidebar-nav-item { padding: 5px 8px; font-size: 12px; }
html[data-theme="corporate"] .sidebar-nav { padding: 4px 6px; }
html[data-theme="corporate"] .kpi-card { padding: 14px 16px; gap: 2px; }
html[data-theme="corporate"] .list-item { padding: 7px 12px; gap: 8px; }
html[data-theme="corporate"] .col-header { padding: 8px 12px; height: 48px; font-size: 10px; }
html[data-theme="corporate"] .dashboard-grid { gap: 10px; padding: 16px; }
html[data-theme="corporate"] .dashboard-section { padding: 0 16px 16px; }
html[data-theme="corporate"] .modal-body { padding: 16px; }
html[data-theme="corporate"] .modal-header { padding: 12px 16px; font-size: 14px; }

/* KPI: horizontal layout (label | value | sub) on one line */
html[data-theme="corporate"] .kpi-card {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
html[data-theme="corporate"] .kpi-card .kpi-value {
  font-size: 24px;
  font-weight: 800;
  order: -1;
  min-width: 40px;
}
html[data-theme="corporate"] .kpi-card .kpi-label { font-size: 10px; }
html[data-theme="corporate"] .kpi-card .kpi-sub { font-size: 11px; margin-left: auto; }

/* KPI top bar: thick solid color band */
html[data-theme="corporate"] .kpi-card::before { height: 4px; border-radius: 0; }

/* Badges: square with left colored border */
html[data-theme="corporate"] .badge {
  border-radius: 2px;
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-left: 3px solid currentColor;
  padding: 2px 6px 2px 5px;
}

/* Nav: tighter, more visible at once */
html[data-theme="corporate"] .sidebar-nav-item {
  border-radius: 2px;
  font-weight: 500;
}
html[data-theme="corporate"] .sidebar-nav-item.active {
  font-weight: 700;
  border-left: 3px solid var(--accent);
  background: var(--accent-light);
}
html[data-theme="corporate"] .sidebar-sep { margin: 3px 6px; }

/* Table headers: solid colored background */
html[data-theme="corporate"] .data-table th {
  background: #e2e8f0;
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  padding: 8px 12px;
}

/* Buttons: squared, flat */
html[data-theme="corporate"] .btn-primary { box-shadow: none; font-weight: 600; }
html[data-theme="corporate"] .btn-primary:hover { box-shadow: none; }
html[data-theme="corporate"] .btn { font-size: 12px; }

/* Forms */
html[data-theme="corporate"] .form-input,
html[data-theme="corporate"] .form-select,
html[data-theme="corporate"] .form-textarea {
  border-radius: 2px;
  font-size: 12px;
}

/* Filter pills: square tabs */
html[data-theme="corporate"] .filter-pill { border-radius: 2px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }
html[data-theme="corporate"] .filter-pill.active { box-shadow: none; }

/* Sidebar header */
html[data-theme="corporate"] .sidebar-header { height: 48px; padding: 10px 12px; }
html[data-theme="corporate"] .sidebar-logo { font-size: 15px; }


/* ╔══════════════════════════════════════════════════════════════════╗
   ║  6. AURORA - Vision Pro glassmorphism                           ║
   ║  Glass everywhere · gradient glows · ambient bg · floating      ║
   ║  Thin type · animated borders · frosted hover · pulsing badges  ║
   ╚══════════════════════════════════════════════════════════════════╝ */

html[data-theme="aurora"] {
  --accent: #a855f7;
  --accent-hover: #9333ea;
  --accent-light: rgba(168,85,247,.1);
  --accent-muted: rgba(168,85,247,.25);
  --accent-subtle: rgba(168,85,247,.06);
  --accent-glow: rgba(168,85,247,.2);
  --bg: #0b0b14;
  --bg-card: rgba(22,22,38,.75);
  --bg-hover: rgba(40,40,65,.5);
  --bg-active: rgba(168,85,247,.1);
  --border: rgba(255,255,255,.08);
  --border-light: rgba(255,255,255,.06);
  --text: #eeeef2;
  --text-secondary: #9496b0;
  --text-muted: #555570;
  --success: #34d399;
  --success-bg: rgba(52,211,153,.08);
  --warning: #fbbf24;
  --warning-bg: rgba(251,191,36,.08);
  --danger: #f87171;
  --danger-bg: rgba(248,113,113,.08);
  --info: #60a5fa;
  --info-bg: rgba(96,165,250,.08);
  /* Deep floating shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,.3);
  --shadow: 0 4px 16px rgba(0,0,0,.35);
  --shadow-md: 0 8px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.5);
  --shadow-xl: 0 24px 64px rgba(0,0,0,.6);
  /* Rounded everything */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  /* Thin type */
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Ambient background: subtle radial gradient */
html[data-theme="aurora"] body {
  background: radial-gradient(ellipse at 20% 50%, rgba(168,85,247,.06), transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(99,102,241,.04), transparent 50%),
              #0b0b14;
}

/* Thin body text */
html[data-theme="aurora"] body { font-weight: 300; }
html[data-theme="aurora"] .sidebar-nav-item { font-weight: 400; }
html[data-theme="aurora"] .list-item-title { font-weight: 400; }

/* Glass on structural elements */
html[data-theme="aurora"] .sidebar {
  background: rgba(16,16,28,.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid rgba(255,255,255,.05);
}
html[data-theme="aurora"] .col-list,
html[data-theme="aurora"] .col-detail {
  background: rgba(18,18,32,.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
html[data-theme="aurora"] .col-header {
  background: rgba(18,18,32,.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
html[data-theme="aurora"] .modal-box {
  background: rgba(22,22,38,.88);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(255,255,255,.08);
}
html[data-theme="aurora"] .cmd-palette {
  background: rgba(22,22,38,.88);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border-color: rgba(255,255,255,.08);
}
html[data-theme="aurora"] .modal-overlay {
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(16px);
}

/* Glass KPI cards with animated gradient border on hover */
html[data-theme="aurora"] .kpi-card {
  background: rgba(22,22,38,.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.06);
  position: relative;
}
html[data-theme="aurora"] .kpi-card::before {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168,85,247,.3), rgba(99,102,241,.3), transparent);
}
html[data-theme="aurora"] .kpi-card:hover {
  border-color: rgba(168,85,247,.2);
  box-shadow: 0 0 24px rgba(168,85,247,.08), 0 8px 32px rgba(0,0,0,.3);
}

/* Glass cards */
html[data-theme="aurora"] .card,
html[data-theme="aurora"] .step-card,
html[data-theme="aurora"] .activity-item {
  background: rgba(22,22,38,.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: rgba(255,255,255,.06);
}
html[data-theme="aurora"] .card:hover,
html[data-theme="aurora"] .step-card:hover,
html[data-theme="aurora"] .activity-item:hover {
  border-color: rgba(168,85,247,.15);
  box-shadow: 0 0 20px rgba(168,85,247,.06), var(--shadow-md);
}

/* Gradient accent glow on active elements */
html[data-theme="aurora"] .sidebar-nav-item.active {
  background: rgba(168,85,247,.08);
  box-shadow: 0 0 20px rgba(168,85,247,.1);
  border: 1px solid rgba(168,85,247,.15);
}

/* Frosted nav hover */
html[data-theme="aurora"] .sidebar-nav-item:hover {
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(4px);
}

/* Gradient primary buttons */
html[data-theme="aurora"] .btn-primary {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  box-shadow: 0 2px 16px rgba(168,85,247,.3);
  border: none;
}
html[data-theme="aurora"] .btn-primary:hover {
  background: linear-gradient(135deg, #9333ea, #4f46e5);
  box-shadow: 0 4px 24px rgba(168,85,247,.4);
}

/* Pulsing glow on danger badges (important/action-required) */
html[data-theme="aurora"] .nav-badge.danger {
  animation: auroraPulse 2s ease-in-out infinite;
}
@keyframes auroraPulse {
  0%, 100% { box-shadow: 0 0 4px rgba(248,113,113,.3); }
  50% { box-shadow: 0 0 12px rgba(248,113,113,.5); }
}

/* Dark badges */
html[data-theme="aurora"] .badge-draft { background: rgba(251,191,36,.12); color: #fbbf24; }
html[data-theme="aurora"] .badge-active { background: rgba(52,211,153,.12); color: #34d399; }
html[data-theme="aurora"] .badge-paused { background: rgba(148,150,168,.12); color: #9496a8; }
html[data-theme="aurora"] .badge-archived { background: rgba(85,85,112,.12); color: #7f819a; }
html[data-theme="aurora"] .badge-completed { background: rgba(96,165,250,.12); color: #60a5fa; }
html[data-theme="aurora"] .badge-pending { background: rgba(251,191,36,.12); color: #fbbf24; }
html[data-theme="aurora"] .badge-sent { background: rgba(52,211,153,.12); color: #34d399; }
html[data-theme="aurora"] .badge-bounced,
html[data-theme="aurora"] .badge-failed { background: rgba(248,113,113,.12); color: #f87171; }
html[data-theme="aurora"] .badge-rejected { background: rgba(248,113,113,.12); color: #f87171; }
html[data-theme="aurora"] .badge-soft-bounce { background: rgba(251,191,36,.12); color: #fbbf24; }
html[data-theme="aurora"] .badge-replied { background: rgba(139,92,246,.12); color: #a78bfa; }
html[data-theme="aurora"] .badge-skipped { background: rgba(85,85,112,.12); color: #7f819a; }
html[data-theme="aurora"] .badge-approved { background: rgba(52,211,153,.12); color: #34d399; }
html[data-theme="aurora"] .badge-warming_up { background: rgba(251,191,36,.12); color: #fbbf24; }
html[data-theme="aurora"] .badge-suspended { background: rgba(248,113,113,.12); color: #f87171; }
html[data-theme="aurora"] .badge-edited { background: rgba(96,165,250,.12); color: #60a5fa; }
html[data-theme="aurora"] .badge-dismissed { background: rgba(85,85,112,.12); color: #7f819a; }
html[data-theme="aurora"] .badge-opted_out { background: rgba(248,113,113,.12); color: #f87171; }
html[data-theme="aurora"] .badge-reply { background: rgba(196,181,253,.12); color: #c4b5fd; }

/* Toasts */
html[data-theme="aurora"] .toast-success { background: rgba(6,78,59,.9); }
html[data-theme="aurora"] .toast-error { background: rgba(127,29,29,.9); }
html[data-theme="aurora"] .toast-info { background: rgba(30,58,95,.9); }
html[data-theme="aurora"] .toast-warning { background: rgba(120,53,15,.9); }
html[data-theme="aurora"] .toast { backdrop-filter: blur(12px); }

/* Forms */
html[data-theme="aurora"] .form-input,
html[data-theme="aurora"] .form-select,
html[data-theme="aurora"] .form-textarea {
  background: rgba(15,15,25,.6);
  border-color: rgba(255,255,255,.08);
  color: var(--text);
  box-shadow: none;
}
html[data-theme="aurora"] .form-input:focus,
html[data-theme="aurora"] .form-select:focus,
html[data-theme="aurora"] .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168,85,247,.15), 0 0 20px rgba(168,85,247,.1);
}

/* Scrollbar */
html[data-theme="aurora"] ::-webkit-scrollbar { width: 5px; }
html[data-theme="aurora"] ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.07); border-radius: 3px; }
html[data-theme="aurora"] ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.12); }

/* Tooltip override */
html[data-theme="aurora"] .sidebar.folded .sidebar-nav-item::after {
  background: rgba(22,22,38,.9); color: var(--text);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
}

/* Step order circles */
html[data-theme="aurora"] .step-order {
  background: rgba(168,85,247,.12);
  box-shadow: 0 0 8px rgba(168,85,247,.15);
}

/* List item active: glow */
html[data-theme="aurora"] .list-item.active {
  box-shadow: inset 3px 0 0 var(--accent), 0 0 12px rgba(168,85,247,.06);
}

/* Activity icon override */
html[data-theme="aurora"] .activity-icon.replied { background: rgba(168,85,247,.12); color: var(--accent); }


/* ═══════════════════════════════════════════════════════════════════
   SHARED: Theme transition helper
   ═══════════════════════════════════════════════════════════════════ */

html.theme-transitioning,
html.theme-transitioning .sidebar,
html.theme-transitioning .col-list,
html.theme-transitioning .col-detail,
html.theme-transitioning .col-preview,
html.theme-transitioning .col-merged,
html.theme-transitioning .col-header,
html.theme-transitioning .modal-box,
html.theme-transitioning .shortcuts-bar,
html.theme-transitioning .toast-container {
  transition: background-color 350ms ease, color 350ms ease, border-color 350ms ease, box-shadow 350ms ease !important;
}


/* ═══════════════════════════════════════════════════════════════════
   THEME SWITCHER UI
   ═══════════════════════════════════════════════════════════════════ */

.theme-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  flex-wrap: wrap;
}

.theme-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 150ms ease;
  flex-shrink: 0;
  position: relative;
}
.theme-dot:hover { transform: scale(1.25); }
.theme-dot.active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px var(--text-muted);
}

/* Tooltip on dots */
.theme-dot::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg-card);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms;
  z-index: var(--z-dropdown);
}
.theme-dot:hover::after { opacity: 1; }

/* Folded sidebar: show only active dot */
.sidebar.folded .theme-switcher {
  padding: 8px 0;
  justify-content: center;
  position: relative;
}
.sidebar.folded .theme-dot:not(.active) { display: none; }
.sidebar.folded .theme-dot.active {
  cursor: pointer;
  border: none;
  box-shadow: none;
}

/* Dropdown for folded state */
.theme-dropdown {
  position: absolute;
  left: calc(100% + 8px);
  bottom: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: var(--z-dropdown);
  animation: scaleIn 120ms var(--ease-out);
}
.theme-dropdown .theme-dot { display: flex !important; }
