/* ============================================================================
   SPECTRUM OUTREACH COMMAND CENTER - Dashboard Styles
   Dark professional theme, responsive, Chart.js compatible
   ============================================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #0f1923;
  --bg-secondary: #162231;
  --bg-card: #1a2b3d;
  --bg-card-hover: #1f3348;
  --bg-input: #0d1520;
  --border-color: #2a3f55;
  --border-light: #344d65;
  --text-primary: #e8edf2;
  --text-secondary: #8fa3b8;
  --text-muted: #5c7a94;
  --accent-blue: #3b82f6;
  --accent-blue-dim: rgba(59,130,246,0.15);
  --accent-green: #22c55e;
  --accent-green-dim: rgba(34,197,94,0.15);
  --accent-gold: #eab308;
  --accent-gold-dim: rgba(234,179,8,0.15);
  --accent-red: #ef4444;
  --accent-red-dim: rgba(239,68,68,0.15);
  --accent-orange: #f97316;
  --accent-orange-dim: rgba(249,115,22,0.15);
  --accent-purple: #a855f7;
  --accent-purple-dim: rgba(168,85,247,0.15);
  --accent-gray: #6b7280;
  --accent-gray-dim: rgba(107,114,128,0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-elevated: 0 8px 24px rgba(0,0,0,0.4);
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --font-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace;
}

/* --- Light Theme Override --- */
[data-theme="light"] {
  --bg-primary: #f0f2f5;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f7f8fa;
  --bg-input: #f5f6f8;
  --border-color: #dce1e8;
  --border-light: #c8cfd8;
  --text-primary: #1a2332;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --accent-blue: #2563eb;
  --accent-blue-dim: rgba(37,99,235,0.1);
  --accent-green: #16a34a;
  --accent-green-dim: rgba(22,163,74,0.1);
  --accent-gold: #ca8a04;
  --accent-gold-dim: rgba(202,138,4,0.1);
  --accent-red: #dc2626;
  --accent-red-dim: rgba(220,38,38,0.1);
  --accent-orange: #ea580c;
  --accent-orange-dim: rgba(234,88,12,0.1);
  --accent-purple: #9333ea;
  --accent-purple-dim: rgba(147,51,234,0.1);
  --accent-gray: #6b7280;
  --accent-gray-dim: rgba(107,114,128,0.1);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-elevated: 0 8px 24px rgba(0,0,0,0.1);
}

[data-theme="light"] .dashboard__tab-hint {
  background: rgba(0,0,0,0.06);
}

[data-theme="light"] .dashboard__tab--active .dashboard__tab-hint {
  background: var(--accent-blue-dim);
}

[data-theme="light"] .skeleton {
  background: linear-gradient(90deg, #eaecef 25%, #f5f6f8 50%, #eaecef 75%);
  background-size: 200% 100%;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- Theme Toggle Button --- */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  color: var(--text-primary);
}

.theme-toggle__icon--sun,
.theme-toggle__icon--moon {
  display: none;
}

/* Dark mode: show sun icon (click to switch to light) */
[data-theme="dark"] .theme-toggle__icon--sun,
:root:not([data-theme="light"]) .theme-toggle__icon--sun {
  display: inline;
}

/* Light mode: show moon icon (click to switch to dark) */
[data-theme="light"] .theme-toggle__icon--sun {
  display: none;
}

[data-theme="light"] .theme-toggle__icon--moon {
  display: inline;
}

/* --- Layout Shell --- */
.dashboard {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.dashboard__header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.dashboard__header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1600px;
  margin: 0 auto;
  height: 56px;
}

.dashboard__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.dashboard__title-accent {
  color: var(--accent-blue);
}

.dashboard__header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse-dot 2s infinite;
}

.dashboard__status-dot--error {
  background: var(--accent-red);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.dashboard__last-update {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Tab Navigation --- */
.dashboard__nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  overflow-x: auto;
}

.dashboard__nav-inner {
  display: flex;
  gap: 0;
  max-width: 1600px;
  margin: 0 auto;
}

.dashboard__tab {
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
  font-family: inherit;
}

.dashboard__tab:hover {
  color: var(--text-secondary);
}

.dashboard__tab--active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

/* --- Main Content --- */
.dashboard__content {
  flex: 1;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
}

.dashboard__panel {
  display: none;
}

.dashboard__panel--active {
  display: block;
}

/* --- Summary Cards --- */
.overview__cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.summary-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-card);
}

.summary-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.summary-card__value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 4px;
}

.summary-card__value--green { color: var(--accent-green); }
.summary-card__value--blue { color: var(--accent-blue); }
.summary-card__value--gold { color: var(--accent-gold); }
.summary-card__value--gray { color: var(--text-secondary); }

.summary-card__trend {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Two Column Layout --- */
.overview__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

/* --- Card / Panel Blocks --- */
.panel-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.panel-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
}

.panel-block__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.panel-block__body {
  padding: 20px;
}

.panel-block__body--no-pad {
  padding: 0;
}

/* --- Funnel Chart Container --- */
.overview__funnel {
  position: relative;
  height: 280px;
}

/* --- Activity Feed --- */
.activity-feed {
  max-height: 340px;
  overflow-y: auto;
}

.activity-feed__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}

.activity-feed__item:last-child {
  border-bottom: none;
}

.activity-feed__item:hover {
  background: var(--bg-card-hover);
}

.activity-feed__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 2px;
}

.activity-feed__icon--send {
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
}

.activity-feed__icon--reply {
  background: var(--accent-green-dim);
  color: var(--accent-green);
}

.activity-feed__icon--meeting {
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
}

.activity-feed__icon--optout {
  background: var(--accent-red-dim);
  color: var(--accent-red);
}

.activity-feed__icon--classify {
  background: var(--accent-purple-dim);
  color: var(--accent-purple);
}

.activity-feed__content {
  flex: 1;
  min-width: 0;
}

.activity-feed__description {
  font-size: 0.82rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-feed__time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Attention List --- */
.attention-list {
  max-height: 340px;
  overflow-y: auto;
}

.attention-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}

.attention-item:last-child {
  border-bottom: none;
}

.attention-item:hover {
  background: var(--bg-card-hover);
}

.attention-item__urgency {
  flex-shrink: 0;
  width: 4px;
  height: 36px;
  border-radius: 2px;
}

.attention-item__urgency--red { background: var(--accent-red); }
.attention-item__urgency--yellow { background: var(--accent-gold); }
.attention-item__urgency--green { background: var(--accent-green); }

.attention-item__info {
  flex: 1;
  min-width: 0;
}

.attention-item__name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.attention-item__reason {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.attention-item__days {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-red);
  white-space: nowrap;
}

/* ============================================================================
   CAMPAIGN PIPELINE PANEL
   ============================================================================ */

/* --- Toolbar --- */
.campaign__toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.campaign__search {
  flex: 1;
  min-width: 200px;
  padding: 8px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

.campaign__search:focus {
  outline: none;
  border-color: var(--accent-blue);
}

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

.campaign__filter {
  padding: 8px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.campaign__filter:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.campaign__count {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* --- Campaign Table --- */
.campaign__table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.campaign__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.campaign__table thead {
  background: var(--bg-secondary);
}

.campaign__table th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: color var(--transition-fast);
}

.campaign__table th:hover {
  color: var(--text-secondary);
}

.campaign__table th--sorted-asc::after {
  content: ' \25B2';
  font-size: 0.6rem;
}

.campaign__table th--sorted-desc::after {
  content: ' \25BC';
  font-size: 0.6rem;
}

.campaign__table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  vertical-align: middle;
}

.campaign__table tbody tr {
  cursor: pointer;
  transition: background var(--transition-fast);
}

.campaign__table tbody tr:hover {
  background: var(--bg-card-hover);
}

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

/* --- Status Badges --- */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.status-badge--ACTIVE,
.status-badge--CREATED {
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
}

.status-badge--IN_CONVERSATION,
.status-badge--ENGAGED {
  background: var(--accent-orange-dim);
  color: var(--accent-orange);
}

.status-badge--MEETING_SCHEDULED {
  background: var(--accent-green-dim);
  color: var(--accent-green);
}

.status-badge--OPTED_OUT,
.status-badge--POST_GIFT_DECLINED {
  background: var(--accent-red-dim);
  color: var(--accent-red);
}

.status-badge--STALLED,
.status-badge--RECYCLED,
.status-badge--ARCHIVED,
.status-badge--POST_GIFT_NO_REPLY,
.status-badge--SKIPPED_DUPLICATE {
  background: var(--accent-gray-dim);
  color: var(--accent-gray);
}

.status-badge--FU1_SENT,
.status-badge--FU2_SENT,
.status-badge--FU3_SENT,
.status-badge--FU4_SENT {
  background: var(--accent-purple-dim);
  color: var(--accent-purple);
}

.status-badge--ARA_SENT,
.status-badge--ACE_SENT,
.status-badge--GIFT_SENT {
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
}

/* --- Campaign Detail Modal --- */
.campaign-detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 24px;
  overflow-y: auto;
}

.campaign-detail-overlay--visible {
  display: flex;
}

.campaign-detail {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 800px;
  box-shadow: var(--shadow-elevated);
}

.campaign-detail__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.campaign-detail__title {
  font-size: 1.1rem;
  font-weight: 700;
}

.campaign-detail__close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color var(--transition-fast);
  font-family: inherit;
}

.campaign-detail__close:hover {
  color: var(--text-primary);
}

.campaign-detail__body {
  padding: 24px;
}

/* --- Detail: Contact Info --- */
.detail-section {
  margin-bottom: 24px;
}

.detail-section__title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}

.detail-info-grid__item {
  font-size: 0.82rem;
}

.detail-info-grid__label {
  color: var(--text-muted);
  margin-right: 6px;
}

.detail-info-grid__value {
  color: var(--text-primary);
  font-weight: 500;
}

/* --- Detail: Step Progress --- */
.step-progress {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding: 4px 0;
}

.step-progress__step {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
}

.step-progress__node {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  background: var(--bg-primary);
  flex-shrink: 0;
}

.step-progress__node--completed {
  border-color: var(--accent-green);
  background: var(--accent-green-dim);
  color: var(--accent-green);
}

.step-progress__node--active {
  border-color: var(--accent-blue);
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
}

.step-progress__connector {
  width: 24px;
  height: 2px;
  background: var(--border-color);
  flex-shrink: 0;
}

.step-progress__connector--completed {
  background: var(--accent-green);
}

/* --- Detail: Email Thread --- */
.email-thread {
  max-height: 300px;
  overflow-y: auto;
}

.email-thread__item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.email-thread__item:last-child {
  border-bottom: none;
}

.email-thread__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.email-thread__type {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.email-thread__type--outbound {
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
}

.email-thread__type--inbound {
  background: var(--accent-green-dim);
  color: var(--accent-green);
}

.email-thread__date {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.email-thread__subject {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* --- Classification Badge --- */
.classification-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  text-transform: uppercase;
}

.classification-badge--OBJECTION { background: var(--accent-orange-dim); color: var(--accent-orange); }
.classification-badge--HARD_NO { background: var(--accent-red-dim); color: var(--accent-red); }
.classification-badge--INTEREST { background: var(--accent-green-dim); color: var(--accent-green); }
.classification-badge--MEETING_REQUEST { background: var(--accent-gold-dim); color: var(--accent-gold); }
.classification-badge--AUTO_REPLY { background: var(--accent-gray-dim); color: var(--accent-gray); }
.classification-badge--DELAY { background: var(--accent-purple-dim); color: var(--accent-purple); }

/* ============================================================================
   PLACEHOLDER PANELS (Responses, Meetings, Re-Engagement, Health)
   ============================================================================ */

.placeholder-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: var(--text-muted);
}

.placeholder-panel__icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.placeholder-panel__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.placeholder-panel__desc {
  font-size: 0.85rem;
}

/* ============================================================================
   LOADING & ERROR STATES
   ============================================================================ */

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton--card {
  height: 100px;
}

.skeleton--row {
  height: 44px;
  margin-bottom: 2px;
}

.skeleton--chart {
  height: 280px;
}

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

.error-state__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-red);
  margin-bottom: 6px;
}

.error-state__message {
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.error-state__retry {
  padding: 6px 16px;
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
  border: 1px solid var(--accent-blue);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: inherit;
  transition: background var(--transition-fast);
}

.error-state__retry:hover {
  background: rgba(59,130,246,0.25);
}

/* --- Empty State (Enhanced) --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.empty-state__icon {
  font-size: 2.4rem;
  margin-bottom: 14px;
  opacity: 0.35;
  line-height: 1;
}

.empty-state__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.empty-state__desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.5;
}

/* --- Data Freshness Indicator --- */
.freshness-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.freshness-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.freshness-badge--fresh .freshness-badge__dot { background: var(--accent-green); }
.freshness-badge--fresh { background: var(--accent-green-dim); color: var(--accent-green); }

.freshness-badge--stale .freshness-badge__dot { background: var(--accent-gold); }
.freshness-badge--stale { background: var(--accent-gold-dim); color: var(--accent-gold); }

.freshness-badge--old .freshness-badge__dot { background: var(--accent-red); }
.freshness-badge--old { background: var(--accent-red-dim); color: var(--accent-red); }

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-elevated);
  font-size: 0.82rem;
  color: var(--text-primary);
  pointer-events: auto;
  animation: toast-slide-in 250ms ease forwards;
  max-width: 380px;
}

.toast--exiting {
  animation: toast-slide-out 200ms ease forwards;
}

.toast__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
}

.toast--success .toast__icon { background: var(--accent-green-dim); color: var(--accent-green); }
.toast--error .toast__icon { background: var(--accent-red-dim); color: var(--accent-red); }
.toast--info .toast__icon { background: var(--accent-blue-dim); color: var(--accent-blue); }
.toast--warning .toast__icon { background: var(--accent-gold-dim); color: var(--accent-gold); }

.toast__message {
  flex: 1;
  min-width: 0;
}

.toast__close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  transition: color var(--transition-fast);
}

.toast__close:hover {
  color: var(--text-primary);
}

@keyframes toast-slide-in {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toast-slide-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

/* --- CSV Export Button (reusable) --- */
.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
}

.btn-export:hover {
  background: rgba(59,130,246,0.25);
  border-color: var(--accent-blue);
}

/* --- Keyboard Shortcut Hints --- */
.dashboard__tab-hint {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  background: rgba(255,255,255,0.08);
  color: var(--text-muted);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1.4;
}

.dashboard__tab--active .dashboard__tab-hint {
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
}

/* --- Loading Spinner (for buttons) --- */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 8px;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}

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

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* ============================================================================
   CAMPAIGN CREATOR (campaign-creator.js)
   ============================================================================ */

/* --- Buttons --- */
.cc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
  border: 1px solid transparent;
}

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

.cc-btn--primary:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.cc-btn--secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border-color: var(--border-color);
}

.cc-btn--secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

/* --- Form Elements --- */
.cc-form__field {
  margin-bottom: 14px;
  flex: 1;
}

.cc-form__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.cc-form__input,
.cc-form__select,
.cc-form__textarea {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

.cc-form__input:focus,
.cc-form__select:focus,
.cc-form__textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.cc-form__input::placeholder,
.cc-form__textarea::placeholder {
  color: var(--text-muted);
}

.cc-form__textarea {
  resize: vertical;
  min-height: 60px;
}

.cc-form__row {
  display: flex;
  gap: 12px;
}

.cc-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.cc-form__status {
  margin-top: 10px;
  font-size: 0.8rem;
  text-align: center;
  min-height: 20px;
}

.cc-form__status--error { color: var(--accent-red); }
.cc-form__status--success { color: var(--accent-green); }
.cc-form__status--loading { color: var(--text-muted); }

/* --- Campaign Group Cards (top of campaigns panel) --- */
.cc-group-cards-wrap {
  margin-bottom: 20px;
}

.cc-group-cards-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cc-group-cards-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cc-group-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.cc-group-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.cc-group-card:hover {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-card);
}

.cc-group-card__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-group-card__stats {
  display: flex;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.cc-group-card__meetings {
  color: var(--accent-green);
  font-weight: 600;
}

.cc-group-card__badge {
  display: inline-block;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 8px;
  vertical-align: middle;
}

.cc-group-card__badge--ready {
  background: rgba(26, 153, 86, 0.15);
  color: var(--accent-green);
}

.cc-group-card__badge--partial {
  background: rgba(218, 165, 32, 0.15);
  color: var(--accent-gold);
}

.cc-group-card__badge--active {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-purple);
}

.cc-group-card__meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* --- Group Detail Stats --- */
.cc-group-summary {
  margin-bottom: 16px;
}

.cc-group-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.cc-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
}

.cc-stat-card__value {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
}

.cc-stat-card__value--blue { color: var(--accent-blue); }
.cc-stat-card__value--green { color: var(--accent-green); }
.cc-stat-card__value--gold { color: var(--accent-gold); }
.cc-stat-card__value--purple { color: var(--accent-purple); }

.cc-stat-card__label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 2px;
}

