/* ═══════════════════════════════════════════════════════════════════════════
   LeadsTracer — styles.css
   Design system: deep navy dark mode, accent blue, status colors
   Fonts: Instrument Serif / DM Sans / Geist Mono (loaded via Google Fonts)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────────────────────────────── */
:root {
  /* Brand colors */
  --blue:   #3b82f6;
  --green:  #10b981;
  --red:    #f43f5e;
  --orange: #fb923c;
  --purple: #a78bfa;
  --yellow: #fbbf24;

  /* Dark theme (default) */
  --bg:         #06091a;
  --bg2:        #0b1128;
  --bg3:        #111d3c;
  --bg-card:    #0f1a36;
  --bg-hover:   #162040;
  --border:     #1e3358;
  --border2:    #253d6a;
  --text:       #e8edf5;
  --text2:      #94a3b8;
  --text3:      #546a8a;
  --shadow:     rgba(0,0,0,0.55);

  /* Typography */
  --serif:  'Instrument Serif', Georgia, serif;
  --sans:   'DM Sans', system-ui, -apple-system, sans-serif;
  --mono:   'Geist Mono', 'Courier New', monospace;

  /* Layout */
  --header-h:  56px;
  --stats-h:   46px;
  --toolbar-h: 52px;
  --panel-w:   400px;
  --radius:    8px;
  --radius-lg: 14px;

  /* Transitions */
  --ease:  cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="light"] {
  --bg:       #f1f5f9;
  --bg2:      #ffffff;
  --bg3:      #e8eef8;
  --bg-card:  #ffffff;
  --bg-hover: #f8faff;
  --border:   #d0daea;
  --border2:  #b8c8de;
  --text:     #0f172a;
  --text2:    #475569;
  --text3:    #94a3b8;
  --shadow:   rgba(0,0,0,0.12);
}

/* Ensure the HTML hidden attribute is never overridden by display rules */
[hidden] { display: none !important; }

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

html {
  height: 100%;
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  overflow-x: hidden;
  max-width: 100%;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }
svg { display: block; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ── App Header ────────────────────────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-h);
  padding: 0 18px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
  z-index: 100;
}

/* Sonar logo */
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.sonar-logo {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #0f1f3d 0%, #091428 100%);
  border: 1px solid #1a3060;
  border-radius: 8px;
  overflow: hidden;
}

.sonar-core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue);
  z-index: 2;
}

.sonar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(59,130,246,0.5);
  opacity: 0;
}
.sonar-ring.r1 { animation: sonarPing 2.4s ease-out infinite; }
.sonar-ring.r2 { animation: sonarPing 2.4s ease-out infinite; animation-delay: 0.8s; }
.sonar-ring.r3 { animation: sonarPing 2.4s ease-out infinite; animation-delay: 1.6s; }

@keyframes sonarPing {
  0%   { transform: translate(-50%, -50%) scale(0.3); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0; }
}

.logo-text-wrap {
  display: flex;
  flex-direction: column;
}

.app-name {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
}

.name-accent {
  color: #60a5fa;
  font-style: italic;
}

.app-subtitle {
  font-family: 'Geist Mono', monospace;
  font-size: 8px;
  color: var(--text3);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 1px;
}

/* Territory badge */
.territory-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 5px 12px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 20px;
  cursor: default;
}

.territory-icon {
  color: var(--blue);
  font-size: 13px;
}

.territory-info {
  display: flex;
  align-items: center;
  gap: 7px;
}

.territory-city {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.territory-tag {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--blue);
  background: rgba(59,130,246,0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Header right controls */
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border2); }

/* ── Stats Row ─────────────────────────────────────────────────────────── */
.stats-row {
  display: flex;
  align-items: center;
  height: var(--stats-h);
  padding: 0 20px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow-x: auto;
  gap: 0;
  position: relative;
  z-index: 90;
}
.stats-row::-webkit-scrollbar { display: none; }

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 0 16px;
  flex-shrink: 0;
}

.stat-val {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--text);
  min-width: 28px;
  text-align: center;
}

.stat-lbl {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text3);
  text-transform: uppercase;
  white-space: nowrap;
}

.stat-div {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
}

/* Stat value colors */
.c-red    { color: var(--red)    !important; }
.c-orange { color: var(--orange) !important; }
.c-purple { color: var(--purple) !important; }
.c-yellow { color: var(--yellow) !important; }
.c-green  { color: var(--green)  !important; }
.c-blue   { color: var(--blue)   !important; }

/* ── Toolbar ───────────────────────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--toolbar-h);
  padding: 0 16px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow: visible;
  position: relative;
  z-index: 100;
}
.toolbar::-webkit-scrollbar { display: none; }

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

/* Mobile filter drawer — hidden on desktop */
.filter-mobile-btn    { display: none; }
.filter-mobile-overlay { display: none; }
.filter-mobile-drawer  { display: none; }

@media (max-width: 480px) {
  /* Hide toolbar filter group — replaced by drawer trigger */
  .filter-group { display: none !important; }

  /* Trigger button */
  .filter-mobile-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border-radius: 15px;
    border: 1px solid var(--border2);
    background: var(--bg3);
    color: var(--text);
    font-family: var(--sans);
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s;
  }
  .filter-mobile-btn:active { background: var(--bg-hover); }

  /* Overlay */
  .filter-mobile-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 350;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease);
  }
  .filter-mobile-overlay.filter-overlay-visible {
    opacity: 1;
    pointer-events: auto;
  }

  /* Drawer */
  .filter-mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg2);
    border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    padding: 0 16px 32px;
    z-index: 351;
    transform: translateY(100%);
    transition: transform 0.25s var(--ease);
  }
  .filter-mobile-drawer.filter-drawer-open {
    transform: translateY(0);
  }

  .filter-drawer-handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--border2);
    margin: 12px auto 16px;
    flex-shrink: 0;
  }

  .filter-drawer-heading {
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 14px;
  }

  .filter-drawer-pills {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  /* Drawer pills — full width, tall enough to tap */
  .filter-mobile-drawer .filter-pill {
    width: 100%;
    height: 44px;
    border-radius: var(--radius);
    font-size: 14px;
    text-align: left;
    padding: 0 14px;
    white-space: normal;
  }

  /* Quick Win pill in drawer matches filter-pill style */
  .filter-mobile-qw {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text2);
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background 0.16s, border-color 0.16s, color 0.16s;
  }
  .filter-mobile-qw:hover  { background: var(--bg-hover); color: var(--text); }
  .filter-mobile-qw.active { background: rgba(16,185,129,0.14); border-color: rgba(16,185,129,0.4); color: var(--green); }
}

.filter-pill {
  height: 30px;
  padding: 0 12px;
  border-radius: 15px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}
.filter-pill:hover  { background: var(--bg-hover); color: var(--text); }
.filter-pill.active { background: var(--bg3); border-color: var(--border2); color: var(--text); }

