/* ============================================
   RAPID IMPACT DASHBOARD — DESIGN SYSTEM
   ============================================ */

:root {
  /* Brand — darkened for light mode contrast */
  --lime: #b8e600;
  --lime-dim: #8fb800;
  --lime-glow: rgba(184, 230, 0, 0.15);
  --lime-text: #5c8a00;

  /* Semantic */
  --hot: #ff3b3b;
  --hot-bg: rgba(255, 59, 59, 0.08);
  --hot-border: rgba(255, 59, 59, 0.25);
  --warm: #f59e0b;
  --warm-bg: rgba(245, 158, 11, 0.08);
  --warm-border: rgba(245, 158, 11, 0.25);
  --cool: #3b82f6;
  --cool-bg: rgba(59, 130, 246, 0.08);
  --cool-border: rgba(59, 130, 246, 0.25);
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.08);
  --new: #8b5cf6;
  --new-bg: rgba(139, 92, 246, 0.08);

  /* Surfaces */
  --bg: #f8f9fb;
  --card: #ffffff;
  --card-hover: #fafbfc;
  --border: #e8eaed;
  --border-light: #f0f1f3;

  /* Text */
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --text-inverse: #ffffff;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-xl: 0 8px 32px rgba(0,0,0,0.10);

  /* Sizing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 100px;
  --nav-height: 56px;
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  /* Brand — bright lime pops on dark */
  --lime: #c8ff00;
  --lime-dim: #a8d900;
  --lime-glow: rgba(200, 255, 0, 0.12);
  --lime-text: #a8d900;

  /* Semantic — slightly brighter for dark bg */
  --hot: #ff4d4d;
  --hot-bg: rgba(255, 77, 77, 0.12);
  --hot-border: rgba(255, 77, 77, 0.30);
  --warm: #fbbf24;
  --warm-bg: rgba(251, 191, 36, 0.12);
  --warm-border: rgba(251, 191, 36, 0.30);
  --cool: #60a5fa;
  --cool-bg: rgba(96, 165, 250, 0.12);
  --cool-border: rgba(96, 165, 250, 0.30);
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.12);
  --new: #a78bfa;
  --new-bg: rgba(167, 139, 250, 0.12);

  /* Surfaces */
  --bg: #0f1117;
  --card: #1a1d27;
  --card-hover: #21242f;
  --border: #2a2d3a;
  --border-light: #1f222d;

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-inverse: #0f1117;

  /* Shadows — heavier for dark */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.20);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.30);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-xl: 0 8px 32px rgba(0,0,0,0.40);
}

/* Dark mode specific overrides for hardcoded colors */
[data-theme="dark"] body { background: var(--bg); }
[data-theme="dark"] .topnav { background: var(--card); border-color: var(--border); }
[data-theme="dark"] .user-avatar { color: var(--text-inverse); }
[data-theme="dark"] .user-menu-avatar { color: var(--text-inverse); }
[data-theme="dark"] .prospect-service-tag { background: rgba(96,165,250,0.15); color: var(--cool); }
[data-theme="dark"] .mini-step.active .mini-step-dot { color: #0f1117; }
[data-theme="dark"] .mini-step.done .mini-step-dot { background: rgba(200,255,0,0.15); border-color: rgba(200,255,0,0.3); }
[data-theme="dark"] .fit-yes { color: var(--success); }
[data-theme="dark"] .fit-no { color: var(--text-tertiary); }
[data-theme="dark"] .toast-container .toast { background: #1e293b; color: var(--text-primary); }
[data-theme="dark"] .toast-success { border-left-color: var(--success); }
[data-theme="dark"] .toast-warning { border-left-color: var(--warm); }
[data-theme="dark"] .toast-error { border-left-color: var(--hot); }
[data-theme="dark"] .loading-overlay { background: rgba(15, 17, 23, 0.92); }
[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,0.7); }
[data-theme="dark"] .modal { background: var(--card); }
[data-theme="dark"] .modal-input, [data-theme="dark"] .modal-input select { background: var(--bg); color: var(--text-primary); border-color: var(--border); }
[data-theme="dark"] .note-form textarea { background: var(--bg); color: var(--text-primary); border-color: var(--border); }
[data-theme="dark"] .sort-select { background: var(--card); color: var(--text-primary); border-color: var(--border); }
[data-theme="dark"] .search-input { background: var(--card); color: var(--text-primary); border-color: var(--border); }
[data-theme="dark"] .notif-panel { background: var(--card); border-color: var(--border); }
[data-theme="dark"] .user-menu-panel { background: var(--card); border-color: var(--border); }
[data-theme="dark"] .error-banner code { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .prospect-empty code { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .insight-number { color: var(--lime); }
[data-theme="dark"] .funnel-bar-won { background: linear-gradient(90deg, var(--success), #34d399); }

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }
h1, h2, h3, h4 { font-weight: 600; }

/* ===== TOP NAV ===== */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  padding: 0 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.topnav-left { display: flex; align-items: center; gap: 32px; }
.topnav-right { display: flex; align-items: center; gap: 16px; }

.logo { display: flex; align-items: center; gap: 8px; }
.logo-img {
  height: 28px;
  width: auto;
  object-fit: contain;
}
.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }
.logo-icon { font-size: 20px; }
.logo-text {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.logo-text sup { font-size: 8px; vertical-align: super; opacity: 0.5; }

.tab-nav { display: flex; gap: 4px; }
.tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}
.tab-btn:hover { background: var(--bg); color: var(--text-primary); }
.tab-btn.active {
  background: var(--text-primary);
  color: var(--text-inverse);
}
.tab-btn svg { width: 15px; height: 15px; }

.icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all 0.15s;
}
.icon-btn:hover { background: var(--bg); color: var(--text-primary); }
.notification-badge {
  position: absolute;
  top: 4px; right: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--hot);
  color: white;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== NOTIFICATION PANEL ===== */
.notification-wrapper { position: relative; }
.notification-btn { position: relative; }
.notif-panel {
  position: absolute;
  top: 44px;
  right: 0;
  width: 400px;
  max-height: 520px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: notifSlideIn 0.2s ease;
}
@keyframes notifSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border-light);
}
.notif-header h3 { font-size: 14px; font-weight: 700; }
.notif-header-actions { display: flex; align-items: center; gap: 8px; }
.notif-mark-all {
  font-size: 11px;
  color: var(--lime-dim);
  font-weight: 500;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.notif-mark-all:hover { background: var(--lime-glow); }
.notif-close {
  font-size: 18px;
  color: var(--text-tertiary);
  line-height: 1;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}
.notif-close:hover { background: var(--bg); color: var(--text-primary); }
.notif-filters {
  display: flex;
  gap: 4px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-light);
}
.notif-filter {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: all 0.15s;
}
.notif-filter:hover { background: var(--bg); }
.notif-filter.active { background: var(--lime-glow); color: var(--lime-dim); }
.notif-list {
  flex: 1;
  overflow-y: auto;
  max-height: 360px;
}
.notif-list::-webkit-scrollbar { width: 4px; }
.notif-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: rgba(200, 255, 0, 0.03); }
.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime-dim);
}
.notif-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.notif-icon.notif-hot { background: var(--hot-bg); }
.notif-icon.notif-brief { background: var(--success-bg); }
.notif-icon.notif-call { background: var(--cool-bg); }
.notif-icon.notif-pipeline { background: var(--warm-bg); }
.notif-icon.notif-system { background: var(--new-bg); }
.notif-content { flex: 1; min-width: 0; }
.notif-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 2px;
}
.notif-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-time {
  font-size: 10px;
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}
.notif-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  align-items: flex-start;
  margin-top: 2px;
}
.notif-action-btn {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-tertiary);
  transition: all 0.15s;
}
.notif-action-btn:hover { background: var(--bg); color: var(--text-primary); }
.notif-action-btn.dismiss:hover { color: var(--hot); }
.notif-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border-light);
  text-align: center;
}
.notif-history-btn {
  font-size: 12px;
  color: var(--lime-dim);
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.notif-history-btn:hover { background: var(--lime-glow); }
.notif-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-tertiary);
  font-size: 12px;
}

