/* Sakay — Green theme */
/* Amadeo · Silang · Tagaytay */

:root {
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-300: #86efac;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --green-900: #14532d;
  --green-950: #052e16;

  --primary: var(--green-700);
  --primary-hover: var(--green-600);
  --primary-light: var(--green-100);
  --accent: var(--green-500);
  --surface: #ffffff;
  --bg: var(--green-50);
  --text: #1f2937;
  --text-muted: #6b7280;

  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Splash */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none; /* let clicks pass through to landing/role buttons */
}
.splash.hidden {
  animation: splashOut 0.5s ease forwards;
  pointer-events: none;
}
.splash-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--green-50) 0%, var(--green-100) 50%, var(--green-200) 100%);
  pointer-events: none; /* let clicks pass through to role buttons below */
}
.splash-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, var(--green-300) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, var(--green-200) 0%, transparent 40%);
  opacity: 0.6;
}
.splash-content {
  position: relative;
  z-index: 1;
  text-align: center;
  pointer-events: none; /* clicks pass through; splash auto-dismisses at 2.5s */
}
.splash-image {
  max-width: 12rem;
  max-height: 12rem;
  object-fit: contain;
  animation: splashImage 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
  transform: scale(0.8) translateY(10px);
}
@keyframes splashImage {
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.splash-logo {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--green-800);
  letter-spacing: -0.03em;
  margin-top: 0.75rem;
  animation: splashLogo 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards;
  opacity: 0;
  transform: scale(0.6) translateY(10px);
}
.splash-tagline {
  font-size: 0.9375rem;
  color: var(--green-700);
  margin-top: 0.5rem;
  animation: splashTagline 0.6s ease 0.5s forwards;
  opacity: 0;
  transform: translateY(8px);
}
.splash-loader {
  margin-top: 2rem;
  width: 8rem;
  height: 4px;
  background: var(--green-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.splash-loader-bar {
  height: 100%;
  width: 30%;
  background: var(--primary);
  border-radius: var(--radius-full);
  animation: splashLoader 1.5s ease-in-out infinite;
}
@keyframes splashLogo {
  0% { opacity: 0; transform: scale(0.6) translateY(20px); }
  60% { opacity: 1; transform: scale(1.05) translateY(0); }
  80% { transform: scale(0.98) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes splashTagline {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes splashLoader {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(200%); }
  100% { transform: translateX(-100%); }
}
@keyframes splashOut {
  to { opacity: 0; visibility: hidden; }
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

body {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* App layout */
.app { padding-bottom: 4rem; }
.section.fullscreen { padding: 0; min-height: 100vh; }
.section.fullscreen .map-container { height: 100vh; min-height: 400px; }

/* Bottom nav */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--green-200);
  padding: 0.5rem;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0));
  z-index: 100;
}

.bottom-nav.visible { display: flex; justify-content: space-around; }

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: color 0.15s;
}

.nav-item svg { width: 24px; height: 24px; }
.nav-item.active { color: var(--primary); }
.nav-item:hover { color: var(--primary); }

/* Hero / Landing */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--green-200) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%, var(--green-100) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner { position: relative; z-index: 1; max-width: 28rem; width: 100%; }

.logo { font-size: 2.75rem; font-weight: 800; color: var(--green-800); letter-spacing: -0.02em; margin-bottom: 0.5rem; display: block; }
.tagline { font-size: 1.125rem; color: var(--text-muted); margin-bottom: 2rem; }

.places { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 2.5rem; }

.place-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--green-200);
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--green-800);
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.place-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--green-300); }
.place-badge svg { width: 1rem; height: 1rem; color: var(--green-600); }

.role-buttons { display: flex; flex-direction: column; gap: 1rem; }
.role-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}
.role-btn svg { width: 1.5rem; height: 1.5rem; }
.role-btn--passenger { background: var(--primary); color: white; box-shadow: var(--shadow); }
.role-btn--passenger:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.role-btn--driver { background: var(--surface); color: var(--green-800); border: 2px solid var(--green-300); }
.role-btn--driver:hover { background: var(--green-50); border-color: var(--green-500); transform: translateY(-1px); }

.hero-footer { margin-top: 2.5rem; font-size: 0.8125rem; color: var(--text-muted); }
.hero-footer strong { color: var(--green-700); }

