/* ===================================================================
   OWS Prospect Finder — Enterprise Dark Theme
   Inspired by ZoomInfo / HubSpot / Salesforce dark modes
   Professional B2B SaaS aesthetic
   =================================================================== */

/* ── Reset & Foundations ───────────────────────────────────────── */

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

[hidden] {
  display: none !important;
}

:root {
  /* Core palette */
  --bg-base: #070b14;
  --bg-raised: #0c1322;
  --bg-surface: #111827;
  --bg-elevated: #1a2332;
  --bg-hover: #1f2b3d;
  --bg-active: #253348;

  /* Borders */
  --border: #1e293b;
  --border-subtle: #162032;
  --border-hover: #334155;
  --border-accent: rgba(129, 140, 248, 0.35);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-faint: #475569;

  /* Accent — Indigo */
  --accent: #818cf8;
  --accent-dim: #6366f1;
  --accent-muted: rgba(129, 140, 248, 0.15);
  --accent-glow: rgba(129, 140, 248, 0.08);

  /* Status colors */
  --red: #f87171;
  --red-dim: rgba(248, 113, 113, 0.10);
  --red-border: rgba(248, 113, 113, 0.25);
  --orange: #fbbf24;
  --orange-dim: rgba(251, 191, 36, 0.10);
  --orange-border: rgba(251, 191, 36, 0.25);
  --blue: #60a5fa;
  --blue-dim: rgba(96, 165, 250, 0.10);
  --blue-border: rgba(96, 165, 250, 0.25);
  --green: #34d399;
  --green-dim: rgba(52, 211, 153, 0.10);
  --green-border: rgba(52, 211, 153, 0.25);
  --purple: #c084fc;
  --purple-dim: rgba(192, 132, 252, 0.10);
  --purple-border: rgba(192, 132, 252, 0.25);

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Sizing */
  --radius: 8px;
  --radius-sm: 5px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.35);
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.45);
  --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.08);
}

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-dim);
  text-decoration: underline;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* ── Utility ──────────────────────────────────────────────────── */

.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.8125rem; }

/* ── Buttons ──────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 500;
  font-size: 0.8125rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1.4;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-dim) 0%, var(--accent) 100%);
  color: #fff;
  font-weight: 600;
  border: none;
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.25);
}
.btn-primary:hover {
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-hover); }

.btn-sm { padding: 5px 12px; font-size: 0.75rem; }
.btn-lg { padding: 12px 22px; font-size: 0.9375rem; font-weight: 600; }
.btn-full { width: 100%; }

/* ── Inputs ───────────────────────────────────────────────────── */

.input, .select, .textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.875rem;
  padding: 9px 12px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 2px var(--accent-muted);
}
.input::placeholder { color: var(--text-faint); }
.textarea { min-height: 180px; resize: vertical; line-height: 1.6; }
.select { cursor: pointer; appearance: auto; }

/* ── Fields ───────────────────────────────────────────────────── */

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Alerts ───────────────────────────────────────────────────── */

.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
}
.alert-error {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid var(--red-border);
}

/* ══════════════════════════════════════════════════════════════════
   LOGIN SCREEN
   ══════════════════════════════════════════════════════════════ */

.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.07) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(129, 140, 248, 0.04) 0%, transparent 50%),
              var(--bg-base);
}

.login-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  text-align: center;
}

.login-brand {
  margin-bottom: 32px;
}

.login-logo {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--accent-dim) 0%, var(--accent) 100%);
  color: #fff;
  font-size: 1.375rem;
  font-weight: 700;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
}

.login-brand h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.login-brand p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.login-form label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.login-footer {
  margin-top: 24px;
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* ══════════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT
   ══════════════════════════════════════════════════════════════ */

.dashboard {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top Navigation ───────────────────────────────────────────── */

.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topnav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topnav-logo {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-dim) 0%, var(--accent) 100%);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topnav-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  line-height: 1.2;
}

.topnav-subtitle {
  font-size: 0.6875rem;
  color: var(--text-muted);
  display: block;
  line-height: 1.2;
}

.topnav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Status Pills ─────────────────────────────────────────────── */

