/* ============================================================
   全站暗黑主题（前台首页 + 用户后台）
   通过 html[data-theme="dark"] 生效，由 /static/js/theme.js 切换
   ============================================================ */

html[data-theme="dark"]{
  --ink:#e8eefb;
  --body:#a9b7cc;
  --muted:#7f8ea6;
  --line:#243049;
  --line-soft:#1c2740;
  --blue:#4f9df7;
  --blue-deep:#2f86e8;
  --cyan:#2ec8e0;
  --green:#3fbf84;
  --canvas:#0a101c;
  --surface:#121c2e;
  --shadow-sm:0 1px 2px rgba(0,0,0,.4);
  --shadow-md:0 16px 40px -22px rgba(0,0,0,.7);
  --shadow-lg:0 30px 70px -30px rgba(0,0,0,.75);
  --bg:#0a101c;
  --card:#121c2e;
  --text:#e8eefb;
  --blue-soft:#1a2b45;
  --line-strong:#2c3b58;
  color-scheme:dark;
}
html[data-theme="dark"] body{
  background:#0a101c!important;
  color:#e8eefb;
}

/* ---------- 消除点击 / 页面导航瞬间的白色闪烁 ---------- */
/* 根元素必须是深色，否则画布（canvas）为白色，任何重绘都会闪白 */
html[data-theme="dark"]{
  background-color:#0a101c!important;
  background-image:none!important;
}
html[data-theme="dark"],
html[data-theme="dark"] body{
  -webkit-tap-highlight-color:transparent;
}
/* 页面切换时的 .main 半透明淡出会让白色画布透出来，暗色下禁用 */
html[data-theme="dark"] .user-ui-v2>.main,
html[data-theme="dark"] .user-console>.main{
  background:#0a101c!important;
  animation:none!important;
  transition:none!important;
  opacity:1!important;
}
html[data-theme="dark"] body.user-page-leaving .user-ui-v2 .main{
  opacity:1!important;
}

/* ---------- 主题切换按钮 ---------- */
[data-theme-toggle]{cursor:pointer}
[data-theme-toggle] .theme-icon-sun{display:none}
html[data-theme="dark"] [data-theme-toggle] .theme-icon-sun{display:block}
html[data-theme="dark"] [data-theme-toggle] .theme-icon-moon{display:none}

/* ============================================================
   前台首页
   ============================================================ */
