/* v147: dark mode for the whole authenticated catalog, not just Settings. */
html[data-aals-theme="dark"] { color-scheme:dark; }
html[data-aals-theme="dark"] body { background:#07182d!important; }
html[data-aals-theme="dark"] #app { --navy:#e9f2ff; --ink:#edf4ff;--muted:#adc1da;--line:#304c6a;--bg:#07182d;--panel:#102b49;--soft:#173654;--shadow2:0 7px 24px rgba(0,0,0,.25);background:#07182d!important;color:#edf4ff!important; }
html[data-aals-theme="dark"] #app :is(.layout,.main,.sidebar,.side-inner,.content,.catalog-content,.products-section,.products-container,.store-list,.welcome,.catalog-main){background-color:#091d35!important;color:#eaf3ff!important;}
html[data-aals-theme="dark"] #app :is(.main,.sidebar,.store-list){border-color:#304c6a!important;}
html[data-aals-theme="dark"] #app :is(.store-card,.store-item,.product-card,.product-row,.product-table,.product-grid,.cart-drawer,.card,.panel,.modal-card,.admin-order-card,.admin-order,.spec-card,.notice,.search-box,.summary-card,.filters,.filter-card,.product-info,.stat-card,.catalog-user-menu,.dropdown-menu,.modal-content,.admin-panel,.admin-order-note,.empty-state,.summary-strip){background-color:#112b49!important;color:#edf4ff!important;border-color:#365272!important;}
html[data-aals-theme="dark"] #app :is(.store-item.active,.product-row:hover,.store-item:hover){background-color:#1b3c5e!important;}
html[data-aals-theme="dark"] #app :is(h1,h2,h3,h4,h5,h6,.products-title,.section-title,.store-city,.product-name,.store-num,.products-head,.table-title,.label,.field-label){color:#f0f6ff!important;}
html[data-aals-theme="dark"] #app :is(p,small,.muted,.hint,.store-address,.product-sku,.subtitle,.products-title span,.store-details,.side-caption){color:#b5c9e1!important;}
html[data-aals-theme="dark"] #app :is(input,select,textarea){background-color:#102844!important;color:#f4f8ff!important;border-color:#47617e!important;}
html[data-aals-theme="dark"] #app :is(input,textarea)::placeholder{color:#a9bdd5!important;}
html[data-aals-theme="dark"] #app :is(table,thead,tbody,tr,td,th){border-color:#35526f!important;color:#e9f3ff;}
html[data-aals-theme="dark"] #app :is(thead,th){background-color:#1a3a5b!important;color:#dbeafa!important;}
html[data-aals-theme="dark"] #app tbody tr:nth-child(even){background-color:#142f4d!important;}
html[data-aals-theme="dark"] #app :is(.outline-btn,.btn-outline,.btn-secondary,.secondary-btn,.icon-btn,.icon-toggle){background-color:#193857!important;color:#edf5ff!important;border-color:#4a6787!important;}
html[data-aals-theme="dark"] #app :is(.topbar,.topbar *, .status-pill,.status-pill *, .badge,.badge *, .btn-primary,.btn-primary *, .danger-btn,.danger-btn *){ /* preserve branded controls and semantic pills */ }
/* Common fixed overlays and modals sit directly below body rather than within #app. */
html[data-aals-theme="dark"] body :is(.modal-content,.modal-card,.cart-drawer,.drawer-content,.admin-modal,.specs-modal,.dialog-card){background-color:#102a47;color:#edf4ff;border-color:#355371;}
html[data-aals-theme="dark"] body :is(.modal-content,.modal-card,.cart-drawer,.drawer-content,.admin-modal,.specs-modal,.dialog-card) :is(h2,h3,h4,p,label){color:inherit;}
html[data-aals-theme="dark"] body :is(.modal-content,.modal-card,.cart-drawer,.drawer-content,.admin-modal,.specs-modal,.dialog-card) :is(input,textarea,select){background-color:#173958;color:#f2f7ff;border-color:#4a6787;}
/* Explicitly keep the login card light and printable documents unchanged. */
html[data-aals-theme="dark"] #authScreen{color-scheme:light;}
html[data-aals-theme="dark"] #authScreen .auth-card{background:#f9fafb!important;color:#0f2341!important;}
@media print{html[data-aals-theme="dark"] body,html[data-aals-theme="dark"] #app{background:#fff!important;color:#111!important;color-scheme:light!important;}}
