:root {
  --bg: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-hover: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --vista-red: #dc2626;
  --vista-navy: #0f172a;
  --vista-blue: #2563eb;

  --franchise: #1d4ed8;
  --independent: #d97706;
  --flagged: #7c3aed;
  --hold: #64748b;

  --visited: #15803d;
  --followup: #ea580c;
  --registered: #047857;
  --skip: #94a3b8;

  --radius-sm: 6px;
  --radius-md: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg-subtle);
  -webkit-font-smoothing: antialiased;
}

/* Vista 3-bar emblem */
.vista-bars { display: inline-flex; gap: 3px; align-items: center; }
.vista-bars span { display: block; width: 4px; height: 14px; border-radius: 1px; }
.vista-bars span:nth-child(1) { background: var(--vista-red); }
.vista-bars span:nth-child(2) { background: var(--vista-navy); }
.vista-bars span:nth-child(3) { background: var(--vista-blue); }

/* Login screen */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at top right, #e0e7ff 0%, #f8fafc 55%, #f1f5f9 100%);
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 26px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 10px;
}
.login-title {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.login-sub {
  margin: 0 0 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.form-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* Main layout */
.app {
  display: grid;
  grid-template-columns: 420px 1fr;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: var(--bg);
}

.sidebar {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-right: 1px solid var(--border);
  overflow: hidden;
  z-index: 600;
}

.sidebar-header {
  padding: 13px 16px 11px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.brand-left { display: flex; align-items: center; gap: 8px; }
.brand-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 6px; }

.sync-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #f1f5f9;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}
.sync-badge.is-live { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.sync-badge.is-syncing { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.sync-badge.is-error { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

.icon-pill {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 650;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
}
.icon-pill:hover { background: var(--bg-hover); color: var(--text); }

.sidebar-header h1 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

/* Admin rep switcher */
.rep-switcher {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 10px;
}
.rep-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 6px 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.14s var(--ease);
}
.rep-btn:hover { background: var(--bg-hover); border-color: var(--border-strong); color: var(--text); }
.rep-btn.is-active {
  background: var(--vista-navy);
  border-color: var(--vista-navy);
  color: #ffffff;
}
.rep-btn-name { display: block; font-size: 0.78rem; font-weight: 700; line-height: 1.15; }
.rep-btn-sub { display: block; font-size: 0.67rem; opacity: 0.85; margin-top: 2px; font-variant-numeric: tabular-nums; }
.rep-btn-worked {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: rgba(21, 128, 61, 0.12);
  color: #15803d;
}
.rep-btn.is-active .rep-btn-worked { background: rgba(52, 211, 153, 0.22); color: #a7f3d0; }

/* Nav tabs */
.nav-tabs {
  display: flex;
  margin-top: 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-subtle);
}
.nav-tab {
  flex: 1;
  appearance: none;
  border: none;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  padding: 7px 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.nav-tab:last-child { border-right: none; }
.nav-tab:hover { background: var(--bg-hover); color: var(--text); }
.nav-tab.is-active { background: var(--text); color: #fff; }

.tab-pane { display: none; flex: 1 1 auto; min-height: 0; flex-direction: column; overflow: hidden; }
.tab-pane.is-active { display: flex; }
.list-view { display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* Filters */
.filters-bar { padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--bg); flex-shrink: 0; }
.search-input {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
}
.search-input:focus { border-color: var(--vista-blue); box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12); }

.hub-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.hub-chip {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}
.hub-chip:hover { background: var(--bg-hover); color: var(--text); }
.hub-chip.is-active { background: #eff6ff; color: var(--franchise); border-color: #93c5fd; }

.filter-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 10px; margin-top: 8px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 0.77rem; color: var(--text); cursor: pointer; user-select: none; }
.chk input { width: 14px; height: 14px; accent-color: var(--vista-blue); margin: 0; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot.sq { border-radius: 2px; }

.status-filter-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.status-select {
  flex: 1;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  background: var(--bg);
  color: var(--text);
}

.count-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 16px;
  font-size: 0.77rem;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.count-strip strong { color: var(--text); }

/* Lists */
.dealer-list { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.dealer-row { padding: 10px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.1s ease; }
.dealer-row:hover { background: var(--bg-subtle); }
.dealer-row.is-selected { background: #eff6ff; }
.dealer-row-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.dealer-name { font-size: 0.85rem; font-weight: 650; color: var(--text); line-height: 1.3; }
.dealer-dist { font-size: 0.73rem; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0; }
.dealer-meta { margin-top: 3px; font-size: 0.75rem; color: var(--text-secondary); display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.dealer-contact-preview { margin-top: 3px; font-size: 0.74rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rep-pill { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 0.67rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.rep-pill.r-oscar { background: #dbeafe; color: #1d4ed8; }
.rep-pill.r-charles { background: #ccfbf1; color: #0f766e; }
.rep-pill.r-chet { background: #ede9fe; color: #6d28d9; }

.status-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 0.71rem; font-weight: 700; padding: 1px 6px; border-radius: 999px; margin-top: 4px; }
.status-pill.s-visited { background: #dcfce7; color: #15803d; }
.status-pill.s-left_card { background: #dcfce7; color: #166534; }
.status-pill.s-follow_up { background: #ffedd5; color: #c2410c; }
.status-pill.s-registered { background: #d1fae5; color: #065f46; }
.status-pill.s-skip { background: #f1f5f9; color: #64748b; }
.status-pill.s-not_visited { background: #f1f5f9; color: #475569; }

.flag-text { color: var(--flagged); font-weight: 600; }
.hold-text { color: var(--hold); font-weight: 600; }
.load-more-wrap { padding: 12px 16px; text-align: center; border-bottom: 1px solid var(--border); }

/* Detail panel */
.detail-panel { display: none; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 16px 24px; background: var(--bg); }
.detail-panel.is-open { display: flex; }
.detail-back {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
  margin-bottom: 11px;
}
.detail-back:hover { background: var(--bg-subtle); }
.detail-title { font-size: 1.04rem; font-weight: 750; margin: 0 0 4px; line-height: 1.25; }
.detail-sub { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-link:hover { background: var(--bg-subtle); }
.btn-link.primary { background: var(--text); color: #fff; border-color: var(--text); }
.btn-link.primary:hover { background: #1e293b; }

.detail-box { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 11px 12px; margin-bottom: 11px; background: var(--bg-subtle); }
.detail-box-label { font-size: 0.71rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 6px; }
.detail-line { font-size: 0.82rem; color: var(--text); line-height: 1.45; margin-bottom: 4px; }
.detail-line:last-child { margin-bottom: 0; }

.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.status-btn {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  padding: 8px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.status-btn:hover { background: var(--bg-hover); }
.status-btn.is-active { border-width: 2px; font-weight: 700; }
.status-btn[data-st="not_visited"].is-active { background: #f8fafc; border-color: #64748b; }
.status-btn[data-st="visited"].is-active,
.status-btn[data-st="left_card"].is-active { background: #dcfce7; border-color: #15803d; color: #14532d; }
.status-btn[data-st="follow_up"].is-active { background: #ffedd5; border-color: #ea580c; color: #9a3412; }
.status-btn[data-st="registered"].is-active { background: #d1fae5; border-color: #047857; color: #064e3b; }
.status-btn[data-st="skip"].is-active { background: #f1f5f9; border-color: #94a3b8; color: #475569; }

.notes-area {
  width: 100%;
  min-height: 68px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.83rem;
  color: var(--text);
  resize: vertical;
  margin-bottom: 8px;
}

.save-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.btn-primary {
  appearance: none;
  border: none;
  background: var(--vista-blue);
  color: #fff;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  font-weight: 650;
  cursor: pointer;
}
.btn-primary:hover { background: #1d4ed8; }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-full { width: 100%; padding: 10px 16px; }

.btn-secondary {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-secondary:hover { background: var(--bg-subtle); }
.btn-sm { padding: 4px 8px; font-size: 0.74rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 7px; }

.save-feedback { font-size: 0.76rem; color: var(--text-muted); }
.save-feedback.is-ok { color: #15803d; font-weight: 600; }
.save-feedback.is-err { color: #b91c1c; font-weight: 600; }

/* Panes & Forms */
.pane-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  flex-shrink: 0;
}
.pane-scroll { flex: 1 1 auto; overflow-y: auto; padding: 14px 16px 24px; }
.section-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 0 0 8px; }
.section-block { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.section-block:last-child { border-bottom: none; margin-bottom: 0; }

.field-group { display: block; margin-bottom: 11px; }
.field-label { display: block; font-size: 0.77rem; font-weight: 650; margin-bottom: 4px; color: var(--text); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: var(--text);
  background: var(--bg);
}
input:focus { outline: none; border-color: var(--vista-blue); box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.hub-card { padding: 8px 0; border-bottom: 1px solid var(--border); }
.hub-card:last-child { border-bottom: none; }
.hub-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.hub-title { display: flex; align-items: center; gap: 7px; font-size: 0.84rem; font-weight: 650; }
.swatch { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.radius-readout { font-size: 0.81rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.slider-row { display: grid; grid-template-columns: 1fr 60px; gap: 8px; align-items: center; }
input[type="range"] { width: 100%; height: 22px; margin: 0; cursor: pointer; }

.team-row {
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  margin-bottom: 8px;
}
.team-row-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.team-name { font-size: 0.84rem; font-weight: 700; }
.team-email { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }
.team-actions { display: flex; gap: 6px; margin-top: 7px; }

.callout {
  font-size: 0.79rem;
  line-height: 1.45;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 12px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.25);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-title { margin: 0; font-size: 1.05rem; font-weight: 750; }
.modal-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* Map stage */
.map-stage { position: relative; height: 100%; width: 100%; background: #e5e7eb; }
#map { height: 100%; width: 100%; }

.jump-bar {
  position: absolute;
  top: 12px;
  left: 52px;
  z-index: 500;
  display: inline-flex;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}
.jump-btn {
  appearance: none;
  border: none;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  padding: 7px 10px;
  font-size: 0.77rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
.jump-btn:last-child { border-right: none; }
.jump-btn:hover { background: var(--bg-hover); color: var(--text); }
.jump-btn.is-active { background: var(--vista-navy); color: #fff; }

.basemap-bar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 500;
  display: inline-flex;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}
.basemap-btn {
  appearance: none;
  border: none;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  padding: 7px 10px;
  font-size: 0.77rem;
  font-weight: 600;
  cursor: pointer;
}
.basemap-btn:last-child { border-right: none; }
.basemap-btn:hover { background: var(--bg-hover); color: var(--text); }
.basemap-btn.is-active { background: var(--text); color: #fff; }

.map-legend {
  position: absolute;
  right: 12px;
  bottom: 24px;
  z-index: 500;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 9px 11px;
  font-size: 0.74rem;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
  line-height: 1.55;
}
.legend-row { display: flex; align-items: center; gap: 7px; }

.hub-label {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  pointer-events: none;
}

.territory-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.25);
  cursor: pointer;
}
.territory-pill:hover { background: #1d4ed8; }
.territory-pill .tp-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.leaflet-tooltip.dealer-tip {
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 0.75rem;
  padding: 4px 8px;
}

/* Apollo & Buyer Contact Cards + Google Rating */
.ct-card { padding: 7px 0; border-top: 1px solid #e2e8f0; }
.ct-card:first-of-type { border-top: 0; padding-top: 2px; }
.ct-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ct-name { font-weight: 650; color: var(--text); font-size: 0.82rem; }
.ct-badge { font-size: 0.64rem; font-weight: 700; padding: 1px 6px; border-radius: 999px; letter-spacing: 0.01em; }
.ct-b45 { background: #dbeafe; color: #1d4ed8; }
.ct-b32 { background: #fef3c7; color: #b45309; }
.ct-b30 { background: #dcfce7; color: #15803d; }
.ct-b22 { background: #f1f5f9; color: #334155; }
.ct-hr { font-size: 0.64rem; font-weight: 650; padding: 1px 6px; border-radius: 999px; background: #ede9fe; color: #6d28d9; }
.ct-title { color: var(--text-secondary); font-size: 0.75rem; margin-top: 2px; }
.ct-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; font-size: 0.75rem; }
.ct-links a { color: var(--vista-blue); text-decoration: none; font-weight: 600; }
.ct-links a:hover { text-decoration: underline; }
.dd-rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: #b45309; }

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 46vh 54vh; }
  .map-stage { order: 1; }
  .sidebar { order: 2; border-right: none; border-top: 1px solid var(--border); }
  .map-legend { display: none; }
  .jump-bar { display: none !important; }
  .basemap-btn { padding: 6px 8px; font-size: 0.72rem; }
}
