/* ============================================================
   NORTHBOUND REACH — Global Styles
   ============================================================ */

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

:root {
  /* Brand color system — Northbound Reach */
  --brand-accent: #C97D28;           /* golden amber — logo, highlights */
  --brand-orange: #D4642A;           /* burnt orange — primary CTA */
  --brand-orange-hover: #BF5420;
  --brand-cream: #EDE5D8;            /* warm beige hover */
  --brand-cream-light: #F5F0E8;      /* lighter cream backgrounds */
  --brand-dark: #1A1A1A;
  --brand-gradient: linear-gradient(135deg, #D4642A 0%, #C97D28 50%, #B8860B 100%);
  --brand-font-heading: 'Playfair Display', Georgia, serif;
  --brand-font-body: 'Inter', -apple-system, sans-serif;
  --brand-font-mono: 'Space Mono', 'IBM Plex Mono', monospace;

  /* System variables mapped to brand colors */
  --accent: #D4642A;
  --accent-hover: #BF5420;
  --accent-light: rgba(212, 100, 42, 0.10);
  --success: #2D8A4E;
  --success-light: rgba(45, 138, 78, 0.10);
  --warning: #D4962A;
  --warning-light: rgba(212, 150, 42, 0.10);
  --danger: #C94432;
  --danger-light: rgba(201, 68, 50, 0.10);
  --bg: #ffffff;
  --surface: #ffffff;
  --border: #E0D5C5;
  --border-light: #EDE5D8;
  --text-primary: #1A1A1A;
  --text-secondary: #333333;
  --text-muted: #777777;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(26,26,26,0.06), 0 1px 2px rgba(26,26,26,0.04);
  --shadow-md: 0 8px 32px rgba(26, 26, 26, 0.12);
  --gnav-height: 44px;
  --pipeline-height: 36px;
}

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

/* ============================================================
   APP SHELL — column layout, no sidebar
   ============================================================ */

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

/* ============================================================
   GLOBAL NAV — slim top bar
   ============================================================ */

.global-nav {
  height: var(--gnav-height);
  min-height: var(--gnav-height);
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  z-index: 200;
  position: relative;
}

.global-nav::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand-gradient);
  z-index: 1;
}

.gnav-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.gnav-logo {
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.gnav-brand {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-accent);
  white-space: nowrap;
  letter-spacing: -0.1px;
}

.gnav-sep {
  color: var(--border);
  font-size: 14px;
  flex-shrink: 0;
}

