/* =========================================================================
   RYDEALOT SUPERMAPS — MASTER STYLESHEET
   Ultra-High Performance • Potato-Phone Optimized • In-Car Display Ready
   ========================================================================= */

:root {
  --bg-primary: #0a0b0e;
  --bg-surface: #14171f;
  --bg-surface-glass: rgba(20, 23, 31, 0.88);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-gold: rgba(245, 158, 11, 0.4);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.25);
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-red: #ef4444;

  /* Surface Road Legend */
  --road-tar: #111113;
  --road-cement: #94a3b8;
  --road-mud: #b45309;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --safe-bottom: env(safe-area-inset-bottom, 16px);
}

/* DAYLIGHT CLEAN THEME (For In-Car Sun Glare) */
body.daylight-theme {
  --bg-primary: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-surface-glass: rgba(255, 255, 255, 0.94);
  --border-color: rgba(0, 0, 0, 0.12);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --road-tar: #0f172a;
  --road-cement: #64748b;
  --road-mud: #92400e;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  /* GPU acceleration for budget phones */
  transform: translateZ(0);
}

/* =========================================================================
   MAP CONTAINER (FULL SCREEN CANVAS)
   ========================================================================= */
#map-viewport {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  background: #0a0b0e;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

#map-viewport canvas {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Leaflet map tile rendering: Obsidian Dark vs Daylight Clean */
.leaflet-tile {
  filter: invert(100%) hue-rotate(180deg) brightness(85%) contrast(92%);
  transition: filter 0.3s ease;
}
body.daylight-theme .leaflet-tile {
  filter: none;
}

/* =========================================================================
   TOP SEARCH & BRANDING HEADER
   ========================================================================= */
.top-header {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  max-width: 600px;
  margin: 0 auto;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-bar-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 8px 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--border-gold);
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
}
.search-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

.search-action-btn {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--accent-gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.search-action-btn:hover {
  background: var(--accent-gold);
  color: #000;
}
.search-action-btn.icon-only {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 4px 6px;
  font-size: 1.1rem;
}
.search-action-btn.icon-only:hover {
  color: var(--text-main);
  background: transparent;
}

/* Category Quick Filter Chips */
.chips-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.chips-carousel::-webkit-scrollbar {
  display: none;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 20px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.chip-btn.active, .chip-btn:hover {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
}

/* =========================================================================
   SEARCH AUTOCOMPLETE DROPDOWN
   ========================================================================= */
.search-dropdown {
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  display: none;
  z-index: 1001;
}

.search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.15s;
}
.search-item:last-child {
  border-bottom: none;
}
.search-item:hover {
  background: rgba(245, 158, 11, 0.08);
}
.search-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.search-item-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
}
.search-item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.search-item-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid var(--border-gold);
}

/* =========================================================================
   OFFLINE WARNING PILL (hidden when online, shown at bottom-left when offline)
   ========================================================================= */
.safety-buffer-pill {
  position: absolute;
  bottom: calc(var(--safe-bottom) + 130px);
  left: 16px;
  z-index: 999;
  display: none; /* JS shows this only when offline */
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  padding: 7px 14px;
  border-radius: 30px;
  font-size: 0.76rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  max-width: 280px;
}
.safety-buffer-pill.offline {
  display: flex;
}
.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-ring 1.8s infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
  100% { transform: scale(0.9); opacity: 1; }
}

/* =========================================================================
   ROAD SURFACE LEGEND (Black=Tar, Grey=Cement, Brown=Mud)
   ========================================================================= */
.surface-legend-bar {
  position: absolute;
  bottom: calc(var(--safe-bottom) + 80px);
  left: 16px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.surface-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.surface-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-tar { background: #111113; border: 1px solid rgba(255,255,255,0.4); }
.dot-cement { background: #94a3b8; }
.dot-mud { background: #b45309; }

/* =========================================================================
   FLOATING ACTION CONTROLS (RIGHT DOCK)
   ========================================================================= */
.controls-dock {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dock-btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
}
.dock-btn:hover {
  transform: scale(1.05);
  border-color: var(--accent-gold);
}
.dock-btn.gold-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border: none;
  font-weight: 800;
}

/* =========================================================================
   BOTTOM NAVIGATION & PLACE DETAILS CARD
   ========================================================================= */
.bottom-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  border-radius: 24px 24px 0 0;
  padding: 16px 20px calc(var(--safe-bottom) + 12px);
  z-index: 1000;
  box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.5);
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 600px;
  margin: 0 auto;
}
.bottom-panel.active {
  transform: translateY(0);
}

.panel-drag-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 0 auto 12px;
}

.place-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.place-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}
.place-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.close-panel-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
}

.route-actions-row {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}
.btn-nav-primary {
  flex: 1;
  background: linear-gradient(135deg, #f59e0b, #eab308);
  color: #000;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 12px 16px;
  border-radius: 14px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
}
.btn-nav-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 18px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* =========================================================================
   LIVE NAVIGATION OVERLAY (COMPASS HEADING & IN-CAR HUD)
   ========================================================================= */
.nav-hud-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 1002;
  display: none;
  flex-direction: column;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto;
}
.nav-hud-card {
  background: #0f1219;
  border: 2px solid var(--accent-gold);
  border-radius: 20px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}
