/* =========================================================
   Dodo Ride – styles
   Two themes: dark (default, the original look) and light.
   Every color comes from the tokens below.
   ========================================================= */

/* Brand colors (same in both themes) */
:root {
  --purple: #36045A;
  --purple-2: #4B0C8C;
  --orange: #F0049B;
  --orange-2: #FF3DB4;
  --green: #22c55e;
  --red: #e5484d;
  --white: #fff;
  --radius: 18px;
}

/* ---------- Dark theme (default) ---------- */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #150427;
  --bg-alt: #1B0633;
  --surface: #230A40;
  --surface-2: #2D0E52;
  --text: #f7eefa;
  --muted: #c3a8ca;
  --line: #3F1A6B;
  --chip-bg: #3A1263;
  --chip-text: #f3e2f7;
  --chip-hover: #481A78;
  --accent-soft: rgba(240,4,155, .14);
  --header-bg: rgba(36,6,66, .92);
  --header-link: #f1dff5;
  --hero-bg:
    radial-gradient(circle at 85% 20%, rgba(240,4,155,.25), transparent 40%),
    linear-gradient(160deg, #36045A 0%, #4B0C8C 100%);
  --hero-text: #fff;
  --hero-muted: #e6d3ea;
  --band-bg: #36045A;
  --footer-bg: #100320;
  --shadow: 0 20px 50px rgba(0, 0, 0, .45);
  --shadow-sm: 0 14px 30px rgba(0, 0, 0, .3);
  --overlay: rgba(8,2,18, .7);
  --toast-bg: #f7eefa;
  --toast-text: #170A2A;
  --alert-bg: rgba(229, 72, 77, .15);
}

/* ---------- Light theme ---------- */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-alt: #fbf7fc;
  --surface: #ffffff;
  --surface-2: #faf6fb;
  --text: #170A2A;
  --muted: #6b5a70;
  --line: #eadfee;
  --chip-bg: #f6eef8;
  --chip-text: #36045A;
  --chip-hover: #ecdcf0;
  --accent-soft: #FFF0FA;
  --header-bg: rgba(255, 255, 255, .92);
  --header-link: #36045A;
  --hero-bg:
    radial-gradient(circle at 85% 20%, rgba(240,4,155,.18), transparent 45%),
    linear-gradient(160deg, #FFF2FA 0%, #F0E6FA 100%);
  --hero-text: #170A2A;
  --hero-muted: #5d4a63;
  --band-bg: #36045A;
  --footer-bg: #1E0538;
  --shadow: 0 20px 50px rgba(54,4,90, .16);
  --shadow-sm: 0 14px 30px rgba(54,4,90, .08);
  --overlay: rgba(23,10,42, .55);
  --toast-bg: #170A2A;
  --toast-text: #fff;
  --alert-bg: #fff1f1;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
section[id], form[id], div[id] { scroll-margin-top: 84px; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.hidden, [hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.text-link { color: var(--orange); font-weight: 600; }
.text-link:hover { text-decoration: underline; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 600; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--orange); color: var(--white); box-shadow: 0 8px 20px rgba(240,4,155,.35); }
.btn-primary:hover { background: var(--orange-2); }
.btn-ghost { background: var(--chip-bg); color: var(--chip-text); }
.btn-ghost:hover { background: var(--chip-hover); }
.btn-ghost.danger { color: var(--red); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { filter: brightness(1.08); }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; font-size: .85rem; margin-top: 10px; }
.icon-btn { background: none; border: 0; cursor: pointer; font-size: 1.1rem; color: var(--chip-text); padding: 4px 8px; border-radius: 8px; }
.icon-btn:hover { background: var(--chip-bg); }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 20px; height: 72px; }
.brand img { height: 38px; width: auto; border-radius: 6px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--header-link); font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--orange); }
.menu-btn { display: none; background: none; border: 0; color: var(--header-link); font-size: 1.6rem; cursor: pointer; }

