/* NodexaBot UI Themes — v5.21.0. Scoped to index.html dashboards, not OBS overlays. */
/* Theme selection controls: available in all three themes. */
.theme-switch-btn{
  display:inline-flex;gap:9px;align-items:center;justify-content:center;
  height:36px;padding:0 12px;color:#c3cad6;background:#151924;
  border:1px solid #313949;border-radius:9px;font:600 12px/1 Inter,system-ui,sans-serif;
  cursor:pointer;white-space:nowrap;transition:background .16s,border-color .16s;
}
.theme-switch-btn:hover{background:#202737;border-color:#4a556d;color:#fff}
.theme-switch-btn:focus-visible,.theme-dialog-close:focus-visible,.theme-choice:focus-visible,.theme-dialog-done:focus-visible{outline:3px solid #8395ff;outline-offset:2px}
.theme-icon{font-size:17px;line-height:1}
.nodexa-theme-dialog{
  width:min(610px,calc(100% - 28px));max-height:min(720px,calc(100dvh - 40px));
  padding:0;border:1px solid #313c4d;border-radius:18px;background:#18212f;
  color:#e9eef9;box-shadow:0 28px 95px #0008;overflow:auto;color-scheme:dark;
}
.nodexa-theme-dialog::backdrop{background:rgba(3,8,18,.72);backdrop-filter:blur(6px)}
.theme-dialog-header{display:flex;align-items:flex-start;gap:18px;padding:26px 28px 18px;border-bottom:1px solid #344255}
.theme-dialog-header>div{flex:1}
.theme-dialog-kicker{font-size:10px;letter-spacing:.12em;font-weight:750;color:#8297bc}
.theme-dialog-header h2{font:750 23px/1.2 Inter,system-ui,sans-serif;letter-spacing:-.6px;margin:6px 0 8px}
.theme-dialog-header p{font:400 13px/1.55 Inter,system-ui,sans-serif;color:#abb8c9;margin:0}
.theme-dialog-close{width:34px;height:34px;flex:none;border:1px solid #3a4658;background:#252f40;color:#d1d9e6;border-radius:9px;cursor:pointer;font-size:13px}
.theme-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:22px 24px}
.theme-choice{display:flex;flex-direction:column;gap:9px;align-items:stretch;min-width:0;border:1px solid #344255;border-radius:13px;background:#1c2737;color:inherit;padding:10px;cursor:pointer;text-align:left;transition:border-color .16s,background .16s}
.theme-choice:hover{background:#243044;border-color:#657992}
.theme-choice.is-selected{border:2px solid #6e89ef;padding:9px;background:#222e44}
.theme-choice-title{display:flex;align-items:center;flex-wrap:wrap;gap:6px;font-size:13px}
.theme-choice-title strong{font-weight:750;letter-spacing:-.15px}
.theme-choice-title>span{background:#274475;color:#c1d5ff;border-radius:4px;padding:3px 5px;font-size:9px;font-weight:700}
.theme-choice small{font-size:11px;line-height:1.5;color:#a8b7c7}
.theme-preview{height:94px;display:flex;border-radius:8px;overflow:hidden;position:relative;border:1px solid rgba(130,150,176,.27)}
.theme-preview i{width:27%;height:100%;background:var(--sample-sidebar);border-right:1px solid var(--sample-border)}
.theme-preview b{flex:1;display:flex;flex-direction:column;gap:8px;padding:12px;background:var(--sample-bg)}
.theme-preview b em{height:15px;border-radius:4px;display:block;background:var(--sample-card);border:1px solid var(--sample-border)}
.theme-preview b em:first-child{width:73%;height:8px;background:var(--sample-accent);border:none}
.theme-preview-dark{--sample-sidebar:#171f2c;--sample-bg:#101722;--sample-card:#202b3b;--sample-accent:#7283ee;--sample-border:#354256}
.theme-preview-light{--sample-sidebar:#fff;--sample-bg:#f2f5fa;--sample-card:#fff;--sample-accent:#6475db;--sample-border:#dde4ee}
.theme-preview-classic{--sample-sidebar:#0d0f15;--sample-bg:#0a0b10;--sample-card:#151624;--sample-accent:#9362ff;--sample-border:#303040}
.theme-dialog-footer{padding:16px 24px;display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:1px solid #344255}
.theme-dialog-footer>span{color:#9eacbf;font-size:11px;line-height:1.45}
.theme-dialog-done{background:#5e6feb;border:0;border-radius:9px;color:#fff;padding:10px 20px;font-size:12px;font-weight:750;cursor:pointer}

/* Clean themes share spacing, layout, navigation and typography. */
html[data-nodexa-theme="clean-dark"]{
 --nx-bg:#0f151f;--nx-sidebar:#141c29;--nx-header:#151d29;--nx-card:#1c2634;--nx-input:#151e2b;
 --nx-border:#2d3a4c;--nx-text:#e9eff7;--nx-muted:#a3b2c4;--nx-subtle:#8a9caf;
 --nx-hover:#263447;--nx-active:#283b5c;--nx-accent:#8196fb;--nx-button:#596ce4;
 --nx-shadow:0 3px 16px rgba(0,0,0,.10);--purple:#7185ec;--purple-2:#91a2f6;
 color-scheme:dark;
}
html[data-nodexa-theme="clean-light"]{
 --nx-bg:#f3f5f9;--nx-sidebar:#fff;--nx-header:#fff;--nx-card:#fff;--nx-input:#f8fafc;
 --nx-border:#dde4ee;--nx-text:#1c2a3c;--nx-muted:#61718a;--nx-subtle:#728198;
 --nx-hover:#eef2f9;--nx-active:#e8edfc;--nx-accent:#4e61c7;--nx-button:#5266dc;
 --nx-shadow:0 2px 9px rgba(20,40,80,.045);--purple:#596bd8;--purple-2:#4355bf;
 color-scheme:light;
}
html[data-nodexa-theme^="clean-"] body{color:var(--nx-text);background:var(--nx-bg);font-family:Inter,system-ui,sans-serif}
html[data-nodexa-theme^="clean-"] body:before,html[data-nodexa-theme^="clean-"] .noise,html[data-nodexa-theme^="clean-"] .hero-glow{display:none!important}
html[data-nodexa-theme^="clean-"] :is(.page-dashboard,.page-twitch-dashboard){background:var(--nx-bg);color:var(--nx-text)}
html[data-nodexa-theme^="clean-"] :is(.dashboard-sidebar,.twitch-dashboard-sidebar){background:var(--nx-sidebar);border-right:1px solid var(--nx-border);box-shadow:none}
html[data-nodexa-theme^="clean-"] :is(.dashboard-topbar,.twitch-topbar,.site-header){background:var(--nx-header);border-bottom:1px solid var(--nx-border);backdrop-filter:none;box-shadow:none}
html[data-nodexa-theme^="clean-"] :is(.dash-brand,.twitch-dash-brand,.sidebar-footer){border-color:var(--nx-border)}
html[data-nodexa-theme^="clean-"] :is(.dash-brand-copy b,.twitch-dash-brand b,.dash-heading h1,.twitch-title-wrap h1,.twitch-section-heading h1){color:var(--nx-text)}
html[data-nodexa-theme^="clean-"] :is(.dashboard-content,.twitch-dashboard-content){color:var(--nx-text);padding:32px clamp(16px,2.8vw,38px)}
html[data-nodexa-theme^="clean-"] :is(.dash-heading,.twitch-page-head,.twitch-section-heading){margin-bottom:24px}
html[data-nodexa-theme^="clean-"] :is(.dash-heading h1,.twitch-title-wrap h1,.twitch-section-heading h1){font:750 clamp(23px,2.2vw,30px)/1.2 Inter,sans-serif;letter-spacing:-.65px}
html[data-nodexa-theme^="clean-"] :is(.dash-heading p,.twitch-title-wrap p,.twitch-section-heading p){font-size:13px;line-height:1.6;color:var(--nx-muted)}
html[data-nodexa-theme^="clean-"] :is(.breadcrumb,.twitch-topbar>div:first-child){font-size:12px;color:var(--nx-muted)}
html[data-nodexa-theme^="clean-"] :is(.breadcrumb b,.twitch-topbar b){color:var(--nx-subtle)}
html[data-nodexa-theme^="clean-"] :is(.sidebar-group label,.twitch-admin-nav-group small){font-size:10px;color:var(--nx-subtle);letter-spacing:.07em;font-weight:750}
html[data-nodexa-theme^="clean-"] :is(.side-item,.twitch-sidebar-nav button){color:var(--nx-muted);font-size:12px;font-weight:600;min-height:39px;height:auto;border-radius:8px;transition:background .14s,color .14s}
html[data-nodexa-theme^="clean-"] :is(.side-item:hover,.twitch-sidebar-nav button:hover){background:var(--nx-hover);color:var(--nx-text)}
html[data-nodexa-theme^="clean-"] :is(.side-item.active,.twitch-sidebar-nav button.active){background:var(--nx-active);color:var(--nx-accent);box-shadow:none;border-left:3px solid var(--nx-button);padding-left:7px}
html[data-nodexa-theme^="clean-"] :is(.side-item span,.twitch-sidebar-nav button span){color:inherit;font-size:15px}
html[data-nodexa-theme^="clean-"] :is(.side-item em,.twitch-sidebar-nav em){font-size:9px;border-radius:5px;background:var(--nx-input);color:var(--nx-subtle)}
html[data-nodexa-theme^="clean-"] :is(.server-picker,.twitch-workspace-switcher select,.twitch-channel-card,.twitch-mini-status){background:var(--nx-card);border:1px solid var(--nx-border);color:var(--nx-text);box-shadow:none}
html[data-nodexa-theme^="clean-"] :is(.server-picker-menu,.server-picker-search){background:var(--nx-card);border-color:var(--nx-border);color:var(--nx-text)}
html[data-nodexa-theme^="clean-"] :is(.server-picker b,.twitch-sidebar-nav b,.twitch-channel-card b){color:var(--nx-text)}
html[data-nodexa-theme^="clean-"] .dashboard-product-switcher{background:var(--nx-input);border:1px solid var(--nx-border);border-radius:9px}
html[data-nodexa-theme^="clean-"] .dashboard-product-switcher a{font-size:12px;color:var(--nx-muted);border-radius:6px}
html[data-nodexa-theme^="clean-"] .dashboard-product-switcher a.active{background:var(--nx-card);color:var(--nx-text);border-color:var(--nx-border);box-shadow:var(--nx-shadow)}
html[data-nodexa-theme^="clean-"] :is(.dash-stat,.panel,.twitch-runtime,.twitch-engagement-card,.admin-system-card,.twitch-system-commands-card){background:var(--nx-card);border:1px solid var(--nx-border);border-radius:11px;box-shadow:var(--nx-shadow)}
html[data-nodexa-theme^="clean-"] :is(.twitch-card,.twitch-kpi-card,.twitch-metric-card,.twitch-module-card,.module-card,.feature-card,.twitch-feature-grid label,.twitch-settings-list label){background:var(--nx-card);border-color:var(--nx-border);border-radius:11px;box-shadow:none}
html[data-nodexa-theme^="clean-"] :is(.dash-stat small,.stat-label,.twitch-title-wrap>div>small){font-size:11px;font-weight:750;letter-spacing:.045em;color:var(--nx-muted)}
html[data-nodexa-theme^="clean-"] :is(.dash-stat b,.twitch-page-head h1){color:var(--nx-text)}
html[data-nodexa-theme^="clean-"] :is(.dash-stat span,.dash-stat span i,.panel-head p,.twitch-card-head p){font-size:11px;color:var(--nx-muted)}
html[data-nodexa-theme^="clean-"] :is(.panel-head,.twitch-card-head){border-color:var(--nx-border)}
html[data-nodexa-theme^="clean-"] :is(.panel-head h3,.twitch-card-head h3){font-size:14px;font-weight:700;color:var(--nx-text)}
html[data-nodexa-theme^="clean-"] :is(.twitch-runtime b,.twitch-feature-grid b,.twitch-settings-list b,.module-card h3){color:var(--nx-text)}
html[data-nodexa-theme^="clean-"] :is(.twitch-runtime small,.twitch-feature-grid small,.twitch-settings-list small){color:var(--nx-muted);font-size:11px}
html[data-nodexa-theme^="clean-"] :is(.stat-icon,.twitch-title-icon,.twitch-brand-mark){background:var(--nx-active);color:var(--nx-accent);border:1px solid var(--nx-border);box-shadow:none;border-radius:9px}
html[data-nodexa-theme^="clean-"] :is(.button-primary,.twitch-widget-studio .button-primary){background:var(--nx-button);color:#fff;border:1px solid var(--nx-button);box-shadow:none;border-radius:8px;transition:background .15s}
html[data-nodexa-theme^="clean-"] .button-primary:hover{background:var(--nx-accent);transform:none;box-shadow:none}
html[data-nodexa-theme^="clean-"] :is(.button-secondary,.button-ghost,.square-btn,.theme-switch-btn){background:var(--nx-card);border:1px solid var(--nx-border);color:var(--nx-text);box-shadow:none;border-radius:8px}
html[data-nodexa-theme^="clean-"] :is(.button-secondary,.button-ghost,.square-btn,.theme-switch-btn):hover{background:var(--nx-hover);color:var(--nx-text);border-color:var(--nx-subtle)}
html[data-nodexa-theme^="clean-"] :is(.segmented,.twitch-tabs,.twitch-tab-bar){background:var(--nx-input);border-color:var(--nx-border)}
html[data-nodexa-theme^="clean-"] :is(.segmented button,.twitch-tabs button){color:var(--nx-muted);font-size:11px}
html[data-nodexa-theme^="clean-"] :is(.segmented button.active,.twitch-tabs button.active){background:var(--nx-card);color:var(--nx-text);box-shadow:0 1px 3px #0001;border-color:var(--nx-border)}
html[data-nodexa-theme^="clean-"] :is(.page-dashboard,.page-twitch-dashboard) :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){background:var(--nx-input);color:var(--nx-text);border-color:var(--nx-border);accent-color:var(--nx-button)}
html[data-nodexa-theme^="clean-"] :is(.page-dashboard,.page-twitch-dashboard) :is(input,textarea)::placeholder{color:var(--nx-subtle)}
html[data-nodexa-theme^="clean-"] :is(.page-dashboard,.page-twitch-dashboard) :is(input,select,textarea,button):focus-visible{outline:2px solid var(--nx-accent);outline-offset:2px}
html[data-nodexa-theme^="clean-"] :is(.dashboard-content,.twitch-dashboard-content) :is(a,button){transition-duration:.12s}
html[data-nodexa-theme^="clean-"] :is(.dashboard-content,.twitch-dashboard-content) p{line-height:1.55}
html[data-nodexa-theme^="clean-"] :is(.twitch-dashboard-content,.dashboard-content) :is(.section-tag,.twitch-title-wrap>div>small){color:var(--nx-accent)}
html[data-nodexa-theme^="clean-"] :is(.server-logo,.brand-mark){box-shadow:none;border-radius:9px}
/* Avoid overpowering artificial glow and background textures of the original theme. */
html[data-nodexa-theme^="clean-"] :is(.module-card,.twitch-card,.dashboard-view-panel,.twitch-settings-panel,.admin-system-card):hover{transform:none}
html[data-nodexa-theme^="clean-"] :is(.dashboard-content,.twitch-dashboard-content) :is(.glow,.neon,.gradient-glow){box-shadow:none}
html[data-nodexa-theme^="clean-"] .site-header{color:var(--nx-text)}
html[data-nodexa-theme^="clean-"] :is(.site-header .main-nav a,.site-header .header-actions a){color:var(--nx-muted)}
html[data-nodexa-theme^="clean-"] .site-header .main-nav a:hover{color:var(--nx-text)}

/* Light theme: normalize opaque dark inner cards and readable text. */
html[data-nodexa-theme="clean-light"] :is(.page-dashboard,.page-twitch-dashboard) :is(.panel,.dash-stat,.twitch-card,.twitch-kpi-card,.twitch-metric-card,.twitch-feature-grid label,.twitch-settings-list label,.twitch-system-commands-card,.twitch-runtime,.admin-system-card,.twitch-widget-card,.twitch-widget-item,.twitch-widgets-card,.twitch-alerts-card){background:var(--nx-card)!important;border-color:var(--nx-border)!important;color:var(--nx-text)}
html[data-nodexa-theme="clean-light"] :is(.page-dashboard,.page-twitch-dashboard) :is(.panel,.twitch-card,.dash-stat,.twitch-settings-list,.twitch-feature-grid,.twitch-dashboard-content) :is(h1,h2,h3,h4,b,strong,label){color:var(--nx-text)}
html[data-nodexa-theme="clean-light"] :is(.page-dashboard,.page-twitch-dashboard) :is(.panel,.twitch-card,.dash-stat,.twitch-settings-list,.twitch-feature-grid,.twitch-dashboard-content) :is(p,small,em,span){color:var(--nx-muted)}
html[data-nodexa-theme="clean-light"] :is(.page-dashboard,.page-twitch-dashboard) :is(.panel,.twitch-card,.dash-stat) :is([class*="status-ok"],[class*="status-error"],[class*="badge"]){color:inherit}
html[data-nodexa-theme="clean-light"] :is(.page-dashboard,.page-twitch-dashboard) :is(.twitch-runtime,.twitch-mini-status,.twitch-channel-card,.twitch-feature-grid label,.twitch-settings-list label){box-shadow:none}
html[data-nodexa-theme="clean-light"] :is(.page-dashboard,.page-twitch-dashboard) :is(.stat-icon,.twitch-title-icon,.twitch-brand-mark,.side-item.active,.twitch-sidebar-nav button.active){color:var(--nx-accent)}
html[data-nodexa-theme="clean-light"] :is(.page-dashboard,.page-twitch-dashboard) :is(.side-item,.twitch-sidebar-nav button){color:var(--nx-muted)}
html[data-nodexa-theme="clean-light"] :is(.page-dashboard,.page-twitch-dashboard) :is(.side-item.active,.twitch-sidebar-nav button.active){color:var(--nx-accent)}
html[data-nodexa-theme="clean-light"] :is(.page-dashboard,.page-twitch-dashboard) :is(.button-primary,.theme-dialog-done){color:#fff}
html[data-nodexa-theme="clean-light"] .twitch-sidebar-nav button span{color:inherit}
html[data-nodexa-theme="clean-light"] :is(.page-dashboard,.page-twitch-dashboard) :is(.twitch-widget-form,.twitch-widget-preview,.twitch-card-body,.twitch-stat-box,.twitch-table-wrapper){border-color:var(--nx-border);background:var(--nx-card)}
html[data-nodexa-theme="clean-light"] :is(.page-dashboard,.page-twitch-dashboard) :is(.segmented,.twitch-workspace-switcher select,.twitch-settings-list label){color:var(--nx-text)}
html[data-nodexa-theme="clean-light"] .nodexa-theme-dialog{background:#fff;color:var(--nx-text);border-color:var(--nx-border);color-scheme:light}
html[data-nodexa-theme="clean-light"] .nodexa-theme-dialog :is(.theme-dialog-header,.theme-dialog-footer){border-color:var(--nx-border)}
html[data-nodexa-theme="clean-light"] .nodexa-theme-dialog :is(.theme-dialog-kicker,.theme-dialog-header p,.theme-dialog-footer>span,.theme-choice small){color:var(--nx-muted)}
html[data-nodexa-theme="clean-light"] .nodexa-theme-dialog .theme-choice{background:#f8fafc;color:var(--nx-text);border-color:var(--nx-border)}
html[data-nodexa-theme="clean-light"] .nodexa-theme-dialog .theme-choice.is-selected{background:#eef2ff;border-color:#6174df}
html[data-nodexa-theme="clean-light"] .nodexa-theme-dialog .theme-dialog-close{background:#f5f7fa;color:var(--nx-text);border-color:var(--nx-border)}
html[data-nodexa-theme="clean-light"] .nodexa-theme-dialog .theme-choice-title>span{color:#4355bf;background:#e7ecff}

/* Space for a clear user-facing header; maintain existing mobile menu behavior. */
@media(max-width:800px){
 html[data-nodexa-theme^="clean-"] :is(.dashboard-content,.twitch-dashboard-content){padding:20px 14px}
 html[data-nodexa-theme^="clean-"] :is(.dashboard-topbar,.twitch-topbar){padding-left:12px;padding-right:12px}
 .theme-switch-btn{width:36px;height:36px;padding:0;flex:none}
 .theme-switch-btn>span:last-child{display:none}
 .theme-choices{grid-template-columns:1fr;padding:14px}
 .theme-choice{display:grid;grid-template-columns:116px 1fr;column-gap:13px;align-items:center}
 .theme-choice .theme-preview{grid-row:1 / span 2;height:72px}
 .theme-choice .theme-choice-title{align-self:end}
 .theme-choice small{align-self:start}
 .theme-dialog-header{padding:21px 16px 16px}
 .theme-dialog-footer{padding:15px 16px}
}
@media(prefers-reduced-motion:reduce){.theme-switch-btn,.theme-choice,.theme-dialog-done{transition:none!important}}
/* Consistent semantic tokens for modules that already use the platform variables. */
html[data-nodexa-theme^="clean-"]{
 --bg:var(--nx-bg);--surface:var(--nx-card);--surface-2:var(--nx-input);--surface-3:var(--nx-hover);
 --border:var(--nx-border);--text:var(--nx-text);--muted:var(--nx-muted);--subtle:var(--nx-subtle);
 --shadow:var(--nx-shadow);--radius:11px;
}
html[data-nodexa-theme^="clean-"] :is(.dashboard-content,.twitch-dashboard-content) :is([class$="-card"],[class$="-panel"],[class$="-tile"]){
 background:var(--nx-card);border-color:var(--nx-border);box-shadow:none;
}
html[data-nodexa-theme^="clean-"] :is(.dashboard-content,.twitch-dashboard-content) :is(small){font-size:11px;line-height:1.5}
html[data-nodexa-theme^="clean-"] :is(.dashboard-content,.twitch-dashboard-content) :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){font-size:12px;min-height:34px}
html[data-nodexa-theme^="clean-"] :is(.dashboard-content,.twitch-dashboard-content) :is(.button,.admin-mini-btn){font-size:12px}
html[data-nodexa-theme^="clean-"] .dash-stat .good{color:#30af7d}
html[data-nodexa-theme="clean-light"] :is(.page-dashboard,.page-twitch-dashboard) :is([class$="-card"],[class$="-panel"],[class$="-tile"]){
 background:var(--nx-card)!important;border-color:var(--nx-border)!important;
}
