/* Explicit surfaces and foreground pairs; no inversion filters. */
html[data-theme="dark"] .request-snapshot{background:#20384a;border-color:#4c738d}
html[data-theme="dark"] .request-snapshot dt{color:#b8cede}
html[data-theme="dark"] .request-snapshot dd{color:#e5edf6}
html[data-theme="dark"] .sales-review-summary{background:#213b50;border-color:#4c718a}
html[data-theme="dark"] .sales-review-summary span{color:#c0d3e3}
html[data-theme="dark"] .layout .message-review{background:#1d373e;border-color:#4c7e87}
html[data-theme="dark"] .layout .message-review h4{color:#c5e9ef}
html[data-theme="dark"] .layout .message-review li span{color:#efd1a6}
html[data-theme="dark"] .import-report-table{border-color:#526b83}
html[data-theme="dark"] .import-report-table th{background:#233b53;color:#d0e4f5}
html[data-theme="dark"] .import-report-table td{color:#e5edf6;border-color:#526b83}
html[data-theme="dark"] .import-report-filters .btn[aria-pressed="true"]{background:#31594f;color:#d0f3e4;border-color:#79b9a8}
.theme-toggle {display:inline-flex;align-items:center;justify-content:center;gap:8px;flex-shrink:0;min-height:38px;padding:8px 12px;border:1px solid #b7cbdf;border-radius:20px;background:#edf4fb;color:#294f77;font-size:12px;font-weight:650;cursor:pointer}
.theme-toggle>span:first-child {font-size:19px;line-height:1}
.theme-toggle:hover {background:#dceaf7}
.theme-toggle:focus-visible {outline:3px solid #25858f;outline-offset:3px}
.layout .topbar .theme-toggle {margin-left:auto}
.layout .topbar .theme-toggle+.pill {margin-left:0}
.login-panel>.theme-toggle {align-self:flex-end}
html[data-theme="dark"] {color-scheme:dark;--ink:#e5edf6;--sub:#b3c4d6;--surface:#19293b;--raised:#203349;--edge:#3c5269;--line:#3c5269;--muted:#b3c4d6;background:#0e1927;color:var(--ink)}
html[data-theme="dark"] body {background:#0e1927;color:var(--ink)}
html[data-theme="dark"] .layout {--line:#3c5269;--muted:#b3c4d6;background:radial-gradient(ellipse at 100% 0,#172e43,transparent 60%),#0e1927;color:var(--ink)}
html[data-theme="dark"] .layout :is(h1,h2,h3,h4,h5,strong,label,td) {color:var(--ink)}
html[data-theme="dark"] :is(.layout,dialog,.login-panel) :is(p,small,time,.subtitle,.cell-muted,.dash-note,.dash-scope,.workspace-user,.form-field,.page-footer,.table-footer) {color:var(--sub)}
html[data-theme="dark"] .layout .sidebar {background:linear-gradient(160deg,#152b42,#101e30);border-color:var(--edge)}
html[data-theme="dark"] .layout .topbar {background:#132235f5;border-color:var(--edge)}
html[data-theme="dark"] .breadcrumb {color:var(--sub)}
html[data-theme="dark"] .layout .page-heading {border-color:var(--edge)}
html[data-theme="dark"] .layout :is(.eyebrow,.dash-panel-title>span,.shortcut-link) {color:#ff9eb3}
html[data-theme="dark"] .layout :is(.workspace-user,.live-notice,.live-table,.dash-panel,.team-member,.panel,.kpi,.team-card,.campaign-card,.template-card,.workspace-shortcuts a,.live-metrics article) {background:var(--surface);border-color:var(--edge);box-shadow:0 5px 18px #00000018}
html[data-theme="dark"] .layout :is(.live-notice,.team-member) {border-top-color:#6ba7cf}
html[data-theme="dark"] .layout #audience-panel {background:linear-gradient(120deg,#173638,#19293b 65%);border-top-color:#59bbb2}
html[data-theme="dark"] .layout :is(#audience-load,.dash-filters,.template-apply,.records-summary,.campaign-editor,.dash-lab,.permission-note,.info-banner,.form-note,.note-item,.template-preview,.import-box,.bot-transcript) {background:var(--raised);border-color:var(--edge);color:var(--sub)}
html[data-theme="dark"] .layout :is(.records-summary strong,.campaign-editor summary,.team-member summary,.cell-details summary,.text-link,.request-info>summary) {color:#9ed9ef}
html[data-theme="dark"] .layout :is(.live-table-heading,.table-footer) {background:#203349;border-color:var(--edge)}
html[data-theme="dark"] .layout :is(.live-table th,#campaign-detail th,.data-table th) {background:#233b53;color:#c4d9eb;border-color:var(--edge)}
html[data-theme="dark"] .layout :is(.live-table td,#campaign-detail td,.data-table td,.dash-task,.campaign-steps li,.dash-panel-title,.team-stats) {border-color:#34495f}
html[data-theme="dark"] .layout :is(.live-table tbody tr:nth-child(even),#campaign-detail tbody tr:nth-child(even)) {background:#1d3044}
html[data-theme="dark"] .layout :is(.live-table tbody tr:hover,#campaign-detail tbody tr:hover) {background:#29435d}
html[data-theme="dark"] .layout :is(.section-empty,.empty-symbol,.shortcut-icon,.icon-square) {background:#20374c;color:#afd6ee;border-color:var(--edge)}
html[data-theme="dark"] .layout :is(.dash-kpi,.campaign-metrics article,.dash-flow li) {background:linear-gradient(135deg,#233c54,#19293b);border-color:#5f96bd}
html[data-theme="dark"] .layout :is(.dash-kpi:nth-child(2),.dash-flow li:nth-child(2),.campaign-metrics article:nth-child(3)) {background:linear-gradient(135deg,#203f3f,#19293b);border-color:#4d9d8f}
html[data-theme="dark"] .layout :is(.dash-kpi:nth-child(3),.dash-flow li:nth-child(3)) {background:linear-gradient(135deg,#37334c,#19293b);border-color:#9a83bf}
html[data-theme="dark"] .layout :is(.dash-kpi:nth-child(4),.dash-flow li:nth-child(4),.campaign-metrics article:nth-child(2)) {background:linear-gradient(135deg,#40362e,#19293b);border-color:#bd976c}
html[data-theme="dark"] .layout :is(.dash-kpi>span,.campaign-metrics article>span,.campaign-metrics em,.live-metrics article>span) {color:#c4d5e5}
html[data-theme="dark"] .layout :is(.dash-kpi>strong,.live-metrics strong,.campaign-metrics strong,.dash-lab strong) {color:#edf6ff}
html[data-theme="dark"] .layout :is(.dash-task strong,.step-number) {background:#2b465f;color:#d5eaff}
html[data-theme="dark"] .layout :is(.campaign-delivery,.watch-banner,.form-note) {background:#3b3223;border-color:#927344;color:#f0d4a4}
html[data-theme="dark"] .layout :is(.campaign-delivery,.watch-banner,.form-note) :is(p,small,li,h4) {color:#f0d4a4}
html[data-theme="dark"] .layout :is(.pill,.record-status) {background:#293e55;border-color:#49627d;color:#d0e1f2}
html[data-theme="dark"] .layout :is(.pill.blue,.record-status.blue) {background:#223f65;border-color:#4a6c99;color:#bcdcff}
html[data-theme="dark"] .layout :is(.pill.green,.record-status.positive,.complete .step-number,.complete .step-state) {background:#214638;border-color:#4e806d;color:#b4ecd3;box-shadow:none}
html[data-theme="dark"] .layout :is(.pill.red,.record-status.negative) {background:#502b38;border-color:#986072;color:#ffc0cf}
html[data-theme="dark"] .layout :is(.pill.amber,.pill.orange) {background:#493a22;border-color:#8e7545;color:#f6d795}
html[data-theme="dark"] :is(.layout,dialog,.login-panel) :is(input,select,textarea) {background:#102033!important;color:#e5edf6!important;border-color:#526b83!important;caret-color:#c5e9ff;box-shadow:none}
html[data-theme="dark"] :is(input,textarea)::placeholder {color:#a4b8cc;opacity:1}
html[data-theme="dark"] select option {background:#102033;color:#e5edf6}
html[data-theme="dark"] input[type="checkbox"] {accent-color:#6bc6b3}
html[data-theme="dark"] :is(.layout,dialog) .btn {background:#294059;border-color:#56718c;color:#e0edfa}
html[data-theme="dark"] :is(.layout,dialog) .btn.secondary {background:#294059;border-color:#56718c;color:#d2e8fc}
html[data-theme="dark"] :is(.layout,dialog) .btn:hover:not(:disabled) {background:#365673;border-color:#83a8c7}
html[data-theme="dark"] :is(.layout,dialog) .btn.primary,html[data-theme="dark"] .login-card .btn.primary {background:#ae2346;border-color:#ed7693;color:#fff}
html[data-theme="dark"] :is(.layout,dialog) .btn.primary:hover:not(:disabled) {background:#c32b52}
html[data-theme="dark"] .layout #view-campaign {background:#146b70;color:#fff;border-color:#6cbcbf}
html[data-theme="dark"] .theme-toggle {background:#2a4059;border-color:#6886a3;color:#e0edfa}
html[data-theme="dark"] .theme-toggle[aria-pressed="true"] {box-shadow:inset 0 0 0 1px #99cbd8}
html[data-theme="dark"] :is(button,a,input,select,textarea,summary):focus-visible {outline:3px solid #79d7d2;outline-offset:3px}
html[data-theme="dark"] dialog {background:#19293b;color:#e5edf6;border-color:#526b83}
html[data-theme="dark"] dialog :is(h2,h3,label,dd) {color:#e5edf6}
html[data-theme="dark"] dialog :is(.dialog-header,.import-box,.form-note,.live-metrics article,.note-item) {background:#23384e;color:#c9deef;border-color:#526b83}
html[data-theme="dark"] dialog .btn {box-shadow:none}
html[data-theme="dark"] :is(.login-panel,.login-card) {background:#152538;color:#e5edf6}
html[data-theme="dark"] .login-panel :is(h2,.eyebrow,.demo-link) {color:#d0e4f7}
html[data-theme="dark"] .login-mark {background:#502b38;color:#ffc0cf}
html[data-theme="dark"] .login-card #login-message {color:#f0ce96}
/* Chat: incoming slate, outgoing petroleum, readable receipts and metadata. */
html[data-theme="dark"] .layout :is(#inbox-root,.inbox-sidebar,#inbox-details,.inbox-status,.chat-toolbar) {background:#172a38;border-color:#405565;color:#e1edf3}
html[data-theme="dark"] .layout :is(.chat-heading,.chat-compose,#inbox-chat>.inbox-empty) {background:#213542;border-color:#405565;color:#c0d0d8}
html[data-theme="dark"] .layout :is(.inbox-status span,.inbox-status small,.chat-heading small,.chat-list-text small,.chat-list-meta,.chat-compose>small,#inbox-details h4) {color:#b6cbd5}
html[data-theme="dark"] .layout .inbox-grid button {background:#243c49;color:#dcebf0;border-color:#496272}
html[data-theme="dark"] .layout .inbox-item {border-bottom-color:#344b59!important}
html[data-theme="dark"] .layout .inbox-item.selected {background:#315463;box-shadow:inset 3px 0 #79d7c7}
html[data-theme="dark"] .layout .inbox-item:hover {background:#2b4756}
html[data-theme="dark"] .layout .chat-avatar {background:#30544e;color:#ceeee2}
html[data-theme="dark"] .layout .chat-list-text span {color:#edc8a4}
html[data-theme="dark"] .layout #inbox-chat .chat-messages {background-color:#0d202a;background-image:radial-gradient(#7199aa25 .8px,transparent .8px)}
html[data-theme="dark"] .layout #inbox-chat {background:#0d202a}
html[data-theme="dark"] .layout .chat-bubble {background:#283e4c;color:#e6f1f5}
html[data-theme="dark"] .layout :is(.chat-bubble.bot,.chat-bubble.advisor) {background:#17534c}
html[data-theme="dark"] .layout .chat-bubble p {color:#e6f1f5}
html[data-theme="dark"] .layout .chat-bubble strong {color:#a5e8d4}
html[data-theme="dark"] .layout .chat-bubble small {color:#b9d2d5}
html[data-theme="dark"] .layout #inbox-send>.btn {background:#14796c;color:#fff;border:1px solid #5db6a7}
html[data-theme="dark"] .layout #bot-notice {background:#3b3223;color:#f0d4a4}
html[data-theme="dark"] .layout #campaign-detail td .live-notice,html[data-theme="dark"] .layout #template-live-preview .live-notice {background:#1d3b37;border-color:#4b786f}
html[data-theme="dark"] .layout :is(.bot-transcript article,.bubble,.sale-card) {background:#243b51;color:#e5edf6}
html[data-theme="dark"] .layout .live-table td:first-child {color:#e5edf6}
html[data-theme="dark"] .layout #inbox-chat>.inbox-empty h2 {color:#e1edf3}
html[data-theme="dark"] .layout #inbox-details h4 {color:#b6cbd5}
html[data-theme="dark"] .layout .message-receipt {color:#bdd2da}
html[data-theme="dark"] .layout .message-receipt.read {color:#72d6ff}
html[data-theme="dark"] .layout .message-receipt.failed {color:#ffb2c2}
html[data-theme="dark"] .layout .receipt-legend {color:#c1d7d0}
html[data-theme="dark"] .layout .chat-list-meta b {background:#14715f;color:#fff}
html[data-theme="dark"] :is(.layout,dialog,.login-card) .btn:disabled,
html[data-theme="dark"] .layout .inbox-grid button:disabled {opacity:1;background:#283646;border-color:#45566a;color:#b1bdca;box-shadow:none;cursor:not-allowed}
html[data-theme="dark"] dialog #import-message {color:#f0d4a4}
html[data-theme="dark"] .layout .commercial-filters button[aria-pressed="true"] {background:#31594f;color:#d0f3e4;border-color:#79b9a8}
html[data-theme="dark"] .layout .linked-request {background:#203e39;border-color:#4c7a6d}
html[data-theme="dark"] .layout .linked-request h4 {color:#b4ead5!important}
html[data-theme="dark"] .layout .linked-request>button {background:#2b4e46;color:#d0f3e4}
@media(max-width:760px) {.theme-toggle{padding:7px 10px;font-size:11px;min-height:38px}.layout .topbar{gap:8px}.layout .topbar>.pill{font-size:10px}}
