/* ============================================
   RouteX — Design System & Styles
   ============================================ */

/* --- Design Tokens --- */
:root {
  --bg-main: #FBF6EA;
  --surface: #FFFDF7;
  --surface-subtle: #F3E9D7;
  --text-primary: #3A2013;
  --text-secondary: #7A6A5A;
  --text-muted: #A89B8A;
  --accent: #DD8347;
  --accent-hover: #C16A30;
  --accent-light: #FBE4CC;
  --border-color: rgba(58,32,19,0.08);
  --success: #6E8B5C;
  --shadow-soft: 0 2px 8px rgba(58,32,19,0.06);
  --shadow-lifted: 0 12px 32px rgba(58,32,19,0.14);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Inter', -apple-system, sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font-family: var(--font-sans); cursor: pointer; border: none; outline: none; }
input { font-family: var(--font-sans); outline: none; }
img { max-width: 100%; display: block; }

/* --- Typography --- */
.font-serif { font-family: var(--font-serif); }
.eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
}
.wordmark {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.wordmark .x { color: var(--accent); }

/* --- Landing Page --- */
.landing-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 80px 0 48px;
}
.hero .eyebrow { margin-bottom: 16px; }
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.hero .subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  padding: 64px 0;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-soft);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lifted);
}
.feature-card .icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  margin-bottom: 14px;
}
.feature-card .icon-chip svg { width: 20px; height: 20px; stroke: var(--text-primary); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.feature-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Footer */
.landing-footer {
  text-align: center;
  padding: 32px 0 40px;
  border-top: 1px solid var(--border-color);
  margin-top: 16px;
}
.landing-footer .wordmark { font-size: 16px; }
.landing-footer p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ============================================
   Phone Frame
   ============================================ */
.phone-wrapper {
  display: flex;
  justify-content: center;
  margin: 0 auto;
}
.phone-frame {
  width: 375px;
  height: 812px;
  border-radius: 48px;
  border: 12px solid var(--text-primary);
  background: var(--text-primary);
  box-shadow: var(--shadow-lifted), 0 0 0 1px rgba(58,32,19,0.04);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
/* Dynamic Island */
.phone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 28px;
  background: #1a0e06;
  border-radius: 20px;
  z-index: 100;
}
/* Screen */
.phone-screen {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 36px;
  background: var(--bg-main);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* Status Bar */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  height: 44px;
  flex-shrink: 0;
  z-index: 50;
}
.status-bar .right-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}
.status-bar .right-icons svg {
  width: 14px; height: 14px; stroke: var(--text-primary); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
/* App Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px 10px;
  flex-shrink: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border-color);
}
.progress-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.progress-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 250ms ease;
}
.progress-dots .dot.active {
  width: 8px;
  height: 8px;
  background: var(--accent);
}
.progress-dots .dot.completed {
  background: var(--text-primary);
}
/* Screen Content Area */
.screen-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  -webkit-overflow-scrolling: touch;
}
.screen-area::-webkit-scrollbar { width: 0; }
/* Screens */
.screen {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  opacity: 0;
  transform: translateX(60px);
  pointer-events: none;
  transition: opacity 320ms ease-out, transform 320ms ease-out;
  -webkit-overflow-scrolling: touch;
}
.screen::-webkit-scrollbar { width: 0; }
.screen.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}
.screen.exit-left {
  opacity: 0;
  transform: translateX(-40px);
  pointer-events: none;
}
.screen.enter-right {
  opacity: 0;
  transform: translateX(60px);
}
/* Home Indicator */
.home-indicator {
  width: 134px;
  height: 5px;
  background: var(--text-primary);
  border-radius: 3px;
  margin: 8px auto 6px;
  flex-shrink: 0;
  opacity: 0.25;
}

/* ============================================
   Screen Components
   ============================================ */

/* Screen Title */
.screen-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.2;
}
.screen-subtitle {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}
/* Back Button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  padding: 4px 0;
  margin-bottom: 12px;
  transition: color 150ms;
}
.back-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.back-btn:hover { color: var(--text-primary); }

/* Input / Chip */
.input-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--text-primary);
  width: 100%;
}
.input-chip svg { width: 16px; height: 16px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; flex-shrink: 0; }
.input-chip .label { font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 2px; }
.input-chip .value { flex: 1; }