html[data-theme="dark"] .page:before{
  background-image:linear-gradient(rgba(120,160,220,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(120,160,220,.06) 1px,transparent 1px);
}
html[data-theme="dark"] .page:after{
  background:radial-gradient(circle at 50% 50%,rgba(79,157,247,.16),rgba(46,200,224,.07) 46%,transparent 68%);
}
html[data-theme="dark"] .brand-mark{
  border-color:var(--line);
  background:#141f33;
  color:#7db9ff;
}
html[data-theme="dark"] .brand-copy span{color:#7f8ea6}
html[data-theme="dark"] .top-link{color:#a2b1c8}
html[data-theme="dark"] .top-link:hover{background:rgba(79,157,247,.14);color:#8cc3ff}
html[data-theme="dark"] .eyebrow{
  border-color:rgba(79,157,247,.26);
  background:rgba(18,28,46,.86);
  color:#8fbcf7;
}
html[data-theme="dark"] .lead{color:#a9b7cc}
html[data-theme="dark"] .cta.ghost{
  border-color:#2a3a57;
  background:rgba(18,28,46,.88);
  color:#c6d5ea;
}
html[data-theme="dark"] .cta.ghost:hover{
  border-color:#3a5680;
  background:#17243a;
  color:#8cc3ff;
}
html[data-theme="dark"] .capability{
  border-color:var(--line);
  background:rgba(18,28,46,.9);
}
html[data-theme="dark"] .capability:hover{border-color:#33456a}
html[data-theme="dark"] .cap-icon{background:rgba(79,157,247,.16);color:#7db9ff}
html[data-theme="dark"] .capability:nth-child(2) .cap-icon{background:rgba(46,200,224,.16);color:#54d8e8}
html[data-theme="dark"] .capability:nth-child(3) .cap-icon{background:rgba(150,120,255,.18);color:#a996ff}
html[data-theme="dark"] .capability small{color:#7f8ea6}

html[data-theme="dark"] .product-window{
  border-color:#23304a;
  background:var(--surface);
  box-shadow:0 22px 50px -30px rgba(0,0,0,.8);
}
html[data-theme="dark"] .window-head{
  border-bottom-color:#1c2740;
  background:#0f1828;
  color:#8fa0b8;
}
html[data-theme="dark"] .window-dots i{background:#2b3a55}
html[data-theme="dark"] .window-dots i:first-child{background:#a85a5a}
html[data-theme="dark"] .window-dots i:nth-child(2){background:#b08a4a}
html[data-theme="dark"] .window-dots i:nth-child(3){background:#4f9a6d}
html[data-theme="dark"] .window-title{color:#a9b8cd}
html[data-theme="dark"] .mini-nav{border-right-color:#1c2740;background:#0f1828}
html[data-theme="dark"] .mini-nav span{color:#7f8ea6}
html[data-theme="dark"] .mini-nav span:before{background:#26344e}
html[data-theme="dark"] .mini-nav span:first-child{background:rgba(79,157,247,.18);color:#8cc3ff}
html[data-theme="dark"] .mini-nav span:first-child:before{background:#4f9df7}
html[data-theme="dark"] .monitor-card,
html[data-theme="dark"] .chart-block{border-color:#23304a;background:#131d30}
html[data-theme="dark"] .monitor-card small,
html[data-theme="dark"] .chart-block header{color:#7f8ea6}
html[data-theme="dark"] .monitor-card strong{color:#e7eefb}
html[data-theme="dark"] .monitor-card:first-child strong{color:#8cc3ff}
html[data-theme="dark"] .chart-block header b{color:#a9b8cd}
html[data-theme="dark"] .bars i{background:linear-gradient(180deg,#3f6fae,#243a5c)}
html[data-theme="dark"] .bars i:nth-child(2){background:linear-gradient(180deg,#2c8f9e,#1b3d4a)}
html[data-theme="dark"] .bars i:nth-child(3){background:linear-gradient(180deg,#4f9df7,#2b4d7a)}

html[data-theme="dark"] .auth-card{
  border-color:#23304a;
  background:#121c2e;
  box-shadow:0 34px 80px -34px rgba(0,0,0,.85);
}
html[data-theme="dark"] .auth-badge{background:rgba(79,157,247,.16);color:#8fbcf7}
html[data-theme="dark"] .auth-desc{color:#7f8ea6}
html[data-theme="dark"] .login-form label{color:#b9c6d8}
html[data-theme="dark"] .field input{
  border-color:#2a3a57;
  background:#0e1727;
  color:#e8eefb;
}
html[data-theme="dark"] .field input::placeholder{color:#64748b}
html[data-theme="dark"] .field input:hover{border-color:#3a4f73}
html[data-theme="dark"] .field input:focus{
  border-color:#4f9df7;
  background:#0b1422;
  box-shadow:0 0 0 3px rgba(79,157,247,.18);
}
html[data-theme="dark"] .toggle{color:#8a97ab}
html[data-theme="dark"] .toggle:hover{background:#17243a;color:#c6d5ea}
html[data-theme="dark"] .form-meta a{color:#7db9ff}
html[data-theme="dark"] .divider{color:#64748b}
html[data-theme="dark"] .divider:before,
html[data-theme="dark"] .divider:after{background:#1c2740}
html[data-theme="dark"] .register{color:#9aa9c0}
html[data-theme="dark"] .register a{color:#7db9ff}
html[data-theme="dark"] .session-note{background:#0f1828;color:#8b9bb4}

html[data-theme="dark"] .footer{
  border-top-color:rgba(255,255,255,.08);
  color:#7b8aa3;
}
html[data-theme="dark"] .footer-brand i{background:#1b273d;color:#92a8c8}
html[data-theme="dark"] .footer-links a:hover{color:#7db9ff}

/* 首页主题按钮 */
.theme-toggle{
  display:grid;
  width:38px;
  height:38px;
  padding:0;
  place-items:center;
  border:1px solid var(--line);
  border-radius:9px;
  background:rgba(255,255,255,.86);
  color:#5a6880;
  transition:background-color .16s ease,border-color .16s ease,color .16s ease,transform .16s ease;
}
.theme-toggle:hover{background:#fff;border-color:#b9cbe6;color:var(--blue);transform:translateY(-1px)}
.theme-toggle svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
html[data-theme="dark"] .theme-toggle{
  border-color:#2a3a57;
  background:rgba(18,28,46,.9);
  color:#a9b8cd;
}
html[data-theme="dark"] .theme-toggle:hover{border-color:#3a5680;background:#17243a;color:#8cc3ff}

/* 瀑布流能力区块 */
html[data-theme="dark"] .showcase-zone{border-top-color:rgba(255,255,255,.08)}
html[data-theme="dark"] .showcase-head h2{color:#e8eefb}
html[data-theme="dark"] .showcase-head p{color:#7f8ea6}
html[data-theme="dark"] .showcase-card{
  border-color:var(--line);
  background:rgba(18,28,46,.9);
  box-shadow:0 1px 2px rgba(0,0,0,.35);
}
html[data-theme="dark"] .showcase-card:hover{border-color:#33456a;box-shadow:0 16px 34px -22px rgba(0,0,0,.8)}
html[data-theme="dark"] .showcase-icon{background:rgba(79,157,247,.16);color:#7db9ff}
html[data-theme="dark"] .showcase-card h3{color:#e8eefb}
html[data-theme="dark"] .showcase-card p{color:#a2b1c8}
html[data-theme="dark"] .showcase-tags span{background:#17243a;color:#9db0c9}
html[data-theme="dark"] .showcase-list li{color:#a2b1c8;border-bottom-color:#1c2740}
html[data-theme="dark"] .showcase-list li:before{background:#4f9df7}
html[data-theme="dark"] .showcase-count{background:rgba(79,157,247,.16);color:#8fbcf7}

/* 赞助名单 */
html[data-theme="dark"] .sponsor-zone{border-top-color:rgba(255,255,255,.08)}
html[data-theme="dark"] .sponsor-head h2{color:#e8eefb}
html[data-theme="dark"] .sponsor-head p{color:#7f8ea6}
html[data-theme="dark"] .sponsor-count{background:rgba(79,157,247,.16);color:#8fbcf7}
html[data-theme="dark"] .sponsor-card{
  border-color:var(--line);
  background:rgba(18,28,46,.9);
}
html[data-theme="dark"] .sponsor-card:hover{border-color:#33456a}
html[data-theme="dark"] .sponsor-card img{background:#1b273d}
html[data-theme="dark"] .sponsor-body strong{color:#e8eefb}
html[data-theme="dark"] .sponsor-tag{background:rgba(120,100,240,.2);color:#b3a6ff}
html[data-theme="dark"] .sponsor-tag.gold{background:rgba(228,154,0,.2);color:#f0bb55}
html[data-theme="dark"] .sponsor-empty{
  border-color:var(--line);
  background:rgba(18,28,46,.6);
  color:#7f8ea6;
}

/* ============================================================
   用户后台
   ============================================================ */
html[data-theme="dark"] .user-ui-v3{
  --v3-canvas:#0a101c;
  --v3-surface:#121c2e;
  --v3-surface-soft:#0f1828;
  --v3-surface-hover:#17243a;
  --v3-text:#e8eefb;
  --v3-text-secondary:#a6b4c9;
  --v3-text-muted:#7f8ea6;
  --v3-border:#23304a;
  --v3-border-strong:#2c3b58;
  --v3-primary:#4f9df7;
  --v3-primary-soft:#1a2b45;
  --v3-success:#3fbf84;
  --v3-warning:#e0a33a;
  --v3-danger:#f0736f;
}
html[data-theme="dark"] .user-ui-v4{
  --u4-canvas:#0a101c;
  --u4-surface:#121c2e;
  --u4-text:#e8eefb;
  --u4-secondary:#a6b4c9;
  --u4-muted:#7f8ea6;
  --u4-border:#23304a;
  --u4-primary:#4f9df7;
  --u4-primary-soft:#1a2b45;
  --u4-success:#3fbf84;
  --u4-shadow:0 10px 26px rgba(0,0,0,.35);
}
html[data-theme="dark"] .user-console,
html[data-theme="dark"] .user-console>.main,
html[data-theme="dark"] .user-ui-v2,
html[data-theme="dark"] .user-ui-v3,
html[data-theme="dark"] .user-ui-v4{
  background:#0a101c!important;
  background-color:#0a101c!important;
  background-image:none!important;
  color:#e8eefb;
}
html[data-theme="dark"] .user-console>.sidebar{
  background:#0e1727!important;
  border-right-color:#1e2b44!important;
  color:#e8eefb;
  scrollbar-color:#33425f transparent;
}
html[data-theme="dark"] .user-ui-v4 .brand,
html[data-theme="dark"] .user-ui-v3 .brand{border-bottom-color:#1e2b44!important}
html[data-theme="dark"] .user-ui-v4 .brand strong,
html[data-theme="dark"] .user-ui-v3 .brand strong{color:#e8eefb!important}
html[data-theme="dark"] .user-ui-v4 .brand-logo{background:#17243a;color:#7db9ff}
html[data-theme="dark"] .user-ui-v4 .nav>a,
html[data-theme="dark"] .user-ui-v4 .nav-group-title,
html[data-theme="dark"] .user-ui-v3 .nav>a,
html[data-theme="dark"] .user-ui-v3 .nav-group-title{color:#a6b4c9!important}
html[data-theme="dark"] .user-ui-v4 .nav>a:hover,
html[data-theme="dark"] .user-ui-v4 .nav-group-title:hover,
html[data-theme="dark"] .user-ui-v4 .nav-sub:hover,
html[data-theme="dark"] .user-ui-v3 .nav>a:hover,
html[data-theme="dark"] .user-ui-v3 .nav-group-title:hover,
html[data-theme="dark"] .user-ui-v3 .nav-sub:hover{background:#17243a!important;color:#cfe3ff!important}
html[data-theme="dark"] .user-ui-v4 .nav>a.active,
html[data-theme="dark"] .user-ui-v4 .nav-group.active>.nav-group-title,
html[data-theme="dark"] .user-ui-v4 .nav-sub.active,
html[data-theme="dark"] .user-ui-v3 .nav>a.active,
html[data-theme="dark"] .user-ui-v3 .nav-group.active>.nav-group-title,
html[data-theme="dark"] .user-ui-v3 .nav-sub.active{background:#1a2b45!important;color:#7db9ff!important}
html[data-theme="dark"] .user-ui-v4 .nav-sub,
html[data-theme="dark"] .user-ui-v3 .nav-sub{color:#95a4bb!important}
html[data-theme="dark"] .user-ui-v2 .nav>a.active,
html[data-theme="dark"] .user-ui-v2 .nav-group.active>.nav-group-title,
html[data-theme="dark"] .user-ui-v2 .nav-sub.active{color:#e8eefb!important;background:transparent!important}
html[data-theme="dark"] .user-ui-v2 .nav>a:hover,
html[data-theme="dark"] .user-ui-v2 .nav-group-title:hover,
html[data-theme="dark"] .user-ui-v2 .nav-sub:hover{background:#17243a!important;color:#e8eefb!important}

html[data-theme="dark"] .user-ui-v4 .topbar.compact,
html[data-theme="dark"] .user-ui-v3 .topbar.compact{
  background:rgba(10,16,28,.94)!important;
  border-bottom-color:#1e2b44!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .user-ui-v4 .console-statusbar strong,
html[data-theme="dark"] .user-ui-v3 .console-statusbar strong{color:#e8eefb}
html[data-theme="dark"] .topbar-icon-link{color:#a6b4c9}
html[data-theme="dark"] .topbar-icon-link:hover{background:#17243a;color:#8cc3ff}
html[data-theme="dark"] .topbar-icon-link.has-alert{color:#f0736f}
html[data-theme="dark"] .topbar-quick-links .theme-toggle{border:0;background:transparent;color:#a6b4c9}
html[data-theme="dark"] .topbar-quick-links .theme-toggle:hover{background:#17243a;color:#8cc3ff}
html[data-theme="dark"] .topbar-unread{border-color:#0e1727}
html[data-theme="dark"] .mobile-nav-toggle{background:#17243a;color:#c6d5ea}
html[data-theme="dark"] .userbar-trigger{color:#e8eefb}
html[data-theme="dark"] .user-ui-v4 .userbar-trigger:hover,
html[data-theme="dark"] .user-ui-v4 .userbar-trigger[aria-expanded=true],
html[data-theme="dark"] .user-ui-v3 .userbar-trigger:hover,
html[data-theme="dark"] .user-ui-v3 .userbar-trigger[aria-expanded=true]{background:#17243a!important}
html[data-theme="dark"] .userbar-dropdown,
html[data-theme="dark"] .user-ui-v4 .userbar-dropdown,
html[data-theme="dark"] .user-ui-v3 .userbar-dropdown{
  border-color:#23304a!important;
  background:#121c2e!important;
  box-shadow:0 16px 40px rgba(0,0,0,.5)!important;
  color:#e8eefb;
}
html[data-theme="dark"] .userbar-dropdown a{color:#c6d5ea}
html[data-theme="dark"] .userbar-dropdown a:hover{background:#17243a;color:#8cc3ff}
html[data-theme="dark"] .userbar-dropdown a.danger{color:#f0736f}
html[data-theme="dark"] .userbar-profile small{color:#7f8ea6}

/* 卡片 / 面板 / 容器 */
html[data-theme="dark"] .user-console :is(.panel,.panel-card,.card,.dashboard-card,.dashboard-stat,.dashboard-overview,.dashboard-account-card,.plugin-center-panel,.account-profile,.account-settings,.authorization-section,.copy-box,.connection-card,.group-manager-head,.group-manager-workspace,.stat-card,.form-card,.list-card,.section-card,.content-card,.wallet-stats article,.gm-log-head,.plugin-doc-overview,.message-panel,.copy-card,.copy-item,.official-item,.copy-head){
  background:#121c2e!important;
  border-color:#23304a!important;
  box-shadow:0 8px 24px rgba(0,0,0,.32)!important;
}
html[data-theme="dark"] .user-console :is(.dashboard-overview,.subtabs,.message-tabs,.dev-tabs,.market-catalog-tabs){
  background:#121c2e!important;
  border-color:#23304a!important;
}
html[data-theme="dark"] .user-console :is(.dashboard-card-head,.section-head,.card-head,.panel-card-head,.system-section-head,.message-panel-title,.copy-card>h3){
  border-bottom-color:#1e2b44!important;
}
html[data-theme="dark"] .user-console :is(.section-head>h2,.section-head>h3,.card-head>h3,.panel-card-head>h3,.system-section-head>h3,.message-panel-title,.copy-card>h3,.dashboard-title h2){color:#e8eefb!important}
html[data-theme="dark"] .user-console :is(h1,h2,h3,h4,h5,h6,strong,b){color:#e8eefb}
html[data-theme="dark"] .user-console :is(.muted,.hint,.help-text,.desc,.description,.sub,.subtle,.empty,.empty-state,.dashboard-empty,.dashboard-card-head p,.dashboard-title p,.section-head p){color:#8b9bb4!important}
html[data-theme="dark"] .user-console p,
html[data-theme="dark"] .user-console small,
html[data-theme="dark"] .user-console label{color:#a6b4c9}
html[data-theme="dark"] .user-console .nav-unread{background:#e5484d;color:#fff;border-color:#0e1727}

/* 标签页 */
html[data-theme="dark"] .user-console :is(.subtabs,.message-tabs,.dev-tabs,.market-catalog-tabs)>a,
html[data-theme="dark"] .user-console :is(.subtabs,.message-tabs,.dev-tabs,.market-catalog-tabs)>button{color:#a6b4c9!important;background:transparent!important}
html[data-theme="dark"] .user-console :is(.subtabs,.message-tabs,.dev-tabs,.market-catalog-tabs)>a:hover,
html[data-theme="dark"] .user-console :is(.subtabs,.message-tabs,.dev-tabs,.market-catalog-tabs)>button:hover{background:#17243a!important;color:#8cc3ff!important}
html[data-theme="dark"] .user-console :is(.subtabs,.message-tabs,.dev-tabs,.market-catalog-tabs)>a.active,
html[data-theme="dark"] .user-console :is(.subtabs,.message-tabs,.dev-tabs,.market-catalog-tabs)>button.active{background:#2f86e8!important;color:#fff!important}

/* 表格 */
html[data-theme="dark"] .user-console table{background:#121c2e!important;color:#dbe6f5}
html[data-theme="dark"] .user-console thead,
html[data-theme="dark"] .user-console th{background:#0f1828!important;color:#a6b4c9!important;border-color:#23304a!important}
html[data-theme="dark"] .user-console td{border-color:#1e2b44!important}
html[data-theme="dark"] .user-console tbody tr:hover td,
html[data-theme="dark"] .user-console tr:hover td{background:#16223a!important}
html[data-theme="dark"] .user-console .table-action{border-color:#2c3b58!important;background:#17243a!important;color:#8cc3ff!important}

/* 表单 */
html[data-theme="dark"] .user-console input,
html[data-theme="dark"] .user-console select,
html[data-theme="dark"] .user-console textarea{
  border-color:#2a3a57!important;
  background:#0e1727!important;
  color:#e8eefb!important;
}
html[data-theme="dark"] .user-console input::placeholder,
html[data-theme="dark"] .user-console textarea::placeholder{color:#64748b!important}
html[data-theme="dark"] .user-console input:focus,
html[data-theme="dark"] .user-console select:focus,
html[data-theme="dark"] .user-console textarea:focus{
  border-color:#4f9df7!important;
  box-shadow:0 0 0 3px rgba(79,157,247,.18)!important;
}
html[data-theme="dark"] .user-console option{background:#0e1727;color:#e8eefb}
html[data-theme="dark"] .user-console .secondary,
html[data-theme="dark"] .user-console button.secondary{
  border-color:#2c3b58!important;
  background:#17243a!important;
  color:#8cc3ff!important;
}
html[data-theme="dark"] .user-console .secondary:hover{background:#1c2c47!important}

/* 弹窗 */
html[data-theme="dark"] .user-console :is(dialog,.modal,.dialog,.modal-card,.dialog-card,.form-dialog,.confirm-dialog,.content-alert-card){
  background:#121c2e!important;
  border-color:#23304a!important;
  color:#e8eefb;
  box-shadow:0 30px 80px rgba(0,0,0,.65)!important;
}
html[data-theme="dark"] .content-alert-dialog{color:#e8eefb}
html[data-theme="dark"] .content-alert-head,
html[data-theme="dark"] .content-alert-foot{border-color:#1e2b44!important;background:#121c2e!important}
html[data-theme="dark"] .content-alert-head h3,
html[data-theme="dark"] .content-alert-item h4{color:#e8eefb!important}
html[data-theme="dark"] .content-alert-sub,
html[data-theme="dark"] .content-alert-text{color:#a6b4c9!important}
html[data-theme="dark"] .content-alert-item{border-color:#23304a!important;background:#0f1828!important}
html[data-theme="dark"] .content-alert-close{background:#17243a!important;color:#c6d5ea!important}
html[data-theme="dark"] .content-alert-close:hover{background:#1f2f4a!important}
html[data-theme="dark"] .content-alert-type{background:#1a2b45!important;color:#8cc3ff!important}
html[data-theme="dark"] .content-alert-type.is-changelog{background:#241f45!important;color:#b3a6ff!important}
html[data-theme="dark"] .content-alert-tag{background:#33270f!important;color:#f0bb55!important}
html[data-theme="dark"] .content-alert-time{color:#7f8ea6!important}

/* 图表与状态 */
html[data-theme="dark"] .user-ui-v4 .dashboard-card.trend-card .trend-chart{
  border-color:#23304a!important;
  background:#0f1828!important;
}
html[data-theme="dark"] .user-ui-v4 .dashboard-card.trend-card .chart-grid line{stroke:#23304a!important}
html[data-theme="dark"] .user-ui-v4 .dashboard-card.trend-card .trend-labels{color:#7f8ea6!important}
html[data-theme="dark"] .user-console :is(.status,.soft-badge,.auth-status-chip){border-color:#23304a}
html[data-theme="dark"] .user-console .status.success,
html[data-theme="dark"] .user-console .soft-badge{background:#12301f;color:#4fd39a}
html[data-theme="dark"] .user-console .status.warning{background:#33270f;color:#f0bb55}
html[data-theme="dark"] .user-console .status.danger{background:#351618;color:#ff8f8b}
html[data-theme="dark"] .user-console .empty-state,
html[data-theme="dark"] .user-console .dashboard-empty,
html[data-theme="dark"] .user-console .table-empty{
  border-color:#23304a!important;
  background:#0f1828!important;
  color:#7f8ea6!important;
}
html[data-theme="dark"] .user-console .copy-item:hover,
html[data-theme="dark"] .user-console .official-item:hover{border-color:#33456a!important;box-shadow:0 4px 14px rgba(0,0,0,.35)!important}
html[data-theme="dark"] .user-console .copy-primary{background:#4f9df7!important;border-color:#4f9df7!important;color:#fff!important}
html[data-theme="dark"] .user-console ::-webkit-scrollbar{width:10px;height:10px}
html[data-theme="dark"] .user-console ::-webkit-scrollbar-thumb{background:#2b3a55;border-radius:8px}
html[data-theme="dark"] .user-console ::-webkit-scrollbar-track{background:transparent}

/* ============================================================
   控制台（user_dashboard.html）内联浅色样式修正
   ============================================================ */
html[data-theme="dark"] .dashboard-image-wallet{
  background:#121c2e!important;
  border-color:#23304a!important;
  color:#c6d5ea!important;
}
html[data-theme="dark"] .dashboard-image-wallet:hover{
  background:#16223a!important;
  border-color:#33456a!important;
}
html[data-theme="dark"] .dashboard-image-wallet span{color:#a6b4c9!important}
html[data-theme="dark"] .dashboard-image-wallet strong{color:#e8eefb!important}
html[data-theme="dark"] .dashboard-image-wallet small{color:#8cc3ff!important}
html[data-theme="dark"] .dashboard-image-wallet-icon{background:#2f86e8!important;color:#fff!important}

html[data-theme="dark"] .account-role-badge{
  background:#17243a!important;
  border-color:#2c3b58!important;
  color:#a6b4c9!important;
}
html[data-theme="dark"] .account-role-badge.agent{background:#14243a!important;border-color:#2b4570!important;color:#8cc3ff!important}
html[data-theme="dark"] .account-role-badge.developer{background:#1e1b3a!important;border-color:#3d3670!important;color:#b9a7ff!important}

html[data-theme="dark"] .dashboard-stat .dashboard-message-count .message-count-value{color:#e8eefb!important}
html[data-theme="dark"] .dashboard-stat .dashboard-message-count .message-count-separator{color:#6b7a92!important}
html[data-theme="dark"] .dashboard-account-card{background:#121c2e!important;border-color:#23304a!important;color:#e8eefb!important}
html[data-theme="dark"] .dashboard-account-card:hover{background:#16223a!important;border-color:#33456a!important}
html[data-theme="dark"] .dashboard-account-card span{color:#a6b4c9!important}
html[data-theme="dark"] .dashboard-account-card strong{color:#e8eefb!important}
html[data-theme="dark"] .dashboard-account-card.role strong{color:#4fd39a!important}
html[data-theme="dark"] .dashboard-account-card svg{color:#7f8ea6!important}
html[data-theme="dark"] .auth-status-chip{background:#17243a!important;color:#8cc3ff!important}
html[data-theme="dark"] .auth-status-chip i{background:#4f9df7!important}
html[data-theme="dark"] .auth-status-chip.expiring,
html[data-theme="dark"] .auth-status-chip.partial{background:#33270f!important;color:#f0bb55!important}
html[data-theme="dark"] .auth-status-chip.expiring i,
html[data-theme="dark"] .auth-status-chip.partial i{background:#f0bb55!important}
html[data-theme="dark"] .auth-status-chip.expired,
html[data-theme="dark"] .auth-status-chip.unauthorized{background:#351618!important;color:#ff8f8b!important}
html[data-theme="dark"] .auth-status-chip.expired i,
html[data-theme="dark"] .auth-status-chip.unauthorized i{background:#ff8f8b!important}
html[data-theme="dark"] .dashboard-keyword-stat{background:#121c2e!important;border-color:#23304a!important}
html[data-theme="dark"] .dashboard-keyword-stat:hover{background:#16223a!important;border-color:#2f6b58!important}
html[data-theme="dark"] .dashboard-keyword-stat .keyword-icon{background:#12301f!important;color:#4fd39a!important}
html[data-theme="dark"] .dashboard-keyword-stat small{color:#a6b4c9!important}
html[data-theme="dark"] .dashboard-trend-legend{color:#8b9bb4!important}
html[data-theme="dark"] .dashboard-trend-range,
html[data-theme="dark"] .user-ui-v3 .dashboard-trend-range{
  background:#17243a!important;
  border-color:#2c3b58!important;
  color:#a6b4c9!important;
}
html[data-theme="dark"] .user-ui-v3 .chart-grid line{stroke:#23304a!important}
html[data-theme="dark"] .trend-labels{color:#7f8ea6!important}

/* 图表（v3 / v4）网格与坐标 */
html[data-theme="dark"] .user-ui-v3 .trend-chart,
html[data-theme="dark"] .user-ui-v4 .trend-chart{background:transparent!important}
html[data-theme="dark"] .user-ui-v3 #trend-dots circle{stroke:#121c2e!important}
html[data-theme="dark"] .user-ui-v3 #trend-sent-dots circle{stroke:#121c2e!important}
html[data-theme="dark"] .trend-sent-dots circle{stroke:#121c2e!important}

/* ============================================================
   群管日志（user_group_manager_logs.html）
   ============================================================ */
html[data-theme="dark"] .gm-log-page{
  --gm-ink:#e8eefb;
  --gm-muted:#8b9bb4;
  --gm-line:#23304a;
  --gm-soft:#0f1828;
}
html[data-theme="dark"] .gm-log-head{
  background:linear-gradient(135deg,#121c2e 0%,#0f1828 100%)!important;
  border-color:#23304a!important;
  box-shadow:0 8px 24px rgba(0,0,0,.4)!important;
}
html[data-theme="dark"] .gm-log-head h2{color:#e8eefb!important}
html[data-theme="dark"] .gm-log-head p{color:#8b9bb4!important}
html[data-theme="dark"] .gm-log-head .eyebrow{color:#6fa8ff!important}
html[data-theme="dark"] .gm-log-total{
  background:#17243a!important;
  border-color:#2c3b58!important;
  color:#8cc3ff!important;
  box-shadow:0 4px 14px rgba(0,0,0,.3)!important;
}
html[data-theme="dark"] .gm-log-stat,
html[data-theme="dark"] .gm-log-filter-card,
html[data-theme="dark"] .gm-log-table-wrap,
html[data-theme="dark"] .gm-log-detail-grid>div,
html[data-theme="dark"] .gm-log-table .empty{
  background:#121c2e!important;
  border-color:#23304a!important;
}
html[data-theme="dark"] .gm-log-stat-icon{background:#1a2b45!important;color:#8cc3ff!important}
html[data-theme="dark"] .gm-log-stat:nth-child(2) .gm-log-stat-icon{background:#12301f!important;color:#4fd39a!important}
html[data-theme="dark"] .gm-log-stat:nth-child(3) .gm-log-stat-icon{background:#33270f!important;color:#f0bb55!important}
html[data-theme="dark"] .gm-log-stat small{color:#8b9bb4!important}
html[data-theme="dark"] .gm-log-stat strong{color:#e8eefb!important}
html[data-theme="dark"] .gm-log-filter-title strong{color:#e8eefb!important}
html[data-theme="dark"] .gm-log-filter-title span{color:#8b9bb4!important}
html[data-theme="dark"] .gm-log-filter-toggle{
  background:#17243a!important;
  border-color:#2c3b58!important;
  color:#8cc3ff!important;
}
html[data-theme="dark"] .gm-log-filters label{color:#a6b4c9!important}
html[data-theme="dark"] .gm-log-filters input,
html[data-theme="dark"] .gm-log-filters select{
  background:#0e1727!important;
  border-color:#2a3a57!important;
  color:#e8eefb!important;
}
html[data-theme="dark"] .gm-log-filters input::placeholder{color:#64748b!important}
html[data-theme="dark"] .gm-log-filters input:focus,
html[data-theme="dark"] .gm-log-filters select:focus{
  border-color:#4f9df7!important;
  box-shadow:0 0 0 3px rgba(79,157,247,.18)!important;
}
html[data-theme="dark"] .gm-log-filter-actions{border-top-color:#1e2b44!important}
html[data-theme="dark"] .gm-log-filter-actions button,
html[data-theme="dark"] .gm-log-filter-actions a{
  background:#17243a!important;
  border-color:#2c3b58!important;
  color:#c6d5ea!important;
}
html[data-theme="dark"] .gm-log-filter-actions .primary{
  background:#2f86e8!important;
  border-color:#2f86e8!important;
  color:#fff!important;
}
html[data-theme="dark"] .gm-log-filter-actions .gm-log-clear{
  background:#2a1618!important;
  border-color:#5c2a2d!important;
  color:#ff8f8b!important;
}
html[data-theme="dark"] .gm-log-table thead th{
  background:#0f1828!important;
  color:#a6b4c9!important;
  border-bottom-color:#23304a!important;
}
html[data-theme="dark"] .gm-log-table tbody>tr[data-log-id]>td{
  border-bottom-color:#1e2b44!important;
  color:#c6d5ea!important;
}
html[data-theme="dark"] .gm-log-table tbody>tr[data-log-id]:hover>td{background:#16223a!important}
html[data-theme="dark"] .gm-log-table td b{color:#e8eefb!important}
html[data-theme="dark"] .gm-log-table td small{color:#8b9bb4!important}
html[data-theme="dark"] .gm-log-summary{color:#c6d5ea!important}
html[data-theme="dark"] .gm-log-avatar{
  background:#17243a!important;
  border-color:#2c3b58!important;
  color:#a6b4c9!important;
}
html[data-theme="dark"] .gm-result{background:#1a2b45!important;color:#a6b4c9!important}
html[data-theme="dark"] .gm-result.handled,
html[data-theme="dark"] .gm-result.passed{background:#12301f!important;color:#4fd39a!important}
html[data-theme="dark"] .gm-result.blocked,
html[data-theme="dark"] .gm-result.failed{background:#351618!important;color:#ff8f8b!important}
html[data-theme="dark"] .gm-result.skipped{background:#33270f!important;color:#f0bb55!important}
html[data-theme="dark"] .gm-log-expand{
  background:#17243a!important;
  border-color:#2c3b58!important;
  color:#8cc3ff!important;
}
html[data-theme="dark"] .gm-log-expand:hover,
html[data-theme="dark"] .gm-log-expand[aria-expanded="true"]{
  background:#1f3150!important;
  border-color:#3a5680!important;
  color:#a8cdff!important;
}
html[data-theme="dark"] .gm-log-detail-row>td{background:#0f1828!important;border-bottom-color:#23304a!important}
html[data-theme="dark"] .gm-log-detail-shell{border-color:#23304a!important;background:#0f1828!important}
html[data-theme="dark"] .gm-log-detail-grid strong{color:#a6b4c9!important}
html[data-theme="dark"] .gm-log-detail-grid pre{color:#c6d5ea!important}
html[data-theme="dark"] .gm-log-detail-entry{background:#0e1727!important;border-color:#1e2b44!important}
html[data-theme="dark"] .gm-log-detail-grid hr{border-top-color:#1e2b44!important}
html[data-theme="dark"] .gm-log-detail-grid details summary{color:#8cc3ff!important}
html[data-theme="dark"] .gm-log-empty,
html[data-theme="dark"] .gm-log-table .empty{color:#7f8ea6!important}
html[data-theme="dark"] .gm-log-pagination span,
html[data-theme="dark"] .gm-log-pagination a{
  background:#121c2e!important;
  border-color:#23304a!important;
  color:#a6b4c9!important;
}
html[data-theme="dark"] .gm-log-pagination a{color:#8cc3ff!important}
html[data-theme="dark"] .gm-log-live{color:#4fd39a!important}
html[data-theme="dark"] .gm-log-live.loading{color:#a6b4c9!important}
html[data-theme="dark"] .gm-ios-select-trigger{
  background:#0e1727!important;
  border-color:#2a3a57!important;
  color:#e8eefb!important;
}
html[data-theme="dark"] .gm-ios-select-trigger:hover{background:#17243a!important}
html[data-theme="dark"] .gm-ios-select-menu{
  background:rgba(18,28,46,.98)!important;
  border-color:#23304a!important;
  box-shadow:0 16px 40px rgba(0,0,0,.6)!important;
}
html[data-theme="dark"] .gm-ios-select-menu button{color:#dbe6f5!important}
html[data-theme="dark"] .gm-ios-select-menu button:hover{background:#17243a!important}
html[data-theme="dark"] .gm-ios-select-menu button.selected{background:#1a2b45!important;color:#8cc3ff!important}

/* ============================================================
   群管设置 / 进群欢迎 外层（user_group_manager.html）
   ============================================================ */
html[data-theme="dark"] .group-manager-offline-state{
  border-color:#23304a!important;
  background:radial-gradient(circle at 50% 0,rgba(240,187,85,.06),transparent 38%),#121c2e!important;
  color:#e8eefb;
}
html[data-theme="dark"] .group-manager-offline-state:before{background:rgba(240,187,85,.05)!important}
html[data-theme="dark"] .group-manager-offline-state:after{background:rgba(91,69,244,.06)!important}
html[data-theme="dark"] .group-manager-offline-icon{
  border-color:#4a3a1a!important;
  background:linear-gradient(145deg,#1d2436,#221d10)!important;
  box-shadow:0 12px 28px rgba(0,0,0,.45)!important;
}
html[data-theme="dark"] .group-manager-offline-icon:before{border-color:#e5b154!important}
html[data-theme="dark"] .group-manager-offline-icon i{background:#e5b154!important;box-shadow:0 0 0 4px #221d10!important}
html[data-theme="dark"] .group-manager-offline-badge{background:#33270f!important;color:#f0bb55!important}
html[data-theme="dark"] .group-manager-offline-state>strong{color:#e8eefb!important}
html[data-theme="dark"] .group-manager-offline-state>p{color:#a6b4c9!important}
html[data-theme="dark"] .group-manager-offline-data{
  background:#0f1828!important;
  border-color:#23304a!important;
}
html[data-theme="dark"] .group-manager-offline-data span{color:#a6b4c9!important}
html[data-theme="dark"] .group-manager-offline-tip{color:#8b9bb4!important}
html[data-theme="dark"] .group-manager-choice-card{
  background:#121c2e!important;
  border-color:#23304a!important;
  box-shadow:0 24px 44px rgba(0,0,0,.6)!important;
}
html[data-theme="dark"] .group-manager-choice-card header h3{color:#e8eefb!important}
html[data-theme="dark"] .group-manager-choice-card header p{color:#8b9bb4!important}
html[data-theme="dark"] .group-manager-choice-card header>button{color:#8b9bb4!important}
html[data-theme="dark"] .group-manager-choice-description{color:#a6b4c9!important}
html[data-theme="dark"] .group-manager-choice-item{
  background:#0f1828!important;
  border-color:#23304a!important;
  color:#e8eefb!important;
}
html[data-theme="dark"] .group-manager-choice-item:hover{background:#17243a!important;border-color:#3a5680!important}
html[data-theme="dark"] .group-manager-choice-item:active{background:#1a2b45!important}
html[data-theme="dark"] .group-manager-choice-item b{color:#e8eefb!important}
html[data-theme="dark"] .group-manager-choice-item small{color:#8b9bb4!important}
html[data-theme="dark"] .group-manager-choice-item i{color:#8b9bb4!important}
html[data-theme="dark"] .group-manager-choice-icon{background:#1a2b45!important;color:#8cc3ff!important}
html[data-theme="dark"] .group-manager-choice-item.danger .group-manager-choice-icon{background:#351618!important;color:#ff8f8b!important}
html[data-theme="dark"] .group-manager-choice-item.danger:hover{background:#2a1618!important;border-color:#5c2a2d!important}
html[data-theme="dark"] .group-manager-confirm .group-manager-choice-item:focus-visible{
  background:#17243a!important;
  border-color:#3a5680!important;
  box-shadow:0 0 0 4px rgba(79,157,247,.18)!important;
}
html[data-theme="dark"] .group-manager-run-control{color:#e8eefb!important}
html[data-theme="dark"] .group-manager-run-copy strong{color:#e8eefb!important}
html[data-theme="dark"] .group-manager-run-copy small{color:#8b9bb4!important}
html[data-theme="dark"] .group-manager-run-control.is-on .group-manager-run-copy small{color:#4fd39a!important}
html[data-theme="dark"] .group-manager-run-switch{background:#3a4a63!important}
html[data-theme="dark"] .group-manager-run-switch b{background:#e8eefb!important}
html[data-theme="dark"] .group-manager-run-control.is-on .group-manager-run-switch{background:#2f9e5f!important}
html[data-theme="dark"] .group-manager-frame-shell{background:#121c2e!important;border-color:#23304a!important}
html[data-theme="dark"] .group-manager-loading{color:#a6b4c9!important}
html[data-theme="dark"] .group-manager-loading strong{color:#e8eefb!important}
html[data-theme="dark"] .group-manager-loading small{color:#8b9bb4!important}
html[data-theme="dark"] .group-manager-state{background:#121c2e!important;border-color:#23304a!important;color:#e8eefb!important}

/* ============================================================
   通用兜底（覆盖页面内联浅色卡片 / 白色面板 / 白色输入框）
   ============================================================ */
html[data-theme="dark"] .user-console [style*="background:#fff"],
html[data-theme="dark"] .user-console [style*="background: #fff"],
html[data-theme="dark"] .user-console [style*="background:#ffffff"],
html[data-theme="dark"] .user-console [style*="background:white"],
html[data-theme="dark"] .user-console [style*="background: white"]{
  background:#121c2e!important;
}
