.theme-toggle{width:36px;height:36px;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;border:1px solid #dce4ef;border-radius:50%;background:#f4f7fc;color:#003594;transition:background .15s,border-color .15s}.theme-toggle:hover{border-color:#fe5000;background:#fff4ea}.theme-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
@media screen {
html[data-theme=dark]{color-scheme:dark;--night-bg:#0b1425;--night-card:#121f35;--night-raised:#1b2b43;--night-line:#314259;--night-text:#e9eff8;--night-muted:#aabbd2;--night-blue:#8db7ff}
html[data-theme=dark] body{background:var(--night-bg);color:var(--night-text)}
html[data-theme=dark] :is(.sidebar,.topbar,.panel,.metric,.filters,dialog,.filter-disclosure,.client-card,.calendar-preview){background:var(--night-card);border-color:var(--night-line);color:var(--night-text)}
html[data-theme=dark] :is(h1,h2,h3,td strong,.metric-value,.row-title strong,.client-card strong,.empty strong,.breadcrumbs strong,.upload strong){color:var(--night-text)}
html[data-theme=dark] :is(a,.client-name,.client-code,.directory-table .client-name,.directory-table .client-code,.order-client,.supply-commune,.client-card .client-value,.side-help strong,.welcome h2){color:var(--night-blue)}
html[data-theme=dark] :is(.brand p,.nav-label,.nav a,.side-help p,.side-profile small,.breadcrumbs,.top-actions .date,.eyebrow,p.sub,.field label,.metric-head,.metric small,.panel-head p,.legend,.chart-labels,.chart-y,.chart-note,.consumption-foot,td small,.table-footer,.footer,.upload small,.save-status,.ocr-log,.empty,.client-card p,dialog dt,.client-destination small,.client-data-grid dt,.orders-list-controls label,.profile-panel-head p,.signature-options legend,.profile-save [role=status],.profile-notes,.signature-empty,.supply-month-title span,.supply-weekday,.supply-legend,.filter-empty,.filter-toggle-hint){color:var(--night-muted)}
html[data-theme=dark] :is(.field input,.field select,.field textarea,.orders-list-controls select,.search input){color-scheme:dark;background:var(--night-bg);border-color:var(--night-line);color:var(--night-text)}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#8da0b9;opacity:1}
html[data-theme=dark] :is(.button,.mobile-menu,.order-status,.filter-chip){background:var(--night-raised);border-color:var(--night-line);color:var(--night-text)}
html[data-theme=dark] .button.primary{background:#003594;border-color:#4275ca;color:#fff}
html[data-theme=dark] .button.orange{background:#fe5000;color:#fff;border-color:#fe5000}
html[data-theme=dark] :is(.button.ghost,.filters .reset,.filter-clear){background:transparent;color:var(--night-blue)}
html[data-theme=dark] :is(.nav a:hover,.nav a.active,.side-help,.avatar,.welcome,.metric-icon,.steps,.upload,.review,.checklist,.back-up,.client-summary,.client-account,.client-data-grid>div,.profile-preview-panel,.premium-filter-details>summary){background:var(--night-raised);border-color:var(--night-line);color:var(--night-blue)}
html[data-theme=dark] :is(th,.orders-table th,.supply-table th){background:#1b2b43;color:#b9c9df;border-color:var(--night-line)}
html[data-theme=dark] :is(td,.panel-head,.table-footer,.profile-panel-head,.signature-options,.side-profile,dialog .history,.form-section,.client-section-title){border-color:var(--night-line)}
html[data-theme=dark] :is(.orders-table th button,.form-section,.client-section-title){color:var(--night-blue)}
html[data-theme=dark] :is(.orders-table tbody tr:hover,.directory-table tbody tr:hover,.supply-table tbody tr:hover,.supply-selected){background:#1b2b43}
html[data-theme=dark] :is(.notice,.review-label,.field-difference,.field-review,.dispatch-difference,.metric.orange .metric-icon){background:#342919;border-color:#805d29;color:#ffd08b}
html[data-theme=dark] :is(.field-difference input,.field-difference select,.field-difference textarea){background:#29251f;border-color:#bc893c;color:#ffe1b2}
html[data-theme=dark] .field-difference label{color:#ffd08b}
html[data-theme=dark] :is(.notice.blue,.orders-quick .selected){background:#1b3156;border-color:#4d71a5;color:#b6d1ff}
html[data-theme=dark] :is(.field-confirmed .field-review,.order-badge.green,.tag.entregado,.order-status.entregado){background:#153a32;color:#90e0bd;border-color:#337563}
html[data-theme=dark] :is(.order-badge.yellow,.tag.pendiente,.tag.aprobada,.order-status.pendiente,.mode-pill){background:#332916;color:#ffd38e;border-color:#806135}
html[data-theme=dark] :is(.order-badge.red,.tag.anulado,.order-status.anulado){background:#3d222d;color:#ffadb6;border-color:#864751}
html[data-theme=dark] :is(.order-badge.muted,.tag.retirada){background:#253248;color:#bdcbe0;border-color:#495c78}
html[data-theme=dark] .tag.programado{background:#1b3156;color:#b6d1ff}
html[data-theme=dark] .order-signal.red{color:#ffadb6}html[data-theme=dark] .order-signal.yellow{color:#ffd38e}
html[data-theme=dark] :is(.calendar-grid div,.calendar-grid .calendar-day,.supply-date){background:var(--night-bg);border-color:var(--night-line);color:var(--night-muted)}
html[data-theme=dark] :is(.calendar-grid .delivery,.calendar-grid .calendar-day.delivery,.supply-date.available){background:#1b3156;border-color:#4d71a5;color:#bad3ff}
html[data-theme=dark] .supply-date.exception{background:#3b2e17;border-color:#a57b35;color:#ffdc99}
html[data-theme=dark] details pre{background:var(--night-bg);color:var(--night-text)}
html[data-theme=dark] .brand img{background:white;border-radius:7px;padding:6px}
html[data-theme=dark] .theme-toggle{background:#203350;border-color:#425675;color:#ffd277}
html[data-theme=dark] .theme-toggle:hover{background:#304260;border-color:#ffab63}
html[data-theme=dark] .corporate-signature{color-scheme:light;background:white;color:#546b8b;border-color:#e0e7f0}html[data-theme=dark] .corporate-signature strong{color:#003594}
html[data-theme=dark] .premium-filter-details .filters{background:transparent}
}
@media(max-width:550px){.theme-toggle{width:32px;height:32px}.top-actions{gap:6px}}
@media(prefers-reduced-motion:reduce){.theme-toggle{transition:none}}
@media print{html{color-scheme:light}.theme-toggle{display:none!important}}
