body {
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

.app-container {
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

#map-container {
  height: 100%;
  width: 100%;
  z-index: 10;
}

.bottom-sheet {
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hide-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scroll::-webkit-scrollbar {
  display: none;
}

.leaflet-control-zoom {
  display: none !important;
}

.leaflet-bottom.leaflet-right {
  margin-bottom: 20px;
}
  padding-bottom: calc(var(--nav-h) + var(--sab) + 1rem);
}


/* ═══════════════════════════════════════════
   ONLINE TOGGLE (Rider)
═══════════════════════════════════════════ */
.online-toggle { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.online-toggle input { display: none; }

.toggle-track {
  width: 50px; height: 28px; border-radius: 14px;
  background: #334155; position: relative; transition: background 0.22s;
}
.toggle-thumb {
  position: absolute; top: 4px; left: 4px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  transition: transform 0.22s; box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.online-toggle input:checked ~ .toggle-track               { background: var(--green); }
.online-toggle input:checked ~ .toggle-track .toggle-thumb { transform: translateX(22px); }

.toggle-lbl { font-size: 0.6875rem; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: 0.06em; }
.online-toggle input:checked ~ .toggle-lbl { color: var(--green); }


/* ═══════════════════════════════════════════
   STATS ROW (Rider)
═══════════════════════════════════════════ */
.stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem; padding: 1rem 1.25rem 0;
}
.stat-box {
  background: var(--card); border-radius: 16px; padding: 0.875rem 0.5rem;
  text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  display: flex; flex-direction: column; gap: 2px;
}
.stat-val { font-family: 'Sora', sans-serif; font-size: 1.5rem; font-weight: 900; color: var(--text); }
.stat-key { font-size: 0.625rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }


/* ═══════════════════════════════════════════
   SECTION (shared)
═══════════════════════════════════════════ */
.section { padding: 1rem 1.25rem 0; }
.section-hd {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem;
}
.section-hd > span { font-family: 'Sora', sans-serif; font-size: 0.9375rem; font-weight: 800; }

.empty-hint { color: var(--muted); font-size: 0.8125rem; text-align: center; padding: 1.5rem 0; line-height: 1.6; }

/* CTA row (Rider Start Journey button) */
.cta-row { padding: 1rem 1.25rem; }
.btn-go   { font-size: 1.0625rem; letter-spacing: 0.01em; }


/* ═══════════════════════════════════════════
   ROUTE LIST ITEMS (Rider home)
═══════════════════════════════════════════ */
.route-chip-list { display: flex; flex-direction: column; gap: 0.5rem; }
.route-chip {
  display: flex; align-items: center; gap: 0.875rem;
  background: var(--card); border-radius: 14px; padding: 0.875rem 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.route-chip .rc-icon { font-size: 1.1rem; }
.route-chip .rc-name { flex: 1; font-size: 0.9375rem; font-weight: 600; }
.route-chip .rc-fare { font-size: 0.8125rem; font-weight: 700; color: var(--green); background: var(--green-light); padding: 3px 10px; border-radius: 999px; }


/* ═══════════════════════════════════════════
   PROFILE CARD (Rider quick strip)
═══════════════════════════════════════════ */
.profile-card {
  background: var(--card); border-radius: 16px; padding: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05); display: flex; flex-direction: column; gap: 0.375rem;
}
.profile-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.profile-row i { color: var(--gold); font-size: 1rem; }
.profile-label { color: var(--muted); min-width: 90px; }
.profile-val { font-weight: 600; }
.logout-btn {
  margin-top: 0.75rem; padding: 0.625rem; background: var(--red-light);
  color: var(--red); font-weight: 700; font-size: 0.875rem;
  border: none; border-radius: 12px; cursor: pointer; -webkit-tap-highlight-color: transparent;
}


/* ═══════════════════════════════════════════
   PASSENGER SEARCH CARD
═══════════════════════════════════════════ */
.search-card {
  margin: 1rem 1.25rem 0;
  background: var(--card); border-radius: 20px;
  padding: 1rem 1.125rem; box-shadow: 0 3px 16px rgba(0,0,0,0.09);
}
.search-row { display: flex; align-items: center; gap: 0.75rem; }
.dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.dot.green { background: var(--green); }
.dot.red   { background: var(--red); }
.search-static { font-size: 0.9rem; color: var(--muted); }
.search-dash { border-left: 2px dashed var(--border); height: 18px; margin: 5px 0 5px 4.5px; }

.dest-field {
  flex: 1; border: none; outline: none; font-size: 0.9375rem;
  font-family: inherit; color: var(--text); background: transparent; cursor: pointer;
}
.search-icon { color: var(--muted); font-size: 1.125rem; }


/* ═══════════════════════════════════════════
   PASSENGER CHIPS (Popular routes)
═══════════════════════════════════════════ */
.chips { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.25rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; background: var(--card);
  border: 1.5px solid var(--border); border-radius: 999px;
  padding: 0.4375rem 1rem; font-family: inherit; font-size: 0.8125rem; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: all 0.14s;
  -webkit-tap-highlight-color: transparent; color: var(--text);
}
.chip.selected, .chip:active {
  background: var(--gold-light); border-color: var(--gold); color: var(--gold-dark);
}


/* ═══════════════════════════════════════════
   KEKE CARDS (Passenger home list)
═══════════════════════════════════════════ */
.keke-card {
  display: flex; align-items: center; gap: 0.875rem;
  background: var(--card); border-radius: 16px; padding: 0.875rem 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06); cursor: pointer; margin-bottom: 0.625rem;
  transition: transform 0.12s; -webkit-tap-highlight-color: transparent;
  border: 1.5px solid transparent;
}
.keke-card:active { transform: scale(0.98); border-color: var(--gold-light); }
.keke-emo  { font-size: 2rem; flex-shrink: 0; }
.keke-info { flex: 1; min-width: 0; }
.keke-name { font-weight: 700; font-size: 0.9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.keke-route{ font-size: 0.8rem; color: var(--muted); margin-top: 1px; }
.keke-plate{ font-size: 0.7rem; font-family: 'Courier New', monospace; background: var(--bg); border-radius: 6px; padding: 2px 6px; display: inline-block; margin-top: 4px; font-weight: 700; }
.keke-right{ text-align: right; flex-shrink: 0; }
.keke-fare { font-family: 'Sora', sans-serif; font-size: 1.0625rem; font-weight: 900; }
.keke-eta  { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.keke-badge{ display: inline-flex; align-items: center; gap: 3px; font-size: 0.6875rem; font-weight: 700; color: var(--green); background: var(--green-light); border-radius: 999px; padding: 2px 8px; margin-top: 4px; }


/* ═══════════════════════════════════════════
   MAP SCREEN
═══════════════════════════════════════════ */
#screen-map { background: #dde4ea; }

/* Leaflet map fills the entire screen */
#map { position: absolute; inset: 0; z-index: 1; }

/* Controls float above the map */
.map-top-bar {
  position: absolute; top: calc(var(--sat) + 0.875rem); left: 1rem; right: 1rem;
  display: flex; align-items: center; gap: 0.75rem; z-index: 20;
}
.map-chip {
  flex: 1; background: rgba(255,255,255,0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 999px; padding: 0.5625rem 1.125rem;
  display: flex; align-items: center; gap: 0.375rem;
  font-size: 0.875rem; font-weight: 600; box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Bottom sheet on map (slide up from bottom) */
.map-sheet {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 20;
  background: var(--card); border-radius: 22px 22px 0 0;
  padding: 0.75rem 1.25rem calc(var(--sab) + 1.25rem);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.1);
}
.map-sheet-hint { color: var(--muted); font-size: 0.875rem; text-align: center; padding: 0.5rem 0; }


/* ═══════════════════════════════════════════
   BOTTOM NAVIGATION
═══════════════════════════════════════════ */
.bottom-nav {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: calc(var(--nav-h) + var(--sab));
  padding-bottom: var(--sab);
  display: flex; background: var(--card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 16px rgba(0,0,0,0.06);
  z-index: 30;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; border: none; background: none;
  color: var(--muted); font-family: inherit; font-size: 0.625rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: color 0.15s;
}
.nav-item i    { font-size: 1.4375rem; }
.nav-item.active { color: var(--gold); }


/* ═══════════════════════════════════════════
   OVERLAYS + BOTTOM SHEETS
═══════════════════════════════════════════ */
.overlay { position: fixed; inset: 0; z-index: 100; }
.overlay.hidden { display: none; }

.overlay-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.52); }

.bottom-sheet {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--card); border-radius: 24px 24px 0 0;
  padding: 1rem 1.25rem calc(var(--sab) + 1.5rem);
  max-height: 85vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  animation: sheetUp 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.sheet-handle { width: 36px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 1.25rem; }
.sheet-title  { font-family: 'Sora', sans-serif; font-size: 1.125rem; font-weight: 800; margin-bottom: 0.25rem; }
.sheet-sub    { font-size: 0.875rem; color: var(--muted); margin-bottom: 1.25rem; }


/* ── Route option list in sheet ── */
.route-opt-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.25rem; }
.route-opt {
  display: flex; align-items: center; gap: 0.875rem; padding: 0.875rem 1rem;
  border: 1.5px solid var(--border); border-radius: 14px; cursor: pointer;
  transition: all 0.14s; -webkit-tap-highlight-color: transparent;
}
.route-opt.selected { border-color: var(--gold); background: var(--gold-light); }

.ro-chk {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-size: 0.75rem; transition: all 0.14s;
}
.route-opt.selected .ro-chk { background: var(--gold); border-color: var(--gold); color: #fff; }
.ro-name { flex: 1; font-size: 0.9375rem; font-weight: 600; }
.ro-fare { font-size: 0.875rem; font-weight: 700; color: var(--green); }


/* ── Ride confirmation sheet content ── */
.ride-confirm-card {
  border: 1.5px solid var(--border); border-radius: 16px; padding: 1rem;
  display: flex; align-items: center; gap: 0.875rem; margin-bottom: 0.875rem;
}
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.btn-green { background: var(--green); }
.btn-red   { background: var(--red-light); color: var(--red); }
.cash-note {
  text-align: center; font-size: 0.8125rem; color: var(--muted);
  margin-bottom: 1rem; line-height: 1.5;
}


/* ═══════════════════════════════════════════
   TOAST NOTIFICATION
═══════════════════════════════════════════ */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + var(--sab) + 0.875rem);
  left: 1rem; right: 1rem; max-width: 400px; margin: 0 auto;
  background: var(--charcoal); color: #fff;
  border-radius: 14px; padding: 0.875rem 1.25rem;
  font-size: 0.875rem; font-weight: 500; text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18); z-index: 200;
  animation: toastIn 0.25s ease;
}
.toast.hidden { display: none; }
@keyframes toastIn { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }


/* ═══════════════════════════════════════════
   LEAFLET OVERRIDES
═══════════════════════════════════════════ */
.leaflet-control-attribution { display: none !important; }
.leaflet-control-zoom        { display: none !important; }