/* Notification History (Intel tab) */
.notif-history-list {
  max-height: 400px;
  overflow-y: auto;
}
.notif-history-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.notif-history-item:last-child { border-bottom: none; }
.notif-history-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.notif-history-content { flex: 1; min-width: 0; }
.notif-history-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}
.notif-history-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
  margin-top: 1px;
}
.notif-history-meta {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 3px;
}
.notif-history-empty {
  text-align: center;
  padding: 32px 0;
  color: var(--text-tertiary);
  font-size: 12px;
}
.notif-history-active {
  border-left: 3px solid var(--lime-dim);
  padding-left: 9px;
}
.notif-priority-high .notif-history-icon { background: var(--hot-bg); }
.notif-priority-med .notif-history-icon { background: var(--warm-bg); }
.notif-history-controls { display: flex; gap: 8px; }

.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lime), var(--lime-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #111;
}
.user-name { font-size: 13px; font-weight: 500; color: var(--text-secondary); }

/* User Profile Menu */
.user-menu-wrapper { position: relative; }
.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  cursor: pointer;
}
.user-menu-trigger:hover { background: var(--bg); }
.user-menu-arrow { font-size: 10px; color: var(--text-tertiary); }

.user-menu-panel {
  position: absolute;
  top: 44px;
  right: 0;
  width: 260px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  z-index: 200;
  overflow: hidden;
  animation: notifSlideIn 0.2s ease;
}
.user-menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.user-menu-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lime), var(--lime-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #111;
  flex-shrink: 0;
}
.user-menu-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.user-menu-role { font-size: 11px; color: var(--text-tertiary); margin-top: 1px; }
.user-menu-divider { height: 1px; background: var(--border-light); margin: 0; }
.user-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 12px;
  color: var(--text-secondary);
}
.user-menu-item-label { font-weight: 500; }
.user-menu-link { cursor: pointer; transition: background 0.15s; }
.user-menu-link:hover { background: var(--bg); }
.user-menu-hint {
  padding: 0 16px 8px;
  font-size: 10px;
  color: var(--text-tertiary);
  line-height: 1.3;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 20px;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 16px; width: 16px;
  left: 2px; bottom: 2px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.toggle-switch input:checked + .toggle-slider { background: var(--lime-dim); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); }

/* ===== MAIN CONTENT ===== */
.main-content {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px;
}

/* ===== TAB PANELS ===== */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== SECTION CARD ===== */
.section-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-header h2 {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fire-icon { font-size: 18px; }

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--bg);
  color: var(--text-secondary);
}
.badge-count { background: var(--hot-bg); color: var(--hot); }

