/* =====================================================================
   LandCorp Lead Universe Explorer — styles.css
   ===================================================================== */

/* ── Custom Properties ──────────────────────────────────────────────── */
:root {
  --navy:       #1E3A5F;
  --navy-dark:  #152d4a;
  --navy-light: #2a4f7a;
  --gold:       #C9A96E;
  --gold-light: #e0c48a;
  --white:      #ffffff;
  --gray-50:    #f8fafc;
  --gray-100:   #f1f5f9;
  --gray-200:   #e2e8f0;
  --gray-300:   #cbd5e1;
  --gray-500:   #64748b;
  --gray-700:   #334155;
  --gray-900:   #0f172a;
  --green:      #22c55e;
  --green-bg:   #dcfce7;
  --orange:     #f59e0b;
  --orange-bg:  #fef3c7;
  --red:        #ef4444;
  --red-bg:     #fef2f2;
  --blue:       #3b82f6;
  --blue-bg:    #eff6ff;

  --radius:     8px;
  --radius-lg:  12px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow:     0 4px 12px rgba(0,0,0,.12);
  --shadow-lg:  0 8px 24px rgba(0,0,0,.16);

  --header-h:   56px;
  --kpi-h:      70px;
  --facility-h: 54px;
  --filter-h:   96px;
  --top-offset: calc(var(--header-h) + var(--kpi-h) + var(--facility-h) + var(--filter-h));
  --route-w:    300px;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ── Reset ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--gray-100); color: var(--gray-900); min-height: 100vh; }
button { cursor: pointer; font-family: inherit; border: none; }
input, select { font-family: inherit; }
a { color: var(--navy); }

/* ── Header ─────────────────────────────────────────────────────────── */
.app-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--navy);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  box-shadow: var(--shadow);
}
.header-left { display: flex; align-items: center; gap: 10px; min-width: 0; overflow: hidden; }

/* Brand block */
.header-brands {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 2px; flex-shrink: 0;
}
.brand-logo-img {
  height: 24px; width: auto; max-width: 110px;
  object-fit: contain; display: block;
  filter: brightness(0) invert(1); /* white on navy */
}
.brand-rh {
  color: var(--gold); font-size: 9px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  line-height: 1;
}
.header-divider {
  width: 1px; height: 32px; background: rgba(255,255,255,.2);
  flex-shrink: 0;
}