/* Sections */
.section { display: none; min-height: 100vh; padding: 2rem 1.5rem; animation: fadeIn 0.3s ease; }
.section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Header */
.header-bar { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; margin-bottom: 1.5rem; }
.header-bar.compact { padding: 0.75rem 1rem; margin-bottom: 0; }
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  color: var(--green-700);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: background 0.15s;
}
.back-btn:hover { background: var(--green-100); }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--green-200);
  border-radius: var(--radius-md);
  color: var(--green-700);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.15s;
}
.btn-icon:hover { background: var(--green-100); }

/* Map */
.map-container { position: relative; height: 100%; }
.map {
  width: 100%;
  height: 100%;
  min-height: 300px;
}
.leaflet-container { font-family: "DM Sans", sans-serif; }

.map-overlay-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding: 0.5rem 1rem;
}

/* Booking panel */
.booking-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 1rem 1.5rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0));
  box-shadow: 0 -4px 20px rgb(0 0 0 / 0.1);
  z-index: 600;
}

.booking-panel-handle {
  width: 2rem;
  height: 0.25rem;
  background: var(--green-300);
  border-radius: var(--radius-full);
  margin: 0 auto 1rem;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--green-50);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  border: 1px solid var(--green-200);
}

.input-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  flex-shrink: 0;
}
.input-dot.pickup { background: var(--green-500); }
.input-dot.dropoff { background: var(--green-700); }

.input-row input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--text);
  outline: none;
}
.input-row input::placeholder { color: var(--text-muted); }

.location-input-wrap { position: relative; margin-bottom: 0.5rem; }
.location-quick-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }
.quick-action { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; font-size: 0.8125rem; background: var(--green-100); color: var(--green-800); border: 1px solid var(--green-200); border-radius: var(--radius-full); cursor: pointer; font-weight: 500; }
.quick-action:hover { background: var(--green-200); }
.quick-action-icon { font-size: 0.875rem; }
.autocomplete-dropdown { display: none; position: absolute; top: 100%; left: 0; right: 0; margin-top: 2px; background: var(--surface); border: 1px solid var(--green-200); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); max-height: 12rem; overflow-y: auto; z-index: 610; }
.autocomplete-dropdown.visible { display: block; }
.autocomplete-item { padding: 0.75rem 1rem; font-size: 0.9375rem; cursor: pointer; border-bottom: 1px solid var(--green-100); display: flex; align-items: center; gap: 0.5rem; }
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: var(--green-50); }
.autocomplete-item svg { width: 1rem; height: 1rem; color: var(--green-600); flex-shrink: 0; }
.pin-hint { display: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 0.75rem 1.25rem; background: var(--green-800); color: white; font-size: 0.875rem; border-radius: var(--radius-md); white-space: nowrap; z-index: 600; box-shadow: var(--shadow-lg); }
.pin-hint.visible { display: block; animation: pinHintPulse 2s ease; }
@keyframes pinHintPulse { 0%,100%{opacity:1} 50%{opacity:0.9} }

.fare-row { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--green-200); }
.fare-breakdown { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.9375rem; color: var(--text-muted); }
.fare-total { display: flex; justify-content: space-between; align-items: center; margin-top: 0.75rem; font-weight: 700; color: var(--green-800); }
.fare-total span:last-child { font-size: 1.25rem; color: var(--primary); }

.submit-btn {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1rem;
  transition: background 0.2s;
}
.submit-btn:hover { background: var(--primary-hover); }

/* Ride overlay */
.ride-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--surface);
  z-index: 1000;
  padding: 2rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ride-overlay.visible { display: flex; }

.ride-state { display: none; text-align: center; }
.ride-overlay.visible .ride-state.active { display: block; }

.spinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid var(--green-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.driver-card-inline {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--green-50);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.driver-avatar {
  width: 3rem;
  height: 3rem;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.driver-info { display: flex; flex-direction: column; align-items: flex-start; }
.driver-info strong { font-size: 1.125rem; }
.driver-info span { font-size: 0.875rem; color: var(--text-muted); }

.btn-outline {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 2px solid var(--green-500);
  color: var(--green-700);
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-top: 0.5rem;
}

.ride-status-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--green-100);
  color: var(--green-800);
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.ride-completed-icon {
  width: 4rem;
  height: 4rem;
  background: var(--green-500);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.fare-final { font-size: 1.5rem; font-weight: 700; color: var(--primary); margin: 0.5rem 0 1rem; }

/* Driver panel */
.driver-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 1.5rem;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0));
  box-shadow: 0 -4px 20px rgb(0 0 0 / 0.1);
  z-index: 600;
}