/* Theme toggle: a pill with a sliding knob */
.theme-toggle {
  position: relative; width: 62px; height: 32px; flex-shrink: 0;
  border-radius: 999px; border: 1px solid var(--line); background: var(--chip-bg);
  cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 0 8px;
}
.theme-toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--orange); transition: transform .25s ease;
}
:root[data-theme="light"] .theme-toggle::after { transform: translateX(30px); }
.theme-icon { font-size: .8rem; line-height: 1; position: relative; z-index: 1; }

/* ===== Hero ===== */
.hero { background: var(--hero-bg); color: var(--hero-text); padding: 70px 0 90px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; }
.pill {
  display: inline-block; background: rgba(240,4,155,.15); color: var(--orange);
  padding: 6px 14px; border-radius: 999px; font-size: .82rem; font-weight: 600;
  border: 1px solid rgba(240,4,155,.4);
}
.pill-light { background: rgba(255,255,255,.1); color: var(--white); border-color: rgba(255,255,255,.25); }
.hero h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); line-height: 1.15; margin: 18px 0; font-weight: 800; }
.hl { color: var(--orange); }
.hero p { color: var(--hero-muted); font-size: 1.05rem; max-width: 520px; }
.hero-stats { display: flex; gap: 36px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats strong { display: block; font-size: 1.6rem; color: var(--orange); }
.hero-stats span { font-size: .85rem; color: var(--hero-muted); }

/* ===== Booking card ===== */
.booking-card {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line);
  border-radius: 24px; padding: 26px; box-shadow: var(--shadow);
}
.booking-card h2 { font-size: 1.4rem; margin-bottom: 14px; }
.loc-inputs { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 6px 10px; }
.loc { display: flex; align-items: center; gap: 10px; }
.loc input { flex: 1; border: 0; background: transparent; padding: 12px 0; outline: none; min-width: 0; }
.loc input::placeholder, .driver-form input::placeholder, .contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--muted); }
.loc-line { height: 1px; background: var(--line); margin-left: 22px; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.dot-green { background: var(--green); }
.dot-orange { background: var(--orange); }

.ride-options { display: grid; gap: 8px; margin: 16px 0; }
.ride-opt {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border: 2px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--surface);
  text-align: left; transition: border-color .15s, background .15s;
}
.ride-opt:hover { border-color: var(--chip-hover); }
.ride-opt.active { border-color: var(--orange); background: var(--accent-soft); }
.ride-opt .emoji { font-size: 1.6rem; width: 36px; text-align: center; }
.ride-opt .info { flex: 1; line-height: 1.3; }
.ride-opt .info strong { display: block; font-size: .95rem; }
.ride-opt .info span { font-size: .78rem; color: var(--muted); }
.ride-opt .price { font-weight: 700; color: var(--orange); }

.row-between { display: flex; gap: 10px; margin-bottom: 14px; }
.select-wrap { flex: 1; display: flex; flex-direction: column; font-size: .75rem; color: var(--muted); gap: 4px; }
.select-wrap select, .driver-form select {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text);
}
.form-error { color: var(--red); font-size: .85rem; min-height: 1.2em; margin-bottom: 6px; }

/* ===== Live ride ===== */
.map {
  position: relative; height: 200px; border-radius: 16px; overflow: hidden;
  background: var(--surface-2); color: var(--text);
}
.map svg { width: 100%; height: 100%; }
/* Google map: replaces the drawn map once it has loaded */
.gmap { position: absolute; inset: 0; display: none; }
.has-gmap .gmap { display: block; }
.has-gmap > svg, .has-gmap > .car { display: none; }
.loc { position: relative; }
.place-list {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 30; margin: 4px 0 0; padding: 4px; list-style: none;
  background: var(--surface-2); color: var(--text); border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.35); max-height: 260px; overflow-y: auto;
}
.place-list li { padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.place-list li:hover { background: rgba(240,4,155, .15); }
.place-list strong { display: block; font-size: .92rem; font-weight: 600; }
.place-list span { display: block; font-size: .78rem; opacity: .7; }
.car {
  position: absolute; font-size: 1.6rem; transform: translate(-50%, -50%);
  transition: left .9s linear, top .9s linear; left: 80%; top: 20%;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.25));
}
.radar {
  position: absolute; left: 15%; top: 82%; width: 20px; height: 20px; border-radius: 50%;
  transform: translate(-50%, -50%); background: rgba(240,4,155,.35);
  animation: radar 1.4s ease-out infinite;
}
@keyframes radar { from { box-shadow: 0 0 0 0 rgba(240,4,155,.5); } to { box-shadow: 0 0 0 70px rgba(240,4,155,0); } }

