:root {
  --navy-950: #040F21;
  --navy-900: #0A192F;
  --navy-800: #112240;
  --blue-600: #2563EB;
  --blue-500: #3B82F6;
  --blue-50: #EFF6FF;
  --teal-600: #0D9488;
  --amber-500: #F59E0B;
  --emerald-600: #059669;
  --red-600: #DC2626;

  --bg-app: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --border-color: #E2E8F0;
  --shadow-sm: 0 2px 8px rgba(4, 15, 33, 0.05);
  --shadow-md: 0 8px 24px rgba(4, 15, 33, 0.09);
  --shadow-lg: 0 16px 36px rgba(4, 15, 33, 0.14);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-height: 64px;
}

[data-theme="dark"] {
  --bg-app: #040F21;
  --bg-surface: #0D1B30;
  --bg-subtle: #152642;
  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --border-color: #1E3354;
  --blue-50: rgba(37, 99, 235, 0.16);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.6);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #020813;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

input, textarea, select, button {
  font-family: inherit;
  user-select: auto;
}

/* App Shell (Full-bleed on mobile, centered sleek frame on desktop) */
#app-shell {
  position: relative;
  width: 100%;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-app);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
}

.hidden {
  display: none !important;
}

/* Splash & Auth Screens */
.auth-screen {
  position: absolute;
  inset: 0;
  z-index: 2000;
  background: var(--bg-app);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.auth-hero {
  background: var(--navy-950);
  padding: calc(var(--safe-top) + 32px) 24px 36px;
  color: #FFFFFF;
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.auth-logo {
  height: 68px;
  width: auto;
  object-fit: contain;
  margin-bottom: 12px;
}

.auth-hero h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.auth-hero p {
  font-size: 13px;
  color: #94A3B8;
  font-weight: 400;
}

.auth-card {
  margin: -20px 18px 24px;
  background: var(--bg-surface);
  border-radius: 20px;
  padding: 22px 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.auth-tabs {
  display: flex;
  background: var(--bg-subtle);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 18px;
}

.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.auth-tab.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.field-group {
  margin-bottom: 14px;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.field-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.field-input:focus {
  border-color: var(--blue-600);
  background: var(--bg-surface);
}

.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.role-pill {
  padding: 11px 10px;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.role-pill.active {
  border-color: var(--blue-600);
  background: var(--blue-50);
  color: var(--blue-600);
}

.btn-primary {
  width: 100%;
  padding: 13px 16px;
  border: none;
  border-radius: 12px;
  background: var(--blue-600);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.15s, transform 0.1s;
}

.btn-primary:active {
  transform: scale(0.985);
}

.btn-secondary {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.auth-error {
  background: rgba(220, 38, 38, 0.1);
  color: var(--red-600);
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}

/* Main Content Views */
#main-views {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.tab-view {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 24px;
  background: var(--bg-app);
}

#view-map {
  overflow: hidden;
  padding-bottom: 0;
}

/* Home View */
.home-header {
  background: var(--navy-950);
  padding: calc(var(--safe-top) + 16px) 20px 24px;
  color: #FFFFFF;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
}

.home-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-lockup img {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 600;
  color: #E2E8F0;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.pulse-dot.idle {
  background: #94A3B8;
  box-shadow: none;
}

.search-trigger-btn {
  width: 100%;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: none;
  border-radius: 16px;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  text-align: left;
}

.search-trigger-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--blue-50);
  color: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search-trigger-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.home-body {
  padding: 18px 18px 28px;
}

/* iOS Install Prompt Banner */
.ios-install-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 3.5px solid var(--blue-600);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.ios-install-card h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 3px;
}

.ios-install-card p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.icon-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

/* Quick Destinations Card */
.surface-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.dest-row {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  cursor: pointer;
  text-align: left;
  color: var(--text-primary);
}

.dest-row:last-child {
  border-bottom: none;
}

.dest-row:active {
  background: var(--bg-subtle);
}

.dest-icon-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dest-icon-circle.accent {
  background: var(--blue-50);
  color: var(--blue-600);
}

.dest-info {
  flex: 1;
  min-width: 0;
}

.dest-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dest-sub {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

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

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.section-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Sponsored Ad Carousel (Exact 140px sleek card) */
.ads-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.ads-carousel::-webkit-scrollbar {
  display: none;
}

.ad-card {
  position: relative;
  flex: 0 0 92%;
  height: 140px;
  border-radius: 18px;
  overflow: hidden;
  scroll-snap-align: start;
  cursor: pointer;
  background: var(--navy-950);
  box-shadow: var(--shadow-sm);
}

.ad-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.ad-card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(95deg, rgba(4, 15, 33, 0.93) 0%, rgba(4, 15, 33, 0.72) 58%, rgba(4, 15, 33, 0.28) 100%);
}

.ad-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 13px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #FFFFFF;
}

.ad-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ad-sponsored-line {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #93C5FD;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-promo-pill {
  flex-shrink: 0;
  background: var(--blue-600);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.ad-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 3px;
}

.ad-desc {
  font-size: 12px;
  color: #E2E8F0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Corridors Quick List on Home */
.corridor-chip-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.corridor-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.corridor-left {
  display: flex;
  align-items: center;
  gap: 11px;
}

.corridor-badge-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--navy-950);
  display: flex;
  align-items: center;
  justify-content: center;
}

.corridor-badge-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* Map View */
#view-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding-bottom: 0;
}

#leaflet-map {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: #E2E8F0;
}

.btn-google {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
  transition: transform 0.1s, background 0.15s;
}

.btn-google:active {
  transform: scale(0.985);
  background: var(--bg-subtle);
}

