:root {
  color-scheme: light;
  --ink: #10241f;
  --muted: #687b75;
  --paper: #f5f3ec;
  --card: #fffef9;
  --green: #124f42;
  --lime: #c9f36b;
  --line: #dce2db;
  --danger: #b84e3a;
  --shadow: 0 20px 70px rgba(16, 36, 31, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); min-height: 100vh; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.shell { max-width: 1240px; margin: 0 auto; padding: 24px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { display: block; width: 120px; height: 40px; }
.brand-product { color: var(--green); font-size: 13px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.nav-links { display: flex; gap: 8px; padding: 5px; border-radius: 999px; background: rgba(255,255,255,.65); border: 1px solid var(--line); }
.nav-links a { padding: 9px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 700; }
.nav-links a.active { color: white; background: var(--green); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.account-bar { display: flex; align-items: center; gap: 16px; margin: -10px 0 20px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,254,249,.86); }
.account-bar > div { display: grid; gap: 3px; margin-right: auto; }
.account-bar span { color: var(--muted); font-size: 13px; }
.auth-form { display: flex; gap: 8px; }
.auth-form input { min-width: 210px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: white; color: var(--ink); }
.form-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.grid { display: grid; grid-template-columns: minmax(320px, 440px) 1fr; gap: 22px; min-height: calc(100vh - 120px); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); }
.booking-panel { padding: 28px; display: flex; flex-direction: column; }
.eyebrow { margin: 0 0 10px; color: var(--green); font-weight: 850; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(34px, 5vw, 58px); line-height: .98; letter-spacing: -.055em; margin-bottom: 16px; }
h2 { font-size: 25px; letter-spacing: -.025em; }
.lede { color: var(--muted); font-size: 16px; line-height: 1.6; }

.field-stack { display: grid; gap: 10px; margin: 20px 0; }
.autocomplete-field { position: relative; }
.input-wrap { display: grid; grid-template-columns: 24px 1fr; align-items: center; gap: 10px; background: #f2f4ee; border: 1px solid transparent; border-radius: 16px; padding: 5px 14px; }
.input-wrap:focus-within { border-color: var(--green); background: white; }
.input-wrap span { font-size: 14px; color: var(--green); }
.input-wrap input { width: 100%; border: 0; outline: 0; background: transparent; padding: 14px 0; color: var(--ink); }
.suggestions { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; max-height: 270px; overflow: auto; padding: 7px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.suggestion { width: 100%; display: grid; gap: 3px; padding: 11px 12px; border: 0; border-radius: 11px; background: white; color: var(--ink); text-align: left; }
.suggestion:hover, .suggestion:focus-visible { background: #f2f4ee; outline: none; }
.suggestion strong, .suggestion small { display: block; }
.suggestion small { color: var(--muted); }
.maps-attribution { padding: 7px 12px 5px; color: var(--muted); font-size: 12px; text-align: right; }

.vehicle-list { display: grid; gap: 10px; margin: 2px 0 18px; }
.vehicle { width: 100%; display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; text-align: left; border: 1px solid var(--line); background: white; border-radius: 16px; padding: 12px; color: var(--ink); }
.vehicle.selected { border: 2px solid var(--green); padding: 11px; background: #f5faed; }
.vehicle-icon { display: grid; place-items: center; width: 46px; height: 40px; border-radius: 12px; background: var(--ink); color: white; }
.vehicle strong, .vehicle small { display: block; }
.vehicle small { color: var(--muted); margin-top: 3px; }
.vehicle-price { font-weight: 850; }

.primary { border: 0; border-radius: 16px; padding: 16px 18px; background: var(--ink); color: white; font-weight: 850; box-shadow: 0 10px 26px rgba(16,36,31,.18); }
.primary:hover { background: var(--green); transform: translateY(-1px); }
.primary:disabled { opacity: .5; cursor: progress; transform: none; }
.secondary { border: 1px solid var(--line); border-radius: 13px; padding: 11px 14px; background: white; color: var(--ink); font-weight: 750; }
.status-card { margin-top: 16px; padding: 16px; border-radius: 16px; background: var(--ink); color: white; }
.status-card p { margin-bottom: 5px; color: #c5d2ce; }
.status-card strong { font-size: 18px; }
.hidden { display: none !important; }

.map { position: relative; overflow: hidden; min-height: 610px; background-color: #dfe8db; background-image: linear-gradient(30deg, rgba(255,255,255,.55) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,.55) 87.5%), linear-gradient(150deg, rgba(255,255,255,.55) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,.55) 87.5%), linear-gradient(30deg, rgba(255,255,255,.55) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,.55) 87.5%); background-size: 90px 156px; }
.map::before, .map::after { content: ""; position: absolute; background: var(--card); box-shadow: 0 0 0 8px rgba(255,255,255,.35); border-radius: 999px; }
.map::before { width: 130%; height: 22px; left: -14%; top: 46%; transform: rotate(-13deg); }
.map::after { width: 22px; height: 120%; left: 62%; top: -10%; transform: rotate(18deg); }
.map.map-live { background: #dfe8db; }
.map.map-live::before, .map.map-live::after { display: none; }
.map-canvas { position: absolute; z-index: 1; inset: 0; }
.map-chip { position: absolute; z-index: 3; top: 20px; left: 20px; padding: 11px 14px; border-radius: 999px; background: rgba(255,254,249,.92); backdrop-filter: blur(12px); box-shadow: 0 8px 26px rgba(16,36,31,.12); font-size: 13px; font-weight: 750; }
.pin { position: absolute; z-index: 3; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50% 50% 50% 12px; transform: rotate(-45deg); background: var(--ink); color: white; box-shadow: 0 10px 22px rgba(16,36,31,.25); }
.pin span { transform: rotate(45deg); }
.pin.pickup { left: 30%; top: 30%; background: var(--lime); color: var(--ink); }
.pin.dropoff { right: 19%; bottom: 25%; }
.car-dot { position: absolute; z-index: 3; width: 44px; height: 30px; display: grid; place-items: center; border-radius: 12px; background: white; box-shadow: 0 8px 18px rgba(16,36,31,.2); }
.car-one { left: 50%; top: 25%; transform: rotate(12deg); }
.car-two { left: 42%; bottom: 23%; transform: rotate(-18deg); }
.eta-card { position: absolute; z-index: 4; left: 22px; right: 22px; bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-radius: 20px; padding: 17px 19px; background: rgba(255,254,249,.96); box-shadow: var(--shadow); }
.eta-card p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.eta-pill { flex: 0 0 auto; background: var(--lime); border-radius: 14px; padding: 12px 14px; font-weight: 900; }
.map-empty { display: grid; place-items: center; }
.map-message { position: relative; z-index: 3; max-width: 380px; padding: 30px; text-align: center; border-radius: 24px; background: rgba(255,254,249,.94); box-shadow: var(--shadow); }
.map-message p { margin: 0; color: var(--muted); line-height: 1.6; }
.map-mark { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 17px; background: var(--ink); color: white; font-size: 25px; }

.dashboard { display: grid; gap: 18px; }
.dashboard-topbar { margin-bottom: 8px; }
.dashboard-content { display: grid; gap: 18px; }
.access-panel { padding: 26px; }
.access-panel p { margin: 0; color: var(--muted); }
.hero-row { display: flex; justify-content: space-between; align-items: end; gap: 18px; }
.hero-row h1 { margin-bottom: 0; }
.live { display: inline-flex; gap: 8px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--muted); font-weight: 700; font-size: 13px; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2bb673; box-shadow: 0 0 0 4px rgba(43,182,115,.13); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric { padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.metric span { color: var(--muted); font-size: 13px; font-weight: 700; }
.metric strong { display: block; margin-top: 12px; font-size: 34px; letter-spacing: -.04em; }
.maps-guard-card { padding: 22px; }
.maps-guard-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.maps-guard-heading h2 { margin-bottom: 8px; }
.maps-usage-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 18px; }
.maps-usage-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; }
.maps-usage-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.usage-track { grid-column: 1 / -1; height: 7px; overflow: hidden; border-radius: 999px; background: var(--line); }
.usage-track span { height: 100%; margin: 0; border-radius: inherit; background: var(--green); }
.content-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.table-card { padding: 22px; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 10px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.badge { display: inline-flex; padding: 6px 9px; border-radius: 999px; background: #e6f3d1; color: var(--green); font-size: 12px; font-weight: 800; }
.badge.review { background: #fff0c8; color: #8a5c00; }
.empty { padding: 22px; text-align: center; color: var(--muted); }

.driver-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 20px; }
.driver-card { padding: 24px; }
.availability { display: flex; align-items: center; justify-content: space-between; margin: 18px 0; padding: 15px; border-radius: 17px; background: #edf4ea; }
.availability-detail { margin: 3px 0 0; font-size: 13px; }
.switch { width: 54px; height: 30px; padding: 3px; border: 0; border-radius: 999px; background: var(--green); }
.switch::after { content: ""; display: block; width: 24px; height: 24px; margin-left: 24px; border-radius: 50%; background: white; transition: .2s; }
.switch.off { background: #aeb8b4; }
.switch.off::after { margin-left: 0; }
.offer { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: white; margin-bottom: 12px; }
.offer-route { display: grid; grid-template-columns: 22px 1fr; gap: 8px; margin: 13px 0; }
.offer-route p { margin-bottom: 9px; }
.offer-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.action-row { display: flex; gap: 8px; margin-top: 16px; }
.action-row .primary { flex: 1; }
.active-offer { background: #f5faed; }
.full-width { width: 100%; }
.verification-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 17px; }
.verification-card span { color: var(--muted); }
.section-space { margin-top: 24px; }
.ride-origin { margin: 12px 0 3px; }
.ride-destination { margin: 0; font-size: 13px; }

@media (max-width: 860px) {
  .shell { padding: 16px; }
  .nav-links a { padding: 8px 10px; font-size: 12px; }
  .grid, .driver-layout, .content-grid { grid-template-columns: 1fr; }
  .account-bar, .auth-form { align-items: stretch; flex-direction: column; }
  .auth-form input { min-width: 0; }
  .map { min-height: 420px; order: -1; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .maps-usage-grid { grid-template-columns: 1fr; }
  .hero-row { align-items: start; flex-direction: column; }
}

@media (max-width: 540px) {
  .topbar { align-items: flex-start; }
  .nav-links { display: none; }
  .booking-panel { padding: 22px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric strong { font-size: 27px; }
  .map { min-height: 330px; }
}