.header-title { color: var(--white); font-size: 15px; font-weight: 700; line-height: 1.2; }
.header-sub { color: rgba(255,255,255,.55); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.caveat-badge {
  background: rgba(251,191,36,.15); border: 1px solid rgba(251,191,36,.5);
  color: #fbbf24; font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
  cursor: help; white-space: nowrap;
}
.route-toggle-btn {
  background: var(--gold); color: var(--navy);
  padding: 6px 14px; border-radius: 20px;
  font-weight: 700; font-size: 13px;
  transition: background .15s;
}
.route-toggle-btn:hover { background: var(--gold-light); }

/* ── KPI Bar ────────────────────────────────────────────────────────── */
.kpi-bar {
  display: flex; gap: 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  height: var(--kpi-h);
  overflow-x: auto;
}
.kpi-card {
  flex: 1; min-width: 90px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 8px;
  border-right: 1px solid var(--gray-200);
  white-space: nowrap;
}
.kpi-card:last-child { border-right: none; }
.kpi-value { font-size: 22px; font-weight: 800; color: var(--navy); line-height: 1; }
.kpi-label { font-size: 11px; color: var(--gray-500); margin-top: 3px; text-transform: uppercase; letter-spacing: .04em; }
.kpi-scottsdale .kpi-value { color: var(--gold); }
.kpi-route-card .kpi-value { color: #7c3aed; }
.kpi-visited-card .kpi-value { color: var(--green); }

/* ── Facility Filter ─────────────────────────────────────────────────── */
.facility-section {
  background: var(--white);
  border-bottom: 2px solid var(--gray-200);
  height: var(--facility-h);
  overflow-x: auto;
  overflow-y: hidden;
}
.facility-chips {
  display: flex; gap: 8px;
  padding: 10px 16px;
  width: max-content; min-width: 100%;
}
.facility-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 20px;
  border: 2px solid var(--gray-200);
  background: var(--white); color: var(--gray-700);
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s;
  white-space: nowrap;
}
.facility-chip:hover { border-color: var(--navy); color: var(--navy); }
.facility-chip.active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.facility-chip .chip-count {
  background: rgba(0,0,0,.1); color: inherit;
  font-size: 11px; font-weight: 700;
  padding: 1px 6px; border-radius: 10px;
}
.facility-chip.active .chip-count { background: rgba(255,255,255,.2); }

/* ── Filter Bar ──────────────────────────────────────────────────────── */
.filter-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 10px 16px 8px;
  position: sticky; top: calc(var(--header-h) + var(--kpi-h) + var(--facility-h));
  z-index: 90;
  box-shadow: 0 2px 4px rgba(0,0,0,.04);
}
.filter-row-main { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search-wrap {
  position: relative; flex: 1; min-width: 200px;
  display: flex; align-items: center;
}
.search-icon { position: absolute; left: 10px; font-size: 14px; pointer-events: none; }
.search-input {
  width: 100%; padding: 7px 32px 7px 32px;
  border: 1.5px solid var(--gray-300); border-radius: var(--radius);
  font-size: 13px; outline: none;
  transition: border-color .15s;
}
.search-input:focus { border-color: var(--navy); }
.search-clear {
  position: absolute; right: 8px;
  background: none; color: var(--gray-400);
  font-size: 13px; line-height: 1;
  padding: 2px 4px;
}
.search-clear:hover { color: var(--gray-700); }
.filter-select {
  padding: 7px 10px; border: 1.5px solid var(--gray-300); border-radius: var(--radius);
  font-size: 13px; background: var(--white); color: var(--gray-700); outline: none;
  cursor: pointer; transition: border-color .15s;
}
.filter-select:focus { border-color: var(--navy); }

.filter-row-checks {
  display: flex; gap: 14px; align-items: center;
  margin-top: 8px; flex-wrap: wrap;
}
.filter-check {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--gray-600); cursor: pointer;
  user-select: none;
}
.filter-check input { accent-color: var(--navy); }

.filter-meta-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 6px;
}
.filter-meta { font-size: 12px; color: var(--gray-500); }
.view-toggle-group { display: flex; gap: 6px; align-items: center; }
.view-btn {
  padding: 5px 10px; border-radius: var(--radius);
  font-size: 12px; font-weight: 600;
  background: var(--gray-100); color: var(--gray-600);
  border: 1.5px solid var(--gray-200);
  transition: all .15s;
}
.view-btn.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.view-btn:hover:not(.active) { border-color: var(--navy); color: var(--navy); }
.btn-ghost-sm {
  padding: 5px 10px; border-radius: var(--radius);
  font-size: 12px; color: var(--gray-500);
  background: none; border: 1px solid var(--gray-200);
  transition: all .15s;
}
.btn-ghost-sm:hover { color: var(--red); border-color: var(--red); }

/* ── Main Layout ─────────────────────────────────────────────────────── */
.main-layout {
  display: flex;
  min-height: calc(100vh - var(--top-offset));
  position: relative;
}
.content-area {
  flex: 1;
  min-width: 0;
  padding: 16px;
}

/* ── Collapsible Section ─────────────────────────────────────────────── */
.collapsible-section {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  margin-bottom: 14px; overflow: hidden;
}
.collapsible-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 13px; font-weight: 700; color: var(--navy);
  user-select: none;
}
.collapsible-header:hover { background: var(--gray-50); }
.collapse-arrow { font-size: 16px; transition: transform .2s; }
.collapsible-section.collapsed .collapse-arrow { transform: rotate(-90deg); }
.collapsible-section.collapsed .collapsible-body { display: none; }
.collapsible-body { padding: 8px 16px 14px; }

