/* ═══════════════════════════════════════════
   ViralBlast Leads — Enterprise Design System
   ═══════════════════════════════════════════ */

:root {
  --bg:            #08080A;
  --bg-elevated:   #121214;
  --surface:       #17171A;
  --surface-2:     #202024;
  --border:        rgba(255,255,255,0.08);
  --border-active: rgba(255,255,255,0.16);
  --text:          #F1EFEA;
  --text-muted:    #8A8A90;
  --text-dim:      #56565C;

  --primary:       #F2B90C;
  --primary-hover: #D9A500;
  --primary-dim:   rgba(242,185,12,0.14);
  --gold-2:        #FFD666;
  --green:         #10B981;
  --green-dim:     rgba(16,185,129,0.12);
  --purple:        #8B5CF6;
  --purple-dim:    rgba(139,92,246,0.12);
  --orange:        #F59E0B;
  --orange-dim:    rgba(245,158,11,0.12);
  --red:           #EF4444;
  --red-dim:       rgba(239,68,68,0.12);
  --yellow:        #FBBF24;

  --sidebar-w:     230px;
  --topbar-h:      60px;
  --radius:        8px;
  --radius-lg:     12px;
  --shadow:        0 4px 24px rgba(0,0,0,0.55);
  --transition:    150ms ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
/* Baseline so any bare text-like <input>/<select>/<textarea> stays legible even
   without .form-group or inline styling — without this, `color: inherit` pulls in
   the theme's light text color while the browser still renders a white background,
   making typed text invisible. Uses a positive type allowlist (not :not() chains)
   to keep specificity low and predictable — more specific rules (.form-group,
   inline styles, component classes like .filter-select) still win as expected. */
input[type="text"], input[type="search"], input[type="number"], input[type="email"],
input[type="url"], input[type="tel"], input[type="password"], input[type="date"],
input:not([type]),
select,
textarea {
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px;
}
input::placeholder, textarea::placeholder { color: var(--text-dim); opacity: 1; }
canvas { display: block; }

/* ─── Layout ──────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: #0B0B0D;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 200;
  transition: transform var(--transition);
}
.sidebar.collapsed { transform: translateX(calc(-1 * var(--sidebar-w))); }

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo-mark {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-2), var(--primary) 60%, #B8860B);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 14px rgba(242,185,12,0.35);
}
.sidebar-logo-text {
  font-size: 16px; font-weight: 700;
  background: linear-gradient(135deg, var(--gold-2), var(--primary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav { flex: 1; padding: 8px 0; overflow-y: auto; }
.sidebar-nav li + li { margin-top: 1px; }
.sidebar-bottom { padding: 10px 10px 12px; border-top: 1px solid var(--border); }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; border-radius: 6px;
  margin: 0 8px; color: var(--text-muted);
  font-size: 13.5px; font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--primary-dim); color: var(--primary); }

/* ─── Sidebar status widget ───────────────────── */
.sidebar-status {
  background: linear-gradient(160deg, rgba(242,185,12,0.10), rgba(242,185,12,0.02));
  border: 1px solid rgba(242,185,12,0.25);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
}
.sidebar-status-top { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.sidebar-status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px var(--green);
  flex-shrink: 0;
}
.sidebar-status-title { font-size: 12.5px; font-weight: 700; color: var(--text); }
.sidebar-status-sub { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.sidebar-status-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-dim); }
.sidebar-status-meta b { color: var(--primary); font-weight: 700; }

.main-wrap {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
  transition: margin-left var(--transition);
}
.sidebar.collapsed ~ .main-wrap { margin-left: 0; }

.topbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 24px;
  background: rgba(8,8,10,0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.sidebar-toggle {
  color: var(--text-muted); padding: 6px; border-radius: 6px;
  display: flex; align-items: center;
  transition: background var(--transition);
}
.sidebar-toggle:hover { background: var(--surface); color: var(--text); }
.topbar-title { font-size: 15px; font-weight: 600; flex-shrink: 0; }
.topbar-search {
  position: relative;
  flex: 1; max-width: 380px; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 100px; padding: 7px 14px; color: var(--text-dim);
  font-size: 12.5px; margin-left: 8px;
  transition: border-color var(--transition), background var(--transition);
}
.topbar-search:focus-within { border-color: rgba(242,185,12,0.4); background: var(--bg-elevated); }
.topbar-search svg { width: 14px; height: 14px; flex-shrink: 0; opacity: .7; }
.topbar-search-input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: var(--text); font-size: 12.5px;
}
.topbar-search-input::placeholder { color: var(--text-dim); }
.topbar-search-kbd {
  flex-shrink: 0; font-family: inherit; font-size: 10.5px; font-weight: 600;
  color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 5px; padding: 2px 6px;
}

