/* ============================================================
   NeverMiss CRM — Design System
   Light theme, clean Stripe/Notion aesthetic
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --accent:        #6366f1;
  --accent-hover:  #4f46e5;
  --accent-light:  #eef2ff;
  --accent-text:   #4338ca;

  --bg-primary:    #ffffff;
  --bg-secondary:  #f8f9fb;
  --bg-tertiary:   #f1f3f6;

  --text-primary:  #111827;
  --text-secondary:#374151;
  --text-muted:    #6b7280;
  --text-faint:    #9ca3af;

  --border:        #e5e7eb;
  --border-strong: #d1d5db;

  --sidebar-width: 220px;
  --header-height: 56px;

  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.14);

  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     14px;

  /* Stage colors */
  --cold:         #6b7280;
  --interested:   #f59e0b;
  --demo:         #3b82f6;
  --appt:         #8b5cf6;
  --closed:       #10b981;
  --dq:           #ef4444;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { cursor: pointer; font: inherit; }
input, textarea, select { font: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ── Layout ─────────────────────────────────────────────────── */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ────────────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-width);
  background: var(--bg-primary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 20px 16px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

.logo-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.nav-section {
  padding: 0 8px;
  margin-bottom: 4px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 8px 8px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
  user-select: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover { background: var(--bg-secondary); color: var(--text-primary); }
.nav-item.active { background: var(--accent-light); color: var(--accent-text); font-weight: 600; }

.nav-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: .7;
}
.nav-item.active .nav-icon { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px 8px;
  border-top: 1px solid var(--border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}

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

.user-name { font-size: 12.5px; font-weight: 600; color: var(--text-primary); }
.user-email { font-size: 11px; color: var(--text-muted); }

.btn-signout {
  width: 100%;
  margin-top: 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
  font-size: 12px;
  color: var(--text-muted);
  transition: all .15s;
}
.btn-signout:hover { background: #fef2f2; border-color: #fca5a5; color: #dc2626; }

/* ── Main content ───────────────────────────────────────────── */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  height: var(--header-height);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  flex-shrink: 0;
}

.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

#content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ── Panes ──────────────────────────────────────────────────── */
.pane { display: none; }
.pane.active { display: block; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  border: none;
  transition: all .15s;
  white-space: nowrap;
}

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

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

.btn-ghost { background: none; color: var(--text-secondary); border: none; padding: 7px 10px; }
.btn-ghost:hover { background: var(--bg-secondary); color: var(--text-primary); }

.btn-danger { background: #fef2f2; color: #dc2626; border: 1px solid #fca5a5; }
.btn-danger:hover { background: #fee2e2; }

.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 10px 20px; font-size: 14px; }
.btn-icon { padding: 7px; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 5px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 13.5px;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* ── Cards / Stat boxes ─────────────────────────────────────── */
.card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.stat-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* ── Progress bar ───────────────────────────────────────────── */
.progress-bar-wrap {
  background: var(--bg-tertiary);
  border-radius: 99px;
  height: 8px;
  overflow: hidden;
  margin-top: 10px;
}

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

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-Cold       { background: #f3f4f6; color: var(--cold); }
.badge-Interested { background: #fffbeb; color: #b45309; }
.badge-Demo       { background: #eff6ff; color: #1d4ed8; }
.badge-Appointment { background: #f5f3ff; color: #6d28d9; }
.badge-Closed     { background: #f0fdf4; color: #15803d; }
.badge-DQ         { background: #fef2f2; color: #dc2626; }

.badge-A { background: #fef2f2; color: #dc2626; }
.badge-B { background: #fffbeb; color: #b45309; }
.badge-C { background: #f3f4f6; color: #6b7280; }

/* ── Tables ─────────────────────────────────────────────────── */
.table-wrap {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table-toolbar {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-input {
  padding: 7px 11px 7px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") 10px center no-repeat;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  width: 220px;
  transition: border-color .15s;
}
.search-input:focus { border-color: var(--accent); background-color: var(--bg-primary); }

table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
thead th:hover { color: var(--text-primary); }
thead th.sort-asc::after  { content: ' ↑'; }
thead th.sort-desc::after { content: ' ↓'; }

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-secondary); }

tbody td {
  padding: 11px 14px;
  font-size: 13.5px;
  color: var(--text-primary);
  vertical-align: middle;
}

.td-muted { color: var(--text-muted); font-size: 12.5px; }
.td-name  { font-weight: 600; }
.td-actions { display: flex; gap: 6px; }

/* Checkbox column */
.cb-col { width: 40px; }
input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }

/* Quick stage select in table */
.stage-select {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-primary);
  cursor: pointer;
  outline: none;
}
.stage-select:focus { border-color: var(--accent); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 36px; margin-bottom: 10px; }
.empty-state-title { font-size: 15px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state-sub { font-size: 13px; }

/* ── Kanban ─────────────────────────────────────────────────── */
.kanban-board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 16px;
  align-items: flex-start;
  min-height: calc(100vh - 160px);
}

.kanban-col {
  flex-shrink: 0;
  width: 240px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 12px;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.kanban-col-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 7px;
}

.kanban-col-title::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.col-Cold .kanban-col-title::before         { background: var(--cold); }
.col-Interested .kanban-col-title::before   { background: var(--interested); }
.col-Demo .kanban-col-title::before         { background: var(--demo); }
.col-Appointment .kanban-col-title::before  { background: var(--appt); }
.col-Closed .kanban-col-title::before       { background: var(--closed); }
.col-DQ .kanban-col-title::before           { background: var(--dq); }

.kanban-count {
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 1px 7px;
  border-radius: 99px;
}

.kanban-cards { min-height: 60px; }

.kanban-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: box-shadow .15s, transform .1s;
  position: relative;
}

.kanban-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kanban-card.dragging { opacity: .5; box-shadow: var(--shadow-lg); }

.kanban-card-name { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.kanban-card-contact { font-size: 12px; color: var(--text-muted); margin-bottom: 7px; }

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-card-date {
  font-size: 11px;
  color: var(--text-faint);
}

.kanban-col.drag-over { background: var(--accent-light); border: 2px dashed var(--accent); }

/* ── Lead Detail Panel (slide from right) ───────────────────── */
#leadPanel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 480px;
  background: var(--bg-primary);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s ease;
  overflow: hidden;
}

#leadPanel.open { transform: translateX(0); }

#leadOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.2);
  z-index: 99;
  display: none;
}
#leadOverlay.visible { display: block; }

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

.panel-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.panel-close {
  background: none;
  border: none;
  padding: 4px;
  color: var(--text-muted);
  border-radius: 4px;
  font-size: 18px;
  line-height: 1;
  transition: background .15s;
}
.panel-close:hover { background: var(--bg-secondary); color: var(--text-primary); }

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.panel-section {
  margin-bottom: 24px;
}

.panel-section-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.panel-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

/* Sequence day toggles */
.seq-days { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.seq-day {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all .15s;
}

.seq-day.sent {
  background: #f0fdf4;
  border-color: #86efac;
}

.seq-day-label { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.seq-day-ts    { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.seq-day-check { color: #16a34a; font-size: 16px; margin-left: auto; }

/* Notes */
.note-item {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

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

.add-note-row { display: flex; gap: 8px; margin-top: 10px; }
.add-note-input {
  flex: 1;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
}
.add-note-input:focus { border-color: var(--accent); }

/* ── Add Lead Modal ─────────────────────────────────────────── */
#addLeadModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}
#addLeadModal.visible { display: flex; }

.modal-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

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

.modal-title { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.modal-close { background: none; border: none; font-size: 20px; color: var(--text-muted); padding: 2px 6px; }
.modal-close:hover { color: var(--text-primary); }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

/* ── Filter tabs ────────────────────────────────────────────── */
.filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-tertiary);
  padding: 4px;
  border-radius: var(--radius-sm);
  width: fit-content;
  margin-bottom: 16px;
}

.filter-tab {
  padding: 5px 14px;
  border-radius: 5px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: all .15s;
}
.filter-tab.active { background: var(--bg-primary); color: var(--text-primary); box-shadow: var(--shadow-sm); font-weight: 600; }

/* ── Phase 1 Progress ───────────────────────────────────────── */
.phase-card {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  color: #fff;
  margin-bottom: 24px;
}

.phase-label { font-size: 11.5px; font-weight: 700; opacity: .75; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.phase-title { font-size: 20px; font-weight: 800; margin-bottom: 14px; }
.phase-bar-bg { background: rgba(255,255,255,.25); border-radius: 99px; height: 10px; overflow: hidden; }
.phase-bar-fill { background: #fff; height: 100%; border-radius: 99px; transition: width .6s ease; }
.phase-detail { font-size: 12px; opacity: .8; margin-top: 10px; }

/* ── Today's actions ────────────────────────────────────────── */
.action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.action-item:last-child { border-bottom: none; }
.action-biz { font-weight: 600; font-size: 13.5px; }
.action-meta { font-size: 12px; color: var(--text-muted); }
.action-type { font-size: 12px; color: var(--accent); font-weight: 600; }
.action-phone a { color: var(--text-secondary); font-size: 12px; }

/* ── Scripts ────────────────────────────────────────────────── */
.scripts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.script-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.script-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.script-textarea {
  width: 100%;
  min-height: 160px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  color: var(--text-primary);
  background: var(--bg-secondary);
  transition: border-color .15s;
}
.script-textarea:focus { border-color: var(--accent); background: var(--bg-primary); }
.script-saved { font-size: 11px; color: #16a34a; }

/* ── Tasks ──────────────────────────────────────────────────── */
.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.task-item:hover { background: var(--bg-secondary); }
.task-item:last-child { border-bottom: none; }

.task-text {
  flex: 1;
  font-size: 13.5px;
  color: var(--text-primary);
}
.task-text.done {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-delete {
  background: none;
  border: none;
  color: var(--text-faint);
  padding: 2px;
  font-size: 14px;
  opacity: 0;
  transition: opacity .15s;
}
.task-item:hover .task-delete { opacity: 1; }
.task-delete:hover { color: #dc2626; }

/* ── Notifications ──────────────────────────────────────────── */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: #fafaff; }
.notif-item.unread .notif-dot { background: var(--accent); }

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  margin-top: 5px;
}

.notif-msg { font-size: 13.5px; color: var(--text-primary); line-height: 1.5; }
.notif-time { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }

/* ── Sequences page ─────────────────────────────────────────── */
.seq-progress {
  display: flex;
  gap: 6px;
  align-items: center;
}

.seq-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}
.seq-dot.done { background: #16a34a; border-color: #16a34a; color: #fff; }
.seq-dot:not(.done):hover { border-color: var(--accent); color: var(--accent); }

/* ── Calendar ───────────────────────────────────────────────── */
.overdue-row { background: #fffbeb !important; }
.overdue-row:hover { background: #fef3c7 !important; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  #sidebar { display: none; }
  #leadPanel { width: 100%; }
  .kanban-board { padding-bottom: 80px; }
  .scripts-grid { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Utilities ──────────────────────────────────────────────── */
.text-muted  { color: var(--text-muted); }
.text-sm     { font-size: 12px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: 4px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-8 { gap: 8px; }
.ml-auto { margin-left: auto; }
.fw-600 { font-weight: 600; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-row td { text-align: center; padding: 40px; color: var(--text-muted); }

/* Toast notification */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text-primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  z-index: 999;
  opacity: 0;
  transform: translateY(8px);
  transition: all .2s;
  pointer-events: none;
}
#toast.show { opacity: 1; transform: translateY(0); }
#toast.error { background: #dc2626; }

/* Pipeline section header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.section-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
