:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #777a72;
  --line: #e9e9e3;
  --paper: #fff;
  --canvas: #f7f7f3;
  --pink: #ffd400;
  --pink-dark: #d8b400;
  --yellow: #ffd400;
  --yellow-dark: #d8b400;
  --green: #238653;
  --green-soft: #e9f5ed;
  --red: #c7473c;
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 12%, #ffd40024 0, transparent 11rem),
    radial-gradient(circle at 92% 18%, #ffd4001d 0, transparent 13rem),
    radial-gradient(circle at 50% 100%, #11111112 0, transparent 15rem),
    linear-gradient(135deg, #ffffff 0%, #fffbea 48%, #f7f7f3 100%);
    var(--canvas);
  color: var(--ink);
  min-height: 100vh;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell {
  width: min(100% - 48px, 1040px);
  margin: 0 auto;
  position: relative;
}
.app-shell::before,
.app-shell::after {
  content: "";
  position: fixed;
  z-index: 0;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  pointer-events: none;
}
.app-shell::before {
  left: -130px;
  bottom: 8%;
  border: 34px solid #ffd40012;
  box-shadow: 0 0 40px #ffd40012, 0 0 0 34px #ffd40008;
  animation: float-left 9s ease-in-out infinite;
}
.app-shell::after {
  right: -140px;
  top: 28%;
  border: 38px solid #11111110;
  box-shadow: 0 0 40px #ffd4000d, 0 0 0 26px #ffd40007;
  animation: float-right 11s ease-in-out infinite;
}
@keyframes float-left {
  50% { transform: translate(24px, -18px) scale(1.04); }
}
@keyframes float-right {
  50% { transform: translate(-20px, 22px) scale(.96); }
}
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #eaeae5; background: #f7f7f3cc; backdrop-filter: blur(10px); }
.topbar-actions { display: flex; align-items: center; gap: 7px; }
.theme-button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #e6e7e1; border-radius: 50%; background: white; color: var(--ink); font-size: 16px; transition: background .15s, border-color .15s, transform .15s; }
.theme-button:active { transform: scale(.96); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font: 800 20px Manrope, sans-serif; letter-spacing: -1px; text-decoration: none; }
.brand-logo { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; box-shadow: 0 3px 10px #00000018; }
.brand-name { color: var(--ink); font: 800 20px Manrope, sans-serif; letter-spacing: -0.8px; white-space: nowrap; }
.brand-name span { color: var(--yellow-dark); }
.footer-logo { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.brand-mark, .footer-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; background: var(--pink); color: #fff; font: 800 18px Manrope, sans-serif; transform: rotate(-5deg); }
.brand-dot { color: var(--yellow-dark); }
.city-label { color: #5e605a; font-size: 13px; font-weight: 600; }
.pin-icon { color: var(--yellow-dark); font-size: 18px; vertical-align: -1px; }
.install-button { padding: 8px 11px; border: 1px solid #e8e8e2; border-radius: 7px; background: white; color: var(--ink); font-size: 11px; font-weight: 700; }

.hero { min-height: 253px; display: flex; align-items: center; justify-content: space-between; overflow: hidden; position: relative; padding: 37px 54px; margin-top: 27px; border-radius: 17px; background: #111111; color: white; }
.hero-copy { position: relative; z-index: 1; }
.eyebrow, .section-kicker { display: inline-flex; align-items: center; gap: 7px; color: #a9b0a7; font-size: 10px; font-weight: 800; letter-spacing: 1.15px; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); }
.hero h1 { margin: 14px 0 9px; font: 800 clamp(29px, 4vw, 39px)/1.13 Manrope, sans-serif; letter-spacing: -1.6px; }
.hero h1 span { color: var(--yellow); }
.hero p { margin: 0; color: #c6c9c3; font-size: 13px; }
.hero-art { position: absolute; inset: 0 0 0 57%; overflow: hidden; }
.sun { position: absolute; width: 145px; height: 145px; right: 88px; top: 24px; border-radius: 50%; background: #272127; }
.art-road { position: absolute; width: 480px; height: 110px; right: -56px; bottom: -50px; border: 3px dashed #73735e; border-radius: 50%; transform: rotate(-10deg); }
.art-bike { position: absolute; top: 79px; right: 145px; font-size: 77px; filter: drop-shadow(0 10px 8px #1117); transform: scaleX(-1) rotate(-3deg); }
.art-card { position: absolute; right: 24px; bottom: 23px; display: flex; align-items: center; gap: 10px; padding: 10px 13px; border: 1px solid #ffffff1a; border-radius: 10px; background: #242024; box-shadow: 0 8px 22px #14191466; }
.art-check { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #4a9b67; font-size: 13px; }
.art-card b, .art-card small { display: block; }
.art-card b { font-size: 11px; }
.art-card small { margin-top: 2px; color: #c6c9c3; font-size: 9px; }

.mode-tabs { display: flex; gap: 5px; width: fit-content; padding: 5px; margin: 21px auto 19px; border: 1px solid #e8e8e2; border-radius: 12px; background: linear-gradient(135deg, #ffffffcc, #eeeee9); box-shadow: 0 8px 28px #1717170a; }
.mode-tab { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0; border-radius: 8px; background: transparent; color: #686b63; font-size: 12px; font-weight: 700; transition: background .18s, color .18s, box-shadow .18s; }
.mode-tab span { font-size: 15px; }
.mode-tab.active { background: white; color: var(--ink); box-shadow: 0 1px 5px #1c211515; }

.panel {
  position: relative;
  overflow: hidden;
  padding: 28px 32px 26px;
  border: 1px solid #ecece7;
  border-radius: 15px;
  background:
    radial-gradient(circle at 92% 8%, #ffd40009 0, transparent 8rem),
    var(--paper);
  box-shadow: 0 10px 35px #24261b0d;
}
.panel::before {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -145px;
  top: -145px;
  border: 24px solid #ffd4000a;
  border-radius: 50%;
  pointer-events: none;
}
.panel-heading,
.ride-form,
.auth-form,
.driver-controls,
.calls-heading,
.calls-list,
.admin-summary,
.add-driver-form,
.admin-list {
  position: relative;
  z-index: 1;
}
.panel[hidden], [hidden] { display: none !important; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-kicker { color: var(--pink-dark); font-size: 9px; }
.panel-heading h2 { margin: 7px 0 4px; font: 800 21px Manrope, sans-serif; letter-spacing: -.5px; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.availability { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid #dcebe0; border-radius: 30px; background: #f2f8f3; color: #33734a; font-size: 10px; font-weight: 700; white-space: nowrap; }
.availability.offline { border-color: #f0dfdc; background: #fcf4f3; color: #a34a40; }
.status-light { width: 7px; height: 7px; border-radius: 50%; background: #35a660; box-shadow: 0 0 0 3px #35a6601c; }
.availability.offline .status-light { background: #c7473c; box-shadow: 0 0 0 3px #c7473c1a; }

.ride-form { margin-top: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 8px; }
.field-full { grid-column: 1 / -1; }
.field-label { display: flex; align-items: center; gap: 8px; color: #41443d; font-size: 11px; font-weight: 700; }
.field-number { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 6px; background: #fff7c7; color: #111111; font-size: 10px; }
.field input, .field select { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid #e6e7e1; border-radius: 8px; outline: 0; background: white; color: #33362f; font-size: 12px; transition: border-color .15s, box-shadow .15s; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23777a72' d='m2 4 4 4 4-4z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
.field input::placeholder { color: #a6a8a2; }
.field input:focus, .field select:focus { border-color: var(--pink); box-shadow: 0 0 0 3px #ffd40021; }
.field-hint { color: #8b8d85; font-size: 10px; }
.phone-input { display: flex; min-height: 42px; align-items: center; overflow: hidden; border: 1px solid #e6e7e1; border-radius: 8px; }
.phone-input:focus-within { border-color: var(--pink); box-shadow: 0 0 0 3px #ffd40021; }
.phone-input .country-code { padding: 0 11px; border-right: 1px solid #e6e7e1; color: #75786f; font-size: 12px; }
.phone-input input { min-height: 40px; border: 0; border-radius: 0; box-shadow: none !important; }

.button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 11px; padding: 0 17px; border: 0; border-radius: 8px; font-size: 11px; font-weight: 800; transition: background .15s, transform .15s; }
.button:active, .availability-toggle:active { transform: translateY(1px); }
.button-primary { background: var(--yellow); color: #111111; }
.button-primary:hover { background: #ffe34d; }
.button-wide { width: 100%; min-height: 48px; margin-top: 21px; }
.button-wide span { font-size: 17px; }
.button-dark { background: #111111; color: white; }
.button-dark:hover { background: #292929; }
.form-note { margin: 10px 0 0; color: #85877f; font-size: 10px; text-align: center; }
.ride-status-card { margin-top: 22px; padding: 19px; border: 1px solid #e9e9e3; border-radius: 11px; background: #fbfbf9; }
.ride-status-card h3 { margin: 0 0 6px; font: 800 15px Manrope, sans-serif; }
.ride-status-card p { margin: 5px 0 14px; color: var(--muted); font-size: 12px; }
.waiting-indicator { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: var(--yellow); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px #ffd40030; } }
.accepted-driver { display: flex; align-items: center; gap: 12px; margin: 12px 0 16px; }
.driver-avatar { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 13px; background: #fff0cf; color: #91600e; font: 800 17px Manrope, sans-serif; }
.accepted-driver b, .accepted-driver span { display: block; }
.accepted-driver b { font-size: 13px; }
.accepted-driver span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.status-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.whatsapp-button { color: white; background: #218c56; text-decoration: none; }
.whatsapp-button:hover { background: #197748; }
.text-button { padding: 0 12px; border: 0; background: transparent; color: #777a72; font-size: 11px; font-weight: 700; }
.demo-badge { padding: 7px 9px; border: 1px solid #f0e2c6; border-radius: 6px; background: #fff9ec; color: #937030; font-size: 9px; font-weight: 800; letter-spacing: .45px; white-space: nowrap; }
.driver-controls { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 15px; margin: 23px 0; padding: 16px; border-radius: 11px; background: #f8f8f5; }
.availability-toggle { min-height: 42px; padding: 0 18px; border: 0; border-radius: 8px; background: #268953; color: white; font-size: 11px; font-weight: 800; }
.availability-toggle.busy { background: #c54b40; }
.auth-form { display: grid; max-width: 470px; gap: 15px; margin-top: 23px; }
.auth-form .button { justify-self: start; }
.driver-controls { grid-template-columns: 1fr; align-items: stretch; }
.driver-identity b, .driver-identity span { display: block; }
.driver-identity b { font: 800 15px Manrope, sans-serif; }
.driver-identity span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.driver-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sound-button, .wake-button { min-height: 38px; border: 1px solid #e6e7e1; background: white; color: #55584f; }
.sound-button[aria-pressed="true"] { border-color: #b8ddc4; background: #eef8f0; color: #267343; }
.admin-toolbar { display: flex; justify-content: flex-end; margin-top: 8px; }
.button:disabled, .availability-toggle:disabled { cursor: not-allowed; opacity: .55; }
.calls-heading { display: flex; align-items: center; justify-content: space-between; margin: 23px 0 11px; }
.calls-heading h3, .add-driver-form h3 { margin: 0; font: 800 14px Manrope, sans-serif; }
.calls-heading > span { color: #888a83; font-size: 10px; }
.calls-list, .admin-list { display: grid; gap: 10px; }
.call-card, .admin-driver { padding: 15px; border: 1px solid #e9e9e3; border-radius: 10px; background: white; }
.call-topline { display: flex; justify-content: space-between; gap: 10px; color: #888a83; font-size: 10px; }
.call-route { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 13px 0; }
.call-route span, .call-route b { display: block; }
.call-route span { margin-bottom: 4px; color: #888a83; font-size: 9px; }
.call-route b { font-size: 12px; }
.call-route .route-ref { margin-top: 3px; color: #777a72; font-size: 10px; }
.empty-state { padding: 27px 15px; border: 1px dashed #e2e3dc; border-radius: 9px; color: #85877f; font-size: 12px; text-align: center; }
.driver-running { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px; border: 1px solid #f0d7d4; border-radius: 10px; background: #fff8f7; }
.driver-running b { display: block; margin-bottom: 4px; font-size: 12px; }
.driver-running span { color: var(--muted); font-size: 10px; }
.admin-summary { display: flex; gap: 10px; margin-top: 20px; }
.summary-stat { flex: 1; padding: 13px 15px; border-radius: 9px; background: #f8f8f5; }
.summary-stat b, .summary-stat span { display: block; }
.summary-stat b { font: 800 20px Manrope, sans-serif; }
.summary-stat span { margin-top: 2px; color: #7d7f77; font-size: 10px; }
.add-driver-form { margin-top: 21px; padding: 16px; border: 1px solid #e9e9e3; border-radius: 10px; }
.add-driver-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin: 14px 0; }
.add-driver-grid .field { gap: 6px; }
.admin-driver { display: flex; align-items: center; justify-content: space-between; gap: 13px; }
.admin-driver-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.admin-driver-details { min-width: 0; }
.admin-driver-details b, .admin-driver-details span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-driver-details b { font-size: 12px; }
.admin-driver-details span { margin-top: 3px; color: #81837b; font-size: 10px; }
.admin-driver-actions { display: flex; align-items: center; gap: 12px; }
.pay-status { padding: 5px 7px; border-radius: 5px; background: var(--green-soft); color: #327148; font-size: 9px; font-weight: 800; white-space: nowrap; }
.pay-status.blocked { background: #fbefed; color: #ac4b41; }
.block-button { padding: 6px 8px; border: 1px solid #e7e7e1; border-radius: 6px; background: white; color: #686b63; font-size: 10px; font-weight: 700; white-space: nowrap; }
.block-button:disabled { cursor: not-allowed; opacity: .55; }
.footer { display: flex; align-items: center; gap: 9px; min-height: 73px; color: #888a83; font-size: 10px; }
.footer-mark { width: 21px; height: 21px; border-radius: 6px; font-size: 12px; }
.footer-demo { margin-left: auto; }
.toast { position: fixed; z-index: 5; right: 20px; bottom: 20px; max-width: min(360px, calc(100vw - 40px)); padding: 12px 15px; border-radius: 9px; background: #242a23; color: white; box-shadow: 0 8px 24px #14191430; font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translateY(0); }

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f5f5f0;
  --muted: #aaaeb0;
  --line: #34362f;
  --paper: #1a1b18;
  --canvas: #11120f;
}
:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 8% 12%, #ffd40018 0, transparent 11rem),
    radial-gradient(circle at 92% 18%, #ffd40012 0, transparent 13rem),
    linear-gradient(135deg, #11120f 0%, #171812 48%, #11120f 100%);
  color: var(--ink);
}
:root[data-theme="dark"] .topbar {
  border-bottom-color: #34362f;
  background: #11120fcc;
}
:root[data-theme="dark"] .brand-name,
:root[data-theme="dark"] .city-label,
:root[data-theme="dark"] .field-label,
:root[data-theme="dark"] .panel-heading h2,
:root[data-theme="dark"] .call-route b {
  color: var(--ink);
}
:root[data-theme="dark"] .theme-button,
:root[data-theme="dark"] .install-button,
:root[data-theme="dark"] .mode-tab.active,
:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field select,
:root[data-theme="dark"] .phone-input,
:root[data-theme="dark"] .call-card,
:root[data-theme="dark"] .admin-driver,
:root[data-theme="dark"] .sound-button,
:root[data-theme="dark"] .wake-button,
:root[data-theme="dark"] .block-button {
  border-color: #3a3c35;
  background: #20221d;
  color: var(--ink);
}
:root[data-theme="dark"] .mode-tabs {
  border-color: #34362f;
  background: #1b1c18;
}
:root[data-theme="dark"] .mode-tab { color: #adb0a7; }
:root[data-theme="dark"] .panel {
  border-color: #34362f;
  background: radial-gradient(circle at 92% 8%, #ffd40009 0, transparent 8rem), var(--paper);
  box-shadow: 0 10px 35px #00000022;
}
:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field select,
:root[data-theme="dark"] .phone-input input { color: var(--ink); }
:root[data-theme="dark"] .field input::placeholder { color: #7e8178; }
:root[data-theme="dark"] .phone-input .country-code { border-right-color: #3a3c35; color: #aaaeb0; }
:root[data-theme="dark"] .ride-status-card,
:root[data-theme="dark"] .driver-controls,
:root[data-theme="dark"] .summary-stat,
:root[data-theme="dark"] .add-driver-form,
:root[data-theme="dark"] .empty-state {
  border-color: #34362f;
  background: #20221d;
}
:root[data-theme="dark"] .availability { border-color: #2f513c; background: #1d3326; }
:root[data-theme="dark"] .availability.offline { border-color: #5a3934; background: #352220; }
:root[data-theme="dark"] .driver-avatar { background: #5a4b1c; color: #ffe66a; }
:root[data-theme="dark"] .text-button,
:root[data-theme="dark"] .form-note,
:root[data-theme="dark"] .footer,
:root[data-theme="dark"] .panel-heading p,
:root[data-theme="dark"] .ride-status-card p,
:root[data-theme="dark"] .call-topline,
:root[data-theme="dark"] .call-route span,
:root[data-theme="dark"] .calls-heading > span,
:root[data-theme="dark"] .admin-driver-details span,
:root[data-theme="dark"] .summary-stat span {
  color: #aaaeb0;
}
:root[data-theme="dark"] .driver-running { border-color: #5a3934; background: #2b201f; }
:root[data-theme="dark"] .toast { background: #f5f5f0; color: #11120f; }

@media (max-width: 650px) {
  .app-shell { width: min(100% - 28px, 520px); }
  .topbar { height: 64px; }
  .topbar-actions { gap: 5px; }
  .theme-button { width: 36px; height: 36px; }
  .hero { min-height: 224px; padding: 28px 24px; margin-top: 17px; }
  .hero p { max-width: 255px; font-size: 12px; line-height: 1.5; }
  .hero-art { left: 47%; opacity: .7; }
  .art-bike { right: 35px; top: 91px; font-size: 60px; }
  .art-card { right: 10px; bottom: 13px; transform: scale(.85); transform-origin: right bottom; }
  .sun { right: 15px; top: 38px; width: 115px; height: 115px; }
  .mode-tabs { width: 100%; justify-content: space-between; margin: 15px auto 13px; gap: 2px; }
  .mode-tab { justify-content: center; flex: 1; gap: 5px; padding: 10px 4px; font-size: 10px; }
  .mode-tab span { font-size: 13px; }
  .panel { padding: 21px 17px; }
  .panel-heading { gap: 9px; }
  .panel-heading h2 { font-size: 18px; }
  .panel-heading p { max-width: 290px; font-size: 11px; line-height: 1.5; }
  .availability { padding: 7px 8px; font-size: 9px; }
  .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .field-full { grid-column: auto; }
  .driver-controls { grid-template-columns: 1fr; padding: 13px; }
  .availability-toggle { width: 100%; }
  .driver-tools .button { flex: 1; padding: 0 9px; font-size: 10px; }
  .demo-badge { font-size: 8px; }
  .add-driver-grid { grid-template-columns: 1fr; }
  .admin-driver { align-items: flex-start; }
  .admin-driver-actions { flex-direction: column; align-items: flex-end; gap: 6px; }
  .footer { font-size: 9px; }
}

@media (max-width: 390px) {
  .city-label { font-size: 11px; }
  .hero-art { opacity: .45; }
  .availability { max-width: 133px; white-space: normal; line-height: 1.3; }
  .admin-summary { gap: 6px; }
  .summary-stat { padding: 10px; }
  .summary-stat span { font-size: 9px; }
}

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