.status { margin: 16px 0 10px; }
.status-title { font-weight: 700; font-size: 1.1rem; }
.status-sub { color: var(--muted); font-size: .9rem; }

.driver {
  display: flex; align-items: center; gap: 14px; padding: 12px;
  border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px;
}
.avatar {
  width: 48px; height: 48px; border-radius: 50%; background: var(--orange); color: var(--white);
  display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; flex-shrink: 0;
}
.driver-info { flex: 1; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.driver-info span { font-size: .82rem; color: var(--muted); }
.driver-info .rating { color: #f59e0b; }
.otp { text-align: center; background: var(--chip-bg); padding: 6px 12px; border-radius: 10px; }
.otp span { font-size: .7rem; color: var(--muted); display: block; }
.otp strong { letter-spacing: 3px; color: var(--chip-text); }

.trip-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.trip-meta div { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; }
.trip-meta span { display: block; font-size: .72rem; color: var(--muted); }
.trip-meta strong { font-size: .95rem; }

.live-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.live-actions .btn { flex: 1; padding: 10px 12px; font-size: .88rem; }

/* ===== Done ===== */
#stepDone { text-align: center; }
.done-icon {
  width: 70px; height: 70px; border-radius: 50%; background: var(--green); color: var(--white);
  display: grid; place-items: center; font-size: 2rem; margin: 10px auto 14px;
}
.stars { display: flex; justify-content: center; gap: 6px; margin: 16px 0 20px; }
.stars button { background: none; border: 0; font-size: 2rem; color: var(--line); cursor: pointer; }
.stars button.on { color: #f59e0b; }

/* ===== Modals ===== */
.modal {
  position: fixed; inset: 0; z-index: 100; background: var(--overlay);
  display: grid; place-items: center; padding: 16px; animation: fade .2s;
}
@keyframes fade { from { opacity: 0; } }
.modal-card {
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  border-radius: 24px; padding: 26px; width: min(460px, 100%);
  box-shadow: var(--shadow); animation: pop .25s ease-out;
}
.modal-card h3 { font-size: 1.25rem; line-height: 1.3; margin-bottom: 6px; }
@keyframes pop { from { transform: translateY(20px) scale(.97); opacity: 0; } }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }
.rec-badge {
  display: inline-block; background: var(--orange); color: var(--white); font-size: .75rem;
  font-weight: 700; padding: 4px 12px; border-radius: 999px; margin-bottom: 10px;
}
.rec-head p { font-size: .9rem; margin-top: 4px; }
.rec-options { display: grid; gap: 10px; margin: 18px 0 14px; }
.rec-opt {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--surface); cursor: pointer; text-align: left;
  transition: border-color .15s, transform .15s;
}
.rec-opt:hover { border-color: var(--orange); transform: translateY(-1px); }
.rec-opt.best { border-color: var(--orange); background: var(--accent-soft); }
.rec-opt .emoji { font-size: 1.6rem; }
.rec-opt .info { flex: 1; line-height: 1.3; }
.rec-opt .info strong { display: block; }
.rec-opt .info span { font-size: .8rem; color: var(--muted); }
.rec-opt .tag { font-size: .68rem; background: var(--orange); color: var(--white); padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.rec-opt .price { text-align: right; font-weight: 700; color: var(--orange); line-height: 1.2; }
.rec-opt .price s { display: block; font-size: .75rem; color: var(--muted); font-weight: 400; }
.rec-timer { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); }
.bar { flex: 1; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; width: 100%; background: var(--orange); transition: width 1s linear; }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120px);
  background: var(--toast-bg); color: var(--toast-text); padding: 12px 20px; border-radius: 999px;
  font-size: .9rem; z-index: 200; transition: transform .3s; max-width: calc(100% - 32px); text-align: center;
  box-shadow: var(--shadow-sm);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ===== Sections ===== */
