/* Light-only working UI. Loaded after legacy styles so controls share one
   surface, contrast and focus treatment across private and workshop forms. */
html[data-theme="light"] {
  color-scheme:light;
  --wmp-bg:#edf1f5; --wmp-bg-2:#f4f6f8; --wmp-bg-3:#f8fafc;
  --wmp-surface:rgba(246,244,239,.96); --wmp-surface-2:#eeece7;
  --wmp-surface-3:#eaf0f5; --wmp-surface-solid:#fff;
  --wmp-text:#1c2939; --wmp-text-soft:#344458; --wmp-muted:#526175; --wmp-dim:#627187;
  --wmp-border:#d8dfe7; --wmp-border-strong:#b9c5d2; --wmp-line:#e3e8ee;
  --wmp-success:#176547; --wmp-warning:#825600; --wmp-danger:#a02b3a;
  --wmp-shadow-soft:0 4px 16px rgba(31,47,67,.06);
  --wmp-shadow-panel:0 6px 24px rgba(31,47,67,.07);
  --wmp-shadow-tight:0 2px 6px rgba(31,47,67,.07);
  --wmp-control-bg:#fff; --wmp-control-bg-hover:#f5f8fb;
  --wmp-control-border:#bac6d3; --wmp-control-border-hover:#899aaf;
  --wmp-control-shadow:0 2px 4px rgba(31,47,67,.06),0 6px 14px rgba(31,47,67,.04);
  --wmp-header-bg:rgba(255,255,255,.94); --wmp-header-title:var(--wmp-text);
  --wmp-header-copy:var(--wmp-muted); --wmp-header-shadow:none;
  --wmp-actionbar-bg:transparent; --wmp-actionbar-shadow:none;
  --bg:var(--wmp-bg-2); --sidebar:#f8fafc; --panel:var(--wmp-surface);
  --panel-2:#f4f6f8; --panel-3:#eaf0f5; --text:var(--wmp-text);
  --muted:var(--wmp-muted); --muted-2:var(--wmp-dim); --line:var(--wmp-border);
  --shadow:var(--wmp-shadow-panel); --glow:var(--wmp-shadow-soft);
}
html[data-theme="light"], html[data-theme="light"][data-accent="red"] {
  --wmp-accent:#a63e38; --wmp-accent-rgb:166,62,56;
  --wmp-accent-soft:#faecea; --wmp-accent-line:#d9a9a5;
  --accent:var(--wmp-accent); --blue:var(--wmp-accent); --wm-primary:var(--wmp-accent);
}
html[data-theme="light"][data-accent="blue"] {
  --wmp-accent:#245ca6; --wmp-accent-rgb:36,92,166;
  --wmp-accent-soft:#eaf1fb; --wmp-accent-line:#a0bade;
}
html[data-theme="light"] body.product-private {
  --wm-private-veil:rgba(244,247,250,.64);
  --wm-private-panel:rgba(246,244,239,.96);
  --wm-private-sidebar:rgba(246,245,241,.96);
  --wm-private-action:rgba(249,248,244,.94);
  --wm-private-overlay:rgba(244,247,250,.20);
}