/* ── Location Groups ─────────────────────────────────────────────────── */
.location-groups-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.location-chip {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 14px; border-radius: var(--radius);
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  cursor: pointer; transition: all .15s;
  min-width: 120px;
}
.location-chip:hover { border-color: var(--navy); background: #f0f4f9; }
.location-chip.active { border-color: var(--navy); background: var(--navy); color: var(--white); }
.location-chip-name { font-size: 13px; font-weight: 700; }
.location-chip-meta { font-size: 11px; color: var(--gray-500); }
.location-chip.active .location-chip-meta { color: rgba(255,255,255,.7); }
.location-chip-types { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.location-type-dot {
  font-size: 10px; padding: 1px 6px; border-radius: 8px;
  background: var(--gray-100); color: var(--gray-600);
}
.location-chip.active .location-type-dot { background: rgba(255,255,255,.2); color: var(--white); }

/* ── Lead Grid ───────────────────────────────────────────────────────── */
.lead-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

/* ── Lead Card ───────────────────────────────────────────────────────── */
.lead-card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1.5px solid var(--gray-200);
  padding: 14px;
  transition: all .15s;
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
}
.lead-card:hover { border-color: var(--navy); box-shadow: var(--shadow); }
.lead-card.in-route { border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,.1); }
.lead-card.visited { opacity: .6; border-style: dashed; }

.card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-name { font-size: 14px; font-weight: 700; color: var(--navy); line-height: 1.3; flex: 1; }
.card-visited-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); flex-shrink: 0; margin-top: 4px;
  display: none;
}
.visited .card-visited-dot { display: block; }

.facility-badge {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 10px;
  text-transform: uppercase; letter-spacing: .05em;
  white-space: nowrap;
}

.card-location { font-size: 12px; color: var(--gray-500); }
.card-address { font-size: 12px; color: var(--gray-600); line-height: 1.4; }
.card-phone { font-size: 13px; font-weight: 600; color: var(--navy-dark); }
.card-phone a { color: inherit; text-decoration: none; }
.card-phone a:hover { text-decoration: underline; }