/* ===== PULSE STRIP ===== */
.pulse-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.pulse-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pulse-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.pulse-card.pulse-active {
  border-color: var(--lime-dim);
  box-shadow: 0 0 0 2px var(--lime-glow), var(--shadow-md);
  transform: translateY(-2px);
  background: var(--lime-glow);
}
.pulse-hot.pulse-active {
  border-color: var(--hot);
  box-shadow: 0 0 0 2px var(--hot-bg), var(--shadow-md);
  background: var(--hot-bg);
}
.pulse-briefs.pulse-active {
  border-color: var(--lime-dim);
  box-shadow: 0 0 0 2px var(--lime-glow), var(--shadow-md);
  background: var(--lime-glow);
}
.pulse-calls.pulse-active {
  border-color: var(--cool);
  box-shadow: 0 0 0 2px var(--cool-bg), var(--shadow-md);
  background: var(--cool-bg);
}
.pulse-pipeline.pulse-active {
  border-color: var(--success);
  box-shadow: 0 0 0 2px var(--success-bg), var(--shadow-md);
  background: var(--success-bg);
}
.pulse-card { cursor: pointer; }
.pulse-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.pulse-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
.pulse-icon { font-size: 16px; }
.pulse-number { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.pulse-dollar { font-size: 32px; }
.pulse-trend { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.trend-up { color: var(--success); }

.pulse-sparkline {
  position: absolute;
  bottom: 0;
  right: 0;
  opacity: 0.15;
  pointer-events: none;
}

.pulse-hot { border-left: 3px solid var(--hot); }
.pulse-briefs { border-left: 3px solid var(--lime-dim); }
.pulse-calls { border-left: 3px solid var(--cool); }
.pulse-pipeline { border-left: 3px solid var(--success); }

.pulse-hot .pulse-number { color: var(--hot); }
.pulse-briefs .pulse-number { color: var(--lime-text); }
.pulse-calls .pulse-number { color: var(--cool); }
.pulse-pipeline .pulse-number { color: var(--success); }

/* ===== CC COLUMNS ===== */
.cc-columns { display: grid; grid-template-columns: 60fr 40fr; gap: 16px; margin-bottom: 16px; }

@media (max-width: 1024px) {
  .cc-columns { grid-template-columns: 1fr; }
  .pulse-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ===== LIVE BANNER ===== */
.live-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(16,185,129,0.06), rgba(200,255,0,0.06));
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.live-dot-wrapper { flex-shrink: 0; }
.live-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
}
.live-content { flex: 1; }
.live-title { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; color: var(--success); text-transform: uppercase; }
.live-desc { font-size: 13px; font-weight: 500; margin-top: 2px; }
.live-time { color: var(--text-secondary); }
.live-sub { font-size: 11px; color: var(--text-tertiary); margin-top: 1px; }
.live-action {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
  padding: 6px 12px;
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.live-action:hover { background: rgba(16,185,129,0.08); }

/* ===== ACTION QUEUE ===== */
.action-queue { display: flex; flex-direction: column; gap: 8px; }
.action-item {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all 0.15s;
}
.action-item:hover { box-shadow: var(--shadow-md); }
.action-priority-bar { width: 4px; flex-shrink: 0; }
.priority-red .action-priority-bar { background: var(--hot); }
.priority-yellow .action-priority-bar { background: var(--warm); }
.priority-green .action-priority-bar { background: var(--success); }

.action-body { flex: 1; padding: 12px 16px; }
.action-top { display: flex; justify-content: space-between; align-items: flex-start; }
.action-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.action-company { font-size: 12px; color: var(--text-tertiary); }
.action-value { font-size: 14px; font-weight: 700; color: var(--text-primary); white-space: nowrap; }
.action-status { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.action-buttons { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

.act-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--card);
  transition: all 0.15s;
}
.act-btn:hover { background: var(--bg); color: var(--text-primary); border-color: var(--text-tertiary); }
.act-btn.act-primary {
  background: var(--text-primary);
  color: var(--text-inverse);
  border-color: var(--text-primary);
}
.act-btn.act-primary:hover { background: #374151; }

.action-suggestion {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(200,255,0,0.06);
  border-radius: 6px;
  border: 1px solid rgba(200,255,0,0.12);
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.suggestion-icon { flex-shrink: 0; font-size: 13px; }

/* ===== ACTION DETAIL PANEL ===== */
.action-clickable { cursor: pointer; }
.action-top-right { display: flex; align-items: center; gap: 8px; }
.action-expand-icon {
  font-size: 11px;
  color: var(--text-tertiary);
  transition: transform 0.2s;
}
.action-item.action-expanded .action-expand-icon { transform: rotate(180deg); }
.action-item.action-expanded {
  border-color: var(--lime-dim);
  box-shadow: var(--shadow-lg);
}

.action-detail-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  animation: slideDown 0.25s ease;
}

.adp-container { }
.adp-header { margin-bottom: 12px; }
.adp-contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.adp-info-item {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.adp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 12px;
}
@media (max-width: 768px) { .adp-grid { grid-template-columns: 1fr; } }

.adp-section { margin-bottom: 12px; }
.adp-section-title {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-light);
}

/* Pipeline Status */
.adp-pipeline-status { }
.adp-stage-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.adp-stage-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
.adp-days-in-stage {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-left: auto;
}
.adp-progress-bar {
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}
.adp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--lime-dim), var(--lime));
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Lifecycle Checklist */
.adp-lifecycle { display: flex; flex-direction: column; gap: 2px; }
.adp-lc-step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  font-size: 11px;
  color: var(--text-secondary);
}
.adp-lc-step.done { color: var(--text-secondary); }
.adp-lc-step.current { color: var(--text-primary); font-weight: 600; }
.adp-lc-step.pending { color: var(--text-tertiary); }
.adp-lc-icon { font-size: 12px; flex-shrink: 0; width: 18px; text-align: center; }
.adp-lc-date { font-size: 10px; color: var(--text-tertiary); margin-left: auto; }

/* Key Intel */
.adp-intel-grid { display: flex; flex-direction: column; gap: 3px; }
.adp-intel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
}
.adp-intel-label { font-size: 11px; color: var(--text-tertiary); }
.adp-intel-value { font-size: 11px; font-weight: 600; color: var(--text-primary); text-align: right; max-width: 60%; }
.adp-intel-value.adp-highlight { color: var(--hot); }

/* Financial Summary */
.adp-financials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.adp-fin-item {
  text-align: center;
  padding: 8px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}
.adp-fin-value {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.adp-fin-value.adp-danger { color: var(--hot); }
.adp-fin-label {
  display: block;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Communication */
.adp-comms { display: flex; flex-direction: column; gap: 3px; }
.adp-comms-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
}
.adp-comms-label { font-size: 11px; color: var(--text-tertiary); }
.adp-comms-value { font-size: 11px; font-weight: 600; color: var(--text-secondary); }

/* Next Action Banner */
.adp-next-action {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(200, 255, 0, 0.06);
  border: 1px solid rgba(200, 255, 0, 0.15);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.adp-next-icon { font-size: 14px; flex-shrink: 0; }
.adp-next-content { flex: 1; }
.adp-next-content strong { color: var(--text-primary); }

/* Testimonial Tracking Section */
.adp-testimonial-section {
  margin-bottom: 12px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}
.adp-testimonial-section .adp-section-title {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-light);
}
.adp-testimonial-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.adp-test-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--card);
  border: 1px solid var(--border-light);
  transition: all 0.15s;
}
.adp-test-item:hover { box-shadow: var(--shadow-sm); }
.adp-test-item.adp-test-done {
  background: var(--success-bg);
  border-color: rgba(16, 185, 129, 0.2);
}
.adp-test-item.adp-test-pending {
  background: var(--warm-bg);
  border-color: var(--warm-border);
}
.adp-test-item.adp-test-none { }
.adp-test-icon {
  font-size: 14px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.adp-test-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.adp-test-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
}
.adp-test-status {
  font-size: 10px;
  color: var(--text-tertiary);
}
.adp-test-done .adp-test-status { color: #065f46; }
.adp-test-pending .adp-test-status { color: #92400e; }
.adp-test-date {
  font-size: 10px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.adp-test-link {
  font-size: 10px;
  font-weight: 600;
  color: var(--cool);
  flex-shrink: 0;
  text-decoration: none;
}
.adp-test-link:hover { text-decoration: underline; }

/* Testimonial Quote */
.adp-test-quote {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  background: var(--card);
  border-left: 3px solid var(--lime-dim);
  border-radius: 0 6px 6px 0;
  margin-bottom: 8px;
}
.adp-test-quote-icon { font-size: 14px; flex-shrink: 0; }
.adp-test-quote-text {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
  font-style: italic;
}

/* Testimonial Actions */
.adp-test-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.adp-test-requested {
  font-size: 10px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Quick Actions */
.adp-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

/* ===== HEAT DOTS ===== */
.heat-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.heat-hot { background: var(--hot); box-shadow: 0 0 6px rgba(255,59,59,0.4); }
.heat-warm { background: var(--warm); box-shadow: 0 0 6px rgba(245,158,11,0.4); }
.heat-cool { background: var(--cool); box-shadow: 0 0 6px rgba(59,130,246,0.3); }
.heat-new { background: var(--new); box-shadow: 0 0 6px rgba(139,92,246,0.3); }

.pulse-glow { animation: dotPulse 2s ease-in-out infinite; }
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(139,92,246,0.3); }
  50% { box-shadow: 0 0 12px rgba(139,92,246,0.6); }
}

/* ===== TIER BADGES ===== */
.tier-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.tier-hot { background: var(--hot-bg); color: var(--hot); }
.tier-warm { background: var(--warm-bg); color: var(--warm); }
.tier-cool { background: var(--cool-bg); color: var(--cool); }
.tier-new { background: var(--new-bg); color: var(--new); }

/* ===== PIPELINE FUNNEL ===== */
.pipeline-funnel { display: flex; flex-direction: column; gap: 10px; }
.funnel-row {
  display: grid;
  grid-template-columns: 100px 1fr 36px;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.funnel-row:hover .funnel-bar { filter: brightness(1.1); }
.funnel-label { font-size: 12px; color: var(--text-secondary); text-align: right; }
.funnel-bar-track {
  height: 24px;
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
}
.funnel-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--lime-dim), var(--lime));
  border-radius: 6px;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.funnel-bar-won { background: linear-gradient(90deg, var(--success), #34d399); }
.funnel-count { font-size: 13px; font-weight: 700; color: var(--text-primary); text-align: right; }
.funnel-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-secondary);
}

/* ===== BRIEF INSIGHTS ===== */
.insights-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.insight-item { text-align: center; }
.insight-number {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--lime-dim), var(--lime));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.insight-number.insight-dollar {
  font-size: 24px;
  white-space: nowrap;
}
.insight-number.insight-danger {
  background: linear-gradient(135deg, #ef4444, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.insight-label { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; line-height: 1.4; }

/* ===== ACTIVITY STREAM ===== */
.activity-section { }
.section-header.clickable { cursor: pointer; user-select: none; }
.expand-arrow { font-size: 14px; color: var(--text-tertiary); transition: transform 0.2s; }
.expand-arrow.collapsed { transform: rotate(-90deg); }

.activity-stream { display: flex; flex-direction: column; gap: 0; }
.activity-stream.collapsed { display: none; }
.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-secondary);
}
.activity-item:last-child { border-bottom: none; }
.activity-time { font-size: 11px; color: var(--text-tertiary); width: 60px; flex-shrink: 0; text-align: right; }
.activity-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.dot-red { background: var(--hot); }
.dot-green { background: var(--success); }
.dot-blue { background: var(--cool); }
.dot-gray { background: var(--text-tertiary); }

