/* Shared portal palettes. The brand green stays the same in both modes. */
html[data-theme]{--em:#00bb7f;--ink-1:var(--ink);--popup:var(--bg-raise);--gray-series:#a1a1aa}
html[data-theme="dark"]{color-scheme:dark;--bg:#050807;--bg-raise:#121916;--surface:#101713;--surface-2:#1b2520;--line:#42544a;--line-soft:#2d3c33;--ink:#f5faf7;--ink-2:#d0dbd4;--ink-3:#acbcb2;--em-bright:#34d399;--em-dim:#103426;--em-line:#287552;--blue:#93c5fd;--amber:#fcd56c;--rose:#ff7595;--rose-dim:#3b1822;--chrome:rgba(5,8,7,.96);--field:#121916;--placeholder:#acbcb2;--provider-openai:#fed7aa;--provider-eleven:#a5ceff}
html[data-theme="light"]{color-scheme:light;--bg:#f2f7f4;--bg-raise:#ffffff;--surface:#ffffff;--surface-2:#e8f0eb;--line:#8ca497;--line-soft:#c1d1c7;--ink:#14291e;--ink-2:#304c3c;--ink-3:#496453;--em-bright:#006842;--em-dim:#dcf4e7;--em-line:#6b9d82;--blue:#174e9d;--amber:#805600;--rose:#a9193f;--rose-dim:#fbe5eb;--chrome:rgba(247,251,248,.97);--field:#ffffff;--placeholder:#536e5d;--provider-openai:#87400c;--provider-eleven:#174e9d;--gray-series:#52685c}
html[data-theme] .side,html[data-theme] .topbar{background:var(--chrome)}
html[data-theme] :is(.modal,.toast,.chart-tip,.conversation-drawer,.crm-joined-popup){background:var(--popup);color:var(--ink)}
html[data-theme] .crm-conversation-pane{background:transparent}
html[data-theme] :is(input,select,textarea){background-color:var(--field);color:var(--ink);border-color:var(--line)}
html[data-theme] :is(input,textarea)::placeholder{color:var(--placeholder);opacity:1}
html[data-theme] select option{background:var(--field);color:var(--ink)}
html[data-theme] :is(.embed-code,.test-conversation .chat){background:var(--surface-2)}
html[data-theme] .tag.provider-openai{color:var(--provider-openai)}
html[data-theme] .tag.provider-elevenlabs{color:var(--provider-eleven)}
html[data-theme] :is(.btn:disabled,input:disabled,select:disabled,textarea:disabled){opacity:1;color:var(--ink-3);background:var(--surface-2);border-color:var(--line-soft);cursor:not-allowed}
html[data-theme] .test-start{background:var(--em);color:#052e25}
html[data-theme] :is(a,button,input,select,textarea,summary):focus-visible{outline:3px solid var(--em-bright);outline-offset:3px}
html[data-theme] .theme-toggle{white-space:nowrap;min-height:36px;letter-spacing:normal;font-family:var(--sans);font-size:13px;opacity:1}
.side .theme-toggle{margin-top:14px;width:100%}
.theme-floating{position:fixed;right:18px;top:16px;z-index:65;background:var(--bg-raise)!important;box-shadow:0 2px 12px #0002}
html[data-theme="light"] body::before{background:radial-gradient(900px 480px at 78% -10%,rgba(0,187,127,.07),transparent 65%)}
html[data-theme="light"] :is(.modal,.toast,.crm-joined-popup){box-shadow:0 15px 50px rgba(24,63,41,.18)}
html[data-theme="light"] [style*="background:rgba(0,0,0,.28)"]{background:var(--surface-2)!important}
/* Text inside inactive plugin cards remains readable, with state shown by its label. */
html[data-theme] .card[style*="opacity:.5"],html[data-theme] .card[style*="opacity:0.5"]{opacity:1!important;background:var(--surface-2)}
@media(max-width:760px){.theme-toggle{margin:4px 0}.theme-floating{right:10px;top:10px}}
html[data-theme]{--raise:var(--bg-raise);--surface2:var(--surface-2);--ink2:var(--ink-2);--ink3:var(--ink-3);--embr:var(--em-bright)}
html[data-theme] :is(.kicker,.svc .tech){color:var(--em-bright)}
html[data-theme] .mail{background:var(--bg-raise)}
html[data-theme] :is(span.mono[style*="opacity"],details[style*="opacity"],table.data tr[style*="opacity"]){opacity:1!important}
html[data-theme="light"]{--line:#789383}
html[data-theme="dark"]{--line:#60776a}
html[data-theme] .d-box{fill:var(--surface-2);stroke:var(--line)}
html[data-theme] .d-label{fill:var(--ink)}
html[data-theme] :is(.d-sub,.d-note){fill:var(--ink-3)}
html[data-theme] .d-edge:not(.em){stroke:var(--line)}