.gnav-current {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Topbar enrichment progress indicator ── */
.gnav-enrich {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  padding: 3px 10px;
  background: var(--bg-card, #1A1C22);
  border: 1px solid var(--border, #2d2f36);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted, #9CA3AF);
  white-space: nowrap;
  animation: gnav-enrich-in 0.2s ease;
}
@keyframes gnav-enrich-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.gnav-enrich-spinner {
  width: 10px; height: 10px;
  border: 2px solid var(--border, #2d2f36);
  border-top-color: #3B82F6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.gnav-enrich-label {
  color: var(--text-secondary, #D1D5DB);
  font-weight: 500;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.gnav-enrich-label:hover { color: #3B82F6; }
.gnav-enrich-bar {
  width: 60px; height: 4px;
  background: var(--bg-hover, #23252b);
  border-radius: 2px;
  overflow: hidden;
}
.gnav-enrich-fill {
  height: 100%;
  background: #3B82F6;
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 0%;
}
.gnav-enrich-count {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}
.gnav-enrich-stop {
  background: transparent;
  border: 1px solid var(--border, #2d2f36);
  color: var(--text-muted, #9CA3AF);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}
.gnav-enrich-stop:hover { background: rgba(239, 68, 68, 0.1); border-color: #ef4444; color: #ef4444; }

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

.gnav-pill-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #ffffff;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.1s, color 0.1s;
}
.gnav-pill-btn:hover { background: #f5f6f8; color: var(--text-primary); }
.gnav-pill-btn.active { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }

.gnav-sculptor-btn {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}
.gnav-sculptor-btn:hover { background: var(--accent-light); color: var(--accent-hover); }

.gnav-icon-btn {
  width: 30px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #ffffff;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.gnav-icon-btn:hover { background: #f5f6f8; color: var(--text-primary); }

.gnav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

/* ============================================================
   MODULE PIPELINE — collapsible horizontal step bar
   ============================================================ */

.modules-pipeline {
  display: none;
  height: var(--pipeline-height);
  min-height: var(--pipeline-height);
  background: #fafafa;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  overflow-y: hidden;
  flex-shrink: 0;
}
.modules-pipeline::-webkit-scrollbar { display: none; }
.modules-pipeline.open { display: flex; }

.pipeline-step {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.1s, color 0.1s;
  flex-shrink: 0;
}
.pipeline-step:hover { background: #efefef; color: var(--text-primary); }
.pipeline-step.active { color: var(--accent); font-weight: 500; }

.pipeline-num {
  font-size: 10px;
  font-weight: 600;
  color: inherit;
  opacity: 0.6;
}

.pipeline-arrow {
  color: var(--border);
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1;
  padding: 0 1px;
  user-select: none;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px;
  background: #ffffff;
}
.content.dash-bg {
  background: #F9F8F6;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-header-left h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  margin-bottom: 4px;
  font-family: var(--brand-font-heading);
}

.page-header-left p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.card-header h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  padding: 20px;
}

/* ============================================================
   STAT CARDS
   ============================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.stat-card .stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card .stat-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.stat-card .stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.stat-icon.blue { background: var(--accent-light); color: var(--accent); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.yellow { background: var(--warning-light); color: var(--warning); }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--bg); }

.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
}

.btn-danger:hover { background: rgba(239,68,68,0.2); }

.btn-success {
  background: var(--success-light);
  color: var(--success);
}

.btn-success:hover { background: rgba(34,197,94,0.2); }

.btn-sm {
  padding: 5px 11px;
  font-size: 12px;
}

.btn-lg {
  padding: 11px 22px;
  font-size: 14px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================
   FORMS
   ============================================================ */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
  font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.1);
}

.form-input::placeholder { color: var(--text-muted); }

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ============================================================
   TABLE
   ============================================================ */

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  background: var(--bg);
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:hover td { background: var(--bg); }

.td-muted { color: var(--text-muted); font-size: 12px; }

/* ============================================================
   BADGES / TAGS
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-blue { background: var(--accent-light); color: var(--accent); }
.badge-green { background: var(--success-light); color: var(--success); }
.badge-yellow { background: var(--warning-light); color: var(--warning); }
.badge-red { background: var(--danger-light); color: var(--danger); }
.badge-gray { background: #f3f4f6; color: var(--text-secondary); }

/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state-icon {
  width: 52px;
  height: 52px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 320px;
}

/* ============================================================
   PROGRESS / LOADING
   ============================================================ */

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(212, 100, 42, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

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

.progress-bar-inner {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* ============================================================
   TOAST / ALERTS
   ============================================================ */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--text-primary);
  color: #fff;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.2s ease;
  max-width: 320px;
}

.toast.success { background: #166534; }
.toast.error { background: #991b1b; }
.toast.info { background: #1A1A1A; }

@keyframes slideUp {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   MODULE SHELL (coming soon placeholder)
   ============================================================ */

.module-shell {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.coming-soon-banner {
  background: linear-gradient(135deg, #1e2130, #0f1117);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  color: #fff;
}

.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.coming-soon-banner h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.coming-soon-banner p {
  font-size: 13px;
  color: #8b92a5;
  line-height: 1.6;
}

.coming-soon-icon {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 16px;
  background: rgba(212, 100, 42, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.coming-soon-icon svg {
  width: 32px;
  height: 32px;
  color: var(--accent);
}

/* ============================================================
   DASHBOARD GRID
   ============================================================ */

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: block;
}

.module-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212, 100, 42, 0.08), var(--shadow-md);
  transform: translateY(-1px);
}

.module-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.module-card-icon svg { width: 22px; height: 22px; }

.module-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.module-card p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.module-card-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.module-card-footer .arrow {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .sidebar {
    width: 56px;
    min-width: 56px;
  }
  .nav-label, .sidebar-section-label, .sidebar-logo-text, .nav-badge {
    display: none;
  }
  .nav-icon { margin: 0 auto; }
  .nav-item { justify-content: center; }
  .sidebar-logo { justify-content: center; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   LEADS TABLE — Clay.com-style Spreadsheet v2
   ============================================================ */

.leads-full-page {
  margin: -24px;
  height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

/* ── Toolbar ────────────────────────────────────────────── */
.leads-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid #e5e7ef;
  background: #fff;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  min-height: 48px;
}
.leads-toolbar-left  { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.leads-toolbar-right { display: flex; align-items: center; gap: 8px; }
.leads-count {
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
  padding: 0 4px;
}

/* ── Enrichment run bar ─────────────────────────────────── */
.leads-enrich-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 14px;
  background: #1A1A1A;
  color: #fff;
  font-size: 12px;
  flex-shrink: 0;
  border-bottom: 1px solid #1e2130;
}
.leads-enrich-bar .progress-bar-outer {
  flex: 1;
  max-width: 220px;
  background: rgba(255,255,255,0.15);
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
}
.leads-enrich-bar .progress-bar-inner { background: #C97D28; height: 4px; }
#lt-enrich-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
#lt-enrich-cancel { margin-left: 4px; cursor: pointer; opacity: 0.6; flex-shrink: 0; font-size: 14px; }
#lt-enrich-cancel:hover { opacity: 1; }

/* ── Sheet wrapper ─────────────────────────────────────── */
.leads-sheet-wrapper {
  flex: 1;
  overflow: auto;
  position: relative;
}

/* ── Clay-style table ──────────────────────────────────── */
.clay-table {
  border-collapse: collapse;
  font-size: 13px;
  min-width: 100%;
  table-layout: fixed;
  background: #fff;
}

.clay-table th,
.clay-table td {
  border-right: 1px solid #E0D5C5;
  border-bottom: 1px solid #E0D5C5;
  padding: 0;
  vertical-align: middle;
  background: #fff;
  overflow: hidden;
  white-space: nowrap;
}

/* Header row */
.clay-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #F5F0E8;
  border-bottom: 1px solid #E0D5C5;
  height: 36px;
  padding: 0;
}

/* ── Sticky left columns ────────────────────────────────── */
.clay-sticky { position: sticky !important; z-index: 2; background: #fff; }
thead .clay-sticky { z-index: 5; background: #F5F0E8; }

.clay-col-cb  { left: 0;   width: 40px;  min-width: 40px;  max-width: 40px;  text-align: center; }
.clay-col-num { left: 40px; width: 50px; min-width: 50px; max-width: 50px;  text-align: center; }
.clay-col-fixed {
  left: 90px;
}
/* Fade shadow after last frozen column */
.clay-col-fixed::after {
  content: '';
  position: absolute;
  top: 0; right: -8px; bottom: 0;
  width: 8px;
  background: linear-gradient(to right, rgba(0,0,0,0.06), transparent);
  pointer-events: none;
}

/* ── Header cell content ────────────────────────────────── */
.clay-th-wrap {
  display: flex;
  flex-direction: column;
  height: 36px;
}
.clay-th-top {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  flex: 1;
  min-width: 0;
  user-select: none;
}
.clay-th-icon {
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af;
  flex-shrink: 0;
  font-style: normal;
  letter-spacing: 0;
  min-width: 12px;
  text-align: center;
  font-family: monospace;
}
.clay-th-label {
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  letter-spacing: 0;
  text-transform: none;
}
.clay-th-cb, .clay-th-num {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 500;
}

/* ▶ Play button (enrichment) */
.clay-play-wrap { position: relative; flex-shrink: 0; }
.clay-play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 1px solid #d1d5db;
  background: #fff;
  cursor: pointer;
  color: #D4642A;
  font-size: 8px;
  padding: 0;
  transition: all 0.12s;
  opacity: 0;
  line-height: 1;
}
th:hover .clay-play-btn,
.clay-play-btn:focus { opacity: 1; }
.clay-play-btn:hover {
  background: #D4642A;
  color: #fff;
  border-color: #D4642A;
  opacity: 1;
}

/* Enrichment dropdown */
.clay-enrich-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  z-index: 200;
  min-width: 200px;
  overflow: hidden;
}
.clay-enrich-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  background: none;
  border: none;
  font-size: 12px;
  color: #111827;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}
.clay-enrich-dropdown button:hover { background: #f9fafb; }

/* Per-column completion progress bar */
.clay-col-bar {
  height: 2px;
  background: #e8eaed;
  position: relative;
}
.clay-col-bar-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: #D4642A;
  transition: width 0.3s;
  border-radius: 0 1px 1px 0;
}

/* ── Data rows ──────────────────────────────────────────── */
.clay-row td { height: 36px; }
.clay-row:nth-child(even) td { background: #fafafa; }
.clay-row:nth-child(even) .clay-sticky { background: #fafafa; }

.clay-row:hover td { background: #EDE5D8 !important; }
.clay-row:hover .clay-sticky { background: #EDE5D8 !important; }

.clay-row.clay-selected td { background: #F5F0E8 !important; }
.clay-row.clay-selected .clay-sticky { background: #F5F0E8 !important; }

/* Row checkbox + number cells */
.clay-td-cb  { text-align: center; }
.clay-td-num { text-align: center; color: #9ca3af; font-size: 11px; cursor: pointer; }
.clay-td-num:hover { color: #374151; }
.clay-row-cb { margin: 0; cursor: pointer; accent-color: #D4642A; }

/* ── Cell content ───────────────────────────────────────── */
.clay-cell {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 8px;
  overflow: hidden;
  cursor: text;
  gap: 5px;
  min-width: 0;
}
.clay-cell-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: #111827;
  min-width: 0;
}
.clay-cell-empty .clay-cell-text {
  color: #d1d5db;
}
.clay-cell-url .clay-cell-text {
  color: #D4642A;
}
.clay-cell-url:hover .clay-cell-text {
  text-decoration: underline;
  cursor: pointer;
}

/* Email dot indicator */
.clay-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.clay-dot-valid   { background: #22c55e; }
.clay-dot-invalid { background: #ef4444; }
.clay-dot-unknown { background: #f59e0b; }

/* Email status badge (compact) */
.clay-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
}
.clay-status-valid   { background: rgba(34,197,94,0.10);  color: #16a34a; }
.clay-status-invalid { background: rgba(239,68,68,0.10);  color: #dc2626; }
.clay-status-unknown { background: rgba(245,158,11,0.10); color: #d97706; }

/* ── Cell editing ───────────────────────────────────────── */
td.clay-editing { padding: 0; }
td.clay-editing .clay-cell { display: none; }
.clay-cell-input {
  width: 100%;
  height: 36px;
  padding: 0 8px;
  border: none;
  border-top: 2px solid #D4642A;
  border-bottom: 2px solid #D4642A;
  outline: none;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: #111827;
  box-shadow: 0 0 0 2px rgba(212, 100, 42, 0.15);
  box-sizing: border-box;
  z-index: 10;
  position: relative;
}

/* Loading spinner in cell */
.clay-cell-loading {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #9ca3af;
  font-size: 11px;
}
.clay-cell-done { animation: clay-flash 0.5s ease; }
@keyframes clay-flash {
  0%,100% { background: inherit; }
  40% { background: rgba(34,197,94,0.18) !important; }
}

/* Add column button */
.clay-add-col-th {
  width: 48px;
  min-width: 48px;
  background: #f9fafb;
  border-right: none !important;
  position: sticky;
  right: 0;
  z-index: 3;
}
.clay-add-col-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 16px;
  transition: color 0.12s, background 0.12s;
}
.clay-add-col-btn:hover { color: #D4642A; background: #F5F0E8; }

/* ── Empty state ────────────────────────────────────────── */
.lt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
  color: #9ca3af;
}
.lt-empty h3 { font-size: 15px; font-weight: 600; color: #6b7280; margin-bottom: 6px; }
.lt-empty p  { font-size: 13px; max-width: 300px; }

/* backward-compat aliases used in wireTableEvents */
.lt-badge-valid   { background: rgba(34,197,94,0.10);  color: #16a34a; }
.lt-badge-invalid { background: rgba(239,68,68,0.10);  color: #dc2626; }
.lt-badge-unknown { background: rgba(245,158,11,0.10); color: #d97706; }

/* ============================================================
   MAPS SCRAPER — Campaign Structure
   ============================================================ */

/* Inline search form row */
.maps-search-form-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

/* Campaign cards grid */
.maps-campaigns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.maps-campaign-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px 16px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.1s;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.maps-campaign-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.maps-campaign-card-loading { opacity: 0.6; pointer-events: none; }

.maps-campaign-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.maps-campaign-card-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(212, 100, 42, 0.10);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.maps-campaign-card-arrow {
  font-size: 16px;
  color: var(--text-muted);
  transition: color 0.15s, transform 0.15s;
}
.maps-campaign-card:hover .maps-campaign-card-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

.maps-campaign-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.maps-campaign-card-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* Stats row */
.maps-campaign-card-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 8px;
}
.maps-campaign-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.maps-campaign-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.maps-campaign-stat-label {
  font-size: 11px;
  color: var(--text-muted);
}
.maps-campaign-stat-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  flex-shrink: 0;
}

/* Email coverage progress bar */
.maps-campaign-bar-wrap {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.maps-campaign-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.4s;
}
.maps-campaign-bar-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── CSV Import Zone ──────────────────────────────────────── */
.lt-import-zone {
  position: relative;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 16px 20px;
}

.lt-import-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 20px;
  cursor: pointer;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  text-align: center;
  user-select: none;
}
.lt-import-dropzone:hover,
.lt-import-dropzone.lt-drag-over {
  background: var(--accent-light);
  border-color: var(--accent);
}
.lt-import-dropzone.lt-drag-over {
  transform: scale(1.005);
}
.lt-import-icon {
  color: var(--text-muted);
  transition: color 0.15s;
}
.lt-import-dropzone:hover .lt-import-icon,
.lt-import-dropzone.lt-drag-over .lt-import-icon {
  color: var(--accent);
}
.lt-import-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.lt-import-browse {
  color: var(--accent);
  cursor: pointer;
}
.lt-import-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* Progress state */
.lt-import-progress {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}
.lt-import-progress-file {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.lt-import-bar-wrap {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.lt-import-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0%;
  transition: width 0.15s;
}
.lt-import-status {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Success state */
.lt-import-success {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 0;
}
.lt-import-success-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--success-light);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lt-import-success-text strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.lt-import-success-text span {
  font-size: 12px;
  color: var(--text-secondary);
}
.lt-import-again {
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Column mapping panel ─────────────────────────────────── */
.lt-mapping-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.lt-mapping-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.lt-mapping-file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-primary);
}
.lt-mapping-badge {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}
.lt-mapping-notice {
  font-size: 12px;
  color: var(--warning);
  background: var(--warning-light);
  padding: 2px 8px;
  border-radius: 20px;
}
.lt-mapping-notice-ok {
  color: var(--success);
  background: var(--success-light);
}
.lt-mapping-body {
  max-height: 320px;
  overflow-y: auto;
}
.lt-mapping-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.lt-mapping-table thead th {
  padding: 8px 12px;
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 1;
}
.lt-mapping-table tbody tr {
  border-bottom: 1px solid var(--border);
}
.lt-mapping-table tbody tr:last-child { border-bottom: none; }
.lt-mapping-table tbody td { padding: 8px 12px; vertical-align: middle; }
.lt-mapping-colname {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}
.lt-mapping-sample {
  color: var(--text-muted);
  font-size: 11px;
  max-width: 200px;
}
.lt-mapping-row-warn .lt-mapping-colname { color: var(--warning); }
.lt-mapping-select {
  width: 100%;
  min-width: 160px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 12px;
  color: var(--text-primary);
  cursor: pointer;
}
.lt-mapping-select:focus { outline: none; border-color: var(--accent); }
.lt-mapping-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  border-radius: 0 0 var(--radius) var(--radius);
}
.lt-mapping-footer-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-right: auto;
}

/* Dismiss button */
.lt-import-dismiss {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
}
.lt-import-dismiss:hover {
  background: var(--border);
  color: var(--text-primary);
}

/* ============================================================
   BACKGROUND PATHS HERO  (Dashboard hero banner)
   ============================================================ */

.bp-hero {
  position: relative;
  width: 100%;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  color: #0f1117;
}

/* ============================================================
   DASHBOARD — Dark World-Class Redesign
   ============================================================ */

/* (main-dashboard class removed — All Tables uses standard layout) */

.db-root {
  background: #0a0a0a;
  color: #fff;
  min-height: 100%;
}

/* ── Hero ──────────────────────────────────────────────────── */
.db-hero {
  position: relative;
  height: 46vh;
  min-height: 340px;
  overflow: hidden;
}

.db-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.db-hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(10,10,10,0.25) 0%, rgba(10,10,10,0.95) 100%),
    linear-gradient(to right, rgba(10,10,10,0.4) 0%, transparent 40%, transparent 60%, rgba(10,10,10,0.4) 100%);
  pointer-events: none;
}

.db-hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px 24px;
  text-align: center;
}

.db-hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  padding: 5px 14px 5px 8px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.db-hero-logo-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(212, 100, 42, 0.25);
  color: #D4642A;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.db-hero-title {
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0;
  text-shadow: 0 4px 32px rgba(0,0,0,0.6);
}

.db-hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.01em;
  margin: 0;
}

.db-hero-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  background: #D4642A;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.2s;
  box-shadow: 0 0 0 1px rgba(212,100,42,0.5), 0 4px 24px rgba(212,100,42,0.35);
}
.db-hero-cta:hover {
  background: #BF5420;
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(212,100,42,0.6), 0 8px 32px rgba(212,100,42,0.5);
}

/* ── Sections ──────────────────────────────────────────────── */
.db-section {
  padding: 32px 32px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.db-stats-section { padding-top: 28px; }

/* ── Stat cards ────────────────────────────────────────────── */
.db-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.db-stat-card {
  background: #111;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.db-stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% -20%, rgba(212,100,42,0.09) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.3s;
}
.db-stat-card:hover {
  border-color: rgba(212,100,42,0.22);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212,100,42,0.07), 0 0 0 1px rgba(212,100,42,0.12);
}
.db-stat-card:hover::after { opacity: 1; }

.db-stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.db-stat-value {
  font-size: 2.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.04em;
  line-height: 1;
}

.db-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  margin-top: 4px;
}

.db-stat-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.28);
  margin-top: 2px;
}

/* ── Module section header ─────────────────────────────────── */
.db-section-header { margin-bottom: 18px; }

.db-section-title {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0 0 3px;
}

.db-section-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  margin: 0;
}

/* ── Module cards ──────────────────────────────────────────── */
.db-modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.db-module-card {
  background: var(--bg, #F9FAFB);
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
  text-align: left;
}
.db-module-card:hover {
  background: #F5F0E8;
  border-color: #E0D5C5;
  box-shadow: 0 2px 8px rgba(212, 100, 42, 0.08);
}

@keyframes db-fade-up {
  to { opacity: 1; transform: translateY(0); }
}

.db-module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.db-module-num {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.08em;
}

.db-module-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.db-module-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}

.db-module-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.38);
  line-height: 1.6;
  flex: 1;
}

.db-module-arrow {
  margin-top: 10px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s, transform 0.2s;
}
.db-module-card:hover .db-module-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* The two overlapping SVG layers */
.bp-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bp-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Content sits above the SVG */
.bp-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 52px 32px;
  animation: bp-fade-in 2s ease both;
}

@keyframes bp-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Title */
.bp-title {
  font-size: clamp(2rem, 5.5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 36px;
}

.bp-word {
  display: inline-block;
  margin-right: 0.28em;
}
.bp-word:last-child { margin-right: 0; }

.bp-letter {
  display: inline-block;
  background: linear-gradient(135deg, #0f1117 0%, rgba(15,17,23,0.65) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transform: translateY(36px);
  animation: bp-letter-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes bp-letter-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Flowing path animation — drives stroke-dashoffset to make
   a short segment appear to travel along each path */
@keyframes bp-path-flow {
  0%   { stroke-dashoffset: 0;     opacity: 0.12; }
  50%  { stroke-dashoffset: -900;  opacity: 0.42; }
  100% { stroke-dashoffset: -1800; opacity: 0.12; }
}

/* CTA button */
.bp-btn-wrap {
  display: inline-block;
  background: linear-gradient(to bottom, rgba(0,0,0,0.09), rgba(255,255,255,0.09));
  padding: 1px;
  border-radius: 18px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.07);
  transition: box-shadow 0.3s;
}
.bp-btn-wrap:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}

.bp-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 34px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 17px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.97);
  color: #0f1117;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
  letter-spacing: -0.01em;
}
.bp-btn:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.09);
}
.bp-btn:hover .bp-btn-arrow {
  transform: translateX(5px);
  opacity: 1;
}

.bp-btn-arrow {
  opacity: 0.55;
  transition: all 0.25s;
  font-size: 17px;
}

/* ── Confirmation Dialog ──────────────────────────────────── */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: confirm-fade-in 0.1s ease;
}
@keyframes confirm-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.confirm-modal {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
  padding: 24px;
  max-width: 360px;
  width: 100%;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  animation: confirm-slide-in 0.12s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes confirm-slide-in {
  from { transform: scale(0.94) translateY(6px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.confirm-modal-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(239,68,68,0.1);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.confirm-modal-body {
  flex: 1;
}
.confirm-modal-msg {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
  margin: 0 0 16px;
  white-space: pre-wrap;
}
.confirm-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ── Maps campaign delete button ─────────────────────────── */
.maps-campaign-delete-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.maps-campaign-card:hover .maps-campaign-delete-btn {
  opacity: 1;
}
.maps-campaign-delete-btn:hover {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.2);
  color: #ef4444;
}

/* ── Leads right-click context menu ─────────────────────── */
.leads-ctx-menu {
  position: fixed;
  z-index: 9000;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 4px;
  min-width: 140px;
  animation: confirm-fade-in 0.08s ease;
}
.leads-ctx-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
  border: none;
  background: none;
  border-radius: 5px;
  cursor: pointer;
  color: var(--text-primary);
  text-align: left;
  transition: background 0.1s;
}
.leads-ctx-item:hover { background: var(--bg); }
.leads-ctx-danger { color: #ef4444; }
.leads-ctx-danger:hover { background: rgba(239,68,68,0.06); }

/* ============================================================
   EMAIL VERIFICATION — Job cards
   ============================================================ */

/* ── Email Verification — card icon (amber/orange) ─────── */
.dash-tc-icon.ev-icon {
  background: var(--accent-light);
  color: var(--accent);
}

/* ── Ratio bar (multi-color) ──────────────────────────── */
.ev-job-tribar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--border);
  margin-bottom: 6px;
}
.ev-job-tribar-valid    { background: var(--success); flex-shrink: 0; }
.ev-job-tribar-invalid  { background: var(--danger);  flex-shrink: 0; }
.ev-job-tribar-catchall { background: var(--accent);  flex-shrink: 0; }
.ev-job-tribar-unknown  { background: var(--warning); flex-shrink: 0; }

/* ── Pulsing progress bar for running jobs ────────────── */
@keyframes ev-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}
.ev-progress-pulse {
  animation: ev-pulse 1.5s ease-in-out infinite;
}

/* ── Poor quality bar (red-ish when valid < 50%) ──────── */
.ev-bar-poor {
  background: var(--danger) !important;
}

/* ── Amber badge for catch-all ────────────────────────── */
.badge-amber {
  background: var(--accent-light);
  color: var(--accent);
}

/* ── Filter tabs ──────────────────────────────────────── */
.ev-filter-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 16px 0;
  border-bottom: 1px solid var(--border);
}
.ev-filter-tab {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 5px;
}
.ev-filter-tab:hover {
  color: var(--text-primary);
}
.ev-filter-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.ev-filter-count {
  font-size: 11px;
  font-weight: 600;
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 99px;
  color: var(--text-muted);
}
.ev-filter-tab.active .ev-filter-count {
  background: var(--accent-light);
  color: var(--accent);
}

/* ============================================================
   MAPS SCRAPER — Advanced search form
   ============================================================ */

.maps-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.maps-form-grid .form-group { margin: 0; }

.maps-advanced-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.15s;
  font-family: inherit;
}
.maps-advanced-toggle:hover,
.maps-advanced-toggle.active { color: var(--accent); }

.maps-advanced-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Tags input */
.maps-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  background: var(--surface);
  cursor: text;
  transition: border-color 0.15s;
}
.maps-tags-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212,100,42,0.08); }

.maps-tags-input {
  border: none;
  outline: none;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-primary);
  background: transparent;
  flex: 1;
  min-width: 100px;
  padding: 2px 0;
}

.maps-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.maps-tag-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
  font-size: 15px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  transition: opacity 0.15s;
}
.maps-tag-remove:hover { opacity: 1; }

.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }


/* ── LinkedIn Scraper — Icypeas Workflow ─────────────────────────────── */

.li-root { display: flex; flex-direction: column; gap: 24px; }

/* 4-step workflow banner */
.li-workflow {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  overflow-x: auto;
}
.li-workflow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.li-workflow-step-active { opacity: 1; }
.li-workflow-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  transition: all 0.2s;
}
.li-workflow-num-active {
  border-color: #D4642A;
  color: #D4642A;
  background: rgba(212,100,42,0.1);
  box-shadow: 0 0 0 4px rgba(212,100,42,0.1);
}
.li-workflow-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.3;
}
.li-workflow-step-active .li-workflow-label { color: var(--text-primary); }
.li-workflow-arrow {
  flex: 1;
  min-width: 24px;
  text-align: center;
  font-size: 18px;
  color: var(--border);
  margin-bottom: 24px;
  user-select: none;
}

/* Drop zone */
.li-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 32px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}
.li-drop-zone:hover,
.li-drop-zone.li-drop-hover {
  border-color: #D4642A;
  background: rgba(212,100,42,0.04);
}
.li-drop-zone.li-drop-done {
  border-color: #22c55e;
  background: rgba(34,197,94,0.04);
}
.li-drop-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(212,100,42,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #D4642A;
}
.li-drop-zone.li-drop-done .li-drop-icon {
  background: rgba(34,197,94,0.12);
  color: #22c55e;
}
.li-drop-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}
.li-drop-browse {
  color: #D4642A;
  text-decoration: underline;
  cursor: pointer;
}
.li-drop-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* Results section */
.li-results-section { display: flex; flex-direction: column; gap: 16px; }
.li-results-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.li-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.li-progress-label {
  font-size: 12px;
  color: var(--text-muted);
}
.li-progress-bar-bg {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.li-progress-bar-fill {
  height: 100%;
  background: #D4642A;
  border-radius: 99px;
  transition: width 0.2s;
}

/* ── AI Copilot Chat Panel ─────────────────────────────────── */
.copilot-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--brand-gradient);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(212,100,42,0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 1000;
  color: #fff;
}
.copilot-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(212,100,42,0.6);
}
.copilot-fab svg { width: 22px; height: 22px; }