/* Colored filter pills */
.fp-red.active    { background: rgba(244,63,94,0.14);   border-color: rgba(244,63,94,0.4);   color: var(--red);    }
.fp-orange.active { background: rgba(251,146,60,0.14);  border-color: rgba(251,146,60,0.4);  color: var(--orange); }
.fp-purple.active { background: rgba(167,139,250,0.14); border-color: rgba(167,139,250,0.4); color: var(--purple); }
.fp-yellow.active { background: rgba(251,191,36,0.14);  border-color: rgba(251,191,36,0.4);  color: var(--yellow); }
.fp-green.active  { background: rgba(16,185,129,0.14);  border-color: rgba(16,185,129,0.4);  color: var(--green);  }
.fp-teal.active   { background: rgba(6,182,212,0.14);   border-color: rgba(6,182,212,0.4);   color: #06b6d4; }
.fp-pink.active   { background: rgba(236,72,153,0.14);  border-color: rgba(236,72,153,0.4);  color: #ec4899; }

/* Color dot indicators on pills */
.fp-red::before    { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red);    margin-right: 5px; vertical-align: middle; }
.fp-orange::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); margin-right: 5px; vertical-align: middle; }
.fp-purple::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--purple); margin-right: 5px; vertical-align: middle; }
.fp-yellow::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); margin-right: 5px; vertical-align: middle; }
.fp-green::before  { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green);  margin-right: 5px; vertical-align: middle; }
.fp-teal::before   { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #06b6d4; margin-right: 5px; vertical-align: middle; }
.fp-pink::before   { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ec4899; margin-right: 5px; vertical-align: middle; }

.pill-count {
  font-family: var(--mono);
  font-size: 10px;
  opacity: 0.6;
}

/* ── More Filters dropdown ─────────────────────────────────────────────── */
.mf-wrap {
  position: relative;
  flex-shrink: 0;
}

.mf-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 15px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}
.mf-btn:hover { background: var(--bg-hover); color: var(--text); }
.mf-btn.mf-btn-active {
  background: rgba(99,102,241,0.12);
  border-color: rgba(99,102,241,0.4);
  color: var(--text);
}
.mf-btn[aria-expanded="true"] .mf-chevron { transform: rotate(180deg); }

.mf-chevron { transition: transform 0.18s; flex-shrink: 0; }

.mf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #6366f1;
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  border-radius: 10px;
  padding: 1px 6px;
  line-height: 1.4;
}

.mf-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 190px;
  background: #0d1321;
  border: 1px solid #1a2535;
  border-radius: calc(var(--radius) * 1.5);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
  z-index: 9999;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mf-dropdown.hidden { display: none; }

.mf-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text2);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.13s, color 0.13s;
}
.mf-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.mf-item.mf-item-active { background: rgba(255,255,255,0.06); color: var(--text); }

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

.mf-label { flex: 1; }

.mf-check {
  color: #6366f1;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.13s;
  flex-shrink: 0;
}
.mf-item.mf-item-active .mf-check { opacity: 1; }

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 1;
  min-width: 0;
}

.category-select {
  height: 32px;
  padding: 0 28px 0 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 8px center;
  color: var(--text2);
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
  appearance: none;
  transition: border-color 0.16s;
}
.category-select:focus { outline: 2px solid var(--blue); outline-offset: 2px; border-color: var(--blue); }
.category-select option { background: var(--bg2); color: var(--text); }

.mode-toggle {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2px;
  gap: 2px;
}

.mode-btn {
  height: 26px;
  padding: 0 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text2);
  font-size: 12.5px;
  font-weight: 500;
  transition: background 0.16s, color 0.16s;
  white-space: nowrap;
}
.mode-btn.active { background: var(--bg3); color: var(--text); }
.mode-btn:hover:not(.active) { background: var(--bg-hover); color: var(--text); }

/* Mode toggle inside map-container — dark glass, matches heatmap/neighborhood style */
.map-container .mode-toggle {
  position: absolute;
  bottom: 136px;
  left: 14px;
  z-index: 10;
  padding: 0;
  gap: 0;
  background: transparent;
  border: none;
}