.cc-group-meta {
  display: flex;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Launch Campaign Button */
.cc-launch-section {
  margin: 12px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cc-btn--launch {
  display: inline-block;
  padding: 10px 24px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-green), #1a9956);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

.cc-btn--launch:hover {
  background: linear-gradient(135deg, #1a9956, #16844a);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 153, 86, 0.35);
}

.cc-btn--launch:active {
  transform: translateY(0);
}

.cc-btn--launch-sending {
  background: linear-gradient(135deg, var(--accent-gold), #b8860b) !important;
  cursor: wait;
  animation: cc-pulse 1.5s ease-in-out infinite;
}

.cc-btn--launch-disabled {
  display: inline-block;
  padding: 10px 24px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: default;
  opacity: 0.7;
}

@keyframes cc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.cc-launch-status {
  font-size: 0.82rem;
  min-height: 20px;
}

.cc-launch-status--sending {
  color: var(--accent-gold);
}

.cc-launch-status--complete {
  color: var(--accent-green);
  font-weight: 600;
}

.cc-launch-status--error {
  color: var(--accent-red);
}

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

@media (max-width: 1280px) {
  .overview__cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .overview__grid {
    grid-template-columns: 1fr;
  }

  .campaign__toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .campaign__search {
    min-width: unset;
  }

  .detail-info-grid {
    grid-template-columns: 1fr;
  }

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

  .cc-form__row {
    flex-direction: column;
    gap: 0;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 13px;
  }

  .dashboard__header-inner {
    height: 48px;
  }

  .dashboard__content {
    padding: 16px;
  }

  .overview__cards {
    grid-template-columns: 1fr;
  }

  .dashboard__tab {
    padding: 10px 14px;
    font-size: 0.8rem;
  }

  .campaign-detail-overlay {
    padding: 16px;
  }

  .cc-group-cards {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   CSV IMPORT PANEL
   ============================================================================ */

.import-panel__desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.6;
}

.import-panel__cols {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.import-panel__template-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 20px;
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
  border: 1px solid var(--accent-blue);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-fast);
}

.import-panel__template-btn:hover {
  background: rgba(59,130,246,0.25);
}

/* Drop Zone */
.import-panel__drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  transition: border-color var(--transition-fast), background var(--transition-fast);
  cursor: pointer;
}

.import-panel__drop-zone:hover,
.import-panel__drop-zone--active {
  border-color: var(--accent-blue);
  background: var(--accent-blue-dim);
}

.import-panel__drop-icon {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 12px;
  opacity: 0.5;
}

.import-panel__drop-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.import-panel__drop-or {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.import-panel__file-btn {
  display: inline-block;
  padding: 8px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.import-panel__file-btn:hover {
  border-color: var(--accent-blue);
}

/* File Info */
.import-panel__file-info {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--accent-green);
  font-weight: 500;
}

.import-panel__file-info--error {
  color: var(--accent-red);
}

/* Preview */
.import-panel__preview-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
}

.import-panel__preview-table-wrap {
  max-height: 400px;
  overflow: auto;
}

/* Import Button */
.import-panel__import-btn {
  padding: 10px 24px;
  background: var(--accent-green);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.import-panel__import-btn:hover {
  opacity: 0.9;
}

.import-panel__import-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.import-panel__cancel-btn {
  padding: 10px 20px;
  background: none;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.import-panel__cancel-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-secondary);
}

.import-panel__cancel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Progress Bar */
.import-panel__progress {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.import-panel__progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-primary);
  border-radius: 3px;
  overflow: hidden;
}

.import-panel__progress-fill {
  height: 100%;
  background: var(--accent-blue);
  border-radius: 3px;
  transition: width 0.4s ease;
  width: 0%;
}

.import-panel__progress-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Results */
.import-panel__results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.import-panel__result-card {
  padding: 20px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.import-panel__result-card--success {
  background: var(--accent-green-dim);
  border: 1px solid rgba(34,197,94,0.3);
}

.import-panel__result-card--warn {
  background: var(--accent-gold-dim);
  border: 1px solid rgba(234,179,8,0.3);
}

.import-panel__result-card--error {
  background: var(--accent-red-dim);
  border: 1px solid rgba(239,68,68,0.3);
}

.import-panel__result-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.import-panel__result-card--success .import-panel__result-value { color: var(--accent-green); }
.import-panel__result-card--warn .import-panel__result-value { color: var(--accent-gold); }
.import-panel__result-card--error .import-panel__result-value { color: var(--accent-red); }

.import-panel__result-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Detail Lists (skipped, errors) */
.import-panel__detail-list {
  margin-top: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.import-panel__detail-item {
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 4px 0;
  border-bottom: 1px solid var(--border-color);
}

.import-panel__detail-item--error {
  color: var(--accent-red);
}

.import-panel__detail-row {
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 8px;
}

@media (max-width: 768px) {
  .import-panel__results-grid {
    grid-template-columns: 1fr;
  }
}

/* Auto-Import Path */
.auto-import__path {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-blue);
}

.auto-import__status {
  display: inline-flex;
  align-items: center;
}

/* ============================================================================
   PROSPECT PULL PANEL (prospecting.js)
   ============================================================================ */

.prospect-panel__desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.prospect-panel__count-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.prospect-panel__radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
}

.prospect-panel__radio input[type="radio"] {
  accent-color: var(--accent-blue);
  cursor: pointer;
}

.prospect-panel__campaign-choice {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.prospect-panel__progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 768px) {
  .prospect-panel__count-options {
    gap: 8px;
  }
  .prospect-panel__campaign-choice {
    flex-direction: column;
    gap: 8px;
  }
}

/* ============================================================================
   SCOUT v10.1 - History, Quality Badges, Suggestions, Page Size
   ============================================================================ */

/* Scout History Panel */
.scout-history-panel {
  border: 1px solid rgba(59,130,246,0.15);
}

.scout-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scout-history-item {
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: border-color 0.15s;
}

.scout-history-item:hover {
  border-color: rgba(59,130,246,0.3);
}

.scout-history-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.scout-history-item__date {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.scout-history-item__stats {
  font-size: 0.75rem;
  font-weight: 600;
}

.scout-history-item__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.scout-history-tag {
  display: inline-block;
  padding: 1px 8px;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.15);
  border-radius: 10px;
  font-size: 0.7rem;
  color: var(--accent-blue);
}

.scout-history-item__campaign {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Quality Score Badge */
.scout-quality-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Campaign Suggestions */
.scout-suggestions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.scout-suggestion-card {
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: border-color 0.15s;
}

.scout-suggestion-card:hover {
  border-color: rgba(59,130,246,0.3);
}

.scout-suggestion-card__name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scout-suggestion-card__meta {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.scout-suggestion-card__status {
  text-transform: uppercase;
  font-size: 0.65rem;
  font-weight: 600;
}

.scout-suggestion-card__match {
  font-size: 0.72rem;
}

/* Page Size Selector (shared style) */
.page-size-selector {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.page-size-select {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.75rem;
  cursor: pointer;
  outline: none;
}

.page-size-select:focus {
  border-color: var(--accent-blue);
}

/* Re-pull button */
.scout-repull-btn {
  gap: 4px;
}

/* ============================================================================
   TERRITORY & FOOTPRINT BADGES
   ============================================================================ */

/* In/Out Footprint Badge */
.territory-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.territory-badge--in {
  background: var(--accent-green-dim);
  color: var(--accent-green);
}

.territory-badge--out {
  background: var(--accent-red-dim);
  color: var(--accent-red);
}

/* Account Manager Badge */
.territory-am-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-purple-dim);
  color: var(--accent-purple);
  white-space: nowrap;
}

.territory-am-badge--unassigned {
  background: rgba(255, 152, 0, 0.12);
  color: #e67e00;
  font-weight: 600;
}

/* Region Label */
.territory-region {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Territory Info Block (combined badges) */
.territory-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Territory Panel */
.territory-panel {
  max-width: 100%;
}

.territory-lookup-result {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
}

/* --- Territory View Toggle --- */
.territory-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.territory-controls__left,
.territory-controls__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.territory-view-toggle {
  display: inline-flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.territory-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.territory-view-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.territory-view-btn--active {
  background: var(--accent-blue);
  color: #fff;
}

.territory-view-btn--active:hover {
  background: var(--accent-blue);
  color: #fff;
}

.territory-view-btn svg {
  flex-shrink: 0;
}

/* --- Territory Map Container --- */
.territory-map-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* --- Map Toolbar --- */
.territory-map-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 8px;
}

.territory-map-toolbar__left,
.territory-map-toolbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.territory-map-select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  min-width: 180px;
}

.territory-map-select:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.territory-map-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.territory-map-tool-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.territory-map-tool-btn--active {
  background: var(--accent-red-dim);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.territory-map-tool-btn--warn {
  color: var(--accent-orange);
}

.territory-map-tool-btn--warn:hover {
  background: var(--accent-orange-dim);
  border-color: var(--accent-orange);
}

.territory-selected-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--accent-blue-dim);
  border: 1px solid var(--accent-blue);
  border-radius: 20px;
  color: var(--accent-blue);
  font-size: 0.74rem;
  font-weight: 600;
}

.territory-selected-badge span {
  font-weight: 700;
}

/* --- Map + Sidebar Layout --- */
.territory-map-layout {
  display: flex;
  height: 600px;
}

.territory-map-main {
  flex: 1;
  position: relative;
  min-width: 0;
}

.territory-leaflet-map {
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
}

/* Fix Leaflet z-index conflicts */
.territory-leaflet-map .leaflet-pane {
  z-index: 1;
}
.territory-leaflet-map .leaflet-control {
  z-index: 2;
}

/* Dark Leaflet Controls */
.territory-leaflet-map .leaflet-control-zoom a {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

.territory-leaflet-map .leaflet-control-zoom a:hover {
  background: var(--bg-card-hover) !important;
}

.territory-leaflet-map .leaflet-control-attribution {
  background: rgba(15, 25, 35, 0.7) !important;
  color: var(--text-muted) !important;
  font-size: 10px !important;
}

.territory-leaflet-map .leaflet-control-attribution a {
  color: var(--text-muted) !important;
}

/* --- Tooltip --- */
.territory-tooltip {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-primary) !important;
  box-shadow: var(--shadow-elevated) !important;
  padding: 8px 12px !important;
}

.territory-tooltip::before {
  border-top-color: var(--border-color) !important;
}

/* --- Coverage Score Overlay --- */
.territory-coverage-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: rgba(15, 25, 35, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  min-width: 160px;
}

.territory-coverage-title {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.territory-coverage-value {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent-green);
  font-family: var(--font-mono);
}

.territory-coverage-label {
  font-size: 0.68rem;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.3;
}

/* --- Map Legend --- */
.territory-map-legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  background: rgba(15, 25, 35, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  min-width: 140px;
}

.territory-map-legend__title {
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.territory-map-legend__items {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.territory-map-legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  transition: opacity var(--transition-fast);
}

.territory-map-legend__item:hover {
  opacity: 0.8;
}

.territory-map-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.territory-map-legend__label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.territory-map-legend__divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

/* --- Door Knocking Sidebar --- */
.territory-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.territory-sidebar__header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}

.territory-sidebar__title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.territory-sidebar__body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.territory-sidebar__empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.territory-sidebar__list {
  display: flex;
  flex-direction: column;
}

.territory-sidebar__item {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}

.territory-sidebar__item:hover {
  background: var(--bg-card-hover);
}

.territory-sidebar__item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.territory-sidebar__item-zip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.territory-sidebar__color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.territory-sidebar__remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 2px 4px;
  border-radius: 3px;
  transition: all var(--transition-fast);
}

.territory-sidebar__remove:hover {
  background: var(--accent-red-dim);
  color: var(--accent-red);
}

.territory-sidebar__item-details {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.territory-sidebar__item-am {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.territory-sidebar__footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .territory-map-layout {
    flex-direction: column;
    height: auto;
  }

  .territory-map-main {
    height: 400px;
  }

  .territory-sidebar {
    width: 100%;
    max-height: 250px;
    border-left: none;
    border-top: 1px solid var(--border-color);
  }
}

/* ============================================================================
   CONTACTS PANEL (contacts.js)
   ============================================================================ */

/* LinkedIn icon link */
.contacts__linkedin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
  font-size: 0.7rem;
  font-weight: 800;
  text-decoration: none;
  transition: background var(--transition-fast);
}

.contacts__linkedin-link:hover {
  background: rgba(59,130,246,0.3);
}

.contacts__linkedin-none {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Company name link in table */
.contacts__company-link {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.contacts__company-link:hover {
  color: #60a5fa;
  text-decoration: underline;
}

/* Detail view links */
.contacts__detail-link {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 500;
}

.contacts__detail-link:hover {
  text-decoration: underline;
}

/* Phone links - visible in dark mode */
.contacts__phone-link,
a[href^="tel:"] {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 500;
}
.contacts__phone-link:hover,
a[href^="tel:"]:hover {
  color: #93bbfd;
  text-decoration: underline;
}

/* Pagination */
.contacts-pagination {
  margin-top: 16px;
}

.contacts-pagination__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.contacts-pagination__btn {
  padding: 6px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.contacts-pagination__btn:hover:not(:disabled) {
  border-color: var(--accent-blue);
  background: var(--bg-card-hover);
}

.contacts-pagination__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.contacts-pagination__info {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Company detail contact rows */
.company-detail__contact-row {
  cursor: pointer;
}

.company-detail__contact-row:hover {
  background: var(--bg-card-hover);
}

/* ============================================================================
   CAMPAIGN CARDS - Primary Campaign Group View (campaigns.js)
   ============================================================================ */

/* Cards grid container */
.campaign-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
  margin-top: 4px;
}

/* Individual campaign card */
.campaign-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 24px 20px 28px;
  min-height: 160px;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 4px solid var(--border-color);
}

.campaign-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  border-color: var(--border-light);
}

/* Status-colored left border */
.campaign-card--active { border-left-color: var(--accent-green); }
.campaign-card--ready { border-left-color: var(--accent-blue); }
.campaign-card--partial { border-left-color: var(--accent-orange); }
.campaign-card--complete { border-left-color: var(--accent-gray); }
.campaign-card--paused { border-left-color: var(--accent-gold); }

/* Card top section */
.campaign-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.campaign-card__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.campaign-card__badge {
  display: inline-block;
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.campaign-card__badge--active {
  background: var(--accent-green-dim);
  color: var(--accent-green);
}

.campaign-card__badge--ready {
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
}

.campaign-card__badge--partial {
  background: var(--accent-orange-dim);
  color: var(--accent-orange);
}

.campaign-card__badge--complete {
  background: var(--accent-gray-dim);
  color: var(--accent-gray);
}

.campaign-card__badge--paused {
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
}

/* Contact count */
.campaign-card__contacts {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.campaign-card__contacts strong {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.1rem;
}

/* Stats row */
.campaign-card__stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.campaign-card__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
}

.campaign-card__stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
}

.campaign-card__stat-value--sent { color: var(--accent-purple); }
.campaign-card__stat-value--replied { color: var(--accent-green); }
.campaign-card__stat-value--meetings { color: var(--accent-gold); }

.campaign-card__stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 1px;
}

/* Card footer - meta + launch button */
.campaign-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.campaign-card__meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Launch button on card */
.campaign-card__launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: linear-gradient(135deg, var(--accent-green), #1a9956);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.campaign-card__launch-btn:hover {
  background: linear-gradient(135deg, #1a9956, #16844a);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(26, 153, 86, 0.35);
}

.campaign-card__launch-btn--sending {
  background: linear-gradient(135deg, var(--accent-gold), #b8860b) !important;
  cursor: wait;
  animation: cc-pulse 1.5s ease-in-out infinite;
}

.campaign-card__launch-btn--locked {
  background: linear-gradient(135deg, #6b7280, #4b5563) !important;
  color: #d1d5db !important;
  cursor: not-allowed;
  opacity: 0.8;
}

.campaign-card__launch-btn--locked:hover {
  background: linear-gradient(135deg, #6b7280, #4b5563) !important;
  transform: none;
  box-shadow: none;
}

.cc-btn--launch-locked {
  background: linear-gradient(135deg, #6b7280, #4b5563) !important;
  color: #d1d5db !important;
  cursor: not-allowed;
  opacity: 0.8;
}

.campaign-card__launch-status {
  font-size: 0.72rem;
  color: var(--accent-gold);
  margin-top: 6px;
}

.campaign-card__launch-status--complete {
  color: var(--accent-green);
  font-weight: 600;
}

.campaign-card__launch-status--error {
  color: var(--accent-red);
}

/* Campaign drill-in view header */
.campaign-drillin__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.campaign-drillin__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.campaign-drillin__back:hover {
  border-color: var(--accent-blue);
  background: var(--bg-card-hover);
}

.campaign-drillin__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.campaign-drillin__badge {
  margin-left: 8px;
}

/* Stats row in drill-in */
.campaign-drillin__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

/* Launch section in drill-in */
.campaign-drillin__launch {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Launch Readiness Panel --- */
.launch-readiness {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: hidden;
}
.launch-readiness__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}
.launch-readiness__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}
.launch-readiness__refresh {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: var(--transition-fast);
}
.launch-readiness__refresh:hover {
  color: var(--accent-blue);
  background: var(--accent-blue-dim);
}
.launch-readiness__stats {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}
.launch-readiness__stat {
  text-align: center;
  min-width: 80px;
}
.launch-readiness__stat-value {
  font-size: 18px;
  font-weight: 700;
}
.launch-readiness__stat-value--blue { color: var(--accent-blue); }
.launch-readiness__stat-value--green { color: var(--accent-green); }
.launch-readiness__stat-value--purple { color: var(--accent-purple); }
.launch-readiness__stat-value--orange { color: var(--accent-orange); }
.launch-readiness__stat-value--gold { color: var(--accent-gold); }
.launch-readiness__stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.launch-readiness__checks {
  padding: 8px 16px 12px;
}
.launch-readiness__check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.launch-readiness__check:last-child { border-bottom: none; }
.launch-readiness__check-icon {
  font-size: 14px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.launch-readiness__check-icon--pass { color: var(--accent-green); }
.launch-readiness__check-icon--fail { color: var(--accent-red); }
.launch-readiness__check-icon--warn { color: var(--accent-gold); }
.launch-readiness__check-label {
  font-weight: 600;
  color: var(--text-primary);
  min-width: 140px;
}
.launch-readiness__check-detail {
  color: var(--text-secondary);
}
.cc-btn--secondary {
  padding: 8px 16px;
  background: var(--bg-card);
  color: var(--accent-blue);
  border: 1px solid var(--accent-blue);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition-fast);
}
.cc-btn--secondary:hover {
  background: var(--accent-blue-dim);
}

@media (max-width: 1280px) {
  .campaign-cards {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  .campaign-drillin__stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .campaign-cards {
    grid-template-columns: 1fr;
  }
  .campaign-card {
    min-height: unset;
  }
}

/* --- Contact-only badge --- */
.contacts__needs-email {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
  font-size: 0.78rem;
  font-weight: 500;
}

/* --- Contact Edit Form --- */
.contacts__edit-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 8px 0;
}

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

.contacts__edit-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.contacts__edit-input {
  padding: 7px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s;
}

.contacts__edit-input:focus {
  border-color: var(--accent-blue);
}

.contacts__edit-hint {
  font-size: 0.72rem;
  color: var(--accent-gold);
  margin-top: 2px;
}

.contacts__edit-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.contacts__edit-status {
  font-size: 0.85rem;
  font-weight: 500;
}

.btn-primary {
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  background: var(--accent-blue);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-primary:hover {
  opacity: 0.9;
}

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

/* --- Status badge for CONTACT_ONLY and PROMOTED --- */
.status-badge--CONTACT_ONLY {
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
}

.status-badge--PROMOTED {
  background: var(--accent-green-dim);
  color: var(--accent-green);
}

/* ============================================================================
   ANALYTICS PANEL
   ============================================================================ */

/* --- Analytics Stats Cards Grid (6 cards) --- */
.analytics-stats-cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1200px) {
  .analytics-stats-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .analytics-stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.summary-card__value--orange { color: var(--accent-orange); }
.summary-card__value--purple { color: var(--accent-purple); }

/* --- Leaderboard Table --- */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.leaderboard-table thead {
  background: var(--bg-secondary);
}

.leaderboard-table th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.leaderboard-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  vertical-align: middle;
}

.leaderboard-table tbody tr {
  transition: background var(--transition-fast);
}

.leaderboard-table tbody tr:hover {
  background: var(--bg-card-hover);
}

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

.leaderboard-table__rank-col {
  width: 60px;
  text-align: center;
}

.leaderboard-table__rank-cell {
  text-align: center;
}

.leaderboard-table__name {
  font-weight: 600;
}

.leaderboard-table__meetings {
  font-weight: 700;
  color: var(--accent-green);
}

/* --- Rank Badges --- */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 26px;
  padding: 0 8px;
  border-radius: 13px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--accent-gray-dim);
  color: var(--accent-gray);
}

.rank-badge--gold {
  background: linear-gradient(135deg, rgba(234,179,8,0.25), rgba(234,179,8,0.15));
  color: var(--accent-gold);
  border: 1px solid rgba(234,179,8,0.4);
}

.rank-badge--silver {
  background: linear-gradient(135deg, rgba(148,163,184,0.25), rgba(148,163,184,0.15));
  color: #94a3b8;
  border: 1px solid rgba(148,163,184,0.4);
}

.rank-badge--bronze {
  background: linear-gradient(135deg, rgba(205,127,50,0.25), rgba(205,127,50,0.15));
  color: #cd7f32;
  border: 1px solid rgba(205,127,50,0.4);
}

/* --- v10.1: Analytics Date Range Picker --- */
.analytics-date-range-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 8px 0;
}
.analytics-date-range-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}
.analytics-date-range-btns {
  display: flex;
  gap: 4px;
}
.analytics-range-btn {
  padding: 5px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.analytics-range-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}
.analytics-range-btn--active {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
}

/* --- v10.1: Leaderboard Mini Progress Bars --- */
.leaderboard-rate-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.leaderboard-rate-cell span {
  font-size: 0.78rem;
  font-weight: 600;
}
.leaderboard-mini-bar {
  width: 100%;
  height: 4px;
  background: rgba(42,63,85,0.3);
  border-radius: 2px;
  overflow: hidden;
}
.leaderboard-mini-bar__fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.leaderboard-mini-bar__fill--blue {
  background: var(--accent-blue);
}
.leaderboard-mini-bar__fill--gold {
  background: var(--accent-gold);
}

/* --- v10.1: Analytics Page Size Selector --- */
.analytics-page-size-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.analytics-page-size-select {
  padding: 3px 6px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.72rem;
  cursor: pointer;
}

/* --- v10.1: Analytics Pagination --- */
.analytics-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid var(--border-color);
}
.analytics-pagination__info {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.analytics-pagination__btns {
  display: flex;
  align-items: center;
  gap: 8px;
}
.analytics-pagination__current {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* --- v10.1: Advanced Analytics Collapsible --- */
.analytics-advanced-section {
  margin-bottom: 24px;
}
.analytics-advanced-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.analytics-advanced-toggle:hover {
  background: var(--bg-card-hover);
}
.analytics-advanced-toggle__icon {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  display: inline-block;
}
.analytics-advanced-toggle--open {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}
.analytics-advanced-content {
  animation: fadeIn 0.2s ease;
  overflow: hidden;
}
#analytics-industry-donut-body {
  overflow: hidden;
  max-height: 500px;
}
#analytics-industry-donut-body canvas {
  max-height: 400px !important;
}
#analytics-am-radar-body {
  overflow: hidden;
  max-height: 450px;
}
#analytics-engagement-heatmap-body {
  overflow: hidden;
}

/* --- v10.1: Conversion Funnel --- */
.analytics-funnel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0;
}
.analytics-funnel__stage {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.analytics-funnel__bar-wrap {
  width: 100%;
}
.analytics-funnel__bar {
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  transition: width 0.5s ease;
}
.analytics-funnel__bar-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}
.analytics-funnel__conv {
  font-size: 0.68rem;
  color: var(--text-muted);
  padding-left: 12px;
}

/* --- v10.1: Template Performance Cards --- */
.analytics-template-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
}
.analytics-template-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}
.analytics-template-card:hover {
  background: var(--bg-card-hover);
}
.analytics-template-card--gold {
  border-left: 3px solid var(--accent-gold);
}
.analytics-template-card--silver {
  border-left: 3px solid #94a3b8;
}
.analytics-template-card--bronze {
  border-left: 3px solid #cd7f32;
}
.analytics-template-card__rank {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 28px;
}
.analytics-template-card__info {
  flex: 1;
  min-width: 0;
}
.analytics-template-card__name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.analytics-template-card__stats {
  display: flex;
  gap: 12px;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- v10.1: AM Comparison Modal --- */
.analytics-compare-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}
.analytics-compare-modal__content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  width: 560px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
}
.analytics-compare-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.analytics-compare-modal__selectors {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  justify-content: center;
}
.analytics-compare-select {
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.82rem;
  min-width: 160px;
}
.analytics-compare-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.analytics-compare-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--bg-secondary);
}
.analytics-compare-row:nth-child(even) {
  background: transparent;
}
.analytics-compare-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}
.analytics-compare-val {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.analytics-compare-val:first-child {
  text-align: right;
}
.analytics-compare-val:last-child {
  text-align: left;
}
.analytics-compare-val--winner {
  color: var(--accent-green);
}

/* ============================================================================
   CONTACTS - 3-DOT KEBAB MENU
   ============================================================================ */

/* Actions cell positioning */
.contacts__actions-cell {
  position: relative;
  width: 40px;
  text-align: center;
}

/* Kebab button */
.contacts__kebab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
  padding: 0;
  line-height: 1;
  font-family: inherit;
}

.contacts__kebab-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color);
  color: var(--text-primary);
}

/* Dropdown menu */
.contacts__kebab-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 150;
  min-width: 140px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-elevated);
  overflow: hidden;
  margin-top: 2px;
}

.contacts__kebab-dropdown--open {
  display: block;
}