.copilot-panel {
  position: fixed;
  top: 0;
  right: -440px;
  width: 440px;
  height: 100vh;
  background: #0f1117;
  border-left: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  z-index: 999;
  transition: right 0.32s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -8px 0 40px rgba(0,0,0,0.5);
}
.copilot-panel.open { right: 0; }

.copilot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.copilot-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.copilot-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #D4642A 0%, #C97D28 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.copilot-icon svg { width: 16px; height: 16px; color: #fff; }
.copilot-title { font-size: 14px; font-weight: 600; color: #e2e8f0; }
.copilot-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.copilot-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.copilot-close:hover { background: rgba(255,255,255,0.07); color: #e2e8f0; }
.copilot-close svg { width: 16px; height: 16px; }

.copilot-modes {
  display: flex;
  gap: 4px;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.copilot-mode-btn {
  flex: 1;
  padding: 7px 0;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.copilot-mode-btn svg { width: 13px; height: 13px; }
.copilot-mode-btn.active {
  background: rgba(201,125,40,0.18);
  border-color: rgba(201,125,40,0.45);
  color: #F5C77A;
}
.copilot-mode-btn:not(.active):hover {
  background: rgba(255,255,255,0.05);
  color: #e2e8f0;
}

.copilot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.copilot-messages::-webkit-scrollbar { width: 4px; }
.copilot-messages::-webkit-scrollbar-track { background: transparent; }
.copilot-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 99px; }

.copilot-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
}
.copilot-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(201,125,40,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.copilot-empty-icon svg { width: 22px; height: 22px; color: #C97D28; }
.copilot-empty h3 { font-size: 14px; font-weight: 600; color: #94a3b8; margin: 0; }
.copilot-empty p { font-size: 12px; margin: 0; line-height: 1.5; }

.copilot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  justify-content: center;
}
.copilot-chip {
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid rgba(201,125,40,0.3);
  background: rgba(201,125,40,0.08);
  color: #F5C77A;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.copilot-chip:hover {
  background: rgba(201,125,40,0.18);
  border-color: rgba(201,125,40,0.55);
}

.copilot-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 92%;
}
.copilot-msg.user { align-self: flex-end; align-items: flex-end; }
.copilot-msg.assistant { align-self: flex-start; align-items: flex-start; }

.copilot-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.copilot-msg.user .copilot-bubble {
  background: linear-gradient(135deg, #D4642A 0%, #C97D28 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.copilot-msg.assistant .copilot-bubble {
  background: rgba(255,255,255,0.06);
  color: #e2e8f0;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255,255,255,0.07);
}
.copilot-bubble p { margin: 0 0 6px 0; }
.copilot-bubble p:last-child { margin-bottom: 0; }
.copilot-bubble ul, .copilot-bubble ol { margin: 4px 0 4px 18px; padding: 0; }
.copilot-bubble li { margin-bottom: 3px; }
.copilot-bubble code {
  background: rgba(0,0,0,0.3);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.copilot-bubble strong { color: #fff; font-weight: 600; }

.copilot-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}
.copilot-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #C97D28;
  animation: copilot-bounce 1.2s infinite;
}
.copilot-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.copilot-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes copilot-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-5px); opacity: 1; }
}

/* Workflow cards */
.copilot-workflow {
  background: rgba(201,125,40,0.07);
  border: 1px solid rgba(201,125,40,0.25);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 6px;
  width: 100%;
  max-width: 380px;
}
.copilot-workflow-header {
  padding: 10px 14px;
  background: rgba(201,125,40,0.12);
  border-bottom: 1px solid rgba(201,125,40,0.2);
  font-size: 12px;
  font-weight: 600;
  color: #F5C77A;
  display: flex;
  align-items: center;
  gap: 7px;
}
.copilot-workflow-header svg { width: 13px; height: 13px; }
.copilot-workflow-steps {
  padding: 8px 0;
}
.copilot-workflow-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  font-size: 12px;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.copilot-workflow-step:last-child { border-bottom: none; }
.copilot-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(201,125,40,0.2);
  color: #F5C77A;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.copilot-step-label { flex: 1; }
.copilot-step-module {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(201,125,40,0.15);
  color: #D4962A;
  white-space: nowrap;
}
.copilot-workflow-footer {
  padding: 10px 14px;
  border-top: 1px solid rgba(201,125,40,0.2);
  display: flex;
  gap: 7px;
}
.copilot-wf-btn {
  flex: 1;
  padding: 7px 0;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  color: var(--text-muted);
  transition: all 0.15s;
}
.copilot-wf-btn.primary {
  background: rgba(201,125,40,0.2);
  border-color: rgba(201,125,40,0.4);
  color: #F5C77A;
}
.copilot-wf-btn:hover { opacity: 0.8; }

.copilot-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.copilot-input-wrap {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 8px 10px;
  transition: border-color 0.15s;
}
.copilot-input-wrap:focus-within {
  border-color: rgba(201,125,40,0.5);
}
.copilot-textarea {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #e2e8f0;
  font-size: 13px;
  resize: none;
  line-height: 1.5;
  max-height: 120px;
  font-family: inherit;
  scrollbar-width: none;
}
.copilot-textarea::placeholder { color: var(--text-muted); }
.copilot-textarea::-webkit-scrollbar { display: none; }
.copilot-send {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #D4642A 0%, #C97D28 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.15s, transform 0.15s;
  color: #fff;
}
.copilot-send:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.copilot-send:not(:disabled):hover { opacity: 0.85; transform: scale(1.05); }
.copilot-send svg { width: 14px; height: 14px; }

/* Sidebar nav AI button */
.nav-item.copilot-nav-btn {
  background: rgba(201,125,40,0.1);
  border: 1px solid rgba(201,125,40,0.25);
  margin-top: 4px;
}
.nav-item.copilot-nav-btn .nav-icon { color: #D4642A; }
.nav-item.copilot-nav-btn:hover {
  background: rgba(201,125,40,0.18);
}

/* ══════════════════════════════════════════════════════════════
   CLAY-STYLE LEADS TABLE  (full Clay.com-inspired redesign)
   ══════════════════════════════════════════════════════════════ */

/* ── Sheet layout ─────────────────────────────────────────── */
.clay-sheet {
  display: flex;
  flex-direction: column;
  margin: -24px;
  height: calc(100vh - 57px); /* viewport minus topbar */
  overflow: hidden;
  background: var(--bg);
}

/* ── Top toolbar ──────────────────────────────────────────── */
.clay-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.clay-toolbar-left  { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.clay-toolbar-right { display: flex; align-items: center; gap: 7px; }
.clay-toolbar-sep   { width: 1px; height: 18px; background: var(--border); margin: 0 2px; flex-shrink: 0; }
.clay-stat-badge {
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  white-space: nowrap;
  cursor: default;
}
.clay-toolbar-icon-btn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--border);
  border-radius: 6px; cursor: pointer;
  color: var(--text-secondary); transition: all 0.15s;
}
.clay-toolbar-icon-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Search bar ───────────────────────────────────────────── */
.clay-search-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-bottom: 1px solid var(--border);
  background: var(--surface); flex-shrink: 0;
}
.clay-search-bar input {
  flex: 1; border: none; background: transparent;
  outline: none; font-size: 13px; color: var(--text-primary);
}
.clay-search-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 16px; padding: 0; line-height: 1;
}