.map-container .mode-btn {
  height: auto;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(148,163,184,0.3);
  background: rgba(15,23,42,0.75);
  color: rgba(148,163,184,0.85);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  backdrop-filter: blur(4px);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.map-container .mode-btn:hover:not(.active) {
  border-color: rgba(148,163,184,0.55);
  color: #e2e8f0;
}

.map-container .mode-btn.active {
  border-color: rgba(245,158,11,0.5);
  color: #f59e0b;
  background: rgba(245,158,11,0.1);
}

/* ── Main Layout ───────────────────────────────────────────────────────── */
.main-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

/* ── Map Area ──────────────────────────────────────────────────────────── */
.map-area {
  display: flex;
  flex: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.map-container {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* ── Map overlays ──────────────────────────────────────────────────────── */
.map-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 20;
  pointer-events: none;
}

.map-loading {
  background: rgba(6,9,26,0.75);
  color: var(--text2);
  font-size: 14px;
  backdrop-filter: blur(4px);
  pointer-events: all;
}
[data-theme="light"] .map-loading { background: rgba(241,245,249,0.8); }

.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.map-empty {
  pointer-events: all;
  background: rgba(6,9,26,0.6);
  backdrop-filter: blur(6px);
}
[data-theme="light"] .map-empty { background: rgba(241,245,249,0.75); }

.empty-icon {
  font-size: 40px;
  color: var(--text3);
  line-height: 1;
}
.empty-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
.empty-sub {
  font-size: 13.5px;
  color: var(--text2);
  text-align: center;
  max-width: 280px;
}

/* ── Neighborhood toggle ───────────────────────────────────────────────── */
.heatmap-btn {
  position: absolute;
  bottom: 104px;
  left: 14px;
  z-index: 10;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(148,163,184,0.3);
  background: rgba(15,23,42,0.75);
  color: rgba(148,163,184,0.85);
  cursor: pointer;
  letter-spacing: 0.03em;
  backdrop-filter: blur(4px);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.heatmap-btn:hover {
  border-color: rgba(148,163,184,0.55);
  color: #e2e8f0;
}
.heatmap-btn.active {
  border-color: rgba(239,68,68,0.5);
  color: #ef4444;
  background: rgba(239,68,68,0.1);
}

.territories-btn {
  position: absolute;
  bottom: 168px;
  left: 14px;
  z-index: 10;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(148,163,184,0.3);
  background: rgba(15,23,42,0.75);
  color: rgba(148,163,184,0.85);
  cursor: pointer;
  letter-spacing: 0.03em;
  backdrop-filter: blur(4px);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.territories-btn:hover {
  border-color: rgba(148,163,184,0.55);
  color: #e2e8f0;
}
.territories-btn.active {
  border-color: rgba(52,211,153,0.5);
  color: #34d399;
  background: rgba(52,211,153,0.1);
}

.neighborhood-wrap {
  position: absolute;
  bottom: 72px;
  left: 14px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

/* ── Map Options wrap — desktop: transparent full-size pass-through ───────── */
.map-options-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.map-options-menu {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.map-options-btn {
  display: none;
}
/* Re-enable pointer events on the actual interactive button children */
.map-options-menu .territories-btn,
.map-options-menu .mode-toggle,
.map-options-menu .heatmap-btn,
.map-options-menu .neighborhood-wrap {
  pointer-events: auto;
}

/* ── Map Options wrap — mobile: collapsed/expanded menu ──────────────────── */
@media (max-width: 480px) {
  .map-options-wrap {
    inset: auto;
    bottom: 72px;
    left: 14px;
    width: auto;
    pointer-events: auto;
    z-index: 15;
  }

  .map-options-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: 6px;
    border: 1px solid rgba(148,163,184,0.3);
    background: rgba(15,23,42,0.88);
    color: rgba(148,163,184,0.9);
    backdrop-filter: blur(4px);
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s;
  }
  .map-options-btn:active {
    background: rgba(15,23,42,0.98);
  }

  .map-options-menu {
    position: absolute;
    inset: auto;
    bottom: calc(100% + 8px);
    left: 0;
    display: none;
    flex-direction: column;
    gap: 8px;
    pointer-events: auto;
  }

  .map-options-wrap.map-options-open .map-options-menu {
    display: flex;
  }

  /* Reset individual absolute positioning — buttons stack in the flex column */
  .map-options-menu .territories-btn,
  .map-options-menu .mode-toggle,
  .map-options-menu .heatmap-btn,
  .map-options-menu .neighborhood-wrap {
    position: static;
    bottom: auto;
    left: auto;
    z-index: auto;
  }
}

.toggle-label-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(148,163,184,0.3);
  background: rgba(15,23,42,0.75);
  color: rgba(148,163,184,0.85);
  letter-spacing: 0.03em;
  backdrop-filter: blur(4px);
  user-select: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.toggle-label-wrap:hover {
  border-color: rgba(148,163,184,0.55);
  color: #e2e8f0;
}
.toggle-label-wrap:has(input:checked) {
  border-color: rgba(59,130,246,0.5);
  color: #3b82f6;
  background: rgba(59,130,246,0.1);
}
.toggle-label-wrap input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }

@media (max-width: 480px) {
  .map-container .mode-btn {
    min-height: 44px;
    padding: 0 14px;
    font-size: 13px;
  }
  .heatmap-btn {
    min-height: 44px;
    padding: 0 14px;
    font-size: 13px;
    bottom: 124px;
  }
  .map-container .mode-toggle {
    bottom: 176px;
  }
  .territories-btn {
    min-height: 44px;
    padding: 0 14px;
    font-size: 13px;
    bottom: 228px;
  }
  .neighborhood-wrap {
    bottom: 72px;
  }
  .toggle-label-wrap {
    min-height: 44px;
    padding: 0 14px;
    font-size: 13px;
  }
}

.toggle-track { display: none; }

.toggle-thumb { display: none; }

.toggle-text {
  font-size: 11px;
  font-weight: 600;
  color: inherit;
}

/* Neighborhood tooltip */
.nb-tooltip {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--text2);
  max-width: 200px;
  box-shadow: 0 4px 20px var(--shadow);
  animation: fade-in 0.3s var(--ease);
}
.nb-tooltip.hidden, .nb-tooltip[hidden] { display: none; }

.nb-tooltip-close {
  align-self: flex-end;
  padding: 3px 10px;
  border-radius: 5px;
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--text);
  font-size: 12px;
  transition: background 0.15s;
}
.nb-tooltip-close:hover { background: var(--bg-hover); }

/* ── Map Legend ────────────────────────────────────────────────────────── */
.map-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 14px;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  width: 160px;
  flex-shrink: 0;
  overflow-y: auto;
  position: relative;
  z-index: 10;
}

.legend-title {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text2);
}

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

/* ── Sync status (inside legend column) ───────────────────────────────── */
.sync-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0 2px;
}

.sync-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  color: var(--text3);
  gap: 4px;
}
.sync-toggle:hover { color: var(--text2); }

.sync-toggle-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sync-chevron {
  flex-shrink: 0;
  transition: transform 0.2s;
}
.sync-toggle[aria-expanded="true"] .sync-chevron {
  transform: rotate(180deg);
}

.sync-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sync-list.hidden { display: none; }

.sync-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sync-item-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sync-source {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--text2);
  line-height: 1.3;
}

.sync-time {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
  line-height: 1.3;
}

/* Warning button next to source name */
.sync-warn-btn {
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
  font-size: 11px;
  cursor: pointer;
  color: #f59e0b;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  transition: opacity 0.15s;
}
.sync-warn-btn:hover { opacity: 0.75; }
.sync-warn-btn.retrying { color: var(--text3); animation: spin 0.8s linear infinite; }

/* Global retry tooltip — appended to body, position:fixed via JS */
.sync-retry-tooltip {
  position: fixed;
  background: #0d1321;
  border: 1px solid #f59e0b;
  border-radius: var(--radius);
  color: #f59e0b;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  white-space: nowrap;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  pointer-events: none;
  transform: translateX(-50%);
}
.sync-retry-tooltip.hidden { display: none; }

/* ── Side Panel ────────────────────────────────────────────────────────── */
.side-panel {
  width: 0;
  overflow: hidden;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.38s var(--spring);
  position: relative;
  z-index: 10;
}

.side-panel.panel-open {
  width: var(--panel-w);
}

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

.panel-status-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.03em;
}

.panel-close-btn {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  font-size: 13px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.panel-close-btn:hover { background: var(--bg3); color: var(--text); }

.panel-body {
  flex: 1;
  overflow-y: auto;
  min-width: var(--panel-w);
}
.panel-body::-webkit-scrollbar { width: 4px; }
.panel-body::-webkit-scrollbar-track { background: transparent; }
.panel-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.panel-export-bar {
  flex-shrink: 0;
  min-width: var(--panel-w);
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.panel-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100%;
  min-height: 200px;
  padding: 40px 20px;
}
.panel-ph-icon { font-size: 36px; color: var(--text3); }
.panel-ph-text { font-size: 14px; color: var(--text3); text-align: center; }

/* Panel lead content (built by panel.js) */
.panel-lead {
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.panel-name {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 8px;
}

.panel-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.panel-category {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text2);
  background: var(--bg3);
  padding: 2px 9px;
  border-radius: 10px;
}

.panel-status-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 10px;
}

.panel-neighborhood {
  font-size: 12px;
  color: var(--text3);
  font-family: var(--mono);
  margin-bottom: 16px;
}

.panel-divider {
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}

.panel-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
}

.panel-field-icon {
  width: 20px;
  flex-shrink: 0;
  text-align: center;
  line-height: 1.5;
  font-size: 14px;
}

.panel-field-val { color: var(--text2); line-height: 1.5; }
.panel-link { color: var(--blue); }
.panel-link:hover { text-decoration: underline; }
.panel-missing { color: var(--text3); font-style: italic; }
.pipeline-val { color: var(--green); font-weight: 600; }

