/* ── BASE ──────────────────────────────────────────────── */

*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}

html,body{height:100%;overflow:hidden;background:var(--bg);font-family:Calibri,'Trebuchet MS',sans-serif;font-size:14px;color:var(--text)}

button,input,select,textarea{font-family:inherit;font-size:inherit;color:inherit;outline:none;-webkit-appearance:none;cursor:pointer}

/* ── ACCESS GATE ───────────────────────────────────────── */

.accessScreen{position:fixed;inset:0;z-index:9000;background:linear-gradient(160deg,#0f172a,#1e3a8a);display:flex;align-items:center;justify-content:center;padding:20px}

.accessCard{width:100%;max-width:380px;background:#fff;border-radius:24px;padding:32px 24px;box-shadow:0 24px 60px rgba(0,0,0,.4);text-align:center}

.accessLogo{font-size:22px;font-weight:900;letter-spacing:.12em;color:var(--blue);margin-bottom:4px}

.accessTagline{font-size:12px;color:var(--muted);font-weight:700;letter-spacing:.08em;text-transform:uppercase;margin-bottom:24px}

.accessInstructions{font-size:14px;color:#475569;margin-bottom:16px}

.accessInput{width:100%;height:52px;border:2px solid var(--line);border-radius:14px;padding:0 16px;font-size:20px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;text-align:center;margin-bottom:12px;background:var(--soft)}

.accessInput:focus{border-color:var(--blue)}

.accessButton{width:100%;height:52px;background:var(--blue);color:#fff;border:0;border-radius:14px;font-size:16px;font-weight:900;letter-spacing:.08em;margin-bottom:12px}

.accessError{font-size:13px;color:var(--red);font-weight:700;min-height:18px}

/* ── APP SHELL ─────────────────────────────────────────── */

#appShell{display:flex;flex-direction:column;height:100dvh;padding-top:var(--safe-top);overflow:hidden}

.syncPill{}

/* ── MAP ───────────────────────────────────────────────── */

#mapStage{flex:1;position:relative;overflow:hidden}

#map{width:100%;height:100%}

.gpsBanner{position:absolute;top:0;left:0;right:0;z-index:800;background:rgba(220,38,38,.94);color:#fff;text-align:center;padding:8px;font-weight:900;font-size:13px}

.zoomButton{position:absolute;right:12px;z-index:800;width:42px;height:42px;background:#fff;border:1px solid var(--line);border-radius:11px;font-size:22px;font-weight:300;box-shadow:var(--shadow);display:flex;align-items:center;justify-content:center}

.zoomIn{top:12px}

.zoomOut{top:62px}

.satToggle{top:112px;font-size:18px}
.satToggle.active{background:var(--accent);color:#fff}

#batteryBanner{top:0}

.fieldButton span{font-size:30px;line-height:1}

@media(max-height:680px){.fieldButton span{font-size:23px}.fieldButton b{font-size:10px}}

/* ── SHEET ─────────────────────────────────────────────── */

.sheet{position:fixed;left:0;right:0;bottom:0;z-index:2000;background:#fff;border-radius:20px 20px 0 0;box-shadow:0 -10px 36px rgba(15,23,42,.24);transform:translateY(110%);transition:transform .22s ease;max-height:92dvh;padding-bottom:var(--safe-bottom)}

.sheet.open{transform:translateY(0)}

.sheetBody{padding:0 13px 16px;overflow:auto;max-height:calc(92dvh - 22px)}

.sheetTitleRow h2{font-size:20px;line-height:1.15;margin:0 0 2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:76vw}

.sheetTitleRow p{margin:0;color:var(--muted);font-size:12px}

.iconButton{margin-left:auto;border:0;background:#fee2e2;color:var(--red);border-radius:10px;width:42px;height:38px;font-size:28px;font-weight:900}

.iconButton.small{width:36px;height:36px;font-size:22px;background:var(--soft);color:var(--muted)}

/* ── STATUS BUTTONS ────────────────────────────────────── */

.statusGrid{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;margin-bottom:8px}

.statusButton{height:62px;border:2px solid var(--line);border-radius:11px;background:var(--soft);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}

.statusButton span{font-size:20px}

.statusButton b{font-size:9px}

.statusButton.deal{border-color:#d97706}

.statusButton.hotlead{border-color:#e11d48}

.statusButton.noanswer{border-color:#16a34a}

.statusButton.no{border-color:#dc2626}

.statusButton.dnk{border-color:#111827}

.statusButton.selected.deal{background:#d97706;color:#fff;border-color:#d97706}

.statusButton.selected.hotlead{background:#e11d48;color:#fff;border-color:#e11d48}

.statusButton.selected.noanswer{background:#16a34a;color:#fff;border-color:#16a34a}

.statusButton.selected.no{background:#dc2626;color:#fff;border-color:#dc2626}

.statusButton.selected.dnk{background:#111827;color:#fff;border-color:#111827}

/* ── INPUTS ────────────────────────────────────────────── */

textarea,input,select{width:100%;border:1.5px solid var(--line);border-radius:11px;background:var(--soft);padding:10px;color:var(--text)}

textarea{resize:none;margin-bottom:7px}

.compactGrid{display:grid;gap:7px;margin-bottom:7px}

.compactGrid.two{grid-template-columns:1fr 1fr}

.plateGrid{grid-template-columns:2fr 1fr}

/* ── SHEET ACTIONS ─────────────────────────────────────── */

.sheetActions{display:grid;grid-template-columns:1fr 1fr 1fr;gap:7px;margin-top:8px}

.actionButton{height:46px;border:1px solid var(--line);border-radius:12px;background:var(--soft);font-weight:900;font-size:13px}

.actionButton.save{background:var(--blue);border-color:var(--blue);color:#fff;grid-column:1/-1}

.actionButton.navigate{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}

.actionButton.danger{background:#fff1f2;border-color:#fecdd3;color:var(--red)}

.conflictBadge{margin:7px 0;padding:8px 11px;background:#fef3c7;border:1px solid #fcd34d;border-radius:10px;font-size:12px;font-weight:900;color:#92400e}

/* ── PANELS ────────────────────────────────────────────── */

.panel{position:fixed;inset:0;z-index:2500;background:var(--soft);display:none;flex-direction:column;padding-top:var(--safe-top);padding-bottom:var(--safe-bottom)}

.panel.open{display:flex}

.panelHeader{height:56px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 12px;flex-shrink:0}

.panelHeader h2{margin:0;font-size:16px;color:var(--blue);letter-spacing:.08em;text-transform:uppercase}

.backButton{height:42px;border:1.5px solid #e2e8f0;background:#ffffff;color:#1d4ed8;border-radius:11px;padding:0 15px;font-weight:900}

.filterTabs{display:flex;overflow-x:auto;background:#fff;border-bottom:1px solid var(--line);flex-shrink:0}

.filterTabs button{flex-shrink:0;border:0;background:#fff;padding:13px 11px;font-size:12px;font-weight:900;color:var(--muted);border-bottom:3px solid transparent}

.filterTabs button.active{color:var(--blue);border-bottom-color:var(--blue)}

.listTools span{flex:1}

.listTools button{border:1px solid var(--line);background:#fff;border-radius:9px;padding:5px 9px;font-weight:900;font-size:11px}

.stopList,.mapsList{overflow:auto;flex:1}

.stopItem{display:flex;align-items:flex-start;gap:9px;padding:12px;border-bottom:1px solid var(--line);background:#fff;width:100%;text-align:left;cursor:pointer}

.dot{width:12px;height:12px;border-radius:50%;margin-top:4px;flex-shrink:0}

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

.stopInfo b{display:block;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.stopInfo span{display:block;font-size:12px;color:var(--muted);margin-top:2px}

.tag{font-size:10px;font-weight:900;border:1px solid currentColor;border-radius:999px;padding:3px 7px;white-space:nowrap}

.toolList,.settingsBody{padding:12px;overflow:auto}

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

.toolItem span{display:block;color:var(--muted);font-size:14px;line-height:1.4}

/* ── MAPS PANEL ────────────────────────────────────────── */

.mapItem{display:flex;align-items:center;border-bottom:1px solid var(--line)}

.mapItem.active{background:#eff6ff}

.mapItemMain{flex:1;padding:14px 12px;text-align:left;background:transparent;border:0}

.mapRenameBtn{width:44px;height:44px;background:transparent;border:0;color:var(--blue);font-size:18px;border-radius:8px}

.mapDeleteBtn{width:44px;height:44px;background:transparent;border:0;color:var(--red);font-size:18px;font-weight:900;border-radius:8px}

.settingsBody input,.settingsBody select{margin-top:6px;font-size:16px}

.wideButton{width:100%;height:46px;border:0;border-radius:13px;background:var(--blue);color:#fff;font-weight:900;margin-top:8px;cursor:pointer}

.wideButton.secondary{background:var(--soft);color:var(--muted);border:1px solid var(--line)}

.versionTag{margin-top:14px;text-align:center;color:#94a3b8;font-size:11px;letter-spacing:.05em;font-weight:700}

.valueHeader div{min-width:0;flex:1}

.valueHeader h2{font-size:18px;margin:0;color:var(--blue);letter-spacing:.08em;text-transform:uppercase}

.valueHelper{margin:8px 0 14px;font-size:12px;line-height:1.35;color:var(--muted)}

.scanRow{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0 10px}

.scanStatus{min-height:16px;margin:-4px 0 10px;font-size:12px;font-weight:700;color:var(--muted);line-height:1.4}

.valueHomeActions{display:grid;gap:10px;margin-top:4px}

/* ── ROUTE / WEATHER CONTENT ───────────────────────────── */

.intelContent{font-family:'Courier New',monospace;font-size:14px;line-height:1.6;white-space:pre-wrap;background:#fff;border:1px solid var(--line);border-radius:11px;padding:12px;margin-bottom:10px;color:#1e293b;min-height:120px;font-weight:600}

/* ── MODAL ─────────────────────────────────────────────── */

.modal{position:fixed;inset:0;z-index:4000;background:rgba(15,23,42,.5);display:none;align-items:flex-end;padding:12px}

.modal.open{display:flex}

.modalCard{width:100%;background:#fff;border-radius:20px;padding:18px;box-shadow:var(--shadow)}

.modalCard h2{margin:0 0 10px;color:var(--blue);font-size:16px;text-transform:uppercase;letter-spacing:.08em}

.summaryGrid{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-bottom:8px}

.summaryCell{background:var(--soft);border:1px solid var(--line);border-radius:12px;text-align:center;padding:9px 4px}

.summaryCell b{display:block;font-size:20px;color:var(--blue)}

.summaryCell span{font-size:10px;color:var(--muted);font-weight:900}

/* ── TOASTS ────────────────────────────────────────────── */

.toast{position:fixed;left:50%;bottom:106px;z-index:5000;transform:translateX(-50%);background:rgba(15,23,42,.94);color:#fff;padding:9px 17px;border-radius:999px;font-size:12px;font-weight:900;box-shadow:var(--shadow);white-space:nowrap}

.undoToast{position:fixed;left:50%;bottom:106px;z-index:5000;transform:translateX(-50%);background:rgba(15,23,42,.96);color:#fff;padding:10px 14px;border-radius:999px;font-size:13px;font-weight:900;box-shadow:var(--shadow);white-space:nowrap;display:flex;align-items:center;gap:11px}

.undoToast button{background:transparent;border:0;color:#fbbf24;font-weight:900;font-size:13px;padding:0;cursor:pointer}

.errorToast{position:fixed;left:50%;top:60px;z-index:6000;transform:translateX(-50%);background:var(--red);color:#fff;padding:10px 14px;border-radius:11px;font-size:13px;font-weight:900;display:flex;align-items:center;gap:12px;max-width:90%;box-shadow:0 8px 20px rgba(220,38,38,.4)}

.errorToast button{background:rgba(255,255,255,.2);border:0;color:#fff;font-weight:900;font-size:12px;padding:4px 10px;border-radius:6px;cursor:pointer}

.hidden{display:none!important}

/* ── PIN MARKERS ───────────────────────────────────────── */

.pinFloat{display:flex;flex-direction:column;align-items:center;gap:0;filter:drop-shadow(0 1px 3px rgba(15,23,42,.3))}

.pinFloatEmoji{font-size:16px;line-height:1}

.pinFloatNum{font-size:10px;font-weight:900;line-height:1;letter-spacing:-.02em;text-shadow:0 0 3px #fff,0 0 3px #fff}

.pinFloatDot{width:8px;height:8px;border-radius:50%;border:1.5px solid #fff;margin-top:1px}

/* ── ROUTE WAYPOINTS ───────────────────────────────────── */

.routeWaypoint{width:22px;height:22px;border-radius:50%;background:var(--blue);color:#fff;font-size:10px;font-weight:900;display:flex;align-items:center;justify-content:center;border:2px solid #fff;box-shadow:0 2px 6px rgba(15,23,42,.3)}

/* ── PLAN MODE ─────────────────────────────────────────── */

.planLabel{background:rgba(255,255,255,.92);color:#1d4ed8;padding:12px 20px;border-radius:16px;text-align:center;box-shadow:0 4px 20px rgba(15,23,42,.35);border:2.5px solid #1d4ed8;min-width:100px}

.planLabel b{display:block;font-size:32px;font-weight:900;line-height:1;color:#1d4ed8}

.planLabel span{display:block;font-size:11px;letter-spacing:.10em;font-weight:700;margin-top:2px;color:#64748b}

/* Desktop cap */

@media(min-width:600px){
  #appShell{max-width:480px;margin:0 auto;box-shadow:0 0 40px rgba(15,23,42,.15);height:100dvh}
  body{background:#e2e8f0}
  .panel,.modal,.valueHomePanel{width:480px;max-width:480px;left:50%;right:auto;top:0;bottom:0;transform:translateX(-50%)}
  .panel.open{display:flex;transform:translateX(-50%)}
  .modal.open{display:flex;transform:translateX(-50%);align-items:flex-end}
  .sheet{left:50%;right:auto;transform:translateX(-50%) translateY(110%);width:480px;border-radius:20px 20px 0 0}
  .sheet.open{transform:translateX(-50%) translateY(0)}
  .accessScreen .accessCard{box-shadow:0 8px 40px rgba(0,0,0,.2)}
}

.mapOpenButton { background:var(--blue); color:#fff; height:42px; padding:0 16px; border-radius:11px; font-weight:900; font-size:14px; border:0 }

/* Big single input — no redundant label */

.bigInput { width:100%; height:54px; border:2px solid #94a3b8; border-radius:12px; padding:0 16px; background:#fff; color:var(--text); font-size:22px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; margin-bottom:2px }

.bigInput::placeholder { color:#94a3b8; font-weight:600 }

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

.scanButton:active { transform:translateY(1px); background:#dbeafe }

/* State row with state + bias side-by-side */

.stateRow { display:grid; grid-template-columns: auto 1fr auto 1fr; gap:8px 10px; align-items:center; margin:10px 0 14px }

.stateLabel, .biasLabel { font-size:11px; font-weight:900; color:var(--muted); letter-spacing:.05em; text-transform:uppercase; white-space:nowrap }

.stateSelect { height:44px; border:1.5px solid var(--line); border-radius:11px; padding:0 12px; background:#fff; font-size:16px; font-weight:800 }

.biasSlider { width:100%; height:44px; -webkit-appearance:none; background:transparent }

.biasSlider::-webkit-slider-runnable-track { height:6px; background:linear-gradient(90deg, #16a34a 0%, #cbd5e1 50%, #dc2626 100%); border-radius:999px }

.biasSlider::-moz-range-track { height:6px; background:linear-gradient(90deg, #16a34a 0%, #cbd5e1 50%, #dc2626 100%); border-radius:999px }

.biasSlider::-webkit-slider-thumb { -webkit-appearance:none; width:24px; height:24px; border-radius:50%; background:var(--blue); border:3px solid #fff; box-shadow:0 2px 6px rgba(0,0,0,.25); margin-top:-9px; cursor:pointer }

.biasSlider::-moz-range-thumb { width:24px; height:24px; border-radius:50%; background:var(--blue); border:3px solid #fff; box-shadow:0 2px 6px rgba(0,0,0,.25); cursor:pointer }

/* Run button: bigger and louder */

.valueRunButton { height:52px; font-size:17px; letter-spacing:.06em; font-weight:900 }

/* History panel */

.historyList { flex:1; overflow:auto; padding:0; -webkit-overflow-scrolling:touch }

.historyHeader { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:4px; gap:8px }

.historyHeader b { font-size:14px; color:#1e293b; font-weight:800 }

.historyDate { font-size:11px; color:#94a3b8; white-space:nowrap }

.historyDetails { display:flex; flex-wrap:wrap; gap:4px 12px; margin-bottom:4px; font-size:13px; color:#1e293b }

.historyDetails b { color:#64748b; font-weight:700 }

.historyMeta { display:flex; flex-wrap:wrap; gap:4px 10px; font-size:11px; color:#94a3b8 }

/* Join map button */

.joinMapButton { background:linear-gradient(180deg,#1d4ed8,#1e3a8a); color:#fff; height:46px; font-size:13px; font-weight:900; letter-spacing:.05em; border:0; margin:8px 0 }

#topBar button, #topBar .syncPill { color: #fff }

/* Top pill buttons — distinct color per function */

/* Sync pill: state-based colors are visible against blue bar */

.syncPill.local { background:transparent !important; }

.syncPill.syncing { background:transparent !important; }

.syncPill.live { background:transparent !important; }

.syncPill.blocked { background:transparent !important; }

/* Visit list filter tabs — bigger, bolder */

#filterTabs { background:#1e3a8a; border-bottom:2px solid #0c2d8f }

/* Visit list action chips (SUMMARY, DEALS, HANDOFF) */

/* Error display in Value Check */

.vcError { background:#fef2f2; color:#991b1b; padding:12px; border-radius:10px; border:1px solid #fecaca; font-weight:700 }

.vcErrorHint { background:#fff7ed; color:#9a3412; padding:10px 12px; border-radius:10px; border:1px solid #fed7aa; margin-top:8px; font-size:12px; font-weight:600 }

/* Subtle border around the app on desktop */

@media(min-width:600px){
  #appShell { border:1px solid #cbd5e1; border-radius:0 }
}

/* Bigger scan icons */

.scanButton .scanIcon { font-size: 36px !important; line-height:1; margin-bottom:4px }

.scanButton {
  height: 80px !important;
  font-size: 15px !important;
}

/* ── V4.2 RESULT CARD REFRESH — clean, professional, blue-accented ───── */

.valueResult {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-left: 6px solid #1d4ed8 !important;
  border-radius: 12px !important;
  padding: 14px 14px 12px !important;
  margin: 12px 0 !important;
  color: #0f172a !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  box-shadow: 0 2px 8px rgba(15,23,42,.06);
}

.vcBigNums {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1.15fr !important;
  gap: 10px !important;
  margin-bottom: 10px !important;
}

.vcBigItem {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 11px 6px 9px !important;
  text-align: center !important;
}

.vcBigItem.vcRepairMax {
  background: #f8fafc !important;
  border: 1.5px solid #1d4ed8 !important;
  box-shadow: 0 1px 4px rgba(29,78,216,.12);
}

.vcBigLabel {
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .06em !important;
  color: #475569 !important;
  margin-bottom: 5px !important;
}

.vcRepairMax .vcBigLabel { color: #1d4ed8 !important }

.vcBigVal {
  font-size: 20px !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  letter-spacing: -.02em;
}

.vcRepairMax .vcBigVal {
  font-size: 24px !important;
  color: #1d4ed8 !important;
}

.vcDetails > div { margin-bottom: 4px }

.vcDetails b { color: #0f172a; font-weight: 800 }

.vcWarning {
  background: #fef3c7 !important;
  color: #92400e !important;
  padding: 7px 10px !important;
  border-radius: 8px !important;
  margin-top: 10px !important;
  font-weight: 900 !important;
  font-size: 12px !important;
  border: 1px solid #fde68a;
}

/* Soften the home page background — no green needed */

.valueHomePanel {
  background: #f8fafc !important;
  border-top: 0 !important;
}

.valueHomeBody {
  border-bottom: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  flex: 1 !important;
  min-height: 0 !important;
}

.valueHeader .mapOpenButton {
  background: #ffffff !important;
  color: #1d4ed8 !important;
  font-weight: 900;
}

/* Card wrapper for inputs section — give it visible structure */

.valueCard {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px 14px 8px;
  margin: 4px 0 2px;
  box-shadow: 0 1px 3px rgba(15,23,42,.04);
}

/* ── V4.3 vehicle line — subtle blue panel ───── */

.vcVehicleLine {
  background: #eff6ff !important;
  margin: -14px -14px 8px !important;
  padding: 10px 14px !important;
  border-bottom: 1px solid #dbeafe !important;
  border-radius: 11px 11px 0 0;
}

/* ── V4.4 NEW VEHICLE button ───── */

.clearButton {
  background: linear-gradient(180deg, #16a34a, #15803d) !important;
  color: #ffffff !important;
  height: 60px !important;
  font-size: 17px !important;
  letter-spacing: .06em !important;
  font-weight: 900 !important;
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 8px rgba(22,163,74,.3);
}

.clearButton:active { transform: translateY(1px) }

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

/* ── DESIGN TOKENS ──────────────────────────────────────────────── */

:root {
  --brand-blue: #1d4ed8;
  --brand-blue-dark: #1e3a8a;
  --brand-blue-darker: #0c2d8f;
  --brand-blue-soft: #eff6ff;
  --brand-blue-tint: #dbeafe;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-muted: #475569;
  --text-faint: #64748b;
  --accent-gold: #fbbf24;
  --accent-gold-dark: #f59e0b;
  --success: #16a34a;
  --warning: #f97316;
  --danger: #dc2626;
  --shadow-sm: 0 1px 3px rgba(15,23,42,.06);
  --shadow-md: 0 2px 8px rgba(15,23,42,.10);
  --radius-sm: 8px;
  --radius-md: 11px;
  --radius-lg: 14px;
  --soft: #f8fafc;
  --bg: #f1f5f9;
  --blue: #1d4ed8;
  --muted: #64748b;
  --line: #e2e8f0;
  --red: #dc2626;
  --shadow: 0 2px 8px rgba(15,23,42,.10);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── UNIFIED PAGE HEADERS ─────────────────────────────────────────
   Every panel header on every screen looks like this:
   [back-button-left]  [centered-title]  [spacer-right]
   Dark blue band, white centered title, blue back button on the right
   ───────────────────────────────────────────────────────────────── */

.panel > .panelHeader,
.panel > header.panelHeader {
  background: linear-gradient(180deg, var(--brand-blue), var(--brand-blue-dark)) !important;
  border-bottom: 3px solid var(--brand-blue-darker) !important;
  padding: 8px 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 44px !important;
  gap: 10px;
}

.panel > .panelHeader h2,
.panel > header.panelHeader h2 {
  color: #ffffff !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  letter-spacing: .10em !important;
  text-transform: uppercase !important;
  margin: 0 !important;
  flex: 1 !important;
  text-align: center !important;
}

.panel > .panelHeader > div:empty,
.panel > .panelHeader .headerSpacer {
  width: 84px;
  flex-shrink: 0;
}

/* ── UNIFIED BACK BUTTON ──────────────────────────────────────────
   Always top-right, white pill with blue text, "← BACK"
   No more red back buttons anywhere.
   ───────────────────────────────────────────────────────────────── */

.panel .backButton:active {
  transform: translateY(1px);
  background: var(--brand-blue-soft) !important;
}

/* ── UNIFIED ACTION BUTTONS ──────────────────────────────────────
   Light blue fill, darker border, blue text — uniform across screens
   ───────────────────────────────────────────────────────────────── */

/* Primary action button — solid blue, white text — used for CHECK NOW, SAVE, etc. */

.wideButton.valueRunButton:active,
.wideButton.primary:active {
  background: var(--brand-blue-dark) !important;
}

/* Destructive button — only for DELETE — red */

/* ── UNIFIED LIST CARDS ─────────────────────────────────────────── */

.homeActionButton:hover,
.toolItem:hover {
  border-color: var(--brand-blue) !important;
}

.homeActionButton b,
.toolItem b {
  display: block !important;
  font-size: 17px !important;
  color: var(--text) !important;
  font-weight: 900 !important;
  margin-bottom: 3px !important;
}

.homeActionButton span,
.toolItem span {
  display: block !important;
  font-size: 14px !important;
  color: var(--text-muted) !important;
  font-weight: 500 !important;
}

/* ── VISITS FILTER TABS — high contrast on dark bg ─────────────── */

#filterTabs.visitsFilterTabs,
#filterTabs,
#routeFilterTabs {
  background: var(--brand-blue-dark) !important;
  border-bottom: 2px solid var(--brand-blue-darker) !important;
  display: flex !important;
  justify-content: center !important;
  gap: 0 !important;
  padding: 0 !important;
}

#filterTabs button,
#routeFilterTabs button {
  background: transparent !important;
  color: #cbd5e1 !important;
  border: 0 !important;
  padding: 14px 16px !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  letter-spacing: .04em !important;
  flex: 1 !important;
  text-align: center !important;
  cursor: pointer;
}

#filterTabs button.active,
#routeFilterTabs button.active {
  color: #ffffff !important;
  background: var(--brand-blue) !important;
  border-bottom: 3px solid var(--accent-gold) !important;
}

/* ── VISITS LIST TOOLS BAR — punchier ───────────────────────────── */

/* ── FIELD MAP TOP BAR — already styled, but unify pill sizes ─── */

/* Fire icon pill — gold/amber, only visible when count > 0 */

.streakPill.hidden { display: none !important }

/* ── HOME ACTION BUTTONS — already polished, ensure consistency  ─ */

.valueHeader {
  background: linear-gradient(180deg, var(--brand-blue), var(--brand-blue-dark)) !important;
  border-bottom: 3px solid var(--brand-blue-darker) !important;
  min-height: 64px !important;
}

.valueTitle {
  color: #ffffff !important;
  font-size: 24px !important;
  letter-spacing: .12em !important;
  white-space: nowrap !important;
}

/* ── SEARCH BAR consistency ─────────────────────────────────────── */

.searchBar {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 10px 12px !important;
  display: flex !important;
  gap: 8px !important;
}

.searchBar input {
  flex: 1 !important;
  height: 38px !important;
  padding: 0 12px !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  background: var(--surface-alt) !important;
}

.searchBar input:focus {
  border-color: var(--brand-blue) !important;
  outline: none !important;
}

/* ── BOTTOM FORM (e.g., "create map" bar) ──────────────────────── */

.bottomForm {
  background: var(--surface) !important;
  border-top: 1px solid var(--border) !important;
  padding: 10px 12px !important;
  display: flex !important;
  gap: 8px !important;
}

.bottomForm input {
  flex: 1 !important;
  height: 42px !important;
  padding: 0 12px !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 10px !important;
  font-size: 14px !important;
}

.bottomForm button {
  background: var(--brand-blue) !important;
  color: #ffffff !important;
  border: 0 !important;
  padding: 0 18px !important;
  border-radius: 10px !important;
  font-weight: 900 !important;
  letter-spacing: .04em !important;
  cursor: pointer;
}

/* ── EMPTY STATES — consistent friendly tone ───────────────────── */

.emptyMessage {
  padding: 36px 20px !important;
  text-align: center !important;
  color: var(--text-muted) !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
}

/* Clear Route — visible but secondary */

.wideButton.clearRoute {
  background: #fff7ed !important;
  border: 1.5px solid #f97316 !important;
  color: #c2410c !important;
  margin-top: 8px !important;
}

/* Pin sheet close button — blue, not alarming */

/* Locate button — push down more, just above the field bar */

/* Pin sheet CLOSE button — no arrow, just "CLOSE" */

/* Visits filter tabs — fix contrast (was blue-on-blue) */

#filterTabs.visitsFilterTabs button,
#filterTabs button,
#routeFilterTabs button {
  color: #ffffff !important;
  opacity: 0.55;
}

#filterTabs.visitsFilterTabs button.active,
#filterTabs button.active,
#routeFilterTabs button.active {
  color: #ffffff !important;
  opacity: 1 !important;
  background: var(--brand-blue-darker) !important;
  border-bottom: 3px solid var(--accent-gold) !important;
}

/* Visits action bar — balance the layout */

/* Detail rows — bigger, more readable */

.vcDetails { font-size: 14px !important; line-height: 1.55 !important }

.vcVinRow,
.vcDetailRow {
  display: flex !important;
  justify-content: space-between !important;
  align-items: baseline !important;
  padding: 5px 0 !important;
  border-bottom: 1px solid #f1f5f9 !important;
  gap: 12px;
}

.vcVinRow { flex-direction: row !important; align-items: baseline !important; padding: 5px 0 !important; gap: 8px !important; justify-content: flex-start !important; }

.vcDetails > .vcVinRow:last-child,
.vcDetails > .vcDetailRow:last-child { border-bottom: 0 !important }

/* Loading indicator — bigger text + cycling dots */

.vcLoading {
  text-align: center !important;
  padding: 24px 12px !important;
}

.vcLoadingText {
  font-size: 17px !important;
  font-weight: 900 !important;
  color: var(--brand-blue) !important;
  letter-spacing: .04em !important;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.vcLoadingSub {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--text-muted) !important;
  margin-top: 8px !important;
  letter-spacing: .03em;
}

.vcDots { display: inline-flex; gap: 2px; margin-left: 2px }

.vcDots span {
  animation: vcDotPulse 1.2s infinite;
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
}

.vcDots span:nth-child(1) { animation-delay: 0s }

.vcDots span:nth-child(2) { animation-delay: 0.2s }

.vcDots span:nth-child(3) { animation-delay: 0.4s }

@keyframes vcDotPulse {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* Map wipe button — gentler than delete */

.mapWipeBtn {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
  font-size: 14px !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  margin-left: 4px;
}

.mapWipeBtn:active { background: #fde68a !important }

/* Home action buttons (Maps, Visits, History, Settings) — match PLATE/VIN scan buttons */

.homeActionButton {
  background: linear-gradient(180deg, #eff6ff, #dbeafe) !important;
  border: 1.5px solid #bfdbfe !important;
  border-radius: 13px !important;
  padding: 14px 16px !important;
  margin-bottom: 8px !important;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .05s;
}

.homeActionButton:hover {
  border-color: var(--brand-blue) !important;
}

.homeActionButton:active {
  background: #dbeafe !important;
  transform: translateY(1px);
}

.homeActionButton b {
  display: block !important;
  font-size: 15px !important;
  color: var(--brand-blue) !important;
  font-weight: 900 !important;
  margin-bottom: 3px !important;
  letter-spacing: .02em;
}

.homeActionButton span {
  display: block !important;
  font-size: 12px !important;
  color: var(--text-muted) !important;
  font-weight: 500 !important;
}

/* Tools menu items — same shading */

.toolItem {
  background: linear-gradient(180deg, #eff6ff, #dbeafe) !important;
  border: 1.5px solid #bfdbfe !important;
  width: 100% !important;
  text-align: left !important;
}

.toolItem b {
  color: var(--brand-blue) !important;
}

/* Settings label tags */

.optionalTag {
  font-size: 11px !important;
  font-weight: 500 !important;
  color: var(--text-muted) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  margin-left: 6px;
}

.settingsBody label {
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .06em !important;
  color: var(--text-muted) !important;
  text-transform: uppercase;
}

/* History delete button */

.historyItem { position: relative !important; padding: 10px 32px 10px 12px !important; border-bottom: 1px solid #e2e8f0 !important }

.historyDelete {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  color: #dc2626 !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  cursor: pointer;
  padding: 0 !important;
}

.historyDelete:active { background: #fecaca !important }

/* Track button paused state */

.fieldButton.paused {
  background: #fef3c7 !important;
  color: #92400e !important;
}

/* — half-transparent, slightly smaller */

.pinFloat.pinGhost {
  opacity: 0.45;
  transform: scale(0.85);
  transform-origin: center bottom;
}

/* Map attribution — visible but unobtrusive */

.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.75) !important;
  color: #64748b !important;
  font-size: 10px !important;
  padding: 2px 6px !important;
  border-radius: 4px 0 0 0;
}

.leaflet-control-attribution a {
  color: #64748b !important;
  text-decoration: none;
}

.leaflet-control-attribution a:hover {
  color: var(--brand-blue) !important;
  text-decoration: underline;
}

/* ── PIN SHEET TAP-TO-CLOSE OVERLAY ──────────────────────── */

.pinSheetOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 899;
  background: transparent;
}

.pinSheetOverlay.active {
  display: block;
}

/* VALUE CHECK button highlight */

.actionButton.vcHighlight {
  background: #dbeafe !important;
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
}

.listPills {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

.listPill {
  background: #fff !important;
  color: var(--text) !important;
  border: 1.5px solid var(--line) !important;
  border-radius: 999px !important;
  padding: 7px 14px !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .04em !important;
  white-space: nowrap;
  cursor: pointer;
  transition: background .12s;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.listPill:active {
  background: #f1f5f9 !important;
}

#topBar > * {
  flex: 0 0 auto;
}

/* 🎯 ME — locate button: white pill, blue text */

/* SYNC button — amber/orange pill so it's distinct from LIVE */

/* ── PLAN MODE: PIN button active state ──────────────────── */

#fieldBar .fieldButton#addPinButton.planMode {
  background: #fef3c7 !important;
  border-color: #f59e0b !important;
  color: #92400e !important;
}

#fieldBar .fieldButton#addPinButton.planMode span {
  filter: none;
}

/* ── SETTINGS: cache clear button ────────────────────────── */

.clearCacheBtn {
  background: #f1f5f9 !important;
  color: #64748b !important;
  border: 1.5px solid #cbd5e1 !important;
  font-size: 12px !important;
  margin-top: 8px !important;
}

.clearCacheBtn:active {
  background: #e2e8f0 !important;
}

.cacheClearNote {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  margin-top: 4px;
  margin-bottom: 4px;
}

/* ── VISITS FILTER TABS — uniform pills (v4.7.12) ─────────── */

#filterTabs.visitsFilterTabs {
  background: #fff !important;
  border-bottom: 1px solid var(--line) !important;
  padding: 10px 12px !important;
  display: flex !important;
  gap: 6px !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
}

#filterTabs.visitsFilterTabs button,
#filterTabs.visitsFilterTabs button.active {
  background: #fff !important;
  color: var(--brand-blue) !important;
  border: 1.5px solid var(--line) !important;
  border-radius: 999px !important;
  padding: 7px 14px !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .04em !important;
  height: 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  opacity: 1 !important;
  text-transform: uppercase !important;
  cursor: pointer;
  white-space: nowrap;
  min-width: 0 !important;
}

#filterTabs.visitsFilterTabs button.active {
  background: var(--brand-blue) !important;
  color: #fff !important;
  border-color: var(--brand-blue) !important;
}

#filterTabs.visitsFilterTabs button:active:not(.active) {
  background: #f1f5f9 !important;
}

/* ── VISITS COUNT BADGE — own line, prominent ────────────── */

.listTools {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 10px !important;
}

.listCountBox {
  background: #fff !important;
  border: 1.5px solid var(--line) !important;
  border-radius: 10px !important;
  padding: 8px 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.listCountBig {
  font-size: 22px !important;
  font-weight: 900 !important;
  color: var(--brand-blue) !important;
  text-align: center !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
  margin: 0 !important;
}

/* ── HAIL BUTTON ─────────────────────────────────────────── */

/* ── HAIL PANEL ──────────────────────────────────────────── */

.hailBody {
  padding: 10px 12px 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.hailIntro {
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.hailLoading {
  text-align: center;
  padding: 30px 12px;
  color: #1d4ed8;
  font-size: 15px;
  font-weight: 900;
}

.hailLoading .vcDots span {
  font-size: 15px !important;
  color: #1d4ed8 !important;
}

.hailEmpty {
  text-align: center;
  padding: 30px 12px;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
}

.hailStormList {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 0;
}

.hailStormRow.selected {
  background: #fef3c7;
  border-color: #f59e0b;
}

.hailStormMeta {
  font-size: 12px;
  color: #64748b;
}

.hailControls {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  padding-bottom: 10px;
}

#hailOpacityValue {
  font-weight: 900;
  color: var(--brand-blue);
  min-width: 38px;
  text-align: right;
}

/* Map legend for active overlays */

/* ── HISTORY: methodUsed badges for EOR calibration ─────── */

.historyMethod {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}

.historyMethod-live { background: #dcfce7; color: #166534; }

.historyMethod-cached { background: #f1f5f9; color: #64748b; }

.historyMethod-fallback { background: #fef3c7; color: #92400e; }

.historyMethod-unknown { background: #f1f5f9; color: #94a3b8; }

/* ── CAPTURE FOR CALIBRATION button (v4.8.2) ─────────────── */

.captureCalBtn {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: #fef3c7;
  color: #92400e;
  border: 1.5px solid #f59e0b;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  cursor: pointer;
  text-transform: uppercase;
}

.captureCalBtn:active {
  background: #fde68a;
}

.captureCalBtn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.captureCalBtn.captured {
  background: #dcfce7 !important;
  color: #166534 !important;
  border-color: #16a34a !important;
}

/* ── CARRIER PICKER (calibration capture, v4.8.3) ────────── */

.carrierPicker {
  margin-top: 10px;
  padding: 12px;
  background: #fef9c3;
  border: 1.5px solid #facc15;
  border-radius: 12px;
}

.carrierPickerLabel {
  font-size: 12px;
  font-weight: 800;
  color: #713f12;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 10px;
  text-align: center;
}

.carrierPickerGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.carrierPickerBtn {
  background: #fff;
  color: #1d4ed8;
  border: 1.5px solid #e2e8f0;
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.carrierPickerBtn:active {
  background: #dbeafe;
}

.vcCLpill {
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  margin-left: 6px;
  vertical-align: middle;
}

.vcCL-high { background: #dcfce7; color: #166534; border: 1px solid #86efac; }

.vcCL-mod { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }

.vcCL-low { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* Hide the old inline "CL:" label since we now use the pill */

.vcCL { display: none !important; }

/* ── v4.8.4: HAIL STORMS — restructured row layout ───────── */

.hailStormRow {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  gap: 6px 10px !important;
  margin-bottom: 2px !important;
  padding: 8px 12px !important;
}

.hailStormRow.active {
  background: #dbeafe !important;
  border-color: #1d4ed8 !important;
}

.hailStormRow.pending {
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
}

.hailStormDate {
  font-weight: 900;
  font-size: 15px;
  color: var(--text);
  white-space: nowrap;
}

.hailStormMeta {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
}

.hailStormLoc {
  width: 100% !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #334155 !important;
}

.stormInfoBtn {
  margin-left: auto !important;
}

/* Vehicle name — 2-line layout: year+make prominent, model+trim below */

.vcVehTop {
  font-size: 17px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.2;
}

.vcVehSub {
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  line-height: 1.3;
  margin-top: 1px;
}

.vcVehicleLine .vcVehTop,
.vcVehicleLine .vcVehSub { display: block; }

/* ACV / Salvage main cells — match Repair Max prominence */

/* VIN — larger for readability on phones */

.vcVin {
  font-size: 14px !important;
  letter-spacing: .04em !important;
  word-break: break-all !important;
}

/* Detail row — pull value+CL cluster closer to label */

.vcDetailRow {
  justify-content: flex-start !important;
  gap: 16px !important;
}

.vcDetailLabel {
  font-size: 12px !important;
  min-width: 60px !important;
  white-space: nowrap !important;
}

.vcDetailVal {
  flex: 1 !important;
  text-align: left !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  justify-content: flex-start !important;
  font-size: 13px !important;
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
}

/* ── v4.8.6: Count label is tappable to dismiss ──────────── */

.planLabelMarker { cursor: pointer; }

.planLabelMarker .planLabel {
  transition: transform 0.15s ease;
}

.planLabelMarker:hover .planLabel,
.planLabelMarker:active .planLabel {
  transform: scale(0.96);
  opacity: 0.85;
}

/* ── v4.8.7: Multi-vehicle multiplier ─────────────────────── */

.sheetTitleRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.vehMult {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fef3c7;
  border: 1.5px solid #f59e0b;
  border-radius: 999px;
  padding: 4px 6px;
  flex-shrink: 0;
}

.vehMult.hidden { display: none; }

.vehMultBtn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  color: #92400e;
  border: 0;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.vehMultBtn:active { background: #fde68a; }

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

.vehMultLabel {
  font-weight: 900;
  font-size: 13px;
  color: #92400e;
  letter-spacing: .02em;
  padding: 0 4px;
  min-width: 22px;
  text-align: center;
}

/* ── BOTH BARS: same height, blue background ── */

#topBar {
  height: 64px !important;
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 3px !important;
  padding: 4px !important;
  background: linear-gradient(180deg, #1d4ed8, #1e3a8a) !important;
  border-bottom: 3px solid #0c2d8f !important;
  align-items: stretch !important;
  z-index: 900 !important;
  flex-shrink: 0 !important;
}

#fieldBar {
  min-height: 64px !important;
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  align-items: stretch !important;
  padding: 4px 4px calc(4px + var(--safe-bottom, 0px)) !important;
  gap: 3px !important;
  background: linear-gradient(180deg, #1d4ed8, #1e3a8a) !important;
  border-top: 3px solid #0c2d8f !important;
  flex-shrink: 0 !important;
}

/* ── TOP BAR BUTTONS ── */

.topBtn {
  background: #ffffff !important;
  border: 0 !important;
  border-radius: 10px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 1px !important;
  color: #1d4ed8 !important;
  cursor: pointer !important;
  padding: 2px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  position: relative !important;
}

.topBtn:active { background: #dbeafe !important; }

.topBtnIcon {
  font-size: 22px !important;
  line-height: 1 !important;
  display: block !important;
}

.topBtn b {
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: .02em !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  display: block !important;
  color: #1d4ed8 !important;
  line-height: 1.1 !important;
}

.topBarBack b {
  font-size: 14px !important;
}

/* MAP button — icon + map name */

#mapNameButton b {
  font-size: 10px !important;
  letter-spacing: .01em !important;
}

/* DEALS button — gold when active */

.topBtnDeals b { color: #1d4ed8 !important; }

.topBtnDeals.dealsActive {
  background: #fef3c7 !important;
  border: 2px solid #f59e0b !important;
}

.topBtnDeals.dealsActive b { color: #92400e !important; }

/* HAIL button — alert state only */

.topBtnHail b { color: #1d4ed8 !important; }

.topBtnHail.hailAlert b { color: #92400e !important; }

/* FILTER indicator dot on VISITS button */

.filterDot {
  position: absolute !important;
  top: 3px !important;
  right: 3px !important;
  font-size: 10px !important;
  color: #f59e0b !important;
  line-height: 1 !important;
}

.filterDot.hidden { display: none !important; }

/* ── SYNC INDICATOR — not a button, lives in blue bar ── */

.syncIndicator {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  cursor: default !important;
}

.syncIndDot {
  font-size: 24px !important;
  line-height: 1 !important;
  display: block !important;
}

.syncIndicator b {
  font-size: 9px !important;
  font-weight: 900 !important;
  letter-spacing: .04em !important;
  display: block !important;
  white-space: nowrap !important;
}

/* Sync states — dot and label color inside white box */

.syncIndicator.live .syncIndDot   { color: #16a34a !important; }

.syncIndicator.live b             { color: #16a34a !important; }

.syncIndicator.syncing .syncIndDot { color: #d97706 !important; }

.syncIndicator.syncing b           { color: #d97706 !important; }

.syncIndicator.local .syncIndDot   { color: #dc2626 !important; }

.syncIndicator.local b             { color: #dc2626 !important; }

.syncIndicator.blocked .syncIndDot { color: #d97706 !important; }

.syncIndicator.blocked b           { color: #d97706 !important; }

/* ── BOTTOM BAR BUTTONS — match top bar height ── */

.fieldButton {
  background: #ffffff !important;
  border: 0 !important;
  border-radius: 10px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  color: #1d4ed8 !important;
  position: relative !important;
}

.fieldButton span:first-child { font-size: 22px !important; line-height: 1 !important; }

.fieldButton b { font-size: 10px !important; font-weight: 900 !important; letter-spacing: .02em !important; color: #1d4ed8 !important; }

.fieldButton.primary { background: #1d4ed8 !important; color: #fff !important; }

.fieldButton.primary b { color: #fff !important; }

.fieldButton.active { background: #fbbf24 !important; color: #1e293b !important; }

.fieldButton.active b { color: #1e293b !important; }

.fieldButton.planMode { background: #fef3c7 !important; border-color: #f59e0b !important; color: #92400e !important; }

/* Responsive small screens */

@media(max-height:680px) {
  #topBar, #fieldBar { min-height: 54px !important; height: auto !important; }
  .topBtnIcon, .fieldButton span:first-child { font-size: 18px !important; }
  .topBtn b, .fieldButton b { font-size: 9px !important; }
}

.hailGoBtn { width: 100%; padding: 14px 16px; background: #1d4ed8; color: #fff; border: none; border-radius: 10px; font-size: 15px; font-weight: 800; letter-spacing: .04em; cursor: pointer; margin-bottom: 8px; }

.hailGoBtn:active { transform: scale(0.98); }

.sheetCloseBtn { position: absolute; top: 12px; right: 12px; background: none; border: none; font-size: 20px; color: #94a3b8; cursor: pointer; padding: 4px 8px; line-height: 1; z-index: 10; }

.sheetCloseBtn:active { color: #475569; }

.stormDetailCard { max-width: 480px; }

.stormDetailContent { max-height: 60vh; overflow-y: auto; }

.stormReportRow { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #e2e8f0; font-size: 13px; }

.stormReportRow:last-child { border-bottom: none; }

.stormReportSize { font-weight: 800; font-size: 15px; min-width: 50px; }

.stormReportLoc { color: #334155; flex: 1; margin: 0 8px; font-weight: 600; }

.stormReportTime { color: #64748b; font-size: 12px; white-space: nowrap; font-weight: 600; }

.stormInfoBtn { background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 6px; color: #475569; font-size: 11px; font-weight: 700; padding: 3px 8px; cursor: pointer; white-space: nowrap; flex-shrink: 0; margin-left: auto; display: inline-block; }

.stormInfoBtn:active { background: #dbeafe; }

/* deploy-stamp: 2026-05-23-v551

/* Hail panel controls — compact row layout */

.hailControlRow {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 0 !important;
}

.hailControlLabel {
  font-size: 11px !important;
  font-weight: 900 !important;
  color: var(--text-muted, #64748b) !important;
  white-space: nowrap !important;
  min-width: 48px !important;
}

.hailSlider {
  flex: 1 !important;
  height: 6px !important;
  accent-color: #1d4ed8 !important;
  background: #cbd5e1 !important;
  border-radius: 3px !important;
  outline: none !important;
  cursor: pointer !important;
}

.hailControlVal {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #1d4ed8 !important;
  min-width: 42px !important;
  text-align: right !important;
}

.hailClearBtn {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 8px 0 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .04em !important;
  cursor: pointer !important;
  width: 100% !important;
  margin-top: 4px !important;
  display: block !important;
}

.hailClearBtn:active {
  background: #e2e8f0 !important;
}

/* Hail new-storm badge */

.hailBadge {
  position: absolute !important;
  top: 3px !important;
  right: 3px !important;
  width: 9px !important;
  height: 9px !important;
  background: #dc2626 !important;
  border-radius: 50% !important;
  display: block !important;
  border: 1.5px solid #fff !important;
  animation: hailPulse 1.5s infinite !important;
}

@keyframes hailPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

/* Hail legend rows — tappable to fly to storm */

*/

/* ── DIRECT ID OVERRIDES — highest specificity, always win ── */
#mapNameButton {
  background: #ffffff !important;
  border-radius: 10px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  cursor: pointer !important;
  overflow: hidden !important;
  padding: 2px !important;
  color: #1d4ed8 !important;
}

#mapNameButton .topBtnIcon {
  font-size: 26px !important;
  line-height: 1 !important;
  display: block !important;
}

#mapNameButton b, #mapNameButton #activeMapName {
  font-size: 11px !important;
  font-weight: 900 !important;
  color: #1d4ed8 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  display: block !important;
  text-align: center !important;
}

#syncPill {
  background: #ffffff !important;
  border-radius: 10px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: default !important;
  overflow: hidden !important;
  padding: 2px !important;
  gap: 2px !important;
}

#syncPill .syncIndDot {
  font-size: 24px !important;
  line-height: 1 !important;
  display: block !important;
}

#syncPill b, #syncPill #syncLabel {
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .04em !important;
  display: block !important;
  white-space: nowrap !important;
}

#syncPill.live .syncIndDot, #syncPill.live #syncLabel   { color: #16a34a !important; }

#syncPill.syncing .syncIndDot, #syncPill.syncing #syncLabel { color: #d97706 !important; }

#syncPill.local .syncIndDot, #syncPill.local #syncLabel   { color: #dc2626 !important; }

#syncPill.blocked .syncIndDot, #syncPill.blocked #syncLabel { color: #d97706 !important; }
.hailStormRow.disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}
/* deployed: 2026-05-22T22:14:47Z */

#settingsPanel {
  z-index: 2600;
}

/* ── SHOW THE MATH — expandable audit trail ─────────────── */

.vcShowMath {
  margin-top: 10px !important;
  border-top: 1px solid #e2e8f0 !important;
  padding-top: 6px !important;
}

.vcMathToggle {
  background: none !important;
  border: none !important;
  color: #1d4ed8 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  padding: 6px 0 !important;
  width: 100% !important;
  text-align: left !important;
  letter-spacing: .02em !important;
}

.vcMathToggle:active {
  opacity: 0.7 !important;
}

.vcMathBody {
  display: none !important;
  padding-top: 8px !important;
}

.vcShowMath.open .vcMathBody {
  display: block !important;
}

.vcShowMath.open .vcMathToggle::after {
  content: '' !important;
}

.vcMathSection {
  margin-bottom: 12px !important;
}

.vcMathLabel {
  font-size: 12px !important;
  font-weight: 900 !important;
  color: #1d4ed8 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
  margin-bottom: 4px !important;
  padding-bottom: 3px !important;
  border-bottom: 1px solid #dbeafe !important;
}

.vcMathRow {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: baseline !important;
  padding: 3px 0 !important;
  font-size: 13px !important;
  color: #334155 !important;
  gap: 8px !important;
}

.vcMathRow span:first-child {
  color: #64748b !important;
  font-weight: 600 !important;
  min-width: 130px !important;
  flex-shrink: 0 !important;
}

.vcMathRow span:last-child {
  font-weight: 700 !important;
  color: #0f172a !important;
}

.vcShowMath.open .vcMathToggle {
  color: #1d4ed8 !important;
}

.vcMathToggle::after {
  content: '' !important;
}

.vcShowMath:not(.open) .vcMathToggle {
  /* arrow points down when closed - already in the text */
}

.vcShowMath.open .vcMathToggle {
  /* We'll swap the arrow character via CSS */
}

.vcMathMethod {
  border-top: 1px dashed #e2e8f0 !important;
  margin-top: 2px !important;
  padding-top: 4px !important;
}

.vcMathMethod span:last-child {
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
  background: #eff6ff !important;
  padding: 2px 8px !important;
  border-radius: 4px !important;
  color: #1d4ed8 !important;
}

.vcMathResult {
  border-top: 2px solid #1d4ed8 !important;
  margin-top: 4px !important;
  padding-top: 6px !important;
}

.vcMathResult span:last-child {
  font-size: 15px !important;
  font-weight: 900 !important;
  color: #1d4ed8 !important;
}

.vcMathNote {
  font-size: 12px !important;
  color: #64748b !important;
  font-style: italic !important;
  line-height: 1.4 !important;
  padding: 4px 0 !important;
}

/* ── HAIL ALERT STATE — button highlights when unseen storms exist ── */

.topBtnHail.hailAlert {
  background: #fef3c7 !important;
  border: 2px solid #f59e0b !important;
}

.topBtnHail:not(.hailAlert) {
  background: #ffffff !important;
  border: 0 !important;
}

/* ── UNSEEN STORM INDICATOR ── */

.hailStormRow.unseen {
  border-left: 4px solid #1d4ed8 !important;
  background: #eff6ff !important;
}

.hailStormRow.unseen::after {
  content: 'NEW';
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  font-weight: 900;
  color: #1d4ed8;
  background: #dbeafe;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: .04em;
}

.hailStormRow {
  position: relative !important;
}

/* Show/Hide math toggle arrow via CSS */
.vcShowMath.open .vcMathToggle {
  font-size: 0 !important;
}
.vcShowMath.open .vcMathToggle::after {
  content: 'Hide the math ▴' !important;
  font-size: 13px !important;
}

/* ── HAIL STORM PILL (bottom center, above fieldBar) ─────── */
.hailStormPill {
  position: relative;
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255,255,255,.96);
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
  box-shadow: 0 -2px 8px rgba(15,23,42,.12);
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}

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

.hailPillX {
  margin-left: 8px;
  font-size: 14px;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
}

.hailPillX:hover,
.hailPillX:active {
  color: #ef4444;
}

/* custom modal */
.tpModalOverlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.5);z-index:9999;display:flex;align-items:center;justify-content:center;padding:20px}
.tpModalBox{background:#fff;border-radius:16px;padding:24px;width:100%;max-width:360px;box-shadow:0 8px 32px rgba(0,0,0,0.25)}
.tpModalTitle{font-size:16px;font-weight:700;color:#1e293b;margin-bottom:16px}
.tpModalInput{width:100%;padding:12px 14px;border:2px solid #cbd5e1;border-radius:10px;font-size:16px;color:#1e293b;outline:none;box-sizing:border-box;margin-bottom:16px}
.tpModalInput:focus{border-color:#1d4ed8}
.tpModalMsg{font-size:14px;color:#475569;line-height:1.5;margin-bottom:16px;white-space:pre-line}
.tpModalButtons{display:flex;gap:10px;justify-content:flex-end}
.tpModalBtn{padding:10px 24px;border:none;border-radius:10px;font-size:15px;font-weight:700;cursor:pointer}
.tpModalBtnCancel{background:#f1f5f9;color:#475569}
.tpModalBtnOk{background:#1d4ed8;color:#fff}
.tpModalBtnOk:active{background:#1e40af}
.tpModalBtnCancel:active{background:#e2e8f0}