/* ── Enrichment progress bar ─────────────────────────────── */
.clay-enrich-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 14px;
  background: rgba(212,100,42,0.04);
  border-bottom: 1px solid rgba(212,100,42,0.15);
  font-size: 12px; color: var(--text-secondary);
  flex-shrink: 0;
}
.clay-enrich-prog {
  flex: 1; height: 4px; background: var(--border);
  border-radius: 2px; overflow: hidden; min-width: 80px;
}
.clay-enrich-prog-fill {
  height: 100%; background: var(--accent);
  border-radius: 2px; transition: width 0.2s;
}
.clay-enrich-stop {
  background: none; border: 1px solid var(--border); border-radius: 4px;
  padding: 2px 10px; cursor: pointer; font-size: 11px;
  color: var(--text-secondary); white-space: nowrap; flex-shrink: 0;
}
.clay-enrich-stop:hover { border-color: #ef4444; color: #ef4444; }

/* ── Table scroller ───────────────────────────────────────── */
.clay-table-scroller {
  flex: 1;
  overflow: auto;
  position: relative;
}

/* ── Grid table ───────────────────────────────────────────── */
.clay-grid {
  border-collapse: collapse;
  min-width: 100%;
  table-layout: fixed;
}
.clay-grid thead {
  position: sticky; top: 0; z-index: 10;
}

/* Header cells */
.clay-th {
  background: var(--surface);
  border-right: 1px solid var(--border);
  border-bottom: 2px solid var(--border);
  padding: 0; vertical-align: middle;
  white-space: nowrap; user-select: none;
  font-weight: 500;
}
.clay-th-num {
  position: sticky; left: 0; z-index: 12;
  width: 40px; min-width: 40px; text-align: center;
}
.clay-th-cb {
  position: sticky; left: 40px; z-index: 12;
  width: 36px; min-width: 36px; text-align: center;
}
.clay-th-fixed {
  position: sticky; left: 76px; z-index: 11;
}
.clay-th-inner {
  display: flex; align-items: center; gap: 5px;
  padding: 0 10px; height: 40px;
}
.clay-th-icon {
  font-style: normal; font-size: 10px; font-weight: 700;
  color: var(--text-muted); background: var(--surface-hover);
  border: 1px solid var(--border); border-radius: 3px;
  padding: 1px 4px; flex-shrink: 0; line-height: 1.4;
}
.clay-th-label {
  font-size: 12px; font-weight: 500; color: var(--text-primary);
  flex: 1; overflow: hidden; text-overflow: ellipsis;
}
.clay-col-bar {
  height: 3px; margin: 0 10px 6px;
  background: var(--border); border-radius: 2px; overflow: hidden;
}
.clay-col-bar-fill {
  height: 100%; background: var(--accent);
  border-radius: 2px; transition: width 0.4s;
}
.clay-col-run-btn {
  background: none; border: none; cursor: pointer;
  padding: 2px 4px; color: var(--text-muted); font-size: 10px;
  border-radius: 3px; opacity: 0; transition: opacity 0.15s, background 0.15s;
  flex-shrink: 0;
}
.clay-th:hover .clay-col-run-btn { opacity: 1; }
.clay-col-run-btn:hover { background: var(--accent-light); color: var(--accent); }
.clay-col-del-btn {
  background: none; border: none; cursor: pointer;
  padding: 2px 4px; color: var(--text-muted); font-size: 11px;
  border-radius: 3px; opacity: 0; transition: opacity 0.15s, background 0.15s;
  flex-shrink: 0;
}
.clay-th:hover .clay-col-del-btn { opacity: 1; }
.clay-col-del-btn:hover { background: rgba(239,68,68,0.1); color: #ef4444; }

/* Data rows */
.clay-td {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0; height: 36px; overflow: hidden;
  vertical-align: middle; font-size: 13px;
  position: relative;
}
.clay-td-num {
  position: sticky; left: 0; z-index: 3;
  background: var(--surface);
  width: 40px; min-width: 40px; text-align: center;
  font-size: 11px; color: var(--text-muted);
  cursor: default;
}
.clay-td-num:hover { color: var(--accent); cursor: pointer; }
.clay-td-cb {
  position: sticky; left: 40px; z-index: 3;
  background: var(--surface);
  width: 36px; min-width: 36px; text-align: center;
}
.clay-td-fixed {
  position: sticky; left: 76px; z-index: 2;
  background: var(--bg);
}
.clay-row { background: var(--bg); }
.clay-row:hover .clay-td            { background: var(--surface-hover); }
.clay-row:hover .clay-td-num,
.clay-row:hover .clay-td-cb,
.clay-row:hover .clay-td-fixed      { background: var(--surface-hover); }
.clay-row.clay-selected .clay-td    { background: rgba(212,100,42,0.04); }
.clay-row.clay-selected .clay-td-num,
.clay-row.clay-selected .clay-td-cb,
.clay-row.clay-selected .clay-td-fixed { background: rgba(212,100,42,0.06); }
.clay-spacer td { border: none; padding: 0; }

/* Cell inner */
.clay-cell {
  display: flex; align-items: center;
  height: 36px; padding: 0 10px; gap: 6px; overflow: hidden;
}
.clay-cell-text {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-primary); font-size: 13px;
}
.clay-cell-empty .clay-cell-text { color: var(--border); }
.clay-cell-url { cursor: pointer; }
.clay-cell-url .clay-cell-text { color: var(--accent); text-decoration: underline; }

/* Status dot (Clay's green dot / warning triangle) */
.clay-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.clay-dot-complete,  .clay-dot-valid   { background: #22c55e; }
.clay-dot-warning,   .clay-dot-risky   { background: #f59e0b; border-radius: 2px; }
.clay-dot-failed,    .clay-dot-invalid { background: #ef4444; }
.clay-dot-pending    { background: var(--border); }
.clay-dot-processing { background: var(--accent); animation: clay-pulse 1s infinite; }
@keyframes clay-pulse { 0%,100%{opacity:1;} 50%{opacity:0.3;} }

/* Status badge pill */
.clay-status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 500;
}
.clay-status-pill.valid   { background: rgba(34,197,94,0.12);  color: #16a34a; }
.clay-status-pill.invalid { background: rgba(239,68,68,0.12);  color: #dc2626; }
.clay-status-pill.risky   { background: rgba(245,158,11,0.12); color: #d97706; }
.clay-status-pill.unknown { background: rgba(156,163,175,0.1); color: #6b7280; }

/* Cell inline edit */
.clay-td.clay-editing { z-index: 20; }
.clay-cell-input {
  position: absolute; inset: 0;
  border: 2px solid var(--accent);
  padding: 0 10px; font-size: 13px;
  font-family: inherit;
  background: var(--bg); color: var(--text-primary);
  outline: none; z-index: 20;
}
.clay-cell-loading {
  display: flex; align-items: center;
  height: 36px; padding: 0 10px; gap: 6px;
  color: var(--text-muted); font-size: 12px;
}
@keyframes clay-cell-flash {
  0%  { background: rgba(34,197,94,0.15); }
  100%{ background: transparent; }
}
.clay-cell-flash-anim { animation: clay-cell-flash 0.5s ease-out; }

/* ── + Add column ─────────────────────────────────────────── */
.clay-addcol-th {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  min-width: 150px; width: 150px;
}
.clay-addcol-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px; height: 40px;
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: var(--text-muted);
  white-space: nowrap; width: 100%;
  transition: background 0.15s, color 0.15s;
}
.clay-addcol-btn:hover { background: var(--surface-hover); color: var(--accent); }

/* ── Add column dropdown ──────────────────────────────────── */
.clay-addcol-dd {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
  z-index: 500;
  min-width: 260px;
  max-height: 520px;
  overflow-y: auto;
  padding: 6px 0;
}
.clay-addcol-section-title {
  font-size: 10px; font-weight: 700;
  color: var(--text-muted); letter-spacing: 0.07em;
  text-transform: uppercase; padding: 8px 14px 3px;
}
.clay-addcol-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 14px; background: none; border: none;
  cursor: pointer; width: 100%; text-align: left;
  color: var(--text-primary); font-size: 13px;
  transition: background 0.1s;
}
.clay-addcol-item:hover { background: var(--surface-hover); }
.clay-addcol-item.disabled { opacity: 0.4; pointer-events: none; }
.clay-addcol-icon {
  font-size: 13px; width: 26px; text-align: center; flex-shrink: 0;
}
.clay-addcol-item-body { display: flex; flex-direction: column; gap: 1px; }
.clay-addcol-label { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.clay-addcol-desc  { font-size: 11px; color: var(--text-muted); }
.clay-addcol-soon  {
  display: inline-block; background: var(--surface-hover);
  border: 1px solid var(--border); border-radius: 3px;
  padding: 1px 5px; font-size: 10px; color: var(--text-muted); margin-left: 6px;
}
.clay-addcol-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ── Enrichment panel ─────────────────────────────────────── */
.clay-ep-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); z-index: 600;
}
.clay-ep {
  position: fixed; right: 0; top: 0; bottom: 0;
  width: 380px; background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 601; display: flex; flex-direction: column;
  box-shadow: -12px 0 40px rgba(0,0,0,0.2);
}
@keyframes clay-slide-right {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
.clay-ep.open { animation: clay-slide-right 0.2s ease-out; }

.clay-ep-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.clay-ep-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.clay-ep-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 18px; padding: 0; line-height: 1;
}

.clay-ep-search-wrap {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.clay-ep-search {
  flex: 1; border: none; background: transparent;
  font-size: 13px; color: var(--text-primary); outline: none;
}

.clay-ep-tabs {
  display: flex; gap: 4px; padding: 8px 14px;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.clay-ep-tab {
  padding: 4px 12px; border: none; border-radius: 20px;
  font-size: 12px; cursor: pointer; background: none;
  color: var(--text-secondary); transition: all 0.15s;
}
.clay-ep-tab:hover { background: var(--surface-hover); }
.clay-ep-tab.active { background: var(--accent-light); color: var(--accent); font-weight: 500; }

.clay-ep-list { flex: 1; overflow-y: auto; padding: 6px 0; }

.clay-ep-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px; cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid var(--border);
}
.clay-ep-card:last-child { border-bottom: none; }
.clay-ep-card:hover { background: var(--surface-hover); }

.clay-ep-card-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.clay-ep-icon-email   { background: rgba(212,100,42,0.1);  color: var(--accent); }
.clay-ep-icon-ai      { background: rgba(212,100,42,0.1);  color: #D4642A; }
.clay-ep-icon-company { background: rgba(34,197,94,0.1);   color: #16a34a; }

.clay-ep-card-body  { flex: 1; min-width: 0; }
.clay-ep-card-name  { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.clay-ep-card-desc  { font-size: 12px; color: var(--text-secondary); line-height: 1.4; margin-bottom: 6px; }
.clay-ep-card-footer { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.clay-ep-badge {
  background: var(--surface-hover); border: 1px solid var(--border);
  border-radius: 3px; padding: 1px 6px; font-size: 10px; color: var(--text-muted);
}
.clay-ep-cost { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.clay-ep-empty { padding: 32px 16px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ── Column config modal ──────────────────────────────────── */
.clay-config-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 700; display: flex; align-items: center; justify-content: center;
}
.clay-config-modal {
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  width: 480px; max-width: 92vw; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
  animation: clay-pop-in 0.15s ease-out;
}
@keyframes clay-pop-in {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.clay-config-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 14px; border-bottom: 1px solid var(--border);
}
.clay-config-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.clay-config-close { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 18px; }

.clay-config-provider-info {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.clay-config-provider-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.clay-config-provider-meta { flex: 1; }
.clay-config-provider-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.clay-config-provider-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.clay-config-cost {
  font-size: 11px; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px; padding: 2px 8px;
}

.clay-config-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.clay-config-field { display: flex; flex-direction: column; gap: 5px; }
.clay-config-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.clay-config-select, .clay-config-input {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 7px 10px; font-size: 13px; font-family: inherit;
  color: var(--text-primary); background: var(--bg); outline: none;
  transition: border-color 0.15s;
}
.clay-config-select:focus, .clay-config-input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212,100,42,0.08);
}
.clay-config-textarea {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 10px; font-size: 13px; font-family: monospace;
  color: var(--text-primary); background: var(--bg); outline: none;
  resize: vertical; min-height: 80px; transition: border-color 0.15s; width: 100%;
}
.clay-config-textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212,100,42,0.08);
}
.clay-config-hint { font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.clay-config-token-hints {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px;
}
.clay-config-token {
  background: var(--surface-hover); border: 1px solid var(--border);
  border-radius: 3px; padding: 2px 6px; font-size: 11px;
  font-family: monospace; color: var(--text-secondary); cursor: pointer;
}
.clay-config-token:hover { border-color: var(--accent); color: var(--accent); }
.clay-config-footer {
  padding: 14px 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* ── Bottom bar ───────────────────────────────────────────── */
.clay-bottom-bar {
  display: flex; align-items: center; height: 38px;
  border-top: 1px solid var(--border);
  background: var(--surface); flex-shrink: 0;
}
.clay-bottom-tabs { display: flex; align-items: stretch; }
.clay-table-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 0 16px; height: 38px; background: var(--bg);
  border: none; border-right: 1px solid var(--border);
  cursor: pointer; font-size: 12px; color: var(--text-primary);
  font-weight: 500; transition: background 0.15s;
}
.clay-table-tab:hover { background: var(--surface-hover); }
.clay-add-table-btn {
  display: flex; align-items: center; padding: 0 14px; height: 38px;
  background: none; border: none; border-right: 1px solid var(--border);
  cursor: pointer; font-size: 12px; color: var(--text-muted); transition: color 0.15s;
}
.clay-add-table-btn:hover { color: var(--accent); }
.clay-bottom-status {
  flex: 1; padding: 0 16px; font-size: 11px;
  color: var(--text-muted); text-align: center;
}
.clay-bottom-right { display: flex; align-items: stretch; }
.clay-bottom-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 0 14px; height: 38px; background: none; border: none;
  border-left: 1px solid var(--border); cursor: pointer;
  font-size: 12px; color: var(--text-muted); transition: color 0.15s;
}
.clay-bottom-btn:hover { color: var(--accent); }

/* ── Empty state ──────────────────────────────────────────── */
.clay-empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 300px; gap: 12px;
  color: var(--text-muted); font-size: 14px; text-align: center; padding: 40px;
}
.clay-empty-state h3 { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin: 0; }
.clay-empty-state p  { margin: 0; font-size: 13px; }

/* ============================================================
   ALL TABLES VIEW
   ============================================================ */

.at-root {
  display: flex;
  flex-direction: column;
  padding: 0;
  max-width: 1200px;
  width: 100%;
}

.at-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.at-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.at-new-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.at-new-btn:hover { background: var(--accent-hover); }

/* ── Cards grid ── */
.at-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.at-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
  position: relative;
}
.at-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #c8cbdc;
}

.at-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.at-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.at-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.at-card-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.at-meta-sep { color: var(--border); }

.at-card-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── ⋯ menu ── */
.at-card-menu-wrap { position: relative; }

.at-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
  transition: background 0.1s, color 0.1s;
}
.at-menu-btn:hover { background: var(--bg); color: var(--text-primary); }

.at-menu-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 50;
  min-width: 140px;
  overflow: hidden;
}
.at-menu-dropdown.open { display: block; }

.at-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  font-family: inherit;
  text-align: left;
  transition: background 0.1s;
}
.at-menu-item:hover { background: var(--bg); }
.at-menu-item.at-menu-danger { color: var(--danger); }
.at-menu-item.at-menu-danger:hover { background: var(--danger-light); }

/* ── Empty state ── */
.at-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  gap: 12px;
  text-align: center;
}