/* Dropdown items */
.contacts__kebab-item {
  display: block;
  width: 100%;
  padding: 8px 14px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.contacts__kebab-item:hover {
  background: var(--bg-card-hover);
}

.contacts__kebab-item[data-action="remove"],
.contacts__kebab-item[data-action="delete-company"] {
  color: var(--accent-red);
}

.contacts__kebab-item[data-action="remove"]:hover,
.contacts__kebab-item[data-action="delete-company"]:hover {
  background: var(--accent-red-dim);
}

/* Bulk delete button (Surprise #1 & #2) */
.btn-bulk-delete {
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid rgba(239,68,68,0.4);
  border-radius: 6px;
  background: rgba(239,68,68,0.12);
  color: #ef4444;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn-bulk-delete:hover {
  background: rgba(239,68,68,0.22);
  border-color: rgba(239,68,68,0.6);
}

/* Undo toast (Surprise #3) */
.toast--undo {
  position: relative;
  overflow: hidden;
}
.toast__undo-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  margin-left: 10px;
  transition: background 0.15s;
  flex-shrink: 0;
}
.toast__undo-btn:hover {
  background: rgba(255,255,255,0.15);
}
.toast__undo-timer {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: rgba(255,255,255,0.25);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* ============================================================================
   CONTACTS - DETAIL ACTION TOOLBAR
   ============================================================================ */

.contacts__detail-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.contacts__detail-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.contacts__detail-action:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  color: var(--text-primary);
}

.contacts__detail-action-icon {
  font-size: 0.9rem;
  line-height: 1;
}

/* ============================================================================
   CLICK-TO-CALL + CALL LOG MODAL + CALL OUTCOME BADGES
   RingCentral Integration Phase 1 scaffold
   ============================================================================ */

/* --- Click-to-Call Link --- */
.click-to-call {
  color: var(--accent-blue);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
  white-space: nowrap;
}

.click-to-call:hover {
  color: var(--accent-green);
  text-decoration-style: solid;
}

.click-to-call::before {
  content: '\260E';
  margin-right: 4px;
  font-size: 0.85em;
}

/* --- Call Log Modal Overlay --- */
.call-log-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.call-log-overlay--visible {
  display: flex;
}

.call-log-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 560px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-elevated);
}

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

.call-log-modal__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.call-log-modal__close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.call-log-modal__close:hover {
  color: var(--text-primary);
}

.call-log-modal__body {
  padding: 20px;
}

.call-log-modal__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.call-log-modal__field {
  display: flex;
  flex-direction: column;
}

.call-log-modal__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.call-log-modal__input,
.call-log-modal__select,
.call-log-modal__textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 8px 10px;
  font-size: 0.85rem;
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

.call-log-modal__input:focus,
.call-log-modal__select:focus,
.call-log-modal__textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.call-log-modal__input[readonly] {
  opacity: 0.7;
  cursor: default;
}

.call-log-modal__textarea {
  resize: vertical;
  min-height: 60px;
}

.call-log-modal__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.call-log-modal__save-btn {
  background: var(--accent-green);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.call-log-modal__save-btn:hover {
  background: #1ea550;
}

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

.call-log-modal__cancel-btn {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  padding: 10px 16px;
  font-size: 0.85rem;
  cursor: pointer;
}

.call-log-modal__cancel-btn:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
}

.call-log-modal__status {
  font-size: 0.8rem;
  font-weight: 500;
}

/* --- Call Outcome Badges --- */
.call-outcome-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.call-outcome-badge--connected {
  background: var(--accent-green-dim);
  color: var(--accent-green);
}

.call-outcome-badge--voicemail {
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
}

.call-outcome-badge--no_answer {
  background: var(--accent-gray-dim);
  color: var(--accent-gray);
}

.call-outcome-badge--busy {
  background: var(--accent-red-dim);
  color: var(--accent-red);
}

.call-outcome-badge--wrong_number {
  background: var(--accent-red-dim);
  color: var(--accent-red);
}

/* --- Call Stats Cards --- */
.call-stats-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.call-history-panel .summary-card__value--gray {
  color: var(--text-secondary);
}

.call-history-panel .summary-card__value--purple {
  color: var(--accent-purple);
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .call-log-modal__row {
    grid-template-columns: 1fr;
  }

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

/* ============================================================================
   DAILY BRIEFING CARD - Personal Sales Assistant Panel
   ============================================================================ */

.briefing-card {
  margin-bottom: 20px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #162a3e 0%, #1a2f4a 40%, #1e2d45 70%, #1a2840 100%);
  border: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .briefing-card {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 40%, #f5f8ff 70%, #eef2ff 100%);
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

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

.briefing-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-fast);
  border-bottom: 1px solid rgba(59, 130, 246, 0.12);
}

.briefing-card__header:hover {
  background: rgba(59, 130, 246, 0.06);
}

.briefing-card__header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.briefing-card__icon {
  font-size: 1.5rem;
  color: var(--accent-gold);
  line-height: 1;
}

.briefing-card__greeting {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.briefing-card__date {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding-left: 4px;
}

.briefing-card__header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.briefing-card__updated {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.briefing-card__chevron {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform var(--transition-normal);
  line-height: 1;
}

.briefing-card__chevron--collapsed {
  transform: rotate(-90deg);
}

/* ── Body ───────────────────────────────────────────────────────── */

.briefing-card__body {
  padding: 0 20px 20px;
  overflow: hidden;
  max-height: 2000px;
  opacity: 1;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
}

.briefing-card__body--collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* ── Key Numbers Row ────────────────────────────────────────────── */

.briefing-numbers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding-top: 16px;
}

.briefing-number {
  text-align: center;
  padding: 14px 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .briefing-number {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

.briefing-number__value {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1.2;
}

.briefing-number__value--blue { color: var(--accent-blue); }
.briefing-number__value--green { color: var(--accent-green); }
.briefing-number__value--gold { color: var(--accent-gold); }
.briefing-number__value--purple { color: var(--accent-purple); }

.briefing-number__label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.briefing-number__suffix {
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: lowercase;
}

/* ── Two-column Grid (Actions + Hot Prospects) ──────────────────── */

.briefing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

/* ── Section Titles ─────────────────────────────────────────────── */

.briefing-section__title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .briefing-section__title {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

/* ── Action Items ───────────────────────────────────────────────── */

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

.briefing-action {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.4;
  border-left: 3px solid transparent;
}

.briefing-action--high {
  background: var(--accent-red-dim);
  border-left-color: var(--accent-red);
}

.briefing-action--medium {
  background: var(--accent-gold-dim);
  border-left-color: var(--accent-gold);
}

.briefing-action--low {
  background: var(--accent-blue-dim);
  border-left-color: var(--accent-blue);
}

.briefing-action--none {
  background: var(--accent-green-dim);
  border-left-color: var(--accent-green);
}

.briefing-action__icon {
  flex-shrink: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.briefing-action__text {
  flex: 1;
}

/* ── Hot Prospects ──────────────────────────────────────────────── */

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

.briefing-prospect {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .briefing-prospect {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

.briefing-prospect__rank {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-orange);
  min-width: 24px;
}

.briefing-prospect__info {
  flex: 1;
  min-width: 0;
}

.briefing-prospect__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.briefing-prospect__company {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.briefing-prospect__heat {
  font-size: 0.75rem;
  color: var(--accent-orange);
  font-weight: 600;
  white-space: nowrap;
  font-family: var(--font-mono);
}

.briefing-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 10px 0;
}

/* ── Territory Pulse ────────────────────────────────────────────── */

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

.briefing-territory {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
}

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

.briefing-territory__bar-bg {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

[data-theme="light"] .briefing-territory__bar-bg {
  background: rgba(0, 0, 0, 0.06);
}

.briefing-territory__bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  min-width: 4px;
  transition: width 0.6s ease;
}

.briefing-territory__count {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  font-family: var(--font-mono);
}

/* ── Motivational Quote ─────────────────────────────────────────── */

.briefing-quote {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(168, 85, 247, 0.06);
  border-left: 3px solid var(--accent-purple);
  position: relative;
}

[data-theme="light"] .briefing-quote {
  background: rgba(168, 85, 247, 0.05);
}

.briefing-quote__text {
  font-size: 0.88rem;
  color: var(--text-primary);
  font-style: italic;
  line-height: 1.5;
}

.briefing-quote__author {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: right;
}

/* ── Briefing Responsive ────────────────────────────────────────── */

@media (max-width: 768px) {
  .briefing-numbers {
    grid-template-columns: repeat(2, 1fr);
  }

  .briefing-grid {
    grid-template-columns: 1fr;
  }

  .briefing-territory {
    grid-template-columns: 90px 1fr auto;
  }

  .briefing-card__header-left {
    gap: 8px;
  }

  .briefing-card__date {
    display: none;
  }
}

@media (max-width: 480px) {
  .briefing-card__header {
    padding: 12px 14px;
  }

  .briefing-card__body {
    padding: 0 14px 14px;
  }

  .briefing-card__greeting {
    font-size: 1rem;
  }

  .briefing-number__value {
    font-size: 1.4rem;
  }
}

/* ============================================================================
   COMMAND CENTER PULSE - Live Activity Ticker
   ============================================================================ */

/* --- Ticker Bar (between nav and content) --- */
.pulse-ticker {
  display: flex;
  align-items: center;
  gap: 0;
  background: linear-gradient(90deg, #0a0f14 0%, #0d1a24 40%, #0a1018 100%);
  border-bottom: 1px solid rgba(34, 197, 94, 0.15);
  border-top: 1px solid rgba(34, 197, 94, 0.08);
  padding: 0 24px;
  height: 36px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  z-index: 50;
}

.pulse-ticker::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.3), transparent);
  animation: pulse-ticker-scanline 3s ease-in-out infinite;
}

@keyframes pulse-ticker-scanline {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.pulse-ticker:hover {
  background: linear-gradient(90deg, #0c1219 0%, #0f1e2c 40%, #0c1420 100%);
  border-bottom-color: rgba(34, 197, 94, 0.3);
}

/* LIVE label */
.pulse-ticker__label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding-right: 16px;
  border-right: 1px solid rgba(34, 197, 94, 0.15);
  margin-right: 16px;
  height: 100%;
}

.pulse-ticker__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6), 0 0 12px rgba(34, 197, 94, 0.3);
  animation: pulse-ticker-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

.pulse-ticker__dot--large {
  width: 8px;
  height: 8px;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7), 0 0 16px rgba(34, 197, 94, 0.4);
}

@keyframes pulse-ticker-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(34, 197, 94, 0.6), 0 0 12px rgba(34, 197, 94, 0.3); }
  50% { opacity: 0.5; box-shadow: 0 0 3px rgba(34, 197, 94, 0.3); }
}

.pulse-ticker__label-text {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #22c55e;
  text-transform: uppercase;
}

/* Track (scrolling content area) */
.pulse-ticker__track {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.pulse-ticker__content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
}

/* Individual ticker item */
.pulse-ticker__item {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(34, 197, 94, 0.9);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  width: 100%;
  overflow: hidden;
}

.pulse-ticker__item--active {
  opacity: 1;
  transform: translateY(0);
}

.pulse-ticker__item--entering {
  opacity: 0;
  transform: translateY(12px);
}

.pulse-ticker__item--exiting {
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Type badge in ticker */
.pulse-ticker__type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  flex-shrink: 0;
  text-transform: uppercase;
}

.pulse-ticker__type-badge--blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.pulse-ticker__type-badge--purple {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.pulse-ticker__type-badge--green {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.pulse-ticker__type-badge--gold {
  background: rgba(234, 179, 8, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(234, 179, 8, 0.25);
}

.pulse-ticker__type-badge--orange {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.pulse-ticker__type-badge--gray {
  background: rgba(107, 114, 128, 0.15);
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.25);
}

/* Message text */
.pulse-ticker__message {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(34, 197, 94, 0.85);
  text-shadow: 0 0 8px rgba(34, 197, 94, 0.15);
}

/* Timestamp in ticker */
.pulse-ticker__time {
  flex-shrink: 0;
  font-size: 0.65rem;
  color: rgba(34, 197, 94, 0.4);
  margin-left: 12px;
}

/* Meta (event count) */
.pulse-ticker__meta {
  flex-shrink: 0;
  padding-left: 16px;
  border-left: 1px solid rgba(34, 197, 94, 0.15);
  margin-left: 16px;
  height: 100%;
  display: flex;
  align-items: center;
}

.pulse-ticker__count {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: rgba(34, 197, 94, 0.4);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* --- Light Theme Override --- */
[data-theme="light"] .pulse-ticker {
  background: linear-gradient(90deg, #f8faf9 0%, #f0f7f2 40%, #f5faf6 100%);
  border-bottom-color: rgba(22, 163, 74, 0.15);
  border-top-color: rgba(22, 163, 74, 0.08);
}

[data-theme="light"] .pulse-ticker:hover {
  background: linear-gradient(90deg, #f0f5f1 0%, #e8f2ea 40%, #edf5ef 100%);
}

[data-theme="light"] .pulse-ticker::before {
  background: linear-gradient(90deg, transparent, rgba(22, 163, 74, 0.25), transparent);
}

[data-theme="light"] .pulse-ticker__label {
  border-right-color: rgba(22, 163, 74, 0.15);
}

[data-theme="light"] .pulse-ticker__dot {
  background: #16a34a;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.5);
}

[data-theme="light"] .pulse-ticker__label-text {
  color: #16a34a;
}

[data-theme="light"] .pulse-ticker__message {
  color: #15803d;
  text-shadow: none;
}

[data-theme="light"] .pulse-ticker__time {
  color: rgba(21, 128, 61, 0.5);
}

[data-theme="light"] .pulse-ticker__meta {
  border-left-color: rgba(22, 163, 74, 0.15);
}

[data-theme="light"] .pulse-ticker__count {
  color: rgba(21, 128, 61, 0.5);
}

/* ============================================================================
   ACTIVITY FEED EXPANDED MODAL
   ============================================================================ */

.activity-feed-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 300;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 24px 40px;
  overflow-y: auto;
}

.activity-feed-overlay--visible {
  display: flex;
}

.activity-feed-modal {
  background: #0a1018;
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 860px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(34, 197, 94, 0.05);
  overflow: hidden;
}

.activity-feed-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(34, 197, 94, 0.12);
  background: linear-gradient(90deg, #0c1219 0%, #0e1a26 100%);
}

.activity-feed-modal__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.activity-feed-modal__title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: #22c55e;
  letter-spacing: 0.02em;
  text-shadow: 0 0 12px rgba(34, 197, 94, 0.2);
}

.activity-feed-modal__close {
  background: none;
  border: 1px solid rgba(34, 197, 94, 0.15);
  border-radius: 6px;
  color: rgba(34, 197, 94, 0.5);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
  font-family: inherit;
}

.activity-feed-modal__close:hover {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.08);
}

/* Filters */
.activity-feed-modal__filters {
  display: flex;
  gap: 2px;
  padding: 10px 24px;
  border-bottom: 1px solid rgba(34, 197, 94, 0.08);
  background: rgba(10, 16, 24, 0.6);
  overflow-x: auto;
}

.activity-feed-modal__filter {
  padding: 5px 14px;
  border: 1px solid rgba(34, 197, 94, 0.1);
  border-radius: 4px;
  background: transparent;
  color: rgba(34, 197, 94, 0.4);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-transform: uppercase;
}

.activity-feed-modal__filter:hover {
  color: rgba(34, 197, 94, 0.7);
  border-color: rgba(34, 197, 94, 0.2);
  background: rgba(34, 197, 94, 0.04);
}

.activity-feed-modal__filter--active {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.1);
}

/* Modal body */
.activity-feed-modal__body {
  max-height: 500px;
  overflow-y: auto;
}

.activity-feed-modal__loading {
  padding: 40px 24px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(34, 197, 94, 0.4);
}

.activity-feed-modal__empty {
  padding: 60px 24px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: rgba(34, 197, 94, 0.3);
}

.activity-feed-modal__empty-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  opacity: 0.3;
}

/* Event list */
.activity-feed-modal__list {
  padding: 0;
}

.activity-feed-modal__event {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(34, 197, 94, 0.06);
  transition: background var(--transition-fast);
}

.activity-feed-modal__event:last-child {
  border-bottom: none;
}

.activity-feed-modal__event:hover {
  background: rgba(34, 197, 94, 0.03);
}

/* Event icon */
.activity-feed-modal__event-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  margin-top: 2px;
  letter-spacing: 0.04em;
}

.activity-feed-modal__event-icon--blue {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.activity-feed-modal__event-icon--purple {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.activity-feed-modal__event-icon--green {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.activity-feed-modal__event-icon--gold {
  background: rgba(234, 179, 8, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(234, 179, 8, 0.2);
}

.activity-feed-modal__event-icon--orange {
  background: rgba(249, 115, 22, 0.12);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.activity-feed-modal__event-icon--gray {
  background: rgba(107, 114, 128, 0.12);
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.2);
}

/* Event content */
.activity-feed-modal__event-content {
  flex: 1;
  min-width: 0;
}

.activity-feed-modal__event-message {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: rgba(34, 197, 94, 0.85);
  line-height: 1.5;
  word-break: break-word;
}

.activity-feed-modal__event-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.activity-feed-modal__event-time {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(34, 197, 94, 0.35);
}

.activity-feed-modal__event-ago {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(34, 197, 94, 0.25);
}

.activity-feed-modal__event-detail {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: rgba(59, 130, 246, 0.5);
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.12);
}

/* Event type badge (right side) */
.activity-feed-modal__event-type {
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- Light Theme Override for Modal --- */
[data-theme="light"] .activity-feed-modal {
  background: #ffffff;
  border-color: rgba(22, 163, 74, 0.2);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .activity-feed-modal__header {
  background: linear-gradient(90deg, #f8faf9 0%, #f0f7f2 100%);
  border-bottom-color: rgba(22, 163, 74, 0.12);
}

[data-theme="light"] .activity-feed-modal__title {
  color: #16a34a;
  text-shadow: none;
}

[data-theme="light"] .activity-feed-modal__close {
  color: rgba(22, 163, 74, 0.5);
  border-color: rgba(22, 163, 74, 0.15);
}

[data-theme="light"] .activity-feed-modal__close:hover {
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.3);
  background: rgba(22, 163, 74, 0.06);
}

[data-theme="light"] .activity-feed-modal__filters {
  background: #f8faf9;
  border-bottom-color: rgba(22, 163, 74, 0.08);
}

[data-theme="light"] .activity-feed-modal__filter {
  color: rgba(22, 163, 74, 0.4);
  border-color: rgba(22, 163, 74, 0.1);
}

[data-theme="light"] .activity-feed-modal__filter:hover {
  color: rgba(22, 163, 74, 0.7);
  border-color: rgba(22, 163, 74, 0.2);
}

[data-theme="light"] .activity-feed-modal__filter--active {
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.3);
  background: rgba(22, 163, 74, 0.08);
}

[data-theme="light"] .activity-feed-modal__event {
  border-bottom-color: rgba(22, 163, 74, 0.06);
}

[data-theme="light"] .activity-feed-modal__event:hover {
  background: rgba(22, 163, 74, 0.03);
}

[data-theme="light"] .activity-feed-modal__event-message {
  color: #15803d;
}

[data-theme="light"] .activity-feed-modal__event-time {
  color: rgba(21, 128, 61, 0.45);
}

[data-theme="light"] .activity-feed-modal__event-ago {
  color: rgba(21, 128, 61, 0.3);
}

[data-theme="light"] .activity-feed-modal__loading,
[data-theme="light"] .activity-feed-modal__empty {
  color: rgba(21, 128, 61, 0.4);
}

/* Scrollbar for modal body (green theme) */
.activity-feed-modal__body::-webkit-scrollbar {
  width: 6px;
}

.activity-feed-modal__body::-webkit-scrollbar-track {
  background: transparent;
}

.activity-feed-modal__body::-webkit-scrollbar-thumb {
  background: rgba(34, 197, 94, 0.15);
  border-radius: 3px;
}

.activity-feed-modal__body::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 197, 94, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
  .pulse-ticker {
    padding: 0 14px;
    height: 32px;
  }

  .pulse-ticker__label {
    padding-right: 10px;
    margin-right: 10px;
  }

  .pulse-ticker__meta {
    display: none;
  }

  .pulse-ticker__item {
    font-size: 0.7rem;
  }

  .activity-feed-overlay {
    padding: 24px 12px;
  }

  .activity-feed-modal__event {
    padding: 10px 16px;
  }

  .activity-feed-modal__event-type {
    display: none;
  }
}

/* ============================================================================
   FOOTPRINT DOT INDICATORS
   ============================================================================ */

.footprint-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.footprint-dot--in {
  background: #22c55e;
  box-shadow: 0 0 4px #22c55e;
  animation: footprint-pulse 2s ease-in-out infinite;
}

.footprint-dot--out {
  background: #ef4444;
}

.footprint-dot--unknown {
  background: #6b7280;
}

@keyframes footprint-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px #22c55e; }
  50% { opacity: 0.7; box-shadow: 0 0 8px #22c55e; }
}

/* ============================================================================
   ZIP SUGGESTION PANEL (Campaign Creator)
   ============================================================================ */

.zip-suggestion-panel {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.zip-suggestion-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.zip-suggestion-panel__title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.zip-suggestion-panel__am {
  font-size: 0.78rem;
  color: var(--accent-blue);
  padding: 2px 8px;
  background: var(--accent-blue-dim);
  border-radius: 4px;
}

.zip-suggestion-panel__list {
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.zip-suggestion-panel__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.82rem;
}

.zip-suggestion-panel__item:last-child {
  border-bottom: none;
}

.zip-suggestion-panel__item label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  cursor: pointer;
}

/* ============================================================================
   PAGE SIZE SELECTOR (shared across tabs)
   ============================================================================ */

.page-size-wrap {
  display: flex;
  align-items: center;
}

.pagination-controls {
  margin-top: 8px;
}

/* ============================================================================
   CAMPAIGN BULK ADD MODAL
   ============================================================================ */

.cc-bulk-tabs {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  padding: 0 16px;
  background: var(--bg-secondary);
}

.cc-bulk-tab {
  padding: 10px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.cc-bulk-tab:hover {
  color: var(--text-secondary);
}

.cc-bulk-tab--active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

.cc-bulk-filters {
  margin-bottom: 14px;
}

.cc-bulk-results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 8px;
}

.cc-bulk-table-wrap {
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.cc-bulk-table {
  font-size: 0.82rem;
}

.cc-bulk-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  text-align: center;
}

.cc-bulk-upload-zone:hover,
.cc-bulk-upload-zone--dragover {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.05);
}

.cc-bulk-upload-zone__icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.7;
}

.cc-bulk-upload-zone__text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.cc-bulk-upload-zone__sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cc-bulk-csv-info {
  display: flex;
  align-items: center;
  padding: 10px 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ============================================================================
   ENRICHMENT BUTTON & PROGRESS (Import Tab)
   ============================================================================ */

.enrich-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.enrich-toolbar__btn {
  padding: 6px 14px;
  font-size: 0.78rem;
  background: var(--accent-purple);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast), opacity var(--transition-fast);
}

.enrich-toolbar__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.enrich-toolbar__btn:not(:disabled):hover {
  background: #9333ea;
}

.enrich-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--accent-purple-dim);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--accent-purple);
  margin-bottom: 12px;
}