.section { padding: 90px 0; background: var(--bg); }
.section-soft { background: var(--bg-alt); }
.section-dark { background: var(--band-bg); color: var(--white); }
.section-title { font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.2; font-weight: 800; margin-bottom: 10px; }
.section-title.light { color: var(--white); margin-top: 14px; }
.section-sub { color: var(--muted); max-width: 620px; margin-bottom: 36px; }
.section-sub.light { color: #e1cbe6; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.type-card, .feature, .step-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--surface);
  transition: transform .2s, box-shadow .2s;
}
.type-card:hover, .feature:hover, .step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.type-card .emoji { font-size: 2.4rem; }
.type-card h3, .feature h3, .step-card h3 { margin: 10px 0 4px; font-size: 1.1rem; }
.type-card p, .feature p, .step-card p { color: var(--muted); font-size: .92rem; }
.type-card .from { margin-top: 12px; font-weight: 700; color: var(--orange); }
.f-icon { font-size: 2rem; }

.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 30px; }
.num {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--orange); color: var(--white); font-weight: 700;
}

/* ===== Recovery section ===== */
.recovery-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 60px; align-items: center; }
.checks { list-style: none; display: grid; gap: 12px; margin-bottom: 30px; }
.checks li { padding-left: 32px; position: relative; color: #ead8ee; }
.checks li::before {
  content: '✓'; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--orange); color: var(--white); display: grid; place-items: center; font-size: .75rem; font-weight: 700;
}
.checks li strong { color: var(--white); }
.checks.dark li { color: var(--text); }