.at-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.at-empty-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.at-import-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  margin-top: 8px;
  transition: background 0.15s;
}
.at-import-btn:hover { background: var(--accent-hover); }

/* ── Back button in clay-table topbar ── */
.ct-back-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px 0 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.1s, color 0.1s;
  white-space: nowrap;
}

/* ============================================================
   DASHBOARD — home screen
   ============================================================ */

.dash-root {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  min-height: calc(100vh - var(--gnav-height) - 64px);
  justify-content: center;
}

/* ── Top: actions + stats ── */

.dash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

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

.dash-act-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
  white-space: nowrap;
}
.dash-act-btn:hover {
  background: #f8f9fb;
  border-color: #d0d5dd;
  color: var(--text-primary);
}
#da-new {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
#da-new:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.dash-stats-row {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #ffffff;
}

.dash-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 20px;
  border-right: 1px solid var(--border);
  min-width: 90px;
}
.dash-stat:last-child { border-right: none; }

.ds-num {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.ds-lbl {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
}

/* ── Body: tables grid + activity ── */

.dash-body {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  min-height: 0;
}

.dash-tables-col {
  flex: 1;
  min-width: 0;
}

.dash-activity-col {
  width: 240px;
  flex-shrink: 0;
}

.dash-col-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.dash-col-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dash-col-count {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Table cards grid ── */

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

.dash-tc {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s;
  position: relative;
}
.dash-tc:hover {
  border-color: #c8cdd8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dash-tc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.dash-tc-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-light);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.dash-tc-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-tc-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.dash-tc-bar-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-tc-bar {
  flex: 1;
  height: 4px;
  background: var(--border-light);
  border-radius: 99px;
  overflow: hidden;
}

.dash-tc-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.3s ease;
}

.dash-tc-pct {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.dash-tc-empty-hint {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

/* New table card (dashed add button) */
.dash-tc-new {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-style: dashed;
  border-color: #d4d8e2;
  color: var(--text-muted);
  font-size: 12px;
  min-height: 100px;
  background: #fafbfd;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.dash-tc-new:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.dash-tc-new svg { opacity: 0.6; }
.dash-tc-new:hover svg { opacity: 1; }

/* ── Activity feed ── */

.dash-act-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dash-act-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}
.dash-act-row:last-child { border-bottom: none; }

.dash-act-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 1px;
}
.dash-act-dot.created { background: var(--accent-light); color: var(--accent); }
.dash-act-dot.opened  { background: var(--success-light); color: var(--success); }
.dash-act-dot.imported { background: var(--warning-light); color: var(--warning); }

.dash-act-body {
  min-width: 0;
  flex: 1;
}

.dash-act-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.dash-act-desc strong {
  color: var(--text-primary);
  font-weight: 500;
}

.dash-act-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.dash-act-empty {
  font-size: 12px;
  color: var(--text-muted);
  padding: 16px 0;
  text-align: center;
}

/* ── Empty state ── */

.dash-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 80px 24px;
  text-align: center;
}

.dash-empty-h {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.dash-empty-p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 380px;
  line-height: 1.5;
}

.dash-empty-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.dash-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.dash-cta-btn:hover { background: var(--accent-hover); }

.dash-cta-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 20px;
  background: #ffffff;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}
.dash-cta-btn-ghost:hover {
  background: #f8f9fb;
  border-color: #d0d5dd;
  color: var(--text-primary);
}
.ct-back-btn:hover { background: var(--bg); color: var(--text-primary); }

/* ============================================================
   HOME PAGE REDESIGN — new components
   ============================================================ */

/* ── Nav: home button (logo + brand) ── */

.gnav-home-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.gnav-home-btn:hover .gnav-brand {
  color: var(--accent);
}

/* ── Hero / welcome area ── */

.dash-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding-top: 8px;
}

