/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #1F4E79;
  --navy-light: #2a6399;
  --navy-dark: #163a5c;
  --green: #00B050;
  --green-light: #00cc5c;
  --orange: #FF6600;
  --orange-light: #ff8533;
  --hot: #e53e3e;
  --warm: #dd6b20;
  --cool: #3182ce;
  --bg: #f5f7fa;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
}

html { font-size: 14px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--gray-800);
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3, h4 { font-family: 'Poppins', sans-serif; }

a { color: var(--navy); text-decoration: none; }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 0.4rem;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--navy); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--navy-light); }
.btn-green { background: var(--green); color: white; }
.btn-green:hover:not(:disabled) { background: var(--green-light); }
.btn-danger { background: var(--hot); color: white; }
.btn-danger:hover:not(:disabled) { background: #c53030; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
}
.btn-outline:hover:not(:disabled) { background: var(--gray-100); border-color: var(--gray-400); }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-full { width: 100%; }

/* Leads-table Actions cell: ✉️ email + ⚡ DealBuilder side-by-side */
.lead-actions-cell { white-space: nowrap; }
.lead-actions-cell .lead-email-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  font-size: 0.95rem;
  line-height: 1;
  margin-right: 4px;
  border-radius: 4px;
  transition: background 0.12s;
}
.lead-actions-cell .lead-email-btn:hover { background: var(--gray-100); }

/* === LOGIN PAGE === */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
}
.login-container { width: 100%; max-width: 400px; padding: 1rem; }
.login-card {
  background: white;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo h1 { font-size: 2rem; color: var(--navy); }
.accent { color: var(--green); }
.login-subtitle { color: var(--gray-500); font-size: 0.9rem; margin-top: 0.25rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--gray-700);
  font-size: 0.85rem;
}
.form-group input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.15s;
}
.form-group input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(31,78,121,0.15); }
.login-error { color: var(--hot); font-size: 0.85rem; margin-top: 0.75rem; text-align: center; min-height: 1.2em; }

/* === SIDEBAR NAVIGATION === */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  background: #0f1a2e;
  color: #c4cdd8;
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: width 0.2s ease;
  overflow: hidden;
}
.sidebar.collapsed { width: 64px; }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  min-height: 56px;
}
.sidebar-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.sidebar.collapsed .sidebar-logo { opacity: 0; width: 0; overflow: hidden; }

.sidebar-toggle {
  background: none;
  border: none;
  color: #8094ab;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-toggle:hover { color: #fff; background: rgba(255,255,255,0.08); }

.sidebar-station {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-station:empty { display: none; padding: 0; border: none; }
.sidebar-station .station-label {
  font-size: 0.75rem;
  color: #8094ab;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-station .station-select {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #c4cdd8;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
}
.sidebar.collapsed .sidebar-station { display: none; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  color: #8094ab;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border-left: 3px solid transparent;
  transition: all 0.12s ease;
  cursor: pointer;
  position: relative;
}
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,0.05); }
.sidebar-link.active {
  color: #fff;
  background: rgba(31,78,121,0.35);
  border-left-color: var(--green);
}
.sidebar-link.sidebar-disabled {
  opacity: 0.45;
  cursor: default;
}
.sidebar-link.sidebar-disabled:hover { background: none; color: #8094ab; }

.sidebar-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-text {
  transition: opacity 0.2s;
}
.sidebar.collapsed .sidebar-text { opacity: 0; width: 0; overflow: hidden; }
.sidebar.collapsed .sidebar-soon { display: none; }

.sidebar-soon {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5a6e82;
  background: rgba(255,255,255,0.06);
  padding: 1px 6px;
  border-radius: 3px;
}

.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 6px 14px;
}

.sidebar-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5a6e82;
  padding: 10px 19px 4px;
}
.sidebar.collapsed .sidebar-section-title { display: none; }

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 8px 0;
}
.sidebar-user-info {
  padding: 4px 16px 6px;
}
.sidebar-user-email {
  font-size: 0.72rem;
  color: #5a6e82;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.sidebar.collapsed .sidebar-user-info { display: none; }

.sidebar-signout {
  width: 100%;
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  color: #8094ab;
}
.sidebar-signout:hover { color: #ff6b6b !important; background: rgba(255,107,107,0.08) !important; }

.sidebar-playbook { border-left: 3px solid transparent; }

/* Admin-only visibility (controlled by JS) */
.admin-only { display: none; }
.admin-only.visible { display: flex; }

/* === APP CONTENT LAYOUT === */
.app-content {
  margin-left: 240px;
  min-height: 100vh;
  transition: margin-left 0.2s ease;
}
.sidebar.collapsed ~ .app-content { margin-left: 64px; }

/* === TOP NAV (legacy — hidden) === */
.topnav {
  display: none;
  align-items: center;
  background: var(--navy);
  color: white;
  padding: 0 1.5rem;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.nav-left { display: flex; align-items: center; }
.nav-logo { font-size: 1.3rem; font-weight: 700; white-space: nowrap; }
.nav-links { display: flex; gap: 0; margin-left: 2.5rem; height: 56px; }
.nav-link {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  font-weight: 500;
  height: 100%;
  border-bottom: 3px solid transparent;
  transition: all 0.15s;
}
.nav-link:hover { color: white; background: rgba(255,255,255,0.08); }
.nav-link.active { color: white; border-bottom-color: var(--green); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
.nav-user { font-size: 0.85rem; color: rgba(255,255,255,0.8); }
#logout-btn { color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.3); }
#logout-btn:hover { color: white; border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.1); }

/* === MAIN CONTENT === */
.main-content { padding: 1.25rem 1.5rem; max-width: 1400px; margin: 0 auto; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* === HOME / KPI DASHBOARD === */
.home-header { margin-bottom: 1.5rem; }
.home-title { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); }
.home-subtitle { font-size: 0.85rem; color: var(--gray-500); margin-top: 2px; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.kpi-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kpi-icon-blue { background: rgba(31,78,121,0.1); color: var(--navy); }
.kpi-icon-green { background: rgba(0,176,80,0.1); color: var(--green); }
.kpi-icon-orange { background: rgba(255,102,0,0.1); color: var(--orange); }
.kpi-icon-purple { background: rgba(124,58,237,0.1); color: #7c3aed; }
.kpi-icon svg { stroke: currentColor; }
.kpi-value { font-family: 'Poppins', sans-serif; font-size: 1.75rem; font-weight: 700; color: var(--gray-900); line-height: 1.1; }
.kpi-label { font-size: 0.8rem; color: var(--gray-500); font-weight: 500; margin-top: 2px; }

.home-connect-rate {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.connect-rate-bar { display: flex; align-items: center; gap: 1rem; }
.connect-rate-label { font-size: 0.85rem; font-weight: 600; color: var(--gray-700); white-space: nowrap; }
.connect-rate-track { flex: 1; height: 10px; background: var(--gray-200); border-radius: 5px; overflow: hidden; }
.connect-rate-fill { height: 100%; background: var(--green); border-radius: 5px; transition: width 0.5s ease; }
.connect-rate-value { font-family: 'Poppins', sans-serif; font-size: 1.1rem; font-weight: 700; color: var(--green); white-space: nowrap; }

.home-quicklinks { margin-top: 0; }
.home-quicklinks h3 { font-size: 0.95rem; font-weight: 600; color: var(--gray-700); margin-bottom: 0.75rem; }
.quicklink-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.quicklink-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.15s;
}
.quicklink-btn:hover { border-color: var(--navy); color: var(--navy); box-shadow: var(--shadow); }
.quicklink-btn svg { flex-shrink: 0; }

/* === COMING SOON PLACEHOLDER PAGES === */
.coming-soon-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 60vh;
  padding: 2rem;
}
.coming-soon-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--gray-400);
}
.coming-soon-page h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}
.coming-soon-page p {
  font-size: 0.95rem;
  color: var(--gray-500);
  max-width: 420px;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.coming-soon-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--gray-100);
  color: var(--gray-500);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* === Responsive: sidebar collapse on small screens === */
@media (max-width: 900px) {
  .sidebar { width: 64px; }
  .sidebar .sidebar-text,
  .sidebar .sidebar-soon,
  .sidebar .sidebar-section-title,
  .sidebar .sidebar-user-info,
  .sidebar .sidebar-station { display: none; }
  .sidebar .sidebar-logo { opacity: 0; width: 0; overflow: hidden; }
  .app-content { margin-left: 64px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .quicklink-grid { grid-template-columns: repeat(2, 1fr); }
}

/* === STATS BAR === */
.stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.stat-card {
  background: white;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--navy);
}
.stat-card.stat-hot { border-left-color: var(--hot); }
.stat-card.stat-warm { border-left-color: var(--warm); }
.stat-card.stat-cool { border-left-color: var(--cool); }
.stat-value { font-family: 'Poppins', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--gray-900); }
.stat-label { font-size: 0.8rem; color: var(--gray-500); font-weight: 500; text-transform: uppercase; letter-spacing: 0.03em; }

/* === FILTERS === */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: center;
}
.search-box {
  position: relative;
  flex: 1;
  min-width: 250px;
}
.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  padding: 0.6rem 0.75rem 0.6rem 2.25rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  background: white;
}
.search-box input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(31,78,121,0.12); }

.filter-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter-group select,
.filter-city-input {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  background: white;
  color: var(--gray-700);
  cursor: pointer;
}
.filter-group select:focus,
.filter-city-input:focus { outline: none; border-color: var(--navy); }
.filter-city-input { width: 130px; }

/* === TABLE === */
.table-container {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
}
.leads-table { width: 100%; border-collapse: collapse; }
.leads-table th {
  background: var(--gray-50);
  padding: 0.7rem 0.75rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
  user-select: none;
}
.leads-table th.sortable { cursor: pointer; }
.leads-table th.sortable:hover { color: var(--navy); }
.leads-table th.sort-asc::after { content: ' \u25B2'; font-size: 0.7em; }
.leads-table th.sort-desc::after { content: ' \u25BC'; font-size: 0.7em; }
.leads-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.875rem;
  color: var(--gray-700);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leads-table tbody tr { cursor: pointer; transition: background 0.1s; }
.leads-table tbody tr:hover { background: var(--gray-50); }

/* Tier badges */
.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
/* Tier badges — single source of truth (HOT, WARM, COOL, SKIP).
   GOLD was merged into HOT in migration 20260425_tier_gold_to_hot. */