/* Field wrappers are labels, not extra white cards. */
html[data-theme="light"] body :is(.mp-main,.auth-shell) :is(label,.field,.flow-field,.feedback-field) {
  background:transparent!important; background-image:none!important;
  box-shadow:none!important; text-shadow:none!important; color:var(--wmp-text-soft)!important;
  font-weight:550!important;
}
html[data-theme="light"] body:not(.auth-page) .mp-main.mp-main .field {
  min-width:0; gap:8px; border-color:transparent!important;
}
html[data-theme="light"] body :is(.mp-main,.auth-shell) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="range"]):not([type="color"]),select,textarea) {
  box-sizing:border-box; min-width:0; max-width:100%; min-height:46px;
  border:1px solid var(--wmp-control-border)!important; border-radius:8px!important;
  background:#faf9f6!important; color:var(--wmp-text)!important;
  box-shadow:var(--wmp-control-shadow)!important; padding:11px 13px!important;
  font-family:inherit; font-size:16px!important; font-weight:450!important;
  line-height:1.45; text-shadow:none!important; -webkit-text-fill-color:currentColor;
  transition:border-color 140ms,box-shadow 140ms;
}
html[data-theme="light"] body :is(.mp-main,.auth-shell) textarea {min-height:112px; resize:vertical;}
html[data-theme="light"] body :is(.mp-main,.auth-shell) :is(input,textarea)::placeholder {color:#66758a!important;opacity:1; font-weight:400!important;}
html[data-theme="light"] body :is(.mp-main,.auth-shell) :is(input,select,textarea):focus-visible {
  border-color:var(--wmp-accent)!important; outline:2px solid var(--wmp-accent)!important;
  outline-offset:2px; box-shadow:0 0 0 4px var(--wmp-accent-soft)!important;
}
html[data-theme="light"] body :is(.mp-main,.auth-shell) :is(input,select,textarea):is(:disabled,[readonly]) {
  background:#edf1f5!important; color:#526175!important; box-shadow:none!important; opacity:1;
}
html[data-theme="light"] body :is(.mp-main,.auth-shell) :is(input,select,textarea):is([aria-invalid="true"],:user-invalid),
html[data-theme="light"] body :is(.mp-main,.auth-shell) .field:has(.errorlist:not([hidden]):not(:empty)) :is(input,select,textarea) {border-color:#b32f42!important;}
html[data-theme="light"] body :is(.mp-main,.auth-shell) :is(.errorlist,.field-error) {color:#a02b3a!important;}
html[data-theme="light"] body :is(.mp-main,.auth-shell) input:is([type="checkbox"],[type="radio"]) {
  accent-color:var(--wmp-accent); width:18px; height:18px; flex-shrink:0; box-shadow:none!important;
}
html[data-theme="light"] body :is(.mp-main,.auth-shell) input::file-selector-button {
  border:1px solid var(--wmp-border-strong); border-radius:5px; padding:6px 10px;
  margin-right:12px; background:#eef3f8; color:var(--wmp-text); font:inherit; cursor:pointer;
}

/* Explicit action variants also cover dossier buttons and segmented controls. */
html[data-theme="light"] body:not(.auth-page) .mp-main.mp-main :is(.btn,.button,.wm-btn,.wm-vd-action,.quick-choice) {
  background:#faf9f6!important; color:var(--wmp-text)!important; -webkit-text-fill-color:currentColor!important;
  border:1px solid var(--wmp-border-strong)!important; box-shadow:var(--wmp-shadow-tight)!important;
  font-weight:600!important; text-shadow:none!important; border-radius:7px!important;
}
html[data-theme="light"] body.wm-public-landing .wm-btn--primary,
html[data-theme="light"][data-accent] body:not(.landing-engine-page) :is(.mp-main.mp-main,.auth-shell) :is(.btn.primary,.button.primary,.btn.is-primary,.wm-btn--primary,.wm-vd-action--primary,.wm-control--primary,button.primary,input[type="submit"].primary) {
  background:var(--wmp-accent)!important; border-color:var(--wmp-accent)!important;
  color:#fff!important; -webkit-text-fill-color:#fff!important; text-shadow:none!important;
  box-shadow:0 2px 5px rgba(31,47,67,.10)!important;
}
html[data-theme="light"] body.wm-public-landing .wm-btn:hover:not(:disabled),
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main :is(.btn,.button,.wm-btn,.quick-choice):hover:not(:disabled) {filter:brightness(.96);}
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main :is(.btn.danger,.button.danger,.wm-btn--danger) {
  background:#fff1f2!important; color:#a02b3a!important; border-color:#e1aab3!important;
}
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main :is(button,.btn,.button,.wm-btn,input):is(:disabled,[aria-disabled="true"]) {
  background:#edf1f5!important; border-color:#d8dfe7!important; color:#657387!important;
  -webkit-text-fill-color:#657387!important; box-shadow:none!important; opacity:1!important; cursor:not-allowed;
}
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main :is(.quick-choice.is-active,.wm-segmented-toggle button.is-active,[role="tab"][aria-selected="true"]) {
  background:var(--wmp-accent-soft)!important; color:var(--wmp-accent)!important;
  border-color:var(--wmp-accent-line)!important; -webkit-text-fill-color:currentColor!important;
}
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main .wm-segmented-toggle button.is-active strong {color:inherit!important;}
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main .wm-toggle-indicator {display:none!important;}
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main .toggle:is([aria-pressed="true"],[aria-checked="true"]) {background:var(--wmp-accent)!important;}
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main .toggle:is([aria-pressed="false"],[aria-checked="false"]) {background:#b8c4d2!important;}

/* Quiet panels preserve the continuous garage photograph behind the app. */
html[data-theme="light"] body:not(.auth-page) .mp-main.mp-main :is(.panel,.dashboard-glass,.workflow-card,.workflow-assist-card,.vehicle-wizard-step,.quick-step-flow,.quick-step-panel,.settings-row,.invoice-card,.invoice-detail-card,.invoice-review-card,.wm-vd-file,.wm-vd-tab-panel,.wm-vd-register,.wm-vd-page-card,.wm-panel,.wm-doc-card,.cost-ledger-panel,.cost-ledger-summary,.cost-ledger-head,.cost-ledger-tabs,.wm-capture-flow,.wm-modal,.wm-premium-dialog,.invoice-capture-modal__card,.invoice-capture-modal__head,.invoice-capture-modal__body) {
  background:var(--wm-private-panel,var(--wmp-surface))!important;
  background-image:none!important; border-color:var(--wmp-border)!important;
  box-shadow:var(--wmp-shadow-soft)!important; color:var(--wmp-text)!important;
}
html[data-theme="light"] body:not(.auth-page) .mp-main.mp-main :is(.settings-row,.wm-service-row,.wm-reminder-row,.wm-data-list>div) {box-shadow:none!important;}
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main .settings-row {border-bottom:1px solid var(--wmp-line)!important;}
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main .wm-light-status {background:#e8f4ed;color:#176547;padding:6px 12px;border-radius:6px;font-size:13px;font-weight:600;}
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main .wm-search-scope-note {background:#edf3f9!important;color:#344458!important;border:1px solid #cbd8e6;box-shadow:none!important;}
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main :is(h1,h2,h3) {font-weight:700!important;text-shadow:none!important;}
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main :is(.wm-vd-title,.dashboard-active-copy h2,.vehicle-card h2) {max-width:none!important; overflow-wrap:normal;}
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main .wm-vd-maintenance-due {color:#9a3040!important;}
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main .wm-vd-dossier {
  --wm-vd-text:var(--wmp-text); --wm-vd-muted:var(--wmp-muted); --wm-vd-dim:var(--wmp-dim);
  --wm-vd-sheet-surface:#fff; --wm-vd-module-surface:#f7f9fb; --wm-vd-control-surface:#fff;
  --wm-vd-line:var(--wmp-border); --wm-vd-line-soft:var(--wmp-line);
}
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main .wm-vd-cover {background:#f2f5f8!important;box-shadow:var(--wmp-shadow-soft)!important;}
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main .wm-vd-cover__media {background:#e8edf3!important;}
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main .wm-vd-cover::before {background:linear-gradient(90deg,rgba(249,251,253,.98),rgba(249,251,253,.92) 55%,rgba(249,251,253,.45))!important;}
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main .wm-vd-cover::after {background:none!important;}
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main .wm-vd-cover__media img {filter:none!important;opacity:1;}
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main :is(.wm-vd-stats,.wm-vd-stat,.wm-vd-register__tab) {background:#f5f8fb!important;box-shadow:none!important;}
html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main .vehicle-image-change-link {background:#fff!important;color:var(--wmp-accent)!important;border:1px solid var(--wmp-border)!important;box-shadow:none!important;}

html[data-theme="light"][data-accent] body .mp-main.mp-main .admin-status-hero {grid-template-columns:minmax(240px,.65fr) minmax(0,1.35fr)!important;}
html[data-theme="light"][data-accent] body .mp-main.mp-main .admin-status-grid {grid-template-columns:repeat(3,minmax(0,1fr))!important;}
html[data-theme="light"][data-accent] body .mp-main.mp-main .settings-row {display:grid!important;grid-template-columns:30px minmax(0,1fr) auto!important;align-items:center;gap:14px;padding:16px 0!important;background:transparent!important;border:0!important;border-bottom:1px solid var(--wmp-line)!important;}
html[data-theme="light"][data-accent] body .mp-main.mp-main :is(.settings-row,.wm-setting-row) .toggle {position:relative!important;width:46px!important;min-width:46px!important;height:26px!important;min-height:26px!important;padding:0!important;border:0!important;border-radius:20px!important;box-shadow:none!important;}
html[data-theme="light"][data-accent] body .mp-main.mp-main :is(.settings-row,.wm-setting-row) .toggle::after {content:""!important;display:block!important;position:absolute!important;top:4px!important;left:4px!important;width:18px!important;height:18px!important;border-radius:50%!important;background:#fff!important;transform:none!important;visibility:visible!important;opacity:1!important;padding:0!important;min-width:0!important;box-shadow:0 1px 3px rgba(0,0,0,.15)!important;}
html[data-theme="light"][data-accent] body .mp-main.mp-main :is(.settings-row,.wm-setting-row) .toggle:is([aria-pressed="true"],[aria-checked="true"])::after {left:24px!important;}
html[data-theme="light"][data-accent] body .mp-main.mp-main :is(.settings-row,.wm-setting-row) .toggle>span[aria-hidden="true"] {display:none!important;}
@media(max-width:1100px) {
  html[data-theme="light"][data-accent] body .mp-main.mp-main :is(.admin-settings-row,.admin-status-hero) {grid-template-columns:1fr!important;}
}
@media(max-width:760px) {
  html[data-theme="light"][data-accent] body .mp-main.mp-main .settings-row {grid-template-columns:24px minmax(0,1fr)!important;}
  html[data-theme="light"][data-accent] body .mp-main.mp-main .settings-row>:last-child {grid-column:2!important;grid-row:auto!important;justify-self:start!important;max-width:100%;}
}
@media(min-width:761px) {
  html[data-theme="light"][data-accent] body .mp-main.mp-main .settings-row>:last-child {grid-column:3!important;grid-row:1!important;justify-self:end!important;max-width:100%;}
}
/* Long vehicle forms need room for inputs instead of an oversized side guide. */
html[data-theme="light"] body.product-private .mp-main.mp-main .workflow-shell:has([data-guide-id="vehicle-form-main"]) {grid-template-columns:minmax(0,1fr) 250px!important;gap:24px!important;}
html[data-theme="light"] body.product-private .mp-main.mp-main .registration-inline-scan-card {grid-template-columns:1fr!important;gap:16px!important;}
html[data-theme="light"] body.product-private .mp-main.mp-main .registration-inline-copy {min-width:0!important;}
html[data-theme="light"] body.product-private .mp-main.mp-main :is(.workflow-card-head strong,.vehicle-wizard-step h2) {font-size:24px!important;line-height:1.3!important;}
html[data-theme="light"][data-accent] body.product-private .mp-main.mp-main :is(.subpage-hero,.vehicle-form-page .mp-page-head) h1 {font-size:38px!important;line-height:1.15!important;max-width:none!important;}
html[data-theme="light"] body.product-private .mp-main.mp-main :is(.invoice-capture-modal,.wm-dialog) {overflow-x:hidden;}
@media(max-width:1100px) {
  html[data-theme="light"] body.product-private .mp-main.mp-main .workflow-shell:has([data-guide-id="vehicle-form-main"]) {grid-template-columns:1fr!important;}
}
@media(max-width:760px) {
  html[data-theme="light"][data-accent] body.product-private .mp-main.mp-main :is(.subpage-hero,.vehicle-form-page .mp-page-head) h1 {font-size:30px!important;}
  html[data-theme="light"][data-accent] body:not(.auth-page) .mp-main.mp-main .settings-row {gap:12px;flex-wrap:wrap;}
}
@media(prefers-reduced-motion:reduce) {
  html[data-theme="light"] body :is(input,select,textarea) {transition:none!important;}
}