.status-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.pill {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: capitalize;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.pill-drafted { background: var(--orange-dim); color: var(--orange); border-color: var(--orange-border); }
.pill-sent { background: var(--blue-dim); color: var(--blue); border-color: var(--blue-border); }
.pill-replied { background: var(--green-dim); color: var(--green); border-color: var(--green-border); }
.pill-converted { background: var(--accent-muted); color: var(--accent); border-color: var(--border-accent); }

/* ── Main Split Layout ────────────────────────────────────────── */

.main {
  display: grid;
  grid-template-columns: 340px 1fr;
  flex: 1;
  min-height: 0;
}

/* ── Panels ───────────────────────────────────────────────────── */

.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.panel-controls {
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  max-height: calc(100vh - 53px);
  position: sticky;
  top: 53px;
}

.panel-results {
  overflow-y: auto;
  max-height: calc(100vh - 53px);
  position: sticky;
  top: 53px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.panel-header h2 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
}

.filter-controls {
  display: flex;
  gap: 6px;
}

.filter-controls .select {
  width: auto;
  font-size: 0.75rem;
  padding: 5px 8px;
  background: var(--bg-elevated);
}

.panel-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-results .panel-body {
  background: var(--bg-base);
  min-height: 400px;
}

/* ── Vertical Grid ────────────────────────────────────────────── */

.vertical-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vert-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: left;
  transition: all 0.15s ease;
}
.vert-btn:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
  background: var(--accent-glow);
}
.vert-btn.selected {
  background: linear-gradient(135deg, var(--accent-dim) 0%, var(--accent) 100%);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}

.vert-icon {
  font-size: 0.875rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

/* ── Search Chips ─────────────────────────────────────────────── */

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.chip {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all 0.15s ease;
  cursor: pointer;
}
.chip:hover {
  border-color: var(--border-accent);
  color: var(--accent);
}
.chip.active {
  background: var(--accent-muted);
  color: var(--accent);
  border-color: var(--border-accent);
}

/* ── Segmented Control ────────────────────────────────────────── */

.seg-control {
  display: flex;
  background: var(--bg-base);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
  border: 1px solid var(--border);
}

.seg-btn {
  flex: 1;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: 3px;
  transition: all 0.15s ease;
}
.seg-btn:hover { color: var(--text-secondary); }
.seg-btn.selected {
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* ── Pipeline Progress ────────────────────────────────────────── */

.pipeline {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 0 4px;
}

.pipe-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.pipe-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 600;
  flex-shrink: 0;
  background: var(--bg-elevated);
  color: var(--text-faint);
  border: 1.5px solid var(--border);
  transition: all 0.2s ease;
}

.pipe-info {
  display: flex;
  flex-direction: column;
}

.pipe-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.2;
}

.pipe-desc {
  font-size: 0.625rem;
  color: var(--text-faint);
  line-height: 1.3;
}

.pipe-step.active {
  background: var(--accent-glow);
}
.pipe-step.active .pipe-num {
  background: var(--accent-dim);
  color: #fff;
  border-color: var(--accent-dim);
  animation: pulse-ring 1.5s ease infinite;
}
.pipe-step.active .pipe-label { color: var(--accent); }
.pipe-step.active .pipe-desc { color: var(--accent-dim); }

.pipe-step.done .pipe-num {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.pipe-step.done .pipe-label { color: var(--green); }

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.3); }
  70% { box-shadow: 0 0 0 5px rgba(99, 102, 241, 0); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* ── Activity Log ─────────────────────────────────────────────── */

.log-wrap {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}
.log-header:hover { color: var(--text-secondary); }

.log-chevron {
  font-size: 0.5rem;
  transition: transform 0.2s;
  color: var(--text-faint);
}

.log-body {
  max-height: 200px;
  transition: max-height 0.3s ease;
  overflow: hidden;
}
.log-body.collapsed { max-height: 0; }

#activity-log {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.7;
  color: var(--text-muted);
  padding: 0 12px 10px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-y: auto;
  max-height: 180px;
}

/* ══════════════════════════════════════════════════════════════════
   PROSPECT CARDS
   ══════════════════════════════════════════════════════════════ */

