/* Appearance tokens and shared customer navigation. Photos and provider logos
   retain their original colours; dark mode never applies image inversion. */
:root{color-scheme:light;--surface:#fff;--surface-raised:#fff;--surface-soft:#eff6f7;--field:#fff;--page:#fff}
:root[data-theme=dark]{color-scheme:dark;--page:#101c24;--surface:#172832;--surface-raised:#203540;--surface-soft:#1c343d;--field:#11232e;--ink:#e6eff2;--muted:#afc2cb;--teal:#6aded5;--line:#36505d;--pale:#203944;--bg:#101c24;--white:#172832;--shadow:0 14px 45px #0002}
body{background:var(--page)}
.top-nav>.nav-shop{padding-left:24px;border-left:1px solid var(--line);margin-left:4px}
.settings-sections{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 28px;max-width:820px}
.settings-sections a{padding:9px 14px;border:1px solid var(--line);border-radius:24px;font-size:13px;line-height:1.5;color:var(--teal)}
.settings-sections a:hover{background:var(--pale)}
.bike-settings-main>:is(.appearance-card,#notifications,.bike-order-card,.bike-contracts){max-width:820px;margin:0 0 28px;scroll-margin-top:24px}
.bike-settings-main #notifications>.push-card{margin:0;border-radius:20px}
.theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0}
.theme-choice{position:relative;display:grid;gap:12px;justify-items:center;align-content:start;padding:16px 8px;border:1px solid var(--line);border-radius:12px;cursor:pointer;text-align:center;color:var(--ink);line-height:1.4;font-size:14px}
.theme-choice input{position:absolute;opacity:0;width:1px;height:1px}
.theme-choice:has(input:checked){border-color:var(--teal);box-shadow:inset 0 0 0 1px var(--teal);background:var(--surface-soft)}
.theme-choice:has(input:focus-visible){outline:3px solid var(--teal);outline-offset:3px}
.theme-swatch{display:block;position:relative;width:72px;height:46px;border-radius:7px;border:1px solid #879aa5;overflow:hidden;background:#f5f8f9}
.theme-swatch:before{content:'';position:absolute;inset:0 0 auto;height:10px;background:#d6e4e8}
.theme-swatch>span{position:absolute;inset:18px 9px 8px;border-radius:3px;background:#fff;border-left:7px solid #29aaa7}
.theme-swatch-dark{background:#101c24}.theme-swatch-dark:before{background:#304651}.theme-swatch-dark>span{background:#28434f;border-color:#6aded5}
.theme-swatch-system{background:linear-gradient(90deg,#f5f8f9 50%,#101c24 50%)}
.theme-swatch-system:before{background:linear-gradient(90deg,#d6e4e8 50%,#304651 50%)}
.theme-swatch-system>span{background:linear-gradient(90deg,#fff 45%,#28434f 45%)}
.appearance-card .theme-note{margin:18px 0 0;line-height:1.6}

/* Structural surfaces, controls, and text shared by account, bike, shop and legal pages. */
[data-theme=dark] :is(.site-header,.site-footer,.auth-card,.card,.metric,.language-menu,.login-panel,.purchase-panel,.feature-table thead,.agent-conversation,.locked-card,.inventory-detail-row,.component-capture-actions){background:var(--surface);border-color:var(--line)}
[data-theme=dark] :is(.brand-mark,.brand-word,.feature-card h3){color:var(--ink)}
[data-theme=dark] :is(input:not([type=radio]):not([type=range]):not([type=checkbox]),select,textarea,.bike-form input,.bike-form select,.hardware-fields input,.hardware-fields select,.preorder-box select){background:var(--field);color:var(--ink);border-color:var(--line)}
[data-theme=dark] :is(input,textarea)::placeholder{color:#8ca5b2;opacity:1}
[data-theme=dark] :is(input,select,textarea):disabled{background:var(--surface-soft);color:#91a6b0}
[data-theme=dark] :is(input[type=checkbox],input[type=radio]){accent-color:var(--cyan)}
[data-theme=dark] :is(.outline,.icon-button,.bike-add-miniature,.bike-order-actions button,.agent-questions button){background:var(--surface-raised);color:var(--ink);border-color:var(--line)}
[data-theme=dark] :is(.outline,.icon-button,.bike-add-miniature,.bike-order-actions button,.agent-questions button):hover{background:var(--pale)}
[data-theme=dark] .primary{background:#61d6ce;color:#0d2a35}
[data-theme=dark] .primary:hover{background:#8be9e1}
[data-theme=dark] :is(.auth-card p,.auth-intro p,.auth-intro>small,.customer-empty p,.customer-empty small,.bike-heading p,.bike-upload-area p,.bike-switch-label>span,.bike-swipe-hint,.bike-capacity,.bike-tracker-status,.bike-selected-heading>span,.bike-order-position,.component-card small,.component-ai-result dt,.inventory-detail-row small,.inventory-saved-detail small,.bike-contract dt,.bike-contract small,.inventory-bike-specs summary,.compatibility-hero p,.compatibility-install p,.compatibility-models>p,.compatibility-hero figcaption,.compatibility-grid p,.gb26-caption,.hardware-order-note,.gb26-feature-grid p){color:var(--muted)}
[data-theme=dark] :is(.account-verified,.consent-fields a,.preorder-consent a,.component-add>summary,.component-extra>summary,.component-edit>summary,.bike-miniature[aria-current=page],.bike-miniature.is-centered){color:var(--teal)}
[data-theme=dark] :is(.feature-icon,.customer-empty,.legal-contact,.preview-strip,.hardware-fields,.compatibility-kit,.motor-brands span,.plan-option:has(input:checked),.pricing-head .plus-plan,.feature-table td:last-child,.checkmark,.component-guide,.component-empty,.component-wait,.component-ocr,.component-ai-result,.inventory-entry .component-ai-result,.inventory-magic,.bike-processing,.theft-panel,.demo-note,.sidebar-plan){background:var(--surface-soft);border-color:var(--line);color:var(--ink)}
[data-theme=dark] :is(.auth-divider:before,.auth-divider:after,.progress-track){background:var(--line)}
[data-theme=dark] :is(.auth-footer,.customer-order,.preorder-box,.settings-row,.setting-row,.data-list>div,.bike-photo-choices article,.component-guide-footer,.component-card,.bike-registration-details,.bike-order-list li,.component-ai,.inventory-detail-editor,.inventory-edit-confirmed,.inventory-saved-detail,.bike-contract,.inventory-entry,.inventory-bike-candidate,.inventory-product-candidates article,.inventory-bike-specs dl>div,.compatibility-grid article,.model-years a){border-color:var(--line)}
[data-theme=dark] .auth-notice{background:#193d3c;color:#b3efdf!important}
[data-theme=dark] :is(.bike-error,.form-error){background:#45282e;color:#ffd0ca;border-color:#93626a}
[data-theme=dark] .inventory-plus-badge{background:#223b58;color:#a7d1ff}
[data-theme=dark] .safe{background:#193f35;color:#a0e5c5}
[data-theme=dark] :is(.neutral,.demo-pill){background:#493b21;color:#f8d99c}
[data-theme=dark] :is(.planned,.unavailable){background:#2a3d47;color:#c3d1d7}
[data-theme=dark] .component-delete{color:#ffb8b0}
[data-theme=dark] :is(.bike-discard-dialog,.component-viewer,.component-capture-guide){background:var(--surface);color:var(--ink);border-color:var(--line)}
[data-theme=dark] .component-camera-stage{background:#080f14}
[data-theme=dark] :is(.bike-choice-image,.component-image,.inventory-clarification img){background:var(--field)}
[data-theme=dark] :is(.bike-miniature,.bike-miniatures>.bike-arrow){color:var(--muted)}
[data-theme=dark] .bike-miniatures>.bike-arrow:hover{color:var(--teal);background:var(--surface-soft)}
[data-theme=dark] .bike-miniature[aria-current=page],[data-theme=dark] .bike-miniature.is-centered{color:var(--teal)}
[data-theme=dark] .empty-orbit{background:radial-gradient(circle,var(--surface-raised),transparent);border-color:var(--line)}
[data-theme=dark] .empty-orbit>span{border-color:var(--surface-soft);color:#102e3f}
[data-theme=dark] .auth-illustration{color:var(--ink);background:radial-gradient(ellipse,#234950,transparent 70%)}
[data-theme=dark] .auth-illustration>span{background:var(--surface-raised);color:var(--teal)}
[data-theme=dark] .compatibility-confirmed{background:var(--surface-soft);border-color:var(--line);color:var(--teal)!important}
/* Product photography has its own white studio backdrop; keep its label readable. */
[data-theme=dark] .gb26-visual .gb26-caption,[data-theme=dark] .compatibility-hero figure figcaption{color:#526976}
[data-theme=dark] .oauth-button{color-scheme:light}
[data-theme=dark] .oauth-button.apple{outline:1px solid #8fa1aa;outline-offset:-1px}
[data-theme=dark] .oauth-button.apple:focus-visible{outline:3px solid var(--teal);outline-offset:4px}
[data-theme=dark] :is(.map-info,.map-caption){background:var(--surface);color:var(--ink)}

/* Shared theme also remains readable when an operator opens the admin area. */
[data-theme=dark] .page-admin{background:var(--page)}
[data-theme=dark] :is(.admin-table thead,.admin-table tbody tr:hover,.admin-row-edit,.admin-scope,.admin-mode,.mail-response,.admin-empty>.icon,.admin-avatar){background:var(--surface-soft);border-color:var(--line);color:var(--ink)}
[data-theme=dark] :is(.admin-scope p,.admin-table th,.admin-sidebar nav a,.admin-footer,.admin-footer>span:first-child,.push-device-counts){color:var(--muted)}
[data-theme=dark] .admin-sidebar nav a:hover{background:var(--surface-soft)}
[data-theme=dark] :is(.admin-sidebar nav a.selected,.model-years a[aria-current]){background:var(--surface-raised);color:var(--teal)}
[data-theme=dark] :is(.admin-flash,.status-active,.status-paid,.status-completed,.status-assigned,.status-accepted,.status-local,.push-active,.push-received,.push-shown,.push-clicked,.push-platform-badge){background:#193f35;color:#a0e5c5;border-color:var(--line)}
[data-theme=dark] :is(.status-draft,.status-unpaid,.status-deferred){background:#493b21;color:#f8d99c}
[data-theme=dark] :is(.status-confirmed,.status-shipped,.status-submitted,.status-queued,.status-submitting,.status-forwarded,.push-accepted,.push-pending){background:#223b58;color:#a7d1ff}
[data-theme=dark] :is(.admin-error,.status-bounced,.status-failed,.status-expired,.push-failed,.push-show_failed,.push-invalid){background:#45282e;color:#ffd0ca;border-color:#93626a}
[data-theme=dark] :is(.status-cancelled,.status-archived,.status-retired,.status-unknown,.push-disabled,.push-expired,.push-platform-badge.is-inactive){background:#2a3d47;color:#c3d1d7}
[data-theme=dark] :is(.admin-positive,.push-device-counts .has-active){color:#a0e5c5}
[data-theme=dark] .mail-unconfirmed{color:#f8d99c}

@media(max-width:650px){
  .signed-in .top-nav{flex-wrap:nowrap;overflow-x:auto;gap:18px;scrollbar-width:none;min-width:0;max-width:100%}
  .signed-in .top-nav>a{flex-shrink:0;white-space:nowrap}
  .signed-in .top-nav::-webkit-scrollbar{display:none}
  .top-nav>.nav-shop{padding-left:18px;margin-left:0}
}
@media(max-width:400px){.theme-options{gap:8px}.theme-choice{font-size:13px;padding:14px 5px}.theme-swatch{width:60px;height:42px}.settings-sections{gap:8px}.settings-sections a{font-size:12px;padding:8px 12px}.signed-in .top-nav{gap:12px}.top-nav>.nav-shop{padding-left:12px}}

/* Public launch navigation remains usable alongside language and sign-in. */
@media(max-width:650px){body:not(.signed-in) .site-header{display:grid;grid-template-columns:minmax(0,1fr) auto;height:auto;gap:0 18px;padding-top:16px}body:not(.signed-in) .site-header>.brand{grid-column:1;grid-row:1}body:not(.signed-in) .site-header>.header-actions{grid-column:2;grid-row:1}body:not(.signed-in) .site-header>.top-nav{grid-column:1 / -1;grid-row:2;margin:10px 0 0;width:100%;gap:24px;overflow-x:auto;min-width:0}body:not(.signed-in) .site-header>.top-nav>a{padding:14px 0;white-space:nowrap;font-size:13px}}