/* ─── Global search dropdown ─────────────────── */
.global-search-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--bg-elevated); border: 1px solid var(--border-active);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  max-height: 380px; overflow-y: auto; z-index: 150;
  padding: 6px;
}
.gsd-group-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-dim); padding: 8px 10px 4px;
}
.gsd-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
}
.gsd-row:hover, .gsd-row.active { background: var(--surface); }
.gsd-row-icon {
  width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-dim); color: var(--primary); font-size: 12px;
}
.gsd-row-body { flex: 1; min-width: 0; }
.gsd-row-title { font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gsd-row-sub { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gsd-row-meta { flex-shrink: 0; }
.gsd-empty { padding: 18px 10px; text-align: center; font-size: 12px; color: var(--text-dim); }
.gsd-footer {
  border-top: 1px solid var(--border); margin-top: 4px; padding: 8px 10px 4px;
  font-size: 11px; color: var(--primary); cursor: pointer; text-align: center;
}
.gsd-footer:hover { text-decoration: underline; }
.topbar-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.topbar-os-badge {
  display: flex; align-items: center; gap: 6px;
  background: var(--primary-dim); border: 1px solid rgba(242,185,12,0.3);
  color: var(--primary); font-size: 11.5px; font-weight: 700;
  border-radius: 100px; padding: 5px 12px; white-space: nowrap;
}
.topbar-os-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.topbar-bell {
  position: relative; color: var(--text-muted); padding: 6px; border-radius: 8px;
  display: flex; align-items: center; transition: background var(--transition), color var(--transition);
}
.topbar-bell:hover { background: var(--surface); color: var(--text); }
.topbar-bell svg { width: 18px; height: 18px; }
.topbar-bell .badge-dot {
  position: absolute; top: 4px; right: 4px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--red); border: 2px solid var(--bg);
}
.topbar-user { display: flex; align-items: center; gap: 9px; padding-left: 12px; border-left: 1px solid var(--border); }
.topbar-user-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-2), var(--primary));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #16130A;
}
.topbar-user-name { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.topbar-user-plan { font-size: 11px; color: var(--text-muted); }

/* ─── Views ──────────────────────────────────── */
.view { display: none; padding: 24px; flex: 1; }
.view.active { display: block; }

/* ─── Page header ────────────────────────────── */
.page-header { margin-bottom: 20px; }
.page-header h2 { font-size: 20px; font-weight: 700; }
.page-header.flex-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-sub { color: var(--text-muted); font-size: 13px; margin-top: 3px; }
.page-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ─── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius);
  font-size: 13.5px; font-weight: 500;
  transition: background var(--transition), opacity var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--gold-2), var(--primary)); color: #16130A; font-weight: 700; }
.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, var(--primary), var(--primary-hover)); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-active);
}
.btn-outline:hover:not(:disabled) { background: var(--surface); border-color: rgba(255,255,255,0.2); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #DC2626; }
.btn-ghost { background: transparent; color: var(--text-muted); padding: 6px 8px; }
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn-sm { padding: 5px 12px; font-size: 12.5px; }
.btn-lg { padding: 10px 24px; font-size: 14.5px; }

/* ─── Cards ──────────────────────────────────── */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.form-card { padding: 24px; }
.form-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 16px; }

/* ─── Drag-and-drop file zone ─────────────────── */
.drop-zone {
  position: relative; border: 2px dashed var(--border); border-radius: var(--radius-lg);
  padding: 22px 16px; text-align: center; cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  background: var(--surface);
}
.drop-zone:hover { border-color: var(--border-active); }
.drop-zone.drag-over { border-color: var(--primary); background: var(--primary-dim); }
.drop-zone.has-file { border-style: solid; border-color: var(--primary); }
.drop-zone input[type="file"] {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
}
.drop-zone-hint { display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.drop-zone-icon { font-size: 22px; opacity: 0.8; }
.drop-zone-hint span:last-child { font-size: 12.5px; color: var(--text-muted); }
.drop-zone.has-file .drop-zone-hint span:last-child { color: var(--primary); font-weight: 600; }

/* ─── KPI Row ────────────────────────────────── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.kpi-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative; overflow: hidden;
}
.kpi-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--text-dim);
}
.kpi-card.accent-blue::before { background: var(--primary); }
.kpi-card.accent-green::before { background: var(--green); }
.kpi-card.accent-purple::before { background: var(--purple); }
.kpi-card.accent-orange::before { background: var(--orange); }
.kpi-value { font-size: 28px; font-weight: 700; line-height: 1.1; }
.kpi-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ─── Dashboard: Welcome banner ──────────────── */
.dash-welcome {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(120deg, #1A1608 0%, #241C08 45%, #171412 100%);
  border: 1px solid rgba(242,185,12,0.25);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
}
.dash-welcome-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-2), var(--primary));
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: 0 0 22px rgba(242,185,12,0.35);
}
.dash-welcome-text { flex: 1; min-width: 0; position: relative; z-index: 1; }
.dash-welcome-title { font-size: 17px; font-weight: 700; color: var(--gold-2); }
.dash-welcome-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }
.dash-welcome-meta {
  display: flex; gap: 18px; flex-shrink: 0; position: relative; z-index: 1;
}
.dash-welcome-meta-item { text-align: right; }
.dash-welcome-meta-value { font-size: 14px; font-weight: 700; color: var(--text); }
.dash-welcome-meta-label { font-size: 10.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.dash-welcome::after {
  content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(242,185,12,0.18), transparent 70%);
  pointer-events: none;
}

/* ─── Dashboard: KPI cards v2 ────────────────── */
.kpi-row-v2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.kpi-card-v2 {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}
.kpi-card-v2-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.kpi-card-v2-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-dim); color: var(--primary); font-size: 15px;
}
.kpi-card-v2-trend { font-size: 11px; font-weight: 700; display: flex; align-items: center; gap: 2px; }
.kpi-card-v2-trend.up { color: var(--green); }
.kpi-card-v2-trend.down { color: var(--red); }
.kpi-card-v2-value { font-size: 24px; font-weight: 700; line-height: 1.1; }
.kpi-card-v2-label { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }

/* ─── Dashboard: intelligence grid ───────────── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px; margin-bottom: 20px;
}
.dash-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex; flex-direction: column;
}
.dash-panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dash-panel-title { font-size: 13px; font-weight: 700; }
.dash-panel-sub { font-size: 11px; color: var(--text-dim); }

/* ─── Funnel ──────────────────────────────────── */
.funnel-wrap { padding: 2px 0 4px; }
.funnel-flex { display: flex; align-items: stretch; gap: 16px; }
.funnel-svg-wrap {
  width: 92px; flex-shrink: 0; height: 168px;
  filter: drop-shadow(0 6px 14px rgba(242,185,12,0.18));
}
.funnel-svg-wrap svg { width: 100%; height: 100%; display: block; overflow: visible; }
.funnel-band {
  stroke: var(--bg-elevated); stroke-width: 1.4;
  transition: opacity .15s ease, filter .15s ease;
  cursor: pointer;
}
.funnel-band:hover { opacity: .88; filter: brightness(1.12); }