/* phone mock always shows the app in light mode */
.phone {
  justify-self: center; width: 270px; padding: 12px; border-radius: 40px; background: #1a0520;
  box-shadow: 0 30px 60px rgba(0,0,0,.4);
}
.phone-screen { background: #fff; color: #170A2A; border-radius: 30px; padding: 22px 16px; display: grid; gap: 10px; }
.phone-alert { background: #fff1f1; color: var(--red); font-weight: 600; font-size: .85rem; padding: 10px; border-radius: 12px; text-align: center; }
.phone-opt { display: flex; justify-content: space-between; font-size: .82rem; padding: 12px; border: 1px solid #eadfee; border-radius: 12px; }
.phone-opt.best { border: 2px solid var(--orange); background: #fff6ef; }
.phone-btn { display: block; background: var(--orange); color: var(--white); text-align: center; padding: 12px; border-radius: 999px; font-weight: 600; font-size: .9rem; margin-top: 6px; }
.phone-btn:hover { background: var(--orange-2); }

/* ===== Drive + forms ===== */
.drive-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.driver-form {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 28px;
  display: grid; gap: 12px; box-shadow: var(--shadow-sm);
}
.driver-form h3 { margin-bottom: 4px; }
.driver-form input, .contact-form input, .contact-form textarea {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); outline: none;
  color: var(--text); resize: vertical;
}
.driver-form input:focus, .driver-form select:focus,
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--orange); }

.about-grid { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 18px; align-items: start; }
.contact-form { display: grid; gap: 10px; }
.contact-form h3 { margin-bottom: 0; }

/* ===== Footer ===== */
.footer { background: var(--footer-bg); color: #e8d6ec; padding: 60px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.footer-logo { height: 40px; width: auto; border-radius: 6px; margin-bottom: 12px; }
.footer h4 { color: var(--white); margin-bottom: 10px; }
.footer a { display: block; color: #cbb3d1; font-size: .92rem; margin-bottom: 6px; }
.footer a:hover { color: var(--orange-2); }
.muted-light { color: #b79bbd; }
.copyright { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; font-size: .85rem; color: #a487aa; }

/* =========================================================
   Added features
   ========================================================= */

/* --- small helpers --- */
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.narrow { width: min(820px, 100% - 32px); }
.form-stack { display: grid; gap: 10px; }
.field { flex: 1; display: flex; flex-direction: column; font-size: .75rem; color: var(--muted); gap: 4px; margin-bottom: 10px; min-width: 0; }
.field input, .field select, .field textarea,
.form-stack > input, .form-stack > textarea, .form-stack > select {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-2); color: var(--text); font-size: .92rem; outline: none; width: 100%;
}
.field input:focus, .field select:focus, .form-stack > input:focus, .form-stack > textarea:focus { border-color: var(--orange); }
.row-between .field { margin-bottom: 0; }
.dot-purple { background: #a855f7; }

/* --- chips --- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip-row.center { justify-content: center; }
.chip {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  padding: 6px 12px; border-radius: 999px; font-size: .8rem; cursor: pointer; transition: border-color .15s, background .15s;
}
.chip:hover { border-color: var(--orange); }
.chip.active { background: var(--orange); border-color: var(--orange); color: var(--white); }

/* --- booking modes --- */
.mode-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--surface-2); padding: 5px; border-radius: 14px; margin-bottom: 14px; }
.mode-tab { border: 0; background: transparent; padding: 9px 6px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--muted); }
.mode-tab.active { background: var(--orange); color: var(--white); box-shadow: 0 6px 14px rgba(240,4,155,.3); }
.extra-fields { margin-top: 12px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; margin-bottom: 10px; }
.seg-btn { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: .85rem; color: var(--muted); }
.seg-btn.active { background: var(--chip-bg); color: var(--chip-text); font-weight: 600; }

.surge {
  margin-top: 12px; padding: 8px 12px; border-radius: 12px; font-size: .82rem;
  background: rgba(245, 158, 11, .14); color: #d97706; border: 1px solid rgba(245, 158, 11, .35);
}
.live-badge {
  margin-top: 12px; padding: 8px 12px; border-radius: 12px; font-size: .82rem;
  background: rgba(34, 197, 94, .12); color: var(--green); border: 1px solid rgba(34, 197, 94, .35);
}
.live-badge b { color: var(--text); }
.live-badge .link-btn { margin: 0 0 0 4px; color: var(--green); font-size: .82rem; }
.promo-input { display: flex; gap: 6px; }
.promo-input input { flex: 1; min-width: 0; text-transform: uppercase; }

.fare-box { border: 1px dashed var(--line); border-radius: 14px; padding: 10px 14px; margin: 12px 0 4px; font-size: .85rem; }
.fare-box:empty { display: none; }
.fare-row { display: flex; justify-content: space-between; color: var(--muted); padding: 2px 0; }
.fare-row.discount { color: var(--green); }
.fare-row.total { color: var(--text); font-weight: 700; font-size: 1rem; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }

/* --- live ride extras --- */
.contact-row { display: flex; gap: 8px; margin-bottom: 10px; }
.contact-row .btn { flex: 1; }
.badge { background: var(--red); color: var(--white); border-radius: 999px; font-size: .7rem; padding: 0 6px; margin-left: 4px; }
.rider-note { font-size: .82rem; color: var(--muted); background: var(--surface-2); padding: 8px 12px; border-radius: 10px; margin-bottom: 10px; }
.btn-ghost.sos { color: var(--white); background: var(--red); }
.done-actions { display: flex; gap: 8px; margin: 14px 0 10px; }
.done-actions .btn { flex: 1; }
.done-icon.sched { background: var(--orange); font-size: 1.8rem; }
#stepDone .fare-box { text-align: left; }

/* --- rentals section --- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.feature.big { padding: 30px; display: flex; flex-direction: column; gap: 6px; }
.feature.big .btn { align-self: flex-start; margin-top: 12px; }
.pkg-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.pkg { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); font-size: .85rem; }
.pkg strong { display: block; color: var(--orange); }
.checks.compact { margin: 12px 0 0; gap: 8px; }

/* --- offers & referral --- */
.offer {
  border: 1px dashed var(--orange); border-radius: var(--radius); padding: 22px; background: var(--surface);
  cursor: pointer; text-align: left; color: var(--text); transition: transform .2s;
}
.offer:hover { transform: translateY(-3px); }
.offer .code { display: inline-block; background: var(--accent-soft); color: var(--orange); font-weight: 700; letter-spacing: 1px; padding: 4px 10px; border-radius: 8px; margin-bottom: 8px; }
.offer h3 { font-size: 1.05rem; margin-bottom: 4px; }
.offer p { color: var(--muted); font-size: .88rem; }
.refer-card {
  margin-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--surface);
}
.refer-card h3 { margin-bottom: 4px; }
.refer-code { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 16px; font-weight: 700; letter-spacing: 1px; }
.refer-code.small-code { justify-content: space-between; margin-bottom: 14px; }

/* --- FAQ --- */
.faq { display: grid; gap: 10px; margin-top: 24px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 14px 18px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--orange); font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { color: var(--muted); margin-top: 8px; font-size: .92rem; }

/* --- modals extras --- */
.modal-card { position: relative; max-height: calc(100vh - 32px); overflow-y: auto; }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: var(--surface-2); color: var(--text); cursor: pointer;
}
.modal-close.static { position: static; flex-shrink: 0; }
.phone-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.phone-input span { padding: 0 12px; color: var(--muted); border-right: 1px solid var(--line); }
.phone-input input { flex: 1; border: 0; background: transparent; padding: 12px; outline: none; min-width: 0; }
.otp-input { text-align: center; font-size: 1.4rem; letter-spacing: 10px; }
.demo-note { font-size: .8rem; color: var(--orange); text-align: center; }
#loginModal h3 { margin-bottom: 4px; padding-right: 36px; }
#loginModal .form-stack { margin-top: 16px; }