.nav-turn-icon {
  font-size: 2.2rem;
  color: var(--accent-gold);
}
.nav-instruction-block {
  flex: 1;
  margin-left: 14px;
}
.nav-distance-text {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
}
.nav-action-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}
.btn-stop-nav {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid var(--accent-red);
  color: #f87171;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
}

/* =========================================================================
   VERIFIED BUSINESS PIN (PULSING MAP MARKER)
   ========================================================================= */
.golden-shop-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
}
.golden-pin-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  padding: 5px 9px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.5);
  border: 2px solid #fff;
  white-space: nowrap;
}
.golden-pin-pulse {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-gold-glow);
  border: 2px solid var(--accent-gold);
  animation: radar-wave 2s infinite;
  z-index: -1;
}
@keyframes radar-wave {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* =========================================================================
   MODAL: "ADD / CLAIM MY SHOP" (THE GOLDEN GOOSE)
   ========================================================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.active {
  display: flex;
}
.modal-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
}
.modal-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 4px;
  margin-bottom: 18px;
  line-height: 1.4;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.form-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
}
.form-input, .form-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
}
.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.plan-picker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}
.plan-card {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.plan-card.selected {
  border-color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
}
.plan-badge {
  font-size: 0.68rem;
  font-weight: 800;
  color: #34d399;
}
.plan-price {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 4px 0;
  color: var(--text-main);
}
.plan-period {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-submit-shop {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-weight: 800;
  padding: 14px;
  border-radius: 14px;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 10px;
}

/* =========================================================================
   GOOGLE MAPS STYLE "FROM / TO" DIRECTIONS CARD
   ========================================================================= */
.directions-card {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dir-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dir-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 6px;
}
.dir-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
}

.vehicle-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: 12px;
}
.veh-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.veh-btn.active {
  background: var(--accent-gold);
  color: #000;
  font-weight: 800;
}

.dir-inputs-box {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
}
.dir-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}
/* Geometric dot indicators replacing emoji icons */
.dir-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dir-dot-from {
  background: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}
.dir-dot-to {
  background: var(--accent-gold);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}
.dir-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
}
.dir-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}
.icon-clear-sm {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-clear-sm:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.dir-divider {
  height: 1px;
  background: var(--border-color);
  position: relative;
}
.swap-dir-btn {
  position: absolute;
  right: 14px;
  top: -14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.route-summary-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: 14px;
  padding: 12px 16px;
}
.route-main-time {
  font-size: 1.25rem;
  font-weight: 800;
  color: #38bdf8;
  font-family: var(--font-mono);
}
.route-main-dist {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.btn-start-driving {
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  color: #fff;
  border: none;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.4);
}

/* =========================================================================
   IN-CAR / WIDESCREEN DISPLAY ENHANCEMENTS
   ========================================================================= */
@media (min-width: 900px) and (orientation: landscape) {
  .top-header {
    left: 24px;
    width: 420px;
    margin: 0;
  }
  .bottom-panel {
    left: 24px;
    width: 420px;
    bottom: 24px;
    border-radius: 20px;
    margin: 0;
  }
  .surface-legend-bar {
    left: 460px;
    bottom: 24px;
  }
}

/* =========================================================================
   PROFILE MODAL
   ========================================================================= */
.profile-avatar-block {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 14px;
}

.profile-avatar-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.14);
  border: 2px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  flex-shrink: 0;
}

.profile-name-text {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
}

.profile-phone-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.profile-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.profile-stat-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}

.stat-number {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-gold);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

.profile-section-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin: 14px 0 8px;
}

.profile-biz-empty {
  font-size: 0.84rem;
  color: var(--text-muted);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-align: center;
}

/* Dir title text (no emoji) */
.dir-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 0.5px;
}

/* =========================================================================
   PROFILE MODAL — HERO REDESIGN
   ========================================================================= */

/* Override container for profile — no top padding so hero fills edge to edge */
.profile-modal-container {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-gold);
}

/* Hero gradient header */
.profile-hero {
  background: linear-gradient(160deg, #1a1d2e 0%, #0f1218 55%, rgba(245, 158, 11, 0.08) 100%);
  border-bottom: 1px solid var(--border-gold);
  padding: 32px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.profile-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-large {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.05));
  border: 2.5px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.08), 0 8px 28px rgba(0, 0, 0, 0.5);
  margin-bottom: 14px;
}

.profile-hero-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.profile-hero-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.profile-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
}

.profile-edit-btn {
  margin-top: 14px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--accent-gold);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 7px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.profile-edit-btn:hover {
  background: var(--accent-gold);
  color: #000;
}

/* Stats row inside profile (re-use existing but padded) */
.profile-modal-container .profile-stats-row {
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
}

/* Section blocks */
.profile-section-block {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
}

