:root {
  color-scheme: light;
  --ink: #20231f;
  --muted: #777a72;
  --line: #e9e9e3;
  --paper: #fff;
  --canvas: #f7f7f3;
  --yellow: #f5a623;
  --yellow-dark: #df8c08;
  --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: var(--canvas); color: var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { width: min(100% - 48px, 1040px); margin: 0 auto; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #eaeae5; }
.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-mark, .footer-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; background: var(--yellow); color: #25231e; 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: #222820; 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: #31372d; }
.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: #353c33; 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: #eeeee9; }
.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 { padding: 28px 32px 26px; border: 1px solid #ecece7; border-radius: 15px; background: var(--paper); box-shadow: 0 5px 22px #24261b08; }
.panel[hidden], [hidden] { display: none !important; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-kicker { color: #a27830; 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: #fff4dc; color: #a36a13; 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: #dfa43e; box-shadow: 0 0 0 3px #f5a62321; }
.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: #dfa43e; box-shadow: 0 0 0 3px #f5a62321; }
.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: #28251e; }
.button-primary:hover { background: #f8b43e; }
.button-wide { width: 100%; min-height: 48px; margin-top: 21px; }
.button-wide span { font-size: 17px; }
.button-dark { background: #262b24; color: white; }
.button-dark:hover { background: #3a4037; }
.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 #f5a62330; } }
.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); }

@media (max-width: 650px) {
  .app-shell { width: min(100% - 28px, 520px); }
  .topbar { height: 64px; }
  .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; }
}