.enrich-results {
  padding: 10px 14px;
  background: var(--accent-green-dim);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--accent-green);
  margin-bottom: 12px;
}

/* ============================================================================
   COMPANY IMPORT SECTION (Import Tab)
   ============================================================================ */

.company-import-panel {
  padding: 16px 20px;
}

.company-import-panel__desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.company-import-panel__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.company-import-panel__drop {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.company-import-panel__drop:hover,
.company-import-panel__drop--active {
  border-color: var(--accent-blue);
  background: var(--accent-blue-dim);
}

/* ============================================================================
   CONTACTS TAB - DUAL VIEW (Personas / Companies)
   ============================================================================ */

/* --- Toggle Buttons --- */
.contacts-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.contacts-toggle__btn {
  flex: 1;
  padding: 12px 24px;
  border: none;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contacts-toggle__btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.contacts-toggle__btn--active {
  background: var(--accent-blue);
  color: #fff;
}

.contacts-toggle__btn--active:hover {
  background: var(--accent-blue);
  color: #fff;
  opacity: 0.95;
}

/* --- View Containers --- */
.contacts-view {
  display: none;
}

.contacts-view--active {
  display: block;
}

/* --- Filters Bar --- */
.contacts-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.contacts-filters__search {
  min-width: 200px;
  flex: 1;
}

.contacts-filters__select {
  height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.8rem;
  outline: none;
  min-width: 140px;
  cursor: pointer;
}

.contacts-filters__select:focus {
  border-color: var(--accent-blue);
}

.contacts-filters__input {
  height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.8rem;
  outline: none;
  min-width: 140px;
}

.contacts-filters__input--short {
  min-width: 100px;
  max-width: 120px;
}

.contacts-filters__input:focus {
  border-color: var(--accent-blue);
}

.contacts-filters__clear {
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.contacts-filters__clear:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.contacts-filters__import {
  padding: 6px 14px;
  font-size: 0.82rem;
}

.contacts-filters__checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}

.contacts-filters__checkbox-label input[type="checkbox"] {
  accent-color: var(--accent-blue);
}

/* --- Footprint Cell --- */
.contacts__footprint-cell {
  width: 24px;
  text-align: center;
  padding: 0 4px !important;
}

/* --- AM Unassigned --- */
.contacts__am-unassigned {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.78rem;
}

/* --- Mobile Phone Row --- */
.contacts__mobile-row {
  margin-top: 3px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 3px;
}
.contacts__mobile-icon {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* --- Enrichment Badge --- */
.contacts__enrich-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.contacts__enrich-badge--none {
  background: var(--accent-gray-dim);
  color: var(--accent-gray);
}

.contacts__enrich-badge--pending {
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
}

.contacts__enrich-badge--enriched {
  background: var(--accent-green-dim);
  color: var(--accent-green);
}

.contacts__enrich-badge--failed {
  background: var(--accent-red-dim);
  color: var(--accent-red);
}

/* --- Company Import Modal Dropzone --- */
.company-import__dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.company-import__dropzone:hover,
.company-import__dropzone--drag {
  border-color: var(--accent-blue);
  background: var(--accent-blue-dim);
}

.company-import__dropzone-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* --- Contact Import Modal dropzone --- */
.contact-import-modal__dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.contact-import-modal__dropzone:hover,
.contact-import-modal__dropzone.import-panel__drop-zone--active {
  border-color: var(--accent-blue);
  background: var(--accent-blue-dim);
}

/* --- Companies row hover --- */
.companies__row {
  cursor: pointer;
}

.companies__row:hover {
  background: var(--bg-card-hover);
}

.companies__row--selected {
  background: rgba(59, 130, 246, 0.08);
}

.companies__row--selected:hover {
  background: rgba(59, 130, 246, 0.14);
}

.companies__checkbox-cell {
  width: 30px;
  text-align: center;
  padding: 4px 6px;
}

.website-status {
  font-weight: bold;
  font-size: 14px;
  margin-left: 4px;
}

.website-status--verified {
  color: var(--accent-green, #22c55e);
}

.website-status--scraped {
  color: var(--accent-yellow, #eab308);
}

.website-status--invalid {
  color: var(--accent-red, #ef4444);
}

.companies__checkbox-cell input[type="checkbox"],
#companies-select-all {
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: var(--accent-primary, #3b82f6);
}

/* --- Responsive: filters wrap --- */
@media (max-width: 1024px) {
  .contacts-filters {
    gap: 8px;
  }
  .contacts-filters__search {
    min-width: 160px;
  }
  .contacts-filters__select {
    min-width: 120px;
  }
}

@media (max-width: 768px) {
  .contacts-toggle__btn {
    padding: 10px 12px;
    font-size: 0.82rem;
  }
  .contacts-filters {
    padding: 8px 10px;
  }
}

/* --- Industry Multi-Select Filter --- */
.industry-multiselect {
  position: relative;
  display: inline-block;
}
.industry-multiselect__trigger {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 28px 6px 10px;
  font-size: 0.82rem;
  cursor: pointer;
  min-width: 140px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238fa3b8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color var(--transition-fast);
}
.industry-multiselect__trigger:hover {
  border-color: var(--accent-blue);
}
.industry-multiselect__trigger--active {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}
.industry-multiselect__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 200;
  min-width: 280px;
  max-height: 360px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
  padding: 6px 0;
  margin-top: 4px;
}
.industry-multiselect__dropdown--open {
  display: block;
}
.industry-multiselect__controls {
  display: flex;
  gap: 8px;
  padding: 4px 12px 8px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 4px;
}
.industry-multiselect__action {
  background: none;
  border: none;
  color: var(--accent-blue);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 0;
}
.industry-multiselect__action:hover {
  text-decoration: underline;
}
.industry-multiselect__group {
  padding: 2px 0;
  border-bottom: 1px solid rgba(128,128,128,0.08);
}
.industry-multiselect__group:last-child {
  border-bottom: none;
}
.industry-multiselect__parent-row {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
}
.industry-multiselect__chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: transform 200ms ease, color 150ms ease;
  flex-shrink: 0;
  padding: 0;
}
.industry-multiselect__chevron:hover {
  color: var(--accent-blue);
  background: var(--accent-blue-dim);
}
.industry-multiselect__chevron--open {
  transform: rotate(90deg);
  color: var(--accent-blue);
}
.industry-multiselect__chevron-spacer {
  width: 20px;
  flex-shrink: 0;
}
.industry-multiselect__parent {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  flex: 1;
  border-radius: var(--radius-sm);
}
.industry-multiselect__parent:hover {
  background: var(--bg-card-hover);
}
.industry-multiselect__count {
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: 2px;
}
.industry-multiselect__children {
  max-height: 0;
  overflow: hidden;
  transition: max-height 250ms ease, opacity 200ms ease;
  opacity: 0;
}
.industry-multiselect__children--open {
  max-height: 500px;
  opacity: 1;
}
.industry-multiselect__child {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px 3px 48px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.industry-multiselect__child:hover {
  background: var(--bg-card-hover);
}
.industry-multiselect__empty {
  padding: 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.industry-multiselect input[type="checkbox"] {
  accent-color: var(--accent-blue);
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ============================================================================
   COMMAND PALETTE TRIGGER (Header Button)
   ============================================================================ */

.cmd-palette-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(128,128,128,0.08);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.cmd-palette-trigger:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}
.cmd-palette-trigger kbd {
  padding: 1px 5px;
  font-size: 0.66rem;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  background: rgba(128,128,128,0.1);
  font-family: inherit;
  color: inherit;
}
.cmd-palette-trigger svg {
  flex-shrink: 0;
}

/* ============================================================================
   COMMAND PALETTE (Ctrl+K)
   ============================================================================ */

.cmd-palette {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}
.cmd-palette--open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: min(20vh, 160px);
}
.cmd-palette__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  animation: cmdFadeIn 120ms ease;
}
@keyframes cmdFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes cmdSlideIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.cmd-palette__dialog {
  position: relative;
  width: min(560px, 90vw);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.04);
  overflow: hidden;
  animation: cmdSlideIn 150ms ease;
}
.cmd-palette__input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}
.cmd-palette__search-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}
.cmd-palette__input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-family: inherit;
}
.cmd-palette__input::placeholder {
  color: var(--text-muted);
}
.cmd-palette__kbd {
  flex-shrink: 0;
  padding: 2px 6px;
  font-size: 0.68rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-muted);
  background: rgba(128,128,128,0.08);
  font-family: inherit;
}
.cmd-palette__results {
  max-height: min(360px, 50vh);
  overflow-y: auto;
  padding: 6px 0;
}
.cmd-palette__section-label {
  padding: 6px 16px 4px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
}
.cmd-palette__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 80ms ease;
}
.cmd-palette__item:hover,
.cmd-palette__item--selected {
  background: var(--accent-blue-dim);
}
.cmd-palette__item--selected {
  box-shadow: inset 3px 0 0 var(--accent-blue);
}
.cmd-palette__item-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(128,128,128,0.08);
  color: var(--text-secondary);
}
.cmd-palette__item--selected .cmd-palette__item-icon {
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
}
.cmd-palette__item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cmd-palette__item-label {
  font-size: 0.84rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmd-palette__item-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmd-palette__item-type {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.cmd-palette__empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.84rem;
}
.cmd-palette__footer {
  display: flex;
  gap: 16px;
  padding: 8px 16px;
  border-top: 1px solid var(--border-color);
  font-size: 0.68rem;
  color: var(--text-muted);
}
.cmd-palette__footer kbd {
  display: inline-block;
  padding: 1px 5px;
  font-size: 0.66rem;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  background: rgba(128,128,128,0.08);
  margin: 0 2px;
  font-family: inherit;
}

/* ============================================================================
   PIPELINE FUNNEL VISUALIZATION
   ============================================================================ */

.pipeline-funnel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.pipeline-funnel__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, rgba(59,130,246,0.06) 0%, rgba(34,197,94,0.06) 100%);
}

.pipeline-funnel__icon {
  font-size: 0.9rem;
  color: var(--accent-blue);
}

.pipeline-funnel__title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.pipeline-funnel__subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: auto;
}

.pipeline-funnel__body {
  padding: 20px;
}

/* Funnel stages container */
.funnel-stages {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.funnel-stage {
  display: grid;
  grid-template-columns: 140px 1fr 80px;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.funnel-stage:hover {
  background: var(--bg-card-hover);
}

.funnel-stage__label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: right;
  padding-right: 4px;
}

.funnel-stage__bar-wrap {
  position: relative;
  height: 32px;
  background: var(--bg-input);
  border-radius: 6px;
  overflow: hidden;
}

.funnel-stage__bar {
  height: 100%;
  border-radius: 6px;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  min-width: 2px;
}

.funnel-stage__bar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08));
  border-radius: 0 6px 6px 0;
}

/* Animated glow on bars */
.funnel-stage__bar--glow {
  box-shadow: 0 0 12px var(--bar-glow-color, rgba(59,130,246,0.3));
}

/* Stage colors - blue to green gradient */
.funnel-stage[data-stage="0"] .funnel-stage__bar { background: linear-gradient(90deg, #3b82f6, #60a5fa); --bar-glow-color: rgba(59,130,246,0.35); }
.funnel-stage[data-stage="1"] .funnel-stage__bar { background: linear-gradient(90deg, #6366f1, #818cf8); --bar-glow-color: rgba(99,102,241,0.35); }
.funnel-stage[data-stage="2"] .funnel-stage__bar { background: linear-gradient(90deg, #8b5cf6, #a78bfa); --bar-glow-color: rgba(139,92,246,0.35); }
.funnel-stage[data-stage="3"] .funnel-stage__bar { background: linear-gradient(90deg, #a855f7, #c084fc); --bar-glow-color: rgba(168,85,247,0.35); }
.funnel-stage[data-stage="4"] .funnel-stage__bar { background: linear-gradient(90deg, #eab308, #facc15); --bar-glow-color: rgba(234,179,8,0.35); }
.funnel-stage[data-stage="5"] .funnel-stage__bar { background: linear-gradient(90deg, #22c55e, #4ade80); --bar-glow-color: rgba(34,197,94,0.4); }

.funnel-stage__count {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
}

/* Conversion arrows between stages */
.funnel-conversion {
  display: grid;
  grid-template-columns: 140px 1fr 80px;
  gap: 12px;
  padding: 0;
  height: 18px;
  align-items: center;
}

.funnel-conversion__spacer { }

.funnel-conversion__arrow {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 8px;
}

.funnel-conversion__line {
  width: 1px;
  height: 14px;
  background: var(--border-light);
  margin-left: 12px;
}

.funnel-conversion__pct {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Pulse animation on funnel bars */
@keyframes funnel-fill {
  from { width: 0%; }
}

.funnel-stage__bar--animate {
  animation: funnel-fill 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ============================================================================
   COMMAND CENTER INTEL PANEL
   ============================================================================ */

.intel-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.intel-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, rgba(168,85,247,0.06) 0%, rgba(59,130,246,0.06) 100%);
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-fast);
}

.intel-panel__header:hover {
  background: linear-gradient(135deg, rgba(168,85,247,0.1) 0%, rgba(59,130,246,0.1) 100%);
}

.intel-panel__header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.intel-panel__header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.intel-panel__icon {
  font-size: 1rem;
  color: var(--accent-purple);
}

.intel-panel__title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.intel-panel__badge {
  background: var(--accent-purple-dim);
  color: var(--accent-purple);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.03em;
}

.intel-panel__refresh {
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast), transform 0.4s ease;
  line-height: 1;
}

.intel-panel__refresh:hover {
  color: var(--accent-blue);
}

.intel-panel__refresh--spinning {
  animation: intel-spin 0.8s linear infinite;
}

@keyframes intel-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.intel-panel__chevron {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.intel-panel__chevron--collapsed {
  transform: rotate(-90deg);
}

.intel-panel__body {
  padding: 16px 20px;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
  max-height: 2000px;
  opacity: 1;
  overflow: hidden;
}

.intel-panel__body--collapsed {
  max-height: 0;
  opacity: 0;
  padding: 0 20px;
}

/* Intel category sections */
.intel-section {
  margin-bottom: 16px;
}

.intel-section:last-child {
  margin-bottom: 0;
}

.intel-section__title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-color);
}

/* Intel recommendation cards */
.intel-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.intel-card {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform 0.2s ease;
  opacity: 0;
  transform: translateY(8px);
  animation: intel-card-enter 0.4s ease forwards;
}

.intel-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

@keyframes intel-card-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger card animation */
.intel-card:nth-child(1) { animation-delay: 0.05s; }
.intel-card:nth-child(2) { animation-delay: 0.1s; }
.intel-card:nth-child(3) { animation-delay: 0.15s; }
.intel-card:nth-child(4) { animation-delay: 0.2s; }
.intel-card:nth-child(5) { animation-delay: 0.25s; }
.intel-card:nth-child(6) { animation-delay: 0.3s; }

.intel-card__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1;
}

.intel-card__icon--fire { background: var(--accent-orange-dim); color: var(--accent-orange); }
.intel-card__icon--clock { background: var(--accent-gold-dim); color: var(--accent-gold); }
.intel-card__icon--search { background: var(--accent-blue-dim); color: var(--accent-blue); }
.intel-card__icon--target { background: var(--accent-green-dim); color: var(--accent-green); }
.intel-card__icon--star { background: var(--accent-purple-dim); color: var(--accent-purple); }
.intel-card__icon--refresh { background: var(--accent-blue-dim); color: var(--accent-blue); }
.intel-card__icon--mail { background: var(--accent-green-dim); color: var(--accent-green); }

.intel-card__content {
  flex: 1;
  min-width: 0;
}

.intel-card__title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 3px;
  line-height: 1.3;
}

.intel-card__desc {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 8px;
}

.intel-card__action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-blue);
  background: var(--accent-blue-dim);
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  letter-spacing: 0.02em;
}

.intel-card__action:hover {
  background: var(--accent-blue);
  color: #fff;
}

/* Intel empty state */
.intel-empty {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.intel-empty__icon {
  font-size: 2rem;
  margin-bottom: 8px;
  opacity: 0.5;
}

/* ============================================================================
   PIPELINE FUNNEL + INTEL PANEL RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
  .pipeline-funnel__header {
    flex-wrap: wrap;
    gap: 6px;
  }
  .pipeline-funnel__subtitle {
    margin-left: 0;
    width: 100%;
  }
  .funnel-stage {
    grid-template-columns: 90px 1fr 60px;
    gap: 8px;
  }
  .funnel-stage__label {
    font-size: 0.7rem;
  }
  .funnel-stage__bar-wrap {
    height: 24px;
  }
  .funnel-conversion {
    grid-template-columns: 90px 1fr 60px;
  }
  .intel-cards {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   ENRICH ALL RECORDS BUTTON - Prominent Glow Effect
   ============================================================================ */

.enrich-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #a855f7, #7c3aed, #6d28d9);
  background-size: 200% 200%;
  border: 2px solid rgba(168, 85, 247, 0.5);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: relative;
  overflow: hidden;
}

.enrich-all-btn__icon {
  font-size: 1.2rem;
}

.enrich-all-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.4), 0 0 20px rgba(168, 85, 247, 0.4);
  border-color: rgba(168, 85, 247, 0.8);
}

.enrich-all-btn:active {
  transform: translateY(0);
}

.enrich-all-btn--glow {
  animation: enrich-btn-glow 2.5s ease-in-out infinite, enrich-btn-gradient 4s linear infinite;
}

@keyframes enrich-btn-glow {
  0%, 100% {
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
  }
  50% {
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.5);
  }
}

@keyframes enrich-btn-gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Compact variant for filter bar */
.enrich-all-btn--compact {
  padding: 6px 14px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.03em;
  text-transform: none;
}

/* ============================================================================
   DISCOVER BUTTON - Matching gradient style (Teal/Cyan)
   ============================================================================ */

.discover-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #0891b2, #0284c7);
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: relative;
  overflow: hidden;
}

.discover-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.4), 0 0 20px rgba(6, 182, 212, 0.4);
  border-color: rgba(6, 182, 212, 0.8);
}

.discover-btn:active {
  transform: translateY(0);
}

.discover-btn--glow {
  animation: discover-btn-glow 2.5s ease-in-out infinite;
}

@keyframes discover-btn-glow {
  0%, 100% {
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
  }
  50% {
    box-shadow: 0 0 24px rgba(6, 182, 212, 0.5);
  }
}

.discover-btn--compact {
  padding: 6px 14px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.03em;
  text-transform: none;
}

/* ============================================================================
   REMOVE BUTTON - Red gradient style (same pattern as enrich/discover)
   ============================================================================ */

.remove-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.remove-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

.remove-btn:active {
  transform: scale(0.97);
}

.remove-btn--glow {
  animation: remove-btn-glow 2.5s ease-in-out infinite;
}

@keyframes remove-btn-glow {
  0%, 100% {
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
  }
  50% {
    box-shadow: 0 0 24px rgba(239, 68, 68, 0.5);
  }
}

.remove-btn--compact {
  padding: 6px 14px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.03em;
  text-transform: none;
}

/* ============================================================================
   ADD TO CAMPAIGN BUTTON - Green gradient style
   ============================================================================ */

.personas__row-checkbox {
  cursor: pointer;
  accent-color: var(--accent-blue);
  width: 15px;
  height: 15px;
}

#personas-add-to-campaign-btn {
  animation: campaign-btn-glow 2.5s ease-in-out infinite, campaign-btn-gradient 4s linear infinite;
}

@keyframes campaign-btn-glow {
  0%, 100% {
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
  }
  50% {
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.5);
  }
}

@keyframes campaign-btn-gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ============================================================================
   ENRICHMENT PROGRESS POPUP - Modal Overlay
   ============================================================================ */

.enrichment-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2500;
  display: none;
  align-items: center;
  justify-content: center;
}

.enrichment-popup-overlay--visible {
  display: flex;
}

