/* Theme palettes never replace vehicle art, status colours or button geometry. */
:root[data-palette=classic]:not([data-theme=night]){--bg:#f7f8f2;--raised:#f0f2e8;--text:#1b1d19;--ink:#1b1d19;--muted:#626958;--line:#dce1d2;--border:#dce1d2;--white:#1b1d19}
:root[data-palette=orange]{--brand-lime:#ff7900;--brand-lime-ink:#191919;--button-selected:#ff7900;--button-selected-ink:#191919;--focus:#c75000;--route-color:#d65a00}
:root[data-palette=orange]:not([data-theme=night]){--bg:#f4f3f1;--surface:#fff;--raised:#eeece9;--text:#222321;--ink:#222321;--muted:#595a56;--line:#deddd8;--border:#deddd8;--panel:#fff;--paper:#fff;--white:#222321;--accent:#a84200;--green:#a84200;--on-accent:#222321;--button-disabled:#e5e3df;--button-disabled-ink:#625f59}
:root[data-palette=orange][data-theme=night]{--bg:#151614;--surface:#222420;--raised:#2e302b;--text:#f5f5f1;--ink:#f5f5f1;--muted:#bebfb7;--line:#494b43;--border:#494b43;--panel:#222420;--paper:#222420;--white:#f5f5f1;--accent:#ff9a40;--green:#ff9a40;--focus:#ff9a40;--route-color:#ff9a40}
.colour-theme-setting select{min-height:48px;max-width:100%;font:inherit;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:12px;padding:8px 12px}
:root[data-palette=orange] body.compact-app #confirm-locations:checked{background-color:var(--brand-lime);border-color:var(--accent)}
:root[data-palette=orange] body button[aria-current=step]>span{color:var(--brand-lime)}
/* Shared surface and accent contract for every portal, including legacy modules. */
:root[data-palette] .payment-dashboard{--pd-green:var(--accent);--pd-line:var(--line);--pd-ink:var(--text);--pd-muted:var(--muted)}
:root[data-palette] :is(.driver-auth,.registration-shell){--driver-green:var(--brand-lime);--driver-mint:var(--raised);--driver-line:var(--line)}
:root[data-palette] body[data-portal=admin] .admin-driver-directory{--directory-green:var(--accent);--directory-border:var(--line);color:var(--text)}
:root[data-palette] :is(.driver-auth,#registration-form fieldset){background:var(--surface)!important;color:var(--text);border-color:var(--line)!important}
:root[data-palette] :is(.driver-auth h1,.registration-shell h1){color:var(--text)}
:root[data-palette] :is(.driver-auth,.registration-shell) .primary{background:var(--brand-lime)!important;color:var(--brand-lime-ink)!important}
:root[data-palette] :is(.driver-auth,.registration-shell) .field input{background:var(--surface);color:var(--text);border-color:var(--line)}
:root[data-palette] .registration-steps button{background:var(--raised)!important;color:var(--text)!important;border-color:var(--line)!important}
:root[data-palette] .registration-steps [aria-current=step]{background:var(--brand-lime)!important;color:var(--brand-lime-ink)!important;border-color:var(--accent)!important}
:root[data-palette] .registration-steps b{background:var(--raised);color:var(--text)}
:root[data-palette] .registration-steps [aria-current=step] b{background:var(--brand-lime-ink);color:var(--brand-lime)}
:root[data-palette] :is(.admin-driver-counts button,.admin-driver-search input){background:var(--surface)!important;color:var(--text)!important;border-color:var(--line)!important}
:root[data-palette] .admin-driver-counts button[aria-pressed=true]{background:var(--raised)!important;border-color:var(--accent)!important;box-shadow:inset 0 0 0 1px var(--accent)}
:root[data-palette] :is(.admin-driver-table-head,.pd-tabs button){background:var(--raised);color:var(--text);border-color:var(--line)}
:root[data-palette] :is(.admin-driver-row,.pd-record,.pd-card,.pd-table-wrap,.pd-balance-row){background:var(--surface);color:var(--text);border-color:var(--line)}
:root[data-palette] :is(.admin-copy-status,.admin-driver-directory a){color:var(--accent)}
:root[data-palette] .payment-dashboard button{background:var(--surface);color:var(--text);border-color:var(--line)}
:root[data-palette] .payment-dashboard :is(button.primary,.pd-tabs button[aria-current=page]){background:var(--brand-lime);color:var(--brand-lime-ink);border-color:var(--brand-lime)}
:root[data-palette] .payment-dashboard .pd-stats>:not(.pd-pending){background:var(--raised);color:var(--text);border-color:var(--line)}
:root[data-palette] :is(.payment-dashboard,.commission-panel) :is(input,textarea,select){background:var(--surface);color:var(--text);border-color:var(--line)}
:root[data-palette] .app-language-choice.selected{background:var(--raised);border-color:var(--accent)}
:root[data-palette] .app-language-choice input{accent-color:var(--accent)}
:root[data-palette] .language-check{color:var(--accent)}
:root[data-palette] .app-language-dialog [data-language-done]{background:var(--brand-lime);color:var(--brand-lime-ink);border-color:var(--brand-lime)}
:root[data-palette] .waiting-service-choices button[aria-pressed=true]{background:var(--brand-lime)!important;color:var(--brand-lime-ink)!important;border-color:var(--accent)!important}
:root[data-palette] .driver-trip-card .kicker,:root[data-palette] .driver-completed .kicker{color:var(--accent)}
:root[data-palette] :is(.comfort-note,.comfort-info){background:var(--raised);color:var(--text);border-color:var(--line)}
:root[data-palette] input[type=radio],:root[data-palette] input[type=checkbox]{accent-color:var(--accent)}
:root[data-palette] .payment-dashboard :is(.pd-table-scroll,.pd-table .pd-sticky,.pd-card-view .pd-record,.pd-card-view .pd-balance-row){background:var(--surface);color:var(--text)}
:root[data-palette] .payment-dashboard :is(.pd-table thead th,.pd-table thead .pd-sticky){background:var(--raised);color:var(--text)}
:root[data-palette] .pd-table tbody tr:hover>*{background:var(--raised)}
:root[data-palette] .payment-dashboard .pd-layout-switch button[aria-pressed=true]{background:var(--brand-lime);color:var(--brand-lime-ink);border-color:var(--brand-lime)}
:root[data-palette] :is(.admin-payment-panel,.commission-panel){background:var(--surface);color:var(--text)}
:root[data-palette] .admin-payment-panel :is(.payment-table,.payment-row,.payment-filter-drawer,.payment-facts,.payment-ledger-row,.payment-filters){background:var(--surface);color:var(--text);border-color:var(--line)}
:root[data-palette] .admin-payment-panel :is(.payment-table-head,.payment-stats>div){background:var(--raised);color:var(--text);border-color:var(--line)}
:root[data-palette] .admin-payment-panel button.primary{background:var(--brand-lime);color:var(--brand-lime-ink);border-color:var(--brand-lime)}
/* Soft White: approved white-first option, with original control and icon geometry. */
:root[data-palette=soft-white]{--brand-lime:#171717;--brand-lime-ink:#fff;--button-selected:#171717;--button-selected-ink:#fff;--focus:#171717;--route-color:#343434}
:root[data-palette=soft-white]:not([data-theme=night]){--bg:#fff;--surface:#fff;--raised:#fafafa;--text:#171717;--ink:#171717;--muted:#4b4b4b;--line:#d7d7d7;--border:#d7d7d7;--panel:#fff;--paper:#fff;--white:#171717;--accent:#171717;--green:#171717;--on-accent:#171717;--button-disabled:#ededed;--button-disabled-ink:#606060}
:root[data-palette=soft-white][data-theme=night]{--bg:#111;--surface:#1b1b1b;--raised:#282828;--text:#fff;--ink:#fff;--muted:#c6c6c6;--line:#4b4b4b;--border:#4b4b4b;--panel:#1b1b1b;--paper:#1b1b1b;--white:#fff;--accent:#fff;--green:#fff;--brand-lime:#fff;--brand-lime-ink:#111;--button-selected:#fff;--button-selected-ink:#111;--on-accent:#111;--focus:#fff;--route-color:#ddd;--button-disabled:#333;--button-disabled-ink:#bbb}
:root[data-palette=soft-white]:not([data-theme=night]) :is(.driver-status-panel,.driver-map-visibility,.driver-account-details,.driver-waiting-services,.driver-trip-card,.driver-completed,.driver-auth,.registration-shell,.real-map-panel,.road-summary,.upload-card){background:#fff!important;color:#171717;border-color:#d7d7d7;box-shadow:0 3px 10px #0000000d}
:root[data-palette=soft-white]:not([data-theme=night]) .driver-status-panel :is(h2,p,small){color:#171717}
:root[data-palette=soft-white] .waiting-service-choices button[aria-pressed=true]{background:var(--surface)!important;color:var(--text)!important;border-color:var(--text)!important;box-shadow:inset 0 0 0 1px var(--text)}
:root[data-palette=soft-white] body.compact-app .shell-bottom-nav button[aria-current=page]{background:var(--surface)!important;color:var(--text)!important;box-shadow:inset 0 -3px 0 var(--text)}
:root[data-palette=soft-white] .app-language-dialog [data-language-done]{background:var(--brand-lime);color:var(--brand-lime-ink)}
:root[data-palette=soft-white] :is(.driver-status-actions>.primary,.driver-auth #driver-auth-form>.primary){background:var(--brand-lime)!important;color:var(--brand-lime-ink)!important}
/* Logo Lime: the uploaded brand colour, with dark text for legibility. */
:root[data-palette=logo-lime]{--brand-lime:#e0fb5a;--brand-lime-ink:#202622;--button-selected:#e0fb5a;--button-selected-ink:#202622;--on-accent:#202622;--button-pressed:#cde344;--button-ok:#32734e;--button-failed:#af3d3d;--focus:#526200;--route-color:#677b0a}
:root[data-palette=logo-lime]:not([data-theme=night]){--bg:#f7f8f5;--surface:#fff;--raised:#f1f3ef;--text:#202622;--ink:#202622;--muted:#626d65;--line:#e1e6df;--border:#e1e6df;--panel:#fff;--paper:#fff;--white:#202622;--accent:#45513e;--green:#45513e;--button-disabled:#e8ece6;--button-disabled-ink:#626d65}
:root[data-palette=logo-lime][data-theme=night]{--bg:#141710;--surface:#20251a;--raised:#2c3324;--text:#f6f9ef;--ink:#f6f9ef;--muted:#bec9ad;--line:#46513a;--border:#46513a;--panel:#20251a;--paper:#20251a;--white:#f6f9ef;--accent:#e0fb5a;--green:#e0fb5a;--focus:#e0fb5a;--route-color:#e0fb5a;--button-disabled:#343d2b;--button-disabled-ink:#bdc7ad}

/* Refined Logo Lime surfaces and explicit button feedback. */
:root[data-palette=logo-lime]:not([data-theme=night]) :is(.admin-driver-phone,.driver-identity,.driver-auth-head,.driver-status-panel,.driver-map-visibility,.console-queue,.commission-summary,.oc-card){background:var(--surface)!important;color:var(--text);border-color:var(--line)}
:root[data-palette=logo-lime] body button:not(:disabled):not([data-feedback-state]):not([aria-busy=true]):active,:root[data-palette=logo-lime] body button[data-pressed=true]:not(:disabled):not([data-feedback-state]):not([aria-busy=true]),:root[data-palette=logo-lime] body .portal-nav a:active{background:var(--button-pressed)!important;color:#202622!important;border-color:var(--button-pressed)!important;transition:none}
:root[data-palette=logo-lime] body button:is([data-feedback-state=pending],[aria-busy=true]){background:#e0fb5a!important;color:#202622!important;border-color:#e0fb5a!important;opacity:1}
:root[data-palette=logo-lime] body button[data-feedback-state=success]{background:#e0fb5a!important;color:#202622!important;border-color:#e0fb5a!important}
:root[data-palette=logo-lime] body button[data-feedback-state=error]{background:#af3d3d!important;color:#fff!important;border-color:#af3d3d!important}
:root[data-palette=logo-lime] body button:is([data-feedback-state=pending],[aria-busy=true])::before{content:'';display:inline-block;width:14px;height:14px;flex-shrink:0;border:2px solid #20262255;border-top-color:#202622;border-radius:50%;vertical-align:middle;margin-right:7px;animation:logo-lime-working .8s linear infinite}
@keyframes logo-lime-working{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){:root[data-palette=logo-lime] body button:is([data-feedback-state=pending],[aria-busy=true])::before{animation:none}}
/* Booking location controls and numbered pins follow the selected palette. */
:root[data-palette] body #confirm-pin:not(:disabled):not([data-feedback-state]):not([aria-busy=true]){background:var(--brand-lime)!important;color:var(--brand-lime-ink)!important;border-color:var(--brand-lime)!important;filter:none}
:root[data-palette] body #confirm-pin:not(:disabled):not([data-feedback-state]):not([aria-busy=true]):active,:root[data-palette] body #confirm-pin[data-pressed=true]:not(:disabled):not([data-feedback-state]):not([aria-busy=true]){background:var(--button-pressed,var(--brand-lime))!important;color:var(--brand-lime-ink)!important;border-color:var(--button-pressed,var(--brand-lime))!important}
:root[data-palette] body .location-choice[data-active=true] .location-picker{background:var(--brand-lime)!important;color:var(--brand-lime-ink)!important;border-color:var(--brand-lime)!important;outline-color:var(--accent);filter:none}
:root[data-palette] body .location-choice[data-active=true] .location-picker :is(.location-label,.location-value,.location-pin-icon){color:var(--brand-lime-ink)!important}
:root[data-palette] body .location-picker .field-number{background:var(--brand-lime)!important;color:var(--brand-lime-ink)!important}
:root[data-palette] body .location-choice[data-active=true] .location-picker .field-number{background:var(--brand-lime-ink)!important;color:var(--brand-lime)!important}
:root[data-palette] body #map .ride-pin:is(.pickup,.dropoff)>span{background:var(--brand-lime)!important;color:var(--brand-lime-ink)!important;border-color:var(--surface,#fff)}
:root[data-palette] body #map .ride-pin.pending>span{outline-color:var(--accent);border-style:dashed}
