:root {
  --rider-ink: #12332f;
  --rider-muted: #607773;
  --rider-green: #007f73;
  --rider-turquoise: #00a693;
  --rider-canvas: #f3f8f6;
  --rider-surface: #fff;
  --rider-mint: #e8f7f4;
  --rider-line: rgba(18, 51, 47, .1);
  --rider-touch: 44px;
  --rider-radius-sm: 16px;
  --rider-radius: 24px;
  --rider-radius-lg: 32px;
  --rider-shadow: 0 18px 48px rgba(18, 51, 47, .09);
}

[data-rider-view-panel][hidden] {
  display: none !important;
}

.rider-app { background: var(--rider-canvas); }
.rider-app .shell { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
.rider-product { width: min(100%, 1160px); margin: 0 auto; }
.rider-product-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 36px; }
.rider-kicker { margin: 0 0 5px; color: var(--rider-green); font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.rider-location-button, .rider-icon-button { min-height: var(--rider-touch); border: 0; color: var(--rider-ink); background: transparent; }
.rider-location-button { display: flex; align-items: center; gap: 8px; padding: 0; font-weight: 800; }
.rider-icon-button { display: grid; width: var(--rider-touch); place-items: center; border: 1px solid var(--rider-line); border-radius: 50%; background: white; box-shadow: 0 8px 24px rgba(18, 51, 47, .08); }
.rider-icon { display: block; width: 23px; height: 23px; }
.rider-intro { max-width: 680px; margin-bottom: 24px; }
.rider-intro h1 { max-width: 13ch; margin-bottom: 12px; color: var(--rider-ink); font-size: clamp(38px, 7vw, 70px); }
.rider-intro > p:last-child { color: var(--rider-muted); font-size: clamp(15px, 2vw, 18px); }
.rider-search { display: grid; grid-template-columns: 24px 1fr; align-items: center; gap: 12px; min-height: 58px; padding: 0 18px; border: 1px solid var(--rider-line); border-radius: 19px; background: white; box-shadow: 0 10px 30px rgba(18, 51, 47, .06); }
.rider-search:focus-within { border-color: var(--rider-turquoise); box-shadow: 0 0 0 4px rgba(0, 166, 147, .11); }
.rider-search input { width: 100%; border: 0; outline: 0; color: var(--rider-ink); background: transparent; font-size: 16px; }
.rider-chip-row { display: flex; gap: 9px; margin: 16px 0 38px; overflow-x: auto; scrollbar-width: none; }
.rider-chip { min-height: var(--rider-touch); padding: 0 18px; border: 1px solid var(--rider-line); border-radius: 999px; color: var(--rider-ink); background: white; font-weight: 750; white-space: nowrap; }
.rider-chip.active { border-color: var(--rider-ink); color: white; background: var(--rider-ink); }
.rider-section { margin-top: 30px; }
.rider-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.rider-section-heading h2 { margin: 0; font-size: clamp(25px, 3vw, 34px); }
.rider-empty-state { display: grid; justify-items: start; min-height: 220px; padding: clamp(24px, 5vw, 46px); border: 1px solid var(--rider-line); border-radius: var(--rider-radius-lg); background: linear-gradient(145deg, white, #edf9f6); }
.rider-empty-state h3 { margin: 18px 0 8px; font-size: 22px; }
.rider-empty-state p { max-width: 54ch; margin: 0; color: var(--rider-muted); }
.rider-empty-icon { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 17px; color: white; background: var(--rider-turquoise); }

.rider-nav { position: fixed; z-index: 80; right: max(12px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); left: max(12px, env(safe-area-inset-left)); display: grid; grid-template-columns: repeat(5, 1fr); max-width: 650px; min-height: 70px; margin: 0 auto; padding: 6px; border: 1px solid rgba(18, 51, 47, .09); border-radius: 23px; background: rgba(255, 255, 255, .94); box-shadow: 0 20px 55px rgba(18, 51, 47, .18); backdrop-filter: blur(20px); }
.rider-nav button { display: grid; min-width: 0; min-height: 58px; place-items: center; align-content: center; gap: 3px; padding: 3px; border: 0; border-radius: 17px; color: #667a77; background: transparent; font-size: 10px; font-weight: 760; }
.rider-nav button i { display: grid; place-items: center; }
.rider-nav button .rider-icon { width: 22px; height: 22px; stroke-width: 2; }
.rider-nav button.active,
.rider-nav button[aria-current="page"] { color: var(--rider-turquoise); background: transparent; font-weight: 850; }
.rider-app .history-panel { width: min(100%, 1060px); margin: 0 auto; padding: clamp(22px, 4vw, 40px); }
.wallet-section { margin-top: 34px; }
.wallet-empty { min-height: 170px; }
.you-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: 13px; margin-top: 26px; }
.you-card { display: grid; grid-template-columns: 46px 1fr; align-items: start; gap: 14px; padding: 19px; border: 1px solid var(--rider-line); border-radius: 21px; background: white; }
.you-card > .rider-icon { width: 24px; height: 24px; margin: 9px auto 0; color: var(--rider-green); }
.you-card h3 { margin: 0 0 7px; font-size: 18px; }
.you-card p:last-child { margin: 0; color: var(--rider-muted); font-size: 13px; }
.you-account { grid-column: 1 / -1; }
.you-account-actions { display: flex; gap: 10px; margin-top: 16px; }

@media (min-width: 768px) {
  .rider-product { padding: 20px 24px 60px; }
  .rider-nav button { grid-auto-flow: column; gap: 8px; font-size: 12px; }
}

@media (min-width: 1180px) {
  .rider-product { padding-top: 42px; }
  .rider-eat-home .rider-section { display: grid; grid-template-columns: minmax(0, 1fr); }
  .rider-app .history-panel { margin-top: 34px; }
}

@media (max-width: 767px) {
  .rider-app {
    background: #f7faf9;
  }

  .rider-app .shell {
    width: 100%;
    padding: calc(72px + env(safe-area-inset-top)) 16px calc(90px + env(safe-area-inset-bottom));
  }

  .rider-app .topbar {
    min-height: 60px;
    padding: calc(10px + env(safe-area-inset-top)) 16px 8px;
    background: linear-gradient(180deg, rgba(247, 250, 249, .98), rgba(247, 250, 249, .9) 72%, rgba(247, 250, 249, 0));
  }

  .rider-app .brand-logo {
    width: 96px;
  }

  .rider-product-header {
    margin-bottom: 22px;
  }

  .rider-intro {
    margin-bottom: 20px;
  }

  .rider-intro h1 {
    max-width: 12ch;
    margin-bottom: 10px;
    font-size: clamp(34px, 10.5vw, 44px);
    line-height: .98;
    letter-spacing: -.035em;
  }

  .rider-intro > p:last-child {
    font-size: 15px;
    line-height: 1.5;
  }

  .rider-search {
    min-height: 54px;
    border-radius: 17px;
    box-shadow: 0 8px 24px rgba(18, 51, 47, .05);
  }

  .rider-chip-row {
    margin: 14px 0 28px;
  }

  .rider-empty-state {
    min-height: 168px;
    padding: 22px;
    border-radius: 22px;
    background: #fff;
    box-shadow: none;
  }

  .rider-empty-state h3 {
    margin-top: 14px;
    font-size: 20px;
  }

  .rider-empty-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .rider-nav {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    min-height: calc(74px + env(safe-area-inset-bottom));
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid var(--rider-line);
    border-radius: 0;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -8px 28px rgba(18, 51, 47, .06);
  }

  .rider-nav button {
    min-height: 56px;
    gap: 4px;
    border-radius: 12px;
    background: transparent !important;
    color: #667a77;
    font-size: 10px;
    font-weight: 760;
  }

  .rider-nav button .rider-icon {
    width: 22px;
    height: 22px;
    stroke-width: 2;
  }

  .rider-nav button.active,
  .rider-nav button[aria-current="page"] {
    color: var(--rider-turquoise);
    font-weight: 850;
  }

  .rider-app .history-panel:not(.customer-view-inactive) {
    width: 100%;
    margin: 0;
    padding: 8px 0 24px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .rider-app .history-panel > .eyebrow {
    margin-top: 2px;
  }

  .rider-app .history-panel > h2,
  .bistam-rides-heading h2 {
    font-size: 32px;
    letter-spacing: -.03em;
  }

  .wallet-section {
    margin-top: 28px;
  }

  .wallet-empty {
    min-height: 138px;
  }

  .you-grid {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 18px;
    border-top: 1px solid var(--rider-line);
  }

  .you-card {
    grid-template-columns: 38px 1fr;
    gap: 12px;
    padding: 17px 0;
    border: 0;
    border-bottom: 1px solid var(--rider-line);
    border-radius: 0;
    background: transparent;
  }

  .you-card > .rider-icon {
    width: 21px;
    height: 21px;
    margin: 7px auto 0;
  }

  .you-card h3 {
    margin-bottom: 5px;
    font-size: 17px;
  }

  .you-account-actions {
    flex-wrap: wrap;
  }

  body[data-rider-view="ride"] .rider-map-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    min-height: 0;
    margin: 0;
  }

  body[data-rider-view="ride"] .ride-sheet {
    position: relative !important;
    z-index: 2;
    order: 1;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    max-height: none;
    margin: 0;
    padding: 20px;
    border: 1px solid var(--rider-line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(18, 51, 47, .07);
    overflow: visible;
    overscroll-behavior: auto;
  }

  body[data-rider-view="ride"] .ride-sheet .sheet-handle {
    display: none !important;
  }

  body[data-rider-view="ride"] .ride-sheet > .eyebrow,
  body[data-rider-view="ride"] .ride-sheet > h1,
  body[data-rider-view="ride"] .ride-sheet > .lede {
    display: block;
  }

  body[data-rider-view="ride"] .ride-sheet > h1 {
    max-width: none;
    margin: 4px 0 8px;
    font-size: 32px;
    line-height: 1;
    letter-spacing: -.035em;
  }

  body[data-rider-view="ride"] .ride-sheet > .lede {
    margin: 0 0 18px;
    color: var(--rider-muted);
    font-size: 14px;
    line-height: 1.45;
  }

  body[data-rider-view="ride"] .rider-unified-map {
    position: relative !important;
    z-index: 1;
    order: 2;
    inset: auto !important;
    width: 100%;
    min-height: 230px;
    height: min(64vw, 280px);
    padding: 0;
    border: 1px solid var(--rider-line);
    border-radius: 24px;
    background: #e9f2ef;
    box-shadow: none;
    overflow: hidden;
  }

  body[data-rider-view="ride"] .rider-unified-map .map-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  body[data-rider-view="ride"] .rider-unified-map .map-chip {
    top: auto;
    right: auto;
    bottom: 12px;
    left: 12px;
    max-width: calc(100% - 24px);
  }

  body[data-rider-view="ride"] .map-controls {
    top: 12px;
    right: 12px;
    left: 12px;
  }

  body[data-rider-view="ride"] .ride-quick-row {
    margin: 14px 0;
  }

  body[data-rider-view="ride"] .ride-quick-row button {
    min-height: 60px;
    border-radius: 15px;
  }

  body[data-rider-view="ride"] .vehicle-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body[data-rider-view="ride"] .vehicle {
    min-height: 64px;
    border-radius: 16px;
  }

  body[data-rider-view="ride"] .airport-fare-card,
  body[data-rider-view="ride"] .ride-safety-shortcut,
  body[data-rider-view="ride"] .ride-stage,
  body[data-rider-view="ride"] .status-card {
    border-radius: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