.admin-subtabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 14px;
  padding-bottom: 2px;
}

.admin-subtab {
  flex-shrink: 0;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.admin-subtab.active {
  background: var(--navy-950);
  color: #FFFFFF;
  border-color: var(--navy-950);
}

[data-theme="dark"] .admin-subtab.active {
  background: var(--blue-600);
  border-color: var(--blue-600);
}

.tier-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.tier-card {
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--bg-subtle);
  cursor: pointer;
  text-align: left;
}

.tier-card.active {
  border-color: var(--blue-600);
  background: var(--blue-50);
}

.Sponsored-stop-badge {
  background: #040F21;
  color: #93C5FD;
  border: 2px solid #2563EB;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(4, 15, 33, 0.35);
}

.map-top-bar {
  position: absolute;
  top: calc(var(--safe-top) + 12px);
  left: 12px;
  right: 12px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-search-pill {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 11px 14px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-width: 0;
}

.map-search-pill span {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.map-fab {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* Pin Picker Crosshair */
.pin-picker-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 450;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-crosshair {
  transform: translateY(-18px);
  filter: drop-shadow(0 6px 10px rgba(4, 15, 33, 0.35));
}

.pin-confirm-sheet {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 14px;
  z-index: 520;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
}

/* Floating Route Bottom Sheet */
.route-sheet {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 510;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  max-height: 54%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: max-height 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.route-sheet.compact {
  max-height: 128px;
}

.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 99px;
  background: var(--border-color);
  margin: 8px auto 4px;
  flex-shrink: 0;
}

.route-options-tabs {
  display: flex;
  gap: 6px;
  padding: 4px 14px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}

.route-opt-chip {
  flex-shrink: 0;
  padding: 6px 11px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.route-opt-chip.active {
  background: var(--navy-950);
  color: #FFFFFF;
  border-color: var(--navy-950);
}

[data-theme="dark"] .route-opt-chip.active {
  background: var(--blue-600);
  border-color: var(--blue-600);
}

.route-header-box {
  padding: 6px 16px 12px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

.route-main-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.route-dir-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.route-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--blue-50);
  color: var(--blue-600);
}

.route-live-badge.live {
  background: rgba(5, 150, 105, 0.12);
  color: var(--emerald-600);
}

.route-eta-box {
  text-align: right;
  flex-shrink: 0;
}

.route-eta-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.route-eta-unit {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.route-cost-tag {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 700;
  color: var(--emerald-600);
}

.route-actions-bar {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.chip-action-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.chip-action-btn.primary {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: #FFFFFF;
}

.steps-scroll {
  padding: 10px 16px 14px;
  overflow-y: auto;
  flex: 1;
}

.step-item {
  display: flex;
  gap: 11px;
  padding-bottom: 12px;
  position: relative;
}

.step-item:last-child {
  padding-bottom: 0;
}

.step-dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 20px;
  flex-shrink: 0;
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue-600);
  margin-top: 4px;
}

.step-dot.walk {
  background: #64748B;
}

.step-dot.bus2 {
  background: var(--teal-600);
}

.step-line {
  flex: 1;
  width: 2px;
  background: var(--border-color);
  margin-top: 4px;
}

.step-item:last-child .step-line {
  display: none;
}

.step-body {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.38;
}

.change-stop-inline {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(37, 99, 235, 0.35);
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

/* Modals / Drawers (Search, Cambiar Parada, Report) */
.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1200;
  background: rgba(4, 15, 33, 0.58);
  backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.modal-backdrop.fullscreen {
  justify-content: flex-start;
  background: var(--bg-app);
}

.modal-sheet {
  background: var(--bg-surface);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  max-height: 82%;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--safe-bottom) + 16px);
  box-shadow: var(--shadow-lg);
}

.search-modal-header {
  padding: calc(var(--safe-top) + 14px) 16px 12px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg-subtle);
  border-radius: 12px;
  padding: 0 12px;
  border: 1.5px solid var(--blue-600);
}

.search-input-wrap input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 11px 6px;
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
}

.search-results-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 24px;
}

/* Community & Profile Headers */
.page-header {
  background: var(--navy-950);
  color: #FFFFFF;
  padding: calc(var(--safe-top) + 18px) 20px 20px;
  border-bottom-left-radius: 22px;
  border-bottom-right-radius: 22px;
}

.page-header h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.page-header p {
  font-size: 12.5px;
  color: #94A3B8;
  margin-top: 3px;
}

.page-content {
  padding: 16px 18px 30px;
}

.share-combi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.share-combi-card.active-sharing {
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.incident-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

/* Bottom Navigation Bar (iOS Safe-Area Native Feel) */
#bottom-nav {
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 900;
  flex-shrink: 0;
}

.nav-item {
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s;
}

.nav-item.active {
  color: var(--blue-600);
}

/* Custom Leaflet Markers */
.combi-marker-wrap {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s linear;
}

.combi-marker-inner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #040F21;
  border: 2px solid #2563EB;
  box-shadow: 0 4px 12px rgba(4, 15, 33, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.combi-marker-inner.community {
  border-color: #059669;
}

.combi-marker-inner img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.stop-dot-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid #2563EB;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.stop-dot-marker.selected-boarding {
  width: 16px;
  height: 16px;
  background: #2563EB;
  border: 3px solid #FFFFFF;
}

.user-gps-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2563EB;
  border: 3px solid #FFFFFF;
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.24);
}

/* Toast Notification */
#toast-box {
  position: absolute;
  top: calc(var(--safe-top) + 14px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  background: var(--navy-950);
  color: #FFFFFF;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  white-space: nowrap;
  max-width: 92%;
  overflow: hidden;
  text-overflow: ellipsis;
}