.card-website a {
  font-size: 11px; color: var(--blue);
  text-decoration: none; display: block;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-website a:hover { text-decoration: underline; }

.action-badge {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 10px;
  margin-top: 2px;
}
.action-field { background: var(--green-bg); color: #15803d; }
.action-call  { background: var(--blue-bg);  color: #1d4ed8; }
.action-research { background: var(--gray-100); color: var(--gray-600); }
.action-review { background: var(--orange-bg); color: #92400e; }

.card-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 4px; padding-top: 8px;
  border-top: 1px solid var(--gray-100);
}
.card-btn {
  padding: 5px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 600;
  transition: all .15s; white-space: nowrap;
}
.btn-detail { background: var(--navy); color: var(--white); }
.btn-detail:hover { background: var(--navy-light); }
.btn-route { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-200); }
.btn-route:hover { background: #e9e5f8; color: #7c3aed; border-color: #7c3aed; }
.btn-route.in-route { background: #ede9fb; color: #7c3aed; border-color: #7c3aed; }
.btn-maps { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-200); }
.btn-maps:hover { background: #e5f0ff; color: var(--blue); border-color: var(--blue); }
.btn-visited { background: var(--gray-100); color: var(--gray-500); border: 1px solid var(--gray-200); font-size: 10px; }
.btn-visited.visited { background: var(--green-bg); color: #15803d; border-color: var(--green); }
.btn-visited:hover { background: var(--green-bg); color: #15803d; }

/* ── Lead Table ──────────────────────────────────────────────────────── */
.lead-table {
  width: 100%; border-collapse: collapse;
  background: var(--white); border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
}
.lead-table thead th {
  background: var(--navy); color: var(--white);
  padding: 10px 12px; text-align: left;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  white-space: nowrap;
}
.lead-table tbody tr { border-bottom: 1px solid var(--gray-100); }
.lead-table tbody tr:hover { background: var(--gray-50); }
.lead-table tbody tr.in-route { background: #f5f3ff; }
.lead-table tbody tr.visited { opacity: .6; }
.lead-table td { padding: 8px 12px; vertical-align: middle; }
.lead-table td.td-name { font-weight: 600; color: var(--navy); max-width: 200px; }
.lead-table td.td-addr { max-width: 200px; color: var(--gray-600); }
.lead-table .tbl-btn {
  padding: 3px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 600;
  background: var(--gray-100); color: var(--gray-700);
  border: 1px solid var(--gray-200);
  white-space: nowrap;
}
.lead-table .tbl-btn:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ── Empty State ─────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--gray-500);
}
.empty-state p { margin: 8px 0 16px; font-size: 15px; }

/* ── Route Panel ─────────────────────────────────────────────────────── */
.route-panel {
  width: var(--route-w);
  flex-shrink: 0;
  background: var(--white);
  border-left: 1px solid var(--gray-200);
  display: flex; flex-direction: column;
  position: sticky;
  top: var(--top-offset);
  height: calc(100vh - var(--top-offset));
  overflow: hidden;
  transition: width .25s, opacity .25s;
}
.route-panel.hidden { width: 0; opacity: 0; overflow: hidden; border: none; }

.route-panel-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  background: var(--navy); color: var(--white);
  flex-shrink: 0;
}
.route-panel-title { font-size: 14px; font-weight: 700; flex: 1; }
.route-badge {
  background: var(--gold); color: var(--navy);
  font-size: 11px; font-weight: 800;
  padding: 1px 7px; border-radius: 10px;
}
.route-panel-close { background: none; color: rgba(255,255,255,.7); font-size: 16px; padding: 0 4px; }
.route-panel-close:hover { color: var(--white); }

.route-actions-bar {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0;
}
.btn-primary-sm {
  padding: 6px 12px; border-radius: var(--radius);
  background: var(--navy); color: var(--white);
  font-size: 12px; font-weight: 700;
  transition: background .15s;
}
.btn-primary-sm:hover { background: var(--navy-light); }

.route-list {
  flex: 1; overflow-y: auto;
  padding: 8px 0;
}
.route-empty-msg {
  padding: 24px 16px; text-align: center;
  font-size: 12px; color: var(--gray-400); line-height: 1.5;
}

.route-stop {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--gray-100);
}
.route-stop:last-child { border-bottom: none; }
.route-stop-num {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--navy); color: var(--white);
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.route-stop-info { flex: 1; min-width: 0; }
.route-stop-name { font-size: 12px; font-weight: 700; color: var(--gray-900); line-height: 1.3; }
.route-stop-type { font-size: 10px; color: var(--gray-500); }
.route-stop-addr {
  font-size: 10px; color: var(--gray-500);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.route-stop-warn { font-size: 10px; color: var(--orange); font-weight: 600; }

.route-stop-btns { display: flex; gap: 3px; flex-shrink: 0; }
.route-stop-btn {
  padding: 3px 6px; border-radius: 4px;
  font-size: 10px; background: var(--gray-100); color: var(--gray-600);
  border: 1px solid var(--gray-200);
}
.route-stop-btn:hover { background: var(--gray-200); }
.route-stop-btn.remove { color: var(--red); }
.route-stop-btn.remove:hover { background: var(--red-bg); border-color: var(--red); }
.route-stop-btn.maps-btn { color: var(--blue); }
.route-stop-btn.maps-btn:hover { background: var(--blue-bg); border-color: var(--blue); }

.route-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--gray-200);
  display: flex; flex-direction: column; gap: 8px;
  flex-shrink: 0;
}
.btn-primary {
  padding: 9px 16px; border-radius: var(--radius);
  background: var(--navy); color: var(--white);
  font-size: 13px; font-weight: 700;
  transition: background .15s;
}
.btn-primary:hover { background: var(--navy-light); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.full-width { width: 100%; }
.route-footer-actions { display: flex; gap: 8px; }
.btn-secondary-sm {
  flex: 1; padding: 6px 10px; border-radius: var(--radius);
  background: var(--gray-100); color: var(--gray-700);
  border: 1px solid var(--gray-200);
  font-size: 11px; font-weight: 600;
  transition: all .15s;
}
.btn-secondary-sm:hover { border-color: var(--navy); color: var(--navy); background: #f0f4f9; }

/* ── Modal ───────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.45); backdrop-filter: blur(2px);
  align-items: flex-start; justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal-panel {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 620px;
  position: relative;
  margin: auto;
}
.modal-close-btn {
  position: absolute; top: 12px; right: 14px;
  background: var(--gray-100); color: var(--gray-600);
  width: 28px; height: 28px; border-radius: 50%;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.modal-close-btn:hover { background: var(--gray-200); color: var(--gray-900); }
.modal-body { padding: 24px; }

.modal-header { padding-bottom: 16px; border-bottom: 1px solid var(--gray-200); margin-bottom: 16px; }
.modal-company { font-size: 20px; font-weight: 800; color: var(--navy); line-height: 1.2; margin-bottom: 8px; }
.modal-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 16px;
}
.detail-field label {
  display: block; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--gray-400); margin-bottom: 2px;
}
.detail-field span {
  font-size: 13px; color: var(--gray-700);
}
.detail-field .field-empty { color: var(--gray-300); font-style: italic; }
.detail-field.full { grid-column: 1 / -1; }

.modal-strategy {
  background: var(--gray-50); border-radius: var(--radius);
  border-left: 3px solid var(--navy);
  padding: 12px 14px; margin-bottom: 14px;
}
.modal-strategy-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--navy); margin-bottom: 4px;
}
.modal-strategy-value { font-size: 13px; color: var(--gray-700); line-height: 1.5; }

.modal-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding-top: 14px; border-top: 1px solid var(--gray-200);
}
.modal-btn {
  padding: 8px 14px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600;
  transition: all .15s;
}
.modal-btn-primary { background: var(--navy); color: var(--white); }
.modal-btn-primary:hover { background: var(--navy-light); }
.modal-btn-secondary { background: var(--gray-100); color: var(--gray-700); border: 1.5px solid var(--gray-200); }
.modal-btn-secondary:hover { border-color: var(--navy); color: var(--navy); }
.modal-btn-maps { background: #e5f0ff; color: #1d4ed8; border: 1.5px solid #93c5fd; }
.modal-btn-maps:hover { background: #dbeafe; }

.field-note-section { margin-top: 16px; }
.field-note-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--gray-400); margin-bottom: 6px;
}
.field-note-template {
  background: var(--gray-50); border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 10px 12px;
  font-size: 12px; color: var(--gray-700); line-height: 1.7;
  font-family: 'Courier New', monospace;
  white-space: pre-wrap; cursor: text;
}
.score-row { display: flex; gap: 6px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.score-label { font-size: 12px; color: var(--gray-500); }
.score-btn {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gray-100); color: var(--gray-600);
  border: 2px solid var(--gray-200);
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.score-btn.selected { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ── Toast ───────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--gray-900); color: var(--white);
  padding: 10px 20px; border-radius: 24px;
  font-size: 13px; font-weight: 600;
  z-index: 300;
  transition: transform .25s;
  pointer-events: none;
  white-space: nowrap;
}
.toast.visible { transform: translateX(-50%) translateY(0); }

/* ── Facility type badge colors ──────────────────────────────────────── */
.ft-hotels    { background: #dbeafe; color: #1e40af; }
.ft-clubs     { background: #d1fae5; color: #065f46; }
.ft-golf      { background: #d1fae5; color: #047857; }
.ft-dealers   { background: #ffe4e6; color: #9f1239; }
.ft-medical   { background: #f0e9ff; color: #6b21a8; }
.ft-restaurants { background: #fff3e0; color: #92400e; }
.ft-commercial { background: #e0f2fe; color: #0369a1; }
.ft-schools   { background: #fef3c7; color: #78350f; }
.ft-other     { background: var(--gray-100); color: var(--gray-600); }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --route-w: 100%; }
  .route-panel {
    position: fixed; inset: 0; z-index: 150;
    height: 100vh; width: 100% !important;
    transform: translateX(100%);
    transition: transform .3s;
  }
  .route-panel.mobile-open { transform: translateX(0); }
  .route-panel.hidden { transform: translateX(100%); width: 100% !important; opacity: 1; }

  .header-sub { display: none; }
  .header-divider { display: none; }
  .brand-rh { display: none; }
  .brand-logo-img { height: 20px; }
  .caveat-badge { font-size: 10px; padding: 3px 8px; }
  .lead-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .filter-row-main { flex-direction: column; }
  .search-wrap { min-width: 0; width: 100%; }
  .kpi-card { min-width: 70px; }
  .kpi-value { font-size: 18px; }
}