.enrichment-popup {
  background: var(--bg-card);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--radius-lg);
  width: 620px;
  max-width: 95vw;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 40px rgba(168, 85, 247, 0.1);
}

.enrichment-popup__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.15);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(99, 102, 241, 0.06));
}

.enrichment-popup__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-purple);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.enrichment-popup__close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.enrichment-popup__close:hover {
  color: var(--text-primary);
}

.enrichment-popup__body {
  padding: 24px;
}

/* Progress bar */
.enrichment-popup__progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.enrichment-popup__progress-bar {
  flex: 1;
  height: 12px;
  background: var(--bg-input);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.enrichment-popup__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #a855f7, #6366f1, #3b82f6);
  background-size: 200% 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
  animation: enrich-progress-shimmer 2s linear infinite;
  position: relative;
}

.enrichment-popup__progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15));
  border-radius: 0 6px 6px 0;
}

@keyframes enrich-progress-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: 0% 0; }
}

.enrichment-popup__progress-pct {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent-purple);
  min-width: 40px;
  text-align: right;
}

/* Status & current record */
.enrichment-popup__status {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.enrichment-popup__current {
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.enrichment-popup__current-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.enrichment-popup__step {
  font-size: 0.78rem;
  color: var(--accent-blue);
  font-style: italic;
  margin-bottom: 12px;
  min-height: 1.2em;
}

/* Live log */
.enrichment-popup__log-wrap {
  margin-bottom: 12px;
}

.enrichment-popup__log-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-color);
}

.enrichment-popup__log {
  max-height: 180px;
  overflow-y: auto;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.6;
}

.enrichment-popup__log-entry {
  display: flex;
  gap: 8px;
}

.enrichment-popup__log-time {
  color: var(--text-muted);
  flex-shrink: 0;
  font-size: 0.68rem;
}

.enrichment-popup__log-msg {
  color: rgba(168, 85, 247, 0.85);
}

/* Scrollbar */
.enrichment-popup__log::-webkit-scrollbar {
  width: 4px;
}

.enrichment-popup__log::-webkit-scrollbar-track {
  background: transparent;
}

.enrichment-popup__log::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.2);
  border-radius: 2px;
}

/* ETA */
.enrichment-popup__eta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-family: var(--font-mono);
}

/* Actions */
.enrichment-popup__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

/* Summary */
.enrichment-popup__summary {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.enrichment-popup__summary-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-green);
  text-align: center;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.enrichment-popup__summary-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.enrichment-popup__summary-stat {
  text-align: center;
  padding: 12px 8px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.enrichment-popup__summary-val {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.enrichment-popup__summary-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Light theme overrides */
[data-theme="light"] .enrichment-popup {
  border-color: rgba(147, 51, 234, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 0 30px rgba(147, 51, 234, 0.08);
}

[data-theme="light"] .enrichment-popup__header {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.06), rgba(99, 102, 241, 0.04));
}

[data-theme="light"] .enrichment-popup__log-msg {
  color: #7c3aed;
}

/* Responsive */
@media (max-width: 640px) {
  .enrichment-popup__summary-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .enrich-all-btn {
    padding: 10px 20px;
    font-size: 0.88rem;
  }
}

/* ============================================================================
   LOGIN PAGE STYLES
   ============================================================================ */

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(59,130,246,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(168,85,247,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(34,197,94,0.05) 0%, transparent 50%);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.03) inset;
  padding: 40px 36px 32px;
  animation: loginSlideIn 0.4s ease-out;
}

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

.login-card__logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-card__logo-icon {
  font-size: 36px;
  color: var(--accent-blue);
  margin-bottom: 12px;
  filter: drop-shadow(0 0 12px rgba(59,130,246,0.4));
}

.login-card__title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.login-card__accent {
  color: var(--accent-blue);
}

.login-card__subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 500;
}

.login-form__group {
  margin-bottom: 20px;
}

.login-form__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.login-form__input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.login-form__input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.login-form__input::placeholder {
  color: var(--text-muted);
}

.login-form__submit {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.login-form__submit:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.login-form__submit:active {
  transform: translateY(0);
}

.login-form__submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.login-error {
  background: var(--accent-red-dim);
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--accent-red);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
  text-align: center;
}

.login-card__footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================================================
   USER DISPLAY (Header)
   ============================================================================ */

.user-display {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 12px;
}

.user-display__name {
  font-size: 0.82rem;
  color: var(--text-primary);
  font-weight: 500;
}

.user-display__role {
  font-size: 0.7rem;
  color: var(--accent-blue);
  background: var(--accent-blue-dim);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.user-display__logout {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-display__logout:hover {
  color: var(--accent-red);
  border-color: var(--accent-red);
  background: var(--accent-red-dim);
}

/* ============================================================================
   ADMIN PANEL STYLES
   ============================================================================ */

.admin-panel {
  padding: 16px 0;
}

.admin-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 0 4px;
}

.admin-panel__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.admin-table thead {
  background: var(--bg-secondary);
}

.admin-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-color);
}

.admin-table td {
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: var(--bg-card-hover);
}

.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.role-badge--super_admin {
  background: var(--accent-purple-dim);
  color: var(--accent-purple);
}

.role-badge--admin {
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
}

.role-badge--manager {
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
}

.role-badge--viewer {
  background: var(--accent-gray-dim);
  color: var(--text-secondary);
}

.status--active {
  color: var(--accent-green);
  font-weight: 600;
  font-size: 0.82rem;
}

.status--inactive {
  color: var(--accent-red);
  font-weight: 600;
  font-size: 0.82rem;
}

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

.btn-primary {
  background: var(--accent-blue);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.btn-sm:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.btn-sm.btn-edit {
  color: var(--accent-blue);
  border-color: rgba(59,130,246,0.3);
}

.btn-sm.btn-edit:hover {
  background: var(--accent-blue-dim);
}

.btn-sm.btn-danger {
  color: var(--accent-red);
  border-color: rgba(239,68,68,0.3);
}

.btn-sm.btn-danger:hover {
  background: var(--accent-red-dim);
}

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

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
}

.form-input {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  border-color: var(--accent-blue);
}

.form-input[readonly] {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
}

.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px 12px;
}

.perm-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-primary);
  cursor: pointer;
}

.perm-checkbox input[type="checkbox"] {
  accent-color: var(--accent-blue);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* ============================================================================
   SURPRISE VISUALIZATIONS - v10 Enhancements
   ============================================================================ */

/* --- Surprise Badge --- */
.surprise-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0f1923;
  background: linear-gradient(135deg, #22c55e, #3b82f6);
  border-radius: 10px;
  margin-left: 8px;
  animation: surprise-badge-glow 2s ease-in-out infinite alternate;
  vertical-align: middle;
}

@keyframes surprise-badge-glow {
  0% { box-shadow: 0 0 4px rgba(34,197,94,0.4); }
  100% { box-shadow: 0 0 12px rgba(59,130,246,0.6); }
}

[data-theme="light"] .surprise-badge {
  color: #ffffff;
}

/* --- Engagement Heatmap (Day x Hour grid) --- */
.engagement-heatmap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
}

.engagement-heatmap__header {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 4px;
}

.engagement-heatmap__corner {
  width: 40px;
  flex-shrink: 0;
}

.engagement-heatmap__hour-label {
  flex: 1;
  text-align: center;
  font-size: 0.6rem;
  color: var(--text-muted);
  min-width: 0;
}

.engagement-heatmap__hour-label--minor {
  visibility: hidden;
}

.engagement-heatmap__row {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 28px;
}

.engagement-heatmap__day-label {
  width: 40px;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: right;
  padding-right: 6px;
}

.engagement-heatmap__cell {
  flex: 1;
  height: 100%;
  border-radius: 3px;
  min-width: 0;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: default;
}

.engagement-heatmap__cell:hover {
  transform: scale(1.3);
  z-index: 2;
  box-shadow: 0 0 8px rgba(255,255,255,0.3);
}

.engagement-heatmap__scale {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  padding-left: 40px;
}

.engagement-heatmap__scale-label {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.engagement-heatmap__scale-cell {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

.engagement-heatmap__total {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* --- Campaign Waterfall Chart --- */
.waterfall-panel {
  position: relative;
  overflow: hidden;
}

.waterfall-chart {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  padding: 20px 16px 12px;
  min-height: 220px;
}

.waterfall-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 120px;
  position: relative;
}

.waterfall-bar__value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  text-align: center;
}

.waterfall-bar__track {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
}

.waterfall-bar__fill {
  width: 80%;
  border-radius: 6px 6px 2px 2px;
  transition: height 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  height: 0%;
  position: relative;
}

.waterfall-bar__fill--visible {
  /* Height set inline, animation via transition */
}

.waterfall-bar__fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.3);
  border-radius: 6px 6px 0 0;
}

.waterfall-bar__label {
  margin-top: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
}

.waterfall-bar-group--loss .waterfall-bar__value {
  color: var(--accent-red);
}

.waterfall-bar-group--loss .waterfall-bar__label {
  color: var(--accent-red);
}

.waterfall-drop {
  position: absolute;
  right: -18px;
  top: 50%;
  font-size: 0.6rem;
  color: var(--accent-orange);
  font-weight: 600;
  transform: translateY(-50%);
  white-space: nowrap;
}

/* --- Waterfall smooth animation --- */
.waterfall-bar__fill {
  will-change: height;
}

/* --- Territory Performance Heatmap button styles --- */
#territory-perf-heatmap-toggle.territory-map-tool-btn--active {
  background: var(--accent-green-dim);
  color: var(--accent-green);
  border-color: var(--accent-green);
}

/* --- Radar chart container polish --- */
#am-radar-body canvas {
  filter: drop-shadow(0 0 8px rgba(59,130,246,0.1));
}

/* --- Sunburst chart container polish --- */
#sunburst-chart-body canvas {
  filter: drop-shadow(0 0 6px rgba(168,85,247,0.1));
}

/* --- Light theme adjustments for surprise features --- */
[data-theme="light"] .engagement-heatmap__cell:hover {
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
}

[data-theme="light"] .waterfall-bar__fill::after {
  background: rgba(255,255,255,0.5);
}

/* ============================================================================
   COMPANY DETAIL MODAL - CARD-BASED LAYOUT (v10.1)
   ============================================================================ */

/* Header card */
.cd-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}

.cd-header__left {
  flex: 1;
  min-width: 0;
}

.cd-header__name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cd-header__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.cd-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cd-badge--industry {
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
}

.cd-badge--sub-industry {
  background: var(--accent-purple-dim);
  color: var(--accent-purple);
}

.cd-badge--source {
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
}

.cd-badge--enriched {
  background: var(--accent-green-dim);
  color: var(--accent-green);
}

.cd-badge--partial {
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
}

.cd-badge--none {
  background: rgba(107,114,128,0.15);
  color: #9ca3af;
}

.cd-badge--failed {
  background: var(--accent-red-dim);
  color: var(--accent-red);
}

.cd-header__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.cd-header__am {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Two-column contact & location card */
.cd-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
}

.cd-info-card__header {
  padding: 12px 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.cd-info-card__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.cd-info-card__col {
  padding: 16px 20px;
}

.cd-info-card__col + .cd-info-card__col {
  border-left: 1px solid var(--border-color);
}

.cd-info-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  font-size: 0.82rem;
}

.cd-info-row__label {
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 80px;
}

.cd-info-row__value {
  color: var(--text-primary);
  font-weight: 500;
  word-break: break-word;
}

.cd-info-row__value--muted {
  color: var(--text-muted);
  font-weight: 400;
  font-style: italic;
  font-size: 0.78rem;
}

/* Metrics row (horizontal stat cards) */
.cd-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.cd-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: center;
}

.cd-metric-card__icon {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.cd-metric-card__value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.cd-metric-card__value--blue { color: var(--accent-blue); }
.cd-metric-card__value--green { color: var(--accent-green); }
.cd-metric-card__value--gold { color: var(--accent-gold); }
.cd-metric-card__value--purple { color: var(--accent-purple); }

.cd-metric-card__label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 2px;
}

/* Description card */
.cd-description {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
}

.cd-description__header {
  padding: 12px 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.cd-description__body {
  padding: 16px 20px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cd-description__toggle {
  display: none;
  padding: 8px 20px;
  font-size: 0.75rem;
  color: var(--accent-blue);
  cursor: pointer;
  border-top: 1px solid var(--border-color);
  text-align: center;
  background: none;
  border-left: none;
  border-right: none;
  border-bottom: none;
  width: 100%;
  font-family: inherit;
  font-weight: 500;
}

.cd-description__toggle:hover {
  background: var(--bg-card-hover);
}

.cd-description__body--collapsed {
  max-height: 80px;
  overflow: hidden;
  position: relative;
}

.cd-description__body--collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, var(--bg-card));
}

/* Spectrum Fit card */
.cd-fit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
}

