/* App theme only: no layout changes, no filter/inversion, no email iframe styling. */
html[data-theme="dark"]{
  color-scheme:dark;
  --ui-surface:#131c27;--ui-soft:#1b2735;--ui-input:#101923;--ui-line:#3b4c60;
  --ui-ink:#edf3fa;--ui-muted:#b2c0d1;--ui-accent:#67e8f9;--ui-selected:#143d46;
  --ax-bg:#0e1621;--ax-card:var(--ui-surface);--ax-ink:var(--ui-ink);--ax-muted:var(--ui-muted);--ax-line:var(--ui-line);--ax-accent:var(--ui-accent);--ax-green:#6ee7b7;--ax-red:#fda4af;--ax-shadow:0 2px 12px #0002;
  --workspace-v148-bg:#0e1621;--workspace-v148-surface:var(--ui-surface);--workspace-v148-soft:var(--ui-soft);--workspace-v148-stripe:#172230;--workspace-v148-border:var(--ui-line);--workspace-v148-text:var(--ui-ink);--workspace-v148-muted:var(--ui-muted);
}
/* Set BOTH sides of the field contrast pair. Native selects follow the app, not OS mode. */
html[data-theme="dark"] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=hidden]):not([type=submit]):not([type=button]),textarea,select):not(:where(.marlaine-login-scene-v226 *)){
  background-color:var(--ui-input)!important;color:var(--ui-ink)!important;border-color:var(--ui-line)!important;caret-color:var(--ui-ink);color-scheme:dark;
}
html[data-theme="dark"] :is(input,textarea):not(:where(.marlaine-login-scene-v226 *))::placeholder{color:#a7b7ca!important;opacity:1;}
html[data-theme="dark"] :is(input,textarea,select):not(:where(.marlaine-login-scene-v226 *)):focus{border-color:#22d3ee!important;outline-color:#22d3ee;}
html[data-theme="dark"] :is(select option,select optgroup){background:#101923!important;color:#edf3fa!important;}
html[data-theme="dark"] :is(input,textarea,select):disabled{color:#a8b5c6!important;-webkit-text-fill-color:#a8b5c6;opacity:.8;}
html[data-theme="dark"] input:not(:where(.marlaine-login-scene-v226 *)):autofill{-webkit-text-fill-color:#edf3fa!important;box-shadow:0 0 0 1000px #172635 inset!important;}
html[data-theme="dark"] input::file-selector-button{background:#25364a;color:#edf3fa;border:1px solid #50647d;border-radius:5px;}
/* Shared utility text and neutral surfaces; semantic red/green/accent states remain distinct. */
html[data-theme="dark"] :is(.text-gray-950,.text-gray-900,.text-gray-800,.text-slate-950,.text-slate-900,.text-slate-800,.text-black){color:var(--ui-ink)!important;}
html[data-theme="dark"] :is(.text-gray-700,.text-gray-600,.text-gray-500,.text-slate-700,.text-slate-600,.text-slate-500){color:var(--ui-muted)!important;}
html[data-theme="dark"] :is(.text-gray-400,.text-slate-400){color:#a7b7ca!important;}
html[data-theme="dark"] #root :is(.bg-white,.bg-gray-50,.bg-slate-50):not(iframe):not(:where(.marlaine-login-scene-v226 *)){background-color:var(--ui-surface)!important;}
html[data-theme="dark"] #root :is(.bg-gray-100,.bg-gray-200,.bg-slate-100,.bg-slate-200):not(iframe){background-color:var(--ui-soft)!important;}
html[data-theme="dark"] #root :is(.border-gray-100,.border-gray-200,.border-gray-300,.border-slate-100,.border-slate-200){border-color:var(--ui-line)!important;}
html[data-theme="dark"] :is(.marlaine-sidebar-group:not(.is-open),.marlaine-sidebar-item:not(.is-active):not(.marlaine-sidebar-revenue)){color:#bccbdb!important;}
html[data-theme="dark"] :is(.marlaine-sidebar-group:not(.is-open),.marlaine-sidebar-item:not(.is-active)):hover{color:#f8fafc!important;}
/* Production and Mail API shared controls, header labels and tabs. */
html[data-theme="dark"] .production-workspace-v47{--production-ink-v47:var(--ui-ink);--production-muted-v47:var(--ui-muted);--production-accent-dark-v47:var(--ui-accent);--production-hover-v47:#213344;color:var(--ui-ink);}
html[data-theme="dark"] .production-send-page :is(h1,h2,h3,h4){color:var(--ui-ink)!important;}
html[data-theme="dark"] .production-send-page label{color:var(--ui-muted);}
html[data-theme="dark"] .production-mode-tabs-v47{background:var(--ui-soft)!important;border-color:var(--ui-line)!important;}
html[data-theme="dark"] .production-mode-tabs-v47>button{color:var(--ui-muted)!important;}
html[data-theme="dark"] .production-mode-tabs-v47>button.bg-white{background:var(--ui-selected)!important;color:var(--ui-accent)!important;}
html[data-theme="dark"] :is(.mailbox-offer-compact-v224,.mailbox-offer-advanced-v224,.mailbox-body-toolbar-v201){border-color:var(--ui-line)!important;}
html[data-theme="dark"] .mailbox-offer-advanced-v224 summary{color:var(--ui-ink);}
/* Clients & Data / Affiliate: complete palette for their shared independent workspace. */
html[data-theme="dark"] :is(.ax-main,.ax-shell){background:var(--ax-bg)!important;color:var(--ui-ink);border-color:var(--ui-line)!important;}
html[data-theme="dark"] :is(.ax-card,.ax-provider,.ax-data-item,.ax-list-console,.ax-modal,.ax-offer-picker-menu,.ax-suppression-offer-grid,.ax-selected-offer-list){background:var(--ui-surface)!important;color:var(--ui-ink);border-color:var(--ui-line)!important;}
html[data-theme="dark"] :is(.ax-head h1,.ax-section-head h2,.ax-provider h2,.ax-modal-head h2,.ax-suppression-data-head h3,.ax-offer-pick strong,.ax-selected-offer-row strong,.ax-empty b,.ax-offer-option strong){color:var(--ui-ink)!important;}
html[data-theme="dark"] :is(.ax-head p,.ax-section-head p,.ax-form-grid label,.ax-catalog-adds>label,.ax-suppression-form label,.ax-process-toolbar label,.ax-link-stack label,.ax-list-console-filter,.ax-offer-picker-field>span,.ax-country-display small,.ax-process-table td,.ax-list-pick b,.ax-offer-picker-toolbar>span){color:var(--ui-muted)!important;}
html[data-theme="dark"] :is(.ax-search,.ax-list-console-toolbar,.ax-process-toolbar,.ax-asset-toolbar,.ax-offer-picker-toolbar,.ax-data-tabs,.ax-check-list,.ax-add-link,.ax-offer-list-head){background:var(--ui-soft)!important;color:var(--ui-muted)!important;border-color:var(--ui-line)!important;}
html[data-theme="dark"] :is(.ax-btn:not(.primary):not(.success):not(.danger):not(.warning),.ax-icon-btn,.ax-offer-picker-toggle,.ax-modal-head button){background:var(--ui-soft)!important;color:var(--ui-ink)!important;border-color:var(--ui-line)!important;}
html[data-theme="dark"] .ax-btn.primary{background:#0e7490;border-color:#22d3ee;color:#fff;}
html[data-theme="dark"] :is(.ax-btn.success,.ax-status.on,.ax-policy.allow){background:#123c30!important;color:#8af0c8!important;border-color:#34765f!important;}
html[data-theme="dark"] :is(.ax-btn.danger,.ax-policy.block){background:#44202c!important;color:#ffbac7!important;border-color:#854356!important;}
html[data-theme="dark"] .ax-btn.warning{background:#422f16!important;color:#fcd89a!important;border-color:#876536!important;}
html[data-theme="dark"] .ax-status.off{background:#293241;color:#bfccdc;}
html[data-theme="dark"] .ax-data-tabs button{color:var(--ui-muted);}
html[data-theme="dark"] .ax-data-tabs button.active{background:var(--ui-selected);color:var(--ui-accent);border-color:#337384;}
html[data-theme="dark"] .ax-data-tabs button:hover{background:#25384a;color:#edf3fa;}
html[data-theme="dark"] :is(.ax-table th,.ax-list-console-table th){background:var(--ui-soft)!important;color:var(--ui-muted)!important;}
html[data-theme="dark"] .ax-table td{border-color:var(--ui-line)!important;color:var(--ui-ink);}
html[data-theme="dark"] :is(.ax-list-console-table tbody tr,.ax-selected-offer-row,.ax-offer-option,.ax-check-list>label,.ax-list-pick,.ax-offer-pick){background:var(--ui-surface)!important;border-color:var(--ui-line)!important;}
html[data-theme="dark"] :is(.ax-list-console-table tbody tr,.ax-selected-offer-row,.ax-offer-option,.ax-check-list>label):nth-child(even){background:#192534!important;}
html[data-theme="dark"] :is(.ax-table tbody tr,.ax-selected-offer-row,.ax-offer-option,.ax-check-list>label,.ax-list-pick,.ax-offer-pick):hover{background:#24364a!important;}
html[data-theme="dark"] :is(.ax-list-console-table tr:has(input:checked),.ax-offer-option.selected,.ax-selected-offer-row:has(input:checked),.ax-list-pick:has(input:checked),.ax-offer-pick:has(input:checked)){background:var(--ui-selected)!important;}
html[data-theme="dark"] :is(.ax-country-code,.ax-type,.ax-list-console-actions>strong,.ax-selected-offer-actions>strong){background:#173949;color:#9becff;}
html[data-theme="dark"] :is(.ax-offer-option small,.ax-offer-pick>em,.ax-selected-offer-row>b){color:#8ee8f7;}
html[data-theme="dark"] :is(.ax-list-console-table [data-list-empty],.ax-list-console-table [data-list-no-matches]){background:var(--ui-surface)!important;}
/* Mail API settings must obey the in-app switch even when the operating system is light. */
html[data-theme="dark"] :is(.mai-modal-v219,.mai-header-v219,.mai-modal-tabs-v219,.mai-card-v219,.mai-table-wrap-v219,.mai-confirm-v219){background:var(--ui-surface);color:var(--ui-ink);border-color:var(--ui-line);}
html[data-theme="dark"] :is(.mai-title-v219,.mai-email-v219,.mai-card-title-v219,.mai-confirm-v219 h3){color:var(--ui-ink);}
html[data-theme="dark"] :is(.mai-subtitle-v219,.mai-muted-v219,.mai-field-v219,.mai-confirm-v219 p,.mai-tab-v219){color:var(--ui-muted);}
html[data-theme="dark"] :is(.mai-btn-v219:not(.is-primary):not(.is-danger),.mai-icon-button-v219,.mai-settings-launch-v219){background:var(--ui-soft)!important;color:var(--ui-ink)!important;border-color:var(--ui-line)!important;}
html[data-theme="dark"] :is(.mai-panel-v219,.mai-status-v219,.mai-tab-v219.is-active){background:var(--ui-selected);color:#a5f3fc;border-color:#337384;}
html[data-theme="dark"] :is(.mai-status-v219.is-error,.mai-btn-v219.is-danger){background:#44202c;color:#ffbac7;border-color:#854356;}
html[data-theme="dark"] .mai-table-v219 th{background:var(--ui-soft);color:var(--ui-muted);}
html[data-theme="dark"] .mai-table-v219 td{color:var(--ui-ink);border-color:var(--ui-line);}
html[data-theme="dark"] .mai-table-v219 tr:hover td{background:#24364a;}
html[data-theme="dark"] .mai-empty-v219{background:var(--ui-soft);color:var(--ui-muted);border-color:var(--ui-line);}
/* Settings hover states and common table labels. */
html[data-theme="dark"] .marlaine-settings-view [data-marlaine-settings-nav=true]>button:hover{background:#25384a!important;color:#edf3fa!important;}
html[data-theme="dark"] .marlaine-settings-view [data-marlaine-settings-nav=true]>button.is-active{background:#173e32!important;color:#9af1cf!important;border-color:#34765f!important;}
html[data-theme="dark"] .settings-subtabs-v224 button:hover{background:#25384a;color:#edf3fa;}
html[data-theme="dark"] .settings-subtabs-v224 button[aria-selected=true]{background:#173e32;color:#9af1cf;}
html[data-theme="dark"] :is(.marlaine-data-table th,.settings-users-table-v224 th){color:var(--ui-muted)!important;}
/* Nested card interiors, selection tabs and shared list-system tokens. */
html[data-theme="dark"]{--marlaine-list-accent:#67e8f9;--marlaine-list-accent-soft:#143d46;--marlaine-list-border:#3b4c60;--marlaine-list-surface:#131c27;--marlaine-list-alt:#1b2735;--marlaine-list-hover:#24364a;--marlaine-list-muted:#b2c0d1;}
html[data-theme="dark"] .marlaine-management-page-v103{--management-accent:#67e8f9;--management-accent-strong:#a5f3fc;--management-accent-soft:#143d46;--management-border:#3b4c60;--management-surface:#131c27;--management-alt:#1b2735;--management-hover:#24364a;--management-muted:#b2c0d1;}
html[data-theme="dark"] :is(.ax-section-head,.ax-modal-head,.ax-provider-top,.ax-standard-list-head){background:var(--ui-soft)!important;border-color:var(--ui-line)!important;}
html[data-theme="dark"] :is(.ax-form-grid,.ax-catalog-adds,.ax-suppression-form,.ax-link-stack,.ax-modal-actions){background:var(--ui-surface)!important;color:var(--ui-ink);}
html[data-theme="dark"] :is(.ax-head>div>span,.ax-section-head span,.ax-provider-top span,.ax-modal-head span){color:var(--ui-accent)!important;}
html[data-theme="dark"] .ax-list-console-toolbar>[data-list-result-count]{color:var(--ui-muted);}
html[data-theme="dark"] #root .bg-white.dark\:text-black{color:var(--ui-ink)!important;}
html[data-theme="dark"] :is(.production-server-picker-head-v47>span,.production-pacing-head-v104 p,.production-pacing-fields-v104 span,.production-pacing-switch-v104>button){color:var(--ui-muted)!important;}
html[data-theme="dark"] :is(.production-pacing-switch-v104>button.is-active,.production-send-transport-v47>button.is-active){background:#0e7490!important;color:#fff!important;}
html[data-theme="dark"] .production-predefined-status-v47{background:var(--ui-soft);color:var(--ui-muted)!important;}
html[data-theme="dark"] .production-predefined-loaded-v47 .production-predefined-status-v47{background:#123c30;color:#8af0c8!important;}
html[data-theme="dark"] :is(.mailbox-sender-identity-v196 small,.mailbox-sender-quota-v196,.mailbox-sender-users-v196 p,.mailbox-placeholder-help-v200,.mailbox-placeholder-panel-head-v200 span,.mailbox-placeholder-mode-v200){color:var(--ui-muted)!important;}
html[data-theme="dark"] :is(.mailbox-placeholder-mode-v200.is-active,.mailbox-placeholder-tab-v200.is-active,.mailbox-body-tab-v201.is-active){color:var(--ui-accent)!important;background:var(--ui-selected)!important;}
html[data-theme="dark"] iframe[title^="Body "][title$=" preview"]{color-scheme:light;}
html[data-theme="dark"] :is(.production-top-transport-v53>button.is-active,.production-variant-tabs-v81>button[aria-selected=true],.production-pacing-switch-v104>button[aria-pressed=true]){background:#0e7490!important;color:#fff!important;}
html[data-theme="dark"] :is(.production-vmta-toolbar-v72>span,.mai-meta-v219){color:var(--ui-muted)!important;}
html[data-theme="dark"] summary[aria-label^="Help:"]>span[aria-hidden=true]{color:#a5f3fc!important;background:#164052!important;}