.profile-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.profile-section-action {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--border-gold);
  color: var(--accent-gold);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.profile-section-action:hover {
  background: var(--accent-gold);
  color: #000;
}

/* Quick action buttons at bottom */
.profile-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 20px;
}

.profile-quick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border: none;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 11px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}
.profile-quick-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}
.profile-quick-btn.outline-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  box-shadow: none;
}
.profile-quick-btn.outline-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  box-shadow: none;
  transform: none;
}

/* =========================================================================
   THEME PICKER — BOTTOM SHEET
   ========================================================================= */
.theme-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.theme-picker-overlay.active { opacity: 1; pointer-events: all; }
.theme-picker-sheet {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 600px;
  padding: 24px 20px 32px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.theme-picker-overlay.active .theme-picker-sheet { transform: translateY(0); }
.theme-picker-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.theme-picker-title { font-size: 1.15rem; font-weight: 900; color: var(--text-main); }
.theme-picker-subtitle { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; }
.theme-picker-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,0.07); border: 1px solid var(--border-color);
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.theme-cards-grid { display: flex; flex-direction: column; gap: 10px; }
.theme-card {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 16px;
  background: rgba(255,255,255,0.04); border: 1.5px solid var(--border-color);
  cursor: pointer; transition: all 0.18s ease; position: relative;
}
.theme-card:hover { border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.04); }
.theme-card.selected {
  border-color: var(--accent-gold); background: rgba(245,158,11,0.08);
  box-shadow: 0 0 0 1px rgba(245,158,11,0.3);
}
.theme-preview-strip {
  display: flex; width: 64px; height: 44px;
  border-radius: 10px; overflow: hidden; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
}
.theme-card-body { flex: 1; }
.theme-card-name { font-size: 0.9rem; font-weight: 800; color: var(--text-main); margin-bottom: 2px; }
.theme-card-desc { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; }
.theme-card-badge {
  display: inline-block; font-size: 0.65rem; font-weight: 900;
  letter-spacing: 0.7px; padding: 2px 7px; border-radius: 99px;
}
.default-badge  { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid rgba(245,158,11,0.4); }
.rider-badge    { background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.4); }
.festival-badge { background: rgba(168,85,247,0.15); color: #c084fc; border: 1px solid rgba(168,85,247,0.4); }
.warm-badge     { background: rgba(194,68,14,0.15);  color: #f97316; border: 1px solid rgba(194,68,14,0.4); }
.vintage-badge  { background: rgba(92,51,23,0.2);    color: #c4a87a; border: 1px solid rgba(92,51,23,0.5); }
.theme-check {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-gold); color: #000;
  display: none; align-items: center; justify-content: center; flex-shrink: 0;
}
.theme-card.selected .theme-check { display: flex; }

/* =========================================================================
   FLOATING BOTTOM ROUTE & START BAR (Unmissable Start Button)
   ========================================================================= */
.floating-route-bar {
  position: fixed;
  bottom: calc(var(--safe-bottom) + 20px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 480px;
  z-index: 1500;
  background: rgba(15, 18, 25, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--accent-gold);
  border-radius: 20px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 24px rgba(245, 158, 11, 0.2);
  animation: slideUpRouteBar 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUpRouteBar {
  from { opacity: 0; transform: translate(-50%, 30px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.floating-route-info {
  flex: 1;
  min-width: 0;
}
.floating-route-time {
  font-size: 1.25rem;
  font-weight: 900;
  color: #38bdf8;
  font-family: var(--font-mono);
  line-height: 1.1;
}
.floating-route-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-route-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-floating-start {
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  color: #fff;
  border: none;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 11px 18px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.5);
  transition: all 0.2s ease;
}
.btn-floating-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(6, 182, 212, 0.65);
}

.btn-floating-cancel {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-floating-cancel:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: #ef4444;
}

/* Nav HUD Simulate Button */
.btn-sim-nav {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-sim-nav.active {
  background: var(--accent-gold);
  color: #000;
}

/* =========================================================================
   SPLASH / MAP LOADING SCREEN
   ========================================================================= */
.splash-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at 50% 40%, #151821 0%, #0a0b0e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  font-family: var(--font-sans);
}

.splash-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 24px;
}

.splash-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: rgba(245, 158, 11, 0.1);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.2);
  animation: pulseSplashLogo 2s infinite ease-in-out;
}

@keyframes pulseSplashLogo {
  0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(245, 158, 11, 0.2); }
  50% { transform: scale(1.05); box-shadow: 0 0 36px rgba(245, 158, 11, 0.4); }
}

.splash-title {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #fff;
  margin-bottom: 4px;
}

.splash-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.splash-spinner-wrap {
  width: 36px;
  height: 36px;
  position: relative;
  margin-bottom: 14px;
}

.splash-spinner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid rgba(245, 158, 11, 0.15);
  border-top-color: var(--accent-gold);
  animation: spinSplash 0.8s linear infinite;
}

@keyframes spinSplash {
  to { transform: rotate(360deg); }
}

.splash-status {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.3px;
}


