/* Theme surfaces and text are paired explicitly. Document/PDF previews keep their own paper colours. */
.customer-site[data-customer-theme=dark] {
    --customer-bg:#191919;--sp-ink:#f4f4f4;--sp-muted:#c5c5c5;--sp-line:#4b4b4b;
    --sp-dark:#245685;--sp-surface:#252525;--sp-link:#a8d1ff;
    --sp-action-bg:#215b96;--sp-action-hover:#194879;--sp-action-text:#fff;--sp-focus:#9ccaff;
    --sp-disabled-bg:#394453;--sp-disabled-ink:#d0d8e4;
    background:#191919!important;color:#f4f4f4;color-scheme:dark;
}
.customer-site[data-customer-theme=dark] .sp-portal-frame {
    --sp-ink:#f4f4f4;--sp-muted:#c5c5c5;--sp-line:#4b4b4b;--sp-dark:#245685;--sp-surface:#252525;
    background:#191919!important;color:#f4f4f4!important;
}
.customer-site[data-customer-theme=dark] :is(
 .customer-header,.customer-footer,.customer-dialog,.customer-extra,.sp-reference-portal,.sp-exam-row,.sp-ref-card,
 .sp-atelier-card,.sp-checkout-dialog,.sp-receipt,.sp-receipt-card,.sp-product-main,.sp-product-aside,
 .sp-product-booking,.sp-product-text,.sp-product-media,.sp-product-choices label,.sp-product-resources,
 .sp-product-booking-unavailable,.sp-panel,.exam-content,.sp-portal-calendar,.sp-birth-picker,
 .sp-portal-empty,.sp-portal-feedback,.sp-exam-view,.sp-category-tabs,.sp-portal-pagination,
 .sp-portal-pagination a,.sp-portal-pagination span,.sp-language-options
) {background:#252525!important;color:#f4f4f4!important;border-color:#4b4b4b!important}
.customer-site[data-customer-theme=dark] :is(
 .sp-exam-filters,.sp-atelier-filters,.sp-product-hero,.sp-product-total,.sp-ref-price.is-main,.sp-product-notes,
 .sp-product-download,.sp-wizard-summary,.sp-bank-checkout-note,.sp-booking-appointment,.sp-variant-choice,
 .sp-portal-consent label,.sp-checkout-upload,.sp-language-note,.sp-exam-date,.sp-repeat-booking,
 .sp-product-page>.sp-product-text,.sp-product-page>.sp-exam-art
) {background:#2c2c2c!important;color:#f4f4f4!important;border-color:#556274!important}
.customer-site[data-customer-theme=dark] :is(.sp-wizard-actions,.sp-portal-consent){background:#252525!important;color:#f4f4f4!important;border-color:#4b4b4b!important}
.customer-site[data-customer-theme=dark] :is(.sp-atelier-card,.sp-ref-card,.sp-exam-row).is-unavailable{opacity:1!important;background:#202020!important}
.customer-site[data-customer-theme=dark] :is(.sp-atelier-card,.sp-ref-card,.sp-exam-row):hover{background:#2b2b2b!important}
.customer-site[data-customer-theme=dark] :is(
 .customer-logo,.customer-header button,.customer-menu-grid h2,.sp-atelier-heading :is(h1,h2),.sp-catalog-heading :is(h1,h2),
 .sp-atelier-date time>strong,.sp-atelier-date b,.sp-atelier-main>strong,.sp-product-deadline strong,
 .sp-product-layout h1,.sp-product-layout h2,.sp-product-layout h3,.sp-atelier-card :is(h2,h3),.sp-atelier-card :is(h2,h3) a
) {color:#f4f4f4!important}
.customer-site[data-customer-theme=dark] :is(
 .customer-address,.customer-partner small,.customer-footer-bottom,.customer-footer a,.customer-menu-grid a,
 .sp-atelier-heading>span,.sp-atelier-heading p,.sp-atelier-date small,.sp-atelier-meta,.sp-atelier-main>span,
 .sp-atelier-part>span,.sp-atelier-price>small,.sp-atelier-price del,.sp-atelier-card.is-unavailable .sp-atelier-status,
 .sp-exam-copy p,.sp-portal-reset-day,.sp-date-days>span,.sp-product-deadline,.sp-product-facts,.sp-product-description,
 .sp-checkout-dialog .sp-checkout-upload label span,.sp-checkout-remarks span,.sp-checkout-upload-note,.sp-checkout-id-hint
) {color:#c5c5c5!important}
.customer-site[data-customer-theme=dark] :is(.customer-menu-grid a,.customer-dialog-top,.customer-footer-bottom,.sp-atelier-card footer){border-color:#4b4b4b!important}
.customer-site[data-customer-theme=dark] :is(input,select,textarea){background:#1d1d1d!important;color:#f4f4f4!important;border-color:#727272!important;accent-color:#91c2ff}
.customer-site[data-customer-theme=dark] :is(input,textarea)::placeholder{color:#acb8c9!important;opacity:1}
.customer-site[data-customer-theme=dark] input::file-selector-button{background:#35465b!important;color:#f4f4f4!important;border-color:#727272!important}
.customer-site[data-customer-theme=dark] :is(.sp-variant-choice,.sp-product-choices label,.sp-portal-consent label):has(input:checked){background:#203d5a!important;color:#f4f4f4!important;border-color:#9bcaff!important;box-shadow:0 0 0 1px #9bcaff!important}
.customer-site[data-customer-theme=dark] :is(.sp-language-picker summary,.sp-language-options a,.sp-exam-view a,.sp-exam-months a,.sp-category-tabs a,.sp-birth-input button,.sp-date-days>button,.sp-exam-search button,.customer-dialog-top button,.sp-address-results button){background:#303030!important;color:#f4f4f4!important;border-color:#727272!important}
.customer-site[data-customer-theme=dark] :is(.sp-language-picker summary,.sp-language-options a,.sp-exam-months a,.sp-category-tabs a,.sp-birth-input button,.sp-date-days>button,.sp-address-results button):is(:hover,:focus-visible){background:#42536b!important;color:#fff!important}
.customer-site[data-customer-theme=dark] :is(.sp-language-options a[aria-current],.sp-exam-view a[aria-current],.sp-exam-months a[aria-current],.sp-category-tabs a[aria-current],.sp-portal-pagination [aria-current],.sp-portal-pagination>span,.sp-date-days>button[aria-current],.sp-portal-days a[aria-current]){background:#215b96!important;color:#fff!important;border-color:#91c2ff!important}
.customer-site[data-customer-theme=dark] .sp-date-days>button:disabled{background:#242a33!important;color:#9aa7ba!important;opacity:1}
.customer-site[data-customer-theme=dark] .sp-wizard-steps li{background:#303030!important;color:#d2dbe8!important}
.customer-site[data-customer-theme=dark] .sp-wizard-steps li[aria-current=step]{background:#215b96!important;color:#fff!important}
.customer-site[data-customer-theme=dark] .sp-wizard-steps li:not([aria-current=step]) button:hover{background:#42536b!important;color:#fff!important}
.customer-site[data-customer-theme=dark] .sp-wizard-steps button:focus-visible{outline-color:#9ccaff!important;box-shadow:none!important}
.customer-site[data-customer-theme=dark] :is(.sp-checkout-cancel,[data-sp-back],.sp-checkout-upload button,.sp-focus-suggestion a,.sp-portal-pagination a,.sp-ref-meta a,.sp-product-resources a,.sp-product-facts svg,.sp-product-resources svg,.sp-exam-metadata svg){color:#a8d1ff!important}
.customer-site[data-customer-theme=dark] :is(.sp-atelier-status,.sp-product-availability.is-open){color:#a6e1bb!important}
.customer-site[data-customer-theme=dark] :is(.sp-portal-status.is-open,.sp-focus-badge){background:#224532!important;color:#b5f0cd!important}
.customer-site[data-customer-theme=dark] :is(.sp-portal-status.is-closed,.sp-no-partial,.sp-language-error,.sp-portal-feedback.is-warning){background:#493b22!important;color:#ffe1a1!important;border-color:#9b7b42!important}
.customer-site[data-customer-theme=dark] .sp-portal-status.is-full{background:#502c37!important;color:#ffc3cf!important}
.customer-site[data-customer-theme=dark] .sp-focus-suggestion{background:#203d5a;color:#f4f4f4;border-color:#6f96bf}
.customer-site[data-customer-theme=dark] :is(.sp-ref-button,.sp-exam-cta,.sp-atelier-button,.sp-product-book-button,.sp-receipt-button):not(.is-disabled){background:#215b96!important;color:#fff!important;border-color:#397ac1!important}
.customer-site[data-customer-theme=dark] :is(.sp-ref-button,.sp-exam-cta,.sp-atelier-button,.sp-product-book-button,.sp-receipt-button):not(.is-disabled):is(:hover,:focus,:active){background:#194879!important;color:#fff!important}
.customer-site[data-customer-theme=dark] :is(.sp-ref-button,.sp-exam-cta,.sp-atelier-button).is-disabled{background:#394453!important;color:#d0d8e4!important;border-color:#727272!important;opacity:1}
.customer-site[data-customer-theme=dark] :is(a,button,input,textarea,select,summary):focus-visible{outline-color:#9ccaff!important}
.customer-site[data-customer-theme=dark] :is(dialog)::backdrop{background:#050a12bd}
@media(max-width:640px){
 .customer-header{flex-wrap:wrap;gap:10px}
 .customer-header .customer-logo{flex:1 1 130px}
 .customer-header .customer-theme-picker{margin:0;flex:0 0 auto}
 .customer-header .customer-theme-picker select{min-height:42px}
}

/* Admin uses separate link and action tokens: light links never become white-text button fills. */
html[data-admin-theme=dark]{--portal-bg:#191919;--portal-paper:#252525;--portal-ink:#f4f4f4;--portal-muted:#c5c5c5;--portal-line:#4b4b4b;--portal-red:#ffc0b8;--portal-red-soft:#50302f;--portal-action:#a33129;--portal-action-hover:#81271f;--office-dark:#244d78;--office-detail:#c5c5c5;--office-accent:#50302f;--office-tint:#191919;color-scheme:dark}
html[data-admin-theme=dark] .portal-app{--sp-bg:#191919;--sp-ink:#f4f4f4;--sp-muted:#c5c5c5;--sp-line:#4b4b4b;--sp-navy:#1b2f48;--sp-blue:#285a91;--mail-ink:#f4f4f4;--mail-blue:#acd2ff;--mail-line:#4b4b4b;--mail-canvas:#191919;--mail-rail:#252525;--mail-rail-active:#304c70;--mail-rail-text:#f4f4f4;--mail-rail-muted:#c5c5c5;--mail-selection:#304560;--mail-selected:#304560;--mail-primary:#a33129;--mail-action:#285a91;--mail-action-hover:#204872;--sp-wm-ink:#f4f4f4;--sp-wm-muted:#c5c5c5;--sp-wm-line:#4b4b4b;--sp-wm-bg:#191919;--sp-wm-blue:#acd2ff;--sp-wm-accent:#acd2ff;--sp-wm-primary:#a33129;--ticket-muted:#c5c5c5;--ticket-ink:#f4f4f4;--ticket-line:#4b4b4b}
html[data-admin-theme=dark] .portal-app :is(
 .portal-sidebar,.portal-topbar,.portal-card,.portal-section,.portal-metrics article,.portal-table,.portal-pagination,
 .portal-work-actions,.portal-customer-tabs a,.exam-content,.sp-panel,.sp-card,.sp-office-panel,.sp-workspace,
 .sp-header,.sp-bank-setup,.sp-builder-actions,.sp-field-row>summary,.sp-support-index,.sp-support-detail .sp-panel,
 .sp-support-toolbar,.sp-support-more>div,.sp-ticket-stats a,.sp-wm-mail-folders,.sp-wm-mail-panel,.sp-wm-mail-list-panel,
 .sp-wm-mailbox-panel,.sp-wm-mail-compose,.sp-wm-mail-link-dialog,.sp-wm-mail-sidebar,.sp-wm-mail-list-pager.is-footer,
 .sp-wm-mail-quick-settings,.sp-wm-mail-settings,.sp-wm-mail-dialog,.sp-wm-mail-search-panel
){background:#252525!important;color:#f4f4f4!important;border-color:#4b4b4b!important}
html[data-admin-theme=dark] .portal-app :is(.sp-app,.sp-office,.sp-main,.sp-wm-mail-client,.sp-wm-mail-topbar){color:#f4f4f4!important;background:transparent!important}
html[data-admin-theme=dark] .portal-app :is(h1,h2,h3,h4,.portal-brand,.portal-row-link){color:#f4f4f4!important}
html[data-admin-theme=dark] .portal-app :is(.portal-filters label,.portal-work-actions small,.sp-table small,.sp-analytics-status,.sp-field-preview,.sp-task-card p,.sp-cash-choice small,.sp-support-items small,.sp-support-items span){color:#c5c5c5!important}
html[data-admin-theme=dark] .portal-app :is(input,select,textarea){background:#1d1d1d!important;color:#f4f4f4!important;border-color:#727272!important;accent-color:#91c2ff}
html[data-admin-theme=dark] .portal-app :is(input,textarea)::placeholder{color:#acb8c9!important;opacity:1}
html[data-admin-theme=dark] .portal-app input::file-selector-button{background:#35465b;color:#f4f4f4;border-color:#727272}
html[data-admin-theme=dark] .portal-app :is(.portal-table th,.sp-table th,.sp-support-column-head){background:#303947!important;color:#d1dae7!important;border-color:#4b4b4b!important}
html[data-admin-theme=dark] .portal-app :is(.portal-table tr:hover,.sp-table tr:hover,.portal-sidebar a:hover,.portal-nav-group summary:hover,.portal-nav-group[open]>summary,.portal-note,.portal-initial,.portal-avatar,.sp-booking-summary,.sp-support-feedback,.sp-office-tabs,.sp-customer-appointments li,.sp-task-grid .sp-task-card){background:#303b4b!important;color:#f4f4f4!important;border-color:#526379!important}
html[data-admin-theme=dark] .portal-app :is(.portal-table tr.selected,.sp-wm-mail-row.is-selected,.sp-wm-mail-folder.is-active,.sp-wm-mail-row.is-unread){background:#304560!important;color:#f4f4f4!important}
html[data-admin-theme=dark] .portal-app :is(.portal-nav-group summary,.portal-nav-group[open]>summary) :is(span,svg){color:inherit!important}
html[data-admin-theme=dark] .portal-app :is(.portal-main .sp-office a,.sp-analytics-table a,.sp-task-card strong,.sp-office-tabs a){color:#acd2ff!important}
html[data-admin-theme=dark] .portal-app :is(.portal-button,.portal-main .sp-button,.portal-main .button,.portal-pagination a,.sp-wm-mail-client .button,.sp-plan-export,.portal-icon-button,.sp-wm-mail-icon-button){background:#313c4c!important;color:#f4f4f4!important;border-color:#727272!important;-webkit-text-fill-color:currentColor}
html[data-admin-theme=dark] .portal-app :is(.portal-button,.portal-main .sp-button,.portal-main .button,.portal-pagination a,.sp-wm-mail-client .button,.sp-plan-export):is(:hover,:focus-visible){background:#42536b!important;color:#fff!important}
html[data-admin-theme=dark] .portal-app :is(.portal-button.primary,.sp-button.sp-primary,.button-primary,.sp-plan-add,.portal-section button,.sp-wm-mail-compose-button,.sp-wm-mail-compose-new){background:var(--portal-action)!important;color:#fff!important;border-color:var(--portal-action)!important}
html[data-admin-theme=dark] .portal-app :is(.portal-button.primary,.sp-button.sp-primary,.button-primary,.sp-plan-add,.portal-section button,.sp-wm-mail-compose-button,.sp-wm-mail-compose-new):is(:hover,:focus,:active):not(:disabled){background:var(--portal-action-hover)!important;color:#fff!important;border-color:var(--portal-action-hover)!important}
html[data-admin-theme=dark] .portal-app :is(.portal-pagination a[aria-current],.portal-calendar-grid .selected-day,.sp-office-tabs a[aria-current],.sp-support-tabs a[aria-current],.sp-ticket-stats a[aria-current]){background:#285a91!important;color:#fff!important;border-color:#91c2ff!important}
html[data-admin-theme=dark] .portal-app :is(.portal-badge,.sp-status,.sp-level,.sp-support-state){background:#34445b!important;color:#d9e8ff!important}
html[data-admin-theme=dark] .portal-app :is(.portal-badge.success,.sp-status-paid,.sp-status-confirmed,.sp-support-state.is-closed){background:#224532!important;color:#b5f0cd!important}
html[data-admin-theme=dark] .portal-app :is(.portal-badge.danger,.sp-status-cancelled,.sp-error,.notice-error,.portal-notice.error,.sp-support-feedback[role=alert]){background:#502c37!important;color:#ffc3cf!important;border-color:#a56472!important}
html[data-admin-theme=dark] .portal-app :is(.sp-notice,.notice,.sp-dashboard-notification strong){background:#203d5a!important;color:#d7ebff!important;border-color:#6f96bf!important}
html[data-admin-theme=dark] .portal-app :is(.sp-customer-note,.sp-support .sp-ticket-note,.sp-removal details[open]){background:#493b22!important;color:#ffe1a1!important;border-color:#9b7b42!important}
html[data-admin-theme=dark] .portal-app :is(.sp-wm-mail-row,.sp-wm-mailbox-row){background:#252525!important;color:#f4f4f4!important;border-color:#4b4b4b!important}
html[data-admin-theme=dark] .portal-app :is(a,button,input,textarea,select,summary):focus-visible{outline:3px solid #9ccaff!important;outline-offset:3px}
html[data-admin-theme=dark] .portal-app button:disabled{opacity:1;background:#394453!important;color:#d0d8e4!important;border-color:#727272!important}
html[data-admin-theme=dark] .portal-app dialog{background:#252525;color:#f4f4f4;border-color:#4b4b4b}
html[data-admin-theme=dark] .portal-app dialog::backdrop{background:#050a12bd}
/* Mail content is an isolated document; its frame stays separate from the dark application UI. */
html[data-admin-theme=dark] .portal-app .portal-invoice-preview{background:#fff;color:#172033;color-scheme:light}
html[data-admin-theme=dark] .portal-app :is(.portal-notice,.sp-wm-mail-quick-panel,.sp-wm-mail-compose-options-panel,.sp-wm-mail-label-menu,.sp-wm-mailbox-offers,.sp-wm-section,.sp-wm-match){background:#2b384a!important;color:#f4f4f4!important;border-color:#596e88!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-app a:not(.sp-button):not(.button){color:#acd2ff!important}
html[data-admin-theme=dark] .portal-app .portal-invoice-preview :is(h1,h2,h3,p,strong,small,div){color:#172033!important}
html[data-admin-theme=dark] .portal-app .portal-invoice-total{background:#eef2f7!important;color:#172033!important}
html[data-admin-theme=dark] .portal-app .sp-wm-mailbox-text.is-html{background:#fff;color:#202124;color-scheme:light;--mail-blue:#0759a8;padding:18px;border-radius:8px}
html[data-admin-theme=dark] .portal-app .sp-wm-mailbox-text.is-html a:not([class]){color:#0759a8}
.customer-site[data-customer-theme=dark] .sp-product-layout{--sp-product-text:#f4f4f4;--sp-prod-muted:#c5c5c5;--sp-prod-rule:#4b4b4b;--sp-prod-accent:#ffc0b8;color:#f4f4f4}
.customer-site[data-customer-theme=dark] .sp-receipt{--receipt-ink:#f4f4f4;--receipt-muted:#c5c5c5;--receipt-line:#4b4b4b;--receipt-surface:#2c2c2c}
.customer-site[data-customer-theme=dark] fieldset{border-color:#556274}
.customer-site[data-customer-theme=dark] :is(.customer-logo img,.customer-footer img){background:#fff;padding:5px;border-radius:7px}
html[data-admin-theme=dark] .portal-app :is(
 .sp-wm-mail-toolbar,.sp-wm-mail-label-tabs,.sp-wm-mail-row-with-actions,.sp-wm-mail-selectable-row,
 .sp-wm-mail-compose-header,.sp-wm-mail-format-group,.sp-wm-mail-color-panel,.sp-wm-mail-format-options,
 .sp-wm-mail-selection-options,.sp-wm-mail-toolbar-popover>form,.sp-wm-mail-more-items,
 .sp-wm-mail-draft-dock,.sp-wm-mail-folder-menu,.sp-wm-mail-offer-picker form,.sp-wm-action-popover,
 .sp-wm-contacts,.sp-wm-metric,.sp-wm-mobile-nav,.sp-wm-mobile-links
){background:#2b3442!important;color:#f4f4f4!important;border-color:#526379!important}
html[data-admin-theme=dark] .portal-app :is(.sp-wm-mail-compose-recipient label,.sp-wm-mail-compose-line,.sp-wm-mail-compose-from,.sp-wm-mail-compose label){color:#c5c5c5!important;border-color:#4b4b4b!important}
html[data-admin-theme=dark] .portal-app :is(.sp-wm-mail-round-button,.sp-wm-mail-compose-attach,.sp-wm-mail-compose-tools summary,.sp-wm-mail-format-options button,.sp-wm-mail-folder-menu button){background:#313c4c!important;color:#f4f4f4!important;border-color:#727272!important}
html[data-admin-theme=dark] .portal-app :is(.sp-wm-mail-round-button,.sp-wm-mail-compose-attach,.sp-wm-mail-compose-tools summary,.sp-wm-mail-format-options button,.sp-wm-mail-folder-menu button):hover{background:#42536b!important;color:#fff!important}
html[data-admin-theme=dark] .portal-app :is(.sp-wm-mail-label-tabs a:hover,.sp-wm-mail-template-link:hover,.sp-wm-mail-folders nav a[aria-current=page] .sp-wm-icon){color:#f4f4f4!important;background:#304560!important}
html[data-admin-theme=dark] .portal-app :is(.tox .tox-editor-header,.tox .tox-toolbar,.tox .tox-toolbar__primary,.tox .tox-toolbar__overflow,.tox .tox-menubar,.tox .tox-statusbar,.tox .tox-menu,.tox .tox-collection__item){background:#2b3442!important;color:#f4f4f4!important;border-color:#526379!important}
html[data-admin-theme=dark] .portal-app :is(.tox .tox-tbtn,.tox .tox-mbtn,.tox .tox-statusbar__path-item,.tox .tox-statusbar__wordcount){color:#f4f4f4!important;background:transparent!important}
html[data-admin-theme=dark] .portal-app .tox .tox-tbtn svg{fill:#f4f4f4!important}
html[data-admin-theme=dark] .portal-app .sp-wm-mail-page-count{color:#c5c5c5!important}
@media(max-width:640px){
 .customer-site .customer-header{display:grid;grid-template-columns:minmax(76px,1fr) 72px 80px 32px;gap:6px;padding:12px;min-height:74px}
 .customer-header .customer-logo{min-width:0;max-width:100%}
 .customer-header .customer-logo img{max-width:100%;width:100%;height:44px}
 .customer-header .customer-logo strong{font-size:14px;overflow-wrap:anywhere}
 .customer-header .customer-theme-picker select{width:72px;max-width:72px;padding:5px;font-size:11px}
 .customer-site .customer-header .sp-language-bar{padding:0!important;width:80px}
 .customer-header .sp-language-picker summary{padding:7px 6px;gap:5px;font-size:12px}
 .customer-header .customer-menu-button{padding:4px;width:32px;min-width:0;font-size:22px!important}
}
/* Readable secondary text on pale surfaces in light mode as well. */
html:not([data-admin-theme=dark]){--portal-muted:#5b6573}
html:not([data-admin-theme=dark]) .portal-app :is(.breadcrumb-separator,.portal-calendar-grid .outside-month){color:#68717e}
.customer-site[data-customer-theme=light] :is(.customer-address,.customer-footer-bottom){color:#5c6b80}
html[data-admin-theme=dark] .portal-app :is(.sp-app,.sp-office){--sp-ink:#f4f4f4;--sp-muted:#c5c5c5;--sp-line:#4b4b4b;--sp-bg:#191919;--sp-blue:#285a91;--office-dark:#244d78;--office-tint:#191919}
html[data-admin-theme=dark] .portal-app :is(.sp-table,.widefat,.sp-product-layout-option,.sp-design-choice,.sp-directory-panel header){background:#252525!important;color:#f4f4f4!important;border-color:#4b4b4b!important}
html[data-admin-theme=dark] .portal-app :is(.sp-product-layout-option,.sp-design-choice):has(input:checked){background:#203d5a!important;border-color:#9bcaff!important;box-shadow:inset 0 0 0 1px #9bcaff!important}
html[data-admin-theme=dark] .portal-app :is(.sp-directory-empty,.sp-directory-count,.sp-directory-item summary small){color:#c5c5c5!important}
html[data-admin-theme=dark] .portal-app :is(.sp-directory-new summary,.sp-directory-edit){color:#acd2ff!important}
html[data-admin-theme=dark] .portal-app :is(.sp-directory-item summary:hover,.sp-directory-item[open] summary,.sp-directory-symbol){background:#304560!important;color:#f4f4f4!important}
.customer-site[data-customer-theme=dark] .sp-ref-date-copy>span{color:#9ddde0!important}
.customer-site[data-customer-theme=dark] .sp-design-kalender .sp-portal-list{background:#252525!important}
/* Native disclosure with labelled SVG choices; no icon-only meaning for assistive technology. */
.sp-theme-picker{position:relative;z-index:45;margin:0}
.sp-theme-picker>summary{display:grid;place-items:center;list-style:none;width:44px;min-width:44px;height:44px;padding:9px;border:1px solid #b7c1cf;border-radius:50%;background:#f4f5f8;color:#344054;cursor:pointer}
.sp-theme-picker>summary::-webkit-details-marker{display:none}
.sp-theme-picker svg{width:23px;height:23px;vertical-align:middle;flex-shrink:0}
.sp-theme-picker [hidden]{display:none!important}
.sp-theme-options{position:absolute;inset-inline-end:0;top:calc(100% + 8px);display:grid;gap:5px;min-width:180px;padding:8px;border:1px solid #b7c1cf;border-radius:12px;background:#fff;color:#172033;box-shadow:0 10px 35px #17203326}
.sp-theme-options button{display:flex!important;align-items:center;gap:12px;width:100%;min-height:44px;padding:10px!important;border:1px solid transparent!important;border-radius:8px!important;background:#f4f5f8!important;color:#172033!important;font:inherit!important;text-align:start;cursor:pointer}
.sp-theme-options button[aria-pressed=true]{background:#dce9fa!important;border-color:#3167a5!important;font-weight:700!important}
.sp-theme-check{margin-inline-start:auto;visibility:hidden}.sp-theme-options button[aria-pressed=true] .sp-theme-check{visibility:visible}
.sp-theme-options button:hover{background:#e1e8f0!important}
:is(.customer-site[data-customer-theme=dark],html[data-admin-theme=dark] .portal-app) .sp-theme-picker :is(summary,.sp-theme-options){background:#252525!important;color:#f4f4f4!important;border-color:#727272!important}
:is(.customer-site[data-customer-theme=dark],html[data-admin-theme=dark] .portal-app) .sp-theme-options button{background:#313c4c!important;color:#f4f4f4!important}
:is(.customer-site[data-customer-theme=dark],html[data-admin-theme=dark] .portal-app) .sp-theme-options button:is(:hover,[aria-pressed=true]){background:#244f7b!important;border-color:#9ccaff!important;color:#fff!important}
@media(max-width:640px){.customer-site .customer-header{grid-template-columns:minmax(76px,1fr) 44px 80px 44px}.customer-header .customer-menu-button{width:44px;height:44px}.customer-header .customer-theme-picker{width:44px}}

/* Neutral dark Webmail, following the supplied inbox reference. */
html[data-admin-theme=dark] .portal-app:has(.sp-wm-mail-client){--portal-bg:#111111;--portal-paper:#202020;--portal-line:#444746}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client{--mail-ink:#e3e3e3;--mail-blue:#c2e7ff;--mail-line:#414141;--mail-canvas:#111111;--mail-rail:#111111;--mail-rail-active:#555555;--mail-rail-text:#e3e3e3;--mail-rail-muted:#b8b8b8;--mail-selection:#454545;--mail-selected:#454545;--mail-action:#d3e3fd;--mail-action-hover:#c2d7f5;--sp-wm-ink:#e3e3e3;--sp-wm-muted:#b8b8b8;--sp-wm-line:#414141;background:#111111!important;color:#e3e3e3!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client :is(.sp-wm-mail-topbar,.sp-wm-mail-heading,.sp-wm-mail-folders,.sp-wm-mail-workspace){background:#111111!important;color:#e3e3e3!important;border-color:#414141!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client :is(.sp-wm-mail-panel,.sp-wm-mail-list-panel,.sp-wm-mailbox-panel,.sp-wm-mail-toolbar,.sp-wm-mail-label-tabs,.sp-wm-mail-list-pager,.sp-wm-mail-list-heading){background:#2b2b2b!important;color:#e3e3e3!important;border-color:#414141!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mail-list-panel{border-radius:20px;overflow:hidden}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client a:not(.sp-button):not(.button){color:#c4c7c5!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mailbox-list :is(.sp-wm-mailbox-row,.sp-wm-mail-selectable-row,.sp-wm-mail-row-with-actions){background:#151515!important;color:#b9bbba!important;border-color:#3d3d3d!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mailbox-list .sp-wm-mailbox-row :is(.sp-wm-mailbox-from,.sp-wm-mailbox-subject,.sp-wm-mailbox-date){color:#b9bbba!important;font-weight:400}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mailbox-list .sp-wm-mail-selectable-row:has(.is-unread),html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mailbox-list .sp-wm-mailbox-row.is-unread{background:#2b2b2b!important;color:#f1f3f4!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mailbox-list .sp-wm-mailbox-row.is-unread :is(.sp-wm-mailbox-from,.sp-wm-mailbox-subject,.sp-wm-mailbox-date){color:#f1f3f4!important;font-weight:700}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mailbox-list .sp-wm-mail-selectable-row:is(:hover,:focus-within),html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mailbox-list .sp-wm-mail-selectable-row:is(:hover,:focus-within) .sp-wm-mailbox-row{background:#383838!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mailbox-list .sp-wm-mail-selectable-row:has(:checked,[aria-current=true]),html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mailbox-list .sp-wm-mail-selectable-row:has(:checked,[aria-current=true]) .sp-wm-mailbox-row{background:#454545!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client :is(.sp-wm-mail-round-button,.sp-wm-mail-icon-button,.sp-wm-mail-star-form button){background:transparent!important;color:#b8b8b8!important;border-color:transparent!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client :is(.sp-wm-mail-round-button,.sp-wm-mail-icon-button):hover{background:#505050!important;color:#fff!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mail-star-form button[aria-pressed=true]{color:#fdd663!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mail-folders nav a[aria-current=page]{background:#555!important;color:#fff!important;font-weight:700;border-radius:0 100px 100px 0}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mail-folders nav a[aria-current=page] .sp-wm-icon{color:#fff!important;background:transparent!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mail-folders a.sp-wm-mail-compose-link{background:#fff!important;color:#4b5055!important;border-color:#fff!important;border-radius:20px;min-height:56px}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mail-folders a.sp-wm-mail-compose-link:is(:hover,:focus){background:#e3e3e3!important;color:#30343a!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mail-search-field{background:#444746!important;color:#e3e3e3!important;border-radius:100px;padding-inline:12px}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mail-search-field input{background:transparent!important;border:0!important;color:#f1f3f4!important;outline:none!important;box-shadow:none!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mail-search-field:focus-within{outline:3px solid #c2e7ff;outline-offset:2px}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mail-search-field input::placeholder{color:#d5d7d6!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client :is(.sp-wm-mail-file-chip,.sp-wm-mail-label-chip){background:transparent!important;color:#d5d7d6!important;border:1px solid #606363!important;border-radius:100px}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client :is(.sp-wm-mail-quick-panel,.sp-wm-mail-quick-settings,.sp-wm-mail-settings,.sp-wm-mail-compose,.sp-wm-mail-compose-header,.sp-wm-mail-compose-line,.sp-wm-mail-compose-recipient label,.sp-wm-mail-format-group,.sp-wm-mail-format-options,.sp-wm-mail-selection-options,.sp-wm-mail-folder-menu,.sp-wm-mail-draft-dock,.sp-wm-mail-more-items){background:#292a2d!important;color:#e3e3e3!important;border-color:#5f6368!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client :is(.sp-wm-mail-compose-body,.sp-wm-mailbox-text:not(.is-html)){background:#202124!important;color:#e3e3e3!important;border-color:#5f6368!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client :is(.sp-wm-mail-compose button[type=submit],.sp-wm-mail-compose-new){background:#c2e7ff!important;color:#062e47!important;border-color:#c2e7ff!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mail-count{background:transparent!important;color:#e3e3e3!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mail-search-field .button{background:transparent!important;color:#e3e3e3!important;border:0!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client button:disabled{background:#3c4043!important;color:#b8b8b8!important;border-color:#5f6368!important}
html[data-admin-theme=dark] .portal-app:has(.sp-wm-mail-client) :is(.portal-sidebar,.portal-topbar,.portal-main){background:#111!important;border-color:#383838!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mail-search-field{min-height:44px}
/* Received HTML remains a light document with readable original content. */
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mailbox-text.is-html a:not(.sp-button):not(.button){color:#0759a8!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mailbox-text.is-html :is(h1,h2,h3,h4):not([style]){color:#202124!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .button:not(.button-primary){background:#333638!important;color:#e3e3e3!important;border-color:#606367!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .button:not(.button-primary):hover{background:#505050!important;color:#fff!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mail-search-field .button:not(.button-primary){background:transparent!important;border:0!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mail-row-select{display:flex!important;align-items:center;justify-content:center;min-height:44px;margin:0;padding:0}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mail-row-select>span{display:none!important}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mail-row-select>input[type=checkbox]{position:static!important;opacity:1!important;width:24px;height:24px;min-width:24px;min-height:24px;margin:0;accent-color:#c2e7ff}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mail-star-form{display:flex;align-items:center;justify-content:center;margin:0;padding:0}
html[data-admin-theme=dark] .portal-app .portal-main .sp-wm-mail-client .sp-wm-mail-row-select>input[type=checkbox]{width:24px!important;height:24px!important;max-width:24px!important;max-height:24px!important;flex:0 0 24px}

/* Isolated received mail owns its readable document palette. */
html[data-admin-theme] .portal-app .portal-main .sp-wm-mail-client [data-mail-document-host].sp-wm-mailbox-text.is-html{padding:0!important;background:transparent!important;border-radius:10px;overflow:hidden;color:inherit!important}
.sp-wm-mail-original-choice{display:flex;align-items:center;gap:8px;margin:12px 0;font-size:13px}
.sp-wm-mail-folders a[data-mail-folder-link]{min-width:0}
.sp-wm-mail-folders a[data-mail-folder-link]>span:not(.sp-wm-mail-count){flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;word-break:normal;overflow-wrap:normal}
.sp-wm-mail-folders .sp-wm-mail-count{flex:0 0 auto}
/* Saturated red accents; readable text and filled actions use distinct tokens. */
html[data-admin-theme=dark]{--portal-red:#ff4d4f;--portal-red-soft:#442020;--portal-action:#c62828;--portal-action-hover:#a51d1d}
html[data-admin-theme=dark] .portal-app .brand-square{background:#e53935}
html[data-admin-theme=dark] .portal-app .portal-sidebar a[aria-current=page]{background:#b3261e!important;color:#fff!important}
html[data-admin-theme=dark] .portal-app .portal-sidebar a[aria-current=page] svg{color:#fff!important}
html[data-admin-theme=dark] .portal-app .portal-task-count{background:#b3261e!important;color:#fff!important}
html[data-admin-theme=dark] .portal-app .portal-nav-group[open]>summary{background:#303030!important;color:#f4f4f4!important}
html[data-admin-theme=dark] .portal-app :is(.portal-badge.danger,.sp-status-cancelled,.sp-error,.notice-error,.portal-notice.error){background:#4a1b1b!important;color:#fff!important;border-color:#e53935!important}
.customer-site[data-customer-theme=dark] .sp-product-layout{--sp-prod-accent:#ff4d4f}

html[data-admin-theme=dark] .portal-app .portal-bars>div{background:transparent!important}html[data-admin-theme=dark] .portal-app .portal-bars :is(strong,small){background:transparent!important;color:#e3e3e3!important}