.panel-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.btn-status-update, .btn-call-lead {
  flex: 1;
  min-width: 120px;
  height: 36px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  transition: opacity 0.15s, background 0.15s;
}

.btn-status-update {
  border: 1.5px solid var(--border2);
  background: transparent;
  color: var(--text2);
}
.btn-status-update:hover { background: var(--bg-hover); color: var(--text); }

.btn-call-lead {
  border: none;
  background: var(--blue);
  color: #fff;
}
.btn-call-lead:hover { opacity: 0.88; }

.panel-segment2-note {
  margin-top: 20px;
  padding: 10px 12px;
  background: rgba(59,130,246,0.07);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--text3);
  line-height: 1.5;
}

/* ── Bottom Sheet (mobile) ─────────────────────────────────────────────── */
.sheet-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s;
}
.sheet-overlay.overlay-visible {
  display: block;
  opacity: 1;
}

.bottom-sheet {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 75vh;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-radius: 18px 18px 0 0;
  z-index: 210;
  transform: translateY(100%);
  transition: transform 0.38s var(--spring);
  overflow: hidden;
  flex-direction: column;
}
.bottom-sheet.sheet-open {
  display: flex;
  transform: translateY(0);
}

.sheet-handle {
  width: 36px; height: 4px;
  border-radius: 2px;
  background: var(--border2);
  margin: 10px auto 6px;
  flex-shrink: 0;
}

.sheet-close-btn {
  display: none;
}

.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 4px;
}
.sheet-body::-webkit-scrollbar { width: 4px; }
.sheet-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn-primary {
  height: 38px;
  padding: 0 20px;
  border-radius: var(--radius);
  border: none;
  background: var(--blue);
  color: #fff;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  transition: opacity 0.15s;
  pointer-events: all;
}
.btn-primary:hover { opacity: 0.88; }

/* ── Toast notifications ───────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 340px;
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px var(--shadow);
  font-size: 13.5px;
  color: var(--text);
  pointer-events: all;
  transform: translateX(calc(100% + 30px));
  opacity: 0;
  transition: transform 0.35s var(--spring), opacity 0.3s;
  border-left-width: 3px;
}
.toast.toast-visible { transform: translateX(0); opacity: 1; }
.toast.toast-hiding  { transform: translateX(calc(100% + 30px)); opacity: 0; }

.toast-info    { border-left-color: var(--blue);   }
.toast-success { border-left-color: var(--green);  }
.toast-warning { border-left-color: var(--yellow); }
.toast-error   { border-left-color: var(--red);    }

.toast-msg { flex: 1; line-height: 1.4; }

.toast-dismiss {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent;
  color: var(--text3);
  font-size: 12px;
  flex-shrink: 0;
  border-radius: 4px;
  transition: background 0.15s;
}
.toast-dismiss:hover { background: var(--bg3); color: var(--text); }

/* ── Animations ────────────────────────────────────────────────────────── */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Scrollbar (global) ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border2); }

/* ── Focus visible ─────────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

/* ── Radar mode — toolbar accent ───────────────────────────────────────── */
[data-mode="radar"] .mode-btn[data-mode="radar"].active {
  color: var(--yellow);
}

/* ── Responsive / Mobile ───────────────────────────────────────────────── */
@media (max-width: 767px) {

  :root {
    --header-h:  50px;
    --stats-h:   40px;
    --toolbar-h: 48px;
  }

  .app-name { font-size: 17px; }

  .territory-tag { display: none; }

  .territory-badge { padding: 4px 10px; }

  .stats-row { padding: 0 12px; gap: 0; }
  .stat { padding: 0 10px; }
  .stat-val { font-size: 14px; }

  .toolbar { padding: 0 10px; gap: 8px; }

  .filter-pill { height: 28px; padding: 0 9px; font-size: 12px; }
  .fp-red::before, .fp-orange::before, .fp-purple::before,
  .fp-yellow::before, .fp-green::before,
  .fp-teal::before, .fp-pink::before { display: none; }

  /* Hide legend on mobile — bottom sheet provides context */
  .map-legend { display: none; }

  /* Side panel hidden on mobile — use bottom sheet */
  .side-panel { display: none; }

  .bottom-sheet { display: flex; }

  .sheet-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 8px;
    right: 10px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    background: transparent;
    border: none;
    color: var(--text2);
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
  }
  .sheet-close-btn:active { background: rgba(255,255,255,0.06); }

  .toast-container { bottom: 16px; right: 12px; left: 12px; max-width: none; }
}

@media (max-width: 479px) {
  .stats-row { gap: 0; }
  .stat { padding: 0 8px; }
  .stat-div { display: none; }

  .toolbar-right { gap: 6px; }
  .mode-btn { padding: 0 8px; font-size: 11.5px; }
}

@media (max-width: 480px) {

  /* ── Body (outermost container) ── */
  body {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
  }

  /* ── Header ── */
  #user-email          { display: none; }
  #logout-btn          { display: none; }
  #user-territory-pill { display: none; }
  #territory-badge     { display: none; }
  .territory-badge     { display: none; }
  #admin-badge         { display: none; }
  .admin-badge         { display: none; }

  .app-subtitle { display: none; }

  .app-header   { flex-wrap: nowrap; overflow: hidden; justify-content: space-between; width: 100%; max-width: 100%; }
  .logo-wrap    { flex-shrink: 0; }
  .header-right { flex-shrink: 0; overflow: visible; }

  /* ── Stats row — horizontal scroll on mobile ── */
  .stats-row { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }

  /* ── Toolbar — two-row stacked layout ── */
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    overflow: hidden;
    padding: 6px 10px;
    gap: 0;
  }

  .filter-group {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    width: 100%;
    padding: 5px 0;
    gap: 6px;
  }
  .filter-group > * { white-space: nowrap; flex-shrink: 0; }
  .filter-group::-webkit-scrollbar { display: none; }

  .toolbar-right {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    margin-left: 0;
    width: 100%;
    padding: 5px 0;
    gap: 8px;
  }
  .toolbar-right > * { white-space: nowrap; flex-shrink: 0; }
  .toolbar-right::-webkit-scrollbar { display: none; }
}