/* Destination Input */
.dest-input-wrap {
  position: relative;
  margin-top: 12px;
}
.dest-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--text-primary);
  transition: border-color 150ms, box-shadow 150ms;
}
.dest-input::placeholder { color: var(--text-muted); }
.dest-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(221,131,71,0.12); }
.dest-dropdown {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lifted);
  margin-top: 4px;
  z-index: 200;
  max-height: 260px;
  overflow-y: auto;
  display: none;
}
.dest-dropdown.show { display: block; }
.dest-dropdown-item {
  padding: 11px 14px;
  font-size: 13.5px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 100ms;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dest-dropdown-item svg { width: 14px; height: 14px; stroke: var(--text-muted); fill: none; stroke-width: 1.8; stroke-linecap: round; flex-shrink: 0; }
.dest-dropdown-item:hover { background: var(--surface-subtle); }

/* ============================================
   Priority / Selection Cards
   ============================================ */
.select-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: all 180ms ease;
  margin-bottom: 10px;
  position: relative;
}
.select-card:hover { border-color: rgba(58,32,19,0.15); }
.select-card.selected {
  background: var(--accent-light);
  border-color: var(--accent);
  box-shadow: var(--shadow-soft);
}
.select-card .card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface-subtle);
  flex-shrink: 0;
}
.select-card.selected .card-icon { background: rgba(221,131,71,0.15); }
.select-card .card-icon svg { width: 20px; height: 20px; stroke: var(--text-primary); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.select-card.selected .card-icon svg { stroke: var(--accent); }
.select-card .card-text { flex: 1; }
.select-card .card-text h4 { font-size: 14.5px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.select-card .card-text p { font-size: 12.5px; color: var(--text-secondary); line-height: 1.4; }
.select-card .radio-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 180ms ease;
  margin-top: 2px;
}
.select-card.selected .radio-circle {
  border-color: var(--accent);
  background: var(--accent);
}
.select-card.selected .radio-circle::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

/* Vehicle Card (for fastest) */
.vehicle-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 180ms ease;
  margin-bottom: 10px;
}
.vehicle-card:hover { border-color: rgba(58,32,19,0.15); }
.vehicle-card.selected {
  background: var(--accent-light);
  border-color: var(--accent);
  box-shadow: var(--shadow-soft);
}
.vehicle-card .card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface-subtle);
  flex-shrink: 0;
}
.vehicle-card.selected .card-icon { background: rgba(221,131,71,0.15); }
.vehicle-card .card-icon svg { width: 20px; height: 20px; stroke: var(--text-primary); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vehicle-card.selected .card-icon svg { stroke: var(--accent); }
.vehicle-card .card-text { flex: 1; }
.vehicle-card .card-text h4 { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.vehicle-card .card-text p { font-size: 12px; color: var(--text-secondary); }
.vehicle-card .card-price { text-align: right; }
.vehicle-card .card-price .eta { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.vehicle-card .card-price .price { font-size: 12px; color: var(--text-secondary); }
.vehicle-card .radio-circle {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--text-muted);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all 180ms; margin-left: 4px;
}
.vehicle-card.selected .radio-circle { border-color: var(--accent); background: var(--accent); }
.vehicle-card.selected .radio-circle::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: white; }

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
  width: 100%;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--text-primary);
  font-size: 14.5px;
  font-weight: 600;
  text-align: center;
  transition: all 150ms ease;
  border: none;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-lifted); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.4; pointer-events: none; }
.btn-primary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.btn-secondary {
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  transition: all 150ms ease;
}
.btn-secondary:hover { background: var(--surface-subtle); }
.btn-secondary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.btn-ghost {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 500;
  transition: all 150ms;
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: var(--surface); }

/* ============================================
   Sliders
   ============================================ */
