html[data-theme=dark]{color-scheme:dark;--paper:#10191f;--ink:#d8e6e9;--muted:#97adb6;--line:#30424d;--green:#4bd0c3;--green-light:#163b3d;--accent:#e4b16d;--bg:#10191f;--surface:#1a2831;--text:#d8e6e9;--border:#30424d}
/* Shared night theme; loaded after all component styles. Day styling is unchanged. */
html[data-theme=dark] body,html[data-theme=dark] .shell,html[data-theme=dark] .main,html[data-theme=dark] .content{background:#10191f;color:#d8e6e9}
html[data-theme=dark] :is(.sidebar,.panel,.report-metric,.desk-kpis>div,.modal,.modal-head,.drawer,.card,.auth-main,.shop-options,.shop-picker summary,.report-charts article,.notice-order,.actual-finance,.definition,.quick-comparison){background:#1a2831;color:#d8e6e9;border-color:#30424d}
html[data-theme=dark] :is(.sidebar .brand strong,.sidebar .nav a,.sidebar-bottom a,.sidebar-bottom p,.sidebar-bottom .local-label,.pagehead h1,.settings-card h2,.settings-card h3,.report-metric strong,.desk-kpis strong,.data-table td,.data-table th,.profit-equation strong,.notice-order-products,.notice-order-number){color:#d8e6e9}
html[data-theme=dark] :is(.sidebar .nav a.active,.sidebar .nav a:hover,.btn:not(.primary):hover,.row-selected){background:#163b3d;color:#70e2d6}
html[data-theme=dark] .topbar{background:#174448;color:#eefbfa}
html[data-theme=dark] :is(input,select,textarea,.btn:not(.primary),.icon-btn,.timezone-tag,.report-date-range,.shop-picker summary){background:#132129;color:#d8e6e9;border-color:#3a515e}
html[data-theme=dark] :is(input:disabled,textarea:disabled){background:#202e36;color:#81949d}
html[data-theme=dark] .btn.primary{background:#177f79;color:#f1fffd;border-color:#25958b}
html[data-theme=dark] :is(.data-table th,.table-footer,.filterhead,.order-actions,.workflow-tabs,.report-context,.report-detail-total,.dashboard-tile,.dashboard-health-row,.dashboard-catalog,.catalog-notice,.catalog-filter-buttons,.report-filter){background:#18262f;border-color:#30424d}
html[data-theme=dark] :is(.data-table td,.data-table th,.data-table tr,.section-title,.modal-head,.sidebar-bottom,.filterhead,.report-chart line){border-color:#30424d}
html[data-theme=dark] .data-table tbody tr:hover{background:#21333d}
html[data-theme=dark] :is(.small.muted,.muted,.cell-sub,.report-footnote,.pagehead p,.profit-equation span,.profit-equation small,.report-metric small,.report-metric>span,.definition dt,.eyebrow,.sidebar .navlabel){color:#99b0ba}
html[data-theme=dark] :is(.notice,.profit-scope.incomplete){background:#3c3020;color:#efcf9c;border-color:#665032}
html[data-theme=dark] :is(.notice.green,.profit-scope,.quick-comparison,.badge.green){background:#153b34;color:#91e1ca;border-color:#28594d}
html[data-theme=dark] :is(.badge.orange,.badge.red){background:#4a3324;color:#f0c49a}
html[data-theme=dark] .gain{color:#6ad9bb}
html[data-theme=dark] .loss{color:#ff9995}
html[data-theme=dark] .report-chart text{fill:#a4bcc5}
html[data-theme=dark] .report-chart line{stroke:#30424d}
html[data-theme=dark] :is(.product-placeholder,.product-thumb,.product-cell img,.desk-product img,.local-cost-input,.raw-json,pre,.item-card,.history-item){background:#14212a;color:#c9dfe6;border-color:#30424d}
html[data-theme=dark] dialog::backdrop{background:#0009}
html[data-theme=dark]{--white:#1a2831;--red-light:#412728;--red:#ff9995;--shadow:0 16px 64px #0004}
html[data-theme=dark] :is(dialog,.order-notices,.order-notices footer,.notice-order-list,.report-breakdown section,.catalog-cost,.catalog-link){background:#1a2831;color:#d8e6e9;border-color:#30424d}
html[data-theme=dark] .order-notices header{background:#245968;color:#e4f5fb}

/* Explicit surfaces and states: td backgrounds must follow row hover/selection. */
html[data-theme=dark] :is(.dashboard-filter,.dashboard-transit .dashboard-tile,.dashboard-metrics .report-metric,.dashboard-metrics .report-metric:nth-child(3),.metrics,.actual-finance-metrics>div,.platform-finance-references,.resale-section,.ops-platform,.freight-trial,.local-form,.file-box,.guide,.modal-foot,.catalog-image.placeholder){background:#1a2831;color:#d8e6e9;border-color:#30424d}
html[data-theme=dark] .dashboard-metrics .report-metric:nth-child(3){background:#153b34;border-color:#28594d}
html[data-theme=dark] :is(.dashboard-tile:hover,.dashboard-transit .dashboard-tile:hover,.report-metric:hover,.dashboard-metrics .report-metric:hover){background:#233d42;border-color:#4b8887}
html[data-theme=dark] :is(.dashboard-tile>span,.dashboard-transit h3,.dashboard-health-row,.detail-value>span,.actual-finance-metrics span){color:#a4bfc6}
html[data-theme=dark] :is(.dashboard-health-row>b,.workflow-tab b,.badge,.empty-icon,.store-icon,.guide-item .step-num){background:#293d48;color:#bcd3dc;border-color:#3a515e}
html[data-theme=dark] :is(.badge.green,.workflow-tab.active b){background:#153b34;color:#91e1ca}
html[data-theme=dark] :is(.badge.orange,.dashboard-health-row>b){background:#443522;color:#f0ce99}
html[data-theme=dark] :is(.badge.red,.error){background:#412728;color:#ffb2ac;border-color:#694348}
html[data-theme=dark] .data-table .selectable-row:hover>td{background:#21333d}
html[data-theme=dark] .data-table .selectable-row.row-selected>td{background:#163b3d}
html[data-theme=dark] .data-table .selectable-row.row-selected:hover>td{background:#214a4b}
html[data-theme=dark] .local-cost-input input:disabled{background:#202e36;color:#9bafb9;border-color:#3a4c58}
html[data-theme=dark] :is(.local-cost-input input:not(:disabled),.searchbox input){background:#132129;color:#d8e6e9;border-color:#3a515e}
html[data-theme=dark] .report-store-table :is(th:first-child,td:first-child){background:#1a2831}
html[data-theme=dark] .data-table tfoot td{background:#193435;color:#d8e6e9;border-color:#365454}
html[data-theme=dark] .data-table tbody tr:hover>td{background-color:#21333d}
html[data-theme=dark] :is(.detail-financials>div:last-child,.platform-finance-references){background:#173a35;color:#b9e3d5;border-color:#30594e}
html[data-theme=dark] .estimate-explainer{background:#3c3020;color:#efcf9c;border-color:#a77d45}
html[data-theme=dark] :is(.ops-modal .modal-head,.drawer .modal-head,.modal-foot){background:#1a2831;color:#d8e6e9;border-color:#30424d}
html[data-theme=dark] #toast{background:#25494a;color:#e0fff5;border:1px solid #457772;box-shadow:0 12px 35px #0006}
html[data-theme=dark] #toast.failure{background:#512e32;color:#ffe1db;border-color:#85505b}
html[data-theme=dark] .order-notices>footer .btn{background:#1a2831;color:#75d9cf}
html[data-theme=dark] :is(.order-notices>footer .btn:hover,.notice-order.is-read){background:#21333d;color:#b8d9dc}
html[data-theme=dark] .btn.dark{background:#283e49;color:#e3f2f6;border-color:#486170}
html[data-theme=dark] .btn.primary:hover{background:#20978b;border-color:#43b9aa}
html[data-theme=dark] :is(.sku-copy:hover,.icon-btn:hover){background:#214a4b;color:#8aeadf}
html[data-theme=dark] :is(.catalog-image,.desk-product img){background:#14212a;border-color:#30424d}
html[data-theme=dark] .auth-art{background:#153139;color:#e3f2ef}
html[data-theme=dark] input::file-selector-button{background:#283e49;color:#e3f2f6;border:1px solid #486170;border-radius:5px;padding:5px 9px}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#8aa3ae;opacity:1}
html[data-theme=dark] .notice-order-actions>span{color:#8fddba}
html[data-theme=dark] .profit-scope.incomplete{background:#3c3020;color:#efcf9c;border-color:#665032}
html[data-theme=dark] .notice-shop.shop-color-0{background:#243651;color:#aecaff}html[data-theme=dark] .notice-shop.shop-color-1{background:#392b48;color:#d7b9ee}html[data-theme=dark] .notice-shop.shop-color-2{background:#443624;color:#edc48d}html[data-theme=dark] .notice-shop.shop-color-3{background:#203d46;color:#9ed5e0}html[data-theme=dark] .notice-shop.shop-color-4{background:#432c37;color:#efb3c8}html[data-theme=dark] .notice-shop.shop-color-5{background:#30334e;color:#c3c5fa}
html[data-theme=dark] .notice-order.notice-order-cancelled{background:#38282c;border-color:#81444a;border-left-color:#ed8580}html[data-theme=dark] .notice-order.notice-order-cancelled .notice-order-number{color:#ffaaa4}

html[data-theme=dark] .order-deadline.is-blue{color:#79bdff}
html[data-theme=dark] .order-deadline.is-red{color:#ff9995}
html[data-theme=dark] .order-catalog-items .order-sku-code{color:#deefee}
html[data-theme=dark] .order-catalog-items .product-placeholder{background:#172a32;border-color:#30424d;color:#8aa7b1}
html[data-theme=dark] .order-catalog-items .order-local-match{color:#88d9d0;background:#203e42;border-color:#376266}
html[data-theme=dark] .catalog-editor-savebar{background:#1a2831}
html[data-theme=dark] .warehouse-shop>header{background:#20343d}
html[data-theme=dark] .warehouse-help{background:#163b3d;color:#a9d7d4}
html[data-theme=dark] .warehouse-edited{background:#3b3222}
html[data-theme=dark] .catalog-match-search .sku-query-control{background:#14212a;border-color:#30424d}
html[data-theme=dark] .sku-query-tag{background:#203d40;border-color:#376266;color:#91dfd2}

html[data-theme=dark] .workflow-channel-seller{--workflow-bg:#1b2d40;--workflow-border:#355674;--workflow-ink:#acd0f2;--workflow-active:#346d9f;--workflow-hover:#263f58}
html[data-theme=dark] .workflow-channel-fbp{--workflow-bg:#19342e;--workflow-border:#326454;--workflow-ink:#a0ddc9;--workflow-active:#28755f;--workflow-hover:#244a3f}
html[data-theme=dark] .workflow-channel-fbo{--workflow-bg:#2d263d;--workflow-border:#56456e;--workflow-ink:#d2bce9;--workflow-active:#755696;--workflow-hover:#403252}
html[data-theme=dark] .workflow-grouped>.workflow-tab.active{background:#153b34;color:#91e1ca}

html[data-theme=dark] .order-cost-note{color:#ff9299}
html[data-theme=dark] .order-waybill,
html[data-theme=dark] .cell-sub.order-waybill{color:#80b9ff}