/* ── Reduced motion ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .sonar-ring { display: none; }
}

/* ── Offline banner ────────────────────────────────────────────────────── */
.offline-banner {
  background: #78350f;
  color: #fef3c7;
  text-align: center;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 7px 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 150;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEGMENT 2 — Full Panel Components
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Panel root ─────────────────────────────────────────────────────────── */
.p2 {
  padding: 20px 18px 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

/* ── Top block ──────────────────────────────────────────────────────────── */
.p2-top { margin-bottom: 4px; }

.p2-name {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 8px;
}

.p2-chips {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.p2-cat {
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  background: var(--bg3);
  padding: 2px 9px;
  border-radius: 10px;
}

.p2-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 10px;
  letter-spacing: 0.04em;
}

.p2-social-gap {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.p2-sg-opp  { color: #ec4899; background: rgba(236,72,153,0.12); border: 1px solid rgba(236,72,153,0.25); }
.p2-sg-none { color: #9ca3af; background: rgba(156,163,175,0.10); border: 1px solid rgba(156,163,175,0.20); }

.p2-hood {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text3);
  margin-bottom: 4px;
}
.p2-source {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
  opacity: 0.7;
  margin-bottom: 14px;
}

/* ── Intelligence Summary card ──────────────────────────────────────────── */
.p2-intel-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg2);
  margin-bottom: 8px;
}

.p2-intel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.p2-intel-header::-webkit-details-marker { display: none; }

.p2-intel-title {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  flex-shrink: 0;
}

.p2-intel-signals {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.p2-intel-sig {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 13px;
  line-height: 1;
}

.p2-sig-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.p2-intel-chevron {
  font-size: 12px;
  color: var(--text3);
  transition: transform 0.2s var(--ease);
  flex-shrink: 0;
}
.p2-intel-card[open] .p2-intel-chevron { transform: rotate(180deg); }

.p2-intel-body {
  border-top: 1px solid var(--border);
  padding: 8px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.p2-intel-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text2);
  line-height: 1.4;
}

.p2-intel-ico {
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Opportunity Score ──────────────────────────────────────────────────── */
.p2-opp-score-wrap {
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.p2-opp-score-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.p2-opp-score-num {
  font-family: var(--mono);
  font-size: 48px;
  font-weight: 600;
  line-height: 1;
}

@media (max-width: 480px) {
  .p2-opp-score-num { font-size: 30px; }
}

.p2-opp-score-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 10px;
}

.p2-opp-bar-track {
  height: 6px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
}

.p2-opp-score-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.9s var(--spring);
}

/* ── Outreach Readiness ─────────────────────────────────────────────────── */
.p2-outreach-wrap {
  padding: 8px 0 12px;
  border-bottom: 1px solid var(--border);
}

.p2-outreach-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 10px;
  margin-bottom: 6px;
}

.p2-outreach-ready         { color: #10b981; background: rgba(16,185,129,0.14); }
.p2-outreach-not-ready     { color: #f43f5e; background: rgba(244,63,94,0.14);  }
.p2-outreach-needs-research { color: #6b7280; background: rgba(107,114,128,0.14); }

.p2-outreach-reason {
  font-size: 11.5px;
  color: var(--text3);
  line-height: 1.4;
}

/* ── Competitor Proximity ───────────────────────────────────────────────── */
.p2-comp-empty {
  font-size: 11.5px;
  color: var(--text3);
  font-style: italic;
}

.p2-comp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}
.p2-comp-row:last-child { border-bottom: none; }

.p2-comp-name {
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.p2-comp-dist {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text3);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 8px;
}

.p2-seasonal-banner {
  font-size: 11px;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245,158,11,0.10);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 6px;
  padding: 4px 10px;
  margin-top: 4px;
  letter-spacing: 0.02em;
}

.p2-growth-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.p2-growth-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 10px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  color: #f59e0b;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.28);
}

/* ── Sections ───────────────────────────────────────────────────────────── */
.p2-section {
  border-top: 1px solid var(--border);
  padding: 14px 0 2px;
  margin-bottom: 4px;
}

.p2-sec-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.p2-sec-title {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  display: block;
  margin-bottom: 10px;
}

.p2-sec-hd .p2-sec-title { margin-bottom: 0; }

/* ── Health score ───────────────────────────────────────────────────────── */
.p2-health-num {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
}
.p2-health-sub {
  font-size: 13px;
  color: var(--text3);
  font-weight: 400;
}

.p2-bar-wrap {
  height: 7px;
  background: var(--bg3);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}
.p2-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.9s var(--spring);
}

.p2-gaps {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.p2-gap {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  padding: 4px 8px;
  border-radius: 6px;
}
.p2-gap-ok       { background: rgba(16,185,129,0.07); }
.p2-gap-med      { background: rgba(251,191,36,0.07); }
.p2-gap-high     { background: rgba(251,146,60,0.09); }
.p2-gap-critical { background: rgba(244,63,94,0.09);  }

.p2-gap-icon {
  font-size: 11px;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}
.p2-gap-ok       .p2-gap-icon { color: var(--green);  }
.p2-gap-med      .p2-gap-icon { color: var(--yellow); }
.p2-gap-high     .p2-gap-icon { color: var(--orange); }
.p2-gap-critical .p2-gap-icon { color: var(--red);    }

.p2-gap-lbl {
  font-weight: 500;
  color: var(--text);
  flex: 1;
}
.p2-gap-detail {
  font-size: 11.5px;
  color: var(--text3);
  white-space: nowrap;
}

/* ── GBP Audit ──────────────────────────────────────────────────────────── */
.p2-gbp-audit {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.p2-gbp-ring {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
}

.p2-gbp-recs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}

.p2-gbp-rec {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text2);
  line-height: 1.45;
}

.p2-gbp-arr {
  color: var(--blue);
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 1px;
}

.p2-gbp-clear {
  font-size: 11.5px;
  color: var(--green);
  font-style: italic;
  padding-top: 4px;
}

/* ── Review Monitor ────────────────────────────────────────────────────── */
.p2-review-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.p2-review-count {
  font-family: var(--mono);
  font-size: 38px;
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

@media (max-width: 480px) {
  .p2-review-count { font-size: 26px; }
}

.p2-review-label {
  font-size: 12px;
  color: var(--text3);
  font-weight: 400;
}

.p2-review-trend {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.p2-review-rec {
  font-size: 11.5px;
  color: var(--text2);
  line-height: 1.5;
}

/* ── Status row ─────────────────────────────────────────────────────────── */
.p2-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.p2-status-chip {
  font-size: 12.5px;
  font-weight: 600;
  padding: 3px 11px;
  border-radius: 12px;
}
.p2-status-toggle {
  font-size: 12px;
  color: var(--text3);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 9px;
  transition: border-color 0.15s, color 0.15s;
}
.p2-status-toggle:hover { border-color: var(--border2); color: var(--text2); }

/* Status button grid */
.p2-sbtns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 4px;
}
.p2-sbtns-edit { margin-top: 6px; }

.p2-sbtn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 7px;
  border: 1.5px solid transparent;
  background: var(--bg3);
  color: var(--text2);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  cursor: pointer;
}
.p2-sbtn:hover  { border-color: var(--sc); color: var(--text); }
.p2-sbtn-on     { border-color: var(--sc) !important; color: var(--text) !important; }

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

/* ── Pipeline stage pills ───────────────────────────────────────────────── */
.p2-pipeline-stages {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}
.p2-stage-pill {
  flex: 1;
  padding: 6px 4px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--bg3);
  color: var(--text3);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.p2-stage-pill:hover {
  border-color: var(--blue);
  color: var(--text);
}
.p2-stage-pill-on {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(59,130,246,0.1);
}