/* ===== HOT AVATARS ===== */
.hot-avatars {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 0;
  overflow-x: auto;
}
.avatar-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.15s;
}
.avatar-bubble:hover { transform: scale(1.08); }
.avatar-bubble span:first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  color: white;
}
.avatar-bubble.hot span:first-child { background: linear-gradient(135deg, #ef4444, #f97316); border: 2px solid var(--hot); }
.avatar-bubble.warm span:first-child { background: linear-gradient(135deg, #f59e0b, #eab308); border: 2px solid var(--warm); }
.avatar-bubble.new span:first-child { background: linear-gradient(135deg, #8b5cf6, #a78bfa); border: 2px solid var(--new); }
.avatar-bubble.cool span:first-child { background: linear-gradient(135deg, #3b82f6, #60a5fa); border: 2px solid var(--cool); }
.avatar-tier { font-size: 9px; font-weight: 700; color: var(--text-tertiary); letter-spacing: 0.05em; }

/* ===== SEARCH BAR ===== */
.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}
.search-input-wrap .search-icon { color: var(--text-tertiary); flex-shrink: 0; }
.search-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--text-primary);
  width: 100%;
}
.search-input::placeholder { color: var(--text-tertiary); }
.search-sm { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 10px; }
.search-sm .search-input { font-size: 12px; }

.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--card);
  transition: all 0.15s;
}
.filter-chip:hover { border-color: var(--text-tertiary); }
.filter-chip.active {
  background: var(--text-primary);
  color: var(--text-inverse);
  border-color: var(--text-primary);
}
.sort-control {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}
.sort-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  white-space: nowrap;
}
.sort-select {
  font-size: 11px;
  font-family: inherit;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}
.sort-select:focus {
  border-color: var(--lime-dim);
  box-shadow: 0 0 0 2px var(--lime-glow);
}
.result-count { font-size: 12px; color: var(--text-tertiary); white-space: nowrap; margin-left: auto; }

/* ===== PROSPECT CARDS ===== */
.prospect-list { display: flex; flex-direction: column; gap: 6px; }
.prospect-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s;
}
.prospect-card:hover { box-shadow: var(--shadow-md); }
.prospect-card.expanded { box-shadow: var(--shadow-lg); border-color: var(--lime-dim); }

.prospect-collapsed { padding: 10px 16px; cursor: pointer; }
.prospect-top-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.prospect-identity { display: flex; align-items: center; gap: 8px; min-width: 0; }
.prospect-name { font-size: 14px; white-space: nowrap; }
.prospect-company { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prospect-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.prospect-phone {
  font-size: 11px;
  color: var(--text-tertiary);
  text-decoration: none;
  white-space: nowrap;
}
.prospect-phone:hover { color: var(--cool); }
.next-action-btn {
  font-size: 10px;
  font-weight: 600;
  font-family: inherit;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--lime-dim);
  background: var(--lime-glow);
  color: var(--lime-text);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
[data-theme="dark"] .next-action-btn {
  color: var(--lime);
  border-color: rgba(200, 255, 0, 0.3);
}
.next-action-btn:hover {
  background: var(--lime-dim);
  color: #fff;
  border-color: var(--lime-dim);
}
.prospect-value { font-size: 14px; font-weight: 700; }

.prospect-meta-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.prospect-stage-text { font-size: 12px; color: var(--text-secondary); }
.prospect-expand-icon { font-size: 12px; color: var(--text-tertiary); margin-left: auto; transition: transform 0.2s; }
.prospect-card.expanded .prospect-expand-icon { transform: rotate(180deg); }

/* Mini Steps (onboarding progress dots — horizontal layout) */
.mini-steps {
  display: flex;
  gap: 3px;
  margin-top: 6px;
  align-items: center;
}
.mini-step {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.mini-step-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  background: var(--bg);
  color: var(--text-tertiary);
  border: 1.5px solid var(--border-light);
  transition: all 0.2s;
  flex-shrink: 0;
}
.mini-step.done .mini-step-dot {
  background: rgba(184,230,0,0.15);
  color: var(--lime);
  border-color: rgba(184,230,0,0.3);
  font-size: 10px;
}
.mini-step.active .mini-step-dot {
  background: var(--lime);
  color: var(--text-primary);
  border-color: var(--lime);
  box-shadow: 0 0 8px rgba(184,230,0,0.4);
  font-size: 10px;
}
.mini-step-label {
  font-size: 8px;
  font-weight: 300;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-step.done .mini-step-label,
.mini-step.active .mini-step-label {
  color: var(--text-secondary);
}
.mini-step.active .mini-step-label {
  color: var(--lime-dim);
  font-weight: 400;
}

/* Service tag on prospect card */
.prospect-service-tag {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(59,130,246,0.12);
  color: #60a5fa;
  white-space: nowrap;
}

.prospect-progress-bar {
  height: 3px;
  background: var(--bg);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: var(--progress);
  background: linear-gradient(90deg, var(--lime-dim), var(--lime));
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.progress-animated {
  animation: progressPulse 2s ease-in-out infinite;
}
@keyframes progressPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.quick-link { font-size: 11px; color: var(--cool); font-weight: 500; }
.quick-link:hover { text-decoration: underline; }
.last-activity { font-size: 10px; color: var(--text-tertiary); margin-left: auto; }

.live-chip {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16,185,129,0.3);
  animation: liveChipPulse 2s ease-in-out infinite;
}
@keyframes liveChipPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.live-status { color: var(--success) !important; }

/* ===== PROSPECT EXPANDED ===== */
.prospect-expanded {
  display: none;
  padding: 0 20px 20px;
  border-top: 1px solid var(--border-light);
  animation: slideDown 0.3s ease;
}
.prospect-card.expanded .prospect-expanded { display: block; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.expanded-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-top: 16px; }
@media (max-width: 768px) { .expanded-grid { grid-template-columns: 1fr; } }

.detail-section { margin-bottom: 16px; }
.detail-section h4 {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}
.detail-rows { display: flex; flex-direction: column; gap: 4px; }
.detail-row { font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.detail-icon { font-size: 14px; width: 20px; text-align: center; flex-shrink: 0; }

/* Documents */
.doc-links { display: flex; flex-direction: column; gap: 4px; }
.doc-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: background 0.15s;
}
.doc-link:hover { background: var(--bg); }
.doc-arrow { margin-left: auto; color: var(--cool); font-size: 12px; }

/* Journey Timeline */
.journey-timeline { display: flex; flex-direction: column; gap: 0; }
.journey-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 12px;
  color: var(--text-secondary);
  position: relative;
}
.journey-step::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}
.journey-step:first-child::before { top: 50%; }
.journey-step:last-child::before { bottom: 50%; }
.journey-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  z-index: 1;
  border: 2px solid;
}
.journey-step.completed .journey-dot { background: var(--success); border-color: var(--success); }
.journey-step.active .journey-dot { background: var(--lime); border-color: var(--lime-dim); box-shadow: 0 0 8px rgba(200,255,0,0.4); }
.journey-step.future .journey-dot { background: var(--card); border-color: var(--border); }
.journey-date { font-size: 11px; color: var(--text-tertiary); width: 50px; flex-shrink: 0; }

