:root{--surface-raised:#fff;--surface-soft:#f7f3f8;--theme-success-bg:#eaf7ef;--theme-success-text:#216643;--theme-warning-bg:#fff4de;--theme-warning-text:#805a22;--theme-error-bg:#fff0f3;--theme-error-text:#a8264d;--skeleton-base:#eee8f0;--skeleton-highlight:#faf7fb;color-scheme:light}
.theme-settings{padding:4px 20px 18px}
.theme-settings>span{display:block;font-size:12px;font-weight:500;color:var(--muted);margin-bottom:9px}
.theme-options{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:4px;background:var(--surface-soft);border:1px solid var(--line);border-radius:13px}
.theme-options button{display:flex;gap:7px;align-items:center;justify-content:center;min-height:44px;border:0;border-radius:9px;background:transparent;color:var(--muted);font:inherit;font-size:13px;cursor:pointer}
.theme-options button[aria-pressed=true]{background:var(--surface-raised);color:var(--pink-dark);box-shadow:0 2px 7px #321f3c0c}
.theme-options svg{width:18px;height:18px;flex:none}
.theme-options button:focus-visible,.theme-toggle:focus-visible{outline:3px solid var(--pink);outline-offset:3px}
.theme-toggle{display:block;width:100%;min-height:44px;padding:10px;border:1px solid var(--line);border-radius:11px;background:var(--surface-raised);color:var(--muted);font:inherit;font-size:12px;text-align:center;cursor:pointer}

html[data-theme=dark]{
  --ink:#f3eaf8;--muted:#b7a7c2;--line:#3b2e45;--canvas:#17131c;--white:#241d2b;
  --surface-raised:#241d2b;--surface-soft:#2d2435;--pink:#f05a91;--pink-dark:#ff91b8;--pink-soft:#3c2638;--green:#91dcb7;
  --shadow:0 6px 22px #00000018;--theme-success-bg:#1b382e;--theme-success-text:#a0e4bf;--theme-warning-bg:#40321e;--theme-warning-text:#f3d294;--theme-error-bg:#422530;--theme-error-text:#ffacc7;
  --skeleton-base:#322838;--skeleton-highlight:#44354c;background:var(--canvas);color:var(--ink);color-scheme:dark;
}
html[data-theme=dark] body{background:var(--canvas);color:var(--ink)}
html[data-theme=dark] :is(.app-layout,.workspace,.boot,.login-screen,.login-panel){background:var(--canvas);color:var(--ink)}
html[data-theme=dark] :is(.sidebar,.topbar,.card,.stat-card,.mobile-nav,.mobile-account-trigger,.mobile-account-option,.mobile-more-dialog,.mobile-more-header,.mobile-account-dialog,.mobile-account-dialog-header,.pwa-install-guide,.order-bulk-bar,.aw-intro,.aw-panel,.aw-account,.ig-panel,.ig-item,.cx-panel,.cx-event,.cx-dialog,.cx-last-result,.cx-toolbar,.tw-panel){background:var(--surface-raised);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(#order-dialog,.document-reminder,.document-reminder-header,.document-reminder-footer,.dialog-header,.parcel-sheet,.parcel-sheet-header,.parcel-sheet-footer){background:var(--surface-raised);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(.section-heading,.tabs,.order-row,.order-selection-tools,.mobile-account-dialog-footer,.pwa-menu-actions,.sidebar-user,.pwa-desktop-actions,.day-row,.agenda-footer,.detail-section,.detail-recipient,.info-pair,.wallet-row,.account-controls,.account-proxy,.database-export,.database-import,.pool-filters,.control-table td,.control-table th,.manager-accounts,.ig-item,.aw-account-footer,.aw-health>div,.aw-toolbar,.cx-event-head,.cx-event-foot,.cx-pagination){border-color:var(--line)}
html[data-theme=dark] :is(.topbar .icon-button,.mobile-more-close,.mobile-account-dialog-header .icon-button,.search-field,.mobile-account-search,.slot-editor,.parcel-detail,.login-return,.profile-session,.agenda-presets,.account-panel,.onboarding-validation,.manager-accounts,.document-reminder-items li,.document-reminder-item-icon,.document-reminder-body .onboarding-card,.aw-stats>div,.aw-edit,.ig-code,.ig-empty,.cx-detail,.cx-result-list li,.cx-transfer>div,.cx-filter-foot,.control-table th,.mobile-account-dialog-footer){background:var(--surface-soft);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .welcome-banner{background:linear-gradient(115deg,#382532,#352a25);border-color:#523343;color:var(--ink)}
html[data-theme=dark] .welcome-banner :is(h2,p,.orders-mobile-quick-title,.orders-mobile-quick-subtitle){color:var(--ink)}
html[data-theme=dark] :is(.sidebar-note,.login-story){background:#34252d;border-color:#513440;color:#e7c9d5}
html[data-theme=dark] .login-story:after{background:#472d36}
html[data-theme=dark] :is(h1,h2,h3,h4){color:var(--ink)}
html[data-theme=dark] :is(.muted,.page-heading .muted,.section-heading .muted,.sidebar-label,.sidebar-user span,.account-email,.topbar-label,.today,.order-number,.order-date,.order-date small,.order-view,.order-selection-hint,.order-bulk-bar p,.mobile-account-option small,.mobile-account-assigned small,.mobile-account-trigger small,.mobile-account-note,.mobile-account-empty,.pwa-menu-actions p,.pwa-install-guide p,.aw-intro span:not(.aw-intro-icon),.aw-identity p,.aw-health dt,.aw-health small,.aw-account-footer p,.aw-list-count,.aw-ungrouped,.aw-empty p,.ig-intro p,.ig-panel-heading p,.ig-item small,.cx-intro p,.cx-stat span,.cx-event-meta,.cx-event-meta time,.cx-actor,.cx-replay-help,.cx-detail-meta dt,.cx-list-heading p,.cx-list-heading>span,.info-pair dt,.timeline span,.profile-hero p,.wallet-row small,.balance-card p,.detail-recipient p,.story-content>p,.story-foot,.login-note,.login-bottom,.login-return p,.sidebar-note p,.proxy-help,.file-name,.pool-file-row label,.signup-field-help,.signup-intro p,.document-reminder-intro>p,.document-reminder-items small,.document-reminder-footer p,.document-reminder-account>span,.onboarding-document-heading p,.onboarding-file-name,.onboarding-file-details,.onboarding-validation p,.preset-help,.preset-heading p,.agenda-footer>p,.unavailable){color:var(--muted)}
html[data-theme=dark] :is(.order-person strong,.stat-card strong,.stat-card>span>span,.info-pair dd,.profile-accounts>label,.account-controls>label,.profile-session h2,.proxy-account-heading h3,.colissimo-account-heading>strong,.control-table td,.control-table td>strong,.control-table th,.database-export h3,.database-import h3,.user-form-grid label,.pool-filters>label,.proxy-pool-form>label,.file-input-label,.preset-fields>label,.day-label strong,.week-picker strong,.document-reminder-header h2,.document-reminder-items strong,.document-reminder-account>strong,.aw-health dd,.aw-identity h2,.aw-list-count strong,.ig-item h3,.cx-event-heading>strong,.cx-stat strong,.cx-detail-meta dd){color:var(--ink)}
html[data-theme=dark] :is(.eyebrow,.mini-tag,.text-button,.banner-link,.account-controls .add-account,.signup-back,.cx-create-task){color:var(--pink-dark)}
html[data-theme=dark] :is(#app,#scan-test,dialog) :is(input:not([type=checkbox]):not([type=radio]),textarea,select){background:#1d1723;color:var(--ink);border-color:#51405e}
html[data-theme=dark] :is(#app,dialog) :is(.search-field,.mobile-account-search) input{background:transparent;border-color:transparent}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#9987a5;opacity:1}
html[data-theme=dark] :is(input,textarea,select):focus-visible{outline-color:#f580aa}
html[data-theme=dark] :is(.secondary,.subtle,.aw-edit-button,.aw-star,.cx-button,.cx-icon-button,.parcel-choice,.order-refuse-button){background:var(--surface-soft);color:var(--ink);border-color:#51405e}
html[data-theme=dark] :is(.button.primary,.scan-cta,.import-button,.cx-button.primary){background:#dc3e78;color:#fff;border-color:#dc3e78}
html[data-theme=dark] :is(.button.primary,.scan-cta):hover:not(:disabled){background:#eb518b}
html[data-theme=dark] :is(.secondary,.subtle,.cx-button,.parcel-choice,.icon-button):hover:not(:disabled){background:#3c2d45;color:var(--ink)}
html[data-theme=dark] :is(.nav-link,.mobile-nav>.nav-link,.mobile-more-links a,.tab,.mobile-account-trigger){color:var(--muted)}
html[data-theme=dark] :is(.nav-link.active,.mobile-nav>.nav-link.active,.mobile-more-links a.active,.mobile-account-option[aria-pressed=true],.order-row.is-selected,.stat-card.selected,.tab.active,.aw-star.is-favorite,.order-scan-button,.aw-intro-icon,.small-pink-icon,.avatar,.aw-avatar,.aw-group-tag,.parcel-symbol){background:var(--pink-soft);color:var(--pink-dark);border-color:#70435b}
html[data-theme=dark] :is(.nav-link:hover,.order-main:hover,.order-row.is-selected .order-main:hover,.mobile-account-option:hover){background:#302334}
html[data-theme=dark] :is(.mobile-more-links a,.order-main){border-color:var(--line)}
html[data-theme=dark] :is(.order-selection-tools,.order-bulk-issues li,.aw-progress,.colissimo-progress,.pool-counts>span,.preset-result){background:var(--surface-soft);color:var(--muted);border-color:var(--line)}
html[data-theme=dark] :is(.order-bulk-issues li p,.error-state,.form-error,.module-error,.aw-account-error,.aw-error-text,.cx-inline-error,.cx-load-error,.event-state.failed,.event-state.error,.status.cancelled,.parcel-status.cancelled,.ig-error){background:var(--theme-error-bg);color:var(--theme-error-text);border-color:#794154}
html[data-theme=dark] :is(.notice,.reset-result,.event-state.success,.aw-badge.aw-ok,.status.delivered,.parcel-status.delivered,.connection-badge){background:var(--theme-success-bg);color:var(--theme-success-text);border-color:#35604b}
html[data-theme=dark] :is(.notice.warning,.event-state.pending,.aw-badge.aw-unknown,.status.coming,.parcel-status.coming,.connection-badge[data-network=offline],.pwa-offline-banner,.module-notice){background:var(--theme-warning-bg);color:var(--theme-warning-text);border-color:#705633}
html[data-theme=dark] :is(.status.atHome,.parcel-status.atHome,.document-status,.pill){background:var(--pink-soft);color:var(--pink-dark);border-color:#70435b}
html[data-theme=dark] :is(.document-reminder-items .document-reminder-rejected,.document-reminder-intro .document-reminder-busy){background:var(--theme-warning-bg);color:var(--theme-warning-text);border-color:#705633}
html[data-theme=dark] .document-reminder-rejected :is(strong,small){color:var(--theme-warning-text)}
html[data-theme=dark] :is(.carrier-logo,.carrier-fallback){background:#fff;border-radius:5px;padding:3px;color:#47384f}
html[data-theme=dark] :is(.order-skeleton .skeleton,.skeleton){background-color:var(--skeleton-base);background-image:linear-gradient(100deg,var(--skeleton-base) 30%,var(--skeleton-highlight) 50%,var(--skeleton-base) 70%)}
html[data-theme=dark] .toast{background:#f1e7f6;color:#302235}
html[data-theme=dark] .theme-toggle:hover{background:var(--surface-soft)}
html[data-theme=dark] :is(.order-select-all,.order-select-all strong,.order-select){color:var(--ink)}
html[data-theme=dark] :is(.order-select-all,.order-select) input{accent-color:#f77da7;color-scheme:dark}
html[data-theme=dark] .parcel-status.cancelled{background:#332941;color:#d1bce4;border-color:#564165}

/* Scanner markup brings its own style block; these selectors also cover its test host. */
html[data-theme=dark] :is(#scan-root,#scan-test) .pm-scan{color:var(--ink)}
html[data-theme=dark] :is(#scan-root,#scan-test) :is(.pm-card,.pm-bulk-dialog,.pm-bulk-dialog-header,.pm-bulk-dialog .pm-actions,.pm-stage-action){background:var(--surface-raised);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(#scan-root,#scan-test) .pm-scan .pm-bulk-dialog-header .pm-dialog-close{background:var(--surface-soft);color:var(--ink)}
html[data-theme=dark] :is(#scan-root,#scan-test) :is(.pm-workbench,.pm-flow,.pm-entry-modes,.pm-preparation,.pm-selection-details,.pm-secondary,.pm-code,.pm-signature-footer,.pm-remove-queued,.pm-bulk-file,.pm-outcome-summary,.pm-result-filter,.pm-bulk-summary span){background:var(--surface-soft);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(#scan-root,#scan-test) :is(.pm-flow button,.pm-entry-modes button){color:var(--muted);background:transparent}
html[data-theme=dark] :is(#scan-root,#scan-test) :is(.pm-flow button[aria-pressed=true],.pm-entry-modes button[aria-pressed=true],.pm-result-filter[aria-pressed=true],.pm-result-filter button[aria-pressed=true]){background:var(--pink-soft);color:var(--pink-dark);border-color:#70435b}
html[data-theme=dark] :is(#scan-root,#scan-test) :is(.pm-primary,.pm-bulk-submit){background:#dc3e78;color:#fff;border-color:#dc3e78}
html[data-theme=dark] :is(#scan-root,#scan-test) :is(.pm-help,.pm-intro,.pm-draft-storage,.pm-account small,.pm-count,.pm-label,.pm-progress,.pm-steps,.pm-parcels small,.pm-bulk-review,.pm-empty-queue){color:var(--muted)}
html[data-theme=dark] :is(#scan-root,#scan-test) :is(.pm-check,.pm-preparation>summary,.pm-selection-details>summary,.pm-parcels strong,.pm-complete-heading){color:var(--ink)}
html[data-theme=dark] :is(#scan-root,#scan-test) .pm-steps [aria-current=step]{color:var(--pink-dark)}
html[data-theme=dark] :is(#scan-root,#scan-test) .pm-steps li[aria-current=step] button{background:var(--pink-soft);color:var(--pink-dark)}
html[data-theme=dark] :is(#scan-root,#scan-test) .pm-steps b{background:var(--surface-soft);border-color:var(--line)}
html[data-theme=dark] :is(#scan-root,#scan-test) .pm-steps [aria-current=step] b{background:var(--pink-soft);border-color:#70435b}
html[data-theme=dark] :is(#scan-root,#scan-test) :is(.pm-feedback,.pm-complete-heading span){background:var(--pink-soft);color:var(--pink-dark);border-color:#e0608b}
html[data-theme=dark] :is(#scan-root,#scan-test) :is(.pm-good,.pm-pill,.pm-bulk-summary .pm-valid-count){background:var(--theme-success-bg);color:var(--theme-success-text)}
html[data-theme=dark] :is(#scan-root,#scan-test) :is(.pm-note,.pm-running,.pm-draft,.pm-bulk-summary .pm-warning-count){background:var(--theme-warning-bg);color:var(--theme-warning-text);border-color:#705633}
html[data-theme=dark] :is(#scan-root,#scan-test) :is(.pm-error,.pm-failed,.pm-invalid .pm-pill,.pm-bulk-summary .pm-invalid-count){background:var(--theme-error-bg);color:var(--theme-error-text);border-color:#794154}
html[data-theme=dark] :is(#scan-root,#scan-test) :is(.pm-camera,.pm-batch-status,.pm-parcels li,.pm-bulk-preview){border-color:var(--line)}
/* Scan codes and handwriting keep their actual printable colors. */
html[data-theme=dark] :is(#scan-root,#scan-test) :is(.pm-barcode,.pm-qr,.pm-signature){background:#fff;color:#352333;border-color:#66526d}
html[data-theme=dark] :is(#scan-root,#scan-test) .pm-barcode .pm-help{color:#786f7a}
html[data-theme=dark] :is(#scan-root,#scan-test) :is(.pm-stage-action-note,.pm-outcome-summary p){color:var(--muted)}
html[data-theme=dark] :is(#scan-root,#scan-test) .pm-outcome-summary{background:var(--theme-success-bg);color:var(--theme-success-text)}
html[data-theme=dark] :is(#scan-root,#scan-test) .pm-outcome-summary.pm-outcome-partial{background:var(--theme-warning-bg);color:var(--theme-warning-text)}
html[data-theme=dark] :is(#scan-root,#scan-test) .pm-result-filter button{background:var(--surface-soft);color:var(--muted);border-color:var(--line)}
html[data-theme=dark] :is(#scan-root,#scan-test) .pm-result-filter button[aria-pressed=true]{background:var(--pink-soft);color:var(--pink-dark);border-color:#70435b}
html[data-theme=dark] :is(#scan-root,#scan-test) .pm-result-filter span{background:var(--surface-raised);color:var(--ink)}
@media(prefers-reduced-motion:reduce){.skeleton{animation:none!important}}