.cd-fit-card__header {
  padding: 12px 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.cd-fit-card__body {
  padding: 16px 20px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Linked contacts section */
.cd-contacts-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
}

.cd-contacts-section__header {
  padding: 12px 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.cd-contacts-section .campaign__table {
  margin: 0;
}

.cd-contacts-section .campaign__table-wrap {
  margin: 0;
}

/* Engagement summary: 4-col stat grid for the non-registry variant */
.cd-engagement {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

/* Responsive: stack columns on narrow modals */
@media (max-width: 640px) {
  .cd-info-card__body {
    grid-template-columns: 1fr;
  }
  .cd-info-card__col + .cd-info-card__col {
    border-left: none;
    border-top: 1px solid var(--border-color);
  }
  .cd-metrics {
    grid-template-columns: 1fr;
  }
  .cd-engagement {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================================
   QUICK LOOKUP SIDEBAR
   ============================================================================ */

.ql-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.ql-backdrop--open {
  opacity: 1;
  pointer-events: auto;
}

.ql-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0,0,0,0.3);
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.ql-panel--open {
  right: 0;
}

.ql-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
  flex-shrink: 0;
}

.ql-panel__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.ql-panel__close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.ql-panel__close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.ql-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.ql-panel__loading {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.ql-panel__empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.ql-panel__empty-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

/* Contact Card */
.ql-contact-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.ql-contact-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.ql-contact-card__info {
  min-width: 0;
}

.ql-contact-card__name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ql-contact-card__title {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.ql-contact-card__company {
  font-size: 12px;
  color: var(--accent-blue);
  margin-top: 2px;
}

/* Quick Actions */
.ql-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.ql-actions__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  font-family: inherit;
}

.ql-actions__btn:hover {
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
  border-color: var(--accent-blue);
}

.ql-actions__icon {
  font-size: 14px;
}

/* Detail Section */
.ql-section {
  margin-bottom: 16px;
}

.ql-section__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ql-section__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
  font-size: 10px;
  font-weight: 700;
}

.ql-section--footer {
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

/* Detail Grid */
.ql-detail-grid {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.ql-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
}

.ql-detail-row:last-child {
  border-bottom: none;
}

.ql-detail-row__label {
  color: var(--text-muted);
  flex-shrink: 0;
  margin-right: 12px;
}

.ql-detail-row__value {
  color: var(--text-primary);
  text-align: right;
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Timeline */
.ql-timeline {
  position: relative;
  padding-left: 20px;
}

.ql-timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border-color);
}

.ql-timeline__item {
  position: relative;
  padding: 8px 0;
  display: flex;
  gap: 12px;
}

.ql-timeline__dot {
  position: absolute;
  left: -20px;
  top: 14px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
  flex-shrink: 0;
  z-index: 1;
}

.ql-timeline__dot--active { background: var(--accent-blue); }
.ql-timeline__dot--success { background: var(--accent-green); }
.ql-timeline__dot--danger { background: var(--accent-red); }
.ql-timeline__dot--warning { background: var(--accent-gold); }
.ql-timeline__dot--new { background: var(--accent-purple); }
.ql-timeline__dot--default { background: var(--accent-gray); }

.ql-timeline__content {
  min-width: 0;
  flex: 1;
}

.ql-timeline__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ql-timeline__status {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ql-timeline__status--active { background: var(--accent-blue-dim); color: var(--accent-blue); }
.ql-timeline__status--success { background: var(--accent-green-dim); color: var(--accent-green); }
.ql-timeline__status--danger { background: var(--accent-red-dim); color: var(--accent-red); }
.ql-timeline__status--warning { background: var(--accent-gold-dim); color: var(--accent-gold); }
.ql-timeline__status--new { background: var(--accent-purple-dim); color: var(--accent-purple); }
.ql-timeline__status--default { background: var(--accent-gray-dim); color: var(--accent-gray); }

.ql-timeline__date {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.ql-timeline__id {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ql-timeline__meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ql-timeline__empty {
  font-size: 12px;
  color: var(--text-muted);
  padding: 12px;
  text-align: center;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
}

/* Email list */
.ql-email-list {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.ql-email-item {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
}

.ql-email-item:last-child {
  border-bottom: none;
}

.ql-email-item__subject {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ql-email-item__meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ql-email-item__more {
  padding: 6px 12px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

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

/* ============================================================================
   DATA HEALTH SCANNER
   ============================================================================ */

.dh-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.dh-banner__left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dh-banner__grade {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  flex-shrink: 0;
}

.dh-banner__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dh-banner__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.dh-banner__score {
  font-size: 12px;
  color: var(--text-secondary);
}

.dh-banner__right {
  display: flex;
  align-items: center;
}

.dh-rescan-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.dh-rescan-btn:hover {
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
  border-color: var(--accent-blue);
}

.dh-rescan-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dh-rescan-btn__icon {
  font-size: 16px;
}

@keyframes dhSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.dh-spin {
  display: inline-block;
  animation: dhSpin 1s linear infinite;
}

/* Score bar */
.dh-scorebar {
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  margin-bottom: 16px;
  overflow: hidden;
}

.dh-scorebar__fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

/* Summary stats */
.dh-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.dh-summary__stat {
  flex: 1;
  min-width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.dh-summary__number {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
}

.dh-summary__label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* Category cards */
.dh-categories {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.dh-cat {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.dh-cat__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: default;
}

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

.dh-cat__indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dh-cat__icon {
  font-size: 14px;
  flex-shrink: 0;
}

.dh-cat__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dh-cat__header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.dh-cat__count {
  font-size: 12px;
  font-weight: 700;
}

.dh-cat__fix-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid var(--accent-gold);
  background: rgba(234,179,8,0.1);
  color: var(--accent-gold);
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.dh-cat__fix-btn:hover {
  background: rgba(234,179,8,0.2);
}

.dh-cat__fix-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dh-cat__chevron {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px;
  transition: color var(--transition-fast);
}

.dh-cat__chevron:hover {
  color: var(--text-primary);
}

/* Detail rows */
.dh-cat__details {
  border-top: 1px solid var(--border-color);
  max-height: 250px;
  overflow-y: auto;
}

.dh-cat__detail-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 16px 6px 38px;
  font-size: 12px;
  border-bottom: 1px solid var(--border-color);
}

.dh-cat__detail-row:last-child {
  border-bottom: none;
}

.dh-cat__detail-name {
  color: var(--text-primary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 50%;
}

.dh-cat__detail-info {
  color: var(--text-muted);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dh-cat__detail-more {
  padding: 6px 16px 6px 38px;
  font-size: 11px;
  color: var(--text-muted);
}

.dh-footer {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  padding: 8px 0;
}

/* Scrollbar for detail lists */
.dh-cat__details::-webkit-scrollbar {
  width: 4px;
}

.dh-cat__details::-webkit-scrollbar-track {
  background: transparent;
}

.dh-cat__details::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

/* ============================================================================
   QUICK-FILTER CHIPS (Campaigns tab, v10.1)
   ============================================================================ */

.qf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px 0;
}

.qf-chip {
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.qf-chip:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: var(--accent-blue-dim);
}

.qf-chip--active {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
}

.qf-chip--active:hover {
  background: var(--accent-blue);
  color: #fff;
}

/* ============================================================================
   CONTACT COMPLETENESS SCORE (Contacts tab, v10.1)
   ============================================================================ */

.completeness-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.completeness-bar__track {
  width: 48px;
  height: 5px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.completeness-bar__fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.completeness-bar__fill--low {
  background: var(--accent-red, #ef4444);
}

.completeness-bar__fill--mid {
  background: var(--accent-gold);
}

.completeness-bar__fill--high {
  background: var(--accent-green);
}

.completeness-bar__label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ============================================================================
   PER-TAB SURPRISE FEATURES (v10.1)
   ============================================================================ */

/* --- Call Log: Timer Row --- */
.call-log-modal__timer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border-color);
  margin-bottom: 4px;
}

.call-log-modal__timer {
  display: flex;
  align-items: center;
}

.call-log-modal__timer-display {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  min-width: 60px;
}

.call-log-modal__timer-btn {
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.78rem;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.call-log-modal__timer-btn--start {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: rgba(34,197,94,0.1);
}

.call-log-modal__timer-btn--start:hover {
  background: rgba(34,197,94,0.2);
}

.call-log-modal__timer-btn--stop {
  border-color: var(--accent-red);
  color: var(--accent-red);
  background: rgba(239,68,68,0.1);
}

.call-log-modal__timer-btn--stop:hover {
  background: rgba(239,68,68,0.2);
}

.call-log-modal__timer-btn--reset {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(59,130,246,0.1);
}

.call-log-modal__timer-btn--reset:hover {
  background: rgba(59,130,246,0.2);
}

/* --- Call Log: Quick Outcome Buttons --- */
.call-outcome-quick-btn {
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.call-outcome-quick-btn:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
}

/* --- Territory: Quick Stats Bar --- */
.territory-quick-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.territory-quick-stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.territory-quick-stats__value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.territory-quick-stats__label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.territory-quick-stats__filters {
  display: flex;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}

.territory-quick-filter-btn {
  padding: 4px 12px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.territory-quick-filter-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.territory-quick-filter-btn--active {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
}

.territory-quick-filter-btn--active:hover {
  background: var(--accent-blue);
  color: #fff;
}

/* --- Import: Stats Summary Bar --- */
.import-stats-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.import-stats-summary__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
}

.import-stats-summary__value {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.import-stats-summary__label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ============================================================================
   SMART SEARCH (Ctrl+/)
   ============================================================================ */

.smart-search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  align-items: flex-start;
  justify-content: center;
  padding-top: min(18vh, 140px);
  animation: cmdFadeIn 120ms ease;
}
.smart-search-overlay--visible {
  display: flex;
}
.smart-search {
  width: min(600px, 92vw);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04);
  overflow: hidden;
  animation: cmdSlideIn 150ms ease;
}
.smart-search__input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
}
.smart-search__icon {
  flex-shrink: 0;
  font-size: 16px;
  color: var(--text-muted);
}
.smart-search__input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--text-primary);
  font-family: inherit;
}
.smart-search__input::placeholder {
  color: var(--text-muted);
}
.smart-search__kbd {
  padding: 2px 6px;
  font-size: 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  background: rgba(128,128,128,0.1);
  color: var(--text-muted);
  font-family: inherit;
}
.smart-search__results {
  max-height: 400px;
  overflow-y: auto;
}
.smart-search__group {
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.smart-search__group:last-child {
  border-bottom: none;
}
.smart-search__group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.smart-search__group-icon {
  font-size: 12px;
}
.smart-search__group-icon--green { color: var(--accent-green); }
.smart-search__group-icon--blue { color: var(--accent-blue); }
.smart-search__group-icon--purple { color: var(--accent-purple); }
.smart-search__group-count {
  color: var(--text-muted);
  font-weight: 400;
}
.smart-search__result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.smart-search__result:hover,
.smart-search__result--selected {
  background: var(--accent-blue-dim);
}
.smart-search__result-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.smart-search__result-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.smart-search__result-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.smart-search__result-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  margin-left: 16px;
  flex-shrink: 0;
}
.smart-search__result-detail {
  font-size: 11px;
  color: var(--text-secondary);
}
.smart-search__result-status {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--accent-gray-dim);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.smart-search__highlight {
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
  border-radius: 2px;
  padding: 0 1px;
}
.smart-search__empty {
  padding: 24px 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.smart-search__more {
  padding: 8px 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.smart-search__footer {
  display: flex;
  gap: 16px;
  padding: 8px 18px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  font-size: 11px;
  color: var(--text-muted);
}
.smart-search__footer kbd {
  padding: 1px 4px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  background: rgba(128,128,128,0.1);
  font-family: inherit;
  font-size: 10px;
}

/* --- Activity Feed Bell Icon (header) --- */
.activity-bell {
  position: relative;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  opacity: 0.7;
  transition: color var(--transition-fast), background var(--transition-fast), opacity var(--transition-fast);
}
.activity-bell:hover {
  color: var(--text-secondary);
  background: rgba(128,128,128,0.08);
  opacity: 1;
}
.activity-bell__badge {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 13px;
  height: 13px;
  padding: 0 3px;
  background: var(--accent-red);
  color: #fff;
  font-size: 8px;
  font-weight: 600;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.activity-bell__badge:empty {
  display: none;
}

/* --- Smart Search Trigger (header) --- */
.smart-search-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(128,128,128,0.08);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.smart-search-trigger:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}
.smart-search-trigger kbd {
  padding: 1px 5px;
  font-size: 0.66rem;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  background: rgba(128,128,128,0.1);
  font-family: inherit;
  color: inherit;
}

/* ============================================================================
   v10.4 - Campaign Enrich, Scout Target Filter, Discover
   ============================================================================ */

/* Missing data badge (subtle, muted) */
.missing-data-badge {
  display: inline-block;
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(239, 68, 68, 0.08);
  color: var(--text-muted);
  border: 1px solid rgba(239, 68, 68, 0.15);
  font-weight: 400;
}

/* Scout target selector toggle group */
.scout-target-group {
  display: inline-flex;
  border-radius: var(--radius-sm, 4px);
  border: 1px solid var(--border-color);
  overflow: hidden;
}
.scout-target-btn {
  padding: 6px 14px;
  font-size: 0.78rem;
  border: none;
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.scout-target-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-secondary);
}
.scout-target-btn--active {
  background: var(--accent-blue);
  color: #fff;
}
.scout-target-btn--active:hover {
  background: var(--accent-blue);
  color: #fff;
}

/* Company health dot for data completeness */
.health-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.health-dot--green { background: var(--accent-green); }
.health-dot--yellow { background: var(--accent-gold); }
.health-dot--red { background: var(--accent-red); }

/* Bulk select toolbar in campaign drill-in */
.drillin-bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: var(--radius-sm, 4px);
  margin-bottom: 8px;
  font-size: 0.78rem;
}
.drillin-bulk-toolbar__count {
  color: var(--accent-blue);
  font-weight: 600;
}

/* Quick action mini-buttons on contact rows */
.contact-quick-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}
tr:hover .contact-quick-actions {
  opacity: 1;
}
.contact-quick-btn {
  padding: 2px 6px;
  font-size: 0.68rem;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.1s;
  font-family: inherit;
}
.contact-quick-btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.08);
}

/* Last enriched timestamp */
.last-enriched-ts {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Social icon links (LinkedIn + Facebook) */
.social-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.15s;
  vertical-align: middle;
}
.social-icon-link:hover {
  opacity: 0.8;
}
.social-icon-link--linkedin {
  background: rgba(10, 102, 194, 0.15);
  color: #0a66c2;
  border: 1px solid rgba(10, 102, 194, 0.25);
}
.social-icon-link--facebook {
  background: rgba(24, 119, 242, 0.15);
  color: #1877F2;
  border: 1px solid rgba(24, 119, 242, 0.25);
}
.social-icon-link--sm {
  width: 18px;
  height: 18px;
  font-size: 0.65rem;
  margin-left: 2px;
}

/* ============================================================================
   V10.6 UI SURPRISES
   1. Campaign Activity Heatmap
   2. Animated Pipeline Flow (particles)
   3. Contact Hover Preview Card (glassmorphism)
   4. Glassmorphism Stat Cards
   5. Keyboard Shortcuts Overlay
   ============================================================================ */

/* --- Surprise Badge v10.6 --- */
.surprise-badge-v106 {
  display: inline-block;
  background: linear-gradient(135deg, #3b82f6, #a855f7);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  animation: surprise-badge-v106-pulse 3s ease-in-out infinite;
}

@keyframes surprise-badge-v106-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ============================================================================
   SURPRISE #1: CAMPAIGN ACTIVITY HEATMAP (GitHub-style)
   ============================================================================ */

.activity-heatmap-panel {
  margin-bottom: 20px;
}

.activity-heatmap__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.activity-heatmap__icon {
  color: var(--accent-green);
  font-size: 1rem;
}

.heatmap-container {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  overflow-x: auto;
}

.heatmap-day-labels {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 22px;
  flex-shrink: 0;
}

.heatmap-day-label {
  height: 13px;
  font-size: 0.65rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  line-height: 1;
}

.heatmap-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.heatmap-months {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 15px;
  gap: 2px;
  height: 18px;
  margin-bottom: 2px;
}

.heatmap-month-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.heatmap-weeks {
  display: flex;
  gap: 2px;
}

.heatmap-week {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.heatmap-cell {
  width: 13px;
  height: 13px;
  border-radius: 2px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: default;
}

.heatmap-cell:hover {
  transform: scale(1.4);
  box-shadow: 0 0 6px rgba(59,130,246,0.4);
  z-index: 2;
  position: relative;
}

.heatmap-cell--empty {
  background: transparent;
  cursor: default;
}

.heatmap-cell--empty:hover {
  transform: none;
  box-shadow: none;
}

.heatmap-cell--level-0 {
  background: rgba(42,63,85,0.3);
}

.heatmap-cell--level-1 {
  background: rgba(59,130,246,0.25);
}

.heatmap-cell--level-2 {
  background: rgba(59,130,246,0.5);
}

.heatmap-cell--level-3 {
  background: rgba(34,197,94,0.55);
}

.heatmap-cell--level-4 {
  background: rgba(34,197,94,0.85);
}

[data-theme="light"] .heatmap-cell--level-0 { background: rgba(0,0,0,0.04); }
[data-theme="light"] .heatmap-cell--level-1 { background: rgba(37,99,235,0.15); }
[data-theme="light"] .heatmap-cell--level-2 { background: rgba(37,99,235,0.35); }
[data-theme="light"] .heatmap-cell--level-3 { background: rgba(22,163,74,0.4); }
[data-theme="light"] .heatmap-cell--level-4 { background: rgba(22,163,74,0.7); }

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
  padding-top: 8px;
}

.heatmap-legend .heatmap-cell {
  width: 13px;
  height: 13px;
}

.heatmap-legend .heatmap-cell:hover {
  transform: none;
  box-shadow: none;
}

.heatmap-legend__label {
  font-size: 0.65rem;
  color: var(--text-muted);
  padding: 0 4px;
}

.heatmap-tooltip {
  position: fixed;
  z-index: 99999;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-elevated);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.heatmap-tooltip--visible {
  opacity: 1;
}

/* ============================================================================
   SURPRISE #2: ANIMATED PIPELINE FLOW (particles)
   ============================================================================ */

.pipeline-particles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: 6px;
}

.pipeline-particle {
  position: absolute;
  left: -8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  box-shadow: 0 0 6px rgba(255,255,255,0.3);
  animation: particle-flow 3s linear infinite;
  opacity: 0;
}

@keyframes particle-flow {
  0% {
    left: -8px;
    opacity: 0;
  }
  5% {
    opacity: 0.7;
  }
  85% {
    opacity: 0.7;
  }
  100% {
    left: calc(100% + 8px);
    opacity: 0;
  }
}

.funnel-conversion__line.flow-animated {
  position: relative;
  overflow: hidden;
}

.funnel-conversion__line.flow-animated::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(168,85,247,0.3), transparent);
  animation: flow-line-pulse 2.5s ease-in-out infinite;
}

@keyframes flow-line-pulse {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ============================================================================
   SURPRISE #3: CONTACT HOVER PREVIEW CARD (Glassmorphism)
   ============================================================================ */

.contact-preview-card {
  position: fixed;
  z-index: 99990;
  width: 320px;
  background: rgba(22,34,49,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-lg);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.4),
    0 0 1px rgba(255,255,255,0.1) inset;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: auto;
}

.contact-preview-card--visible {
  opacity: 1;
  transform: translateY(0);
}

[data-theme="light"] .contact-preview-card {
  background: rgba(255,255,255,0.85);
  border-color: rgba(37,99,235,0.15);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 0 1px rgba(0,0,0,0.05) inset;
}

.contact-preview__top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 12px;
}

.contact-preview__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-preview__identity {
  flex: 1;
  min-width: 0;
}

.contact-preview__name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-preview__title {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-preview__enriched {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--accent-green-dim);
  color: var(--accent-green);
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}

.contact-preview__not-enriched {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--accent-gray-dim);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}

.contact-preview__divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
  margin: 0 16px;
}

.contact-preview__details {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-preview__row {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-preview__icon {
  color: var(--text-muted);
  font-size: 0.72rem;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.contact-preview__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 12px;
  font-size: 0.7rem;
}

.contact-preview__status {
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.contact-preview__activity {
  color: var(--text-muted);
}

/* ============================================================================
   SURPRISE #4: GLASSMORPHISM STAT CARDS + INTEL PANEL
   ============================================================================ */

.glass-card {
  background: rgba(26,43,61,0.6) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(59,130,246,0.12) !important;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(59,130,246,0.15) 0%,
    rgba(168,85,247,0.1) 50%,
    rgba(34,197,94,0.08) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: glass-border-shimmer 6s linear infinite;
}

@keyframes glass-border-shimmer {
  0% {
    background: linear-gradient(135deg, rgba(59,130,246,0.2) 0%, rgba(168,85,247,0.08) 50%, rgba(34,197,94,0.05) 100%);
  }
  33% {
    background: linear-gradient(135deg, rgba(34,197,94,0.15) 0%, rgba(59,130,246,0.12) 50%, rgba(168,85,247,0.08) 100%);
  }
  66% {
    background: linear-gradient(135deg, rgba(168,85,247,0.18) 0%, rgba(34,197,94,0.1) 50%, rgba(59,130,246,0.06) 100%);
  }
  100% {
    background: linear-gradient(135deg, rgba(59,130,246,0.2) 0%, rgba(168,85,247,0.08) 50%, rgba(34,197,94,0.05) 100%);
  }
}

.glass-card:hover {
  border-color: rgba(59,130,246,0.25) !important;
  box-shadow: 0 4px 20px rgba(59,130,246,0.08), var(--shadow-card) !important;
}

.glass-panel {
  background: rgba(26,43,61,0.5) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(59,130,246,0.08) !important;
  position: relative;
}

.glass-panel::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(59,130,246,0.03) 0%, transparent 70%);
  pointer-events: none;
  animation: glass-ambient-glow 8s ease-in-out infinite;
}

@keyframes glass-ambient-glow {
  0%, 100% { transform: translate(0, 0); opacity: 0.5; }
  25% { transform: translate(10%, 5%); opacity: 0.8; }
  50% { transform: translate(-5%, 10%); opacity: 0.6; }
  75% { transform: translate(-10%, -5%); opacity: 0.9; }
}

/* Light theme glassmorphism */
[data-theme="light"] .glass-card {
  background: rgba(255,255,255,0.6) !important;
  border: 1px solid rgba(37,99,235,0.08) !important;
}

[data-theme="light"] .glass-card::before {
  background: linear-gradient(135deg, rgba(37,99,235,0.1) 0%, rgba(147,51,234,0.06) 50%, rgba(22,163,74,0.04) 100%);
}

[data-theme="light"] .glass-panel {
  background: rgba(255,255,255,0.5) !important;
  border: 1px solid rgba(37,99,235,0.06) !important;
}

/* ============================================================================
   SURPRISE #5: KEYBOARD SHORTCUTS OVERLAY
   ============================================================================ */

.shortcuts-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.shortcuts-overlay--visible {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.shortcuts-modal {
  background: rgba(22,34,49,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  width: 580px;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.shortcuts-overlay--visible .shortcuts-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

[data-theme="light"] .shortcuts-modal {
  background: rgba(255,255,255,0.95);
  border-color: rgba(37,99,235,0.15);
  box-shadow: 0 24px 64px rgba(0,0,0,0.15);
}

.shortcuts-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, rgba(59,130,246,0.06) 0%, rgba(168,85,247,0.04) 100%);
}

.shortcuts-modal__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shortcuts-modal__icon {
  font-size: 1.2rem;
  color: var(--accent-blue);
}

.shortcuts-modal__title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.shortcuts-modal__close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.shortcuts-modal__close:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.shortcuts-modal__body {
  padding: 20px 24px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.shortcuts-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shortcuts-group:last-child {
  grid-column: 1 / -1;
}

.shortcuts-group__title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-color);
}

.shortcuts-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px;
  border-radius: 4px;
  transition: background var(--transition-fast);
}

.shortcuts-row:hover {
  background: var(--bg-card-hover);
}

.shortcuts-row__keys {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.shortcuts-row__desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.shortcuts-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  padding: 0 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-bottom-width: 2px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

[data-theme="light"] .shortcuts-kbd {
  background: #f5f6f8;
  border-color: #c8cfd8;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.shortcuts-plus {
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 0 2px;
}

.shortcuts-tip {
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.shortcuts-tip::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-blue);
}

.shortcuts-modal__footer {
  padding: 12px 24px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.shortcuts-modal__footer-text {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.shortcuts-modal__footer-text kbd {
  margin: 0 2px;
}

@media (max-width: 640px) {
  .shortcuts-modal__body {
    grid-template-columns: 1fr;
  }

  .shortcuts-group:last-child {
    grid-column: 1;
  }
}

/* ============================================================================
   ZIP MAP PICKER MODAL
   ============================================================================ */

.zip-map-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 300;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.zip-map-overlay--visible {
  display: flex;
  opacity: 1;
}

.zip-map-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 229, 255, 0.06);
  animation: zipMapSlideIn 0.3s ease;
}

@keyframes zipMapSlideIn {
  from { transform: translateY(20px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

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

.zip-map-modal__title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.zip-map-modal__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.zip-map-modal__count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 2px 10px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
}

.zip-map-modal__close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}

.zip-map-modal__close:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.zip-map-modal__body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.zip-map-modal__map {
  flex: 1;
  min-height: 450px;
  background: #1a1a2e;
  border-right: 1px solid var(--border-color);
}

.zip-map-modal__sidebar {
  width: 260px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.zip-map-modal__search {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
}

.zip-map-modal__chips {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
}

.zip-map-modal__empty {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
  padding: 20px 8px;
  width: 100%;
}

.zip-map-modal__legend {
  padding: 10px 12px;
  border-top: 1px solid var(--border-color);
  font-size: 0.72rem;
}

.zip-map-modal__legend-title {
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.zip-map-modal__legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.zip-map-modal__legend-item--clickable {
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  margin-left: -6px;
  transition: background 0.15s, color 0.15s;
}

.zip-map-modal__legend-item--clickable:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
}

.zip-map-modal__legend-item--active {
  background: rgba(59,130,246,0.15);
  color: var(--accent-blue);
  font-weight: 600;
}

.zip-map-modal__legend-item--active:hover {
  background: rgba(59,130,246,0.2);
}

.zip-map-modal__legend-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zip-map-modal__legend-count {
  font-size: 0.68rem;
  color: var(--text-muted);
  opacity: 0.6;
  flex-shrink: 0;
}

.zip-map-modal__legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.zip-map-modal__filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 20px;
  background: rgba(59,130,246,0.08);
  border-bottom: 1px solid rgba(59,130,246,0.15);
  font-size: 0.8rem;
  color: var(--accent-blue);
  font-weight: 500;
}

.zip-map-modal__filter-clear {
  background: none;
  border: 1px solid rgba(59,130,246,0.3);
  color: var(--accent-blue);
  padding: 2px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: background 0.15s;
}

.zip-map-modal__filter-clear:hover {
  background: rgba(59,130,246,0.15);
}

.zip-map-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
}

.zip-map-modal__confirm {
  min-width: 160px;
  font-weight: 600;
}

.zip-map-modal__confirm:not(:disabled) {
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

/* Zip Map Chips */

.zip-map-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 3px 6px 3px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  animation: chipFadeIn 0.2s ease;
}

@keyframes chipFadeIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.zip-map-chip:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.15);
}

.zip-map-chip__fp-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.zip-map-chip__code {
  font-weight: 600;
  color: var(--text-primary);
}

.zip-map-chip__am {
  color: var(--text-muted);
  font-size: 0.68rem;
}

.zip-map-chip__remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.68rem;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.15s;
}

.zip-map-chip__remove:hover {
  color: var(--accent-red);
}