.dash-hero-left {}

.dash-hero-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.dash-hero-sub {
  font-size: 15px;
  color: var(--text-secondary);
}

.dash-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Modules grid ── */

.dash-modules-section {
  flex: 1;
  display: flex;
  align-items: center;
}

.dash-modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}

.module-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  min-height: 210px;
  border-radius: 14px;
  padding: 28px 20px;
  cursor: pointer;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.module-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
}

/* ── Color variants ── */
.module-card.mod-orange {
  background: #FFF8F1;
  border: 1px solid #F9D4A8;
}
.module-card.mod-orange:hover {
  background: #FFF3E6;
  border-color: #F5C080;
}

.module-card.mod-green {
  background: #F0FDF4;
  border: 1px solid #A7F3D0;
}
.module-card.mod-green:hover {
  background: #E8FBF0;
  border-color: #6EE7B7;
}

.module-card.mod-emerald {
  background: #EFFEFA;
  border: 1px solid #99F6E4;
}
.module-card.mod-emerald:hover {
  background: #E0FDF6;
  border-color: #5EEAD4;
}

.module-card.mod-rose {
  background: #FFF5F3;
  border: 1px solid #FECACA;
}
.module-card.mod-rose:hover {
  background: #FFF0EC;
  border-color: #FCA5A5;
}

.module-card.mod-blue {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
}
.module-card.mod-blue:hover {
  background: #E8F1FF;
  border-color: #93C5FD;
}

.module-card.mod-purple {
  background: #F5F3FF;
  border: 1px solid #DDD6FE;
}
.module-card.mod-purple:hover {
  background: #EDE9FE;
  border-color: #C4B5FD;
}

.module-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.module-card-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.module-card-desc {
  font-size: 13px;
  color: #6B7280;
  line-height: 1.4;
}

.module-card-badge {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 20px;
  padding: 4px 12px;
  white-space: nowrap;
  margin-top: 2px;
}

/* ── Tables section empty state ── */

.dash-tables-empty {
  padding: 24px 0 8px;
}

.dash-tables-empty p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Override: activity col to flex proportionally ── */

.dash-activity-col {
  width: auto;
  flex: 2;
  min-width: 200px;
}

.dash-tables-col {
  flex: 3;
}

/* ============================================================
   INSTANTLY INTEGRATION — shared components
   ============================================================ */