@media (max-width: 480px) {
  .p2-pipeline-stages { flex-wrap: wrap; }
  .p2-stage-pill { flex: 1 1 calc(50% - 3px); font-size: 10.5px; }
}

/* ── Contact fields ─────────────────────────────────────────────────────── */
.p2-fields { display: flex; flex-direction: column; gap: 9px; }

.p2-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
}
.p2-fi { width: 20px; text-align: center; flex-shrink: 0; line-height: 1.5; }
.p2-fv { color: var(--text2); line-height: 1.5; }
.p2-link { color: var(--blue); }
.p2-link:hover { text-decoration: underline; }
.p2-missing { color: var(--text3); font-style: italic; }
.p2-pipeline { color: var(--text3); }
.p2-pipeline-on { color: var(--green); font-weight: 600; }

/* ── Follow-up ──────────────────────────────────────────────────────────── */
.p2-fu-set {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text2);
  background: var(--bg3);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
}
.p2-fu-set.p2-overdue { background: rgba(244,63,94,0.1); color: var(--red); }

.p2-fu-clear {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text3);
  font-size: 12px;
  padding: 2px 5px;
  border-radius: 4px;
  transition: background 0.15s;
}
.p2-fu-clear:hover { background: var(--bg-hover); color: var(--text); }

@media (max-width: 480px) {
  .p2-fu-clear {
    min-height: 44px;
    min-width: 44px;
    padding: 0 12px;
    font-size: 13px;
  }
}

.p2-date-input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text2);
  font-family: var(--sans);
  font-size: 13px;
  margin-bottom: 10px;
  transition: border-color 0.15s;
}
.p2-date-input:focus { outline: none; border-color: var(--blue); color: var(--text); }

/* ── Win / Loss ─────────────────────────────────────────────────────────── */
.p2-wl { display: flex; gap: 8px; }

.p2-wl-btn {
  flex: 1;
  height: 34px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: transparent;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text2);
  transition: all 0.15s;
}
.p2-win:hover  { border-color: var(--green); color: var(--green); }
.p2-loss:hover { border-color: var(--red);   color: var(--red);   }

.p2-wl-won  { background: rgba(16,185,129,0.12) !important; border-color: var(--green) !important; color: var(--green) !important; }
.p2-wl-lost { background: rgba(244,63,94,0.12)  !important; border-color: var(--red)   !important; color: var(--red)   !important; }

/* ── Notes ──────────────────────────────────────────────────────────────── */
.p2-note-add {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.p2-note-ta {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  resize: none;
  line-height: 1.5;
  transition: border-color 0.15s;
}
.p2-note-ta:focus { outline: none; border-color: var(--blue); }
.p2-note-ta::placeholder { color: var(--text3); }

.p2-note-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 7px;
  border: none;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.p2-note-btn:hover { opacity: 0.85; }

/* ── Persistent lead note ───────────────────────────────────────────────── */
.p2-pnote-ta {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  padding: 8px 10px;
  resize: vertical;
  display: block;
  margin-bottom: 8px;
  transition: border-color 0.15s;
}
.p2-pnote-ta:focus         { outline: none; border-color: var(--blue); }
.p2-pnote-ta::placeholder  { color: var(--text3); }

.p2-pnote-save {
  height: 30px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text2);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.p2-pnote-save:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ── Persistent reminder ────────────────────────────────────────────────── */
.p2-reminder-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.p2-reminder-input {
  flex: 1;
  height: 30px;
  padding: 0 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  transition: border-color 0.15s;
}
.p2-reminder-input:focus        { outline: none; border-color: var(--blue); }
.p2-reminder-input::-webkit-calendar-picker-indicator { filter: invert(0.5); cursor: pointer; }

.p2-reminder-save {
  height: 30px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text2);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.p2-reminder-save:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

.p2-notes-list { display: flex; flex-direction: column; gap: 8px; }

.p2-notes-empty { font-size: 13px; color: var(--text3); padding: 4px 0; }

.p2-note-item {
  background: var(--bg3);
  border-radius: 8px;
  padding: 9px 12px;
  border-left: 2px solid var(--border2);
}
.p2-note-text { font-size: 13.5px; color: var(--text); line-height: 1.5; margin-bottom: 4px; }
.p2-note-ts { font-family: var(--mono); font-size: 11px; color: var(--text3); }

/* ── Activity log ───────────────────────────────────────────────────────── */
.p2-activity { display: flex; flex-direction: column; gap: 0; }

.p2-act-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.p2-act-item:last-child { border-bottom: none; }

.p2-act-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
  margin-top: 5px;
}
.p2-act-txt { flex: 1; color: var(--text2); line-height: 1.4; }
.p2-act-ts  { font-family: var(--mono); font-size: 11px; color: var(--text3); white-space: nowrap; padding-top: 2px; }

/* ── Footer actions ─────────────────────────────────────────────────────── */
.p2-footer {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.p2-edit-btn {
  flex: 1;
  height: 38px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border2);
  background: transparent;
  color: var(--text2);
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s;
}
.p2-edit-btn:hover { border-color: var(--blue); color: var(--blue); background: rgba(59,130,246,0.06); }

.p2-call-btn {
  height: 38px;
  padding: 0 18px;
  border-radius: var(--radius);
  border: none;
  background: var(--blue);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  transition: opacity 0.15s;
}
.p2-call-btn:hover { opacity: 0.85; }

.p2-print-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border2);
  background: transparent;
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.p2-print-btn:hover { border-color: var(--text3); color: var(--text); background: var(--bg3); }

kbd {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--border2);
  background: var(--bg3);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text3);
  line-height: 1.6;
  vertical-align: middle;
}

/* ── Edit mode ──────────────────────────────────────────────────────────── */
.p2-edit-fields { display: flex; flex-direction: column; gap: 12px; }

.p2-ef-row { display: flex; flex-direction: column; gap: 4px; }

.p2-ef-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.p2-ef-input, .p2-ef-select {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13.5px;
  transition: border-color 0.15s;
}
.p2-ef-input:focus, .p2-ef-select:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--bg-hover);
}
.p2-ef-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
}
.p2-ef-select option { background: var(--bg2); color: var(--text); }

.p2-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.p2-cancel-btn {
  flex: 1;
  height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s;
}
.p2-cancel-btn:hover { background: var(--bg-hover); }

.p2-save-btn {
  flex: 2;
  height: 40px;
  border-radius: var(--radius);
  border: none;
  background: var(--blue);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.15s;
}
.p2-save-btn:hover { opacity: 0.88; }

/* ── Mobile overrides ───────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .p2 { padding: 16px 14px 28px; }
  .p2-name { font-size: 19px; }
  .p2-sbtns { grid-template-columns: 1fr 1fr; }
  .p2-footer { flex-direction: column; }
  .p2-edit-btn, .p2-call-btn, .p2-print-btn { width: 100%; }
}

@media (max-width: 480px) {
  .p2-edit-btn, .p2-call-btn, .p2-print-btn { height: 34px; font-size: 13px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEGMENT 3 — Google Maps
   ═══════════════════════════════════════════════════════════════════════════ */