.badge-hot  { background: #FF6600; color: #FFFFFF; }
.badge-warm { background: #F59E0B; color: #FFFFFF; }
.badge-cool { background: #3B82F6; color: #FFFFFF; }
.badge-skip { background: #9CA3AF; color: #FFFFFF; }
.badge-status {
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--gray-100);
  color: var(--gray-600);
}
.badge-status.status-new { background: #dbeafe; color: #1e40af; }
.badge-status.status-interested { background: #d1fae5; color: #065f46; }
.badge-status.status-callback { background: #fef3c7; color: #92400e; }
.badge-status.status-booked { background: #d1fae5; color: var(--green); }
.badge-status.status-dnc { background: #fee2e2; color: var(--hot); }

.table-empty, .table-loading {
  padding: 3rem;
  text-align: center;
  color: var(--gray-400);
  font-size: 0.95rem;
}

/* === PAGINATION === */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
}
.page-info { font-size: 0.85rem; color: var(--gray-500); font-weight: 500; }

/* === DETAIL PANEL === */
/* ── Lead Detail Modal (centered, two-column) ─────────── */

.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.detail-overlay.open { opacity: 1; pointer-events: auto; }

.detail-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 900px;
  max-width: calc(100vw - 32px);
  max-height: 85vh;
  background: white;
  z-index: 201;
  border-radius: 12px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.95);
  transition: transform 0.2s ease, opacity 0.2s ease;
  pointer-events: none;
}
.detail-panel.open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #E5E7EB;
  background: #FFFFFF;
  flex-shrink: 0;
}
.detail-header h2 {
  font-size: 1.15rem;
  color: #1F2937;
  font-weight: 600;
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  font-size: 1.5rem;
  color: #9CA3AF;
  cursor: pointer;
  border-radius: 6px;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
}
.detail-close:hover { background: #F3F4F6; color: #1F2937; }

/* Modal body — top region (action row + status bar) is fixed; columns
   underneath each get their own scroll. */
.detail-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.ld-modal-top {
  flex-shrink: 0;
  padding: 1rem 1.5rem 0;
  border-bottom: 1px solid #E5E7EB;
  background: #FFFFFF;
}

/* Two-column body — left ~55% lead facts, right ~45% interactions */
.ld-cols {
  flex: 1;
  display: flex;
  overflow: hidden;
  background: #FFFFFF;
}
.ld-col-left {
  flex: 0 0 55%;
  overflow-y: auto;
  padding: 1rem 1.25rem 1.25rem;
  border-right: 1px solid #E5E7EB;
}
.ld-col-right {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem 1.25rem;
  background: #F9FAFB;
}
.ld-col-left::-webkit-scrollbar,
.ld-col-right::-webkit-scrollbar { width: 6px; }
.ld-col-left::-webkit-scrollbar-thumb,
.ld-col-right::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 3px; }

/* Section heads + field rows (used inside columns) */
.detail-section { margin-bottom: 1.25rem; }
.detail-section:last-child { margin-bottom: 0; }
.detail-section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6B7280;
  margin-bottom: 0.6rem;
}
.detail-field {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #F3F4F6;
}
.detail-field:last-child { border-bottom: none; }
.detail-field-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: #64748B;
  padding-top: 1px;
}
.detail-field-value {
  font-size: 0.85rem;
  color: #1E293B;
  word-break: break-word;
  min-width: 0;
}
.detail-field-value a { color: #1F4E79; text-decoration: underline; }

/* Compact horizontal status bar (replaces stacked status + pipeline blocks) */
.ld-status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 0.6rem 0.75rem;
  margin: 0.6rem 0 1rem;
  background: #F8FAFC;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
}
.ld-bar-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ld-bar-label {
  font-size: 0.65rem;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
}
.ld-bar-divider {
  width: 1px;
  height: 22px;
  background: #E5E7EB;
}
.ld-status-bar select {
  padding: 5px 8px;
  border: 1px solid #D1D5DB;
  border-radius: 5px;
  font-family: inherit;
  font-size: 0.8rem;
  color: #1F2937;
  background: #FFFFFF;
}
.ld-status-bar .btn { font-size: 0.78rem; padding: 5px 10px; }

/* Compose textareas (notes + quick text) */
.notes-area {
  width: 100%;
  min-height: 70px;
  padding: 0.55rem 0.7rem;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  resize: vertical;
  margin-bottom: 0.5rem;
  background: #FFFFFF;
  box-sizing: border-box;
}
.notes-area:focus { outline: none; border-color: #1F4E79; box-shadow: 0 0 0 2px rgba(31, 78, 121, 0.1); }

/* Mobile: full-screen, single column */
@media (max-width: 768px) {
  .detail-panel {
    top: 0;
    left: 0;
    width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    transform: scale(0.95);
  }
  .detail-panel.open { transform: scale(1); }
  .ld-cols {
    flex-direction: column;
    overflow-y: auto;
  }
  .ld-col-left,
  .ld-col-right {
    flex: none;
    overflow-y: visible;
    border-right: none;
    padding: 1rem;
  }
  .ld-col-left { border-bottom: 1px solid #E5E7EB; }
  .detail-field { grid-template-columns: 90px 1fr; }
}

/* === PLACEHOLDER CONTENT === */
.placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}
.placeholder-content h2 { font-size: 1.5rem; color: var(--gray-700); margin-bottom: 0.5rem; }
.placeholder-content p { color: var(--gray-400); font-size: 1rem; }

/* === TOAST NOTIFICATIONS === */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--gray-800);
  color: white;
  border-radius: var(--radius);
  font-size: 0.85rem;
  z-index: 300;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.2s;
  max-width: 350px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.toast-success { background: var(--green); }
.toast.toast-error { background: var(--hot); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .topnav { padding: 0 0.75rem; }
  .nav-links { margin-left: 1rem; gap: 0; }
  .nav-link { padding: 0 0.6rem; font-size: 0.8rem; }
  .nav-user { display: none; }
  .main-content { padding: 1rem; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .filters-bar { flex-direction: column; }
  .search-box { min-width: 100%; }
  .filter-group { width: 100%; }
  .filter-group select,
  .filter-city-input { flex: 1; min-width: 0; }
  .detail-panel { width: 100vw; right: -100vw; }
  .detail-panel.open { right: 0; }
  .stat-value { font-size: 1.2rem; }
}

@media (max-width: 480px) {
  .nav-links { margin-left: 0.5rem; }
  .nav-link { padding: 0 0.4rem; font-size: 0.75rem; }
  .nav-logo { font-size: 1.1rem; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   PHASE 2A — QUEUE / DIALER / DISPOSITION
   ============================================ */

/* === QUEUE BANNERS === */
.queue-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.875rem;
  gap: 1rem;
}
.test-banner { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.hours-banner { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.banner-btn { border-color: currentColor !important; color: inherit !important; }

/* === MODE SELECTOR === */
.mode-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.mode-btns {
  display: flex;
  gap: 0.5rem;
}
.mode-btn {
  padding: 0.5rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  background: white;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--gray-600);
}
.mode-btn:hover:not(:disabled) { border-color: var(--navy); color: var(--navy); }
.mode-btn.mode-active { background: var(--navy); color: white; border-color: var(--navy); }
.mode-btn.mode-disabled { opacity: 0.4; cursor: not-allowed; }

/* === WEBRTC STATUS INDICATOR === */
.webrtc-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-600);
  white-space: nowrap;
}
.webrtc-dot { font-size: 0.7rem; }
.webrtc-connect-btn {
  margin-left: 0.3rem;
  padding: 0.15rem 0.5rem !important;
  font-size: 0.75rem !important;
}

/* Live call badge in ringing panel */
.cp-live-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  background: #e6f9ee;
  color: #0a7c3e;
}

/* === QUEUE STATS BAR === */
.queue-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.6rem 1rem;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--gray-600);
}
.qs-item strong { color: var(--gray-900); }
.qs-sep { color: var(--gray-300); }

/* === QUEUE LAYOUT === */
.queue-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 1.25rem;
  align-items: start;
}

/* === QUEUE LEFT (Cards) === */
.queue-left {}
.queue-controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}
.queue-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
  padding-right: 0.25rem;
}
.queue-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--gray-400);
  font-size: 0.95rem;
}
.queue-load-more { text-align: center; padding: 0.75rem 0; }

/* === QUEUE CARD === */
.queue-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  transition: all 0.15s;
  box-shadow: var(--shadow);
}
.queue-card:hover { border-color: var(--navy-light); box-shadow: var(--shadow-lg); }
.queue-card-done { opacity: 0.5; background: var(--gray-50); }
.queue-card-active { border-color: var(--green); border-width: 2px; }

.qc-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}
.qc-attempts { font-size: 0.75rem; color: var(--gray-500); }
.queue-reason-tag {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-left: auto;
}
.tag-callback { background: #dbeafe; color: #1e40af; }
.tag-ghost { background: #fef3c7; color: #92400e; }

.qc-name {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.2rem;
}
.qc-meta { font-size: 0.8rem; color: var(--gray-500); margin-bottom: 0.15rem; }
.qc-score { font-size: 0.75rem; color: var(--gray-400); margin-bottom: 0.5rem; }

.qc-actions { display: flex; gap: 0.4rem; justify-content: flex-end; }

/* Disposition badges on completed cards */
.disp-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}
.disp-skip { background: var(--gray-100); color: var(--gray-500); }

/* === CALL PANEL (Right) === */
.queue-right {
  position: sticky;
  top: 72px;
}
.call-panel {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-y: auto;
  max-height: calc(100vh - 300px);
}

/* Compact status bar (replaces big idle panel) */
.cp-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--gray-500);
  background: var(--gray-50, #f9fafb);
  border-radius: var(--radius);
}
.cp-test-badge {
  background: #fef3c7;
  color: #92400e;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
}