.driver-panel-msg { color: var(--text-muted); margin-bottom: 1rem; text-align: center; }

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--green-100);
  color: var(--green-800);
  border-radius: var(--radius-full);
  font-weight: 600;
}
.status-indicator.small { padding: 0.375rem 0.75rem; font-size: 0.875rem; }
.status-indicator .dot { width: 0.5rem; height: 0.5rem; background: var(--green-500); border-radius: 50%; animation: pulse 2s infinite; }
.status-indicator.offline .dot { background: var(--text-muted); animation: none; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.toggle-online { width: 100%; padding: 1rem; background: var(--primary); color: white; border: none; border-radius: var(--radius-md); font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.toggle-online:hover { background: var(--primary-hover); }
.toggle-online.offline { background: #dc2626; }

/* Incoming ride */
.incoming-ride {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 1.5rem;
  box-shadow: 0 -4px 20px rgb(0 0 0 / 0.1);
  z-index: 700;
}

.incoming-ride.visible { display: block; }
.incoming-ride-header { font-weight: 700; color: var(--green-800); margin-bottom: 0.75rem; }
.incoming-ride-route { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 1rem; font-size: 0.9375rem; }
.incoming-ride-route .from { color: var(--text-muted); }
.incoming-ride-route .to { font-weight: 600; }
.incoming-ride-fare { font-size: 1.25rem; font-weight: 700; color: var(--primary); margin-bottom: 1rem; }
.incoming-ride-actions { display: flex; gap: 0.75rem; }
.btn-decline { flex: 1; padding: 1rem; background: var(--green-100); color: var(--green-800); border: none; border-radius: var(--radius-md); font-weight: 600; cursor: pointer; }
.btn-accept { flex: 2; padding: 1rem; background: var(--primary); color: white; border: none; border-radius: var(--radius-md); font-weight: 600; cursor: pointer; }

/* Driver ride panel */
.driver-ride-panel {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 1.5rem;
  box-shadow: 0 -4px 20px rgb(0 0 0 / 0.1);
  z-index: 700;
}

.driver-ride-panel.visible { display: block; }
.driver-ride-info { margin-bottom: 1rem; }
.driver-ride-info div { padding: 0.5rem 0; font-size: 0.9375rem; }
.driver-ride-panel .submit-btn { margin-top: 0.5rem; }
.driver-ride-panel .submit-btn.hidden { display: none; }

/* Rides list */
.rides-list { max-width: 28rem; margin: 0 auto; }
.ride-item {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
}

.ride-item-route { font-size: 0.9375rem; margin-bottom: 0.5rem; }
.ride-item-meta { font-size: 0.8125rem; color: var(--text-muted); }
.ride-item-fare { font-weight: 700; color: var(--primary); margin-top: 0.5rem; }
.ride-item-view { font-size: 0.8125rem; color: var(--green-600); margin-top: 0.25rem; }
.ride-item:hover .ride-item-view { text-decoration: underline; }

/* Payment, promo, schedule */
.payment-methods { margin-top: 0.75rem; }
.label-sm { font-size: 0.75rem; color: var(--text-muted); display: block; margin-bottom: 0.25rem; }
.payment-options { display: flex; gap: 1rem; flex-wrap: wrap; }
.payment-opt { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9375rem; cursor: pointer; }
.promo-row { display: flex; gap: 0.5rem; margin-top: 0.5rem; align-items: center; }
.promo-row input { flex: 1; padding: 0.5rem; border: 1px solid var(--green-200); border-radius: var(--radius-sm); }
.btn-link { background: none; border: none; color: var(--primary); font-weight: 600; cursor: pointer; }
.schedule-row { margin-top: 0.75rem; font-size: 0.9375rem; }
.schedule-opt { margin-right: 1rem; cursor: pointer; }
.schedule-picker { margin-top: 0.5rem; display: flex; gap: 0.5rem; }
.schedule-picker input { padding: 0.5rem; border: 1px solid var(--green-200); border-radius: var(--radius-sm); }
.schedule-confirm { margin-top: 0.5rem; font-size: 0.875rem; color: var(--green-700); }
.cancel-reasons { display: flex; flex-direction: column; gap: 0.5rem; margin: 1rem 0; }
.cancel-reason-btn { padding: 0.75rem; text-align: left; background: var(--green-50); border: 1px solid var(--green-200); border-radius: var(--radius-md); cursor: pointer; font-size: 0.9375rem; }
.cancel-reason-btn:hover { background: var(--green-100); }
.rate-thanks { margin-top: 0.75rem; padding: 0.5rem; color: var(--green-700); font-weight: 600; }

/* Cancel, share, safety */
.btn-ghost { background: none; border: none; color: var(--text-muted); font-size: 0.875rem; margin-top: 1rem; cursor: pointer; text-decoration: underline; }
.driver-actions { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; flex-wrap: wrap; }
.btn-icon-sm { display: inline-flex; width: 2.25rem; height: 2.25rem; align-items: center; justify-content: center; background: var(--green-100); border: none; border-radius: var(--radius-md); color: var(--green-700); cursor: pointer; }
.btn-safety { margin-top: 0.5rem; padding: 0.5rem 1rem; background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; border-radius: var(--radius-md); font-size: 0.875rem; cursor: pointer; }

/* Receipt, rate */
.receipt-mini { text-align: left; background: var(--green-50); padding: 0.75rem; border-radius: var(--radius-md); margin: 1rem 0; font-size: 0.875rem; }
.receipt-line { display: flex; justify-content: space-between; }
.receipt-total { font-weight: 700; margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--green-200); }
.rate-driver { margin: 1rem 0; }
.rate-driver .label-sm { margin-bottom: 0.5rem; }
.stars { font-size: 1.5rem; color: var(--green-300); cursor: pointer; letter-spacing: 0.25rem; }
.stars span:hover, .stars span.filled { color: var(--green-600); }
.rate-driver input { width: 100%; margin-top: 0.5rem; padding: 0.5rem; border: 1px solid var(--green-200); border-radius: var(--radius-sm); }
.completed-actions { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; }

/* Profile */
.profile-content { max-width: 28rem; margin: 0 auto; }
.profile-card { text-align: center; padding: 2rem; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: 1rem; }
.profile-avatar { width: 4rem; height: 4rem; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; margin: 0 auto 0.5rem; }
.menu-list { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.menu-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--green-100); transition: background 0.15s; }
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: var(--green-50); }