/* flex: 1 fills .map-container without relying on position:absolute,
   which Google Maps overrides with an inline position:relative on init */
#google-map {
  flex: 1;
  min-height: 0;
  width: 100%;
}

/* Scan button */
.btn-scan {
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: none;
  background: var(--blue);
  color: #fff;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.btn-scan:hover    { opacity: 0.85; }
.btn-scan:disabled { opacity: 0.5; cursor: not-allowed; }

/* Refresh Now button + wrapper */
.refresh-wrap {
  position: relative;
  flex-shrink: 0;
}

.btn-refresh {
  height: 32px;
  padding: 0 13px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.btn-refresh:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--border2);
  background: var(--surface2);
}
.btn-refresh:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.refresh-icon { flex-shrink: 0; }

@keyframes spin { to { transform: rotate(360deg); } }
.btn-refresh.refreshing .refresh-icon { animation: spin 0.7s linear infinite; }

.refresh-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0d1321;
  border: 1px solid #1a2535;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 11.5px;
  line-height: 1.4;
  padding: 7px 11px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  z-index: 200;
  pointer-events: none;
}
.refresh-tooltip::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: #1a2535;
}
.refresh-tooltip.hidden { display: none; }

/* Add Lead button */
.btn-add-lead {
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.btn-add-lead:hover { background: var(--surface3); border-color: var(--border2); }

.route-btn-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.btn-route {
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(59,130,246,0.45);
  background: rgba(59,130,246,0.12);
  color: #60a5fa;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-route:hover { background: rgba(59,130,246,0.2); border-color: rgba(59,130,246,0.65); }
.route-dropdown-wrap { position: relative; }
.btn-route-menu {
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(59,130,246,0.45);
  background: rgba(59,130,246,0.12);
  color: #60a5fa;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-route-menu:hover { background: rgba(59,130,246,0.2); border-color: rgba(59,130,246,0.65); }
.route-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(148,163,184,0.2);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  min-width: 180px;
  z-index: 1000;
  overflow: hidden;
}
.route-dropdown.hidden { display: none; }
.route-dropdown-item {
  display: block;
  width: 100%;
  padding: 9px 14px;
  background: none;
  border: none;
  color: rgba(148,163,184,0.9);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.route-dropdown-item:hover { background: rgba(148,163,184,0.08); color: #e2e8f0; }
.route-dropdown-item--danger { color: #f87171; }
.route-dropdown-item--danger:hover { background: rgba(244,63,94,0.1); color: #fca5a5; }

.outreach-badge {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 11px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text3);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
  margin-left: auto;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.outreach-badge[data-count]:not([data-count="0"]) {
  color: var(--green);
  border-color: rgba(16,185,129,0.3);
  background: rgba(16,185,129,0.08);
}

.btn-export-csv {
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text2);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-export-csv:hover { background: var(--surface3); border-color: var(--border2); color: var(--text); }

/* ── Modal backdrop + box ──────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop.hidden { display: none; }

.modal-box {
  background: #0d1321;
  border: 1px solid #1a2535;
  border-radius: calc(var(--radius) * 2);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 32px 80px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 501;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #1a2535;
  border-radius: calc(var(--radius) * 2) calc(var(--radius) * 2) 0 0;
  background: #0d1321;
  flex-shrink: 0;
}
.modal-title {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.modal-close-btn:hover { color: var(--text); background: var(--surface2); }

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #0d1321;
}

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

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.modal-field.full { grid-column: 1 / -1; }

.modal-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.modal-input,
.modal-select,
.modal-textarea {
  background: #111827;
  border: 1px solid #1a2535;
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  padding: 7px 10px;
  width: 100%;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.modal-input:focus,
.modal-select:focus,
.modal-textarea:focus {
  outline: none;
  border-color: var(--blue);
}
.modal-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
.modal-textarea { resize: vertical; min-height: 72px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid #1a2535;
  border-radius: 0 0 calc(var(--radius) * 2) calc(var(--radius) * 2);
  background: #0d1321;
  flex-shrink: 0;
}
.modal-btn-cancel {
  height: 34px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.modal-btn-cancel:hover { color: var(--text); background: var(--surface3); }
.modal-btn-save {
  height: 34px;
  padding: 0 18px;
  border-radius: var(--radius);
  border: none;
  background: var(--blue);
  color: #fff;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.modal-btn-save:hover { opacity: 0.85; }

@media (max-width: 480px) {
  .modal-box {
    padding: 0;
    border-radius: var(--radius);
    max-height: 92vh;
  }
  .modal-body {
    padding: 14px 16px;
    gap: 12px;
  }
  .modal-header {
    padding: 14px 16px 12px;
  }
  .modal-footer {
    padding: 12px 16px 16px;
  }
  .modal-row {
    grid-template-columns: 1fr;
  }
  .modal-input,
  .modal-select,
  .modal-textarea {
    width: 100%;
    min-height: 44px;
    font-size: 16px;
  }
  .modal-btn-cancel,
  .modal-btn-save {
    min-height: 44px;
    height: auto;
    padding: 0 18px;
  }
}

/* ── Call History ─────────────────────────────────────────────────────────── */
.p2-call-history {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.p2-call-empty {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text3);
}

.p2-call-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid;
}

.p2-call-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.p2-call-body {
  flex: 1;
  min-width: 0;
}

.p2-call-outcome {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
}

.p2-call-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
  margin-top: 2px;
}

.p2-call-badge {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 5px;
  color: var(--text3);
  flex-shrink: 0;
}

/* ── Best time to call indicator ─────────────────────────────────────────── */
.p2-best-time {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px 4px 6px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text3);
  margin: 2px 0 4px;
  width: fit-content;
  line-height: 1.3;
}

.p2-best-time-now {
  background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.3);
  color: #10b981;
}

.p2-btc-icon { flex-shrink: 0; }

/* ── AI Call button (panel phone row) ────────────────────────────────────── */
.p2-field-phone {
  align-items: center;
  gap: 6px;
}

.p2-ai-call-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 9px;
  border-radius: 12px;
  border: none;
  background: #3b82f6;
  color: #fff;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
  transition: opacity 0.15s, transform 0.1s;
}
.p2-ai-call-btn:hover  { opacity: 0.88; }
.p2-ai-call-btn:active { transform: scale(0.96); }

@media (max-width: 480px) {
  .p2-ai-call-btn {
    height: 44px;
    padding: 0 16px;
    font-size: 13px;
    border-radius: 8px;
  }
}

/* ── AI Call modal overrides ──────────────────────────────────────────────── */
.ai-call-box { max-width: 560px; }

.ai-call-header-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-call-header-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-call-usage-line {
  font-family: var(--mono);
  font-size: 11px;
  color: #6b7a99;
  letter-spacing: 0.02em;
}

.ai-call-badge {
  background: #3b82f6;
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}

.ai-call-body { gap: 14px; }

/* DNC registry check */
.ai-dnc {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
}

.ai-dnc-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.4;
}
.ai-dnc-row[hidden] { display: none; }