/* Intel Grid */
.intel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.intel-item { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.intel-label { font-size: 12px; color: var(--text-tertiary); }
.intel-value { font-size: 12px; font-weight: 600; color: var(--text-primary); text-align: right; }
.highlight-red { color: var(--hot); }

/* Service Fit */
.service-fit { display: flex; flex-wrap: wrap; gap: 6px; }
.fit-tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}
.fit-yes { background: var(--success-bg); border-color: rgba(16,185,129,0.2); color: #065f46; }
.fit-no { color: var(--text-tertiary); }

/* Tags */
.tag-list { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-secondary);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* Expanded Actions */
.expanded-actions {
  display: flex;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  margin-top: 8px;
}

/* Live Detail Card */
.live-detail-card {
  padding: 16px;
  background: var(--success-bg);
  border: 1px solid rgba(16,185,129,0.15);
  border-radius: var(--radius-sm);
  text-align: center;
}
.live-detail-card p { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.live-elapsed { font-weight: 700; color: var(--success); }
.live-pulse-ring {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--success);
  margin: 0 auto 12px;
  animation: livePulse 2s ease-in-out infinite;
}

/* ===== INTEL TAB ===== */
.doc-table { }
.doc-table-header {
  display: grid;
  grid-template-columns: 80px 1fr 140px 100px 60px;
  gap: 12px;
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border);
}
.doc-table-row {
  display: grid;
  grid-template-columns: 80px 1fr 140px 100px 60px;
  gap: 12px;
  padding: 12px;
  font-size: 13px;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}
.doc-table-row:hover { background: var(--bg); }
.doc-table-row:last-child { border-bottom: none; }
.doc-col-prospect { color: var(--text-secondary); font-size: 12px; }
.doc-col-date { color: var(--text-tertiary); font-size: 12px; }
.doc-type-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}
.type-brief { background: rgba(200,255,0,0.12); color: var(--lime-text); }
.type-precall { background: var(--cool-bg); color: var(--cool); }
.doc-view-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--cool);
}
.doc-view-btn:hover { text-decoration: underline; }

/* ===== COMMAND HERO (Intel Tab) ===== */
.command-hero {
  display: grid;
  grid-template-columns: 3fr 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  overflow: hidden;
  margin-bottom: 16px;
  min-height: 140px;
}

/* Alert ticker (left 3/4) */
.command-alerts {
  padding: 14px 16px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  max-height: 220px;
}
.command-alerts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.command-alerts-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}
.command-alerts-count {
  font-size: 10px;
  font-weight: 700;
  background: var(--hot-bg);
  color: var(--hot);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.command-alerts-list { display: flex; flex-direction: column; gap: 4px; }
.command-alert-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.command-alert-item:hover { background: var(--bg); }
.command-alert-item.cmd-priority-high { border-left: 3px solid var(--hot); }
.command-alert-item.cmd-priority-med { border-left: 3px solid var(--warm); }
.command-alert-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.command-alert-content { flex: 1; min-width: 0; }
.command-alert-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.command-alert-desc {
  font-size: 10px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.command-alert-time {
  font-size: 10px;
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
}
.command-alerts-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  min-height: 80px;
  color: var(--text-tertiary);
  font-size: 13px;
}
.command-alerts-empty-icon {
  font-size: 18px;
  color: var(--success);
}

/* Alert item actions (pin/dismiss) */
.command-alerts-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cmd-clear-btn {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-tertiary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: all 0.15s;
}
.cmd-clear-btn:hover { background: var(--hot-bg); color: var(--hot); border-color: var(--hot-border); }
.command-alert-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}
.command-alert-item:hover .command-alert-actions { opacity: 1; }
.cmd-action-btn {
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1;
}
.cmd-action-btn:hover { background: var(--bg); color: var(--text-primary); }
.cmd-dismiss-btn:hover { color: var(--hot); }
.cmd-pin-active { color: var(--lime-dim); }
.command-alert-item.cmd-pinned {
  background: rgba(200, 255, 0, 0.04);
  border-left: 3px solid var(--lime-dim);
}

