/* Original Clean: explicit, scoped palette. Layout and print contracts are retained. */
:root[data-theme=light]{color-scheme:light;--bg-main:#f5f6f8;--bg-card:#fff;--bg-card-hover:#f0f3f6;--bg-inset:#f7f8fa;--border-subtle:#dde3e9;--border-strong:#b7c2ce;--text-main:#172638;--text-secondary:#526174;--text-muted:#657286;--bg:var(--bg-main);--panel:var(--bg-card);--panel2:var(--bg-card-hover);--panel3:var(--bg-inset);--line:var(--border-subtle);--lineSoft:var(--border-subtle);--text:var(--text-main);--muted:var(--text-secondary);--amber:#906213;--amber2:#a66b08;--amberSoft:#fff4db;--red:#b42336;--green:#157548}
:root[data-theme=dark]{color-scheme:dark}
html[data-theme=light] #appShell{--evo-surface:#fff;--evo-text:#172638;--evo-muted:#526174}
html[data-theme=light] :is(.sideLogoMark,.loginLogoMark){background-color:#172638;border-radius:12px;background-size:90% auto}
html[data-theme=light] .aiosHeader #brandHome{background-color:#172638;border-radius:8px}
html[data-theme=light] :is(.mobileMoreBtn,.labelConservation button,.labelRuleRow,.inventoryCountStat,.inventoryCountRow,.inventoryCountHistoryRow,.physicalCmvCard,.maintenanceDetailBox,.purchaseStat,.recipeSummary>div,.cmvSemaphore,.homeCmvWidget,.syncRun,.syncStat,.salesSourceCard,.integrationBox,.mappingRow,.checklistRunItem,.checklistTemplateItem,.brendaMessage,.brendaPrompt,.settingsRow,.userRow,.diagnosticDetails){background:#f7f8fa!important;border-color:var(--border-subtle)!important;color:var(--text-main)!important;background-image:none!important}
html[data-theme=light] :is(.maintenanceDetailBox p,.evo-shortcut small,.evo-details>summary,.evo-metric .evo-note,.evo-search-result small,.searchResult small){color:var(--text-secondary)!important}
html[data-theme=light] :is(.evo-details>summary,.evo-search-result,.searchResult:hover,.searchResult.active){background:#f0f3f6!important;border-color:var(--border-subtle)!important;color:var(--text-main)!important}
html[data-theme=light] .labelConservation button.active{background:#fff4db!important;border-color:#dfbd76!important}
html[data-theme=light] body{background:var(--bg-main)!important;color:var(--text-main)}
html[data-theme=light] :is(.loginCard,.sheet,.mobileMoreSheet,.labelPanel,.evo-metric,.evo-shortcut,.evo-cmv-card,.evo-dialog,.labelHistoryRow){background:#fff!important;color:var(--text-main)!important;border-color:var(--border-subtle)!important;background-image:none!important;box-shadow:0 4px 20px #17263808!important}
html[data-theme=light] .loginCard{box-shadow:0 16px 50px #17263810!important}
html[data-theme=light] :is(.aiosHeader.topbarV2,.mobileNav){background:rgba(255,255,255,.97)!important;border-color:var(--border-subtle)!important}
html[data-theme=light] :is(.headerAccountPanel,.globalSearchResults,.mobileMore,.toast,.floatingAdd){background:#fff!important;color:var(--text-main)!important;border-color:var(--border-subtle)!important}
html[data-theme=light] :is(input:not([type=checkbox]):not([type=radio]),select,textarea){background:#fff!important;color:var(--text-main)!important;border-color:var(--border-strong)!important;caret-color:var(--text-main)}
html[data-theme=light] input::placeholder,html[data-theme=light] textarea::placeholder{color:#708094!important}
html[data-theme=light] :is(.btn.secondary,.pill,.mode,.settingsTab,.rbSourceBtn,.invoiceSource,.labelConservationBtn,.labelSizeBtn){background:#f6f8fa!important;border-color:var(--border-subtle)!important;color:var(--text-main)!important}
html[data-theme=light] :is(.btn.primary,.loginCard .btn.primary){background:#efb43c!important;color:#30210a!important;box-shadow:none!important}
html[data-theme=light] :is(.btn.ghost,.headerIconButton,.topBell,.mobileNavBtn,.mobileMoreBtn,.breadcrumb,.profileChip){color:var(--text-secondary)!important}
html[data-theme=light] :is(.btn.danger,.loginError,.movementDelta.neg,.ilNote.err){color:#b42336!important}
html[data-theme=light] .btn.danger{background:#fff1f2!important;border-color:#efc7cd!important}
html[data-theme=light] :is(.rbLine,.rbAuto,.rbTotals,.invoiceCta,.invoiceLine,.invoiceSummary,.purchaseEntryCard,.movementRow,.ingredientRow,.recipePrep,.recipeSummary>div,.event,.notice,.transcript,.periodFilter,.labelPreviewStage,.evo-cmv-facts>div,.evo-gauge-thresholds span,.evo-banner,.evo-gauge-examples){background:#f7f8fa!important;color:var(--text-main)!important;border-color:var(--border-subtle)!important;background-image:none!important}
html[data-theme=light] :is(.rbAutoHead b,.rbCost b,.rbTotals b,.invoiceCta b,.ilTotal b,.rbSourceBtn,.invoiceSource,.evo-cmv-value,.evo-value,.evo-label,.evo-shortcut b,.labelHistoryRow b){color:var(--text-main)!important}
html[data-theme=light] :is(.rbMain label,.rbCost,.rbMeta,.rbPrep summary,.ilGrid label,.ilTotal,.evo-note,.evo-data-note,.evo-gauge-thresholds,.labelHistoryRow small,.labelField){color:var(--text-secondary)!important}
html[data-theme=light] :is(.sideNavBtn.active,.mobileNavBtn.active,.mobileMoreBtn.active,.settingsTab.active,.labelConservationBtn.active,.evo-gauge-examples .btn[aria-pressed=true]){background:#fff4db!important;color:#80530a!important;border-color:#dfbd76!important}
html[data-theme=light] :is(.statusBadge,.semBadge,.labelBadge,.evo-cmv-status){color:#526174;background:#f5f7fa;border-color:#cdd6e0}
html[data-theme=light] :is(.good,.semBadge.green,.labelBadge.ok,.movementDelta.pos){color:#157548!important}
html[data-theme=light] :is(.bad,.semBadge.red,.labelBadge.expired){color:#b42336!important}
html[data-theme=light] :is(.mid,.warn,.semBadge.yellow,.labelBadge.soon,#homeBriefingCount){color:#80530a!important}
html[data-theme=light] .evo-cmv-card[data-state=good] .evo-cmv-status{color:#157548;background:#eaf8f1}
html[data-theme=light] .evo-cmv-card[data-state=critical] .evo-cmv-status{color:#b42336;background:#fff1f2}
html[data-theme=light] .evo-cmv-card:is([data-state=attention],[data-state=low_coverage]) .evo-cmv-status{color:#80530a;background:#fff4db}
/* The supplied white logo retains its original artwork on a small navy plaque. */
html[data-theme=light] :is(.brandLogo,.loginLogo){background:#172638;border-radius:12px;padding:10px}
html[data-theme=light] .profileAvatar{background:#fff4db;color:#80530a;border-color:#dfbd76}
html[data-theme=light] .modal{background:rgba(23,38,56,.38)}
html[data-theme=light] :focus-visible{outline:3px solid #3978ad;outline-offset:3px}
.appearancePicker{display:flex;gap:8px;flex-wrap:wrap}
.appearancePicker button{min-height:44px;padding:10px 16px;border:1px solid var(--line);background:var(--panel);color:var(--text);border-radius:10px;cursor:pointer}
.appearancePicker button[aria-pressed=true]{border-color:var(--amber2);box-shadow:inset 0 0 0 1px var(--amber2)}
.startGuide{margin:20px 0;border:1px solid var(--line);border-radius:14px;background:var(--panel);padding:18px}
.startGuide>summary{font-weight:700;cursor:pointer;min-height:30px;line-height:1.5}
.startGuide p{color:var(--muted);font-size:13px;line-height:1.6}
.startGuideList{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.startGuideStep{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:10px;padding:12px;background:var(--panel3);color:var(--text);text-align:left;cursor:pointer;min-height:76px}
.startGuideStep>span:first-child{flex:none;font-variant-numeric:tabular-nums;color:var(--amber2);font-weight:700}
.startGuideStep b,.startGuideStep small{display:block}.startGuideStep small{color:var(--muted);line-height:1.4;margin-top:4px}
@media(max-width:640px){.startGuideList{grid-template-columns:1fr}.appearancePicker{justify-content:flex-start}.settingsRow:has(.appearancePicker){flex-wrap:wrap;gap:12px}}
@media print{.appearancePicker,.startGuide{display:none!important}}