.ai-dnc-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--text3);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.ai-dnc-clear {
  color: #10b981;
}
.ai-dnc-clear svg { stroke: #10b981; flex-shrink: 0; }

.ai-dnc-flagged {
  color: #f43f5e;
}
.ai-dnc-flagged svg { stroke: #f43f5e; flex-shrink: 0; }

/* TCPA compliance block */
.ai-compliance {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-compliance-warn {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.5;
  color: #f59e0b;
}
.ai-compliance-warn svg { flex-shrink: 0; margin-top: 1px; }
.ai-compliance-warn[hidden] { display: none; }

.ai-tcpa-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text2);
  transition: border-color 0.15s, background 0.15s;
}
.ai-tcpa-label:hover { border-color: var(--border2); background: rgba(255,255,255,0.05); }

.ai-tcpa-check {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #3b82f6;
  cursor: pointer;
}

.modal-btn-ai-confirm:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── AI Call in Progress screen ───────────────────────────────────────────── */
.ai-progress-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 52px 32px;
  background: #0d1321;
  border-radius: calc(var(--radius) * 2);
}

.ai-pulse-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes ai-pulse {
  0%   { transform: scale(1);   opacity: 0.5; }
  100% { transform: scale(2.2); opacity: 0; }
}

.ai-pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #3b82f6;
  animation: ai-pulse 2s ease-out infinite;
}
.ai-pulse-ring.r2 { animation-delay: 0.65s; }
.ai-pulse-ring.r3 { animation-delay: 1.3s;  }

.ai-pulse-core {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  position: relative;
  z-index: 1;
}

.ai-progress-label {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

.ai-progress-biz {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text3);
}

/* ── Call Outcome screen ──────────────────────────────────────────────────── */
.ai-outcome-body {
  padding: 20px 20px 24px;
  background: #0d1321;
  border-radius: 0 0 calc(var(--radius) * 2) calc(var(--radius) * 2);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-outcome-biz {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text3);
  text-align: center;
}

.ai-outcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ai-outcome-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  border-radius: calc(var(--radius) * 1.5);
  border: 1px solid transparent;
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  transition: transform 0.12s, opacity 0.12s;
}
.ai-outcome-btn:hover  { opacity: 0.85; transform: translateY(-1px); }
.ai-outcome-btn:active { transform: scale(0.97); }

.ai-outcome-icon {
  font-size: 20px;
  line-height: 1;
}

.ai-outcome-lbl {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
}

.ai-outcome-interested {
  border-color: rgba(16,185,129,0.3);
  background: rgba(16,185,129,0.08);
  color: #10b981;
}
.ai-outcome-not-interested {
  border-color: rgba(244,63,94,0.3);
  background: rgba(244,63,94,0.08);
  color: #f43f5e;
}
.ai-outcome-voicemail {
  border-color: rgba(251,191,36,0.3);
  background: rgba(251,191,36,0.08);
  color: #fbbf24;
}
.ai-outcome-no-answer {
  border-color: rgba(156,163,175,0.3);
  background: rgba(156,163,175,0.06);
  color: #9ca3af;
}

.ai-call-meta {
  background: rgba(59,130,246,0.07);
  border: 1px solid rgba(59,130,246,0.18);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-call-meta-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ai-call-meta-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3b82f6;
  flex-shrink: 0;
  width: 54px;
}

.ai-call-meta-val {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.ai-call-script-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-call-script-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
}

.ai-call-script {
  background: #070d18;
  border: 1px solid #1a2535;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text2);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  max-height: 280px;
  overflow-y: auto;
}

.ai-call-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--text3);
  line-height: 1.5;
}
.ai-call-note svg { flex-shrink: 0; margin-top: 2px; }

.modal-btn-ai-confirm {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 18px;
  border-radius: var(--radius);
  border: none;
  background: #3b82f6;
  color: #fff;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.modal-btn-ai-confirm:hover { opacity: 0.85; }

/* ── Welcome Modal ──────────────────────────────────────────────────────── */
.wm-box {
  max-width: 460px;
  padding: 40px 36px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}
.wm-logo {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--blue);
  letter-spacing: -0.01em;
}
.wm-taglines {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.wm-tagline-1 {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.wm-tagline-2 {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.55;
}
.wm-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  text-align: left;
}
.wm-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 15px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.wm-feat-icon {
  font-size: 17px;
  color: var(--blue);
  flex-shrink: 0;
  margin-top: 1px;
  line-height: 1;
}
.wm-feat-title {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}
.wm-feat-desc {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text2);
  line-height: 1.5;
}
.wm-cta {
  width: 100%;
  padding: 13px;
  border-radius: var(--radius);
  border: none;
  background: var(--blue);
  color: #ffffff;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.wm-cta:hover { opacity: 0.88; }

/* ── Settings Drawer ────────────────────────────────────────────────────── */
.settings-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 300;
}
.settings-overlay.settings-overlay-on { display: block; }

.settings-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 300px;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  z-index: 301;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s var(--ease);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.45);
}
.settings-drawer.settings-open { transform: translateX(0); }

@media (max-width: 480px) {
  .settings-drawer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100%;
    border-left: none;
    border-radius: 0;
    box-shadow: none;
  }
}

.settings-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.settings-title {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
}
.settings-close {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 7px;
  border-radius: var(--radius);
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.settings-close:hover { color: var(--text); background: var(--bg3); }

.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.settings-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.settings-lbl {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
}
.settings-input {
  width: 100%;
  padding: 8px 11px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13.5px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.settings-input:focus { border-color: var(--blue); }
.settings-input::placeholder { color: var(--text3); }

.st-toggle-row {
  display: flex;
  gap: 6px;
}
.st-toggle-btn {
  flex: 1;
  padding: 7px 8px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--bg3);
  color: var(--text2);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.st-toggle-btn:hover { border-color: var(--blue); color: var(--text); }
.st-toggle-btn.st-toggle-on {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(59, 130, 246, 0.1);
}

.btn-settings {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.btn-settings:hover {
  color: var(--text);
  border-color: var(--border2);
  background: var(--bg-hover);
}

/* Compass overlay — bottom-right of map, Radar Mode only */
#compass-canvas {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 80px;
  height: 80px;
  z-index: 10;
  display: none;
  pointer-events: none;
}

/* ── auth.html — 2FA checkbox ───────────────────────────────────────────── */
.twofa-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.twofa-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}
.twofa-checkbox {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: #3b82f6;
  cursor: pointer;
}
.twofa-rec {
  color: #546a8a;
  font-size: 12px;
}
.twofa-note {
  font-size: 12px;
  color: #60a5fa;
  padding: 8px 12px;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 6px;
  line-height: 1.4;
}