/* Connection status dot */
.instantly-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.instantly-dot.connected    { background: #22C55E; }
.instantly-dot.disconnected { background: #D1D5DB; }

/* ============================================================
   CLIENTS PAGE
   ============================================================ */

.cl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  padding: 0 24px 24px;
}
.cl-loading, .cl-empty {
  grid-column: 1 / -1;
  padding: 48px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.cl-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cl-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-color: #D1D5DB;
}
.cl-card-new {
  border: 1.5px dashed #D1D5DB;
  background: #FAFAFA;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  min-height: 100px;
}
.cl-card-new:hover { border-color: #9CA3AF; color: var(--text-secondary); }
.cl-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.cl-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.cl-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 4px;
  align-items: center;
}
.cl-card-sep { opacity: 0.4; }
.cl-card-notes {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.cl-card-footer {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.cl-btn-edit, .cl-btn-test, .cl-btn-delete {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 0.12s;
}
.cl-btn-edit:hover, .cl-btn-test:hover { background: #F3F4F6; }
.cl-btn-delete { color: #DC2626; }
.cl-btn-delete:hover { background: #FEF2F2; border-color: #FECACA; }
.cl-btn-reply-cfg {
  font-size: 11px; padding: 3px 9px; border-radius: 5px;
  border: 1px solid var(--border); background: #fff; cursor: pointer; color: var(--text-secondary); transition: background 0.12s;
}
.cl-btn-reply-cfg:hover { background: #F3F4F6; }

/* Enhanced client card elements */
.cl-card-name-row {
  display: flex; align-items: center; gap: 8px;
}
.cl-card-icon { font-size: 18px; }
.cl-card-connection {
  font-size: 12px; font-weight: 500;
}
.cl-card-connection.connected { color: #16A34A; }
.cl-card-connection.disconnected { color: #9CA3AF; }
.cl-card-date {
  font-size: 11px; color: var(--text-muted);
}

/* ============================================================
   CLIENT WORKSPACE PAGE
   ============================================================ */

.cw-page {
  display: flex; flex-direction: column; height: 100%;
}
.cw-loading {
  padding: 48px; text-align: center; color: var(--text-muted); font-size: 14px;
}
.cw-header {
  padding: 20px 24px 0;
}
.cw-back {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--text-muted); cursor: pointer;
  border: none; background: none; padding: 0; margin-bottom: 12px;
  transition: color 0.12s;
}
.cw-back:hover { color: var(--text-primary); }
.cw-title-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.cw-icon { font-size: 24px; }
.cw-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700; color: var(--text-primary); margin: 0;
}
.cw-connection {
  font-size: 12px; font-weight: 500; padding: 3px 10px;
  border-radius: 20px;
}
.cw-connection.connected {
  color: #16A34A; background: #F0FDF4; border: 1px solid #BBF7D0;
}
.cw-connection.disconnected {
  color: #9CA3AF; background: #F9FAFB; border: 1px solid #E5E7EB;
}
.cw-actions {
  display: flex; gap: 8px; margin-bottom: 0;
}
.cw-action-btn {
  font-size: 12px !important; display: inline-flex; align-items: center; gap: 6px;
}

/* Tabs */
.cw-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  padding: 0 24px; margin-top: 16px;
}
.cw-tab {
  padding: 10px 16px; font-size: 13px; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  border: none; background: none; border-bottom: 2px solid transparent;
  transition: color 0.12s, border-color 0.12s;
}
.cw-tab:hover { color: var(--text-primary); }
.cw-tab.active {
  color: var(--text-primary); border-bottom-color: var(--accent);
}

/* Content area */
.cw-content {
  flex: 1; overflow-y: auto; padding: 20px 24px;
}
.cw-empty {
  padding: 32px; text-align: center; color: var(--text-muted); font-size: 13px;
  background: #FAFAFA; border-radius: 8px; border: 1px dashed var(--border);
}
.cw-loading-inline {
  padding: 20px; text-align: center; color: var(--text-muted); font-size: 13px;
}

/* Overview stats */
.cw-stat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px; margin-bottom: 24px;
}
.cw-stat-card {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 16px; display: flex; flex-direction: column; gap: 4px;
}
.cw-stat-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
}
.cw-stat-value {
  font-size: 22px; font-weight: 700; color: var(--text-primary);
}
.cw-stat-value.text-green { color: #16A34A; font-size: 16px; }
.cw-stat-value.text-muted { color: #9CA3AF; font-size: 16px; }
.cw-stat-detail {
  font-size: 11px; color: var(--text-muted);
}

.cw-section { margin-bottom: 20px; }
.cw-section-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 10px;
}
.cw-detail-grid {
  display: flex; flex-direction: column; gap: 6px;
}
.cw-detail {
  display: flex; gap: 8px; font-size: 13px;
}
.cw-detail-label {
  font-weight: 600; color: var(--text-muted); min-width: 80px;
}

/* Campaigns list */
.cw-campaign-list {
  display: flex; flex-direction: column; gap: 0;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.cw-campaign-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid #F3F4F6;
  font-size: 13px;
}
.cw-campaign-row:last-child { border-bottom: none; }
.cw-campaign-name { font-weight: 500; color: var(--text-primary); font-size: 13px; }
.cw-campaign-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.cw-campaign-status {
  font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 10px; white-space: nowrap; flex-shrink: 0;
}
.cw-status-active    { background: #DCFCE7; color: #166534; }
.cw-status-paused    { background: #FEF9C3; color: #854D0E; }
.cw-status-completed { background: #DBEAFE; color: #1E40AF; }
.cw-status-draft     { background: #F3F4F6; color: #6B7280; }

/* Replies list */
.cw-reply-list {
  display: flex; flex-direction: column; gap: 0;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.cw-reply-row {
  padding: 12px 16px; border-bottom: 1px solid #F3F4F6;
  cursor: pointer; transition: background 0.1s;
}
.cw-reply-row:last-child { border-bottom: none; }
.cw-reply-row:hover { background: #FAFAFA; }
.cw-reply-header {
  display: flex; justify-content: space-between; margin-bottom: 2px;
}
.cw-reply-from { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.cw-reply-date { font-size: 11px; color: var(--text-muted); }
.cw-reply-subject { font-size: 13px; color: var(--text-primary); margin-bottom: 2px; }
.cw-reply-snippet { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.cw-reply-footer {
  display: flex; gap: 8px; margin-top: 6px; align-items: center;
}
.cw-reply-cat {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  padding: 2px 6px; border-radius: 3px;
}
.cw-cat-positive { background: #DCFCE7; color: #166534; }
.cw-cat-negative { background: #FEF2F2; color: #991B1B; }
.cw-cat-ooo      { background: #FEF9C3; color: #854D0E; }
.cw-cat-other    { background: #F3F4F6; color: #6B7280; }
.cw-reply-status { font-size: 11px; color: var(--text-muted); }

/* Settings tab */
.cw-settings { max-width: 600px; }

/* Reply handler wrapper inside client workspace */
.rh-wrapper {
  display: flex;
  height: calc(100vh - 200px);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.rh-wrapper .rh-left {
  width: 320px;
  min-width: 280px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: #FAFAFA;
}
.rh-wrapper .rh-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
}

/* Reply detail in workspace */
.rh-detail {
  display: flex; flex-direction: column; height: 100%; overflow-y: auto;
}
.rh-detail-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.rh-detail-name { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.rh-detail-email { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.rh-detail-cat {
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 12px;
  text-transform: capitalize;
}
.rh-detail-conf { font-size: 11px; color: var(--text-muted); }
.rh-detail-campaign { font-size: 12px; color: var(--text-muted); padding: 0 20px 8px; }
.rh-detail-section {
  padding: 14px 20px; border-bottom: 1px solid #F3F4F6;
}
.rh-detail-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.rh-detail-subject {
  font-size: 13px; font-weight: 500; color: var(--text-primary); margin-bottom: 6px;
}
.rh-detail-body {
  font-size: 13px; line-height: 1.6; color: var(--text-primary);
  background: #F9FAFB; border: 1px solid #E5E7EB; border-radius: 8px;
  padding: 14px 16px; white-space: pre-wrap;
}
.rh-draft-textarea {
  width: 100%; min-height: 100px; border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px; font-size: 13px; line-height: 1.6;
  font-family: inherit; resize: vertical; color: var(--text-primary);
}
.rh-draft-textarea:focus { outline: none; border-color: var(--brand-orange); }
.rh-draft-status { font-size: 11px; font-weight: 400; }
.rh-detail-actions {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px; border-top: 1px solid var(--border); margin-top: auto;
  background: #FAFAFA;
}
.rh-actions-left, .rh-actions-right { display: flex; gap: 8px; }

/* Reply item in list */
.rh-item {
  padding: 10px 14px; border-bottom: 1px solid #F3F4F6; cursor: pointer;
  transition: background 0.1s;
}
.rh-item:hover { background: #F3F4F6; }
.rh-item.selected { background: var(--brand-cream); border-left: 3px solid var(--accent); }
.rh-item-top { display: flex; justify-content: space-between; margin-bottom: 2px; }
.rh-item-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.rh-item-time { font-size: 11px; color: var(--text-muted); }
.rh-item-cat {
  font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 3px;
  display: inline-block; margin-bottom: 2px; text-transform: capitalize;
}
.rh-item-preview { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* Overview recent replies */
.cw-recent-list {
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.cw-recent-item {
  padding: 10px 14px; border-bottom: 1px solid #F3F4F6;
}
.cw-recent-item:last-child { border-bottom: none; }
.cw-recent-top { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.cw-recent-name { font-size: 13px; font-weight: 600; }
.cw-recent-time { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.cw-recent-text { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.cw-cat-badge {
  font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 3px;
  text-transform: capitalize;
}
.cw-cat-positive, .cw-cat-interested { background: #D1FAE5; color: #065F46; }
.cw-cat-negative, .cw-cat-not_interested { background: #FEE2E2; color: #991B1B; }
.cw-cat-question { background: #DBEAFE; color: #1E40AF; }
.cw-cat-ooo, .cw-cat-out_of_office { background: #E0E7FF; color: #3730A3; }
.cw-cat-objection { background: #FEF3C7; color: #92400E; }
.cw-cat-other { background: #F3F4F6; color: #6B7280; }

/* Settings — scenario cards */
.cs-scenario-card {
  border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px;
  overflow: hidden;
}
.cs-scenario-header {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  cursor: pointer;
}
.cs-scenario-badge {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px;
  text-transform: capitalize; flex-shrink: 0;
}
.cs-scenario-desc {
  font-size: 13px; color: var(--text-secondary); flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cs-scenario-body {
  display: none; padding: 12px 14px; border-top: 1px solid #F3F4F6;
  background: #FAFAFA;
}
.cs-scenario-card.expanded .cs-scenario-body { display: block; }

/* Add/Edit client modal */
.cl-modal { max-width: 520px; width: 90vw; }
.cl-radio-group { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.cl-radio-label {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: var(--text-secondary); cursor: pointer;
}
.cl-radio-label input[type="radio"] { margin-top: 2px; accent-color: #2563EB; cursor: pointer; }

/* ============================================================
   SEND TO INSTANTLY MODAL
   ============================================================ */

.si-modal {
  max-width: 500px;
  width: 94vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.si-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.si-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.si-section:last-child { border-bottom: none; }
.si-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.si-section-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.si-connected {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #16A34A;
  font-weight: 500;
}
.si-connected strong {
  color: var(--text-primary);
}
.si-map-table { display: flex; flex-direction: column; gap: 6px; }
.si-map-header {
  display: grid;
  grid-template-columns: 1fr 24px 120px;
  gap: 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 2px;
}
.si-map-row {
  display: grid;
  grid-template-columns: 1fr 24px 120px;
  gap: 8px;
  align-items: center;
}
.si-map-arrow {
  text-align: center;
  color: #9CA3AF;
  font-size: 13px;
}
.si-map-field {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Custom variable toggles */
.si-cv-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  cursor: pointer;
  padding: 3px 0;
}
.si-cv-label input[type="checkbox"] {
  accent-color: #0066FF;
  cursor: pointer;
}
.si-cv-col {
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.si-cv-arrow {
  color: #9CA3AF;
  flex-shrink: 0;
}
.si-cv-tag {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: #6B7280;
  background: #F3F4F6;
  padding: 1px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Progress bar */
.si-progress-bar {
  width: 100%;
  height: 6px;
  background: #E5E7EB;
  border-radius: 3px;
  overflow: hidden;
}
.si-progress-fill {
  height: 100%;
  width: 0%;
  background: #0066FF;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Export button branded */
.si-export-btn {
  background: #0066FF !important;
  border-color: #0066FF !important;
}
.si-export-btn:hover:not(:disabled) {
  background: #0052CC !important;
}

/* Manage workspaces panel */
.si-manage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #F3F4F6;
}
.si-manage-row:last-child { border-bottom: none; }

/* Instantly Status cell pills */
.clay-instantly-sent,
.clay-instantly-exported { background: #DCFCE7; color: #166534; display:inline-flex; padding: 2px 7px; border-radius: 3px; font-size: 11px; font-weight: 500; }
.clay-instantly-skipped  { background: #F3F4F6; color: #6B7280; display:inline-flex; padding: 2px 7px; border-radius: 3px; font-size: 11px; font-weight: 500; }
.clay-instantly-error    { background: #FEF2F2; color: #DC2626; display:inline-flex; padding: 2px 7px; border-radius: 3px; font-size: 11px; font-weight: 500; }

/* ============================================================
   SHARED MODAL SYSTEM
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s;
}
.modal-overlay-visible { opacity: 1; }
.modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.modal-close {
  width: 28px; height: 28px;
  border: none; background: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: background 0.12s;
}
.modal-close:hover { background: #F3F4F6; color: var(--text-primary); }
.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* Settings Instantly section */
.btn-primary {
  background: #2563EB;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.12s;
}
.btn-primary:hover:not(:disabled) { background: #1D4ED8; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
  background: #fff;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.12s;
}
.btn-secondary:hover:not(:disabled) { background: #F9FAFB; }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }
.form-required { color: #DC2626; }

/* ============================================================
   REPLY HANDLER — split-pane inbox
   ============================================================ */

.rh-stats {
  display: flex;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: #FAFAFA;
  flex-shrink: 0;
}
.rh-stat {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.rh-stat b {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
}

.rh-container {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Left panel — reply list */
.rh-left {
  width: 340px;
  min-width: 340px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: #fff;
}
.rh-left-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rh-left-title {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rh-badge {
  background: var(--brand-orange);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}
.rh-filters {
  display: flex;
  gap: 6px;
  align-items: center;
}
.rh-filters select {
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
}
.rh-status-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.rh-tab {
  flex: 1;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.rh-tab:hover { color: var(--text-secondary); background: #FAFAFA; }
.rh-tab.active {
  color: var(--brand-orange);
  border-bottom-color: var(--brand-orange);
  font-weight: 600;
}
.rh-list {
  flex: 1;
  overflow-y: auto;
}
.rh-list-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
}
.rh-item {
  padding: 10px 14px;
  border-bottom: 1px solid #F3F4F6;
  cursor: pointer;
  transition: background 0.1s;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rh-item:hover { background: #FAFAFA; }
.rh-item.active { background: var(--brand-cream-light); border-left: 3px solid var(--brand-orange); }
.rh-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.rh-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.rh-item-time {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.rh-item-delete {
  background: none; border: none; cursor: pointer; color: #9CA3AF;
  font-size: 16px; line-height: 1; padding: 0 2px; border-radius: 3px;
  opacity: 0; transition: opacity 0.15s, color 0.15s;
}
.rh-item:hover .rh-item-delete { opacity: 1; }
.rh-item-delete:hover { color: #DC2626; }
.rh-item-client {
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rh-client-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rh-item-preview {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Classification badges */
.rh-class-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.rh-class-badge.interested       { background: #D1FAE5; color: #065F46; }
.rh-class-badge.not_interested   { background: #F3F4F6; color: #6B7280; }
.rh-class-badge.question         { background: #DBEAFE; color: #1E40AF; }
.rh-class-badge.objection        { background: #FEF3C7; color: #92400E; }
.rh-class-badge.wrong_person     { background: #FDE68A; color: #78350F; }
.rh-class-badge.phone_only       { background: #FFEDD5; color: #C2410C; }
.rh-class-badge.unsubscribe      { background: #FEE2E2; color: #991B1B; }
.rh-class-badge.out_of_office    { background: #E0E7FF; color: #3730A3; }
.rh-class-badge.other            { background: #F3F4F6; color: #6B7280; }
.rh-class-badge.pending          { background: #FEF3C7; color: #92400E; }

/* Right panel — reply detail */
.rh-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
}
.rh-right-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  flex-direction: column;
  gap: 8px;
}
.rh-detail-top {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.rh-detail-lead {
  font-size: 15px;
  font-weight: 600;
}
.rh-detail-email {
  font-size: 12px;
  color: var(--text-muted);
}
.rh-detail-client-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  color: #fff;
}
.rh-detail-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}
.rh-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.rh-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rh-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rh-reply-box {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
}
.rh-lead-ctx {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.rh-ctx-item {
  font-size: 12px;
}
.rh-ctx-item label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 2px;
}
.rh-draft-area {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
  color: var(--text-primary);
  background: #fff;
  transition: border-color 0.15s;
}
.rh-draft-area:focus {
  outline: none;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(212,100,42,0.1);
}
.rh-draft-failed {
  color: var(--danger);
  font-size: 13px;
  font-style: italic;
}
.rh-draft-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.rh-regen-btn, .rh-regen-as-btn {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
}
.rh-regen-btn:hover, .rh-regen-as-btn:hover { background: #F9FAFB; }

/* Action bar (sticky bottom) */
.rh-action-bar {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FAFAFA;
  flex-shrink: 0;
}
.rh-action-left, .rh-action-right {
  display: flex;
  gap: 8px;
  align-items: center;
}
.rh-btn-skip, .rh-btn-archive {
  font-size: 12px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
}
.rh-btn-skip:hover, .rh-btn-archive:hover { background: #F3F4F6; }
.rh-btn-send {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  border: none;
  border-radius: 7px;
  background: #2563EB;
  color: #fff;
  cursor: pointer;
  transition: background 0.12s;
}
.rh-btn-send:hover:not(:disabled) { background: #1D4ED8; }
.rh-btn-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================
   REPLY CONFIG — client reply profile editor
   ============================================================ */

.rc-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.rc-back {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 0;
}
.rc-back:hover { color: var(--brand-orange); }
.rc-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rc-section-title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rc-field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rc-field input, .rc-field select, .rc-field textarea {
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: inherit;
  color: var(--text-primary);
  background: #fff;
  transition: border-color 0.15s;
}
.rc-field input:focus, .rc-field select:focus, .rc-field textarea:focus {
  outline: none;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(212,100,42,0.1);
}
.rc-field textarea {
  resize: vertical;
  min-height: 60px;
}

/* Scenario cards */
.rc-scenario {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.rc-scenario-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  background: #FAFAFA;
  border-bottom: 1px solid transparent;
  transition: background 0.1s;
  gap: 8px;
}
.rc-scenario-header:hover { background: #F3F4F6; }
.rc-scenario.open .rc-scenario-header { border-bottom-color: var(--border); }
.rc-scenario-name {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rc-scenario-chevron {
  transition: transform 0.2s;
  color: var(--text-muted);
  flex-shrink: 0;
}
.rc-scenario.open .rc-scenario-chevron { transform: rotate(90deg); }
.rc-scenario-body {
  display: none;
  padding: 14px;
  flex-direction: column;
  gap: 12px;
}
.rc-scenario.open .rc-scenario-body { display: flex; }
.rc-scenario-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.rc-toggle {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.rc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.rc-toggle-slider {
  position: absolute;
  inset: 0;
  background: #D1D5DB;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.rc-toggle-slider::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.rc-toggle input:checked + .rc-toggle-slider { background: var(--brand-orange); }
.rc-toggle input:checked + .rc-toggle-slider::after { transform: translateX(16px); }
.rc-scenario-test-btn {
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
  margin-left: auto;
}
.rc-scenario-test-btn:hover { background: #F3F4F6; }
.rc-btn-bar {
  display: flex;
  gap: 8px;
  align-items: center;
}
.rc-add-scenario-btn {
  font-size: 12px;
  padding: 6px 14px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.rc-add-scenario-btn:hover { border-color: var(--brand-orange); color: var(--brand-orange); }

/* Test panel overlay */
.rc-test-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rc-test-panel {
  background: #fff;
  border-radius: 12px;
  width: 520px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
}
.rc-test-panel h3 { font-size: 15px; font-weight: 600; }
.rc-test-result {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 14px;
  font-size: 13px;
  white-space: pre-wrap;
  line-height: 1.6;
  max-height: 300px;
  overflow-y: auto;
}

/* ── Global Enrichment Progress Bar ─────────────────────────── */

.global-enrich-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--bg-card, #1a1b1e);
  border-top: 1px solid var(--border, #2d2f36);
  padding: 0 16px;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.3);
}

.global-enrich-bar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 13px;
  color: var(--text, #e5e7eb);
}

.global-enrich-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid var(--border, #2d2f36);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.global-enrich-label {
  flex-shrink: 0;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted, #9ca3af);
}

.global-enrich-prog {
  flex: 1;
  height: 6px;
  background: var(--bg-hover, #23252b);
  border-radius: 3px;
  overflow: hidden;
  min-width: 100px;
}

.global-enrich-prog-fill {
  height: 100%;
  background: #3b82f6;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.global-enrich-count {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted, #9ca3af);
}

.global-enrich-stop {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--border, #2d2f36);
  color: var(--text-muted, #9ca3af);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.global-enrich-stop:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
}

/* ── Lead Scoring Badges ───────────────────────────────────── */

.clay-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.clay-badge-golden { background: rgba(245, 158, 11, 0.15); color: #D97706; }
.clay-badge-silver { background: rgba(156, 163, 175, 0.15); color: #6B7280; }
.clay-badge-bronze { background: rgba(205, 127, 50, 0.15); color: #92400E; }
.clay-badge-qualified { background: rgba(22, 163, 74, 0.15); color: #16A34A; }
.clay-badge-unqualified { background: rgba(220, 38, 38, 0.1); color: #DC2626; }
.clay-badge-b2c { background: rgba(37, 99, 235, 0.12); color: #2563EB; }
.clay-badge-both { background: rgba(124, 58, 237, 0.12); color: #7C3AED; }
.clay-badge-variant { background: rgba(59, 130, 246, 0.1); color: #3B82F6; }

.clay-signal {
  font-size: 14px;
  text-align: center;
}

/* ============================================================
   PROPOSALS MODULE
   ============================================================ */

.prop-list { padding: 0 0 40px; }

.prop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.prop-table thead th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.prop-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background 0.1s;
}

.prop-table tbody tr:hover {
  background: var(--brand-cream-light);
}

.prop-table td {
  padding: 12px 12px;
  vertical-align: middle;
}

.prop-td-company {
  font-weight: 600;
  color: var(--text-primary);
}

.prop-td-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

.prop-td-actions button {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.prop-td-actions button:hover {
  background: var(--brand-cream-light);
  border-color: var(--brand-accent);
  color: var(--brand-accent);
}

.prop-btn-send {
  background: var(--brand-orange) !important;
  color: #fff !important;
  border-color: var(--brand-orange) !important;
}

.prop-btn-send:hover {
  background: var(--brand-orange-hover) !important;
}

.prop-btn-delete:hover {
  border-color: var(--danger) !important;
  color: var(--danger) !important;
}

.prop-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.prop-lang {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: var(--border-light);
  color: var(--text-muted);
}

/* ── Proposal Form ─────────────────────────────────────── */

.prop-form-container {
  max-width: 680px;
  padding: 0 0 40px;
}

.prop-form-section {
  margin-bottom: 28px;
}

.prop-form-section h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.prop-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.prop-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.prop-field input,
.prop-field textarea {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-family: var(--brand-font-body);
  color: var(--text-primary);
  background: var(--surface);
  transition: border-color 0.15s;
}

.prop-field input:focus,
.prop-field textarea:focus {
  outline: none;
  border-color: var(--brand-accent);
}

.prop-field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.prop-lang-toggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.prop-lang-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.prop-lang-btn + .prop-lang-btn {
  border-left: 1px solid var(--border);
}

.prop-lang-btn.active {
  background: var(--brand-orange);
  color: #fff;
}

.prop-form-actions {
  display: flex;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* ── Proposal Preview Modal ────────────────────────────── */

.prop-preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.prop-preview-modal {
  background: var(--surface);
  border-radius: 12px;
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0,0,0,0.3);
}

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

.prop-preview-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f0f0f0;
}
