:root {
  --ink: #111827;
  --muted: #667085;
  --surface: #ffffff;
  --soft: #f4f6f7;
  --line: #e4e7ec;
  --brand: #12a678;
  --brand-dark: #087452;
  --accent: #101828;
  --shadow: 0 20px 52px rgba(16, 24, 40, 0.1);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: #f7f8f8;
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
}

.topbar {
  height: 72px;
  padding: 0 clamp(18px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); font-size: 23px; font-weight: 800; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 13px; background: var(--accent); color: #fff; }
.topbar-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 6px rgba(18, 166, 120, .15); }

.portal, .standalone { padding: 22px clamp(14px, 4vw, 48px) 30px; }
.tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(108px, 150px));
  width: fit-content;
  padding: 5px;
  margin: 0 auto 20px;
  border-radius: 14px;
  background: #eceedf;
}
.tab {
  height: 46px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.tab.active { background: var(--surface); color: var(--ink); box-shadow: 0 2px 9px rgba(16, 24, 40, .08); }
.panel { display: none; }
.panel.active { display: block; }
.hidden { display: none !important; }

.auth-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 370px));
  justify-content: center;
  gap: 18px;
  padding: 34px 0;
}
.auth-shell.single { grid-template-columns: minmax(290px, 390px); }
.auth-card, .control-panel, .map-shell, .data-card, .admin-create {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.auth-card.secondary { background: #fbfcfc; }
.scrollable-modal-card {
  max-height: calc(100vh - 28px);
  overflow-y: auto;
}
.eyebrow { margin: 0 0 7px; color: var(--brand-dark); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 34px); letter-spacing: -.05em; }
h2 { margin: 0 0 14px; font-size: 18px; }
.auth-card h1, .auth-card h2 { margin-bottom: 22px; }
.auth-form label, .ride-form label {
  display: block;
  margin: 0 0 14px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}
input, select, textarea {
  width: 100%;
  height: 51px;
  margin-top: 7px;
  padding: 0 14px;
  border: 1px solid #d0d5dd;
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
textarea {
  height: 116px; padding: 13px 14px; resize: vertical;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(18, 166, 120, .22); border-color: var(--brand); }
.checkbox-line {
  display: flex !important;
  align-items: center;
  gap: 10px;
}
.checkbox-line input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
}
.passenger-photo-preview {
  width: 96px;
  height: 96px;
  margin: 0 0 14px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brand);
}
.passenger-register-page {
  position: fixed;
  inset: 0;
  z-index: 900;
  overflow-y: auto;
  padding: 22px 16px 34px;
  background: #f6fbf9;
}
.passenger-register-page .driver-page-heading,
.passenger-register-page .auth-form {
  width: min(430px, 100%);
  margin-inline: auto;
}
.passenger-register-page .driver-page-heading {
  margin-bottom: 18px;
}
.passenger-register-page .auth-form {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 24, 40, .08);
}
.photo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.photo-field {
  display: grid;
  gap: 8px;
}
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}
.form-actions .primary,
.form-actions .secondary-action {
  flex: 1;
}
.driver-onboarding-step {
  display: grid;
  gap: 10px;
}
.photo-upload-action {
  display: grid !important;
  place-items: center;
  margin: 0 !important;
  color: var(--accent);
  background: #eef8f4;
}
.passenger-camera-box {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}
.passenger-camera-box video {
  width: 100%;
  max-height: 260px;
  border-radius: 14px;
  background: #101828;
  object-fit: cover;
}
.primary, .secondary-action {
  width: 100%;
  height: 53px;
  border: 0;
  border-radius: 13px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.secondary-action { border: 1px solid #b6ddd1; background: #e8f8f2; color: var(--brand-dark); }
.google-login-native {
  width: 100%;
  height: 46px;
  border: 1px solid #dadce0;
  border-radius: 6px;
  background: #fff;
  color: #3c4043;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.spaced-button { margin-top: 13px; }
.primary:disabled { opacity: .7; cursor: wait; }
.login-hint { margin: 18px 0 0; padding: 12px; border-radius: 10px; background: var(--soft); color: var(--muted); font-size: 12px; line-height: 1.7; }

.landing-page {
  background: #f6faf8;
}
.landing-header {
  min-height: 76px;
  padding: 0 clamp(18px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.landing-header nav {
  display: flex;
  gap: 10px;
}
.landing-header nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}
.landing-header nav a:nth-child(2) {
  background: var(--accent);
  color: #fff;
}
.landing-hero {
  min-height: calc(100vh - 76px);
  padding: clamp(34px, 7vw, 92px) clamp(18px, 5vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .7fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}
.landing-copy {
  max-width: 760px;
}
.landing-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 6vw, 74px);
  line-height: .98;
  letter-spacing: 0;
}
.landing-copy > p:not(.eyebrow) {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.7;
}
.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.landing-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
}
.landing-primary {
  background: var(--brand-dark);
  color: #fff;
}
.landing-secondary {
  border: 1px solid #b6ddd1;
  background: #fff;
  color: var(--brand-dark);
}
.landing-panel {
  padding: 26px;
  border-radius: 24px;
  background: #102019;
  color: #fff;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}
.landing-panel div {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
}
.landing-panel span {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, .68);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .16em;
}
.landing-panel strong {
  font-size: 25px;
}
.landing-features {
  padding: 0 clamp(18px, 5vw, 72px) 54px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.landing-features article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.landing-features h2 {
  margin: 0 0 10px;
  font-size: 20px;
}
.landing-features p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 820px) {
  .landing-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding-top: 16px;
    padding-bottom: 16px;
  }
  .landing-hero,
  .landing-features {
    grid-template-columns: 1fr;
  }
  .landing-copy h1 {
    font-size: 42px;
  }
}

@media (max-width: 1100px) {
  .desktop-app .standalone {
    padding: 16px;
  }
  .admin-flow {
    grid-template-columns: 1fr;
  }
  .admin-nav {
    position: static;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .admin-nav button {
    flex: 0 0 auto;
  }
  .tables-grid,
  .drivers-view,
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .filters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .desktop-app .topbar,
  .landing-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    height: auto;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .landing-header nav {
    width: 100%;
    overflow-x: auto;
  }
  .landing-header nav a {
    flex: 0 0 auto;
  }
  .modal-card,
  .admin-detail-card {
    width: calc(100vw - 22px);
    max-height: calc(100vh - 22px);
    overflow-y: auto;
  }
  .data-row {
    overflow-wrap: anywhere;
  }
}

.role-workspace { max-width: 1360px; margin: 0 auto; }
.session-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding: 0 5px; }
.session-header h1 { font-size: 28px; }
.logout-action {
  padding: 10px 16px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: white;
  color: #344054;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.header-actions { display: flex; gap: 7px; }
.header-actions.align-right { margin-left: auto; }
.driver-header-main { display: grid; gap: 10px; min-width: 0; }
.passenger-greeting { font-size: 16px; }
.journey-layout { display: grid; grid-template-columns: minmax(340px, 420px) 1fr; gap: 18px; }
.control-panel { padding: 20px; }
.intro { margin: 0 4px 22px; }

.location-field { position: relative; display: block; }
.location-field input { padding-right: 70px; }
.address-field { position: relative; display: block; }
.address-field input { padding-right: 76px; }
.pickup-address input { padding-right: 12px; }
#destination-field .address-field input { padding-right: 12px; }
.destination-map-action { width: 100%; margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--brand-dark); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
#destination-field { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.ride-vehicle-category { display: grid; gap: 10px; margin: 20px 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.ride-vehicle-category > strong { color: #344054; font-size: 13px; }
.ride-vehicle-category > div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ride-vehicle-category button { display: grid; place-items: center; gap: 5px; min-height: 76px; border: 1px solid var(--line); border-radius: 12px; background: #f8faf9; color: #344054; font: inherit; cursor: pointer; }
.ride-vehicle-category button span { font-size: 29px; line-height: 1; }
.ride-vehicle-category button b { font-size: 13px; }
.ride-vehicle-category button.selected { border-color: var(--brand); background: #e7f8f2; color: var(--brand-dark); box-shadow: inset 0 0 0 1px var(--brand); }
.suggestions {
  display: grid; gap: 2px; margin-top: 4px; padding: 5px; border: 1px solid var(--line);
  border-radius: 11px; background: #fff; box-shadow: 0 8px 20px rgba(16, 24, 40, .1);
}
.suggestions button {
  padding: 9px; border: 0; border-radius: 8px; background: transparent; color: #344054;
  font: inherit; font-size: 12px; text-align: left; cursor: pointer;
}
.suggestions button:hover { background: var(--soft); }
.search-action {
  position: absolute; right: 7px; top: 14px; height: 37px; padding: 0 10px; border: 0;
  border-radius: 9px; color: var(--brand-dark); background: #e7f8f2; font: inherit;
  font-size: 12px; font-weight: 700; cursor: pointer;
}
.pin-action {
  position: absolute; right: 8px; top: 15px; height: 36px; padding: 0 10px; border: 0;
  border-radius: 9px; color: var(--brand-dark); background: #e7f8f2; font-weight: 700; cursor: pointer;
}
.pin-action.choosing { color: #fff; background: var(--brand); }
.locate-action {
  display: flex; align-items: center; gap: 9px; width: 100%; margin: -5px 0 16px; padding: 11px 13px;
  border: 1px dashed #b6ddd1; border-radius: 12px; background: #f4fcf9; color: var(--brand-dark);
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.locate-action:disabled { cursor: wait; color: var(--muted); }
.locate-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(18, 166, 120, .17); }
.quick-locations { display: flex; flex-wrap: wrap; gap: 7px; margin: 5px 0 19px; }
.quick-locations button {
  padding: 8px 11px; border: 1px solid #d8ebe5; border-radius: 20px; background: #f4fcf9;
  color: #306756; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.map-pick-actions { display: flex; gap: 7px; margin: -5px 0 12px; }
.map-pick-actions button {
  flex: 1; padding: 8px 5px; border: 1px solid var(--line); border-radius: 10px;
  background: white; color: var(--muted); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer;
}

.current-ride { padding: 16px; margin-top: 19px; border-radius: 17px; border: 1px solid #d9ece6; background: #f5fcf9; }
.current-ride.empty { border-color: var(--line); background: var(--soft); color: var(--muted); }
.current-ride p { margin: 0; font-size: 13px; line-height: 1.55; }
.ride-status { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.badge { padding: 5px 9px; border-radius: 20px; background: #dcfaef; color: #087452; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.badge.progress { background: #fff1dd; color: #a15c00; }
.badge.completed { background: #e9edff; color: #3449ad; }
.badge.cancelled { background: #fdecec; color: #b42318; }
.badge.expired { background: #f2f4f7; color: #475467; }
.price { font-size: 19px; font-weight: 800; }
.trip-route { margin: 11px 0; padding-left: 12px; border-left: 2px solid var(--brand); font-size: 13px; line-height: 1.7; }
.trip-meta { color: var(--muted); font-size: 12px; }
.trip-facts {
  display: grid; gap: 8px; margin: 14px 0; padding: 13px; border-radius: 12px;
  background: var(--soft); color: #344054; font-size: 13px;
}
.trip-facts p { margin: 0; line-height: 1.5; }
.live-metrics {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 13px 0;
}
.live-metrics.two { grid-template-columns: repeat(2, 1fr); }
.live-metrics strong {
  padding: 11px 5px; border-radius: 11px; background: #e8f8f2; color: var(--brand-dark);
  font-size: 13px; text-align: center;
}
.small-action {
  width: 100%; margin-top: 12px; padding: 10px; border: 1px solid #cdd5df; border-radius: 10px;
  background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.small-action.accept { border-color: var(--brand); background: var(--brand); color: #fff; }
.queue-title { margin: 25px 5px 12px; font-size: 14px; }
.ride-queue { display: grid; gap: 10px; max-height: 330px; overflow: auto; }
.queue-card { padding: 13px; border: 1px solid var(--line); border-radius: 13px; }
.mini-stat {
  display: flex; align-items: baseline; gap: 7px; padding: 12px; margin-bottom: 16px;
  border-radius: 13px; background: #f4fcf9; color: var(--brand-dark);
}
.mini-stat strong { font-size: 25px; }
.mini-stat span { font-size: 12px; font-weight: 700; }
.driver-stats { display: grid; grid-template-columns: 1fr 1.45fr; gap: 8px; margin-bottom: 12px; }
.driver-stats.three { grid-template-columns: .75fr .95fr 1.35fr; }
.driver-stats .mini-stat { display: block; margin: 0; }
.driver-stats .mini-stat span { display: block; margin-top: 4px; }
.presence-action {
  width: 100%; margin-bottom: 12px; padding: 12px; border: 1px solid #c9ece0; border-radius: 12px;
  background: #d92d20; border-color: #d92d20; color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.presence-action.offline { background: var(--brand); border-color: var(--brand); color: #fff; }
.navigation-action {
  display: block; margin: 12px 0; padding: 12px; border: 1px solid #b6ddd1; border-radius: 12px;
  background: #e8f8f2; color: var(--brand-dark); font-size: 13px; font-weight: 700; text-align: center; text-decoration: none;
}
.action-gap { margin-top: 10px; }

.map-shell { display: flex; flex-direction: column; padding: 16px; }
.map-header { min-height: 62px; display: flex; justify-content: space-between; align-items: center; padding: 0 8px 12px; }
.map-header strong { font-size: 17px; }
.online-count { padding: 9px 13px; border-radius: 22px; color: var(--brand-dark); background: #e8f8f2; font-size: 13px; font-weight: 700; }
.map { flex: 1; min-height: 600px; border-radius: 18px; z-index: 0; }
.map-stage { position: relative; }
.map-stage .map { height: 100%; }
.gps-overlay {
  position: absolute; right: 12px; top: 12px; z-index: 500; width: 48px; height: 48px;
  border: 0; border-radius: 50%; background: white; color: var(--brand-dark); box-shadow: 0 3px 16px rgba(16,24,40,.2);
  font: inherit; font-size: 12px; font-weight: 800; cursor: pointer;
}
.driver-pin {
  display: grid; place-items: center; width: 42px; height: 36px; border-radius: 50%; border: 3px solid white;
  background: var(--accent); color: #fff; box-shadow: 0 5px 17px rgba(16, 24, 40, .25);
}
.driver-pin svg { width: 24px; height: 24px; fill: currentColor; }
.route-pin { width: 17px; height: 17px; border: 4px solid #fff; border-radius: 50%; background: var(--brand); box-shadow: 0 2px 8px rgba(16, 24, 40, .3); }
.route-pin.destination { background: var(--accent); }
.passenger-pin {
  display: grid; place-items: center; width: 33px; height: 33px; border-radius: 50%; border: 3px solid white;
  background: #f79009; color: white; font-size: 15px; font-weight: 800; box-shadow: 0 5px 17px rgba(16, 24, 40, .2);
}
.location-accuracy { stroke: var(--brand); fill: var(--brand); }

.metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.metric { padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.metric span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.metric strong { font-size: 30px; }
.admin-map-shell .map { min-height: 450px; }
.admin-create h2, .data-card h2 { margin-bottom: 12px; }
.compact input { margin: 0 0 10px; height: 46px; }
.filters { display: flex; gap: 8px; margin-bottom: 12px; }
.filters input, .filters select { height: 43px; margin: 0; }
.tables-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 14px; margin-top: 18px; }
.data-card { padding: 17px; box-shadow: none; }
.data-list { display: grid; gap: 8px; max-height: 300px; overflow: auto; }
.data-row { padding: 10px; border-radius: 10px; background: var(--soft); font-size: 12px; line-height: 1.55; }
.data-row.selectable {
  width: 100%; border: 0; color: inherit; font: inherit; font-size: 12px; text-align: left; cursor: pointer;
}
.data-row.selectable:hover { background: #e8f8f2; }
.archive-title { margin-top: 20px; font-size: 15px; }
.compact-list { max-height: 150px; }
.restore-action {
  float: right; padding: 5px 9px; border: 1px solid #b6ddd1; border-radius: 8px;
  background: white; color: var(--brand-dark); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer;
}
.row-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.row-actions .restore-action { float: none; }
.detail-link { margin: -4px 0 14px; height: 43px; }
.admin-flow { display: grid; grid-template-columns: 210px 1fr; gap: 18px; }
.admin-nav {
  display: flex; flex-direction: column; gap: 6px; padding: 9px; height: fit-content;
  border: 1px solid var(--line); border-radius: 17px; background: var(--surface);
}
.admin-nav button {
  padding: 13px; border: 0; border-radius: 10px; background: transparent; color: #475467;
  text-align: left; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.admin-nav button.active { background: var(--accent); color: white; }
.admin-view { display: none; }
.admin-view.active { display: block; }
.data-card.wide .data-list { max-height: 610px; }
.drivers-view { grid-template-columns: 1fr 340px; margin: 0; }
.pricing-card { max-width: 470px; }
.schedule-form { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.time-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.schedule-list { margin-top: 15px; max-height: 230px; }

.modal {
  position: fixed; inset: 0; display: grid; place-items: center; padding: 16px;
  background: rgba(16, 24, 40, .48); z-index: 1200;
}
.modal-card {
  width: min(390px, 100%); padding: 21px; border-radius: 20px; background: white;
  box-shadow: 0 22px 60px rgba(16, 24, 40, .26);
}
.modal-card h2 { margin-bottom: 16px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-head h2 { margin: 0; }
.modal-head button {
  width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--soft);
  color: var(--ink); font-size: 22px; cursor: pointer;
}
.request-card p { font-size: 13px; line-height: 1.6; }
.profile-details p { margin: 0 0 14px; color: #344054; font-size: 14px; line-height: 1.55; }
.admin-detail-card { width: min(510px, 100%); max-height: 90vh; overflow: auto; }
.ride-modal-card { max-height: 92vh; overflow: auto; }
.danger { border-color: #fecdca; color: #b42318; }
.confirmation-price { margin: 18px 0; font-size: 27px; font-weight: 800; }
.ride-screen h2 { margin-bottom: 12px; }
.history-button { margin-bottom: 11px; }
.rating-form { display: grid; gap: 18px; }
.rating-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.rating-options label {
  position: relative;
  display: grid; place-items: center; gap: 5px; padding: 10px 0; border: 1px solid var(--line);
  border-radius: 12px; font-weight: 700; cursor: pointer;
}
.rating-options input { position: absolute; opacity: 0; pointer-events: none; }
.rating-options label:has(input:checked) {
  border-color: var(--brand);
  background: #e8f8f2;
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.rating-options span { display: grid; place-items: center; width: 100%; min-height: 24px; }
.rating-options input:checked + span {
  color: var(--brand-dark);
}

.toast {
  position: fixed; right: 26px; bottom: 25px; max-width: 350px; padding: 14px 17px; border-radius: 12px;
  background: var(--accent); color: #fff; font-size: 14px; opacity: 0; transform: translateY(15px);
  pointer-events: none; transition: .2s ease; z-index: 1000;
}
.toast.show { opacity: 1; transform: translateY(0); }
.flow-notice {
  position: fixed;
  left: 50%;
  bottom: 86px;
  z-index: 1300;
  width: min(420px, calc(100% - 28px));
  padding: 14px 16px;
  border-radius: 14px;
  background: #101828;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 16px 44px rgba(16, 24, 40, .28);
  transform: translateX(-50%);
}

.mobile-app .topbar {
  height: 62px;
  padding: 0 15px;
}
.mobile-app .brand { font-size: 19px; }
.mobile-app .brand-mark { width: 35px; height: 35px; }
.mobile-app .topbar-meta { display: none; }
.mobile-app .standalone { padding: 12px; }
.mobile-app .auth-shell {
  display: block;
  padding: 10px 0;
}
.mobile-app .auth-card { padding: 20px; margin-bottom: 12px; border-radius: 20px; }
.mobile-app .role-workspace { width: 100%; }
.mobile-app .session-header { margin: 4px 0 12px; }
.mobile-app .mobile-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mobile-app .control-panel { padding: 17px; border-radius: 20px; order: 1; }
.mobile-app .map-shell { padding: 10px; border-radius: 20px; order: 2; }
.mobile-app .passenger-layout .map-shell { order: 1; }
.mobile-app .passenger-layout .control-panel { order: 2; }
.mobile-app .map-header { min-height: 51px; padding: 0 4px 8px; }
.mobile-app .map { min-height: 285px; height: 285px; }
.mobile-app .driver-map-shell .map { min-height: 335px; height: 335px; }
.mobile-app h1 { font-size: 27px; }
.mobile-app .intro { margin-bottom: 17px; }
.mobile-app input { height: 47px; }
.mobile-app .current-ride { margin-top: 14px; }
.mobile-app .ride-queue { max-height: 200px; }
.mobile-app .driver-stats .mini-stat strong { font-size: 20px; }

.mobile-app.map-background {
  height: 100vh;
  overflow: hidden;
  background: #dfe7e4;
}
.mobile-app.map-background .topbar {
  position: fixed;
  top: 10px;
  left: 12px;
  right: 12px;
  z-index: 720;
  height: 56px;
  border: 1px solid rgba(208, 213, 221, .78);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 34px rgba(16, 24, 40, .14);
  backdrop-filter: blur(14px);
}
.mobile-app.map-background .standalone {
  min-height: 100vh;
  padding: 0;
}
.mobile-app.map-background .role-workspace {
  position: relative;
  width: 100%;
  max-width: none;
  height: 100vh;
  overflow: hidden;
}
.mobile-app.map-background .mobile-layout,
.mobile-app.map-background .journey-layout {
  display: block;
}
.mobile-app.map-background .map-shell {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  order: initial;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.mobile-app.map-background .map-stage {
  position: absolute;
  inset: 0;
}
.mobile-app.map-background .map,
.mobile-app.map-background .driver-map-shell .map,
.mobile-app.map-background .map-stage .map {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  border-radius: 0;
}
.mobile-app.map-background .map-header {
  position: absolute;
  top: 80px;
  right: 14px;
  z-index: 510;
  min-height: 0;
  max-width: min(360px, calc(100% - 28px));
  padding: 12px 14px;
  border: 1px solid rgba(208, 213, 221, .76);
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 32px rgba(16, 24, 40, .14);
  backdrop-filter: blur(14px);
}
.mobile-app.map-background .map-header .eyebrow {
  margin-bottom: 3px;
}
.mobile-app.map-background .map-header strong {
  display: block;
  font-size: 14px;
  line-height: 1.3;
}
.mobile-app.map-background .session-header,
.mobile-app.map-background .control-panel,
.mobile-app.map-background .current-ride,
.mobile-app.map-background .driver-stats,
.mobile-app.map-background .presence-action {
  position: absolute;
  z-index: 620;
}
.mobile-app.map-background .session-header,
.mobile-app.map-background .control-panel,
.mobile-app.map-background .driver-stats,
.mobile-app.map-background .presence-action,
.mobile-app.map-background .current-ride {
  border: 1px solid rgba(208, 213, 221, .78);
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 14px 42px rgba(16, 24, 40, .16);
  backdrop-filter: blur(14px);
}
.mobile-app.map-background .session-header {
  top: 14px;
  left: 14px;
  right: 14px;
  margin: 0;
  padding: 12px;
  border-radius: 18px;
}
.mobile-app.map-background .passenger-map-workspace .session-header {
  left: 14px;
  right: auto;
  width: min(430px, calc(100% - 28px));
}
.mobile-app.map-background .control-panel {
  left: 14px;
  bottom: 14px;
  width: min(430px, calc(100% - 28px));
  max-height: calc(100vh - 112px);
  overflow: auto;
  order: initial;
}
.mobile-app.map-background #passenger-control-panel:has(.vehicle-stage:not(.hidden)) { padding: 0; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; overflow: visible; }
.mobile-app.map-background .passenger-map-workspace .map-header { top: 180px; right: 78px; }
.mobile-app.map-background .driver-map-workspace .session-header {
  top: 14px;
  right: auto;
  width: min(520px, calc(100% - 28px));
  align-items: flex-start;
  gap: 12px;
}
.mobile-app.map-background .driver-map-workspace .driver-header-main {
  flex: 1;
}
.mobile-app.map-background .driver-map-workspace .header-actions {
  flex-shrink: 0;
}
.mobile-app.map-background .driver-map-workspace .driver-stats {
  position: static;
  z-index: auto;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.mobile-app.map-background .driver-stats .mini-stat {
  background: rgba(244, 252, 249, .92);
  padding: 9px;
}
.mobile-app.map-background .presence-action {
  bottom: 14px;
  left: 14px;
  width: min(430px, calc(100% - 28px));
  margin: 0;
  border-color: #d92d20;
  background: #d92d20;
  color: #fff;
}
.mobile-app.map-background .presence-action.offline {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.mobile-app.map-background .driver-map-workspace .current-ride {
  left: 14px;
  bottom: 82px;
  width: min(430px, calc(100% - 28px));
  margin: 0;
}
.mobile-app.map-background .passenger-map-workspace .current-ride {
  position: static;
  margin-top: 14px;
  border-color: #d9ece6;
  background: #f5fcf9;
  box-shadow: none;
  backdrop-filter: none;
}
.mobile-app.map-background .gps-overlay {
  top: 180px;
  right: 14px;
}
.mobile-app.map-background .driver-map-workspace .map-header {
  top: 180px;
  right: 78px;
}

@media (min-width: 860px) {
  .mobile-app.map-background .passenger-map-workspace .session-header,
  .mobile-app.map-background .control-panel,
  .mobile-app.map-background .driver-map-workspace .session-header,
  .mobile-app.map-background .presence-action,
  .mobile-app.map-background .driver-map-workspace .current-ride {
    left: 18px;
    width: 410px;
  }
  .mobile-app.map-background .map-header,
  .mobile-app.map-background .gps-overlay {
    top: 18px;
    right: 18px;
  }
  .mobile-app.map-background .passenger-map-workspace .map-header {
    top: 18px;
    right: 18px;
  }
  .mobile-app.map-background .driver-map-workspace .map-header {
    top: 18px;
    right: 84px;
  }
  .mobile-app.map-background .session-header,
  .mobile-app.map-background .passenger-map-workspace .session-header,
  .mobile-app.map-background .driver-map-workspace .session-header {
    top: 18px;
  }
  .mobile-app.map-background .driver-map-workspace .session-header {
    width: 520px;
  }
  .mobile-app.map-background .control-panel {
    max-height: calc(100vh - 112px);
  }
  .mobile-app.map-background .presence-action {
    bottom: 18px;
  }
  .mobile-app.map-background .driver-map-workspace .current-ride {
    bottom: 86px;
  }
}

@media (max-width: 520px) {
  .mobile-app.map-background .brand {
    min-width: 0;
    font-size: 16px;
  }
  .mobile-app.map-background .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-app.map-background .passenger-greeting {
    font-size: 14px;
  }
  .mobile-app.map-background .session-header {
    gap: 10px;
  }
  .mobile-app.map-background .driver-map-workspace .session-header {
    flex-direction: column;
    align-items: stretch;
  }
  .mobile-app.map-background .driver-map-workspace .header-actions {
    width: 100%;
  }
  .mobile-app.map-background .driver-map-workspace .header-actions .logout-action {
    flex: 1;
  }
  .mobile-app.map-background .driver-stats.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .mobile-app.map-background .driver-stats .mini-stat strong {
    font-size: 17px;
  }
  .mobile-app.map-background .logout-action {
    padding: 9px 11px;
  }
  .mobile-app.map-background .map-header {
    top: 80px;
    left: 14px;
    right: 14px;
  }
  .mobile-app.map-background .passenger-map-workspace .map-header {
    top: 214px;
  }
  .mobile-app.map-background .control-panel {
    max-height: 56vh;
  }
  .mobile-app.map-background .driver-map-workspace .map-header {
    top: 214px;
  }
  .mobile-app.map-background .presence-action {
    bottom: 14px;
  }
  .mobile-app.map-background .driver-map-workspace .current-ride {
    bottom: 82px;
    max-height: 30vh;
    overflow: auto;
  }
  .mobile-app.map-background .driver-map-workspace .gps-overlay {
    top: 214px;
  }
}

@media (max-width: 980px) {
  .auth-shell, .journey-layout, .admin-grid, .tables-grid, .admin-flow { grid-template-columns: 1fr; }
  .admin-nav { flex-direction: row; overflow: auto; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .map { min-height: 380px; }
  .topbar-meta { display: none; }
}

.driver-menu-button {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 760;
  display: block;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(208, 213, 221, .78);
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 32px rgba(16, 24, 40, .16);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  backdrop-filter: blur(14px);
}
.passenger-menu-button {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 760;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(208, 213, 221, .78);
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
#passenger-menu-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.notification-button { position: fixed; top: 18px; right: 18px; z-index: 850; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: #101828; color: #fff; font: inherit; font-weight: 900; box-shadow: 0 10px 24px rgba(16,24,40,.24); cursor: pointer; }
.notification-button b { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #b42318; color: #fff; font-size: 12px; line-height: 20px; }
.passenger-session-header { left: 76px !important; width: min(360px, calc(100% - 104px)) !important; }
.passenger-page-heading { position: absolute; top: 14px; left: 76px; z-index: 760; }
.passenger-page-heading h1 { margin: 0; color: #1d2939; font-size: 19px; line-height: 50px; white-space: nowrap; }
.passenger-map-pin { display: block; width: 22px; height: 22px; border: 3px solid #fff; border-radius: 50% 50% 50% 0; background: #1a73e8; box-shadow: 0 2px 7px rgba(16,24,40,.35); transform: rotate(-45deg); }
.passenger-map-pin.destination { background: #d93025; }
.driver-menu-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.driver-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  letter-spacing: .03em;
}
.driver-avatar img { width: 100%; height: 100%; object-fit: cover; }
.driver-menu-avatar { width: 100%; height: 100%; border-radius: inherit; }
.driver-page-heading {
  position: absolute;
  top: 14px;
  left: 76px;
  z-index: 760;
  color: #1d2939;
}
.driver-page-heading h1 {
  margin: 0;
  font-size: 19px;
  line-height: 1.15;
}
.driver-page-heading p {
  margin: 3px 0 0;
  color: #667085;
  font-size: 12px;
}
.driver-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 980;
  width: min(326px, 88vw);
  height: 100vh;
  padding: 18px;
  border-right: 1px solid rgba(208, 213, 221, .8);
  background: rgba(255, 255, 255, .96);
  box-shadow: 20px 0 50px rgba(16, 24, 40, .18);
  transform: translateX(-105%);
  transition: transform .2s ease;
  overflow: auto;
  backdrop-filter: blur(16px);
}
.driver-sidebar.open { transform: translateX(0); }
.driver-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 960;
  border: 0;
  background: rgba(16, 24, 40, .34);
  cursor: pointer;
}
.driver-sidebar-profile {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.driver-sidebar-profile strong {
  display: block;
  font-size: 17px;
  line-height: 1.25;
}
.driver-sidebar-profile p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.driver-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
}
.driver-menu-button .driver-menu-avatar {
  width: 100%;
  height: 100%;
}
.driver-sidebar-nav {
  display: grid;
  gap: 7px;
  padding: 16px 0;
}
.driver-sidebar-nav button {
  width: 100%;
  padding: 13px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #344054;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.driver-sidebar-nav button:hover,
.driver-sidebar-nav button.active {
  background: #eef6f3;
  color: var(--brand-dark);
}
.driver-menu-panel {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}
.driver-menu-panel.finance-view { gap: 2px; }
.driver-menu-panel h2 {
  margin: 0;
  font-size: 16px;
}
.driver-page {
  position: fixed;
  inset: 0;
  z-index: 700;
  overflow: auto;
  padding: 76px max(18px, calc((100vw - 720px) / 2)) 32px;
  background: #f8faf9;
}
.driver-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.driver-page h2 { font-size: 24px; }
.driver-page .driver-panel-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.driver-page .driver-panel-metrics article,
.driver-page .driver-panel-list p,
.driver-page .profile-details {
  background: #fff;
  border: 1px solid var(--line);
}
.driver-panel-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.driver-panel-metrics article,
.driver-panel-list p {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: var(--soft);
}
.driver-panel-metrics span,
.driver-panel-list span,
.driver-panel-list small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.driver-panel-list {
  display: grid;
  gap: 8px;
}
.empty-driver-page { padding: 22px; border-radius: 16px; background: #fff; border: 1px solid var(--line); color: var(--muted); }
.driver-page-heading { margin-bottom: 8px; }
.driver-page-heading h2 { margin: 0; font-size: 25px; }
.driver-page-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.finance-period-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); min-height: 56px; gap: 8px; }
.finance-period-picker .finance-period-button { grid-template-rows: 18px 14px; height: 56px; min-height: 56px; padding: 6px; }
.finance-period-picker .finance-period-button span { width: 18px; height: 18px; font-size: 10px; }
.finance-period-picker .finance-period-button small { display: none; }
.finance-money-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.finance-icons-layout { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: 56px; min-height: 56px; max-height: 56px; gap: 4px; }
.finance-icons-layout .finance-period-button { grid-template-rows: 18px 14px; height: 56px; min-height: 56px; padding: 6px; }
.finance-icons-layout .finance-period-button span { width: 18px; height: 18px; font-size: 10px; }
.finance-icons-layout .finance-period-button small { display: none; }
.finance-status-layout { display: grid; grid-template-rows: 34px 1fr; gap: 8px; height: 132px; min-height: 132px; max-height: 132px; box-sizing: border-box; padding: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.finance-rides-layout { height: 400px; min-height: 400px; max-height: 400px; overflow-y: auto; overscroll-behavior: contain; }
.finance-period-button { display: grid; grid-template-rows: 30px 18px 18px; align-content: center; gap: 4px; height: 112px; min-height: 112px; padding: 12px 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: #344054; font: inherit; text-align: center; cursor: pointer; }
.finance-period-button span { display: grid; place-items: center; width: 30px; height: 30px; margin: 0 auto; border-radius: 50%; background: #e7f5ee; color: var(--brand-dark); font-family: Manrope, sans-serif; font-size: 13px; font-weight: 800; line-height: 1; }
.finance-period-button strong { font-size: 12px; }
.finance-period-button small { color: var(--muted); font-size: 11px; }
.finance-period-button.active { border-color: var(--brand); background: #eef8f4; box-shadow: inset 0 0 0 1px var(--brand); }
.finance-detail { display: grid; min-height: 250px; gap: 12px; padding-top: 12px; }
.finance-detail-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.finance-detail-head p, .finance-detail-head h3 { margin: 0; }
.finance-detail-head p, .finance-detail-head > span { color: var(--muted); font-size: 12px; }
.finance-detail-head h3 { margin-top: 2px; font-size: 17px; text-transform: capitalize; }
.financial-ride-list { display: grid; gap: 8px; }
.financial-ride-item { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.financial-ride-title { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 12px; padding: 0; border: 0; background: transparent; color: #1d2939; font: inherit; text-align: left; cursor: pointer; }
.financial-ride-title span, .financial-ride-title small { display: block; }
.financial-ride-title small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.financial-ride-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.financial-ride-details p { margin: 0; }
.financial-ride-details span, .financial-ride-details strong { display: block; }
.financial-ride-details span { margin-bottom: 2px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.financial-ride-details[hidden] { display: none !important; }
.financial-period { display: grid; gap: 10px; }
.financial-period h2 { margin: 16px 0 0; font-size: 16px; }
.financial-group { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.financial-group-head, .financial-group p, .driver-history-item { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.financial-group p { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.financial-group p span, .driver-history-item span, .driver-history-item small { display: block; color: var(--muted); line-height: 1.45; }
.driver-history-list { display: grid; gap: 10px; }
.driver-history-item { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.driver-history-title { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 14px; padding: 0; border: 0; background: transparent; color: #1d2939; font: inherit; text-align: left; cursor: pointer; }
.driver-history-title span, .driver-history-title small { display: block; }
.driver-history-title small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.driver-history-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.driver-history-details p { margin: 0; }
.driver-history-details span, .driver-history-details strong { display: block; }
.driver-history-details span { margin-bottom: 2px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.driver-profile-card { padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.request-card #request-details { margin-bottom: 18px; }
.request-passenger { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-size: 32px; line-height: 1.1; }
.request-passenger p { margin: 0; }
.request-passenger span { color: var(--muted); font-size: 13px; }
.request-passenger-photo {
  display: grid;
  place-items: center;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}
.request-passenger-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.request-facts { display: grid; gap: 8px; }
.request-facts p { margin: 0; padding: 10px; border-radius: 10px; background: var(--soft); }
.request-facts span, .request-facts strong { display: block; }
.request-facts span { margin-bottom: 3px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.request-trip-estimate { padding: 12px; border-radius: 10px; background: #e8f8f2; }
.request-trip-estimate > span { display: block; margin-bottom: 8px; color: var(--brand-dark); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.request-trip-estimate > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.request-trip-estimate strong, .request-trip-estimate small { display: block; }
.request-trip-estimate strong { color: var(--brand-dark); font-size: 13px; }
.request-trip-estimate small { margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 600; }
.request-accept, .request-reject { width: 100%; padding: 13px; border: 0; border-radius: 10px; font: inherit; font-weight: 800; color: #fff; cursor: pointer; }
.request-accept { background: #087443; }
.request-reject { margin-top: 8px; background: #b42318; }
.request-accept.slide-accept { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #087443; touch-action: none; }
.request-accept.slide-accept [data-slide-thumb] { position: absolute; left: 8px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #fff; color: #087443; font-size: 28px; font-weight: 900; transition: transform .15s ease; }
.cancel-ride-action, .small-action.danger.cancel-ride-action { background: #b42318; color: #fff; border-color: #b42318; }
.vehicle-stage { text-align: center; }
.vehicle-stage > .primary { width: 100%; padding: 16px; }
.vehicle-stage > button.request-trip-entry { display: flex; align-items: center; justify-content: center; gap: 6px; height: 54px; min-height: 54px; padding: 0; background: #101010; color: #fff; font-size: 13px; white-space: nowrap; }
.vehicle-stage > button.request-trip-entry span { font-size: 19px; line-height: 1; }
.vehicle-stage > button.request-trip-entry:hover { border-color: #101010; background: #101010; color: #fff; }
.vehicle-stage > div { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vehicle-stage button { display: grid; gap: 8px; min-height: 128px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: #1d2939; font: inherit; cursor: pointer; }
.vehicle-stage button span { font-size: 42px; }
.vehicle-stage button strong { font-size: 16px; }
.vehicle-stage button:hover { border-color: var(--brand); background: #eef8f4; }
.passenger-estimate-page {
  position: fixed;
  inset: 0;
  z-index: 700;
  overflow: auto;
  padding: 96px max(18px, calc((100vw - 540px) / 2)) 28px;
  background: #f8faf9;
}
.passenger-estimate-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.passenger-estimate-head h1 { margin: 2px 0 0; font-size: 25px; }
.origin-location-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: -4px 0 12px; }
.origin-location-actions button { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--brand-dark); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.map-select-overlay { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 18px; background: rgba(16,24,40,.48); }
.map-target { position: absolute; top: 50%; left: 50%; z-index: 500; width: 27px; height: 27px; border: 3px solid #fff; border-radius: 50% 50% 50% 0; background: #12a678; box-shadow: 0 3px 8px rgba(0,0,0,.35); transform: translate(-50%, -76%) rotate(-45deg); pointer-events: none; }
.map-target::before { position: absolute; top: 50%; left: 50%; width: 9px; height: 9px; border-radius: 50%; background: #fff; content: ""; transform: translate(-50%, -50%) rotate(45deg); }
.map-select-close { display: grid; width: 46px; height: 46px; place-items: center; border: 0; border-radius: 50%; background: var(--soft); color: #344054; font-size: 34px; line-height: 1; cursor: pointer; }
.map-selection-modal { display: grid; width: min(440px, 100%); gap: 12px; padding: 18px; border-radius: 18px; background: rgba(255,255,255,.98); box-shadow: 0 22px 60px rgba(16,24,40,.3); color: #1d2939; }
.map-selection-modal header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.map-selection-canvas { position: relative; height: min(46vh, 310px); overflow: hidden; border-radius: 13px; }
#map-selection-map { width: 100%; height: 100%; }
.map-selection-modal > strong { font-size: 15px; text-align: center; }
.map-selection-modal label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 800; }
.map-selection-modal input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; color: #1d2939; font: inherit; font-size: 13px; font-weight: 700; }
.approach-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.approach-cards article { padding: 12px; border-radius: 12px; background: #e8f8f2; }
.approach-cards span, .approach-cards strong { display: block; }
.approach-cards span { color: var(--muted); font-size: 11px; }
.approach-cards strong { margin-top: 4px; color: var(--brand-dark); font-size: 18px; }
.journey-route-card { display: grid; gap: 8px; }
.journey-route-card p { margin: 0; padding: 10px; border-radius: 10px; background: var(--soft); }
.journey-route-card span, .journey-route-card strong { display: block; }
.journey-route-card span { margin-bottom: 3px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.journey-start { width: 100%; margin-top: 10px; padding: 13px; border: 0; border-radius: 10px; background: #087443; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.final-trip-card { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.final-passenger-name { margin: 2px 0 14px; color: var(--brand-dark); font-size: 26px; line-height: 1.15; }
.final-trip-card article { min-height: 62px; padding: 8px; border-radius: 10px; background: #e8f8f2; text-align: center; }
.final-trip-card span, .final-trip-card strong { display: block; }
.final-trip-card span { color: var(--muted); font-size: 10px; font-weight: 800; line-height: 1.25; }
.final-trip-card strong { margin-top: 5px; color: var(--brand-dark); font-size: 14px; }
.final-trip-card article:last-child { grid-column: 1 / -1; display: grid; place-items: center; min-height: 92px; }
.final-trip-card article:last-child strong { font-size: 42px; line-height: 1; }
.admin-driver-photo { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); }
.admin-photo-preview {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.admin-photo-preview img {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
}
.admin-balance-card {
  display: grid;
  gap: 7px;
  padding: 18px;
  border-radius: 16px;
  background: var(--brand-dark);
  color: #fff;
}
.admin-balance-card span {
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.admin-balance-card strong {
  font-size: 30px;
}
.image-preview-card {
  width: min(92vw, 920px);
}
.image-preview-card img {
  display: block;
  width: 100%;
  max-height: 78vh;
  border-radius: 14px;
  object-fit: contain;
  background: #101828;
}
.credit-balance-card { display: grid; gap: 7px; padding: 22px; border-radius: 18px; background: var(--brand-dark); color: #fff; }
.credit-balance-card span, .credit-balance-card small { color: rgba(255,255,255,.78); }
.credit-balance-card strong { font-size: 30px; }
.credit-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.credit-actions.single { grid-template-columns: 1fr; }
.support-tabs { display: flex; gap: 8px; margin: 8px 0 14px; }
.support-tabs button { padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #344054; font: inherit; font-weight: 800; cursor: pointer; }
.support-tabs button.active { border-color: var(--brand); background: #eef8f4; color: var(--brand-dark); }
.support-thread-messages { display: grid; gap: 8px; margin-top: 10px; }
.support-thread-messages p { margin: 0; padding: 10px; border-radius: 10px; background: var(--soft); }
.support-thread-messages small { color: var(--muted); }
.support-thread.unanswered { border-color: #f79009; background: #fff7ed; box-shadow: inset 4px 0 0 #f79009; }
.support-thread.closed { border-color: #d0d5dd; background: #f2f4f7; color: #667085; box-shadow: inset 4px 0 0 #98a2b3; }
.support-thread-list { display: grid; gap: 8px; margin-top: 10px; }
.support-conversation-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(86vh, 720px);
  overflow: hidden;
}
.support-conversation-card .support-thread-messages {
  overflow: auto;
  padding-right: 4px;
}
.mini-ride-panel { display: grid; gap: 7px; }
.mini-ride-panel h2 { margin: 0; font-size: 18px; line-height: 1.15; }
.modal:has(.ride-modal-card .mini-ride-panel) {
  pointer-events: none;
  background: transparent;
}
.modal:has(.ride-modal-card .mini-ride-panel) .ride-modal-card,
.modal:has(.driver-bottom-actions) .driver-bottom-actions {
  pointer-events: auto;
}
.ride-modal-card:has(.mini-ride-panel) { position: fixed; right: 14px; bottom: 14px; left: 14px; width: auto; max-width: 520px; margin: 0 auto; padding: 14px; }
.mini-ride-panel.top { position: fixed; top: 14px; right: 14px; left: 14px; z-index: 900; max-width: 520px; margin: 0 auto; padding: 12px; border-radius: 14px; background: #fff; box-shadow: 0 12px 32px rgba(16,24,40,.18); }
.driver-bottom-actions { position: fixed; right: 14px; bottom: 14px; left: 14px; z-index: 900; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 520px; margin: 0 auto; }
.driver-bottom-actions > * { display: grid; place-items: center; min-height: 46px; margin: 0; text-align: center; text-decoration: none; }
.finish-flow-action { background: #087443; color: #fff; }

.mobile-app.map-background.ride-flow-active .control-panel,
.mobile-app.map-background.ride-flow-active .current-ride,
.mobile-app.map-background.ride-flow-active .presence-action,
.mobile-app.map-background.ride-flow-active .driver-status-pill,
.mobile-app.map-background.ride-flow-active .map-header {
  display: none !important;
}
[data-pricing-panel] { display: grid; gap: 10px; }
[data-pricing-panel].hidden { display: none !important; }
.ride-stops { display: grid; gap: 10px; }
#ride-stops-list { display: grid; gap: 8px; }
.ride-stop-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: start; }
.ride-stop-row label { margin: 0; }
.ride-stop-row .small-action { min-width: 44px; padding: 11px; }
.driver-profile-identity { display: flex; align-items: center; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.driver-profile-mark { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; }
.driver-profile-identity strong, .driver-profile-identity span { display: block; }
.driver-profile-identity span, .driver-profile-grid span { margin-top: 3px; color: var(--muted); font-size: 13px; }
.driver-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.driver-profile-grid p { margin: 0; padding: 12px; border-radius: 12px; background: var(--soft); }
.driver-profile-grid span, .driver-profile-grid strong { display: block; }
.driver-status-pill {
  position: absolute;
  top: 14px;
  left: 76px;
  z-index: 620;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  width: min(390px, calc(100% - 104px));
  padding: 11px 13px;
  border: 1px solid rgba(208, 213, 221, .78);
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 32px rgba(16, 24, 40, .14);
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(14px);
}
.driver-status-pill.online {
  border-color: #087443;
  background: #087443;
  color: #fff;
}
.driver-status-pill.offline {
  border-color: #b42318;
  background: #b42318;
  color: #fff;
}
.driver-status-pill.online p,
.driver-status-pill.offline p,
.driver-status-pill.online span,
.driver-status-pill.offline span,
.driver-status-pill.online strong,
.driver-status-pill.offline strong { color: inherit; }
.driver-status-pill p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}
#driver-work-status {
  white-space: nowrap;
  font-size: 11px;
}
.driver-connection-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  color: inherit;
  font-size: 10px;
  font-weight: 800;
}
.driver-connection-indicator::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}
.driver-connection-indicator.unavailable,
.driver-connection-indicator.offline { color: #fff4ce; }
.driver-status-pill strong {
  display: block;
  color: var(--brand-dark);
  font-size: 13px;
  line-height: 1.1;
}
.driver-online-time {
  flex: 0 0 auto;
  min-width: 82px;
  text-align: right;
}
.driver-online-time span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}
.open-ride-action {
  position: absolute;
  right: 14px;
  top: 146px;
  z-index: 620;
  width: 124px;
  height: 46px;
  border: 0;
  border-radius: 13px;
  background: var(--accent);
  color: white;
  box-shadow: 0 14px 36px rgba(16, 24, 40, .2);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.mobile-app.map-background .driver-map-workspace .presence-action {
  width: min(430px, calc(100% - 28px));
}
.mobile-app.map-background .driver-map-workspace .current-ride {
  bottom: 82px;
}
.mobile-app.map-background .driver-map-workspace .map-header,
.mobile-app.map-background .driver-map-workspace .gps-overlay {
  top: 78px;
}
.mobile-app.map-background .driver-map-workspace .map-header {
  right: 78px;
}

@media (min-width: 860px) {
  .driver-menu-button {
    top: 18px;
    left: 18px;
  }
  .driver-status-pill {
    top: 18px;
    left: 86px;
    width: 390px;
  }
  .open-ride-action {
    top: 76px;
    right: 18px;
    left: auto;
    width: 124px;
  }
  .mobile-app.map-background .driver-map-workspace .presence-action {
    width: 410px;
  }
  .mobile-app.map-background .driver-map-workspace .map-header,
  .mobile-app.map-background .driver-map-workspace .gps-overlay {
    top: 18px;
  }
  .mobile-app.map-background .driver-map-workspace .map-header {
    right: 84px;
  }
}

@media (max-width: 520px) {
  .driver-status-pill {
    right: 14px;
    width: auto;
    max-width: calc(100% - 90px);
  }
  .driver-online-time { transform: translateX(-54px); }
  .mobile-app.map-background .driver-map-workspace .map-header,
  .mobile-app.map-background .driver-map-workspace .gps-overlay {
    top: 80px;
  }
  .mobile-app.map-background .driver-map-workspace .map-header {
    left: 14px;
    right: 78px;
  }
  .open-ride-action {
    top: 150px;
    right: 14px;
    width: 108px;
    font-size: 12px;
  }
}

.mobile-app.map-background .driver-map-workspace .current-ride,
.mobile-app.map-background .driver-map-workspace .map-header {
  display: none;
}
.driver-map-workspace .leaflet-control-zoom {
  display: none;
}
.mobile-app.map-background .driver-map-workspace .open-ride-action {
  top: 100px;
  right: 14px;
  width: 124px;
}
.mobile-app.map-background .driver-map-workspace .gps-overlay {
  top: auto;
  right: 14px;
  bottom: 80px;
}

@media (min-width: 860px) {
  .mobile-app.map-background .driver-map-workspace .open-ride-action {
    top: 18px;
    right: 18px;
    width: 124px;
  }
  .mobile-app.map-background .driver-map-workspace .gps-overlay {
    top: auto;
    right: 18px;
    bottom: 84px;
  }
}

@media (max-width: 520px) {
  .mobile-app.map-background .driver-map-workspace .open-ride-action {
    top: 104px;
    right: 14px;
    width: 108px;
  }
  .mobile-app.map-background .driver-map-workspace .gps-overlay {
    top: auto;
    right: 14px;
    bottom: 80px;
  }
}

@media (min-width: 620px) and (max-width: 859px) {
  .mobile-app.map-background .driver-map-workspace .open-ride-action {
    top: 14px;
  }
}

@media (max-width: 390px) {
  .mobile-app.map-background .driver-map-workspace .open-ride-action {
    top: 154px;
  }
}

@media (max-width: 340px) {
  .mobile-app.map-background .driver-map-workspace .open-ride-action {
    width: 112px;
  }
}

/* Final responsive pass: keep the operational apps inside the actual viewport. */
html, body {
  width: 100%;
  max-width: 100%;
}
.mobile-app,
.desktop-app {
  min-width: 0;
  overflow-x: hidden;
}
.mobile-app .standalone,
.desktop-app .standalone {
  width: 100%;
  max-width: 100vw;
}
.mobile-app.map-background,
.mobile-app.map-background .standalone,
.mobile-app.map-background .role-workspace,
.mobile-app.map-background .map,
.mobile-app.map-background .driver-map-shell .map,
.mobile-app.map-background .map-stage .map {
  height: 100dvh;
  min-height: 100dvh;
}
.mobile-app.map-background .control-panel,
.mobile-app.map-background .presence-action,
.mobile-app.map-background .driver-map-workspace .current-ride,
.mobile-app.map-background .passenger-map-workspace .session-header,
.mobile-app.map-background .driver-status-pill {
  max-width: calc(100vw - 28px);
}
.mobile-app.map-background .control-panel {
  max-height: min(70dvh, calc(100dvh - 112px));
}
.passenger-estimate-page,
.driver-page,
.driver-notifications-page {
  width: 100vw;
  max-width: 100vw;
  min-height: 100dvh;
  overflow-y: auto;
}
.modal {
  min-width: 0;
}
.modal-card {
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
}
.desktop-app .role-workspace,
.desktop-app .admin-content,
.desktop-app .data-card,
.desktop-app .admin-create {
  min-width: 0;
}
.desktop-app .data-list {
  max-height: min(610px, 58dvh);
}

@media (min-width: 700px) and (max-width: 1180px) {
  .mobile-app .auth-shell {
    display: grid;
    grid-template-columns: minmax(360px, 520px);
    justify-content: center;
  }
  .mobile-app:not(.map-background) .map {
    height: clamp(320px, 48dvh, 560px);
    min-height: 320px;
  }
  .mobile-app.map-background .control-panel,
  .mobile-app.map-background .presence-action,
  .mobile-app.map-background .driver-map-workspace .current-ride {
    width: min(460px, calc(100vw - 36px));
  }
}

@media (max-width: 520px) {
  .mobile-app.map-background .driver-status-pill {
    left: 72px;
    right: 14px;
    width: auto;
    min-height: 64px;
    gap: 8px;
    padding: 9px 10px;
  }
  .driver-online-time {
    min-width: 68px;
    transform: none;
  }
  #driver-work-status {
    white-space: normal;
  }
  .mobile-app.map-background .driver-map-workspace .open-ride-action {
    top: 96px;
    right: 12px;
    width: 104px;
  }
  .mobile-app.map-background .driver-map-workspace .gps-overlay {
    bottom: 72px;
    right: 12px;
  }
  .driver-profile-grid,
  .final-trip-card,
  .live-metrics,
  .approach-cards {
    grid-template-columns: 1fr;
  }
  .driver-bottom-actions {
    left: 10px;
    right: 10px;
    bottom: 10px;
    gap: 6px;
  }
  .driver-bottom-actions > * {
    min-height: 42px;
    font-size: 12px;
  }
}

@media (max-width: 380px) {
  .mobile-app.map-background .driver-status-pill {
    left: 64px;
    font-size: 11px;
  }
  .driver-online-time {
    display: none;
  }
  .mobile-app.map-background .driver-map-workspace .open-ride-action {
    top: 90px;
    width: 96px;
    height: 42px;
    font-size: 11px;
  }
}