.funnel-legend-v2 { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 1px 0; }
.funnel-legend-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0;
}
.funnel-legend-dot { width: 9px; height: 9px; border-radius: 2.5px; flex-shrink: 0; }
.funnel-legend-info { flex: 1; min-width: 0; }
.funnel-legend-label { font-size: 11.5px; color: var(--text-muted); line-height: 1.3; }
.funnel-legend-value { font-size: 13.5px; font-weight: 700; color: var(--text); line-height: 1.3; }
.funnel-legend-pct { font-size: 10.5px; color: var(--text-dim); font-weight: 600; flex-shrink: 0; text-align: right; min-width: 34px; }

.funnel-footer {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
}
.funnel-conv-value { font-size: 22px; font-weight: 700; color: var(--primary); }
.funnel-conv-label { font-size: 10.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }
.funnel-conv-delta { font-size: 11px; color: var(--green); font-weight: 600; }

/* ─── Donut center ────────────────────────────── */
.donut-canvas-wrap { position: relative; height: 150px; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-center-value { font-size: 19px; font-weight: 700; color: var(--text); }
.donut-center-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .03em; margin-top: 2px; }
.donut-legend { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.donut-legend-row { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-muted); }
.donut-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.donut-legend-pct { margin-left: auto; font-weight: 600; color: var(--text); }

/* ─── Activity feed ───────────────────────────── */
.activity-list { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; max-height: 260px; }
.activity-row { display: flex; gap: 10px; align-items: flex-start; }
.activity-icon {
  width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); font-size: 12px;
}
.activity-text { font-size: 12.5px; line-height: 1.4; color: var(--text); }
.activity-time { font-size: 10.5px; color: var(--text-dim); margin-top: 2px; }
.dash-panel-link { font-size: 11.5px; color: var(--primary); font-weight: 600; }
.dash-panel-link:hover { text-decoration: underline; }

/* ─── AI intelligence panel ──────────────────── */
.ai-intel-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px;
}
.ai-intel-card:last-child { margin-bottom: 0; }
.ai-intel-top { display: flex; align-items: center; gap: 8px; }
.ai-intel-icon {
  width: 24px; height: 24px; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-dim); color: var(--primary); font-size: 12px;
}
.ai-intel-title { font-size: 12.5px; font-weight: 700; }
.ai-intel-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.45; }
.ai-intel-action { align-self: flex-start; font-size: 11px; font-weight: 600; color: var(--primary); }
.ai-intel-action:hover { text-decoration: underline; }
.ai-confidence {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(120deg, rgba(242,185,12,0.14), rgba(242,185,12,0.03));
  border: 1px solid rgba(242,185,12,0.3);
  border-radius: var(--radius); padding: 10px 14px; margin-top: auto;
}
.ai-confidence-label { font-size: 11px; color: var(--text-muted); }
.ai-confidence-value { font-size: 18px; font-weight: 700; color: var(--primary); }
.ai-confidence-tag { font-size: 10px; font-weight: 700; color: var(--green); text-transform: uppercase; }

/* ─── Charts ─────────────────────────────────── */
.chart-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px; margin-bottom: 20px;
}
.chart-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}
.chart-card.chart-wide { grid-column: span 2; }
.chart-canvas-wrap { position: relative; height: 120px; }
.chart-card:not(.chart-wide) .chart-canvas-wrap { height: 140px; }
.chart-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px;
  font-size: 13px; font-weight: 600;
}
.chart-sub { font-size: 11.5px; color: var(--text-muted); font-weight: 400; }

/* ─── Section header ─────────────────────────── */
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.section-title { font-size: 14px; font-weight: 600; }
.link-subtle { font-size: 12.5px; color: var(--primary); }
.link-subtle:hover { text-decoration: underline; }