/* Big Action (right 1/4) */
.command-action {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: linear-gradient(135deg, rgba(200,255,0,0.04), rgba(200,255,0,0.10));
}
/* Urgent/warning variant — red tints when high priority */
.command-action.command-action-urgent {
  background: linear-gradient(135deg, rgba(255,59,59,0.10), rgba(255,59,59,0.20)) !important;
  border-left: 3px solid var(--hot);
}
.command-action.command-action-urgent .command-action-dot {
  background: var(--hot) !important;
  animation: commandPulseRed 2s ease-in-out infinite !important;
}
.command-action.command-action-urgent .command-action-text {
  color: var(--hot) !important;
}
.command-action.command-action-urgent .command-action-sub {
  color: var(--text-secondary);
}
.command-action.command-action-urgent .command-action-badge {
  background: rgba(255,59,59,0.15);
  color: var(--hot);
  border: 1px solid var(--hot-border);
}
@keyframes commandPulseRed {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.5); }
  50% { box-shadow: 0 0 0 12px rgba(255, 59, 59, 0); }
}
[data-theme="dark"] .command-action.command-action-urgent { background: linear-gradient(135deg, rgba(255,77,77,0.12), rgba(255,77,77,0.24)) !important; }
[data-theme="dark"] .command-action.command-action-urgent .command-action-text { color: #ff6b6b !important; }
.command-action-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.command-action-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  animation: commandPulse 2s ease-in-out infinite;
}
@keyframes commandPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 255, 0, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(200, 255, 0, 0); }
}
.command-action-text {
  font-size: 24px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--lime-text);
  word-break: break-word;
}
[data-theme="dark"] .command-action-text { color: var(--lime); }
.command-action-sub {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.3;
  max-width: 200px;
}
.command-action-badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--hot-bg);
  color: var(--hot);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

/* Mini calendar section card — tighter padding */
#miniCalendarSection { padding: 14px 16px; }
#miniCalendarSection .section-header { margin-bottom: 10px; }
#miniCalendarSection .section-header h2 { font-size: 13px; }

/* ===== MINI CALENDAR ===== */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-header {
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  padding: 2px 0;
}
.cal-day {
  text-align: center;
  font-size: 11px;
  color: var(--text-secondary);
  padding: 3px 2px 1px;
  border-radius: 4px;
  position: relative;
  min-height: 24px;
  cursor: default;
}
.cal-day.cal-empty { visibility: hidden; }
.cal-day.cal-today {
  background: var(--lime-glow);
  color: var(--text-primary);
  font-weight: 700;
  border: 1px solid var(--lime-dim);
}
.cal-day.cal-has-event { font-weight: 600; color: var(--text-primary); }
.cal-dots {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-top: 1px;
}
.cal-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  display: inline-block;
}
.cal-dot-followup { background: var(--hot); }
.cal-dot-cooling { background: var(--warm); }
.cal-dot-call { background: var(--cool); }
.cal-dot-milestone { background: var(--success); }

/* Urgent Tasks */
.urgent-tasks { margin-top: 6px; border-top: 1px solid var(--border-light); padding-top: 6px; }
.urgent-tasks-header {
  font-size: 10px;
  font-weight: 700;
  color: var(--hot);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.urgent-tasks-empty {
  font-size: 11px;
  color: var(--text-tertiary);
  padding: 8px 0;
}
.urgent-task-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px;
  border-radius: 4px;
  transition: background 0.15s;
}
.urgent-task-item:hover { background: var(--bg); }
.urgent-task-icon { font-size: 13px; flex-shrink: 0; }
.urgent-task-label {
  flex: 1;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.urgent-task-type {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.urgent-task-type.type-follow-up { background: var(--hot-bg); color: var(--hot); }
.urgent-task-type.type-cooling { background: var(--warm-bg); color: var(--warm); }
.urgent-task-type.type-call { background: var(--cool-bg); color: var(--cool); }
.urgent-task-type.type-milestone { background: var(--success-bg); color: var(--success); }

/* ===== FULL CALENDAR MODAL ===== */
.calendar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
[data-theme="dark"] .calendar-overlay { background: rgba(0,0,0,0.7); }
.calendar-modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
}
.calendar-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.calendar-modal-header h2 { font-size: 18px; font-weight: 700; }
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cal-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-secondary);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.cal-nav-btn:hover { background: var(--bg); color: var(--text-primary); }
.cal-month-label {
  font-size: 15px;
  font-weight: 700;
  min-width: 120px;
  text-align: center;
}

/* Full calendar grid — larger cells */
.calendar-grid .cal-grid {
  gap: 4px;
}
.calendar-grid .cal-day {
  min-height: 70px;
  padding: 6px;
  text-align: left;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 12px;
  vertical-align: top;
}
.calendar-grid .cal-day.cal-empty { border-color: transparent; }
.calendar-grid .cal-day.cal-today { border-color: var(--lime-dim); }
.cal-day-num {
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 4px;
}
.cal-event {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 500;
  padding: 1px 4px;
  border-radius: 3px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.cal-event.cal-ev-follow-up { background: var(--hot-bg); color: var(--hot); }
.cal-event.cal-ev-cooling { background: var(--warm-bg); color: var(--warm); }
.cal-event.cal-ev-call { background: var(--cool-bg); color: var(--cool); }
.cal-event.cal-ev-milestone { background: var(--success-bg); color: var(--success); }

.calendar-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}
.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

/* Dark mode overrides for Command Hero & Calendar */
[data-theme="dark"] .command-hero { background: var(--card); border-color: var(--border); }
[data-theme="dark"] .command-action { background: linear-gradient(135deg, rgba(200,255,0,0.06), rgba(200,255,0,0.14)); }
[data-theme="dark"] .calendar-modal { background: var(--card); border-color: var(--border); }

@media (max-width: 768px) {
  .command-hero { grid-template-columns: 1fr; }
  .command-alerts { border-right: none; border-bottom: 1px solid var(--border); }
  .calendar-grid .cal-day { min-height: 50px; }
}

/* Analytics */
.intel-analytics { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.intel-right-col { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 768px) { .intel-analytics { grid-template-columns: 1fr; } }

.analytics-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.analytics-kpi {
  text-align: center;
  padding: 16px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  transition: transform 0.15s, box-shadow 0.15s;
}
.analytics-kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-value { font-size: 24px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.02em; }
.kpi-value.kpi-hot { color: var(--hot); }
.kpi-unit { font-size: 12px; font-weight: 500; color: var(--text-tertiary); margin-left: 2px; }
.kpi-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); margin-top: 4px; }
.kpi-sub { font-size: 10px; color: var(--text-tertiary); margin-top: 2px; }

/* Service Bars */
.service-bars { display: flex; flex-direction: column; gap: 12px; }
.service-bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 40px;
  align-items: center;
  gap: 12px;
}
.service-bar-label { font-size: 12px; color: var(--text-secondary); text-align: right; }
.service-bar-track { height: 20px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.service-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--lime-dim), var(--lime));
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.service-bar-pct { font-size: 12px; font-weight: 700; color: var(--text-primary); }

/* ===== EDITABLE INTEL VALUES ===== */
.edit-toggle-btn {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0.5;
  transition: opacity 0.15s;
  margin-left: 4px;
}
.edit-toggle-btn:hover { opacity: 1; }
.detail-section h4 { display: flex; align-items: center; }