/* Responsive: collapse sidebar below map on narrow screens */
@media (max-width: 768px) {
  .zip-map-modal__body {
    flex-direction: column;
  }

  .zip-map-modal__map {
    min-height: 300px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .zip-map-modal__sidebar {
    width: 100%;
    max-height: 200px;
  }
}

/* ============================================================================
   RECENTLY ADDED - Contacts tab toggle section
   ============================================================================ */

.recently-added-toggle {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.recently-added-toggle__btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.recently-added-toggle__btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.recently-added-toggle__btn--active {
  background: rgba(59,130,246,0.12);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.recently-added-toggle__icon {
  font-size: 0.85rem;
}

.recently-added-section {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  margin-bottom: 12px;
  overflow: hidden;
}

.recently-added-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.recently-added-header__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.recently-added-header__title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.recently-added-header__count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.recently-added-header__filters {
  display: flex;
  align-items: center;
  gap: 6px;
}

.recently-added-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 10px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.recently-added-chip:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.recently-added-chip--active {
  background: rgba(59,130,246,0.12);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  font-weight: 600;
}

.recently-added-empty {
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.recently-added-list {
  max-height: 480px;
  overflow-y: auto;
}

.recently-added-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  cursor: pointer;
  transition: background 0.12s;
}

.recently-added-item:hover {
  background: rgba(255,255,255,0.03);
}

.recently-added-item:last-child {
  border-bottom: none;
}

.recently-added-item__icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(59,130,246,0.1);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.recently-added-item__info {
  flex: 1;
  min-width: 0;
}

.recently-added-item__name {
  font-weight: 500;
  font-size: 0.82rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recently-added-item__meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.recently-added-item__campaign {
  font-size: 0.72rem;
  color: var(--text-secondary);
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.recently-added-item__time {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 60px;
  text-align: right;
}

/* ============================================================================
   SURPRISES V10.7 - 10 High-Impact UI Features
   ============================================================================ */

/* --- v10.7 Badge --- */
.surprise-badge-v107 {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: #fff;
  text-transform: uppercase;
  vertical-align: middle;
  animation: surprise107Pulse 2s infinite;
}

@keyframes surprise107Pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* =========================================================================
   #1: QUICK CAMPAIGN DASHBOARD
   ========================================================================= */

.qcd {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  animation: qcdSlideIn 0.4s ease-out;
}

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

.qcd__card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  will-change: transform;
}

.qcd__card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}

.qcd__card--blue { border-left: 3px solid var(--accent-blue); }
.qcd__card--purple { border-left: 3px solid var(--accent-purple); }
.qcd__card--green { border-left: 3px solid var(--accent-green); }
.qcd__card--gold { border-left: 3px solid var(--accent-gold); }

.qcd__card--blue:hover { border-color: var(--accent-blue); }
.qcd__card--purple:hover { border-color: var(--accent-purple); }
.qcd__card--green:hover { border-color: var(--accent-green); }
.qcd__card--gold:hover { border-color: var(--accent-gold); }

.qcd__icon {
  font-size: 1.4rem;
  opacity: 0.7;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.qcd__card--blue .qcd__icon { background: var(--accent-blue-dim); color: var(--accent-blue); }
.qcd__card--purple .qcd__icon { background: var(--accent-purple-dim); color: var(--accent-purple); }
.qcd__card--green .qcd__icon { background: var(--accent-green-dim); color: var(--accent-green); }
.qcd__card--gold .qcd__icon { background: var(--accent-gold-dim); color: var(--accent-gold); }

.qcd__info {
  display: flex;
  flex-direction: column;
}

.qcd__value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  line-height: 1.2;
}

.qcd__label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .qcd { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================================
   #2: CONTACT TIMELINE
   ========================================================================= */

.ct-timeline {
  margin: 12px 0;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.ct-timeline__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ct-timeline__icon {
  font-size: 1rem;
}

.ct-timeline__title {
  flex: 1;
}

.ct-timeline__body {
  padding: 16px 16px 8px 16px;
  position: relative;
}

.ct-timeline__event {
  display: flex;
  gap: 12px;
  position: relative;
  padding-bottom: 16px;
  opacity: 0;
  animation: ctEventSlideIn 0.35s ease-out forwards;
}

@keyframes ctEventSlideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.ct-timeline__line {
  position: absolute;
  left: 7px;
  top: 16px;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.ct-timeline__line--last {
  display: none;
}

.ct-timeline__dot {
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 50%;
  border: 2px solid var(--accent-blue);
  background: var(--bg-card);
  z-index: 1;
  margin-top: 2px;
}

.ct-timeline__dot--blue { border-color: var(--accent-blue); }
.ct-timeline__dot--green { border-color: var(--accent-green); background: var(--accent-green-dim); }
.ct-timeline__dot--red { border-color: var(--accent-red); background: var(--accent-red-dim); }
.ct-timeline__dot--gold { border-color: var(--accent-gold); background: var(--accent-gold-dim); }
.ct-timeline__dot--purple { border-color: var(--accent-purple); background: var(--accent-purple-dim); }

.ct-timeline__content {
  flex: 1;
  min-width: 0;
}

.ct-timeline__event-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ct-timeline__event-type {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-blue);
  background: var(--accent-blue-dim);
  padding: 1px 8px;
  border-radius: 10px;
}

.ct-timeline__event-status {
  font-size: 0.7rem;
  padding: 1px 8px;
  border-radius: 10px;
  background: var(--accent-green-dim);
  color: var(--accent-green);
  font-weight: 500;
}

.ct-timeline__event-detail {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.4;
}

.ct-timeline__event-date {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* =========================================================================
   #3: SMART TOAST NOTIFICATIONS
   ========================================================================= */

.st-container {
  position: fixed;
  bottom: 0;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  pointer-events: none;
}

.st-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  min-width: 300px;
  max-width: 420px;
  pointer-events: all;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 8px;
  backdrop-filter: blur(12px);
}

.st-toast--visible {
  opacity: 1;
  transform: translateX(0);
}

.st-toast--exiting {
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.st-toast__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--accent-blue);
  transform-origin: left;
  animation: stProgress linear forwards;
}

@keyframes stProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.st-toast--success { border-left: 3px solid var(--accent-green); }
.st-toast--success .st-toast__progress { background: var(--accent-green); }
.st-toast--success .st-toast__icon { color: var(--accent-green); }

.st-toast--error { border-left: 3px solid var(--accent-red); }
.st-toast--error .st-toast__progress { background: var(--accent-red); }
.st-toast--error .st-toast__icon { color: var(--accent-red); }

.st-toast--warning { border-left: 3px solid var(--accent-gold); }
.st-toast--warning .st-toast__progress { background: var(--accent-gold); }
.st-toast--warning .st-toast__icon { color: var(--accent-gold); }

.st-toast--info { border-left: 3px solid var(--accent-blue); }
.st-toast--info .st-toast__icon { color: var(--accent-blue); }

.st-toast__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  margin-top: 1px;
}

.st-toast__body {
  flex: 1;
  min-width: 0;
}

.st-toast__message {
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.st-toast__action {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  font-size: 0.72rem;
  border-radius: 4px;
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue);
  background: transparent;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.st-toast__action:hover {
  background: var(--accent-blue-dim);
}

.st-toast__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 4px;
  padding: 0;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.st-toast__close:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.08);
}

/* =========================================================================
   #4: DRAG & DROP CAMPAIGN REORDER
   ========================================================================= */

.dd-handle {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 20px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: grab;
  opacity: 0;
  transition: opacity var(--transition-fast), color var(--transition-fast);
  z-index: 2;
  border-radius: 4px;
}

.campaign-card:hover .dd-handle {
  opacity: 1;
}

.dd-handle:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

.dd-handle:active {
  cursor: grabbing;
}

.dd-ghost {
  border: 2px solid var(--accent-blue) !important;
  border-radius: var(--radius-lg);
  background: var(--bg-card) !important;
}

.dd-placeholder {
  border: 2px dashed var(--accent-blue);
  border-radius: var(--radius-lg);
  background: var(--accent-blue-dim);
  opacity: 0.4;
  transition: height 0.2s ease;
}

/* =========================================================================
   #5: LIVE SEARCH HIGHLIGHTS
   ========================================================================= */

.sh-highlight {
  background: rgba(59, 130, 246, 0.25);
  color: var(--text-primary);
  padding: 0 2px;
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.35), 0 0 2px rgba(59, 130, 246, 0.2);
  animation: shGlow 1.5s ease-in-out infinite alternate;
}

@keyframes shGlow {
  from { box-shadow: 0 0 6px rgba(59, 130, 246, 0.3); }
  to { box-shadow: 0 0 14px rgba(59, 130, 246, 0.5), 0 0 4px rgba(59, 130, 246, 0.3); }
}

[data-theme="light"] .sh-highlight {
  background: rgba(59, 130, 246, 0.15);
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.2);
}

/* =========================================================================
   #6: CAMPAIGN COMPARISON MODE
   ========================================================================= */

.cc-compare-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cc-compare-btn:hover {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
  background: var(--accent-purple-dim);
}

.cc-compare-btn--active {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
  background: var(--accent-purple-dim);
}

.cc-mode-active .campaign-card {
  cursor: pointer;
  position: relative;
}

.cc-select-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
  cursor: pointer;
  z-index: 3;
}

.cc-selectable:hover .cc-select-overlay {
  opacity: 1;
}

.cc-selected .cc-select-overlay {
  opacity: 1;
  background: rgba(168, 85, 247, 0.2);
  border: 2px solid var(--accent-purple);
  border-radius: inherit;
}

.cc-select-check {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  transform: scale(0.8);
  transition: transform var(--transition-fast);
}

.cc-selected .cc-select-check {
  transform: scale(1);
}

.cc-panel {
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--accent-purple);
  margin-bottom: 16px;
  overflow: hidden;
  animation: ccPanelSlide 0.35s ease-out;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.15);
}

@keyframes ccPanelSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.cc-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, var(--accent-purple-dim), transparent);
}

.cc-panel__title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.cc-panel__close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.cc-panel__close:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.08);
}

.cc-panel__body {
  display: flex;
  padding: 16px;
  gap: 16px;
}

.cc-panel__col {
  flex: 1;
}

.cc-panel__name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.cc-panel__divider {
  width: 1px;
  background: var(--border-color);
}

.cc-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.cc-metric__label {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.cc-metric__value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 4px;
}

.cc-metric__value--win {
  color: var(--accent-green);
}

.cc-metric__win {
  color: var(--accent-green);
  font-size: 0.6rem;
}

.cc-metric__lose {
  color: var(--accent-red);
  font-size: 0.6rem;
}

/* =========================================================================
   #7: DATA COMPLETENESS RING
   ========================================================================= */

.dcr-ring {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dcr-ring svg {
  display: block;
}

.dcr-ring__progress {
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dcr-ring__label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dcr-ring__value {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
}

.dcr-ring__text {
  font-size: 0.55rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 1px;
}

/* =========================================================================
   #8: QUICK ACTIONS FAB
   ========================================================================= */

.fab-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
}

.fab-trigger {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
  position: relative;
  z-index: 2;
}

.fab-trigger:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(59, 130, 246, 0.45);
}

.fab-trigger__icon--close {
  display: none;
}

.fab-container--open .fab-trigger__icon--plus { display: none; }
.fab-container--open .fab-trigger__icon--close { display: block; }

.fab-container--open .fab-trigger {
  transform: rotate(90deg);
  background: linear-gradient(135deg, var(--accent-red), var(--accent-orange));
}

.fab-menu {
  position: absolute;
  bottom: 64px;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  pointer-events: none;
  opacity: 0;
}

.fab-container--open .fab-menu {
  pointer-events: all;
  opacity: 1;
}

.fab-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.78rem;
  white-space: nowrap;
  box-shadow: var(--shadow-card);
  transform: translateY(20px) scale(0.9);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, background var(--transition-fast), border-color var(--transition-fast);
}

.fab-container--open .fab-menu__item {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.fab-container--open .fab-menu__item--1 { transition-delay: 0.04s; }
.fab-container--open .fab-menu__item--2 { transition-delay: 0.08s; }
.fab-container--open .fab-menu__item--3 { transition-delay: 0.12s; }
.fab-container--open .fab-menu__item--4 { transition-delay: 0.16s; }

.fab-menu__item:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.fab-menu__label {
  font-weight: 500;
}

/* =========================================================================
   #9: TAB BREADCRUMBS
   ========================================================================= */

.tb-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.72rem;
  color: var(--text-muted);
  overflow-x: auto;
  max-width: 100%;
}

.tb-home {
  color: var(--accent-blue);
  cursor: pointer;
  font-size: 0.8rem;
  transition: color var(--transition-fast);
  padding: 2px 4px;
  border-radius: 4px;
}

.tb-home:hover {
  color: var(--text-primary);
  background: var(--accent-blue-dim);
}

.tb-separator {
  color: var(--text-muted);
  opacity: 0.5;
  font-size: 0.9rem;
  padding: 0 2px;
}

.tb-crumb {
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.tb-crumb:hover {
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
}

.tb-crumb--active {
  color: var(--text-primary);
  font-weight: 600;
  background: rgba(255,255,255,0.04);
}

.tb-crumb--enter {
  animation: tbCrumbEnter 0.35s ease-out;
}

@keyframes tbCrumbEnter {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}

/* =========================================================================
   #10: SUCCESS CELEBRATIONS (canvas overlay)
   ========================================================================= */

.celebration-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  pointer-events: none;
  display: none;
}

/* ============================================================================
   CAMPAIGN TILE 3-DOT MENU
   ============================================================================ */

.campaign-tile__menu {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
}

.campaign-tile__menu-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.15s;
  line-height: 1;
}

.campaign-card:hover .campaign-tile__menu-btn {
  opacity: 0.6;
}

.campaign-tile__menu-btn:hover {
  opacity: 1 !important;
  background: rgba(255,255,255,0.08);
}

.campaign-tile__dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-secondary, #1e293b);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  min-width: 160px;
  padding: 4px 0;
  z-index: 100;
}

.campaign-tile__dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 14px;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.82rem;
  white-space: nowrap;
}

.campaign-tile__dropdown-item:hover {
  background: rgba(255,255,255,0.06);
}

.campaign-tile__dropdown-item--danger {
  color: #ef4444;
}

.campaign-tile__dropdown-item--danger:hover {
  background: rgba(239,68,68,0.1);
}

/* Delete confirmation modal */
.campaign-delete-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.campaign-delete-overlay--visible {
  opacity: 1;
}