.chat-card { display: flex; flex-direction: column; }
.chat-log { height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px; margin-top: 12px; background: var(--surface-2); border-radius: 14px; }
.msg { max-width: 80%; padding: 8px 12px; border-radius: 14px; font-size: .88rem; line-height: 1.4; }
.msg.them { background: var(--surface); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.me { background: var(--orange); color: var(--white); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.typing { color: var(--muted); font-style: italic; }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); outline: none; }

.invoice h3 { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.invoice h3 img { height: 28px; border-radius: 4px; }
.invoice .inv-meta { font-size: .82rem; color: var(--muted); margin: 6px 0 14px; }
.invoice .fare-box { border-style: solid; }

/* --- account drawer --- */
.drawer-backdrop { position: fixed; inset: 0; background: var(--overlay); z-index: 90; animation: fade .2s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); z-index: 95;
  background: var(--bg); border-left: 1px solid var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s ease;
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 20px; border-bottom: 1px solid var(--line); }
.drawer-user { flex: 1; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.drawer-user span { font-size: .85rem; color: var(--muted); }
.drawer-tabs { display: flex; gap: 4px; padding: 10px 14px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.drawer-tabs button { border: 0; background: transparent; padding: 8px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; font-size: .85rem; color: var(--muted); }
.drawer-tabs button.active { background: var(--chip-bg); color: var(--chip-text); font-weight: 600; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px 30px; }
.panel-title { margin: 20px 0 10px; font-size: .95rem; }
.list { display: grid; gap: 10px; }
.list-empty { color: var(--muted); font-size: .88rem; text-align: center; padding: 20px; border: 1px dashed var(--line); border-radius: 14px; }
.list-item { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface); font-size: .86rem; }
.list-item .li-top { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
.list-item .li-sub { color: var(--muted); font-size: .8rem; margin-top: 2px; }
.list-item .li-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.status-tag { font-size: .7rem; padding: 2px 8px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.status-tag.completed { background: rgba(34,197,94,.15); color: var(--green); }
.status-tag.cancelled { background: rgba(229,72,77,.15); color: var(--red); }
.status-tag.scheduled, .status-tag.open { background: var(--accent-soft); color: var(--orange); }
.amount-plus { color: var(--green); }
.amount-minus { color: var(--red); }
.wallet-card {
  background: linear-gradient(135deg, var(--purple), var(--purple-2)); color: var(--white);
  border-radius: 18px; padding: 20px; margin-bottom: 14px;
}
.wallet-card span { font-size: .85rem; opacity: .85; }
.wallet-card strong { display: block; font-size: 2rem; }
.logout { margin-top: 16px; color: var(--red); }

/* --- print: only the invoice --- */
@media print {
  body * { visibility: hidden; }
  #invoiceBody, #invoiceBody * { visibility: visible; color: #000 !important; }
  #invoiceBody { position: absolute; left: 0; top: 0; width: 100%; }
}

/* Grid/flex children may shrink below their content width (prevents sideways scrolling on phones) */
.hero-grid > *, .recovery-grid > *, .drive-grid > *, .about-grid > *, .two-col > *,
.cards-grid > *, .steps-grid > *, .footer-grid > *, .row-between > *,
.mode-tabs > *, .booking-card, .ride-opt .info { min-width: 0; }
.hero h1, .section-title { overflow-wrap: anywhere; }
.mode-tab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field select, .field input { max-width: 100%; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-grid, .recovery-grid, .drive-grid, .about-grid, .two-col { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 40px 0 60px; }
}
@media (max-width: 1100px) {
  .nav-links {
    display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column;
    background: var(--bg); padding: 16px; gap: 14px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm);
  }
  .nav-links.open { display: flex; }
  .theme-toggle { margin-left: auto; }
  .menu-btn { display: block; }
}
@media (max-width: 760px) {
  .brand img { height: 30px; }
  .nav { gap: 10px; }
  .nav-cta { padding: 8px 14px; font-size: .85rem; }
}
@media (max-width: 380px) {
  .hero .booking-card { padding: 14px; }
  .mode-tab { font-size: .78rem; padding: 9px 2px; }
}
@media (max-width: 520px) {
  .steps-grid { grid-template-columns: 1fr; }
  .booking-card { padding: 18px; }
  .row-between { flex-direction: column; }
  .section { padding: 60px 0; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===== Booking-first homepage and the separate pages ===== */
.nav-links { gap: 22px; }
.nav-links a.active { color: var(--orange); }
.hero-link { display: inline-block; margin-top: 18px; color: var(--orange); font-weight: 600; }
.hero-link:hover { text-decoration: underline; }
a.type-card { color: inherit; text-decoration: none; display: block; }
.social { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.footer .social-link {
  display: grid; place-items: center; width: 40px; height: 40px; margin: 0; border-radius: 10px;
  background: rgba(255,255,255,.08); color: #fff; transition: background .2s, color .2s;
}
.footer .social-link:hover { background: var(--orange); color: #fff; }
.subpage .legal { padding-top: 40px; }
.subpage main > .section:first-child { padding-top: 56px; }
@media (min-width: 961px) {
  /* booking takes the space: a short headline beside a wide booking card */
  .hero { padding: 48px 0 70px; }
  .hero .hero-grid { grid-template-columns: .85fr 1.15fr; align-items: start; }
  .hero .hero-copy { padding-top: 70px; position: sticky; top: 90px; }
}
@media (max-width: 960px) {
  .hero h1 { font-size: clamp(1.7rem, 7vw, 2.3rem); margin: 6px 0 10px; }
  .hero p { font-size: .98rem; }
  .hero .hero-grid { gap: 22px; }
}
@media (max-width: 600px) {
  /* phones: the booking card comes first, so keep the headline short */
  .hero { padding: 22px 0 40px; }
  .hero .hero-copy p { display: none; }
  .hero-link { margin-top: 4px; font-size: .9rem; }
}