.slider-group { margin-bottom: 24px; }
.slider-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.slider-label .label-text { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.slider-label .label-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.slider-track {
  position: relative;
  width: 100%;
  height: 6px;
  background: var(--surface-subtle);
  border-radius: 3px;
  cursor: pointer;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.slider-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  pointer-events: none;
}
.slider-thumb {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid white;
  box-shadow: 0 1px 4px rgba(58,32,19,0.2);
  transform: translate(-50%, -50%);
  cursor: grab;
  z-index: 2;
  transition: box-shadow 100ms;
}
.slider-thumb:active { cursor: grabbing; box-shadow: 0 2px 8px rgba(58,32,19,0.3); }

/* ============================================
   Itinerary Timeline
   ============================================ */
.itinerary-summary {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}
.itinerary-summary strong { color: var(--text-primary); }
.timeline {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 12px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.timeline::-webkit-scrollbar { display: none; }
.timeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.timeline-node .node-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-subtle);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--border-color);
  transition: all 150ms;
  margin-bottom: 6px;
}
.timeline-node:hover .node-icon,
.timeline-node.expanded .node-icon { border-color: var(--accent); background: var(--accent-light); }
.timeline-node .node-icon svg { width: 16px; height: 16px; stroke: var(--text-primary); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.timeline-node .node-duration { font-size: 11px; font-weight: 600; color: var(--text-primary); }
.timeline-node .node-detail { font-size: 10px; color: var(--text-muted); }
.timeline-connector {
  width: 24px; height: 2px; background: var(--text-muted); margin-top: 18px;
  flex-shrink: 0; opacity: 0.4;
}
/* Leg Override Panel */
.leg-override {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 8px 0 4px;
  display: none;
}
.leg-override.show { display: block; }
.leg-override .override-options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.leg-override .override-opt {
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 500;
  background: var(--surface-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 120ms;
}
.leg-override .override-opt:hover { color: var(--text-primary); }
.leg-override .override-opt.active {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

/* Sticky Total */
.total-bar {
  background: var(--surface);
  border-top: 1px solid var(--border-color);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.total-bar .total-cost { color: var(--accent); }

/* ============================================
   Constraint Failure
   ============================================ */
.no-route-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  margin: 16px 0;
}
.no-route-card svg { width: 32px; height: 32px; stroke: var(--text-muted); fill: none; stroke-width: 1.5; stroke-linecap: round; margin-bottom: 10px; }
.no-route-card h4 { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.no-route-card p { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 14px; }
.no-route-card .quick-fixes {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 10px;
}
.no-route-card .quick-fix-btn {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 150ms;
}
.no-route-card .quick-fix-btn:hover { background: var(--accent); color: white; }
.no-route-card .adjust-link {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  text-decoration: underline;
}

/* ============================================
   Route Result Cards (Screen 3)
   ============================================ */
.route-option-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 180ms;
  margin-bottom: 8px;
}
.route-option-card:hover { border-color: rgba(58,32,19,0.15); }
.route-option-card.selected {
  background: var(--accent-light);
  border-color: var(--accent);
  box-shadow: var(--shadow-soft);
}
.route-option-card .card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.route-option-card .card-top h4 { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.route-option-card .card-top .badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--accent-light);
  color: var(--accent);
}
.route-option-card .card-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.route-option-card .card-stats strong { color: var(--text-primary); }
.route-option-card .card-legs {
  display: flex;
  gap: 6px;
  align-items: center;
}
.route-option-card .card-legs svg { width: 14px; height: 14px; stroke: var(--text-muted); fill: none; stroke-width: 1.8; stroke-linecap: round; }
.route-option-card.selected .card-legs svg { stroke: var(--accent); }

/* ============================================
   Driver Card (Screen 4)
   ============================================ */
.driver-card {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -4px 24px rgba(58,32,19,0.1);
  padding: 20px;
  z-index: 60;
  transform: translateY(100%);
  transition: transform 400ms ease-out;
}
.driver-card.show { transform: translateY(0); }
.driver-card .driver-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.driver-card .driver-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface-subtle);
  display: flex; align-items: center; justify-content: center;
}
.driver-card .driver-avatar svg { width: 22px; height: 22px; stroke: var(--text-primary); fill: none; stroke-width: 1.8; stroke-linecap: round; }
.driver-card .driver-info { flex: 1; }
.driver-card .driver-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.driver-card .driver-vehicle { font-size: 12px; color: var(--text-secondary); }
.driver-card .driver-rating {
  display: flex; align-items: center; gap: 3px;
  font-size: 12px; font-weight: 600; color: var(--text-primary);
}
.driver-card .driver-rating svg { width: 12px; height: 12px; fill: var(--accent); stroke: none; }
.driver-card .eta-row {
  font-size: 18px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.driver-card .eta-row span { color: var(--accent); }
.driver-card .action-btns {
  display: flex;
  gap: 10px;
}
.driver-card .action-btns .btn-ghost { flex: 1; text-align: center; }

/* Leg Indicator */
.leg-indicator {
  position: absolute;
  top: 52px; left: 12px; right: 12px;
  background: rgba(255,253,247,0.92);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  z-index: 60;
  text-align: center;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transition: opacity 300ms;
}
.leg-indicator.show { opacity: 1; }

/* ============================================
   Arrived State
   ============================================ */
.arrived-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-main);
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms;
}
.arrived-overlay.show { opacity: 1; pointer-events: all; }
.arrived-checkmark {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--success);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  transform: scale(0);
  transition: transform 400ms cubic-bezier(0.34,1.56,0.64,1);
}
.arrived-overlay.show .arrived-checkmark { transform: scale(1); }
.arrived-checkmark svg { width: 32px; height: 32px; stroke: white; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.arrived-overlay h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.receipt-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  width: 100%;
  margin-bottom: 16px;
}
.receipt-card .receipt-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  padding: 5px 0;
  color: var(--text-secondary);
}
.receipt-card .receipt-row.total {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  margin-top: 4px;
}
.receipt-card .receipt-row .savings { color: var(--success); font-weight: 600; }

