/* Theme controls share the always-visible language area. */
.header-preferences{display:flex;align-items:center;gap:12px;flex-shrink:0}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:46px;padding:9px 12px;border:1px solid var(--line);border-radius:9px;background:var(--paper);color:var(--ink);font-size:14px;font-weight:600;white-space:nowrap}
.theme-toggle:hover{background:var(--light)}
.theme-toggle svg{width:19px;height:19px}
:root[data-theme=light]{color-scheme:light}
:root[data-theme=dark]{color-scheme:dark;--bg:#000;--paper:#111;--ink:#f5f5f5;--muted:#aeb7c8;--line:#393939;--blue:#91b4ff;--green:var(--blue);--light:#202b42;--lime:#202b42;--red:#ff9fa9}
[data-theme=dark] body{background:#000}
[data-theme=dark] .header,[data-theme=dark] .print-sheet,[data-theme=dark] .file-row,[data-theme=dark] .card,[data-theme=dark] .settings-panel,[data-theme=dark] .order-ticket,[data-theme=dark] .queue-empty,[data-theme=dark] .document-workspace,[data-theme=dark] .order-specification,[data-theme=dark] dialog{background:var(--paper)}
[data-theme=dark] .language{background:#000}
[data-theme=dark] .language .selected,[data-theme=dark] .queue-tab.selected{background:#202b42;color:var(--blue);box-shadow:none}
[data-theme=dark] .brand-icon,[data-theme=dark] .primary,[data-theme=dark] .dropzone:not(.has-files) .upload-cta,[data-theme=dark] .timeline .done b,[data-theme=dark] .queue-tab.selected span{background:#2454d6;border-color:#2454d6;color:#fff}
[data-theme=dark] .primary:hover:not(:disabled),[data-theme=dark] .dropzone:not(.has-files):hover .upload-cta{background:#315fe3;border-color:#315fe3}
[data-theme=dark] .dropzone{background:#101521;border-color:#536998}
[data-theme=dark] .dropzone:hover,[data-theme=dark] .dropzone.drag{background:#17233b;border-color:#91b4ff}
[data-theme=dark] .upload-symbol{background:#1a253b;border-color:#43587f;box-shadow:4px 4px 0 #2b3a57}
[data-theme=dark] .has-files .upload-symbol{background:transparent;box-shadow:none}
[data-theme=dark] .input,[data-theme=dark] .segmented button,[data-theme=dark] .secondary,[data-theme=dark] .document-tab,[data-theme=dark] .preview-open,[data-theme=dark] .pdf-page-toolbar{background:#1b1b1b;color:var(--ink)}
[data-theme=dark] .input,[data-theme=dark] .copies-control,[data-theme=dark] .segmented,[data-theme=dark] .segmented button+button{border-color:#525252}
[data-theme=dark] .input::placeholder{color:#9ca6b9}
[data-theme=dark] .secondary:hover{background:#292929}
[data-theme=dark] .segmented .selected,[data-theme=dark] .document-tab.selected{background:var(--light);color:var(--blue)}
[data-theme=dark] .document-tab.selected{border-color:#7699e0}
[data-theme=dark] .queue-tab span{background:#2b2b2b;color:var(--muted)}
[data-theme=dark] .notice{background:#14223c;border-color:#3c5686;color:#d5e3ff}
[data-theme=dark] .error{background:#351b21;border-color:#79404a;color:#ffb8bf}
[data-theme=dark] .danger{color:var(--red);border-color:#79404a}
[data-theme=dark] .pill{background:#3b2a11;color:#ffd28b}
[data-theme=dark] .pill.approved,[data-theme=dark] .pill.printing{background:#1b2c52;color:#b4cdff}
[data-theme=dark] .pill.submitted{background:#133541;color:#a3deee}
[data-theme=dark] .pill.completed{background:#123724;color:#9be0b8}
[data-theme=dark] .pill.rejected,[data-theme=dark] .pill.failed,[data-theme=dark] .pill.needs_review{background:#3d1d24;color:#ffb3bc}
[data-theme=dark] .pill.cancelled,[data-theme=dark] .pill.draft{background:#282b32;color:#c4cada}
[data-theme=dark] .manual-tag,[data-theme=dark] .manual-notice{background:#332811;color:#f5d393;border-color:#715933}
[data-theme=dark] .connection-pill.offline{color:#edc583}
[data-theme=dark] .connection-dot{background:#edb44f}
[data-theme=dark] .connection-pill.online .connection-dot{background:#6bd79d}
[data-theme=dark] .order-ticket.needs-attention{border-inline-start-color:#e6a34f}
[data-theme=dark] .customer-note{border-inline-start-color:#6989cd}
[data-theme=dark] .document-preview{background:#242424}
/* Paper is an accurate preview of the printed page, in either interface theme. */
[data-theme=dark] .image-preview img,[data-theme=dark] .pdf-page-canvas,[data-theme=dark] .pdf-preview{background:#fff;color:#111;color-scheme:light}
[data-theme=dark] .selected-file-thumb,[data-theme=dark] .customer-preview-image,[data-theme=dark] .image-editor-canvas{background:#fff;color-scheme:light}
[data-theme=dark] .customer-preview-stage,[data-theme=dark] .image-editor-stage{background:#242424}
[data-theme=dark] .customer-preview-toolbar,[data-theme=dark] .image-editor-header,[data-theme=dark] .image-editor-controls,[data-theme=dark] .image-editor-footer{background:var(--paper)}
[data-theme=dark] .selected-file-edited{color:var(--blue);background:var(--light)}
[data-theme=dark] .toast{background:#e9edf5;color:#17274a}
[data-theme=dark] dialog::backdrop{background:#000b}
[data-theme=dark] button:focus-visible,[data-theme=dark] a:focus-visible,[data-theme=dark] input:focus-visible,[data-theme=dark] textarea:focus-visible,[data-theme=dark] summary:focus-visible,[data-theme=dark] select:focus-visible,[data-theme=dark] .dropzone:focus-visible{outline-color:#a8c3ff}
@media(max-width:1000px){.header{gap:16px}.header-preferences{gap:8px}.theme-toggle{padding-inline:10px}}
@media(max-width:800px){.header-preferences{order:3;margin-inline-start:auto}.header-preferences .language{order:initial;margin:0}.theme-toggle{min-height:47px}}
@media(max-width:520px){.header-preferences{width:100%;margin:0;flex-wrap:wrap;gap:9px}.header-preferences .language{flex:1;min-width:230px;width:auto}.header-preferences .language button{font-size:13px;padding-inline:7px}.theme-toggle{font-size:12px;padding-inline:9px;flex:0 0 auto}.theme-toggle svg{width:17px;height:17px}.header-preferences .theme-toggle{margin-inline-start:auto}}
@media(max-width:360px){.header-preferences .language{min-width:100%;width:100%}.header-preferences .theme-toggle{min-height:44px}}
