/* Semantic night palette. Screen only; photos and printed catalogs stay original. */
@media screen {
:root[data-theme=dark]{--danger:#ffadb8;--danger-bg:#43242f;--danger-border:#b66a7d;--warning:#ffda91;--warning-bg:#3b3021;--success:#83dfbd;--success-bg:#193c33;--surface-raised:#383341}
html[data-theme=dark] body .app-shell :is(.rule-box,.sync-ready-box,.diag-card,.meta-card,.mini-kpi,.mini-stat,.notes-box,.price-box,.purchase-totals,.additional-costs-summary,.additional-costs-total,.receive-import-box,.import-received-box,.cost-sync-strip,.price-rule-help,.price-rule-head,.money-input,.qty-input,.form-actions,.pager,.compact-filterbar,.segmented-filter){background:#383341!important;color:#f2edf7!important;border-color:#655770!important}
html[data-theme=dark] body .app-shell :is(.rule-box,.sync-ready-box,.diag-card,.connection-item,.integration-card) :is(strong,li){color:#f2edf7!important}
html[data-theme=dark] body .app-shell :is(.integration-card,.diag-card,.sync-ready-box,.bulk-filterbar,.bulk-selectionbar,.bulk-drawer,.catalog-settings-dialog,.editor-sheet) :is(label,small,.muted){color:#cec2da!important}
html[data-theme=dark] body .app-shell :is(dialog,.bulk-drawer,.catalog-settings-dialog,.bulk-combined-card,.catalog-adjustments,.catalog-artwork-settings,.bulk-paste-panel,.bulk-addbar,.bulk-controls,.bulk-selectionbar,.catalog-bulk-toolbar,.catalog-paste,.pretty-upload,.upload-box,.upload-zone,.import-product-results,.autocomplete-menu,.bulk-results,.purchase-menu-pop){background:#2d2b35!important;color:#f2edf7!important;border-color:#655770!important}
html[data-theme=dark] body .app-shell :is(dialog,.bulk-drawer,.catalog-settings-dialog)>:is(header,footer){background:#383341!important;color:#f2edf7!important;border-color:#655770!important}
html[data-theme=dark] body .app-shell :is(.product-search-result,.import-product-option,.autocomplete-item,.catalog-results button,.bulk-results button,.purchase-menu-pop a,.rlb-product-option){background:#2d2b35!important;color:#f2edf7!important;border-color:#655770!important}
html[data-theme=dark] body .app-shell :is(.product-search-result,.import-product-option,.autocomplete-item,.catalog-results button,.bulk-results button,.purchase-menu-pop a,.rlb-product-option):is(:hover,:focus-visible,.active){background:#453052!important;color:#faf4ff!important}
html[data-theme=dark] body .app-shell :is(.bulk-info,.info-notice,.sync-notice,.notice){background:#3e324b!important;color:#ead9f3!important;border-color:#806794!important}
html[data-theme=dark] body .app-shell :is(.bulk-warning,.warn-notice,.warning-notice,.connection-pill.warn,.status-pill.warn,.import-status.En-revisión){background:var(--warning-bg)!important;color:var(--warning)!important;border-color:#a58a56!important}
html[data-theme=dark] body .app-shell :is(.success-notice,.status-pill.ok,.connection-pill.ok,.Disponible,.bulk-stock-badge.available,.import-status.Aprobada,.import-status.Ingresada){background:var(--success-bg)!important;color:var(--success)!important;border-color:#438b73!important}
html[data-theme=dark] body .app-shell :is(.error,.error-notice,.danger-notice,.status-pill.bad,.Agotado,.bulk-stock-badge.empty,.invoice-loss-label,.import-status.Anulada,.cancel-import-box){background:var(--danger-bg)!important;color:var(--danger)!important;border-color:var(--danger-border)!important}
html[data-theme=dark] body .app-shell :is(.switch-message.error,.switch-message.error *,.bulk-row-message.error,.bulk-image-status.error,.product-image-result.error,.error-text,.low-stock,.state-inactive,.invoice-negative,.negative,.qty-neg,.product-profit.negative){color:var(--danger)!important}
html[data-theme=dark] body .app-shell .rlb-switch button{color:#dfd4e8!important}
html[data-theme=dark] body .app-shell .rlb-switch button[aria-pressed=true]{background:#76449b!important;color:#fff!important}
html[data-theme=dark] body .app-shell .rlb-switch.state-switch button[data-switch-value="1"][aria-pressed=true]{background:#146c43!important;color:#fff!important}
html[data-theme=dark] body .app-shell .rlb-switch.state-switch button[data-switch-value="0"][aria-pressed=true]{background:#9c273c!important;color:#fff!important}
html[data-theme=dark] body .app-shell .background-sync,
html[data-theme=dark] body .app-shell .background-sync.running{background:#3e324b!important;border-color:#806794!important}
html[data-theme=dark] body .app-shell .background-sync a,
html[data-theme=dark] body .app-shell .background-sync button{color:#e7cafa!important}
html[data-theme=dark] body .app-shell .background-sync.failed{background:var(--danger-bg)!important;border-color:var(--danger-border)!important}
html[data-theme=dark] body .app-shell .background-sync.failed a{color:var(--danger)!important}
html[data-theme=dark] body .app-shell .rlb-progress-track,
html[data-theme=dark] body .app-shell progress{background:#494253!important;border-color:#806794!important}
html[data-theme=dark] body .app-shell table tbody tr:is(.row-alert,.row-unlinked,.product-needs-review,.invoice-cost-pending,.invoice-product-loss,.stock-error,.bulk-row-error,.is-inactive)>td,
html[data-theme=dark] body .app-shell table tbody tr:is(.row-alert,.row-unlinked,.product-needs-review,.invoice-cost-pending,.invoice-product-loss,.stock-error,.bulk-row-error,.is-inactive):hover>td,
html[data-theme=dark] body .app-shell #bulk-editor .bulk-grid tr:is(.row-alert,.row-unlinked,.product-needs-review,.invoice-cost-pending,.invoice-product-loss,.stock-error,.bulk-row-error,.is-inactive)>td,
html[data-theme=dark] body .app-shell #bulk-editor .bulk-grid tr:is(.row-alert,.row-unlinked,.product-needs-review,.invoice-cost-pending,.invoice-product-loss,.stock-error,.bulk-row-error,.is-inactive):has(input[type=checkbox]:checked)>td{background:var(--danger-bg)!important;color:#ffe0e5!important;border-color:#885267!important}
html[data-theme=dark] body .app-shell table tbody tr:is(.row-alert,.row-unlinked,.product-needs-review,.invoice-cost-pending,.invoice-product-loss,.stock-error,.bulk-row-error,.is-inactive)>td:first-child,
html[data-theme=dark] body .app-shell #bulk-editor .bulk-grid tr:is(.row-alert,.row-unlinked,.product-needs-review,.invoice-cost-pending,.invoice-product-loss,.stock-error,.bulk-row-error,.is-inactive)>td:first-child{box-shadow:inset 4px 0 var(--danger)!important}
html[data-theme=dark] body .app-shell tr.product-needs-review .product-link,
html[data-theme=dark] body .app-shell tr.product-needs-review .review-label,
html[data-theme=dark] body .app-shell tr.invoice-product-loss .invoice-negative{color:var(--danger)!important}
html[data-theme=dark] body .app-shell #bulk-editor .bulk-grid .bulk-field-error,
html[data-theme=dark] body .app-shell [aria-invalid=true],
html[data-theme=dark] body .app-shell .input-error{background:#35202e!important;color:#ffe0e5!important;border-color:var(--danger)!important}
html[data-theme=dark] body .app-shell #bulk-editor :is(.bulk-error-summary,.bulk-error-link){background:var(--danger-bg)!important;color:var(--danger)!important;border-color:var(--danger-border)!important}
html[data-theme=dark] body .app-shell .profit-hero.invoice-loss,
html[data-theme=dark] body .app-shell .profit-hero.invoice-loss :is(.profit-value,.profit-eyebrow,.profit-meta,.profit-side span,.profit-side strong){background:var(--danger-bg)!important;color:#ffbdc6!important;border-color:var(--danger-border)!important}
html[data-theme=dark] body .app-shell a:focus-visible,
html[data-theme=dark] body .app-shell button:focus-visible,
html[data-theme=dark] body .app-shell summary:focus-visible{outline:2px solid #e3baff!important;outline-offset:2px}
html[data-theme=dark] body .app-shell :is(.rlb-progress-percent,.sync-progress-meta,.product-meta,.sync-mini,.price-note,.bulk-page-check,.catalog-document-preview){color:#cec2da!important}
html[data-theme=dark] body .app-shell .rlb-progress[data-state=partial] .rlb-progress-percent{color:var(--warning)!important}
html[data-theme=dark] body .app-shell .rlb-progress[data-state=error] .rlb-progress-percent{color:var(--danger)!important}
html[data-theme=dark] body .app-shell .bulk-combined-card.is-selected{background:#453052!important;border-color:#d9a5ff!important}
html[data-theme=dark] body .app-shell .invoice-positive{color:var(--success)!important}
}