.intel-value.editable { cursor: default; position: relative; }
.intel-grid.edit-mode .intel-value.editable {
  cursor: text;
  background: var(--bg);
  border: 1px solid var(--lime-dim);
  border-radius: 4px;
  padding: 2px 6px;
  outline: none;
  min-width: 80px;
}
.intel-grid.edit-mode .intel-value.editable:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 2px var(--lime-glow);
}
.edit-mode-indicator {
  font-size: 10px;
  color: var(--lime-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  animation: fadeIn 0.2s ease;
}

/* Clickable Service Fit Tags */
.clickable-fit { cursor: pointer; transition: all 0.15s; user-select: none; }
.clickable-fit:hover { transform: scale(1.03); box-shadow: var(--shadow-sm); }

/* ===== NOTES SECTION ===== */
.notes-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}
.notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.notes-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
}
.notes-twirl {
  font-size: 12px;
  color: var(--text-tertiary);
  transition: transform 0.15s;
  user-select: none;
}
.notes-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.notes-header h4 {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}
.notes-collapsible {
  animation: slideDown 0.2s ease;
}
.act-sm { font-size: 11px; padding: 4px 10px; }

.note-form {
  margin-bottom: 16px;
  animation: slideDown 0.2s ease;
}
.note-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
  background: var(--card);
  color: var(--text-primary);
}
.note-input:focus { border-color: var(--lime-dim); box-shadow: 0 0 0 2px var(--lime-glow); }
.note-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.note-type-select {
  font-size: 11px;
  font-family: inherit;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

.notes-list { display: flex; flex-direction: column; gap: 8px; }
.note-item {
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.note-item:hover { background: var(--bg); }
.note-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.note-type-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.type-general { background: var(--bg); color: var(--text-secondary); }
.type-call { background: var(--cool-bg); color: var(--cool); }
.type-discovery { background: rgba(200,255,0,0.1); color: var(--lime-text); }
.type-objection { background: var(--hot-bg); color: var(--hot); }
.type-next-step { background: var(--success-bg); color: var(--success); }
.type-internal { background: var(--new-bg); color: var(--new); }
.note-author { font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.note-date { font-size: 11px; color: var(--text-tertiary); }
.note-body { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.note-body-hidden { display: none; }
.note-meta-clickable { cursor: pointer; user-select: none; }
.note-meta-clickable:hover { opacity: 0.8; }
.note-twirl {
  font-size: 10px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  width: 12px;
  display: inline-block;
}
.note-preview {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
  flex-shrink: 1;
}
.note-collapsible .note-meta { margin-bottom: 0; }
.note-collapsible .note-body:not(.note-body-hidden) { margin-top: 8px; }
.ghl-note { border-left: 2px solid rgba(200,255,0,0.25); }
.ghl-note .note-body { white-space: pre-wrap; }
.ghl-notes-loading { padding: 8px 0; }

/* ===== PROJECT MILESTONES ===== */
.milestones-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}
.milestones-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.milestones-header h4 {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

.milestone-tracker { display: flex; flex-direction: column; gap: 0; }
.milestone {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  position: relative;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.milestone:hover { background: var(--bg); }
.milestone::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.milestone:first-child::before { top: 50%; }
.milestone:last-child::before { bottom: 50%; }

.milestone-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  z-index: 1;
  margin-top: 2px;
  border: 2px solid;
}
.milestone.completed .milestone-dot { background: var(--success); border-color: var(--success); }
.milestone.active .milestone-dot {
  background: var(--lime);
  border-color: var(--lime-dim);
  box-shadow: 0 0 8px rgba(200,255,0,0.4);
  animation: dotPulse 2s ease-in-out infinite;
}
.milestone.upcoming .milestone-dot { background: var(--card); border-color: var(--border); }

.milestone-content { flex: 1; }
.milestone-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.milestone-desc { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }
.milestone-date { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.milestone-check { font-size: 14px; color: var(--success); font-weight: 700; flex-shrink: 0; }
.milestone-actions { flex-shrink: 0; margin-top: 2px; }

.act-accent {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--lime-dim);
  color: var(--lime-text);
  background: rgba(200,255,0,0.08);
  cursor: pointer;
  transition: all 0.15s;
}
.act-accent:hover { background: rgba(200,255,0,0.15); border-color: var(--lime); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: slideDown 0.3s ease;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 0;
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-tertiary);
  transition: all 0.15s;
}
.modal-close:hover { background: var(--bg); color: var(--text-primary); }
.modal-body { padding: 16px 24px; }
.modal-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.5; }
.modal-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.modal-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  background: var(--card);
  color: var(--text-primary);
  outline: none;
}
.modal-input:focus { border-color: var(--lime-dim); box-shadow: 0 0 0 2px var(--lime-glow); }
.modal-includes { margin-top: 16px; }
.modal-section-label { font-size: 11px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.04em; display: block; margin-bottom: 8px; }
.modal-checkboxes { display: flex; flex-direction: column; gap: 6px; }
.modal-checkbox { font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; cursor: pointer; }
.modal-checkbox input[type="checkbox"] { accent-color: var(--lime-dim); width: 14px; height: 14px; cursor: pointer; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border-light);
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-inverse);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  max-width: 360px;
}
.toast-success { background: #065f46; }
.toast-info { background: var(--text-primary); }
.toast-warning { background: #92400e; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-8px); } }

/* ===== CALL PREP BUTTON ===== */
.quick-link-prep {
  color: var(--lime-dim) !important;
  font-weight: 600;
}
.quick-link-generate {
  background: none;
  border: 1px dashed var(--lime-dim);
  color: var(--lime-dim);
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 6px;
  transition: all 0.2s;
  font-family: inherit;
}
.quick-link-generate:hover {
  background: rgba(200, 255, 0, 0.08);
  border-color: var(--lime);
  color: var(--lime);
}
.act-btn.act-accent {
  background: rgba(200, 255, 0, 0.1);
  border: 1px solid var(--lime-dim);
  color: var(--lime-dim);
  font-weight: 600;
}
.act-btn.act-accent:hover {
  background: rgba(200, 255, 0, 0.18);
  border-color: var(--lime);
  color: var(--lime);
}
.generating {
  opacity: 0.7;
  cursor: wait;
  animation: pulse-gen 1.5s infinite;
}
@keyframes pulse-gen {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 0.4; }
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(248, 249, 251, 0.92);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.spinner-ring {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--lime-dim);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== ERROR BANNER ===== */
.error-banner {
  background: var(--hot-bg);
  border: 1px solid var(--hot-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 16px;
  animation: slideDown 0.3s ease;
}
.error-banner strong {
  color: var(--hot);
  font-size: 14px;
  display: block;
  margin-bottom: 6px;
}
.error-banner p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 2px 0;
}
.error-banner .error-hint {
  margin-top: 8px;
  font-style: italic;
  color: var(--text-tertiary);
}
.error-banner code {
  background: rgba(0,0,0,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'SF Mono', 'Cascadia Code', Consolas, monospace;
}
.error-banner .act-btn { margin-top: 10px; }

/* ===== EMPTY STATES ===== */
.action-empty,
.prospect-empty,
.doc-empty,
.intel-empty,
.activity-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-tertiary);
  font-size: 13px;
}
.action-empty-icon {
  display: block;
  font-size: 28px;
  margin-bottom: 8px;
  color: var(--success);
}
.prospect-empty code {
  background: rgba(0,0,0,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}
.prospect-empty-sub { margin-top: 6px; color: var(--text-tertiary); font-size: 12px; }

/* ===== CLIENT COMMAND CENTER ===== */
.client-pulse-strip {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 20px;
}
.client-card {
  padding: 0;
  overflow: hidden;
  margin-bottom: 16px;
}
.client-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(200, 255, 0, 0.04));
  border-bottom: 1px solid var(--border-light);
}
[data-theme="dark"] .client-header {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.08), rgba(200, 255, 0, 0.05));
}
.client-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}
.client-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--success), var(--lime));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.client-name {
  font-size: 16px;
  color: var(--text-primary);
  display: block;
}
.client-company {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.client-meta-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.client-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--success);
}
.client-won-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--success-bg);
  color: var(--success);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.client-service-badge {
  display: inline-block;
  margin: 16px 24px 0;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: var(--lime-glow);
  color: var(--lime-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
[data-theme="dark"] .client-service-badge {
  color: var(--lime);
}
.client-progress-section {
  padding: 16px 24px 0;
}
.client-phase {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.client-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 20px 24px 24px;
}
.client-col {
  padding: 0 12px;
}
.client-col:first-child {
  padding-left: 0;
  border-right: 1px solid var(--border-light);
}
.client-col:last-child {
  padding-right: 0;
}

/* Milestones */
.client-milestones {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.client-milestone {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  position: relative;
}
.client-milestone:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 28px;
  bottom: -2px;
  width: 2px;
  background: var(--border);
}
.client-milestone.completed:not(:last-child)::after {
  background: var(--success);
  opacity: 0.4;
}
.client-ms-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
  border: 2px solid var(--border);
  background: var(--card);
  position: relative;
  z-index: 1;
}
.client-milestone.completed .client-ms-dot {
  background: var(--success);
  border-color: var(--success);
}
.client-milestone.active .client-ms-dot {
  background: var(--lime);
  border-color: var(--lime);
  box-shadow: 0 0 0 4px var(--lime-glow);
}
.client-milestone.upcoming .client-ms-dot {
  background: var(--card);
  border-color: var(--border);
}
.client-ms-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.client-ms-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.client-milestone.upcoming .client-ms-name {
  color: var(--text-tertiary);
}
.client-ms-date {
  font-size: 11px;
  color: var(--text-tertiary);
}
.client-ms-check {
  font-size: 13px;
  color: var(--success);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ===== LOGIN SCREEN ===== */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  background-image: radial-gradient(ellipse at 50% 30%, var(--lime-glow), transparent 70%);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.login-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.login-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}
.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px 32px;
  box-shadow: var(--shadow-xl);
  animation: slideDown 0.4s ease;
}
.login-brand {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo-icon {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 0 auto 12px;
  border-radius: 0;
}
.login-logo-text {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
}
.login-logo-text sup {
  font-size: 9px;
  vertical-align: super;
  opacity: 0.5;
}
.login-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  font-weight: 400;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.login-field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.login-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.login-input:focus {
  border-color: var(--lime-dim);
  box-shadow: 0 0 0 3px var(--lime-glow);
}
.login-input::placeholder {
  color: var(--text-tertiary);
}
.login-error {
  background: rgba(255, 59, 59, 0.08);
  border: 1px solid rgba(255, 59, 59, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--hot);
  animation: slideDown 0.2s ease;
}
.login-submit {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--text-primary);
  color: var(--text-inverse);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 4px;
}
.login-submit:hover { opacity: 0.9; }
.login-submit:active { transform: scale(0.98); }
.login-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.login-submit.loading {
  position: relative;
  color: transparent;
}
.login-submit.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid var(--text-inverse);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.login-footer-text {
  text-align: center;
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 20px;
}
/* Dark mode login */
[data-theme="dark"] .login-input {
  background: var(--bg);
  color: var(--text-primary);
  border-color: var(--border);
}
[data-theme="dark"] .login-submit {
  background: var(--lime);
  color: #111;
}
/* Logout button hover */
.user-menu-logout:hover { color: var(--hot); }