.empty-state {
  text-align: center;
  padding: 60px 28px;
  color: var(--text-muted);
}
.empty-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.3; }
.empty-state h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.empty-state p {
  font-size: 0.8125rem;
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.6;
}

.prospect-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s ease;
}
.prospect-card:hover {
  border-color: var(--border-hover);
  border-left-color: var(--accent-dim);
  box-shadow: var(--shadow);
}
.prospect-card[data-expanded="true"] {
  border-left-color: var(--accent);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

/* ── Card Header ──────────────────────────────────────────────── */

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  gap: 10px;
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.card-subtitle {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2.5px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  flex-shrink: 0;
  font-family: var(--font-mono);
  background: var(--bg-base);
}
.score-none {
  border-color: var(--border);
  color: var(--text-faint);
  font-size: 1rem;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.card-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.priority-tag {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.tag-high { background: var(--red-dim); color: var(--red); }
.tag-strong { background: var(--orange-dim); color: var(--orange); }
.tag-potential { background: var(--blue-dim); color: var(--blue); }
.tag-low { background: var(--green-dim); color: var(--green); }
.tag-unscored { background: var(--bg-elevated); color: var(--text-faint); }

.outreach-tag {
  font-size: 0.625rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: capitalize;
}
.outreach-drafted { background: var(--orange-dim); color: var(--orange); }
.outreach-sent { background: var(--blue-dim); color: var(--blue); }
.outreach-replied { background: var(--green-dim); color: var(--green); }
.outreach-converted { background: var(--accent-muted); color: var(--accent); }

.card-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.badge-platform { color: var(--blue); border-color: var(--blue-border); background: var(--blue-dim); }
.badge-fail { color: var(--red); border-color: var(--red-border); background: var(--red-dim); }

.card-chevron {
  color: var(--text-faint);
  font-size: 0.5rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Quick Action Buttons (header icons) ──────────────────────── */

.card-quick-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.btn-quick {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-faint);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  cursor: pointer;
}
.btn-quick:hover {
  background: var(--bg-hover);
  border-color: var(--border);
  color: var(--text-secondary);
}
.btn-quick-audit:hover { color: var(--accent); border-color: var(--border-accent); }
.btn-quick-email:hover { color: var(--blue); border-color: var(--blue-border); }
.btn-quick-pdf:hover { color: var(--green); border-color: var(--green-border); }

/* ── Card Body (Expandable Accordion) ────────────────────────── */

.card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.prospect-card[data-expanded="true"] .card-body {
  max-height: 5000px;
}

.prospect-card[data-expanded="true"] .card-chevron {
  transform: rotate(180deg);
}

.card-body-inner {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
  margin-top: 0;
  padding-top: 14px;
  background: var(--bg-raised);
}

.card-description {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.5;
}

.card-address {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.card-website {
  font-size: 0.75rem;
  color: var(--accent);
  word-break: break-all;
  display: inline-block;
  margin-bottom: 8px;
}

.card-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.flag-tag {
  font-size: 0.6875rem;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid var(--red-border);
}

/* ── Card Footer (status + actions) ──────────────────────────── */

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.card-footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-section {
  margin-bottom: 16px;
}
.detail-section:last-child { margin-bottom: 0; }

.detail-section h4 {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.detail-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-item span:not(.detail-label) {
  font-size: 0.8125rem;
  color: var(--text-primary);
}

.detail-item a {
  font-size: 0.8125rem;
  color: var(--accent);
}

/* ── Social Links ─────────────────────────────────────────────── */

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.social-link {
  font-size: 0.75rem;
  padding: 5px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--accent);
  transition: all 0.15s ease;
}
.social-link:hover {
  border-color: var(--border-accent);
  text-decoration: none;
  background: var(--accent-glow);
}

/* ── Score Grid ───────────────────────────────────────────────── */

.score-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.score-cell {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}

.score-cell-value {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.score-cell-label {
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 3px;
}

/* ── Strengths & Deficiencies ─────────────────────────────────── */

.detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.strengths-list li {
  padding: 8px 12px;
  border-left: 2px solid var(--green);
  background: var(--green-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.8125rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.deficiencies-list li {
  padding: 8px 12px;
  border-left: 2px solid var(--red);
  background: var(--red-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.8125rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.deficiency-evidence {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.deficiency-impact {
  font-size: 0.75rem;
  color: var(--orange);
  font-weight: 500;
}

.priority-badge {
  display: inline-block;
  font-size: 0.5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 20px;
  margin-left: 6px;
  vertical-align: middle;
}
.priority-high { background: var(--red-dim); color: var(--red); }
.priority-medium { background: var(--orange-dim); color: var(--orange); }
.priority-low { background: var(--blue-dim); color: var(--blue); }

/* ── Recommendation ───────────────────────────────────────────── */

.recommendation-text {
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.8125rem;
  color: var(--text-primary);
  line-height: 1.6;
  font-style: italic;
}

/* ── Card Actions ─────────────────────────────────────────────── */

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-action {
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  transition: all 0.15s ease;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.btn-action:hover { border-color: var(--border-hover); background: var(--bg-hover); color: var(--text-primary); }
.btn-action:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-audit { color: var(--accent); border-color: var(--border-accent); }
.btn-audit:hover { background: var(--accent-glow); }
.btn-email { color: var(--blue); border-color: var(--blue-border); }
.btn-email:hover { background: var(--blue-dim); }
.btn-pdf { color: var(--green); border-color: var(--green-border); }
.btn-pdf:hover { background: var(--green-dim); }
.btn-contacted { color: var(--orange); border-color: var(--orange-border); }
.btn-contacted:hover { background: var(--orange-dim); }
.btn-delete { color: var(--red); border-color: var(--red-border); margin-left: auto; }
.btn-delete:hover { background: var(--red-dim); }

/* ══════════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 1.25rem;
  padding: 4px 8px;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.modal-close:hover { color: var(--text-primary); background: var(--bg-hover); }

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ══════════════════════════════════════════════════════════════════
   TABS
   ══════════════════════════════════════════════════════════════ */

.tab-bar {
  display: flex;
  gap: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.tab-btn {
  padding: 11px 20px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.tab-content[hidden] { display: none !important; }

/* ══════════════════════════════════════════════════════════════════
   CRM PIPELINE
   ══════════════════════════════════════════════════════════════ */

.crm-layout {
  padding: 20px 24px;
}

.crm-header {
  margin-bottom: 16px;
}

.crm-header h2 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.crm-columns {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  align-items: start;
}

.crm-col {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 200px;
}

.crm-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: var(--radius) var(--radius) 0 0;
}

.crm-col-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.crm-col-count {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  background: var(--bg-elevated);
  color: var(--text-muted);
  padding: 1px 7px;
  border-radius: 20px;
}

.crm-col-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.crm-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  overflow: hidden;
}
.crm-card:hover {
  border-color: var(--border-hover);
  border-left-color: var(--accent-dim);
  box-shadow: var(--shadow-sm);
}
.crm-card[data-crm-expanded="true"] {
  border-left-color: var(--accent);
}

.crm-card-top {
  padding: 10px;
  cursor: pointer;
}

.crm-card-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.crm-card-meta {
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.crm-card-score {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 20px;
}

.crm-card-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.crm-card[data-crm-expanded="true"] .crm-card-expand {
  max-height: 200px;
}

.crm-card-actions {
  display: flex;
  gap: 5px;
  padding: 8px 10px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.crm-card-actions .btn {
  font-size: 0.625rem;
  padding: 3px 8px;
}

.status-select {
  font-size: 0.6875rem;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
}

.crm-empty {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-faint);
  padding: 20px 6px;
}

.crm-card-email {
  font-size: 0.6875rem;
  color: var(--text-faint);
  margin-top: 4px;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Email Preview in Cards ───────────────────────────────────── */

.email-preview {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.email-preview-subject {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.email-preview-body {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════════
   BATCH QUEUE
   ══════════════════════════════════════════════════════════════ */

.batch-queue {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.batch-queue-list {
  padding: 6px;
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.batch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}

.batch-item-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.batch-item-query {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-item-vertical {
  font-size: 0.625rem;
  color: var(--text-faint);
}

.batch-item-remove {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 1rem;
  padding: 2px 4px;
  line-height: 1;
  border-radius: 3px;
  flex-shrink: 0;
}
.batch-item-remove:hover { color: var(--red); background: var(--red-dim); }

.batch-queue-actions {
  padding: 6px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.batch-progress {
  margin-top: 3px;
}

.batch-progress-bar {
  height: 3px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}

.batch-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  border-radius: 2px;
  transition: width 0.3s ease;
}

.batch-progress-text {
  font-size: 0.625rem;
  color: var(--text-muted);
  margin-top: 3px;
  text-align: center;
}

/* ══════════════════════════════════════════════════════════════════
   LEAD SCORE BADGE
   ══════════════════════════════════════════════════════════════ */

.lead-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.lead-score-high { background: var(--green-dim); color: var(--green); }
.lead-score-medium { background: var(--orange-dim); color: var(--orange); }
.lead-score-low { background: var(--red-dim); color: var(--red); }

/* ══════════════════════════════════════════════════════════════════
   ANALYTICS DASHBOARD
   ══════════════════════════════════════════════════════════════ */

.analytics-layout {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.analytics-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.analytics-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.analytics-card h3 {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── Funnel ─────────────────────────────────────────────────── */

.funnel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.funnel-step {
  display: flex;
  align-items: center;
  gap: 14px;
}

.funnel-bar-wrap {
  flex: 1;
  height: 28px;
  background: var(--bg-base);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.funnel-bar {
  height: 100%;
  border-radius: var(--radius-sm);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 2px;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
}

.funnel-bar-screened { background: linear-gradient(90deg, #4f46e5, #6366f1); }
.funnel-bar-audited { background: linear-gradient(90deg, #2563eb, #3b82f6); }
.funnel-bar-drafted { background: linear-gradient(90deg, #d97706, #f59e0b); }
.funnel-bar-contacted { background: linear-gradient(90deg, #1d4ed8, #3b82f6); }
.funnel-bar-replied { background: linear-gradient(90deg, #15803d, #22c55e); }
.funnel-bar-converted { background: linear-gradient(90deg, #059669, #34d399); }

.funnel-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 150px;
}

.funnel-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 90px;
}

.funnel-count {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ── KPI Cards ──────────────────────────────────────────────── */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.kpi-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* ── ROI Calculator ─────────────────────────────────────────── */

.roi-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  align-items: end;
}

.roi-field { margin: 0; }

.roi-result {
  font-family: var(--font-mono);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--green);
  padding: 9px 12px;
  background: var(--green-dim);
  border: 1px solid var(--green-border);
  border-radius: var(--radius-sm);
  text-align: center;
}

/* ── Vertical Table ─────────────────────────────────────────── */

.vertical-table-wrap {
  overflow-x: auto;
}

.vertical-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.vertical-table th {
  text-align: left;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 8px 10px;
  border-bottom: 2px solid var(--border);
}

.vertical-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.vertical-table tr:last-child td { border-bottom: none; }
.vertical-table tr:hover td { background: var(--bg-hover); }

.vertical-table .mono {
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ── Buyer Signal Intelligence ──────────────────────────────── */

.signal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.signal-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s;
}
.signal-card:hover {
  border-color: var(--border-hover);
}

.signal-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
}
.signal-icon-email { background: var(--blue-dim); color: var(--blue); }
.signal-icon-phone { background: var(--green-dim); color: var(--green); }
.signal-icon-social { background: var(--purple-dim); color: var(--purple); }
.signal-icon-audit { background: var(--accent-muted); color: var(--accent); }
.signal-icon-contact { background: var(--orange-dim); color: var(--orange); }
.signal-icon-ready { background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(129,140,248,0.15)); color: var(--accent); }

.signal-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.signal-value {
  font-family: var(--font-mono);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.signal-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.signal-bar-wrap {
  height: 4px;
  background: var(--bg-base);
  border-radius: 2px;
  overflow: hidden;
}

.signal-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 2px;
}
.signal-bar-email { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.signal-bar-phone { background: linear-gradient(90deg, #15803d, #4ade80); }
.signal-bar-social { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.signal-bar-audit { background: linear-gradient(90deg, var(--accent-dim), var(--accent)); }
.signal-bar-people { background: linear-gradient(90deg, #d97706, #fb923c); }
.signal-bar-ready { background: linear-gradient(90deg, #4338ca, #818cf8); }

.signal-summary {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
}

.signal-summary-text {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ── Growth Opportunity Alerts ─────────────────────────────── */

.alert-empty {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.alert-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.alert-card {
  display: flex;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s ease;
}
.alert-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

.alert-card-indicator {
  width: 3px;
  flex-shrink: 0;
  background: var(--border);
}
.alert-hot .alert-card-indicator { background: linear-gradient(180deg, #ef4444, #f97316); }
.alert-high .alert-card-indicator { background: linear-gradient(180deg, #f59e0b, #fb923c); }
.alert-opportunity .alert-card-indicator { background: linear-gradient(180deg, var(--accent-dim), var(--accent)); }

.alert-card-body {
  flex: 1;
  padding: 12px 14px;
  min-width: 0;
}

.alert-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.alert-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.alert-badge {
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.alert-badge-hot { background: var(--red-dim); color: var(--red); border: 1px solid var(--red-border); }
.alert-badge-high { background: var(--orange-dim); color: var(--orange); border: 1px solid var(--orange-border); }
.alert-badge-opportunity { background: var(--accent-muted); color: var(--accent); border: 1px solid var(--border-accent); }

.alert-card-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alert-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.alert-card-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.signal-tag {
  font-size: 0.625rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.signal-tag-score {
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ── Prioritized Account List / Top Opportunities ──────────── */

.opp-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.opp-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  gap: 10px;
  transition: all 0.2s ease;
}
.opp-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
}

.opp-rank {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-faint);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.opp-card-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.opp-score {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid;
  flex-shrink: 0;
  background: var(--bg-base);
}

.opp-info {
  min-width: 0;
}

.opp-name {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-primary);
}

.opp-meta {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.opp-card-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════
   SETTINGS
   ══════════════════════════════════════════════════════════════ */

.settings-layout {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.settings-card h3 {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.settings-card p {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.settings-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.settings-row:last-child { border-bottom: none; }

.settings-value {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
  font-family: var(--font-mono);
}

.settings-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .main {
    grid-template-columns: 1fr;
  }

  .panel-controls {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: none;
    position: static;
  }

  .panel-results {
    max-height: none;
    position: static;
  }
}

@media (max-width: 640px) {
  .topnav {
    padding: 8px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .topnav-actions {
    flex-wrap: wrap;
    gap: 4px;
  }

  .status-pills { display: none; }

  .panel-body { padding: 14px; }
  .panel-header { padding: 14px; }

  .score-grid { grid-template-columns: repeat(2, 1fr); }

  .card-header { padding: 12px 14px; }
  .card-body-inner { padding: 0 14px 14px; padding-top: 12px; }
  .card-footer { flex-direction: column; align-items: stretch; }
  .card-actions { justify-content: flex-start; }

  .card-actions { flex-direction: column; }
  .btn-action { justify-content: center; }
  .btn-delete { margin-left: 0; }

  .filter-controls {
    flex-direction: column;
    width: 100%;
  }
  .filter-controls .select { width: 100%; }

  .modal { margin: 8px; }

  .crm-columns { grid-template-columns: 1fr; }
  .tab-bar { overflow-x: auto; }
  .settings-layout { padding: 14px; }

  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .signal-grid { grid-template-columns: repeat(2, 1fr); }
  .roi-row { grid-template-columns: 1fr; }
  .funnel-info { min-width: 110px; }
  .analytics-layout { padding: 14px; }
  .alert-card-top { flex-direction: column; align-items: flex-start; }
  .opp-card { flex-wrap: wrap; }
  .opp-card-right { width: 100%; justify-content: flex-end; }
}

/* ══════════════════════════════════════════════════════════════════
   SCROLLBAR STYLING
   ══════════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--bg-active);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-faint);
}