.campaign-delete-modal {
  background: var(--bg-card, #1e293b);
  border-radius: var(--radius-lg, 12px);
  padding: 24px;
  max-width: 420px;
  width: 90%;
  border: 1px solid var(--accent-red, #ef4444);
  box-shadow: 0 0 30px rgba(239,68,68,0.15);
}

.campaign-delete-modal__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.campaign-delete-modal__body {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.campaign-delete-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.campaign-delete-modal__btn {
  padding: 8px 18px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.15s, transform 0.1s;
}

.campaign-delete-modal__btn:active {
  transform: scale(0.97);
}

.campaign-delete-modal__btn--cancel {
  background: var(--bg-secondary, #334155);
  color: var(--text-primary);
}

.campaign-delete-modal__btn--cancel:hover {
  background: var(--border-color, #475569);
}

.campaign-delete-modal__btn--delete {
  background: #ef4444;
  color: #fff;
}

.campaign-delete-modal__btn--delete:hover {
  background: #dc2626;
}

/* ============================================================================
   RIGHT-CLICK CONTEXT MENU (Surprise #4)
   ============================================================================ */

.contacts__ctx-menu {
  position: absolute;
  z-index: 10001;
  min-width: 160px;
  background: var(--bg-secondary, #1e293b);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  padding: 4px 0;
  animation: ctx-fade-in 0.12s ease-out;
}

@keyframes ctx-fade-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ============================================================================
   SELECTION FLOATING BADGE (Surprise #5)
   ============================================================================ */

.selection-float-badge {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent-blue, #3b82f6);
  color: #fff;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(59,130,246,0.35);
  z-index: 9000;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.selection-float-badge--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================================
   MOBILE RESPONSIVE - Hamburger Menu, Tablet & Phone Breakpoints
   Added for v10.7 mobile support. Desktop styles are NOT changed.
   ============================================================================ */

/* --- Hamburger Button (hidden on desktop) --- */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
}

.hamburger-btn__line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger-btn--active .hamburger-btn__line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger-btn--active .hamburger-btn__line:nth-child(2) {
  opacity: 0;
}

.hamburger-btn--active .hamburger-btn__line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* --- Touch-friendly table scrolling --- */
.table-scroll-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============================================================================
   TABLET BREAKPOINT (max-width: 1024px)
   ============================================================================ */
@media (max-width: 1024px) {
  /* Tab bar: horizontal scroll, smaller text */
  .dashboard__nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .dashboard__tab {
    padding: 10px 14px;
    font-size: 0.8rem;
  }

  .dashboard__tab-hint {
    display: none;
  }

  /* Content padding reduced */
  .dashboard__content {
    padding: 16px;
  }

  /* Overview cards: 2 columns */
  .overview__cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Overview grid: single column */
  .overview__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Campaign toolbar stacks */
  .campaign__toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .campaign__search {
    min-width: unset;
  }

  /* Campaign cards smaller min */
  .campaign-cards {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  /* Forms: single column */
  .cc-form__row {
    flex-direction: column;
    gap: 0;
  }

  /* Detail grids: single column */
  .detail-info-grid {
    grid-template-columns: 1fr;
  }

  /* Modals: wider */
  .campaign-detail {
    max-width: 90%;
  }

  .activity-feed-modal {
    max-width: 90%;
  }

  /* Territory layout already has 900px breakpoint, reinforce */
  .territory-map-layout {
    flex-direction: column;
    height: auto;
  }

  .territory-map-main {
    height: 400px;
  }

  .territory-sidebar {
    width: 100%;
    max-height: 250px;
    border-left: none;
    border-top: 1px solid var(--border-color);
  }

  /* Briefing card */
  .briefing-card__header {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Page size selectors: simplified */
  .page-size-selector {
    font-size: 0.72rem;
  }

  /* Pipeline funnel */
  .pipeline-funnel__subtitle {
    display: none;
  }
}

/* ============================================================================
   PHONE BREAKPOINT (max-width: 640px)
   ============================================================================ */
/* --- Tablet Hamburger (641px - 1024px) --- */
@media (min-width: 641px) and (max-width: 1024px) {
  .hamburger-btn {
    display: flex;
  }

  .dashboard__nav {
    padding: 8px 16px;
    overflow: visible;
  }

  .dashboard__nav-inner {
    display: none;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    padding-top: 8px;
  }

  .dashboard__nav-inner--open {
    display: flex;
  }

  .dashboard__tab {
    padding: 12px 16px;
    font-size: 0.85rem;
    text-align: left;
    border-bottom: none;
    border-left: 3px solid transparent;
    border-radius: var(--radius-sm);
  }

  .dashboard__tab--active {
    border-bottom: none;
    border-left-color: var(--accent-blue);
    background: var(--accent-blue-dim);
  }

  .dashboard__tab:hover {
    background: rgba(255, 255, 255, 0.04);
  }
}

@media (max-width: 640px) {
  /* Phone: bottom nav replaces top nav entirely */
  .dashboard__nav {
    display: none;
  }

  .dashboard__tab-hint {
    display: none;
  }

  /* Header compact */
  .dashboard__header {
    padding: 0 12px;
  }

  .dashboard__header-inner {
    height: 48px;
    gap: 8px;
  }

  .dashboard__title {
    font-size: 0.92rem;
  }

  .dashboard__header-actions {
    gap: 6px;
  }

  /* Hide non-essential header items */
  .smart-search-trigger kbd,
  .cmd-palette-trigger kbd,
  .dashboard__last-update {
    display: none;
  }

  .smart-search-trigger,
  .cmd-palette-trigger {
    padding: 6px;
    min-width: 32px;
    min-height: 32px;
  }

  /* Content padding */
  .dashboard__content {
    padding: 12px;
  }

  /* Overview cards: single column */
  .overview__cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .summary-card {
    padding: 16px;
  }

  .summary-card__value {
    font-size: 1.6rem;
  }

  /* Overview grid: single column */
  .overview__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Panel blocks */
  .panel-block__header {
    padding: 12px 14px;
  }

  .panel-block__body {
    padding: 14px;
  }

  /* Campaign cards: single column */
  .campaign-cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .campaign-card {
    min-height: unset;
    padding: 16px 16px 14px 20px;
  }

  /* Campaign toolbar */
  .campaign__toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  /* Buttons: full-width, touch-friendly */
  .cc-btn,
  .btn-export,
  .cc-btn--primary,
  .cc-btn--secondary,
  .cc-btn--launch {
    min-height: 44px;
    font-size: 0.85rem;
    justify-content: center;
  }

  .cc-form__actions {
    flex-direction: column;
  }

  .cc-form__actions .cc-btn {
    width: 100%;
  }

  /* Forms single column */
  .cc-form__row {
    flex-direction: column;
    gap: 0;
  }

  /* Inputs: larger touch targets */
  .cc-form__input,
  .cc-form__select,
  .cc-form__textarea,
  .campaign__search,
  .campaign__filter {
    min-height: 44px;
    font-size: 0.9rem;
  }

  /* Detail info grid single column */
  .detail-info-grid {
    grid-template-columns: 1fr;
  }

  /* Modals: full-screen */
  .campaign-detail-overlay {
    padding: 0;
  }

  .campaign-detail {
    max-width: 100%;
    border-radius: 0;
    min-height: 100vh;
  }

  .campaign-detail__header {
    padding: 14px 16px;
  }

  .campaign-detail__body {
    padding: 16px;
  }

  /* Activity feed modal: full-screen */
  .activity-feed-overlay {
    padding: 0;
  }

  .activity-feed-modal {
    max-width: 100%;
    border-radius: 0;
    height: 100vh;
  }

  .activity-feed-modal__header {
    padding: 12px 16px;
  }

  .activity-feed-modal__filters {
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 12px;
  }

  .activity-feed-modal__filter {
    font-size: 0.72rem;
    padding: 4px 10px;
  }

  /* Zip map picker: full-screen */
  .zip-map-overlay {
    padding: 0;
  }

  .zip-map-modal {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .zip-map-modal__body {
    flex-direction: column;
  }

  .zip-map-modal__map {
    min-height: 250px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .zip-map-modal__sidebar {
    width: 100%;
    max-height: 180px;
  }

  /* Territory map: sidebar below */
  .territory-map-layout {
    flex-direction: column;
    height: auto;
  }

  .territory-map-main {
    height: 300px;
  }

  .territory-sidebar {
    width: 100%;
    max-height: 200px;
    border-left: none;
    border-top: 1px solid var(--border-color);
  }

  .territory-map-toolbar {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
  }

  .territory-map-toolbar__left,
  .territory-map-toolbar__right {
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Pulse ticker compact */
  .pulse-ticker {
    padding: 0 12px;
    height: 30px;
  }

  .pulse-ticker__label-text {
    font-size: 0.6rem;
  }

  .pulse-ticker__meta {
    display: none;
  }

  /* Briefing card compact */
  .briefing-card {
    margin-bottom: 12px;
  }

  .briefing-card__header {
    padding: 12px 14px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .briefing-card__header-left {
    gap: 8px;
  }

  .briefing-card__greeting {
    font-size: 0.88rem;
  }

  .briefing-card__date {
    font-size: 0.7rem;
  }

  .briefing-card__body {
    padding: 12px 14px;
  }

  /* Pipeline funnel compact */
  .pipeline-funnel {
    margin-bottom: 12px;
  }

  .pipeline-funnel__header {
    padding: 12px 14px;
  }

  .pipeline-funnel__subtitle {
    display: none;
  }

  /* Intel panel compact */
  .intel-panel {
    margin-bottom: 12px;
  }

  /* Page size selectors: fewer options on mobile */
  .page-size-selector {
    font-size: 0.7rem;
  }

  /* Tables: allow horizontal scroll */
  .campaign__table-wrap,
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Login card responsive */
  .login-card {
    width: 90%;
    max-width: 360px;
    padding: 24px 20px;
  }

  /* Toast container */
  .toast-container {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  /* Group stats cards */
  .cc-group-stats {
    grid-template-columns: 1fr;
  }

  .cc-group-cards {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   SMALL PHONE BREAKPOINT (max-width: 400px)
   ============================================================================ */
@media (max-width: 400px) {
  html {
    font-size: 13px;
  }

  .dashboard__title {
    font-size: 0.82rem;
  }

  /* Hide some header actions on very small screens */
  .cmd-palette-trigger,
  .smart-search-trigger {
    display: none;
  }

  .dashboard__header-actions {
    gap: 4px;
  }

  .dashboard__content {
    padding: 8px;
  }

  .summary-card__value {
    font-size: 1.4rem;
  }

  .campaign-card {
    padding: 12px 12px 10px 16px;
  }

  .territory-map-main {
    height: 250px;
  }
}

/* ============================================================================
   MOBILE SURPRISE #1: BOTTOM NAVIGATION BAR
   iOS/Android-style bottom tab bar with 5 key destinations.
   Visible only on phones (max-width: 640px). Hidden on desktop/tablet.
   ============================================================================ */

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  height: 60px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.3);
}

.mobile-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.62rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 4px;
  min-width: 56px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav__item:active {
  background: rgba(255,255,255,0.05);
}

.mobile-bottom-nav__item--active {
  color: var(--accent-blue);
}

.mobile-bottom-nav__icon {
  width: 22px;
  height: 22px;
}

.mobile-bottom-nav__label {
  letter-spacing: 0.01em;
}

[data-theme="light"] .mobile-bottom-nav {
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
}

/* --- "More" Bottom Sheet --- */
.mobile-more-sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 250;
}

.mobile-more-sheet--open {
  display: block;
}

.mobile-more-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  animation: moreSheetFadeIn 0.2s ease;
}

@keyframes moreSheetFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mobile-more-sheet__panel {
  position: absolute;
  bottom: 60px;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  padding: 12px 16px 20px;
  animation: moreSheetSlideUp 0.25s ease;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

@keyframes moreSheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.mobile-more-sheet__handle {
  width: 36px;
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.mobile-more-sheet__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.mobile-more-sheet__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.72rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.mobile-more-sheet__item:active {
  background: var(--bg-card-hover);
  border-color: var(--accent-blue);
}

.mobile-more-sheet__emoji {
  font-size: 1.4rem;
  line-height: 1;
}

/* Show bottom nav only on phones */
@media (max-width: 640px) {
  .mobile-bottom-nav {
    display: flex;
  }

  /* Add bottom padding to content so it's not hidden behind bottom nav */
  .dashboard__content {
    padding-bottom: 80px;
  }
}

/* ============================================================================
   MOBILE SURPRISE #2: PULL-TO-REFRESH
   Swipe down from top of content area to refresh current tab data.
   ============================================================================ */

.ptr-indicator {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 150;
  height: 48px;
  background: var(--accent-blue);
  color: #fff;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.ptr-indicator--pulling {
  display: flex;
  transform: translateY(-100%);
}

.ptr-indicator--refreshing {
  display: flex;
  transform: translateY(0);
}

.ptr-indicator__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ptrSpin 0.7s linear infinite;
}

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

.ptr-indicator__text {
  letter-spacing: 0.02em;
}

/* ============================================================================
   MOBILE SURPRISE #3: FLOATING ACTION BUTTON (FAB)
   Quick-action bubble in bottom-right, expandable to 3 actions.
   ============================================================================ */

.mobile-fab {
  display: none;
  position: fixed;
  bottom: 80px;
  right: 16px;
  z-index: 190;
  flex-direction: column-reverse;
  align-items: center;
  gap: 10px;
}

.mobile-fab__main {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-blue);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(59,130,246,0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.mobile-fab__main:active {
  transform: scale(0.92);
}

.mobile-fab--open .mobile-fab__main {
  background: var(--accent-red);
  transform: rotate(45deg);
  box-shadow: 0 4px 16px rgba(239,68,68,0.4);
}

.mobile-fab__menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-fab--open .mobile-fab__menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.mobile-fab__action {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.mobile-fab__action:active {
  transform: scale(0.9);
  background: var(--bg-card-hover);
  border-color: var(--accent-blue);
}

@media (max-width: 640px) {
  .mobile-fab {
    display: flex;
  }
}

/* ============================================================================
   MOBILE SURPRISE #4: SWIPE GESTURE INDICATOR
   Subtle edge indicators showing swipe-between-tabs is available.
   ============================================================================ */

.swipe-edge-hint {
  display: none;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60px;
  border-radius: 2px;
  background: var(--accent-blue);
  opacity: 0;
  z-index: 140;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.swipe-edge-hint--left {
  left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.swipe-edge-hint--right {
  right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.swipe-edge-hint--visible {
  opacity: 0.6;
}

@media (max-width: 640px) {
  .swipe-edge-hint {
    display: block;
  }
}

/* ============================================================================
   MOBILE SURPRISE #5: CONNECTION STATUS BANNER
   Offline/online awareness bar. Slides in from top on connection loss.
   ============================================================================ */

.connection-banner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  height: 36px;
  background: var(--accent-red);
  color: #fff;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  transform: translateY(-100%);
  transition: transform 0.35s ease;
}

.connection-banner--visible {
  display: flex;
  transform: translateY(0);
}

.connection-banner--online {
  background: var(--accent-green);
}

.connection-banner__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
  animation: connDotPulse 1.5s infinite;
}

@keyframes connDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.connection-banner--online .connection-banner__dot {
  animation: none;
  opacity: 1;
}

/* ============================================================================
   DISCOVER CLICK-TO-SELECT + SCOUT CAMPAIGN BAR (v10.5)
   ============================================================================ */

/* Discover click-to-select rows */
.discover-row {
  cursor: pointer;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
  user-select: none;
  -webkit-user-select: none;
}
.discover-row:hover {
  background: rgba(255,255,255,0.03);
}
.discover-row--selected {
  border-left-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.08) !important;
}
.discover-row--selected td:first-child {
  position: relative;
}
.discover-row--disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}
.discover-row--disabled:hover {
  background: transparent;
}

/* Selection stats floating bar */
.discover-selection-stats {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  transition: opacity 0.15s ease;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.2);
  z-index: 2;
}
.discover-selection-stats__count {
  font-weight: 700;
  color: var(--accent-blue);
  font-size: 0.9rem;
}
.discover-selection-stats__detail {
  color: var(--text-muted);
  font-size: 0.78rem;
}
.discover-selection-stats__confidence {
  margin-left: auto;
  color: var(--accent-green);
  font-weight: 600;
  font-size: 0.78rem;
}

/* Scout results campaign action bar */
.scout-campaign-bar {
  margin-top: 20px;
  padding: 16px;
  background: rgba(59,130,246,0.06);
  border: 1px solid rgba(59,130,246,0.18);
  border-radius: var(--radius-md);
}
.scout-campaign-bar__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.scout-campaign-bar__row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.scout-campaign-bar__select {
  flex: 1;
  max-width: 320px;
  padding: 8px 12px;
  font-size: 0.82rem;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}
.scout-campaign-bar__input {
  flex: 1;
  max-width: 260px;
  padding: 8px 12px;
  font-size: 0.82rem;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}
.scout-campaign-bar__btn {
  padding: 8px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
  min-height: 44px;
}
.scout-campaign-bar__btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
}
.scout-campaign-bar__btn:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

/* Mobile: full-width stacking */
@media (max-width: 640px) {
  .scout-campaign-bar__row {
    flex-direction: column;
    align-items: stretch;
  }
  .scout-campaign-bar__select,
  .scout-campaign-bar__input {
    max-width: 100%;
  }
  .scout-campaign-bar__btn {
    width: 100%;
  }
  .discover-selection-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .discover-selection-stats__confidence {
    margin-left: 0;
  }
}

/* ============================================================================
   WEBSITE HEALTH DOT (Surprise Feature: inline status indicator)
   ============================================================================ */

.website-health-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
  flex-shrink: 0;
}

.website-health-dot--green {
  background: #22c55e;
  box-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
}

.website-health-dot--red {
  background: #ef4444;
  box-shadow: 0 0 4px rgba(239, 68, 68, 0.4);
}

.website-health-dot--gray {
  background: #6b7280;
  opacity: 0.5;
}

.contacts__no-website {
  color: var(--text-muted, #6b7280);
}

/* ============================================================================
   WEBSITE VERIFICATION MODAL
   ============================================================================ */

.wv-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: wvFadeIn 0.25s ease;
}

.wv-modal-overlay--closing {
  animation: wvFadeOut 0.25s ease forwards;
}

@keyframes wvFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes wvFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.wv-modal {
  background: var(--bg-secondary, #1e293b);
  border: 1px solid var(--border-color, #334155);
  border-radius: 12px;
  width: 90%;
  max-width: 720px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: wvSlideIn 0.3s ease;
}

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

.wv-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color, #334155);
}

.wv-modal__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary, #f1f5f9);
  margin: 0;
}

.wv-modal__close {
  background: none;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}

.wv-modal__close:hover {
  background: var(--bg-tertiary, #334155);
  color: var(--text-primary, #f1f5f9);
}

.wv-modal__progress {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color, #334155);
}

.wv-progress-bar {
  height: 6px;
  background: var(--bg-tertiary, #334155);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.wv-progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.wv-progress-text {
  font-size: 0.85rem;
  color: var(--text-muted, #94a3b8);
}

/* Summary cards */
.wv-modal__summary {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color, #334155);
}

.wv-summary-cards {
  display: flex;
  gap: 12px;
}

.wv-summary-card {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  border-radius: 8px;
  background: var(--bg-tertiary, #334155);
}

.wv-summary-card__num {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.wv-summary-card__label {
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 2px;
}

.wv-summary-card--green .wv-summary-card__num { color: #22c55e; }
.wv-summary-card--orange .wv-summary-card__num { color: #f59e0b; }
.wv-summary-card--red .wv-summary-card__num { color: #ef4444; }

/* Duplicates section */
.wv-modal__duplicates {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color, #334155);
}

.wv-duplicates-header {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f59e0b;
  margin-bottom: 8px;
}

.wv-duplicate-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.82rem;
  flex-wrap: wrap;
}

.wv-duplicate-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wv-duplicate-domain {
  color: var(--text-primary, #f1f5f9);
  font-weight: 500;
}

.wv-duplicate-names {
  color: var(--text-muted, #94a3b8);
}

/* Results list */
.wv-modal__results {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px;
  max-height: 45vh;
}

.wv-result-row {
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: var(--bg-tertiary, #334155);
  border-left: 3px solid transparent;
  animation: wvRowIn 0.3s ease;
}

@keyframes wvRowIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.wv-result-row--verified { border-left-color: #22c55e; }
.wv-result-row--updated { border-left-color: #f59e0b; }
.wv-result-row--not_found { border-left-color: #ef4444; }
.wv-result-row--error { border-left-color: #ef4444; }

.wv-result-row__main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wv-result-row__name {
  font-weight: 500;
  color: var(--text-primary, #f1f5f9);
  font-size: 0.9rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wv-status-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.wv-status-badge--verified {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.wv-status-badge--updated {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.wv-status-badge--not-found {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.wv-status-badge--error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.wv-result-row__url {
  font-size: 0.8rem;
  margin-top: 4px;
  color: var(--text-muted, #94a3b8);
}

.wv-result-row__old-url {
  text-decoration: line-through;
  opacity: 0.6;
}

.wv-result-row__new-url {
  color: #8b5cf6;
  text-decoration: none;
}

.wv-result-row__new-url:hover {
  text-decoration: underline;
}

/* Candidate buttons for manual selection */
.wv-result-row__candidates {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color, #334155);
}

.wv-result-row__candidates-label {
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 6px;
}

.wv-candidate-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 7px 10px;
  margin-bottom: 4px;
  background: var(--bg-secondary, #1e293b);
  border: 1px solid var(--border-color, #334155);
  border-radius: 6px;
  color: var(--text-primary, #f1f5f9);
  cursor: pointer;
  font-size: 0.8rem;
  text-align: left;
  transition: all 0.15s ease;
}

.wv-candidate-btn:hover {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.08);
}

.wv-candidate-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.wv-candidate-btn__domain {
  font-weight: 600;
  color: #8b5cf6;
  white-space: nowrap;
}

.wv-candidate-btn__match {
  font-size: 0.65rem;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
}

.wv-candidate-btn__title {
  color: var(--text-muted, #94a3b8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.wv-candidate--high { border-left: 2px solid #22c55e; }
.wv-candidate--medium { border-left: 2px solid #f59e0b; }
.wv-candidate--low { border-left: 2px solid #6b7280; }

/* Footer */
.wv-modal__footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-color, #334155);
  display: flex;
  justify-content: flex-end;
}

/* Mobile: full-screen modal */
@media (max-width: 640px) {
  .wv-modal {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }

  .wv-summary-cards {
    flex-direction: row;
    gap: 8px;
  }

  .wv-candidate-btn {
    min-height: 44px;
  }

  .wv-modal__close {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ============================================================================
   TEMPLATE BUILDER - Modal, List, Builder, Preview
   ============================================================================ */

/* --- Templates Button in Campaign Toolbar --- */
.btn-templates {
  background: var(--accent-purple-dim);
  color: var(--accent-purple);
  border: 1px solid var(--accent-purple);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}
.btn-templates:hover {
  background: var(--accent-purple);
  color: #fff;
}

/* --- Overlay --- */
.tpl-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: tplFadeIn 0.2s ease;
}
@keyframes tplFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Modal --- */
.tpl-modal {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  width: 96vw;
  max-width: 1200px;
  height: 92vh;
  max-height: 900px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-elevated);
  overflow: hidden;
}
.tpl-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}
.tpl-modal__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tpl-modal__icon {
  font-size: 20px;
  color: var(--accent-purple);
}
.tpl-modal__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.tpl-modal__close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}
.tpl-modal__close:hover {
  color: var(--accent-red);
  background: var(--accent-red-dim);
}
.tpl-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* --- List View --- */
.tpl-list {
  padding: 16px 20px;
}
.tpl-list__toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tpl-list__search {
  flex: 1;
  min-width: 180px;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
}
.tpl-list__search:focus {
  outline: none;
  border-color: var(--accent-purple);
}
.tpl-list__filter {
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
}
.tpl-list__create-btn {
  background: var(--accent-purple);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition-fast);
}
.tpl-list__create-btn:hover {
  background: #9333ea;
}

/* --- Empty State --- */
.tpl-list__empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.tpl-list__empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}
.tpl-list__empty-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.tpl-list__empty-sub {
  font-size: 13px;
}

/* --- Template Cards Grid --- */
.tpl-list__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.tpl-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
.tpl-card:hover {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 1px var(--accent-purple);
  transform: translateY(-1px);
}
.tpl-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.tpl-card__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}
.tpl-card__actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.tpl-card:hover .tpl-card__actions {
  opacity: 1;
}
.tpl-card__action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}
.tpl-card__action-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}
.tpl-card__action-btn--del:hover {
  color: var(--accent-red);
  background: var(--accent-red-dim);
}
.tpl-card__badges {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

/* --- Badges --- */
.tpl-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tpl-badge--type {
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
}
.tpl-badge--fw {
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
}
.tpl-badge--ara { background: var(--accent-green-dim); color: var(--accent-green); }
.tpl-badge--ace { background: var(--accent-blue-dim); color: var(--accent-blue); }
.tpl-badge--gift { background: var(--accent-gold-dim); color: var(--accent-gold); }
.tpl-badge--custom { background: var(--accent-purple-dim); color: var(--accent-purple); }
.tpl-badge--new {
  background: var(--accent-green-dim);
  color: var(--accent-green);
}
.tpl-badge--usage {
  background: var(--accent-orange-dim);
  color: var(--accent-orange);
}

.tpl-card__preview {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
  max-height: 42px;
  overflow: hidden;
}
.tpl-card__footer {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

/* --- Builder View --- */
.tpl-builder {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
}
.tpl-builder__top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
  flex-shrink: 0;
}
.tpl-builder__back-btn {
  background: none;
  border: none;
  color: var(--accent-purple);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.tpl-builder__back-btn:hover {
  background: var(--accent-purple-dim);
}
.tpl-builder__ai-btn {
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.tpl-builder__ai-btn:hover {
  background: var(--accent-gold);
  color: #000;
}

.tpl-builder__layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}
.tpl-builder__left {
  flex: 0 0 60%;
  padding: 16px 20px;
  overflow-y: auto;
  border-right: 1px solid var(--border-color);
}
.tpl-builder__right {
  flex: 0 0 40%;
  padding: 16px 20px;
  overflow-y: auto;
  background: var(--bg-primary);
}
.tpl-builder__section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 16px 0 8px;
}
.tpl-builder__section-label:first-child {
  margin-top: 0;
}

/* --- Name Input --- */
.tpl-builder__name-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 18px;
  font-weight: 700;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  margin-bottom: 4px;
}
.tpl-builder__name-input:focus {
  outline: none;
  border-color: var(--accent-purple);
}

/* --- Type Pills --- */
.tpl-builder__type-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tpl-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.tpl-pill:hover {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}
.tpl-pill--active {
  background: var(--accent-purple);
  color: #fff;
  border-color: var(--accent-purple);
}

/* --- Framework Cards --- */
.tpl-builder__fw-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tpl-fw-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.tpl-fw-card:hover {
  border-color: var(--accent-purple);
}
.tpl-fw-card--active {
  border-color: var(--accent-purple);
  background: var(--accent-purple-dim);
}
.tpl-fw-card__icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent-purple);
}
.tpl-fw-card__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.tpl-fw-card__desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* --- Subject Input --- */
.tpl-builder__subject-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
}
.tpl-builder__subject-input:focus {
  outline: none;
  border-color: var(--accent-purple);
}

/* --- Hyphen Warning --- */
.tpl-builder__hyphen-warn {
  background: var(--accent-orange-dim);
  color: var(--accent-orange);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  margin-top: 4px;
  border-left: 3px solid var(--accent-orange);
}

/* --- Section Editors --- */
.tpl-builder__sections {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tpl-section-editor {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.tpl-section-editor__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
}
.tpl-section-editor__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-purple);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tpl-section-editor__label-input {
  background: transparent;
  border: 1px solid transparent;
  color: var(--accent-purple);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  max-width: 180px;
}
.tpl-section-editor__label-input:focus {
  outline: none;
  border-color: var(--accent-purple);
  background: var(--bg-input);
}
.tpl-section-editor__count {
  font-size: 10px;
  color: var(--text-muted);
}
.tpl-section-editor__remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  margin-left: 8px;
  transition: color var(--transition-fast);
}
.tpl-section-editor__remove:hover {
  color: var(--accent-red);
}
.tpl-section-editor__textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  font-family: inherit;
}
.tpl-section-editor__textarea:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--accent-purple);
}

/* --- Add Section Button --- */
.tpl-builder__add-section-btn {
  background: var(--bg-card);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  margin-top: 8px;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.tpl-builder__add-section-btn:hover {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}

/* --- Tags Input --- */
.tpl-builder__tags-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
}
.tpl-builder__tags-input:focus {
  outline: none;
  border-color: var(--accent-purple);
}

/* --- Variable Picker --- */
.tpl-builder__var-groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tpl-var-group__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.tpl-var-group__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.tpl-var-chip {
  background: var(--accent-purple-dim);
  color: var(--accent-purple);
  border: 1px solid transparent;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  font-family: var(--font-mono);
}
.tpl-var-chip:hover {
  background: var(--accent-purple);
  color: #fff;
  border-color: var(--accent-purple);
}

/* --- Live Preview --- */
.tpl-builder__preview {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  min-height: 200px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
}
.tpl-preview__subject {
  font-weight: 700;
  font-size: 14px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}
.tpl-preview__section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-purple);
  margin-top: 12px;
  margin-bottom: 4px;
}
.tpl-preview__section-label:first-child {
  margin-top: 0;
}
.tpl-preview__section-content {
  color: var(--text-secondary);
}
.tpl-preview__empty {
  color: var(--text-muted);
  font-style: italic;
}

/* --- Builder Footer --- */
.tpl-builder__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
  flex-shrink: 0;
}
.tpl-builder__cancel-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}
.tpl-builder__cancel-btn:hover {
  border-color: var(--text-muted);
}
.tpl-builder__save-btn {
  background: var(--accent-purple);
  color: #fff;
  border: none;
  padding: 8px 24px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.tpl-builder__save-btn:hover {
  background: #9333ea;
}

/* --- Template Builder Mobile Responsive --- */
@media (max-width: 1024px) {
  .tpl-builder__layout {
    flex-direction: column;
  }
  .tpl-builder__left {
    flex: none;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .tpl-builder__right {
    flex: none;
  }
  .tpl-builder__fw-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .tpl-modal {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
  .tpl-list__toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .tpl-list__search {
    min-width: 100%;
  }
  .tpl-list__grid {
    grid-template-columns: 1fr;
  }
  .tpl-builder__top-bar {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  .tpl-builder__type-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .tpl-pill {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .tpl-fw-card {
    min-height: 44px;
  }
  .tpl-var-chip {
    min-height: 36px;
    display: flex;
    align-items: center;
  }
  .tpl-builder__footer {
    flex-direction: column;
  }
  .tpl-builder__cancel-btn,
  .tpl-builder__save-btn {
    min-height: 44px;
  }
  .tpl-card__actions {
    opacity: 1;
  }
}