/* ===== EMBED MODE (GHL iframe) ===== */
body.embedded { padding-top: 0 !important; }
body.embedded .topnav { display: none !important; }
body.embedded .tab-content { margin-top: 8px; }

/* Timeline info */
.client-timeline-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.client-tl-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.client-tl-label {
  color: var(--text-secondary);
}
.client-tl-val {
  color: var(--text-primary);
  font-weight: 500;
}

/* Workspace links */
.client-workspace-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.client-ws-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.client-ws-link:hover {
  border-color: var(--lime);
  background: var(--lime-glow);
  box-shadow: var(--shadow-sm);
}
.client-ws-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.client-ws-detail {
  flex: 1;
  min-width: 0;
}
.client-ws-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.client-ws-sub {
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.client-ws-arrow {
  font-size: 14px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: color 0.15s;
}
.client-ws-link:hover .client-ws-arrow {
  color: var(--lime-text);
}
[data-theme="dark"] .client-ws-link:hover .client-ws-arrow {
  color: var(--lime);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .topnav { padding: 0 12px; }
  .tab-nav { gap: 2px; }
  .tab-btn { padding: 6px 10px; font-size: 12px; }
  .tab-btn svg { display: none; }
  .main-content { padding: 12px; }
  .pulse-strip { grid-template-columns: 1fr 1fr; }
  .pulse-number { font-size: 28px; }
  .cc-columns { grid-template-columns: 1fr; }
  .expanded-grid { grid-template-columns: 1fr; }
  .doc-table-header, .doc-table-row { grid-template-columns: 60px 1fr 60px; }
  .doc-col-prospect, .doc-col-date { display: none; }
  .intel-analytics { grid-template-columns: 1fr; }
  .insights-grid { grid-template-columns: repeat(2, 1fr); }
  .user-name { display: none; }
  .client-pulse-strip { grid-template-columns: 1fr 1fr; }
  .client-grid { grid-template-columns: 1fr; }
  .client-col:first-child { border-right: none; border-bottom: 1px solid var(--border-light); padding: 0 0 16px; }
  .client-col:last-child { padding: 16px 0 0; }
}