/* ============================================
   Map Container
   ============================================ */
.map-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: var(--surface-subtle);
}
.map-container .leaflet-container { border-radius: var(--radius-md); }
.leaflet-control-zoom { border: none !important; box-shadow: var(--shadow-soft) !important; }
.leaflet-control-zoom a {
  background: var(--surface) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 8px !important;
  width: 28px !important; height: 28px !important; line-height: 28px !important;
  font-size: 14px !important;
}
.leaflet-control-attribution { font-size: 9px !important; opacity: 0.5; }

/* Custom map markers */
.map-marker-pickup {
  width: 16px; height: 16px;
  background: var(--accent);
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.map-marker-dest {
  width: 16px; height: 16px;
  background: var(--text-primary);
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.map-marker-vehicle {
  width: 20px; height: 20px;
  background: var(--accent);
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(221,131,71,0.4);
}

/* ============================================
   Toast
   ============================================ */
.toast {
  position: absolute;
  bottom: 80px; left: 16px; right: 16px;
  background: var(--text-primary);
  color: var(--surface);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  text-align: center;
  z-index: 300;
  opacity: 0;
  transform: translateY(20px);
  transition: all 250ms ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ============================================
   Loading Shimmer
   ============================================ */
.shimmer {
  background: linear-gradient(90deg, var(--surface-subtle) 25%, var(--surface) 50%, var(--surface-subtle) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.shimmer-line { height: 14px; margin-bottom: 8px; width: 80%; }
.shimmer-line.short { width: 50%; }
.shimmer-card { height: 60px; margin-bottom: 10px; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 600px) {
  .hero { padding: 48px 0 24px; }
  .hero h1 { font-size: 28px; }
  .phone-frame {
    width: calc(100vw - 32px);
    height: calc((100vw - 32px) * 2.165);
    border-radius: 36px;
    border-width: 10px;
  }
  .phone-screen { border-radius: 26px; }
  .phone-notch { width: 80px; height: 22px; top: 6px; }
  .feature-grid { grid-template-columns: 1fr; }
  .landing-page { padding: 0 16px; }
}
@media (min-width: 601px) and (max-width: 900px) {
  .phone-frame {
    width: 340px;
    height: 735px;
  }
}

/* ============================================
   Utility Animations
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes countPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.anim-fade-in-up { animation: fadeInUp 300ms ease-out both; }