/* Driver earnings */
.driver-earnings-inline { display: flex; gap: 1.5rem; margin-bottom: 1rem; font-size: 0.875rem; }
.driver-earnings-inline div { display: flex; flex-direction: column; }
.driver-earnings-inline strong { color: var(--primary); font-size: 1.125rem; }

/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.visible { display: flex; }
.modal { background: var(--surface); padding: 1.5rem; border-radius: var(--radius-lg); max-width: 28rem; width: 100%; max-height: 80vh; overflow-y: auto; }
.modal h3 { margin-bottom: 1rem; }
.modal p { margin-bottom: 0.75rem; font-size: 0.9375rem; }
.modal-llewyn { text-align: center; }
.modal-llewyn .llewyn-image { width: 8rem; height: 8rem; object-fit: contain; margin-bottom: 1rem; border-radius: var(--radius-lg); }
.modal-llewyn .llewyn-link { display: inline-block; margin: 0.5rem 0 1rem; font-size: 1rem; font-weight: 600; color: var(--primary); text-decoration: none; }
.modal-llewyn .llewyn-link:hover { text-decoration: underline; }
.modal-llewyn p a { color: var(--primary); text-decoration: none; }
.modal-llewyn p a:hover { text-decoration: underline; }
.saved-place-item { display: block; width: 100%; padding: 0.75rem; text-align: left; background: var(--green-50); border: 1px solid var(--green-200); border-radius: var(--radius-md); margin-bottom: 0.5rem; cursor: pointer; font-size: 0.9375rem; }
.saved-place-item:hover { background: var(--green-100); }
.saved-place-item { display: block; width: 100%; padding: 0.75rem; text-align: left; background: var(--green-50); border: 1px solid var(--green-200); border-radius: var(--radius-md); margin-bottom: 0.5rem; cursor: pointer; font-size: 0.9375rem; }
.saved-place-item:hover { background: var(--green-100); }
.promo-line { display: flex; justify-content: space-between; }

.text-muted { color: var(--text-muted); }

/* Footer */
.app-footer {
  padding: 0.5rem 1rem;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0));
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--green-200);
}
.app-footer a {
  color: var(--green-700);
  text-decoration: none;
  font-weight: 600;
}
.app-footer a:hover {
  text-decoration: underline;
}

/* Hidden */
.hidden { display: none !important; }

/* Responsive */
@media (min-width: 640px) {
  .hero-inner { max-width: 32rem; }
  .role-buttons { flex-direction: row; justify-content: center; }
  .role-btn { min-width: 10rem; }
  .booking-panel, .driver-panel, .incoming-ride, .driver-ride-panel { max-width: 28rem; left: 50%; transform: translateX(-50%); }
}