/* ─── Data table ─────────────────────────────── */
.data-table-wrap {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden; overflow-x: auto;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: var(--surface);
  text-align: left; padding: 10px 14px;
  font-size: 12px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { color: var(--text); }
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px; vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(255,255,255,0.025); }
.data-table tbody tr.selected td { background: var(--primary-dim); }
.cell-company { font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-muted { color: var(--text-muted); font-size: 12.5px; }
.cell-email { font-family: monospace; font-size: 12px; color: #93C5FD; }
.cell-actions { white-space: nowrap; }

/* ─── Score badge ────────────────────────────── */
.score-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 22px;
  border-radius: 4px; font-size: 11px; font-weight: 700;
}
.score-hi  { background: rgba(16,185,129,0.18); color: #34D399; }
.score-mid { background: rgba(245,158,11,0.18);  color: #FCD34D; }
.score-lo  { background: rgba(239,68,68,0.18);   color: #FCA5A5; }

/* ─── Status pills ───────────────────────────── */
.status-pill {
  display: inline-block; padding: 2px 9px;
  border-radius: 100px; font-size: 11.5px; font-weight: 600;
  white-space: nowrap;
}
.status-new          { background: var(--surface-2); color: var(--text-muted); }
.status-contacted    { background: rgba(59,130,246,0.18); color: #93C5FD; }
.status-qualified    { background: rgba(139,92,246,0.18); color: #C4B5FD; }
.status-proposal_sent{ background: rgba(245,158,11,0.18); color: #FCD34D; }
.status-won          { background: rgba(16,185,129,0.2);  color: #6EE7B7; }
.status-lost         { background: rgba(239,68,68,0.18);  color: #FCA5A5; }

/* ─── Source badge ───────────────────────────── */
.source-badge {
  display: inline-block; padding: 2px 8px;
  border-radius: 4px; font-size: 11px; font-weight: 600;
  background: var(--surface-2); color: var(--text-muted);
}

/* ─── Tags ───────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--primary-dim); color: #93C5FD;
  padding: 1px 8px; border-radius: 100px; font-size: 11px; font-weight: 500;
}
.tag-remove { cursor: pointer; opacity: .6; }
.tag-remove:hover { opacity: 1; }
.tags-row { display: flex; flex-wrap: wrap; gap: 4px; min-height: 24px; margin-bottom: 8px; }
.tags-input-row { display: flex; gap: 6px; }
.tag-input { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 5px 10px; font-size: 13px; }
.tag-input:focus { outline: none; border-color: var(--primary); }

/* ─── Filter bar ─────────────────────────────── */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 14px;
}
.filter-input {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 7px 12px; font-size: 13px;
  min-width: 220px; flex: 1 1 220px;
}
.filter-input:focus { outline: none; border-color: var(--primary); }
.filter-select {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 7px 10px; font-size: 13px;
  color: var(--text); cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--primary); }
.filter-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); cursor: pointer; }
.filter-check input { accent-color: var(--primary); }

/* ─── Pagination ─────────────────────────────── */
.pagination {
  display: flex; justify-content: center; align-items: center; gap: 4px;
  padding: 12px 0 4px;
}
.page-btn {
  min-width: 32px; height: 32px;
  padding: 0 8px; border-radius: 6px;
  font-size: 13px; color: var(--text-muted);
  border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center;
}
.page-btn:hover { background: var(--surface); color: var(--text); }
.page-btn.active { background: var(--primary-dim); color: var(--primary); border-color: var(--primary); }

/* ─── Bulk actions bar ───────────────────────── */
.bulk-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; margin-top: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
}

/* ─── Kanban ─────────────────────────────────── */
.kanban-board {
  display: flex; gap: 12px;
  overflow-x: auto; padding-bottom: 8px;
}
.kanban-col {
  min-width: 230px; flex-shrink: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
}
.kanban-col-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}
.kanban-count {
  background: var(--surface-2); color: var(--text-muted);
  border-radius: 100px; padding: 1px 7px; font-size: 11px; font-weight: 600;
}
.kanban-cards { padding: 8px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 60px; }
.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px;
  transition: border-color var(--transition), transform var(--transition), opacity var(--transition);
  cursor: grab;
}
.kanban-card:hover { border-color: var(--border-active); transform: translateY(-1px); }
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: 0.4; }
.kanban-cards.drag-over { background: var(--primary-dim); outline: 2px dashed var(--primary); outline-offset: -4px; border-radius: var(--radius); }
.kanban-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; margin-bottom: 4px; }
.kanban-card-company { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; cursor: pointer; }
.kanban-card-meta { font-size: 11.5px; color: var(--text-muted); display: flex; justify-content: space-between; cursor: pointer; }
.btn-kanban-delete {
  background: none; border: none; cursor: pointer; padding: 0 2px;
  color: var(--text-muted); font-size: 12px; line-height: 1; flex-shrink: 0;
  opacity: 0; transition: opacity 0.15s, color 0.15s;
}
.kanban-card:hover .btn-kanban-delete { opacity: 1; }
.btn-kanban-delete:hover { color: var(--red); }
.btn-delete-lead { color: var(--text-muted) !important; }
.btn-delete-lead:hover { color: var(--red) !important; }

/* ─── Template library ───────────────────────── */
.tmpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.tmpl-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color var(--transition);
}
.tmpl-card.active-tmpl { border-color: var(--accent); }
.tmpl-card:hover { border-color: var(--border-active); }
.tmpl-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.tmpl-card-name { font-weight: 700; font-size: 14px; flex: 1; }
.tmpl-badge-active {
  background: rgba(59,130,246,.15); color: var(--accent);
  font-size: 10px; font-weight: 600; padding: 2px 7px;
  border-radius: 20px; white-space: nowrap; flex-shrink: 0;
}
.tmpl-card-company { font-size: 12px; color: var(--text-muted); }
.tmpl-card-sectors {
  font-size: 11px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tmpl-card-footer { display: flex; gap: 6px; margin-top: 4px; }
.tmpl-card-footer .btn { flex: 1; }
/* Template modal */
.tmpl-modal { max-width: 860px; max-height: 90vh; display: flex; flex-direction: column; }
.tmpl-modal-body { overflow-y: auto; padding: 20px 24px; flex: 1; }
.tmpl-modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 24px; border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

/* ─── Form ───────────────────────────────────── */
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-bottom: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.span-2 { grid-column: span 2; }
.form-group label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 12px; font-size: 13.5px;
  color: var(--text); transition: border-color var(--transition);
  resize: vertical;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--primary); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 4px; }
.req { color: var(--red); }

/* ─── Scan type pills ────────────────────────── */
/* ─── Scan-type category cards ───────────────── */
.scan-type-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.scan-type-card {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px;
  cursor: pointer; transition: all var(--transition);
  text-align: left; position: relative; overflow: hidden;
}
.scan-type-card:hover { border-color: var(--border-active); background: var(--bg-elevated); }
.scan-type-card.active {
  border-color: var(--primary);
  background: var(--primary-dim);
  box-shadow: 0 0 0 1px var(--primary);
}
.scan-type-card.active::after {
  content: '✓';
  position: absolute; top: 8px; right: 10px;
  color: var(--primary); font-size: 13px; font-weight: 700;
}
.scan-card-icon { font-size: 22px; line-height: 1; margin-bottom: 2px; }
.scan-card-label { font-size: 13px; font-weight: 600; color: var(--text); }
.scan-card-desc  { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

/* ─── Engine pills ────────────────────────────── */
.engine-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.engine-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text-muted);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all var(--transition); user-select: none;
}
.engine-pill:hover { border-color: var(--border-active); color: var(--text); }
.engine-pill.active {
  background: var(--primary-dim); border-color: var(--primary); color: var(--primary);
}

