/* Chin Drive midnight: the same blue signature on layered navy surfaces. */
html[data-theme=dark]{color-scheme:dark;--ink:#e3eef7;--muted:#a0b7ca;--line:#294156;--white:#112536;--lime:#329fc8;--night:#091827;--surface:#102334;--raised:#172f43;--blue:#71d2f5;--shadow:0 8px 30px #0003;--ambient-dot:100,190,239;--ambient-glow:32,157,216;--ambient-ring:85,197,242;background:var(--night);color:var(--ink)}
html[data-theme=light]{--ambient-dot:183,226,255;--ambient-glow:108,204,255;--ambient-ring:205,240,255}
html[data-theme=dark] body,html[data-theme=dark] .login,html[data-theme=dark] .login-form,html[data-theme=dark] .shell,html[data-theme=dark] .content{background:var(--night)!important;color:var(--ink)!important}
html[data-theme=dark] :is(.topbar,.app-header,.sidebar,.product-shell>.sidebar,.booking-panel,.card,.offer-card,.settings-card,.account-card,.login-form-inner,dialog,.conversation,.trip-chat,.driver-search-state,.premium-offer-toast,#ride-banner,#toast){background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important;box-shadow:var(--shadow)!important;backdrop-filter:blur(18px)}
html[data-theme=dark] :is(h1,h2,h3,h4,strong,label,.panel-title h1,.panel-title h2,.page-heading h1,.welcome-heading h2,.fare-heading label,.fare-amount input,.tracking-metrics strong,.tracking-heading,.direct-location-label>span,.offer-price,.driver-search-state strong,.viewer-strip strong,.heading-out-label,.calling-screen>strong){color:var(--ink)!important}
html[data-theme=dark] :is(.muted,.fine-print,small,.environment-note,.header-location,.location-field small,.sheet-field-input small,.settings-row small,.field-hint,.comment-hint,.conversation-note,.chat-empty,.booking-footnote,.vehicle-check,.pickup-eta,.viewer-strip small,.trip-estimates p,.trip-estimates small,.rating-comment-label,.rating-comment-label span,.navigation-source,.driver-search-state small,.cancel-heading p,.contact-profile p,.call-option small,.demo-journey p,.trip-count){color:var(--muted)!important}
html[data-theme=dark] :is(a,.kicker,.gps-inline,.fare-info,.review-stars,.cash-mark,.usd-cash,.menu-rating,.trip-estimates strong,.welcome-heading h2>span,.install-app-link,.pickup-notes summary,.pickup-notes summary span,.navigation-link){color:var(--blue)!important}
html[data-theme=dark] :is(input,select,textarea,.service-fields input,.service-fields select,#rating-review,.settings-row select,.search-input,.sheet-route-field,.direct-location,.route-box,.fare-stepper,.inline-place-results,.conversation-composer input){background:#0d1f2e!important;color:var(--ink)!important;border-color:#34536b!important;box-shadow:inset 0 1px 4px #0002!important}
html[data-theme=dark] :is(.direct-location-label input,.sheet-field-input input,.search-input input,.fare-amount input,.direct-location input){background:transparent!important;color:var(--ink)!important;box-shadow:none!important}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#8da8be!important;opacity:1}
html[data-theme=dark] :is(input,select,textarea):focus,html[data-theme=dark] .sheet-route-field.focused{border-color:#68cef2!important;outline-color:#68cef2!important}
html[data-theme=dark] input::-webkit-calendar-picker-indicator{filter:brightness(1.6);opacity:1}
html[data-theme=dark] :is(button,.button,.role-card,.service-tabs button,.service-tabs button:not(.selected),.photo-upload,.payment-icon-button,.account-button,.icon-button,.saved-shortcuts button,.saved-places button,.search-result,.place-result,.call-option,.page-back,.sheet-back,.offer-actions>button:first-child,.rating-buttons button){background:var(--raised)!important;color:var(--ink)!important;border-color:#33516a!important;box-shadow:0 2px 7px #0002!important}
html[data-theme=dark] :is(button,.button,.role-card,.place-result,.inline-place-results button):hover:not(:disabled){background:#203f56!important;border-color:#5ca6c9!important}
html[data-theme=dark] :is(.primary,button.primary,.button.primary,.contact-driver-button){background:#129dce!important;color:#fff!important;border-color:#31b5e1!important;box-shadow:0 3px 14px #009bd322!important}
html[data-theme=dark] :is(.primary:hover:not(:disabled),button.primary:hover:not(:disabled),.contact-driver-button:hover){background:#087fac!important;color:#fff!important}
html[data-theme=dark] :is(.primary,.contact-driver-button) :is(strong,small){color:inherit!important}
html[data-theme=dark] :is(.service-tabs button.selected,.nav button.active,.sidebar nav button.active,.fare-chips button.selected,.payment-option.selected,.rating-buttons .selected,.inline-place-results button[aria-selected=true]){background:#123d56!important;color:#8bdef8!important;border-color:#369dc7!important;box-shadow:inset 0 -2px #29b4df!important}
html[data-theme=dark] :is(.nav button.active,.service-tabs button.selected,.rating-buttons .selected) strong{color:#8bdef8!important}
html[data-theme=dark] :is(.service-tabs .service-art,.role-icon){filter:brightness(1.25) saturate(.8)}
html[data-theme=dark] :is(.route-action,.route-search,.direct-location .route-search,.direct-location .route-action.pickup,.direct-location .route-action.dropoff,.map-gps,.map-connect){background:#16435b!important;color:#8bdcf7!important;border-color:#2a759a!important}
html[data-theme=dark] :is(.route-action .icon,.route-search .icon,.map-gps .icon){color:#8bdcf7!important}
html[data-theme=dark] :is(.vehicle-preview,.assigned-vehicle,.driver-detail-vehicle,.history-vehicle,.tracking-card,.readonly-field,.contact-profile,.auto-accept-option,.service-pill,.avatar,.vehicle-line,.pin-card,.trip-confirmation-pin,.trip-estimates,.arrival-card,.demo-journey,.rider-note,.notice,.map-setup-instructions,.google-setup,.completion-check,.conversation-header,.conversation-composer,.chat-bubble.received,.message,.registration,.plate,.call-driver,.source-label,.map-bottom-info,.map-top-label,.map-pick-banner,.navigation-instruction,.fare-help,.role-icon){background:#172e41!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme=dark] :is(.arrival-card #arrival-countdown,.arrival-card>strong,.trip-confirmation-pin strong,.completion-check .icon){color:#81d9f6!important}
html[data-theme=dark] :is(.chat-bubble.sent,.message.own){background:#14567b!important;color:#f0f8ff!important;border-color:#247fa7!important}
html[data-theme=dark] :is(.chat-bubble.sent,.message.own) small{color:#c3e5f7!important}
html[data-theme=dark] :is(.timed-heading,.timed-heading:hover:not(:disabled),.offer-actions .timed-accept,.offer-actions .timed-accept:hover:not(:disabled)){background:#183345!important;color:#e5f6ff!important;border-color:#2c7293!important}
html[data-theme=dark] :is(.timed-heading,.offer-actions .timed-accept):before{background:#236489!important}
html[data-theme=dark] :is(.decline-offer,.cancel-ride-button,.danger,.end-call){background:#3a2331!important;color:#ffb4c1!important;border-color:#845063!important}
html[data-theme=dark] :is(.decline-offer,.cancel-ride-button,.danger,.end-call):hover{background:#513040!important;color:#ffd3dc!important}
html[data-theme=dark] :is(.fare-floor-hit,.fare-floor-hit input,.fare-floor-hit span,.fare-validation){color:#ff9fb0!important}
html[data-theme=dark] :is(.status.completed,.tracking-on){background:#153b43!important;color:#8cdeeb!important}
html[data-theme=dark] .status.cancelled{background:#3a2331!important;color:#ffb4c1!important}
html[data-theme=dark] :is(.table th,.table td,.settings-row,.drawer-profile,.sidebar-bottom,.offer-toolbar,.pickup-notes,.review-item,.help-card details,.conversation-header,.conversation-composer,.service-fields){border-color:var(--line)!important}
html[data-theme=dark] .table th{background:#172e41!important;color:var(--muted)!important}
html[data-theme=dark] .brand,html[data-theme=dark] .logo{color:#73d2f4!important;--logo-ink:#092436!important;opacity:1!important}
html[data-theme=dark] :is(.startup-screen,.login-story){background:#092d46!important;background-image:none!important;color:#eef8ff!important}
html[data-theme=dark] :is(.login-story,.startup-screen) :is(.brand,.logo,.name-morph,h1){color:#eef8ff!important;--logo-ink:#eef8ff!important;opacity:1!important}
html[data-theme=dark] .login-story :is(p,.kicker,.city-line,small){color:#bcdced!important}
html[data-theme=dark] .map-wrap,html[data-theme=dark] .leaflet-container{background:#0c2030!important}
html[data-theme=dark] .leaflet-tile-pane{filter:invert(1) hue-rotate(180deg) saturate(.55) brightness(.8)}
html[data-theme=dark] :is(.leaflet-control-zoom a,.leaflet-popup-content-wrapper,.leaflet-popup-tip,.leaflet-tooltip,.leaflet-control-attribution){background:#102b3e!important;color:#d5e8f5!important;border-color:#34536b!important}
html[data-theme=dark] .leaflet-control-attribution a{color:#8cddf9!important}
html[data-theme=dark] .leaflet-tooltip:before{border-top-color:#102b3e!important}
html[data-theme=dark] :is(.map-pin,.map-car,.pickup-beacon){filter:none!important}
html[data-theme=dark] .payment-logo.innbucks{background:#eef6fc;border-radius:5px;padding:3px}
html[data-theme=dark] .payment-logo.ecocash{background:#eef6fc;border-radius:5px;padding:3px}
html[data-theme=dark] dialog::backdrop{background:#020a12b8;backdrop-filter:blur(5px)}
html[data-theme=dark] :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid #80ddfa!important;outline-offset:3px}
html[data-theme=dark] :is(.search-orbit:before,.search-dots i){border-color:#5ac9ef!important}
html[data-theme=dark] .welcome-rule{background:#29b8e4!important}
html[data-theme=dark] .install-page section{background:var(--surface)!important;border-color:var(--line)!important;color:var(--ink)!important}
html[data-theme=dark] .install-page :is(h1,h2){color:#8bdcf7!important}
@media(prefers-reduced-motion:reduce){html[data-theme=dark] *{scroll-behavior:auto!important}}
/* Keep normal-sized action text above 4.5:1 contrast, and preserve wallet artwork. */
html[data-theme=dark] :is(.primary,button.primary,.button.primary,.contact-driver-button){background:#0879a3!important}
html[data-theme=dark] :is(.primary:hover:not(:disabled),button.primary:hover:not(:disabled),.contact-driver-button:hover){background:#096b91!important}
html[data-theme=dark] .payment-logo.innbucks{background:#263d50!important}
html[data-theme=dark] .install-page header p{color:var(--muted)!important}

/* Welcome content sits directly on the page, without a surrounding glass box. */
html[data-theme] #app .login :is(.login-form,.login-form-inner){background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important}
.message-inbox{max-width:780px;display:grid;gap:10px}.conversation-row{width:100%;display:flex;align-items:center;gap:14px;text-align:left;padding:18px;background:#f7fbfe;border:1px solid #d6e7f1;border-radius:14px;font-weight:400;min-width:0}.conversation-copy{flex:1;min-width:0;display:grid;gap:5px}.conversation-title{display:flex;align-items:center;justify-content:space-between;gap:12px}.conversation-title time{font-size:11px;color:#67869b;white-space:nowrap}.conversation-preview{font-size:13px;color:#466c84;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.conversation-copy>small{font-size:11px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.conversation-status{color:#087fac;font-size:10px;font-weight:600}.message-empty{padding:36px 20px;text-align:center}.message-empty>.icon{width:38px;height:38px;color:#129dce}.message-empty h2{font-size:20px;margin:14px 0 8px}.conversation-archived{display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;color:#67869b;padding:18px;border-top:1px solid #d6e7f1;background:#f0f7fc}.chat-bubble small{display:block;font-size:10px;margin-top:6px;opacity:.8}.theme-preview-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:24px 0}.theme-preview-card{display:flex;flex-direction:column;gap:12px;padding:10px 10px 14px;border:2px solid #c9dfea;border-radius:12px;min-width:0;background:transparent!important}.theme-preview-card[aria-pressed=true]{border-color:#129dce!important;outline:2px solid #129dce33;outline-offset:2px}.theme-mini{position:relative;width:100%;height:138px;border-radius:7px;overflow:hidden;border:1px solid var(--mini-line);background:var(--mini-bg);--mini-bg:#f4f9fd;--mini-panel:#fff;--mini-map:#dfedf4;--mini-line:#b9d3e2}.theme-preview-card.dark .theme-mini{--mini-bg:#091827;--mini-panel:#173447;--mini-map:#153b50;--mini-line:#2d5971}.theme-mini i{display:block;position:absolute;border-radius:3px}.mini-header{inset:10px 10px auto;height:12px;background:var(--mini-panel);border:1px solid var(--mini-line)}.mini-map{inset:32px 10px 51px;background:var(--mini-map);background-image:linear-gradient(34deg,transparent 45%,#129dce 46%,#129dce 49%,transparent 50%)}.mini-route{inset:auto 10px 29px;height:16px;background:var(--mini-panel);border:1px solid var(--mini-line)}.mini-button{inset:auto 10px 10px;height:12px;background:#129dce}.theme-welcome>h2{margin-top:10px}.theme-welcome>p{line-height:1.65}.theme-preview-card>span:last-child{font-size:13px}.theme-welcome .text-button{margin-top:6px}
html[data-theme=dark] .conversation-row,html[data-theme=dark] .conversation-archived{background:#102b3e!important;border-color:var(--line)!important;color:var(--ink)!important}html[data-theme=dark] :is(.conversation-preview,.conversation-title time){color:var(--muted)!important}html[data-theme=dark] .conversation-status{color:var(--blue)!important}html[data-theme=dark] .theme-preview-card{background:transparent!important}html[data-theme=dark] .theme-preview-card[aria-pressed=true]{border-color:#71d2f5!important}
@media(max-width:400px){.conversation-row{gap:10px;padding:13px}.conversation-row>.avatar{width:44px;height:44px;min-width:44px}.conversation-title strong{font-size:13px}.conversation-title{gap:6px}.theme-preview-options{gap:10px}.theme-mini{height:112px}}

/* Content-led welcome spacing: the copy must never be clipped by a fixed square. */
html[data-theme] .login{display:grid!important;grid-template-columns:minmax(0,1.08fr) minmax(0,1fr);gap:clamp(28px,4vw,64px)!important;max-width:1440px;margin:0 auto;min-height:100svh;padding:28px!important;align-items:center}
html[data-theme] .login-story{display:flex!important;flex-direction:column;justify-content:space-between;gap:32px;aspect-ratio:auto!important;min-height:560px!important;height:auto!important;padding:clamp(28px,3vw,44px)!important;overflow:hidden}
html[data-theme] .login-story>.welcome-copy{position:relative;min-width:0}
html[data-theme] .login-story h1{font-size:clamp(42px,4.6vw,64px)!important;line-height:1.08!important;margin:18px 0 22px!important;letter-spacing:-.045em}
html[data-theme] .welcome-description{display:grid;gap:8px;max-width:32ch;line-height:1.65!important;text-wrap:pretty}
html[data-theme] .welcome-copy-break{display:none}
html[data-theme] .login-story .city-line{margin-top:26px;column-gap:10px;row-gap:5px}
html[data-theme] .login-form{padding:20px 12px!important;min-width:0}
html[data-theme] .login-form-inner{max-width:390px!important}
@media(max-width:800px){html[data-theme] .login{grid-template-columns:minmax(0,1fr);gap:30px!important;padding:16px!important;align-content:start}html[data-theme] .login-story{min-height:0!important;gap:28px;padding:28px!important}html[data-theme] .login-story h1{font-size:clamp(38px,8.5vw,58px)!important;margin:16px 0 20px!important}html[data-theme] .login-story>small{display:block!important}html[data-theme] .login-form{padding:0 12px 28px!important}html[data-theme] .login-form-inner{max-width:520px!important}html[data-theme] .welcome-description{font-size:14px!important}html[data-theme] .login-story .city-line{font-size:11px;margin-top:22px}}
@media(max-width:360px){html[data-theme] .login-story{padding:22px!important;gap:24px}html[data-theme] .login-form{padding-left:6px!important;padding-right:6px!important}html[data-theme] .welcome-copy-break{display:block}html[data-theme] .login-story h1{font-size:36px!important}}

/* A single, directly accessible Light / Dark switch. */
.theme-switch-control{display:flex;align-items:center;gap:10px;margin:0;white-space:nowrap;font-size:12px;font-weight:500;cursor:pointer}html[data-theme] #appearance-switch{appearance:none!important;-webkit-appearance:none!important;display:block;position:relative;width:50px!important;min-width:50px;height:28px!important;min-height:28px;padding:0!important;border:1px solid #9cb8cc!important;border-radius:20px!important;background:#d7e6f0!important;box-shadow:none!important;cursor:pointer;transition:background .18s ease}#appearance-switch:before{content:'';display:block;position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #102d4930;transition:transform .18s ease}html[data-theme] #appearance-switch:checked{background:#128fbd!important;border-color:#128fbd!important}#appearance-switch:checked:before{transform:translateX(22px)}@media(max-width:420px){.settings-row:has(#appearance-switch){align-items:flex-start;gap:16px;flex-wrap:wrap}.settings-row:has(#appearance-switch) .theme-switch-control{margin-left:auto}}@media(prefers-reduced-motion:reduce){#appearance-switch,#appearance-switch:before{transition:none!important}}