/* === PHONE WIDGET (iPhone-style) === */
.phone-widget {
  background: #F2F2F7;
  border-radius: 20px;
  padding: 14px 12px 12px;
  margin-bottom: 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Status bar */
.phone-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px 8px;
  font-size: 12px;
  color: #8E8E93;
}
.phone-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  background: #C7C7CC;
  transition: background .3s;
}
.phone-status-dot.sp-ready   { background: #34C759; }
.phone-status-dot.sp-active  { background: #34C759; animation: ph-pulse 1.4s ease-in-out infinite; }
.phone-status-dot.sp-busy    { background: #FF9500; animation: ph-pulse 1.2s ease-in-out infinite; }
.phone-status-dot.sp-error   { background: #FF3B30; }
@keyframes ph-pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.4; transform:scale(.75); }
}

/* Number display row */
.phone-display-row {
  display: flex;
  align-items: center;
  padding: 2px 4px 10px;
  border-bottom: 1px solid #D1D1D6;
  margin-bottom: 12px;
}
.phone-dial-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 28px;
  font-weight: 300;
  color: #1C1C1E;
  text-align: center;
  letter-spacing: .5px;
  font-family: inherit;
  caret-color: #34C759;
  min-width: 0;
}
.phone-dial-input::placeholder { color: #C7C7CC; font-weight: 300; }
.phone-backspace {
  background: none;
  border: none;
  color: #8E8E93;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 2px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}
.phone-backspace.visible { opacity: 1; pointer-events: auto; }

/* Lead info card (queue calls) */
.phone-lead-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-radius: 10px;
  padding: 7px 12px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #3C3C43;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Digit grid */
.phone-digit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  justify-items: center;
  margin-bottom: 10px;
}

/* Circular digit buttons */
.phone-digit-btn {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #E8E8ED;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background .12s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  font-family: inherit;
}
.phone-digit-btn:active { background: #C7C7CC; }
.phone-digit-btn .digit {
  font-size: 26px;
  font-weight: 400;
  color: #1C1C1E;
  line-height: 1;
}
.phone-digit-btn .sublabel {
  font-size: 8.5px;
  font-weight: 700;
  color: #8E8E93;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 2px;
  min-height: 10px;
}

/* Action row (Call / End) */
.phone-action-row {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 0 8px;
  min-height: 80px;
}
.phone-call-btn {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #34C759;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .1s, background .1s;
}
.phone-call-btn:active { transform: scale(.9); background: #2db34a; }
.phone-call-btn svg   { width: 28px; height: 28px; fill: #fff; }
.phone-end-btn {
  min-width: 140px;
  height: 52px;
  padding: 0 24px;
  border-radius: 50px;
  background: #DC2626;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .1s, background .15s;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}
.phone-end-btn:hover { background: #B91C1C; }
.phone-end-btn:active { transform: scale(.97); background: #991B1B; }
.phone-end-btn svg { width: 22px; height: 22px; fill: #fff; flex-shrink: 0; }
.end-call-label {
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* Function buttons row (active call) */
.phone-fn-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 0 4px 8px;
}
.phone-fn-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #E8E8ED;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  font-family: inherit;
}
.phone-fn-btn .fn-icon  { font-size: 18px; line-height: 1; }
.phone-fn-btn .fn-label { font-size: 9.5px; color: #3C3C43; margin-top: 3px; font-weight: 500; }
.phone-fn-btn.active-mute { background: #FF9500; }
.phone-fn-btn.active-mute .fn-label { color: #fff; }
.phone-fn-btn.active-hold { background: #007AFF; }
.phone-fn-btn.active-hold .fn-label { color: #fff; }
.phone-fn-btn.active-dtmf { background: #5856D6; }
.phone-fn-btn.active-dtmf .fn-label { color: #fff; }

/* Annie function button */
.phone-fn-annie { background: #E8F5E9; border: 1px solid #00B050; }
.phone-fn-annie .fn-label { color: #00B050; }

/* Annie Transfer Panel (during-call dropdown) */
.annie-transfer-panel {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 12px;
  margin-top: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.atp-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; font-family: 'Poppins', sans-serif; font-weight: 600;
  font-size: 13px; color: #1F4E79;
}
.atp-close {
  background: none; border: none; font-size: 16px; cursor: pointer; color: #9CA3AF; padding: 2px 6px;
}
.atp-close:hover { color: #374151; }
.atp-option {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px;
  background: #F9FAFB; border: 1px solid #E5E7EB; border-radius: 8px;
  cursor: pointer; text-align: left; margin-bottom: 6px; transition: all .15s;
}
.atp-option:last-child { margin-bottom: 0; }
.atp-option:hover { background: #EFF6FF; border-color: #1F4E79; }
.atp-option.atp-disabled { opacity: 0.4; cursor: not-allowed; }
.atp-option.atp-disabled:hover { background: #F9FAFB; border-color: #E5E7EB; }
.atp-icon { font-size: 20px; flex-shrink: 0; }
.atp-text { display: flex; flex-direction: column; }
.atp-text strong { font-size: 12px; color: #1F4E79; font-family: 'Inter', sans-serif; }
.atp-text span { font-size: 10.5px; color: #6B7280; margin-top: 1px; }

/* Annie Plan Selection Modal (disposition flow) */
.annie-plan-modal {
  background: #fff; border-radius: 14px; padding: 28px; max-width: 440px; width: 90%;
}
.annie-plan-title {
  color: #1F4E79; font-family: 'Poppins', sans-serif; font-size: 1.15rem;
  margin: 0 0 6px; font-weight: 700;
}
.annie-plan-subtitle {
  color: #6B7280; font-size: 0.9rem; margin: 0 0 18px;
}
.annie-plan-options {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px;
}
.annie-plan-btn {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: #F9FAFB; border: 2px solid #E5E7EB; border-radius: 10px;
  cursor: pointer; text-align: left; transition: all .15s;
}
.annie-plan-btn:hover { background: #EFF6FF; border-color: #1F4E79; }
.annie-plan-btn.annie-plan-selected { background: #E8F5E9; border-color: #00B050; }
.annie-plan-icon { font-size: 24px; flex-shrink: 0; }
.annie-plan-info { display: flex; flex-direction: column; }
.annie-plan-info strong { font-size: 14px; color: #1F4E79; font-family: 'Inter', sans-serif; }
.annie-plan-info span { font-size: 12px; color: #6B7280; margin-top: 2px; }
.annie-plan-schedule {
  margin-top: 12px; padding: 14px; background: #F9FAFB; border-radius: 8px;
  border: 1px solid #E5E7EB;
}

/* Annie Schedule Modal (from softphone) */
.annie-schedule-modal {
  background: #fff; border-radius: 14px; padding: 28px; max-width: 400px; width: 90%;
}
.annie-schedule-modal h3 {
  color: #1F4E79; font-family: 'Poppins', sans-serif; margin: 0 0 8px; font-size: 1.1rem;
}
.annie-schedule-desc { color: #6B7280; font-size: 0.85rem; margin: 0 0 16px; }
.annie-schedule-label {
  display: block; font-size: 0.8rem; color: #6B7280; margin-bottom: 6px; font-weight: 600;
}
.annie-schedule-actions {
  display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px;
}

/* Incoming banner (inside phone widget) */
.phone-incoming {
  background: #fff;
  border: 1.5px solid #34C759;
  border-radius: 14px;
  padding: 12px;
  margin-top: 8px;
  text-align: center;
}
.phone-incoming-label {
  font-size: 10px;
  font-weight: 700;
  color: #34C759;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 4px;
}
.phone-incoming-number { font-size: 17px; font-weight: 600; color: #1C1C1E; margin: 4px 0 10px; }
.phone-incoming-btns   { display: flex; gap: 10px; }
.phone-inc-answer {
  flex: 1; padding: 9px; background: #34C759; color: #fff;
  border: none; border-radius: 50px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.phone-inc-reject {
  flex: 1; padding: 9px; background: #FF3B30; color: #fff;
  border: none; border-radius: 50px; font-weight: 700; cursor: pointer; font-family: inherit;
}

/* Ringing state */
.cp-ringing { padding: 2rem 1.5rem; text-align: center; }
.cp-state-label {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.4rem 1rem;
  border-radius: var(--radius);
  display: inline-block;
  margin-bottom: 1rem;
}
.cp-state-ringing { background: #fef3c7; color: #92400e; animation: pulse-ring 1.5s ease-in-out infinite; }
.cp-state-connected { background: #d1fae5; color: #065f46; }
.cp-state-vm { background: #e0e7ff; color: #3730a3; }

@keyframes pulse-ring {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.cp-lead-name { font-family: 'Poppins', sans-serif; font-size: 1.15rem; font-weight: 600; color: var(--gray-900); margin-bottom: 0.25rem; }
.cp-lead-phone { font-size: 0.95rem; color: var(--gray-600); margin-bottom: 0.5rem; }
.cp-caller-id { font-size: 0.8rem; color: var(--gray-400); margin-bottom: 1rem; }
.cp-ring-timer { font-size: 1rem; margin-bottom: 0.5rem; }
.cp-amd { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 1.5rem; }
.cp-cancel-btn { margin-top: 1rem; }

/* Active call */
.cp-active { padding: 1.25rem 1.25rem; }
.cp-call-timer { font-size: 1.3rem; font-family: 'Poppins', sans-serif; font-weight: 600; margin: 0.5rem 0; }
.cp-call-actions { display: flex; gap: 0.5rem; margin: 0.75rem 0; }
.cp-call-actions .muted { background: var(--orange); color: white; border-color: var(--orange); }

.cp-divider {
  font-size: 0.75rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 0 0.5rem;
  border-top: 1px solid var(--gray-200);
  margin-top: 0.75rem;
}

/* Script */
.cp-script { margin-bottom: 0.75rem; }
.cp-script-section { margin-bottom: 0.75rem; }
.cp-script-label { font-size: 0.75rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; margin-bottom: 0.2rem; }
.cp-script-text { font-size: 0.85rem; color: var(--gray-700); line-height: 1.5; font-style: italic; }

.script-objection { margin-bottom: 0.4rem; }
.script-obj-trigger {
  font-size: 0.85rem;
  color: var(--navy);
  cursor: pointer;
  padding: 0.2rem 0;
}
.script-obj-trigger:hover { color: var(--navy-light); }
.script-obj-response {
  font-size: 0.83rem;
  color: var(--gray-600);
  padding: 0.3rem 0 0.3rem 1rem;
  border-left: 2px solid var(--green);
  margin: 0.2rem 0;
  line-height: 1.5;
}

.cp-lead-info { font-size: 0.8rem; color: var(--gray-500); line-height: 1.8; }
.cp-lead-info a { color: var(--navy); }

/* Voicemail */
.cp-voicemail { padding: 2rem 1.5rem; text-align: center; }
.cp-vm-info { font-size: 0.95rem; color: var(--gray-600); margin: 0.75rem 0; }
.cp-vm-meta { font-size: 0.85rem; color: var(--gray-500); line-height: 1.8; }

/* Countdown */
.cp-countdown { padding: 2rem 1.5rem; text-align: center; }
.cp-countdown-label { font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 600; color: var(--orange); margin-bottom: 0.5rem; }
.cp-countdown-number { font-family: 'Poppins', sans-serif; font-size: 4rem; font-weight: 700; color: var(--navy); margin: 0.5rem 0; }
.cp-countdown-next { font-size: 0.9rem; color: var(--gray-700); margin-bottom: 0.25rem; }
.cp-countdown-meta { font-size: 0.8rem; color: var(--gray-500); margin-bottom: 1rem; }
.cp-countdown-actions { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1rem; }

/* === DISPOSITION MODAL === */
.disposition-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.disposition-overlay.open { opacity: 1; pointer-events: auto; }

/* Generic modal overlay used by the post-Connected appointment prompt and
   the Send-to-Pipeline confirmation. Without these rules the modals render
   as bare divs at the bottom of the body — disposition.js has been writing
   class="modal-overlay open" since v1 but the styles never existed. */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }

.disposition-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 480px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  z-index: 401;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
}
.disposition-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }

.disp-header { text-align: center; margin-bottom: 1.5rem; }
.disp-header h2 { font-family: 'Poppins', sans-serif; font-size: 1.25rem; margin-bottom: 0.4rem; }
.disp-lead-info { font-size: 0.9rem; color: var(--gray-600); }
.disp-call-meta { font-size: 0.8rem; color: var(--gray-400); }

.disp-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.disp-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0.5rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  background: white;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: all 0.15s;
  gap: 0.25rem;
}
.disp-btn:hover { border-color: var(--gray-400); }
.disp-icon { font-size: 1.25rem; }
.disp-desc { font-size: 0.65rem; font-weight: 400; color: var(--gray-400); line-height: 1.2; }

.disp-btn.disp-selected.disp-green { background: #d1fae5; border-color: var(--green); color: #065f46; }
.disp-btn.disp-selected.disp-blue { background: #dbeafe; border-color: #3b82f6; color: #1e40af; }
.disp-btn.disp-selected.disp-red { background: #fee2e2; border-color: var(--hot); color: #991b1b; }
.disp-btn.disp-selected.disp-gray { background: var(--gray-100); border-color: var(--gray-400); color: var(--gray-700); }

.disp-callback-picker {
  margin-bottom: 1rem;
  text-align: center;
}
.disp-callback-picker label { display: block; font-size: 0.85rem; color: var(--gray-600); margin-bottom: 0.3rem; }
.disp-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
}

.disp-dnc-confirm {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  text-align: center;
}
.disp-dnc-confirm p { font-size: 0.85rem; color: #991b1b; margin-bottom: 0.75rem; }

.disp-notes { margin-bottom: 1rem; }
.disp-textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  resize: vertical;
}
.disp-textarea:focus { outline: none; border-color: var(--navy); }

.disp-submit { font-size: 1rem; padding: 0.85rem; }

/* === SETTINGS PAGE === */
.settings-page { max-width: 600px; }
.settings-title { font-size: 1.25rem; color: var(--gray-900); margin-bottom: 1rem; }
.settings-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.settings-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}
.settings-group label { font-weight: 500; color: var(--gray-700); min-width: 120px; }
.settings-group select,
.settings-group input[type="number"] {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
}
.settings-hint { font-size: 0.8rem; color: var(--gray-400); }
.settings-toggle { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; min-width: unset; cursor: pointer; }
.settings-toggle input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.settings-sub { padding-left: 130px; }
.settings-locked { color: var(--gray-400); font-style: italic; }
.settings-locked label { color: var(--gray-400); }

#save-settings-btn { margin-top: 0.5rem; }

/* === CALL HISTORY (Detail Panel) === */
.call-history-list { }
.call-history-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.83rem;
}
.call-history-item:last-child { border-bottom: none; }
.ch-date { color: var(--gray-500); font-size: 0.75rem; }
.ch-detail { color: var(--gray-700); }

/* === QUEUE RESPONSIVE === */
@media (max-width: 768px) {
  .queue-layout { grid-template-columns: 1fr; }
  .queue-right { position: static; }
  .call-panel { min-height: auto; max-height: none; }
  .queue-card-list { max-height: none; }
  .qc-score { display: none; }
  .mode-selector { flex-wrap: wrap; }
  .mode-btns { overflow-x: auto; flex-wrap: nowrap; }
  .webrtc-indicator { font-size: 0.75rem; }
  .disposition-modal { width: 95vw; padding: 1.25rem; }
  .disp-buttons { grid-template-columns: repeat(3, 1fr); gap: 0.35rem; }
  .disp-btn { padding: 0.6rem 0.3rem; font-size: 0.75rem; }
  .settings-sub { padding-left: 0; }
}

@media (max-width: 480px) {
  .disp-buttons { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   CLICKUP EXPORT
   ============================================ */

.btn-clickup {
  background: var(--navy);
  color: white;
  border: none;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}
.btn-clickup:hover { background: var(--navy-light); }
.btn-clickup.exported { background: var(--green); cursor: default; }
.btn-clickup.loading { opacity: 0.7; cursor: wait; }
.btn-clickup.error { background: var(--hot); animation: shake 0.3s; }

.badge-clickup {
  background: #7B68EE;
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 4px;
  letter-spacing: 0.02em;
}

.clickup-auto-note {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 4px;
}
.clickup-auto-note .icon { font-size: 0.85rem; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* === SMS UI === */
.btn-sms {
  background: var(--navy);
  color: white;
  border: none;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.btn-sms:hover { background: var(--navy-light); }

.quick-text-box { display: flex; flex-direction: column; gap: 6px; }
.quick-text-footer { display: flex; justify-content: space-between; align-items: center; }
.quick-text-template-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.quick-text-template-label {
  font-size: 0.75rem;
  color: var(--gray-500);
  white-space: nowrap;
}
.quick-text-template-select {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--gray-700);
}
.quick-text-template-select:focus {
  outline: none;
  border-color: var(--navy);
}
.quick-text-template-select:disabled {
  background: var(--gray-100);
  color: var(--gray-400);
  cursor: not-allowed;
}
.quick-text-dnc-lock {
  background: #fee2e2;
  color: #991b1b;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}
.quick-text-count { font-size: 0.75rem; color: var(--gray-400); }

.sms-history-list { display: flex; flex-direction: column; gap: 8px; }
.sms-history-item {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
}
.sms-history-header { font-size: 0.8rem; font-weight: 600; color: var(--gray-700); margin-bottom: 2px; }
.sms-history-body { font-size: 0.8rem; color: var(--gray-500); line-height: 1.4; }

/* SMS Templates list + editor */
.sms-tpl-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
}
.sms-tpl-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.sms-tpl-header strong { font-size: 0.9rem; }
.sms-tpl-delay {
  font-size: 0.75rem;
  color: var(--gray-400);
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}
.sms-tpl-body {
  font-size: 0.8rem;
  color: var(--gray-500);
  line-height: 1.4;
  white-space: pre-wrap;
}

.settings-divider {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 20px 0;
}
.settings-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}

/* === Voicemail Drops === */
.vm-drops-section { margin-top: 12px; }
.vm-upload-panel {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 16px;
}
.vm-upload-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}
.vm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.vm-table th {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 2px solid var(--gray-200);
  color: var(--gray-500);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.vm-table td {
  padding: 8px;
  border-bottom: 1px solid var(--gray-100);
}
.vm-row-inactive td { opacity: 0.5; }
.vm-actions { display: flex; gap: 4px; }
.btn-icon {
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  cursor: pointer;
  font-size: 0.8rem;
}
.btn-icon:hover { background: var(--gray-100); }

/* === Sequence / Cadence UI === */
.sequence-status-box { font-size: 0.85rem; }
.seq-info { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.seq-name { font-weight: 700; font-size: 0.9rem; color: var(--navy); }
.seq-badge {
  display: inline-block;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.seq-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 8px;
}
.seq-details span::after { content: '·'; margin-left: 8px; color: var(--gray-300); }
.seq-details span:last-child::after { content: ''; margin-left: 0; }
.seq-progress {
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  overflow: hidden;
}
.seq-progress-bar {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  transition: width 0.3s;
}

/* Sequence cards in Settings */
.sequences-section { margin-top: 12px; }
.seq-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}
.seq-card-inactive { opacity: 0.6; }
.seq-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.seq-card-desc {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 8px;
}
.seq-steps-list {
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-bottom: 8px;
  padding-left: 4px;
}
.seq-step-row { padding: 2px 0; }
.seq-step-num {
  display: inline-block;
  width: 28px;
  color: var(--gray-400);
  font-weight: 600;
}
.seq-condition { color: var(--gray-400); font-size: 0.75rem; }
.seq-card-stats {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--gray-400);
}

/* ── Scraper Tab — Pipedrive light theme ──────────────── */

#tab-scraper {
  background: #F0F1F3;
}

.scraper-tab {
  padding: 1.25rem 1.5rem;
  max-width: 900px;
  color: #1e293b;
}

.scraper-section {
  margin-bottom: 1.5rem;
}
/* Section labels (Templates, Scraper Builder, Cost Estimate, Run History) */
.scraper-section h3 {
  color: #1F4E79;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.75rem;
}
.scraper-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.scraper-section-header h3 { margin-bottom: 0; }

/* "+ New Template" button — outlined navy, fills navy on hover */
#scraper-new-template-btn {
  background: #FFFFFF;
  border: 1px solid #1F4E79;
  color: #1F4E79;
  font-weight: 600;
}
#scraper-new-template-btn:hover {
  background: #1F4E79;
  border-color: #1F4E79;
  color: #FFFFFF;
}

/* Template Grid */
.scraper-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.7rem;
}
.scraper-template-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 0.85rem;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.1s, border-color 0.15s;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.scraper-template-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  border-color: #D1D5DB;
}
.scraper-template-card.active {
  border-color: #1F4E79;
  box-shadow: 0 0 0 2px rgba(31, 78, 121, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
}
.scraper-template-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.scraper-template-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1F4E79;
}
.scraper-sample-badge {
  font-size: 0.55rem;
  background: #00B050;
  color: #FFFFFF;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 700;
}
.scraper-template-desc {
  font-size: 0.72rem;
  color: #64748B;
  margin-bottom: 8px;
  line-height: 1.4;
}
.scraper-template-meta {
  display: flex;
  gap: 10px;
  font-size: 0.7rem;
  color: #334155;
  font-weight: 500;
}
.scraper-template-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 0.7rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.scraper-template-delete:hover { color: #DC2626; background: rgba(220, 38, 38, 0.08); }

/* Builder form section */
.scraper-builder {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.scraper-builder-row {
  margin-bottom: 0.75rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.scraper-builder-group { min-width: 180px; }

/* Field labels (CITIES, VERTICALS, RADIUS, MAX RESULTS PER QUERY) */
.scraper-builder-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #1F4E79;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}
.scraper-builder-actions {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #E5E7EB;
}

/* Tag inputs (city + vertical pills) */
.scraper-tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
  min-height: 28px;
}
.scraper-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #EEF2F7;
  border: 1px solid #D1DBE5;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.74rem;
  color: #1F4E79;
  font-weight: 500;
}
.scraper-tag-remove {
  background: none;
  border: none;
  color: #64748B;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0 2px;
  line-height: 1;
}
.scraper-tag-remove:hover { color: #DC2626; }
.scraper-tag-placeholder {
  font-size: 0.72rem;
  color: #94A3B8;
  font-style: italic;
  padding: 4px 0;
}
.scraper-add-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.scraper-input {
  background: #F8FAFC;
  border: 1px solid #E5E7EB;
  border-radius: 5px;
  padding: 6px 9px;
  font-size: 0.8rem;
  color: #334155;
  outline: none;
  flex: 1;
  font-family: inherit;
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}
.scraper-input::placeholder { color: #94A3B8; }
.scraper-input:focus {
  border-color: #1F4E79;
  box-shadow: 0 0 0 2px rgba(31, 78, 121, 0.1);
  background: #FFFFFF;
}
.scraper-select {
  background: #F8FAFC;
  border: 1px solid #E5E7EB;
  border-radius: 5px;
  padding: 6px 9px;
  font-size: 0.8rem;
  color: #334155;
  outline: none;
  min-width: 180px;
  font-family: inherit;
}

/* Builder buttons — three flavors via ID selectors so we don't have to
   touch the JS. "Add" = filled navy, "Add Custom" = outlined navy,
   Save / Update Template = green. */
#scraper-add-city-btn,
#scraper-add-vertical-btn {
  background: #1F4E79;
  border: 1px solid #1F4E79;
  color: #FFFFFF;
  font-weight: 600;
}
#scraper-add-city-btn:hover,
#scraper-add-vertical-btn:hover {
  background: #163759;
  border-color: #163759;
}
#scraper-add-custom-btn {
  background: #FFFFFF;
  border: 1px solid #1F4E79;
  color: #1F4E79;
  font-weight: 600;
}
#scraper-add-custom-btn:hover {
  background: #1F4E79;
  color: #FFFFFF;
}
#scraper-save-template-btn,
#scraper-update-template-btn {
  background: #00B050;
  border: 1px solid #00B050;
  color: #FFFFFF;
  font-weight: 600;
}
#scraper-save-template-btn:hover,
#scraper-update-template-btn:hover {
  background: #008C40;
  border-color: #008C40;
}

/* Cost Estimate panel */
.scraper-estimate-panel {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 1.1rem 1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.scraper-estimate-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.scraper-estimate-item { text-align: center; min-width: 60px; }
.scraper-estimate-num {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1F4E79;
  line-height: 1.2;
}
.scraper-estimate-cost { color: #00B050; }
.scraper-estimate-label {
  font-size: 0.62rem;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
  margin-top: 2px;
}
.scraper-estimate-x {
  font-size: 1.1rem;
  color: #94A3B8;
  font-weight: 500;
}
.scraper-estimate-leads {
  text-align: center;
  font-size: 0.74rem;
  color: #64748B;
  margin-top: 10px;
}

/* Duplicate-protection / safety panel */
.scraper-safety-panel {
  display: flex;
  gap: 10px;
  background: #EEF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 6px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.45;
}
.scraper-safety-icon {
  color: #1F4E79;
  font-size: 1.15rem;
  flex-shrink: 0;
  font-weight: 700;
}
.scraper-safety-text strong { color: #1F4E79; }

/* Run controls (Dry Run + Run Live) */
.scraper-run-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.btn-danger-outline {
  background: #FFFFFF;
  border: 1px solid #DC2626;
  color: #DC2626;
  font-weight: 600;
}
.btn-danger-outline:hover {
  background: #DC2626;
  color: #FFFFFF;
  border-color: #DC2626;
}

/* Progress */
.scraper-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1rem;
  font-size: 0.85rem;
  color: #475569;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
}
.scraper-progress-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #E5E7EB;
  border-top-color: #1F4E79;
  border-radius: 50%;
  animation: scraper-spin 0.8s linear infinite;
}
@keyframes scraper-spin { to { transform: rotate(360deg); } }

/* Results panel */
.scraper-results-panel {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.scraper-results-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #1F4E79;
  margin-bottom: 0.85rem;
}
.scraper-mode-badge {
  font-size: 0.62rem;
  padding: 2px 9px;
  border-radius: 10px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.4px;
}
.scraper-mode-dry  { background: #FEF3C7; color: #92400E; }
.scraper-mode-live { background: #DCFCE7; color: #047857; }
.scraper-results-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.85rem;
}
.scraper-result-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.7rem;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
}
.scraper-result-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1F4E79;
  line-height: 1.2;
}
.scraper-result-tiers {
  display: flex;
  gap: 6px;
  margin-bottom: 0.85rem;
}
.scraper-result-breakdown {
  display: flex;
  gap: 1.5rem;
  font-size: 0.74rem;
  color: #475569;
}
.scraper-breakdown-col { flex: 1; }
.scraper-breakdown-col strong {
  display: block;
  margin-bottom: 4px;
  color: #1F4E79;
  font-size: 0.75rem;
  font-weight: 600;
}
.scraper-breakdown-col div { padding: 2px 0; color: #334155; }
.scraper-result-note {
  margin-top: 0.85rem;
  padding: 0.55rem 0.75rem;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 6px;
  font-size: 0.74rem;
  color: #92400E;
  text-align: center;
}
.scraper-error {
  color: #991B1B;
  font-size: 0.85rem;
  padding: 0.75rem;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 6px;
}

/* Run History */
.scraper-toggle-arrow {
  font-size: 0.7rem;
  color: #94A3B8;
  transition: transform 0.2s;
}
.scraper-history-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.scraper-history-row {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.scraper-history-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.78rem;
}
.scraper-history-date   { color: #1F4E79; font-weight: 600; }
.scraper-history-detail { color: #64748B; }

/* === Station Switcher === */
.station-switcher { display: flex; align-items: center; }
.station-label { font-size: 0.82rem; color: rgba(255,255,255,0.8); font-weight: 500; }
.station-select {
  background: rgba(255,255,255,0.12);
  color: white;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
}
.station-select:focus { outline: none; border-color: var(--green); }
.station-select option { background: var(--navy); color: white; }

/* === DNC Compliance Banner === */
.dnc-compliance-banner {
  background: var(--navy);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dnc-compliance-banner a { color: var(--green-light); text-decoration: underline; font-weight: 500; }
.dnc-compliance-banner a:hover { color: white; }

/* === DNC Badge on Queue Cards === */
.badge-dnc {
  background: var(--hot);
  color: white;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

/* === DNC Disposition Button (prominent) === */
.disp-dnc-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-200);
}
.disp-dnc-prominent {
  width: 100%;
  background: transparent;
  border: 2px solid var(--hot);
  color: var(--hot);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s;
  flex-direction: column;
}
.disp-dnc-prominent:hover { background: rgba(229,62,62,0.08); }
.disp-dnc-prominent.disp-selected { background: var(--hot); color: white; }
.disp-dnc-warning { font-size: 0.7rem; font-weight: 400; opacity: 0.7; }

/* === Policy Modal === */
.policy-modal {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.policy-title { font-size: 1.2rem; color: var(--navy); margin-bottom: 1rem; }
.policy-content { font-size: 0.85rem; color: var(--gray-700); line-height: 1.7; max-height: 50vh; overflow-y: auto; margin-bottom: 1.5rem; }
.policy-content p { margin-bottom: 0.75rem; }
.policy-actions { text-align: center; }

/* === Settings: DNC Policy & Team === */
.settings-row {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
}
.settings-row:last-child { border-bottom: none; }
.settings-label { width: 180px; font-weight: 600; font-size: 0.85rem; color: var(--gray-600); flex-shrink: 0; }
.settings-value { flex: 1; font-size: 0.85rem; color: var(--gray-800); }
.settings-actions { margin-top: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.settings-help { font-size: 0.85rem; color: var(--gray-600); line-height: 1.5; }

.badge-green { background: var(--green); color: white; }
/* .badge-hot / .badge-warm / .badge-cool / .badge-skip live with the
   tier-badge group above (around line 281). Don't duplicate them here. */
.text-muted { color: var(--gray-400); font-size: 0.82rem; }

.team-station-info { margin-bottom: 12px; }
.team-members-list { margin-bottom: 16px; }
.team-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.85rem;
}
.team-member-row:last-child { border-bottom: none; }
.team-member-email { color: var(--gray-700); }

.team-invite-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.team-invite-form .form-input {
  flex: 1;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
}
.team-invite-form .form-input:focus { outline: none; border-color: var(--navy); }
.team-invite-form .form-select {
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
}

/* === Email Sync Status Indicator === */
.email-sync-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.email-sync-indicator:hover { background: var(--gray-200); }
.email-sync-indicator.sync-fresh { background: rgba(0,176,80,0.1); color: var(--green); }
.email-sync-indicator.sync-stale { background: rgba(255,102,0,0.1); color: var(--orange); }
.email-sync-indicator.syncing { opacity: 0.6; pointer-events: none; }
.email-sync-indicator.syncing .sync-dot { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.sync-dot { font-size: 0.85rem; }

/* ── Pipeline V3 — Pipedrive-inspired light kanban ──── */

/* Pipeline tab is a light island within the dark app shell */
#tab-pipeline {
  background: #F0F1F3;
}

/* Header bar */
.pipeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: #FFFFFF;
  border-bottom: 1px solid #E5E7EB;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.pipeline-header h2 {
  margin: 0;
  color: #1F2937;
  font-size: 1.15rem;
  font-weight: 600;
}
.pipeline-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.pipeline-search-input {
  background: #F9FAFB;
  color: #1F2937;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.82rem;
  width: 180px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pipeline-search-input::placeholder { color: #9CA3AF; }
.pipeline-search-input:focus {
  border-color: #1F4E79;
  box-shadow: 0 0 0 2px rgba(31,78,121,0.1);
}
.pipeline-controls select {
  background: #F9FAFB;
  color: #374151;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.82rem;
}

/* Summary Bar — total + per-stage pills */
.pipeline-summary-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.5rem;
  background: #FFFFFF;
  border-bottom: 1px solid #E5E7EB;
  overflow-x: auto;
  flex-wrap: wrap;
}
.pl-summary-total {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-right: 0.75rem;
  padding-right: 0.75rem;
  border-right: 1px solid #E5E7EB;
}
.pl-summary-total-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1F2937;
}
.pl-summary-total-mrr {
  font-size: 0.75rem;
  color: #00B050;
  font-weight: 600;
}
.pl-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  color: #4B5563;
  cursor: pointer;
  transition: background 0.12s;
  white-space: nowrap;
}
.pl-summary-pill:hover { background: #F3F4F6; }
.pl-summary-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pl-summary-pill-label { font-weight: 500; }
.pl-summary-pill-count {
  font-weight: 600;
  color: #1F2937;
}
.pl-summary-pill-mrr {
  font-size: 0.65rem;
  color: #00B050;
  font-weight: 600;
}

/* Board */
.kanban-board {
  display: flex;
  gap: 10px;
  padding: 1rem 1.5rem;
  overflow-x: auto;
  min-height: calc(100vh - 220px);
  align-items: flex-start;
  background: #F0F1F3;
}
.kanban-board::-webkit-scrollbar { height: 8px; }
.kanban-board::-webkit-scrollbar-track { background: transparent; }
.kanban-board::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 4px; }

/* Columns */
.pl-column {
  min-width: 250px;
  max-width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  background: #F7F8FA;
  border: 1px solid #E5E7EB;
}
.pl-column-header {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #E5E7EB;
  background: #FFFFFF;
  border-radius: 8px 8px 0 0;
}
.pl-column-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pl-column-title {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.pl-column-count {
  font-size: 0.7rem;
  color: #9CA3AF;
  font-weight: 500;
}
.pl-column-mrr {
  font-size: 0.7rem;
  color: #00B050;
  font-weight: 600;
  margin-top: 2px;
}

/* Column body (drop zone) */
.pl-column-body {
  padding: 0.4rem;
  min-height: 80px;
  max-height: calc(100vh - 300px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.12s;
}
.pl-column-body::-webkit-scrollbar { width: 4px; }
.pl-column-body::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 2px; }

/* Drop targets */
.pl-drop-target {
  background: rgba(31,78,121,0.04);
  outline: 2px dashed rgba(31,78,121,0.2);
  outline-offset: -2px;
  border-radius: 0 0 8px 8px;
}
.pl-drag-over {
  background: rgba(31,78,121,0.08);
  outline-color: rgba(31,78,121,0.4);
}

/* Cards */
.pl-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
  cursor: grab;
  transition: box-shadow 0.12s, transform 0.1s, border-color 0.12s;
}
.pl-card:hover {
  border-color: #D1D5DB;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.pl-dragging {
  opacity: 0.5;
  transform: rotate(2deg);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.pl-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}
.pl-card-tier {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pl-tier-hot  { background: #FF6600; }
.pl-tier-warm { background: #F59E0B; }
.pl-tier-cool { background: #3B82F6; }
.pl-tier-skip { background: #9CA3AF; }
.pl-card-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1F2937;
  line-height: 1.3;
}
.pl-card-info {
  font-size: 0.72rem;
  color: #6B7280;
  margin-bottom: 4px;
  text-transform: capitalize;
}
.pl-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
}
.pl-card-attempts {
  color: #9CA3AF;
}
.pl-card-value {
  color: #00B050;
  font-weight: 700;
  font-size: 0.75rem;
}
.pl-card-empty {
  padding: 2rem 0.5rem;
  text-align: center;
  color: #C4C7CC;
  font-size: 0.78rem;
}
.pl-card-overflow {
  padding: 0.4rem;
  text-align: center;
  color: #9CA3AF;
  font-size: 0.72rem;
}

/* ── Multi-agent queue lock indicators ─────────────────── */
.locked-by-other { opacity: 0.5; }
.locked-by-other .queue-call-btn { pointer-events: none; }
.lock-badge {
  background: #F59E0B;
  color: #000;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  margin-left: 0.5rem;
  font-weight: 600;
}

/* ── Dashboard ────────────────────────────────────────── */

#tab-dashboard {
  background: #F0F1F3;
}

.dash-page {
  padding: 1.25rem 1.5rem;
  max-width: 1100px;
}
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.dash-header h2 {
  margin: 0;
  color: #1F2937;
  font-size: 1.15rem;
  font-weight: 600;
}

/* KPI Cards */
.dash-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 1rem;
}
.dash-kpi {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}
.dash-kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1F2937;
  line-height: 1.2;
}
.dash-kpi-label {
  font-size: 0.72rem;
  color: #6B7280;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Chart cards */
.dash-charts-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  margin-bottom: 1rem;
}
.dash-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.dash-chart-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 1rem;
  position: relative;
}
.dash-chart-card canvas {
  max-height: 250px;
}
.dash-chart-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 0.75rem;
}

/* Team table */
.dash-team-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.dash-team-tbl th {
  text-align: left;
  padding: 6px 8px;
  font-size: 0.68rem;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid #E5E7EB;
  font-weight: 600;
}
.dash-team-tbl td {
  padding: 6px 8px;
  color: #374151;
  border-bottom: 1px solid #F3F4F6;
}
.dash-team-tbl tr:last-child td { border-bottom: none; }

/* Responsive */
@media (max-width: 800px) {
  .dash-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .dash-charts-row { grid-template-columns: 1fr; }
  .dash-bottom-row { grid-template-columns: 1fr; }
}

/* ── Email Compose Modal ──────────────────────────────── */
.ec-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.ec-modal {
  background: #FFFFFF;
  border-radius: 12px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  border: 1px solid #E5E7EB;
  overflow: hidden;
}
.ec-header {
  background: #1F4E79;
  color: #FFFFFF;
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ec-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.ec-close {
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
  opacity: 0.85;
}
.ec-close:hover { opacity: 1; }
.ec-body {
  padding: 1rem 1.1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.ec-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ec-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.ec-input {
  background: #F8FAFC;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.85rem;
  color: #1F2937;
  outline: none;
  font-family: inherit;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.ec-input::placeholder { color: #9CA3AF; }
.ec-input:focus {
  border-color: #1F4E79;
  box-shadow: 0 0 0 2px rgba(31, 78, 121, 0.12);
  background: #FFFFFF;
}
.ec-input-readonly {
  background: #F1F5F9;
  color: #64748B;
  cursor: default;
}
.ec-input-readonly:focus { box-shadow: none; border-color: #E5E7EB; }
.ec-textarea {
  resize: vertical;
  min-height: 180px;
  line-height: 1.45;
  white-space: pre-wrap;
  font-family: inherit;
}
.ec-hint {
  font-size: 0.7rem;
  color: #9CA3AF;
  margin-top: 2px;
}
.ec-footer {
  padding: 0.85rem 1.1rem;
  border-top: 1px solid #E5E7EB;
  background: #F9FAFB;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.ec-footer-spacer { flex: 1; }
.ec-btn {
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.ec-btn-primary {
  background: #1F4E79;
  color: #FFFFFF;
  border-color: #1F4E79;
}
.ec-btn-primary:hover { background: #163759; border-color: #163759; }
.ec-btn-outline {
  background: #FFFFFF;
  color: #374151;
  border-color: #D1D5DB;
}
.ec-btn-outline:hover { background: #F3F4F6; border-color: #9CA3AF; }
@media (max-width: 600px) {
  .ec-modal { max-height: 100vh; border-radius: 0; }
}

/* Template row — dropdown + inline edit/delete icons */
.ec-template-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ec-template-row select { flex: 1; }
.ec-tpl-icon-btn {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #6B7280;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  padding: 0;
  line-height: 1;
}
.ec-tpl-icon-btn:hover {
  background: #F3F4F6;
  border-color: #1F4E79;
  color: #1F4E79;
}
.ec-tpl-icon-btn.ec-tpl-icon-danger:hover {
  border-color: #DC2626;
  color: #DC2626;
  background: rgba(220, 38, 38, 0.06);
}

/* Special styling for the "+ Create New Template" sentinel option */
.ec-tpl-opt-new {
  font-style: italic;
  color: #1F4E79;
  font-weight: 600;
}

/* Editor mode banner */
.ec-mode-banner {
  background: rgba(31, 78, 121, 0.08);
  color: #1F4E79;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid #1F4E79;
  margin-bottom: 12px;
}

/* ── Lead Detail Panel: action buttons, notes, timeline ── */

/* Quick Action Buttons row (Call / Email / SMS) */
.ld-action-row {
  display: flex;
  gap: 8px;
  padding: 0 0 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #E5E7EB;
}
.ld-action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  background: #FFFFFF;
  color: #1F4E79;
  border: 1px solid #1F4E79;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s, box-shadow 0.12s;
  font-family: inherit;
}
.ld-action-btn:hover:not(:disabled) {
  background: #1F4E79;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(31, 78, 121, 0.18);
}
.ld-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: #D1D5DB;
  color: #9CA3AF;
}
.ld-action-icon { font-size: 0.95rem; line-height: 1; }

.ld-action-pipeline {
  background: #00B050;
  color: #FFFFFF;
  border-color: #00B050;
}
.ld-action-pipeline:hover:not(:disabled) {
  background: #009940;
  color: #FFFFFF;
  border-color: #009940;
  box-shadow: 0 2px 6px rgba(0, 176, 80, 0.25);
}
.ld-action-pipeline-done {
  background: #86EFAC;
  color: #166534;
  border-color: #86EFAC;
}

/* Transfer-to-Annie button — visually distinct from Send to Pipeline (green)
   so a BDR mid-call doesn't muscle-memory click the wrong one. Orange anchors
   it to the "warm handoff" mental model and matches the existing accent color. */
.ld-action-transfer {
  background: var(--orange);
  color: #FFFFFF;
  border-color: var(--orange);
}
.ld-action-transfer:hover:not(:disabled) {
  background: var(--orange-light);
  color: #FFFFFF;
  border-color: var(--orange-light);
  box-shadow: 0 2px 6px rgba(255, 102, 0, 0.25);
}

/* Section title with count badge */
.ld-section-title-with-count {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ld-count-badge {
  background: #E5E7EB;
  color: #4B5563;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 10px;
  min-width: 22px;
  text-align: center;
}

/* Notes section */
.ld-section-notes .ld-note-compose {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.ld-section-notes .ld-note-compose textarea {
  resize: vertical;
  min-height: 70px;
  font-family: inherit;
}
.ld-notes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ld-note {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  background: #F8FAFC;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
}
.ld-note-avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #1F4E79;
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}
.ld-note-body { flex: 1; min-width: 0; }
.ld-note-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  margin-bottom: 3px;
}
.ld-note-author { font-weight: 600; color: #1F2937; }
.ld-note-time { color: #9CA3AF; flex: 1; }
.ld-note-delete {
  background: transparent;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0 4px;
  border-radius: 4px;
  transition: color 0.12s, background 0.12s;
}
.ld-note-delete:hover { color: #DC2626; background: rgba(220, 38, 38, 0.08); }
.ld-note-text {
  font-size: 0.82rem;
  color: #374151;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Activity timeline (call_logs + email_activity + lead_notes merged) */
.ld-timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ld-tl-row {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  background: #F8FAFC;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  border-left-width: 3px;
}
.ld-tl-row:nth-child(odd) { background: #FFFFFF; }
.ld-tl-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  background: #F3F4F6;
}
.ld-tl-icon-call { background: #DBEAFE; }
.ld-tl-icon-transfer { background: #FFEDD5; }
.ld-tl-icon-email { background: #FEF3C7; }
.ld-tl-icon-note { background: #DCFCE7; }
.ld-tl-content { flex: 1; min-width: 0; }
.ld-tl-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  margin-bottom: 2px;
}
.ld-tl-title { font-weight: 600; color: #1F2937; flex: 1; }
.ld-tl-time { color: #9CA3AF; font-size: 0.7rem; white-space: nowrap; }
.ld-tl-detail {
  font-size: 0.78rem;
  color: #4B5563;
  line-height: 1.4;
  word-wrap: break-word;
}
.ld-tl-agent {
  font-size: 0.68rem;
  color: #9CA3AF;
  margin-top: 2px;
}

/* Disposition pills */
.ld-tl-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-left: 4px;
  vertical-align: middle;
}
.ld-tl-pill-connected { background: #DCFCE7; color: #047857; }
.ld-tl-pill-voicemail { background: #DBEAFE; color: #1E40AF; }
.ld-tl-pill-noanswer  { background: #FED7AA; color: #9A3412; }
.ld-tl-pill-busy      { background: #FEE2E2; color: #991B1B; }
.ld-tl-pill-default   { background: #E5E7EB; color: #374151; }
.ld-tl-pill-email     { background: #FEF3C7; color: #92400E; }

/* ── Scraper Help button + modal ─────────────────────── */

/* Help trigger in the Scraper tab's Templates header */
.scraper-help-btn {
  background: #FFFFFF;
  border: 1px solid #1F4E79;
  color: #1F4E79;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.15s, color 0.15s;
}
.scraper-help-btn:hover {
  background: #1F4E79;
  color: #FFFFFF;
}

/* Overlay — always rendered when present, opacity-based show/hide so
   we can animate. The .sh-visible class triggers the fade + scale. */
.sh-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}
.sh-overlay.sh-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Modal */
.sh-modal {
  position: relative;
  background: #FFFFFF;
  border-radius: 12px;
  width: 700px;
  max-width: 95vw;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  transform: scale(0.95);
  transition: transform 0.2s ease-out;
}
.sh-overlay.sh-visible .sh-modal { transform: scale(1); }

/* Close button */
.sh-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #94A3B8;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.12s, color 0.12s;
}
.sh-close:hover { background: #F3F4F6; color: #334155; }

/* Header */
.sh-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid #E5E7EB;
}
.sh-header h2 {
  margin: 0;
  color: #1F4E79;
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
}
.sh-header p {
  margin: 4px 0 0;
  color: #64748B;
  font-size: 0.9rem;
}

/* Help cards */
.sh-card {
  padding: 20px 28px;
  border-bottom: 1px solid #F0F1F3;
}
.sh-card:last-of-type { border-bottom: none; }
.sh-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.sh-card-title .sh-icon { font-size: 1.4rem; line-height: 1; }
.sh-card-title h3 {
  margin: 0;
  color: #1F4E79;
  font-size: 1rem;
  font-weight: 700;
}
.sh-card p {
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 8px;
}
.sh-card p:last-of-type { margin-bottom: 0; }

/* Tip box */
.sh-tip {
  background: #EEF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 10px;
  font-size: 0.85rem;
  color: #1F4E79;
  line-height: 1.5;
}
.sh-tip::before {
  content: "💡 Tip: ";
  font-weight: 700;
}

/* Inline calculation example */
.sh-example {
  background: #F0F1F3;
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 10px;
  font-family: 'Inter', monospace;
  font-size: 0.85rem;
  color: #1F4E79;
  text-align: center;
  font-weight: 600;
}

/* Footer */
.sh-footer {
  padding: 18px 28px 22px;
  border-top: 1px solid #E5E7EB;
  text-align: center;
}
.sh-footer button {
  background: #1F4E79;
  color: #FFFFFF;
  border: none;
  padding: 10px 32px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.15s;
}
.sh-footer button:hover { background: #17406A; }
.sh-footer p {
  margin: 10px 0 0;
  font-size: 0.75rem;
  color: #94A3B8;
}

/* Mobile */
@media (max-width: 600px) {
  .sh-modal {
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
  .sh-overlay { padding: 0; }
  .sh-header, .sh-card, .sh-footer { padding-left: 18px; padding-right: 18px; }
}

/* ───────────────────────────────────────────── */
/* Annie tab — voice assessment agent           */
/* ───────────────────────────────────────────── */
#tab-annie { padding: 24px 28px; }
.annie-page { max-width: 1280px; margin: 0 auto; }
.annie-header { margin-bottom: 20px; }
.annie-header h2 { font-size: 22px; font-weight: 700; color: #fff; margin: 0 0 6px; }
.annie-subtitle { font-size: 13px; color: #9CA3AF; }
.annie-subtitle strong { color: #00B050; }

.annie-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1024px) { .annie-grid { grid-template-columns: 1fr; } }

.annie-card {
  background: #131B2E;
  border: 1px solid #1e2d47;
  border-radius: 12px;
  padding: 22px 24px;
}
.annie-card-title {
  font-size: 15px; font-weight: 700; color: #fff;
  margin: 0 0 16px; padding-bottom: 12px;
  border-bottom: 1px solid #1e2d47;
}

.annie-form { display: flex; flex-direction: column; gap: 16px; }
.annie-form label {
  display: block; font-size: 12px; color: #9CA3AF;
  margin-bottom: 6px; font-weight: 500;
}
.annie-form input[type="text"],
.annie-form input[type="tel"],
.annie-form input[type="datetime-local"],
.annie-form select {
  width: 100%;
  padding: 9px 12px;
  background: #0A0F1C;
  border: 1px solid #1e2d47;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
  font-family: inherit;
}
.annie-form input:focus, .annie-form select:focus {
  outline: none; border-color: #1F4E79;
}

.annie-row-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}

.annie-radio-group {
  display: flex; flex-direction: column; gap: 8px;
}
.annie-radio {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: #cbd5e1; cursor: pointer;
  margin: 0;
}
.annie-radio input { margin: 0; cursor: pointer; }

.annie-actions {
  display: flex; align-items: center; gap: 14px;
  padding-top: 6px;
}
.annie-error {
  color: #e05252; font-size: 13px;
}

.annie-confirmation {
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(0, 176, 80, 0.08);
  border: 1px solid rgba(0, 176, 80, 0.4);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
}
.annie-conf-sub {
  font-size: 12px; color: #9CA3AF; margin-top: 4px; font-weight: 400;
}

/* List */
.annie-list { min-height: 80px; }
.annie-empty { color: #64748b; font-size: 14px; padding: 24px 0; text-align: center; }
.annie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.annie-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  font-weight: 600;
  padding: 10px 8px;
  border-bottom: 1px solid #1e2d47;
}
.annie-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #131B2E;
  color: #cbd5e1;
  vertical-align: top;
}
.annie-biz { color: #fff; font-weight: 600; }
.annie-sub { font-size: 11px; color: #64748b; margin-top: 3px; }
.annie-muted { color: #64748b; }
.annie-error-text { color: #e05252; }

/* Chips */
.annie-chip {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.annie-chip-mode-a { background: rgba(255, 102, 0, 0.16); color: #FF6600; }
.annie-chip-mode-b { background: rgba(31, 78, 121, 0.4); color: #6BA4E0; }
.annie-status-scheduled { background: rgba(100, 116, 139, 0.25); color: #94A3B8; }
.annie-status-dialing   { background: rgba(217, 119, 6, 0.18); color: #FBBF24; }
.annie-status-live      { background: rgba(0, 176, 80, 0.18); color: #34C759; }
.annie-status-done      { background: rgba(0, 176, 80, 0.25); color: #00B050; }
.annie-status-warn      { background: rgba(217, 119, 6, 0.18); color: #FBBF24; }
.annie-status-fail      { background: rgba(220, 38, 38, 0.18); color: #F87171; }

.annie-table a { color: #6BA4E0; text-decoration: none; }
.annie-table a:hover { text-decoration: underline; }

/* Pipeline-card "Send to Annie" mini button */
.pl-card-annie-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FF6600;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}
.pl-card { position: relative; }
.pl-card:hover .pl-card-annie-btn { display: inline-flex; }
.pl-card-annie-btn:hover { background: #E55C00; }

/* === CAMPAIGN SELECTOR === */
/* Sits below the topnav in document flow so the station switcher and
   logout button stay accessible while the user is picking a campaign.
   Earlier versions used position:fixed inset:0 which covered the topnav. */
.campaign-selector {
  min-height: calc(100vh - 64px);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 1rem;
}
.campaign-selector-inner {
  width: 100%;
  max-width: 900px;
  padding: 2rem 1.5rem;
}
.campaign-selector-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.campaign-selector-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
}
.campaign-selector-title .accent { color: var(--green); }
.campaign-selector-subtitle {
  color: var(--gray-500);
  font-size: 1rem;
  margin-top: 0.5rem;
}
.campaign-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.campaign-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow);
}
.campaign-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-lg);
}
.campaign-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.75rem;
}
.campaign-category-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.campaign-role-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--gray-700);
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  text-transform: uppercase;
}
.campaign-card-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.4rem;
}
.campaign-card-desc {
  font-size: 0.8rem;
  color: var(--gray-500);
  line-height: 1.4;
  margin-bottom: 1rem;
}
.campaign-card-stats {
  display: flex;
  gap: 1.5rem;
  border-top: 1px solid var(--gray-200);
  padding-top: 0.75rem;
}
.campaign-stat { display: flex; flex-direction: column; }
.campaign-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
}
.campaign-stat-label {
  font-size: 0.7rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.campaign-empty {
  text-align: center;
  color: var(--gray-500);
  padding: 3rem;
  font-size: 1rem;
}

/* === CAMPAIGN HEADER BAR === */
.campaign-header-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 24px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}
.campaign-back-btn {
  color: var(--gray-700) !important;
  border-color: var(--gray-300) !important;
  font-size: 0.78rem !important;
}
.campaign-back-btn:hover {
  color: var(--navy) !important;
  border-color: var(--gray-400) !important;
  background: var(--gray-100) !important;
}
.campaign-header-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gray-900);
}
.campaign-header-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════════════════
   BDR QUEUE — Curated landing queue (callbacks + top 100)
   ═══════════════════════════════════════════════════════════ */

#bdr-queue-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bdr-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-400);
  font-size: 0.9rem;
}

/* ── Sections (Callbacks / Best Leads) ───────────────────── */

.bdr-section {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}

.bdr-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.bdr-callback-header {
  background: #fef2f2;
  border-bottom-color: #fecaca;
}

.bdr-section-icon { font-size: 1.1rem; }

.bdr-section-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-800);
}

.bdr-section-count {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* ── Lead Rows ───────────────────────────────────────────── */

.bdr-lead-list {
  max-height: 60vh;
  overflow-y: auto;
}

.bdr-lead-row {
  display: flex;
  align-items: center;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background 0.1s;
}

.bdr-lead-row:last-child { border-bottom: none; }
.bdr-lead-row:hover { background: var(--gray-50); }

.bdr-row-callback { background: #fff5f5; }
.bdr-row-callback:hover { background: #fef2f2; }

.bdr-row-locked { opacity: 0.55; }
.bdr-row-locked .bdr-call-btn { pointer-events: none; }

.bdr-row-main {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 1rem;
}

.bdr-row-left {
  flex: 1;
  min-width: 0;
}

.bdr-lead-name {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bdr-lead-meta {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.bdr-row-center {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.bdr-score {
  font-size: 0.75rem;
  color: var(--gray-600);
  font-weight: 500;
}

.bdr-review {
  font-size: 0.7rem;
  color: var(--gray-400);
}

.bdr-row-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.bdr-phone {
  font-size: 0.8rem;
  color: var(--gray-600);
  font-family: 'Inter', monospace;
}

.bdr-call-btn {
  padding: 0.3rem 0.9rem !important;
  font-weight: 700;
  font-size: 0.75rem !important;
  letter-spacing: 0.03em;
}

/* ── Lock Badge (named agent) ────────────────────────────── */

.bdr-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #F59E0B;
  color: #000;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Urgency Badges (callbacks) ──────────────────────────── */

.bdr-urgency-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.bdr-overdue {
  background: #fecaca;
  color: #991b1b;
}

.bdr-upcoming {
  background: #dbeafe;
  color: #1e40af;
}

/* ── All-Leads Escape Hatch ──────────────────────────────── */

.bdr-all-leads-link {
  text-align: center;
  padding: 0.75rem;
}

.bdr-all-leads-link a {
  color: var(--gray-500);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 0.15s;
}

.bdr-all-leads-link a:hover { color: var(--navy); }

/* ── Empty State ─────────────────────────────────────────── */

.bdr-empty {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}

.bdr-empty-icon { font-size: 2rem; margin-bottom: 0.5rem; }

.bdr-empty-text {
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.3rem;
}

.bdr-empty-hint {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-bottom: 1rem;
}

/* ── Callback Quick-Pick Buttons (Disposition Modal) ─────── */

.cb-quick-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin: 0.6rem 0;
}

.cb-pick-btn {
  padding: 0.4rem 0.75rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.15s;
}

.cb-pick-btn:hover {
  background: var(--gray-200);
  border-color: var(--gray-400);
}

.cb-pick-active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.cb-pick-active:hover {
  background: var(--navy-light);
  border-color: var(--navy-light);
}

.cb-custom-input {
  margin-top: 0.5rem;
}

/* ── Responsive: BDR Queue ───────────────────────────────── */

@media (max-width: 768px) {
  .bdr-row-main {
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .bdr-row-center {
    order: 3;
    width: 100%;
    gap: 0.5rem;
  }
  .bdr-review { display: none; }
  .bdr-phone { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   ADMIN DASHBOARD — Live Wallboard + Scoreboard
   ═══════════════════════════════════════════════════════════ */

.adm-page {
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.adm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.adm-header h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: #1F2937;
}

.adm-loading, .adm-empty {
  color: #6B7280;
  font-size: 0.85rem;
  padding: 1rem 0;
}

/* ── Agent Status Cards ────────────────────────────────── */

.adm-summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.adm-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid;
  border-radius: 20px;
  font-size: 0.78rem;
  color: #374151;
  background: #F9FAFB;
}
.adm-summary-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.adm-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.adm-agent-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.adm-agent-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.adm-state-on_call { border-left: 3px solid #00B050; }
.adm-state-wrapping { border-left: 3px solid #F59E0B; }
.adm-state-idle { border-left: 3px solid #3B82F6; }
.adm-state-online { border-left: 3px solid #6B7280; }
.adm-state-offline { border-left: 3px solid #D1D5DB; opacity: 0.6; }

.adm-agent-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.adm-agent-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: #1F2937;
  display: flex;
  align-items: center;
  gap: 6px;
}
.adm-agent-state {
  font-size: 0.75rem;
  color: #6B7280;
  margin-top: 2px;
}
.adm-role-badge {
  font-size: 0.65rem;
  background: #DBEAFE;
  color: #1E40AF;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
}

/* ── Campaign Pulse Strip ──────────────────────────────── */

.adm-pulse-strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}
.adm-pulse-card {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  min-width: 180px;
}
.adm-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.adm-pulse-name {
  font-weight: 600;
  font-size: 0.82rem;
  color: #1F2937;
}
.adm-pulse-stats {
  display: flex;
  flex-direction: column;
  font-size: 0.72rem;
  color: #6B7280;
}
.adm-pulse-calls {
  color: #00B050;
  font-weight: 600;
}

/* ── Scoreboard + Charts Grid ──────────────────────────── */

.adm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.adm-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.adm-card-wide {
  grid-column: span 2;
}
.adm-card-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1F2937;
  margin-bottom: 1rem;
}

.adm-card canvas {
  max-height: 280px;
}

/* ── Scoreboard Table ──────────────────────────────────── */

.adm-scoreboard-wrap {
  overflow-x: auto;
}
.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.adm-table th {
  text-align: left;
  padding: 8px 12px;
  color: #6B7280;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
}
.adm-table td {
  padding: 10px 12px;
  color: #374151;
  border-bottom: 1px solid #F3F4F6;
}
.adm-table tbody tr:hover {
  background: #F9FAFB;
}
.adm-sortable {
  cursor: pointer;
  user-select: none;
}
.adm-sortable:hover {
  color: #1F2937;
}

/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 900px) {
  .adm-grid {
    grid-template-columns: 1fr;
  }
  .adm-card-wide {
    grid-column: span 1;
  }
  .adm-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

/* ============================================================
   SHADOW — AI Sales Training Simulator
   ============================================================ */

/* Page layout */
.shadow-page { padding: 24px; max-width: 1200px; margin: 0 auto; }
.shadow-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.shadow-title { font-family: 'Poppins', sans-serif; font-size: 1.6rem; font-weight: 700; color: #1F4E79; margin: 0; }
.shadow-subtitle { color: #6B7280; font-size: 0.9rem; margin-top: 2px; }
.shadow-admin-btn { font-size: 0.8rem; }
.shadow-section-title { font-family: 'Poppins', sans-serif; font-size: 1.1rem; font-weight: 600; color: #1F4E79; margin: 28px 0 14px; }
.shadow-empty { color: #9CA3AF; font-size: 0.9rem; padding: 16px 0; }

/* Certification Progress Bar */
.cert-progress { margin-bottom: 24px; padding: 18px 20px; background: #F9FAFB; border-radius: 12px; border: 1px solid #E5E7EB; }
.cert-path { display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: wrap; }
.cert-level { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 90px; }
.cert-icon {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; border: 2px solid #D1D5DB; background: #fff; color: #9CA3AF;
}
.cert-level.earned .cert-icon { background: #00B050; color: #fff; border-color: #00B050; }
.cert-level.current .cert-icon { background: #1F4E79; color: #fff; border-color: #1F4E79; }
.cert-level.locked .cert-icon { background: #F3F4F6; font-size: 12px; }
.cert-icon.pulse { animation: certPulse 2s ease-in-out infinite; }
@keyframes certPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(31,78,121,0.3); } 50% { box-shadow: 0 0 0 8px rgba(31,78,121,0); } }
.cert-name { font-size: 10px; font-weight: 600; color: #374151; text-align: center; white-space: nowrap; }
.cert-detail { font-size: 9px; color: #6B7280; }
.cert-connector { width: 30px; height: 2px; background: #D1D5DB; margin: 0 2px; flex-shrink: 0; align-self: center; margin-bottom: 16px; }
.cert-connector.earned { background: #00B050; }

/* Scenario Groups */
.scenario-group { margin-bottom: 22px; }
.persona-label { font-family: 'Poppins', sans-serif; font-size: 0.95rem; font-weight: 600; color: #374151; margin-bottom: 10px; }
.scenario-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.scenario-card {
  background: #fff; border: 1px solid #E5E7EB; border-radius: 10px; padding: 14px;
  position: relative; overflow: hidden; transition: border-color .15s, box-shadow .15s;
}
.scenario-card:hover:not(.scenario-locked) { border-color: #1F4E79; box-shadow: 0 2px 8px rgba(31,78,121,0.1); }
.scenario-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.difficulty-stars { color: #FF6600; font-size: 12px; letter-spacing: 1px; }
.difficulty-label { font-size: 9px; color: #9CA3AF; font-weight: 600; text-transform: uppercase; }
.scenario-name { font-size: 0.85rem; font-weight: 600; color: #1F4E79; margin-bottom: 4px; }
.scenario-desc { font-size: 0.75rem; color: #6B7280; margin-bottom: 8px; line-height: 1.4; }
.scenario-best { font-size: 0.75rem; color: #00B050; margin-bottom: 8px; }
.start-training-btn {
  width: 100%; padding: 8px; background: #1F4E79; color: #fff; border: none; border-radius: 6px;
  font-family: 'Inter', sans-serif; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: background .15s;
}
.start-training-btn:hover { background: #163a5c; }
.start-training-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Lock overlay */
.scenario-locked { opacity: 0.5; }
.lock-overlay {
  position: absolute; inset: 0; background: rgba(255,255,255,0.85); display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  z-index: 2; font-size: 0.75rem; color: #6B7280; font-weight: 600;
}
.lock-overlay span:first-child { font-size: 20px; }

/* Active Call Screen */
.shadow-call-screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 60vh; padding: 40px 20px; text-align: center;
}
.shadow-call-header { margin-bottom: 16px; }
.persona-badge {
  display: inline-block; padding: 6px 14px; background: #EFF6FF; color: #1F4E79;
  border-radius: 20px; font-size: 0.8rem; font-weight: 600; font-family: 'Inter', sans-serif;
}
.shadow-call-character { display: block; font-size: 0.75rem; color: #9CA3AF; margin-top: 4px; }
.shadow-call-timer {
  font-family: 'Poppins', monospace; font-size: 3rem; font-weight: 700; color: #1F4E79; margin: 16px 0;
}
.shadow-call-status { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: #374151; font-size: 0.9rem; }
.pulse-dot { width: 10px; height: 10px; border-radius: 50%; }
.pulse-dot.green { background: #00B050; animation: pulseDot 1.5s infinite; }
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.shadow-call-scenario { color: #6B7280; font-size: 0.85rem; margin-bottom: 28px; }
.shadow-end-btn { margin-top: 0; }
.shadow-call-hint { color: #9CA3AF; font-size: 0.8rem; margin-top: 20px; }

/* Scorecard */
.shadow-scorecard { max-width: 600px; margin: 0 auto; padding: 28px 20px; }
.scorecard-loading { text-align: center; padding: 60px 20px; }
.scorecard-loading h3 { color: #1F4E79; margin-top: 16px; font-family: 'Poppins', sans-serif; }
.scorecard-loading p { color: #6B7280; margin-top: 4px; font-size: 0.9rem; }
.score-spinner {
  width: 40px; height: 40px; border: 4px solid #E5E7EB; border-top: 4px solid #1F4E79;
  border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.scorecard-header { text-align: center; margin-bottom: 24px; }
.grade-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%; font-family: 'Poppins', sans-serif;
  font-size: 1.8rem; font-weight: 800; color: #fff;
}
.overall-score { font-size: 1.1rem; color: #374151; font-weight: 600; margin-top: 8px; }
.scorecard-scenario { color: #9CA3AF; font-size: 0.8rem; margin-top: 2px; }

/* Score bars */
.score-categories { margin-bottom: 20px; }
.score-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cat-name { width: 120px; font-size: 0.8rem; color: #374151; font-weight: 500; flex-shrink: 0; }
.score-bar-track { flex: 1; height: 8px; background: #F3F4F6; border-radius: 4px; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.cat-score { width: 30px; text-align: right; font-size: 0.85rem; font-weight: 700; }

/* Feedback sections */
.feedback-section { padding: 14px 16px; border-radius: 8px; margin-bottom: 12px; }
.feedback-section h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.feedback-section p { font-size: 0.85rem; color: #374151; line-height: 1.5; }
.feedback-good { background: #F0FDF4; border: 1px solid #BBF7D0; }
.feedback-good h4 { color: #166534; }
.feedback-improve { background: #FFF7ED; border: 1px solid #FED7AA; }
.feedback-improve h4 { color: #9A3412; }

/* Coaching quotes */
.coaching-quotes { margin-bottom: 20px; }
.coaching-quotes h4 { font-size: 0.9rem; color: #1F4E79; margin-bottom: 10px; }
.coaching-quote {
  padding: 12px 14px; background: #F9FAFB; border-left: 3px solid #1F4E79;
  border-radius: 0 6px 6px 0; margin-bottom: 8px;
}
.quote-text { font-size: 0.85rem; color: #1F4E79; font-style: italic; margin-bottom: 4px; }
.quote-role { font-size: 0.7rem; color: #9CA3AF; font-weight: 600; text-transform: uppercase; }
.quote-coaching { font-size: 0.8rem; color: #374151; margin-top: 4px; }

.scorecard-actions { display: flex; gap: 10px; justify-content: center; margin-top: 24px; }

/* Celebration */
.cert-celebrate { text-align: center; padding: 32px 20px; margin-top: 24px; background: #FFFBEB; border: 2px solid #FDE68A; border-radius: 12px; position: relative; overflow: hidden; }
.cert-celebrate-badge { font-size: 48px; margin-bottom: 8px; }
.cert-celebrate h2 { font-family: 'Poppins', sans-serif; color: #1F4E79; margin-bottom: 4px; }
.cert-celebrate p { color: #6B7280; font-size: 0.9rem; }
.cert-celebrate-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti-piece {
  position: absolute; top: -10px; width: 8px; height: 8px; border-radius: 2px;
  animation: confettiFall 3s ease-in forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(400px) rotate(720deg); opacity: 0; }
}

/* Charts */
.shadow-charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.shadow-chart-card { background: #fff; border: 1px solid #E5E7EB; border-radius: 10px; padding: 16px; }
.shadow-chart-card h4 { font-size: 0.8rem; color: #6B7280; margin-bottom: 8px; font-weight: 600; }

/* Session history table */
.shadow-history { margin-bottom: 20px; }
.shadow-history h4 { font-size: 0.9rem; color: #374151; margin-bottom: 8px; font-weight: 600; }
.shadow-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.shadow-table th { text-align: left; padding: 8px 10px; background: #F9FAFB; color: #6B7280; font-weight: 600; border-bottom: 1px solid #E5E7EB; }
.shadow-table td { padding: 8px 10px; border-bottom: 1px solid #F3F4F6; color: #374151; }
.shadow-table tbody tr:hover { background: #F9FAFB; }

/* Grade pills */
.grade-pill {
  display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.7rem; font-weight: 700;
}
.grade-a { background: #DCFCE7; color: #166534; }
.grade-b { background: #DBEAFE; color: #1E40AF; }
.grade-c { background: #FEF3C7; color: #92400E; }
.grade-d { background: #FED7AA; color: #9A3412; }
.grade-f { background: #FEE2E2; color: #991B1B; }

/* Badges */
.shadow-badges { margin-bottom: 20px; }
.shadow-badges h4 { font-size: 0.9rem; color: #374151; margin-bottom: 10px; font-weight: 600; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.badge-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px;
  border-radius: 8px; border: 1px solid #E5E7EB; text-align: center;
}
.badge-earned { background: #FFF7ED; border-color: #FF6600; }
.badge-locked { opacity: 0.35; }
.badge-icon { font-size: 22px; }
.badge-name { font-size: 0.65rem; font-weight: 600; color: #374151; }

/* Admin views */
.shadow-admin { margin-top: 10px; }
.shadow-admin-section { margin-bottom: 24px; }
.shadow-admin-section h3 { font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 600; color: #1F4E79; margin-bottom: 12px; }
.admin-row-clickable { cursor: pointer; }
.admin-row-clickable:hover { background: #EFF6FF; }
.cert-mini-badge {
  display: inline-block; padding: 2px 8px; background: #EFF6FF; color: #1F4E79;
  border-radius: 10px; font-size: 0.7rem; font-weight: 600; border: 1px solid #BFDBFE;
}
.shadow-sm-table { font-size: 0.75rem; }

/* Drill-down */
.shadow-drill { padding: 16px; background: #F9FAFB; border-radius: 10px; border: 1px solid #E5E7EB; margin-top: 16px; }
.drill-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.drill-header h3 { font-family: 'Poppins', sans-serif; color: #1F4E79; margin: 0; }
.drill-certs { margin-bottom: 14px; }
.shadow-drill h4 { font-size: 0.85rem; color: #374151; margin: 14px 0 8px; font-weight: 600; }

/* Scenario form modal */
.scenario-form-modal { background: #fff; border-radius: 12px; padding: 24px; max-width: 520px; width: 90%; max-height: 80vh; overflow-y: auto; }
.scenario-form-modal h3 { font-family: 'Poppins', sans-serif; color: #1F4E79; margin-bottom: 16px; }
.sf-row { margin-bottom: 10px; }
.sf-row label { display: block; font-size: 0.75rem; font-weight: 600; color: #6B7280; margin-bottom: 3px; }
.sf-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* Shadow responsive */
@media (max-width: 768px) {
  .shadow-charts-row { grid-template-columns: 1fr; }
  .scenario-cards { grid-template-columns: 1fr 1fr; }
  .cert-path { gap: 4px; }
  .cert-level { min-width: 60px; }
  .cert-connector { width: 16px; }
}
@media (max-width: 480px) {
  .scenario-cards { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   REBUTTAL RANGE
   ═══════════════════════════════════════════════════════════ */
.rr-loading, .rr-error { text-align: center; padding: 3rem; color: var(--gray-500); font-size: 0.95rem; }
.rr-error { color: var(--hot); }
.rr-empty { color: var(--gray-400); font-size: 0.85rem; font-style: italic; padding: 0.5rem 0; }

/* Home */
.rr-home { max-width: 900px; margin: 0 auto; padding: 1.5rem; }
.rr-header { margin-bottom: 1.5rem; }
.rr-header-stats { display: flex; gap: 2rem; justify-content: center; padding: 1rem; background: var(--gray-50); border-radius: 12px; }
.rr-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rr-stat-value { font-size: 1.6rem; font-weight: 700; color: var(--navy); }
.rr-stat-label { font-size: 0.75rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; }

.rr-challenge { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; background: linear-gradient(135deg, #fff8e1, #fff3cd); border: 1px solid #ffe082; border-radius: 10px; margin-bottom: 1.5rem; }
.rr-challenge-done { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); border-color: #a5d6a7; }
.rr-challenge-icon { font-size: 1.5rem; }
.rr-challenge-text { display: flex; flex-direction: column; gap: 2px; }
.rr-challenge-text strong { font-size: 0.95rem; color: var(--gray-800); }
.rr-challenge-text span { font-size: 0.8rem; color: var(--gray-600); }

.rr-section-title { font-size: 0.9rem; font-weight: 600; color: var(--gray-700); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; }

/* Category cards */
.rr-categories { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.rr-category-card { background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; padding: 1.25rem; transition: box-shadow 0.15s; }
.rr-category-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.rr-category-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.rr-category-icon { font-size: 1.75rem; }
.rr-category-info h4 { font-size: 1rem; font-weight: 600; color: var(--gray-800); margin: 0; }
.rr-tier-badge { font-size: 0.75rem; color: var(--navy); }
.rr-category-desc { font-size: 0.8rem; color: var(--gray-500); margin-bottom: 0.75rem; line-height: 1.4; }
.rr-progress-bar-wrap { height: 6px; background: var(--gray-100); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.rr-progress-bar { height: 100%; background: linear-gradient(90deg, var(--green), var(--green-light)); border-radius: 3px; transition: width 0.3s; }
.rr-progress-label { font-size: 0.72rem; color: var(--gray-400); margin-bottom: 0.75rem; }

/* Buttons */
.rr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; border: none; border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; padding: 0.6rem 1.25rem; transition: all 0.12s; }
.rr-btn-primary { background: var(--navy); color: #fff; }
.rr-btn-primary:hover { background: var(--navy-light); }
.rr-btn-outline { background: transparent; color: var(--navy); border: 1px solid var(--gray-300); }
.rr-btn-outline:hover { background: var(--gray-50); }
.rr-btn-ghost { background: none; color: var(--gray-500); padding: 0.4rem 0.8rem; }
.rr-btn-ghost:hover { color: var(--gray-700); }
.rr-btn-success { background: var(--green); color: #fff; padding: 0.75rem 2rem; font-size: 1rem; }
.rr-btn-success:hover { background: var(--green-light); }
.rr-btn-fail { background: var(--hot); color: #fff; padding: 0.75rem 2rem; font-size: 1rem; }
.rr-btn-fail:hover { opacity: 0.9; }
.rr-btn-icon { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 50%; width: 40px; height: 40px; font-size: 1.2rem; cursor: pointer; }
.rr-btn-icon:hover { background: var(--gray-100); }
.rr-btn-sm { font-size: 0.78rem; padding: 0.4rem 0.8rem; }

/* Leaderboard */
.rr-bottom-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.rr-leaderboard-panel, .rr-badges-panel { background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; padding: 1rem; }
.rr-leaderboard { display: flex; flex-direction: column; gap: 0.4rem; }
.rr-lb-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.75rem; border-radius: 6px; font-size: 0.85rem; }
.rr-lb-top { background: var(--gray-50); }
.rr-lb-rank { font-size: 1rem; min-width: 24px; }
.rr-lb-name { flex: 1; font-weight: 500; color: var(--gray-700); }
.rr-lb-reps { font-weight: 600; color: var(--navy); min-width: 60px; }
.rr-lb-rate { font-size: 0.78rem; color: var(--gray-500); min-width: 40px; text-align: right; }

/* Badges */
.rr-badge-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.rr-badge { display: flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.7rem; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 20px; font-size: 0.78rem; }
.rr-badge-new { background: #fff8e1; border-color: #ffe082; animation: rr-badge-pop 0.4s ease; }
.rr-badge-icon { font-size: 1rem; }
.rr-badge-label { color: var(--gray-700); font-weight: 500; }
@keyframes rr-badge-pop { 0% { transform: scale(0.8); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

.rr-admin-link { text-align: center; margin-top: 0.5rem; }

/* Drill view */
.rr-drill { max-width: 640px; margin: 0 auto; padding: 1.5rem; }
.rr-drill-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.rr-drill-category { font-size: 0.9rem; font-weight: 600; color: var(--navy); flex: 1; }
.rr-drill-counter { font-size: 0.85rem; color: var(--gray-500); font-weight: 600; }
.rr-drill-progress-track { height: 4px; background: var(--gray-100); border-radius: 2px; margin-bottom: 1.5rem; overflow: hidden; }
.rr-drill-progress-fill { height: 100%; background: var(--green); border-radius: 2px; transition: width 0.3s; }

.rr-compliance-badge { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.8rem; background: #fff3e0; border: 1px solid #ffcc80; border-radius: 6px; font-size: 0.78rem; color: #e65100; margin-bottom: 1rem; font-weight: 500; }

.rr-prompt-card { background: #fff; border: 2px solid var(--gray-200); border-radius: 16px; padding: 2rem; text-align: center; margin-bottom: 1.5rem; }
.rr-prompt-text { font-size: 1.35rem; font-weight: 600; color: var(--gray-800); line-height: 1.4; margin-bottom: 1rem; font-style: italic; }

.rr-drill-actions { text-align: center; }
.rr-drill-instruction { font-size: 0.8rem; color: var(--gray-400); margin-bottom: 0.25rem; }
.rr-drill-question { font-size: 1rem; font-weight: 600; color: var(--gray-700); margin-bottom: 1rem; }
.rr-score-buttons { display: flex; gap: 1rem; justify-content: center; margin-bottom: 1rem; }

/* Teach-back */
.rr-teach-card { background: #fff; border-radius: 12px; padding: 1.5rem; text-align: left; border: 2px solid var(--gray-200); }
.rr-teach-success { border-color: #a5d6a7; background: #f1f8f1; }
.rr-teach-fail { border-color: #ffcc80; background: #fffaf0; }
.rr-teach-card h4 { margin-bottom: 0.75rem; font-size: 1rem; }
.rr-gold-rebuttal { margin: 0 0 0.75rem; padding: 0.75rem 1rem; border-left: 3px solid var(--navy); color: var(--gray-700); font-size: 0.92rem; line-height: 1.5; font-style: italic; background: rgba(31,78,121,0.04); border-radius: 0 6px 6px 0; }
.rr-coaching-tip { font-size: 0.82rem; color: var(--gray-600); margin-bottom: 1rem; line-height: 1.4; }
.rr-teach-card .rr-btn { margin-top: 0.5rem; }

/* Results view */
.rr-results { max-width: 500px; margin: 0 auto; padding: 2rem; text-align: center; }
.rr-results-header { margin-bottom: 1.5rem; }
.rr-results-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.rr-results-header h2 { font-size: 1.5rem; color: var(--gray-800); margin-bottom: 0.25rem; }
.rr-results-category { font-size: 0.9rem; color: var(--gray-500); }
.rr-results-stats { display: flex; gap: 2rem; justify-content: center; margin-bottom: 1.5rem; padding: 1rem; background: var(--gray-50); border-radius: 12px; }
.rr-new-badges { margin-bottom: 1.5rem; }
.rr-new-badges h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.rr-results-actions { display: flex; gap: 1rem; justify-content: center; }

/* Admin dashboard */
.rr-admin { max-width: 900px; margin: 0 auto; padding: 1.5rem; }
.rr-admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.rr-admin-header h2 { font-size: 1.25rem; color: var(--gray-800); }
.rr-admin-section { background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; padding: 1.25rem; margin-bottom: 1rem; }
.rr-admin-section h3 { font-size: 0.9rem; font-weight: 600; color: var(--gray-700); margin-bottom: 0.75rem; }
.rr-admin-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.rr-admin-table th { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 2px solid var(--gray-200); color: var(--gray-500); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; }
.rr-admin-table td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); }
.rr-prompt-cell { max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-rate-low { color: var(--hot); font-weight: 600; }
.rr-rate-ok { color: var(--green); font-weight: 600; }

/* Mic recording UI */
.rr-mic-area { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.rr-mic-btn { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1.25rem 2rem; border-radius: 50px; background: var(--gray-100); border: 2px solid var(--gray-300); font-size: 1rem; cursor: pointer; transition: all 0.2s; }
.rr-mic-btn:hover { border-color: var(--primary); background: #f0f4ff; }
.rr-mic-btn.rr-mic-recording { background: #fff0f0; border-color: var(--hot); animation: rr-pulse 1.5s infinite; }
.rr-mic-icon { font-size: 2rem; }
.rr-mic-label { font-size: 0.85rem; font-weight: 600; color: var(--gray-700); }

@keyframes rr-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3); }
  50% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
}

.rr-transcript-preview { width: 100%; max-width: 600px; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 10px; padding: 1rem; }
.rr-transcript-text { font-size: 0.9rem; color: var(--gray-700); font-style: italic; line-height: 1.5; margin-bottom: 0.75rem; min-height: 2rem; }
.rr-transcript-actions { display: flex; gap: 0.75rem; justify-content: center; }

.rr-grading-spinner { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 2rem; }
.rr-grading-spinner p { font-size: 0.9rem; color: var(--gray-500); }
.rr-spinner { width: 36px; height: 36px; border: 3px solid var(--gray-200); border-top-color: var(--primary); border-radius: 50%; animation: rr-spin 0.8s linear infinite; }
@keyframes rr-spin { to { transform: rotate(360deg); } }

/* AI Grade feedback */
.rr-grade-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.rr-grade-icon { font-size: 1.75rem; }
.rr-grade-label { font-size: 1.1rem; font-weight: 700; color: var(--gray-800); }
.rr-grade-score { margin-left: auto; font-size: 1.25rem; font-weight: 700; color: var(--primary); background: var(--gray-50); padding: 0.25rem 0.75rem; border-radius: 20px; }
.rr-ai-feedback { font-size: 0.9rem; color: var(--gray-700); line-height: 1.6; margin-bottom: 0.75rem; }
.rr-ai-highlight { font-size: 0.85rem; color: var(--green); font-style: italic; margin-bottom: 0.75rem; }
.rr-teach-warn { background: #fffbeb; border-color: #f59e0b; }
.rr-retry-notice { font-weight: 600; color: #b45309; margin: 8px 0 4px; font-size: 0.95rem; }

.rr-greeting { font-size: 1.1rem; color: var(--gray-700); margin-bottom: 0.5rem; }
.rr-lb-ai { font-size: 0.8rem; color: var(--navy); font-weight: 600; }

.rr-scorecard { margin-top: 1.5rem; }
.rr-scorecard-list { display: flex; flex-direction: column; gap: 0.5rem; }
.rr-scorecard-row { display: flex; gap: 0.75rem; padding: 0.75rem; border-radius: 8px; border-left: 4px solid #e5e7eb; background: #fafbfc; }
.rr-scorecard-pass { border-left-color: #22c55e; background: #f0fdf4; }
.rr-scorecard-fail { border-left-color: #ef4444; background: #fef2f2; }
.rr-scorecard-skipped { border-left-color: #9ca3af; background: #f9fafb; opacity: 0.7; }
.rr-scorecard-num { font-weight: 700; color: var(--gray-500); min-width: 1.5rem; padding-top: 2px; }
.rr-scorecard-body { flex: 1; min-width: 0; }
.rr-scorecard-prompt { font-weight: 600; font-size: 0.9rem; color: var(--navy); margin-bottom: 4px; }
.rr-scorecard-tag { display: inline-block; font-size: 0.8rem; font-weight: 600; padding: 2px 8px; border-radius: 4px; background: var(--gray-100); margin-bottom: 4px; }
.rr-tag-skip { color: var(--gray-500); }
.rr-scorecard-transcript { font-size: 0.82rem; color: var(--gray-600); font-style: italic; margin-bottom: 4px; line-height: 1.4; }
.rr-scorecard-feedback { font-size: 0.82rem; color: var(--gray-700); line-height: 1.4; }

@media (max-width: 768px) {
  .rr-bottom-panels { grid-template-columns: 1fr; }
  .rr-categories { grid-template-columns: 1fr; }
  .rr-header-stats { gap: 1rem; }
  .rr-results-stats { gap: 1rem; }
}