/* ─── Batch Scan queue ────────────────────────── */
.batch-scan-queue { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.batch-scan-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); font-size: 12.5px;
}
.batch-scan-row-label { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-scan-row-status { flex-shrink: 0; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 100px; }
.batch-scan-row-status.queued  { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.batch-scan-row-status.running { background: var(--primary-dim); color: var(--primary); }
.batch-scan-row-status.done    { background: rgba(34,197,94,0.15); color: var(--green, #22c55e); }
.batch-scan-row-status.failed  { background: rgba(239,68,68,0.15); color: var(--red, #ef4444); }

/* ─── Legacy pill-group (keep for other uses) ─── */
.pill-group { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-btn {
  padding: 5px 14px; border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted);
  font-size: 12.5px; font-weight: 500;
  transition: all var(--transition);
}
.pill-btn:hover { border-color: var(--primary); color: var(--primary); }
.pill-btn.active { background: var(--primary-dim); border-color: var(--primary); color: var(--primary); }

/* ─── Sources grid ───────────────────────────── */
.sources-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.source-check-label {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 12px;
  font-size: 12.5px; cursor: pointer; color: var(--text-muted);
  transition: all var(--transition);
}
.source-check-label:hover { border-color: var(--border-active); color: var(--text); }
.source-check-label input { accent-color: var(--primary); }
.source-check-label.recommended { border-color: rgba(59,130,246,0.35); color: var(--text); }
.sources-hint { font-size: 11.5px; color: var(--primary); font-weight: 400; margin-left: 4px; }

/* ─── Job progress ───────────────────────────── */
.job-progress {
  margin-top: 16px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
}
.job-progress-header {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; font-weight: 600; margin-bottom: 10px;
}
.job-log {
  font-family: monospace; font-size: 12px;
  color: var(--text-muted); max-height: 160px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
}
.job-log-line { padding: 2px 0; }
.job-log-line.success { color: var(--green); }
.job-log-line.error { color: var(--red); }

/* ─── Spinners ───────────────────────────────── */
.spinner-sm {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.job-status-badge {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 100px; padding: 4px 12px;
}

/* ─── Drawer ─────────────────────────────────── */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.5);
  display: none;
}
.drawer-overlay.open { display: block; }
.drawer {
  position: fixed; top: 0; right: -480px; bottom: 0; width: 480px;
  z-index: 400; background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: right .25s ease;
  box-shadow: -8px 0 40px rgba(0,0,0,.5);
}
.drawer.open { right: 0; }
.drawer-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.drawer-header-text { min-width: 0; }
.drawer-company { font-size: 17px; font-weight: 700; }
.drawer-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.drawer-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.status-select {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 5px 8px; font-size: 12.5px;
  color: var(--text); cursor: pointer;
}
.drawer-tabs {
  display: flex; gap: 0;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
}
.dtab {
  padding: 10px 16px; font-size: 13px; font-weight: 500;
  color: var(--text-muted); border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
.dtab.active { color: var(--primary); border-bottom-color: var(--primary); }
.dtab:hover { color: var(--text); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.dtab-panel { display: flex; flex-direction: column; gap: 16px; }

.detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px;
  margin-bottom: 4px;
}
.detail-field { display: flex; flex-direction: column; gap: 3px; }
.detail-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim); font-weight: 600; }
.detail-value { font-size: 13px; word-break: break-all; }
.detail-value a { color: #60A5FA; }
.detail-value a:hover { text-decoration: underline; }

.detail-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.detail-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 10px; }

.drawer-textarea {
  width: 100%; background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 12px; font-size: 13px; color: var(--text);
  resize: vertical;
}
.drawer-textarea:focus { outline: none; border-color: var(--primary); }

/* ─── Notes ──────────────────────────────────── */
.notes-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.note-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px;
}
.note-content { font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.note-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.note-date { font-size: 11px; color: var(--text-dim); }

/* ─── Proposals list ─────────────────────────── */
.proposals-list { display: flex; flex-direction: column; gap: 10px; }
.proposal-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px;
}
.proposal-item-subject { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.proposal-item-preview { font-size: 12px; color: var(--text-muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.proposal-item-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.proposal-item-date { font-size: 11px; color: var(--text-dim); }

/* ─── Modals ─────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); width: 600px; max-width: 96vw;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  max-height: 90vh;
}
.modal-sm { width: 400px; }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 15px; font-weight: 600; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 12px 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
}
.proposal-subject { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.proposal-body-pre {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  font-family: 'Segoe UI', sans-serif; font-size: 13px; line-height: 1.7;
  white-space: pre-wrap; overflow-y: auto; max-height: 400px;
  color: var(--text);
}

/* ─── Campaigns ──────────────────────────────── */
.campaigns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.campaign-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px;
  cursor: pointer; transition: border-color var(--transition), transform var(--transition);
}
.campaign-card:hover { border-color: var(--border-active); transform: translateY(-2px); }
.campaign-card-name { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.campaign-card-desc { font-size: 12.5px; color: var(--text-muted); margin-bottom: 12px; min-height: 20px; }
.campaign-card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-muted); }

.campaign-tabs { display: flex; padding: 0; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.ctab {
  padding: 10px 18px; font-size: 13px; font-weight: 500;
  color: var(--text-muted); border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
.ctab.active { color: var(--primary); border-bottom-color: var(--primary); }

.email-step-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 8px;
  display: flex; gap: 14px; align-items: flex-start;
}
.step-number {
  min-width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary-dim); color: var(--primary);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-content { flex: 1; min-width: 0; }
.step-subject { font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
.step-delay { font-size: 11.5px; color: var(--text-muted); }

/* ─── View toggle ────────────────────────────── */
.view-toggle { display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 3px; }
.vt-btn { padding: 4px 8px; border-radius: 5px; color: var(--text-muted); transition: all var(--transition); display: flex; align-items: center; }
.vt-btn.active { background: var(--bg-elevated); color: var(--text); }
.vt-btn:hover { color: var(--text); }

/* ─── Badge ──────────────────────────────────── */
.badge {
  display: inline-block; padding: 2px 10px;
  border-radius: 100px; font-size: 11.5px; font-weight: 600;
  background: var(--surface-2); color: var(--text-muted);
}
.badge-draft      { background: var(--surface-2); color: var(--text-muted); }
.badge-active     { background: var(--green-dim); color: var(--green); }
.badge-paused     { background: var(--orange-dim); color: var(--orange); }
.badge-completed  { background: var(--primary-dim); color: var(--primary); }

/* ─── Two-col layout ─────────────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ─── Settings ───────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.settings-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; }
.settings-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.settings-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.settings-row:last-child { border-bottom: none; }
.settings-row-label { color: var(--text-muted); }
.settings-row-val { font-weight: 500; }
.settings-ok { color: var(--green); }
.settings-missing { color: var(--text-dim); font-size: 11.5px; }

/* ─── Text helpers ───────────────────────────── */
.text-muted { color: var(--text-muted); font-size: 13px; margin-bottom: 12px; }
.text-dim { color: var(--text-dim); }

/* ─── Toast ──────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 18px;
  font-size: 13.5px; box-shadow: var(--shadow);
  animation: toastIn .2s ease;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* ─── Crawl result ───────────────────────────── */
#crawlResult .card { margin-top: 16px; padding: 16px; font-size: 13px; }
#crawlResult pre { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 12px; font-size: 12px; overflow-x: auto; white-space: pre-wrap; }

/* ─── Empty state ────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 20px; color: var(--text-dim); gap: 10px;
  font-size: 13px; text-align: center;
}
.empty-state svg { width: 40px; height: 40px; opacity: .3; }

/* ─── Settings tabs ──────────────────────────── */
.settings-tabs { display: flex; gap: 4px; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.stab {
  background: none; border: none; padding: .6rem 1.2rem; font-size: 13px; font-weight: 500;
  color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: color .15s, border-color .15s;
}
.stab:hover { color: var(--text); }
.stab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ─── Form layout helpers ────────────────────── */
.form-section-title {
  font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-muted); margin: 1.5rem 0 .75rem; padding-bottom: .4rem;
  border-bottom: 1px solid var(--border);
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* ─── Proposal modal xl ──────────────────────── */
.modal-xl { width: min(96vw, 900px); max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; }
.proposal-modal-body { flex: 1; overflow-y: auto; padding: 0; display: flex; flex-direction: column; }

/* ─── Proposal modal tabs ────────────────────── */
.proposal-tabs { display: flex; gap: 4px; padding: 1rem 1.5rem .5rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.ptab {
  background: none; border: none; padding: .45rem 1rem; font-size: 12px; font-weight: 500;
  color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: color .15s, border-color .15s;
}
.ptab:hover { color: var(--text); }
.ptab.active { color: var(--primary); border-bottom-color: var(--primary); }
.ptab-panel { padding: 1.25rem 1.5rem; flex: 1; overflow-y: auto; }

/* ─── Proposal sections (full proposal) ──────── */
.proposal-sections { display: flex; flex-direction: column; gap: 1.25rem; }
.proposal-section {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.proposal-section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .65rem 1rem; background: var(--bg-elevated); cursor: pointer;
  user-select: none;
}
.proposal-section-header:hover { background: var(--surface-2); }
.proposal-section-title { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.proposal-section-body { padding: 1rem; display: grid; gap: .75rem; }
.proposal-section-body.hidden { display: none; }
.proposal-field { display: flex; flex-direction: column; gap: .3rem; }
.proposal-field-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); }
.proposal-field-value { font-size: 13px; color: var(--text); white-space: pre-wrap; line-height: 1.55; }
.proposal-section-copy {
  font-size: 11px; padding: .2rem .55rem; border-radius: 4px;
  background: var(--primary-dim); color: var(--primary); border: 1px solid rgba(59,130,246,.25);
  cursor: pointer; white-space: nowrap;
}
.proposal-section-copy:hover { background: var(--primary); color: #fff; }

/* ─── AI Enrichment section ──────────────────── */
.ai-section-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.ai-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.ai-block-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted); margin-bottom: 5px;
}
.ai-block-body {
  font-size: 13px; line-height: 1.5; color: var(--text-primary);
  white-space: pre-wrap;
}

/* ─── Map view ───────────────────────────────── */
#leadMap .leaflet-popup-content-wrapper {
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* ─── Qualification ───────────────────────────── */
.qual-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.qual-card {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 12px;
}
.qual-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.qual-card-company { font-size: 14px; font-weight: 700; cursor: pointer; }
.qual-card-company:hover { color: var(--primary); }
.qual-card-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.qual-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.qual-badge { font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 100px; white-space: nowrap; }
.qual-badge.opportunity { background: var(--primary-dim); color: var(--primary); }
.qual-badge.good       { background: var(--green-dim); color: var(--green); }
.qual-badge.warn       { background: var(--red-dim); color: var(--red); }
.qual-score-row { display: flex; align-items: center; gap: 10px; }
.qual-score-bar-wrap { flex: 1; height: 6px; border-radius: 100px; background: var(--surface-2); overflow: hidden; }
.qual-score-bar { height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--primary), var(--gold-2)); }
.qual-score-num { font-size: 13px; font-weight: 700; color: var(--primary); min-width: 30px; text-align: right; }
.qual-actions { display: flex; gap: 8px; }
.qual-actions .btn { flex: 1; }

/* ─── Enhance Data ────────────────────────────── */
.dq-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dq-dot.ok { background: var(--green); }
.dq-dot.missing { background: var(--red); box-shadow: 0 0 0 3px var(--red-dim); }

/* ─── Audit Reports ───────────────────────────── */
.audit-layout { display: flex; gap: 16px; align-items: flex-start; }
.audit-picker { width: 300px; flex-shrink: 0; position: sticky; top: 80px; }
.audit-lead-list { display: flex; flex-direction: column; gap: 3px; max-height: 520px; overflow-y: auto; }
.audit-lead-row { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.audit-lead-row:hover, .audit-lead-row.active { background: var(--surface); }
.audit-lead-row.active { box-shadow: inset 2px 0 0 var(--primary); }
.audit-lead-row-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audit-lead-row-sub { font-size: 11px; color: var(--text-muted); }
.audit-report-wrap { flex: 1; min-width: 0; }
.audit-report-actions { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
.audit-report { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.audit-report-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--border); padding-bottom: 16px; margin-bottom: 20px; gap: 16px; }
.audit-report-brand { font-size: 13px; font-weight: 700; color: var(--primary); }
.audit-report-tagline { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.audit-report-title { font-size: 19px; font-weight: 700; margin-top: 10px; }
.audit-report-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.audit-score-badge { text-align: center; flex-shrink: 0; }
.audit-score-num { font-size: 32px; font-weight: 700; color: var(--primary); line-height: 1; }
.audit-score-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }
.audit-section { margin-bottom: 22px; }
.audit-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 10px; }
.audit-details-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.audit-detail { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.audit-detail-label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim); margin-bottom: 4px; }
.audit-detail-value { font-size: 13px; font-weight: 600; word-break: break-word; }
.audit-detail-value a { color: var(--primary); }
.audit-detail-missing { color: var(--text-muted); font-weight: 400; font-style: italic; }
.audit-signal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.audit-signal { display: flex; align-items: flex-start; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.audit-signal-icon { font-size: 15px; flex-shrink: 0; }
.audit-signal-title { font-size: 12.5px; font-weight: 600; }
.audit-signal-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.audit-signal.good  { border-color: rgba(16,185,129,0.3); }
.audit-signal.issue { border-color: rgba(239,68,68,0.3); }
.audit-recs { display: flex; flex-direction: column; gap: 8px; }
.audit-rec { display: flex; gap: 10px; align-items: flex-start; background: var(--primary-dim); border: 1px solid rgba(242,185,12,0.25); border-radius: 8px; padding: 10px 12px; }
.audit-rec-icon { font-size: 15px; }
.audit-rec-title { font-size: 12.5px; font-weight: 700; color: var(--text); }
.audit-rec-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.audit-report-footer { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 8px; font-size: 11px; color: var(--text-dim); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ─── Follow Up ───────────────────────────────── */
.followup-bucket { margin-bottom: 22px; }
.followup-bucket-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.followup-bucket-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.followup-bucket-title { font-size: 13px; font-weight: 700; }
.followup-bucket-count { font-size: 11.5px; color: var(--text-muted); }
.followup-row { display: flex; align-items: center; gap: 12px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 6px; flex-wrap: wrap; }
.followup-row-main { flex: 1; min-width: 160px; }
.followup-row-company { font-size: 13px; font-weight: 600; cursor: pointer; }
.followup-row-company:hover { color: var(--primary); }
.followup-row-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.followup-row-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ─── Print: Audit report ─────────────────────── */
@media print {
  body.printing-audit .sidebar, body.printing-audit .topbar, body.printing-audit .toast,
  body.printing-audit .audit-picker, body.printing-audit .audit-report-actions,
  body.printing-audit .page-header { display: none !important; }
  body.printing-audit .main-wrap { margin-left: 0 !important; }
  body.printing-audit .view { padding: 0 !important; }
  body.printing-audit .audit-layout { display: block !important; }
  body.printing-audit .audit-report { border: none !important; box-shadow: none !important; padding: 0 !important; }
  body.printing-audit { background: #fff !important; }
}

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(calc(-1 * var(--sidebar-w))); }
  .sidebar.open { transform: none; }
  .main-wrap { margin-left: 0; }
  .chart-row { grid-template-columns: 1fr; }
  .chart-card.chart-wide { grid-column: span 1; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-welcome { flex-wrap: wrap; }
  .topbar-search { display: none; }
  .audit-layout { flex-direction: column; }
  .audit-picker { width: 100%; position: static; }
  .two-col { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.span-2 { grid-column: span 1; }
  .drawer { width: 100%; }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
  .modal-xl { width: 100vw; max-height: 100vh; border-radius: 0; }
}

/* ─── Find Leads Layout ────────────────────────────────────────── */
.find-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.find-filters {
  position: sticky;
  top: 80px;
}

.find-results {
  flex: 1;
  min-width: 0;
}

.lead-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.lead-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-active);
}

.nav-header {
  margin-top: 10px;
  padding: 10px 16px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ─── AI Solutions ────────────────────────────── */
.solutions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.solution-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.solution-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.solution-card-name { font-size: 14px; font-weight: 700; }
.solution-card-desc { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; line-height: 1.4; }
.solution-card-count { font-size: 22px; font-weight: 700; color: var(--primary); flex-shrink: 0; }
.solution-card-conf { font-size: 11.5px; color: var(--text-muted); }
.solution-card-samples { display: flex; flex-direction: column; gap: 4px; }
.solution-sample-row { display: flex; justify-content: space-between; font-size: 12px; padding: 5px 8px; background: var(--surface); border-radius: 6px; cursor: pointer; transition: background var(--transition); }
.solution-sample-row:hover { background: var(--primary-dim); }
.solution-card-empty { font-size: 11.5px; color: var(--text-dim); font-style: italic; }

.solutions-lead-list { display: flex; flex-direction: column; gap: 8px; }
.solution-lead-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.solution-lead-main { cursor: pointer; min-width: 160px; }
.solution-lead-company { font-size: 13.5px; font-weight: 700; }
.solution-lead-company:hover { color: var(--primary); }
.solution-lead-sub { font-size: 11px; color: var(--text-muted); }
.solution-lead-matches { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.solution-lead-ai { font-size: 11.5px; color: var(--primary); font-style: italic; flex-basis: 100%; }

.catalog-editor-list { display: flex; flex-direction: column; gap: 12px; max-height: 340px; overflow-y: auto; }
.catalog-item-row { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: var(--surface); }
.catalog-item-fields { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.catalog-item-name { flex: 1; padding: 7px 10px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 13px; font-weight: 600; }
.catalog-item-desc { width: 100%; padding: 7px 10px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 12px; resize: vertical; margin-bottom: 8px; font-family: inherit; }
.catalog-item-triggers { display: flex; flex-wrap: wrap; gap: 6px; }
.catalog-trigger-chip {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 100px;
  border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-muted);
  font-size: 11px; cursor: pointer; user-select: none; transition: all var(--transition);
}
.catalog-trigger-chip.active { background: var(--primary-dim); border-color: var(--primary); color: var(--primary); }

/* ─── LLM prompt preview ──────────────────────── */
.llm-prompt-block { margin-top: 10px; }
.llm-prompt-block-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim); margin-bottom: 4px; }
.llm-prompt-pre {
  font-family: 'SF Mono', Consolas, Menlo, monospace; font-size: 11px; line-height: 1.5;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px; margin: 0; white-space: pre-wrap; word-break: break-word;
  max-height: 180px; overflow-y: auto; color: var(--text-muted);
}
.llm-prompt-json { color: var(--primary); border-color: rgba(242,185,12,0.25); background: var(--primary-dim); }

/* ─── AI Qualification Wizard & Badges ────────────── */
.qual-badge.ai-match {
  background: rgba(139, 92, 246, 0.15);
  color: #A78BFA;
  border: 1px solid rgba(139, 92, 246, 0.35);
  font-weight: 600;
}
.qual-ai-reason {
  font-size: 11.5px;
  color: #C4B5FD;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 6px;
  padding: 6px 10px;
  margin: 6px 0;
  line-height: 1.4;
}


/* ─── Internet Scraper Hub & Quick Presets ──────────── */
.hub-hero-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}
.preset-grid-hero {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.quick-preset-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.quick-preset-card:hover {
  border-color: var(--primary);
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4), 0 0 12px rgba(242,185,12,0.15);
}
.quick-preset-card .preset-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.quick-preset-card .preset-details {
  flex: 1;
  min-width: 0;
}
.quick-preset-card .preset-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.quick-preset-card .preset-sub {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quick-preset-card .preset-btn {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.8;
  transition: opacity 0.15s ease;
}
.quick-preset-card:hover .preset-btn {
  opacity: 1;
}


/* ─── Unified Scraping & Lead Discovery Wizard ────────────────── */
.wizard-modal {
  width: 720px;
  max-width: 96vw;
  max-height: 92vh;
  background: #0D0D10;
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(242, 185, 12, 0.08);
}
.wizard-header {
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(242, 185, 12, 0.06) 0%, rgba(0, 0, 0, 0) 100%);
}
.wizard-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.wizard-title-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-dim);
  border: 1px solid rgba(242, 185, 12, 0.3);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.wizard-steps-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
}
.wizard-step-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.wizard-step-item:hover {
  border-color: var(--border-active);
  background: var(--surface-2);
}
.wizard-step-item.active {
  background: rgba(242, 185, 12, 0.1);
  border-color: var(--primary);
}
.wizard-step-item.completed {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}
.wizard-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}
.wizard-step-item.active .wizard-step-num {
  background: var(--primary);
  color: #111;
  border-color: var(--primary);
}
.wizard-step-item.completed .wizard-step-num {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.wizard-step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.wizard-step-item.active .wizard-step-label {
  color: var(--text);
}
.wizard-step-item.completed .wizard-step-label {
  color: var(--green);
}

.wizard-body {
  padding: 24px;
  overflow-y: auto;
}

.wizard-presets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.wizard-preset-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.wizard-preset-card:hover {
  border-color: rgba(242, 185, 12, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.wizard-preset-card.selected {
  background: linear-gradient(135deg, rgba(242, 185, 12, 0.12) 0%, rgba(20, 20, 25, 0.9) 100%);
  border: 1px solid var(--primary);
  box-shadow: 0 0 16px rgba(242, 185, 12, 0.25);
}
.wizard-preset-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wizard-preset-icon {
  font-size: 24px;
}
.wizard-preset-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.wizard-preset-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.wizard-preset-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.wizard-mode-toggle {
  display: flex;
  background: var(--bg-elevated);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
  gap: 4px;
  margin-bottom: 16px;
}
.wizard-mode-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.wizard-mode-btn.active {
  background: var(--surface-2);
  color: var(--primary);
  border: 1px solid rgba(242, 185, 12, 0.3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.wizard-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.wizard-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 10px;
}
.wizard-summary-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.wizard-summary-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}
.wizard-summary-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

