/* =====================================================================
   看板双主题 · 外观层（BUG-145）
   只做视觉覆盖：不改任何逻辑代码与布局结构。
   - 浅色「晨白」：默认主题，即现有样式，零改动。
   - 深色「夜航」：html.theme-dark 覆盖层，Material 3 Tonal 深色规范。
   说明：甘特图弹窗（#project-dialog）画布由 JS 绘制、颜色硬编码，
        深色下保持原浅色观感（图表可读性优先），本文件不做覆盖。
   ===================================================================== */

/* —— 主题令牌（供后续迭代引用；现有组件暂用显式覆盖） —— */
:root{
  --t-bg:#f5f6f8; --t-surface:#ffffff; --t-surface-2:#f7f9fc; --t-border:#e8eaf0;
  --t-text:#182033; --t-text-2:#5b6577; --t-text-3:#9aa2b0;
  --t-primary:#5278fa; --t-primary-soft:#edf1ff;
}
html.theme-dark{
  --t-bg:#0e1320; --t-surface:#151b2a; --t-surface-2:#1a2132; --t-border:#262f42;
  --t-text:#e7ebf4; --t-text-2:#9aa5ba; --t-text-3:#6f7a90;
  --t-primary:#7c96ff; --t-primary-soft:#1c2748;
}

/* —— 全局底色与正文 —— */
html.theme-dark body{background:#0e1320;color:#e7ebf4}
html.theme-dark .main{color:#e7ebf4}

/* —— 顶栏 —— */
html.theme-dark .site-header{background:#121828;border-bottom-color:#232c40}
html.theme-dark .brand strong{color:#e7ebf4}
html.theme-dark .brand-mark{border-color:#7c96ff}
html.theme-dark .brand-mark i{background:#7c96ff}
html.theme-dark .topnav-item{color:#aab3c5}
html.theme-dark .topnav-item:hover{color:#dfe5f0}
html.theme-dark .topnav-item.active{color:#8fa5ff}
html.theme-dark .topnav-item.active:after{background:#7c96ff}
html.theme-dark .header-status{color:#8a94a8;border-color:#232c40;background:#151b2a}
html.theme-dark .global-search input{background:#1a2132;border-color:#2b3550;color:#e7ebf4}
html.theme-dark .global-search input::placeholder{color:#5d6880}
html.theme-dark .global-search input:focus{border-color:#44548c;background:#1a2132;box-shadow:0 0 0 3px rgba(124,150,255,.12)}
html.theme-dark .global-search-btn{color:#7f89a0}
html.theme-dark .global-search-btn:hover{background:#232c40;color:#8fa5ff}

/* —— 左侧项目栏 —— */
html.theme-dark .project-sidebar{background:#151b2a;border-color:#232c40}
html.theme-dark .workspace-label{color:#dfe5f0}
html.theme-dark .project-filter{color:#9aa5ba}
html.theme-dark .project-filter svg{stroke:#6f7a90}
html.theme-dark .project-filter:hover{background:#1c2333;color:#dfe5f0}
html.theme-dark .project-filter.active{background:#1c2748;color:#8fa5ff}
html.theme-dark .project-filter.active svg{stroke:#8fa5ff}

/* —— 标题与按钮 —— */
html.theme-dark .eyebrow{color:#6f7a90}
html.theme-dark .subheading{color:#7b869c}
html.theme-dark .section-heading p{color:#6f7a90}
html.theme-dark .primary-button{background:#5b7dff;box-shadow:0 3px 8px rgba(91,125,255,.22)}
html.theme-dark .primary-button:hover{background:#4a6bf0}
html.theme-dark .secondary-button,.theme-dark .outline-button,.theme-dark .file-button{background:#1a2132;border-color:#2b3550;color:#aab5c9}
html.theme-dark .outline-button:hover,.theme-dark .file-button:hover{border-color:#3d4f85;color:#c9d4ea}
html.theme-dark .quiet-button{color:#9aa5ba}
html.theme-dark .quiet-button:hover{background:#1c2333;color:#c9d4ea}
html.theme-dark .notice{background:rgba(93,124,255,.08);border-color:#24304f}
html.theme-dark .notice strong{color:#b9c6e2}
html.theme-dark .notice p{color:#7b869c}
html.theme-dark .notice code{background:#1c2748;color:#8fa5ff}
html.theme-dark .notice-icon{background:#1c2748;color:#8fa5ff}

/* —— 项目卡 —— */
html.theme-dark .project-card{background:#151b2a;border-color:#232c40;box-shadow:0 2px 6px rgba(0,0,0,.25)}
html.theme-dark .project-card:hover{border-color:#33406a;box-shadow:0 8px 20px rgba(0,0,0,.35)}
html.theme-dark .card-icon{background:#1c2748;color:#8fa5ff}
html.theme-dark .card-meta{color:#6f7a90}
html.theme-dark .card-footer{color:#76819f;border-top-color:#1f2839}
html.theme-dark .task-pill{background:#1c2333}
html.theme-dark .pc-line{background:#1f2839}
html.theme-dark .pc-team-empty{color:#5d6880}
html.theme-dark .pc-team-name{color:#76819f}
html.theme-dark .team-usage{background:#1b2334;border-color:#2a3549;color:#a9b4c8;box-shadow:0 6px 20px rgba(0,0,0,.3)}
html.theme-dark .team-usage-item b{color:#d9e2f2}
html.theme-dark .team-usage-sep{background:#33405a}
html.theme-dark .pc-bar{background:#232c40}
html.theme-dark .empty-state{background:#151b2a;border-color:#232c40}
html.theme-dark .empty-state h3{color:#dfe5f0}
html.theme-dark .empty-state p{color:#7b869c}
html.theme-dark .empty-art{background:#1c2748;color:#8fa5ff}

/* —— 通用弹窗 / 表单 —— */
html.theme-dark .dialog{background:#141a29;border-color:#262f42;color:#e7ebf4}
html.theme-dark .dialog::backdrop{background:rgba(4,8,18,.7)}
html.theme-dark .dialog-head{border-bottom-color:#1f2941}
html.theme-dark .icon-button{background:#1c2333;color:#9aa5ba}
html.theme-dark .dialog-intro{color:#8a94a8}
html.theme-dark .task-action-dialog{border-color:#2a3450}
html.theme-dark .task-action-dialog .dialog-head{border-bottom-color:#1f2941}
html.theme-dark .tam-context{background:#1a2236;border-color:#27324c}
html.theme-dark .tam-sn{color:#9db4ff;background:#222c44;border-color:#33406a}
html.theme-dark .tam-name{color:#e7ebf4}
html.theme-dark .tam-meta{color:#8a94a8}
html.theme-dark .tam-item{background:#161d2e;border-color:#27324c;color:#cfd6e4}
html.theme-dark .tam-item:hover{background:#1d2944;border-color:#3a4a78}
html.theme-dark .tam-ico{background:#222c44;color:#9db4ff}
html.theme-dark .tam-label{color:#e7ebf4}
html.theme-dark .tam-hint{color:#8a94a8}
html.theme-dark .tam-item.tam-danger{border-color:#4a2a2e}
html.theme-dark .tam-item.tam-danger .tam-ico{background:#3a2226;color:#ff8585}
html.theme-dark .tam-item.tam-danger .tam-label{color:#ff8585}
html.theme-dark .tam-item.tam-danger:hover{background:#2e1c1f;border-color:#5e3338}
html.theme-dark .tam-item.tam-danger .tam-hint{color:#c98f8f}
html.theme-dark .ps-file-item{background:#192230;border-color:#2a3346}
html.theme-dark .ps-file-name{color:#cdd6e6}
html.theme-dark .ps-file-priv{background:rgba(255,149,0,.14);color:#ffb35c;border-color:rgba(255,149,0,.25)}
html.theme-dark .fp-priv-tag{background:rgba(255,149,0,.14);color:#ffb35c;border-color:rgba(255,149,0,.25)}
html.theme-dark .ps-file-types,html.theme-dark .ps-file-size,html.theme-dark .ps-file-empty{color:#6b7689}
html.theme-dark .ps-file-dl{color:#7b9bf5}
html.theme-dark .ps-file-del{color:#5b6577}
html.theme-dark .ps-file-del:hover{color:#ff8d84}
html.theme-dark .field-label{color:#aab5c9}
html.theme-dark .text-input,.theme-dark .json-input{background:#101624;border-color:#2b3550;color:#e7ebf4}
html.theme-dark .text-input:focus,.theme-dark .json-input:focus{border-color:#4d63b8;box-shadow:0 0 0 3px rgba(124,150,255,.12)}
html.theme-dark .user-settings-select option{background:#141a29;color:#e7ebf4}
html.theme-dark .import-actions{color:#7b869c}
html.theme-dark .foot-note{color:#7b869c}
html.theme-dark .wide-dialog .dialog-head{border-bottom-color:#1f2941}

/* —— 项目详情页（顶栏 / 任务表 / 侧栏） —— */
html.theme-dark .project-bar{background:#121828;border-bottom-color:#232c40}
html.theme-dark .pb-back,.theme-dark .pb-tab,.theme-dark .pb-right-btn{color:#aab3c5}
html.theme-dark .pb-back:hover,.theme-dark .pb-tab:hover,.theme-dark .pb-right-btn:hover{color:#dfe5f0}
html.theme-dark .pb-tab.active{color:#e7ebf4}
html.theme-dark .pb-crumb{color:#dfe5f0}
html.theme-dark .pb-carets svg{stroke:#6f7a90}
html.theme-dark .pt-card,.theme-dark #project-page .pt-card{background:#151b2a;border-color:#232c40}
html.theme-dark .pt-headrow{color:#6f7a90;border-bottom-color:#1f2839}
html.theme-dark .pt-row{border-bottom-color:#1a2130}
html.theme-dark .pt-row:hover{background:#1a2132}
html.theme-dark #project-task-sidebar{background:#151b2a;border-color:#232c40}
html.theme-dark .pts-title,.theme-dark .pts-item{color:#9aa5ba}
html.theme-dark .pts-item:hover{background:#1c2333}
html.theme-dark .pts-item.active{background:#1c2748;color:#8fa5ff}

/* —— TODO 页签 —— */
html.theme-dark .todo-panel{background:#151b2a;border-color:#232c40}
html.theme-dark .todo-title{color:#e7ebf4}
html.theme-dark .todo-total{color:#8a94a8}
html.theme-dark .todo-filter{color:#9aa5ba}
html.theme-dark .todo-filter:hover{background:#1c2333;color:#dfe5f0}
html.theme-dark .todo-filter.active{background:#1c2748;color:#8fa5ff}
html.theme-dark .todo-filter.active i{color:#8fa5ff}
html.theme-dark .todo-refresh{background:#1c2333;color:#8a94a8}
html.theme-dark .todo-refresh:hover{background:#232c40;color:#8fa5ff}
html.theme-dark .todo-add{border-color:#232c40;background:#151b2a}
html.theme-dark .todo-input{color:#e7ebf4}
html.theme-dark .todo-input::placeholder{color:#5d6880}
html.theme-dark .todo-add-btn{background:#5b7dff}
html.theme-dark .todo-icon-btn,.theme-dark .todo-q,.theme-dark .todo-due{background-color:#1a2132;border-color:#2b3550;color:#9aa5ba}
html.theme-dark .todo-icon-btn:hover,.theme-dark .todo-q:hover,.theme-dark .todo-due:hover{background-color:#232c40;color:#8fa5ff}
html.theme-dark .todo-q.active{border-color:#33406a;background:#1c2748;color:#8fa5ff}
html.theme-dark .todo-row:hover{background:#1a2132}
html.theme-dark .todo-text{color:#e7ebf4}
html.theme-dark .todo-row.done .todo-text{color:#5d6880}
html.theme-dark .todo-check{background:#101624;border-color:#39435c}
html.theme-dark .todo-chip{background:#1c2333;color:#9aa5ba}
html.theme-dark .todo-link-chip{background:#1c2748;color:#8fa5ff}
html.theme-dark .todo-due-chip{background:rgba(255,149,0,.14);color:#ffb35c}
html.theme-dark .todo-due-chip.overdue{background:rgba(255,90,80,.14);color:#ff8d84}
html.theme-dark .todo-owner-chip{background:#1c2333;color:#8fa5ba}
html.theme-dark .todo-vis-chip{background:#1c2333;color:#8a94a8;border-color:#2b3550}
html.theme-dark .todo-vis-chip.private{background:rgba(255,149,0,.14);color:#ffb35c;border-color:rgba(255,149,0,.25)}
html.theme-dark .todo-prio-chip{background:#1c2333;color:#9aa5ba}
html.theme-dark .todo-prio-chip.p-low{background:#1c2333;color:#7f89a0}
html.theme-dark .todo-prio-chip.p-normal{background:#20283c;color:#c9d2e2}
html.theme-dark .todo-prio-chip.p-urgent{background:rgba(255,149,0,.14);color:#ffb35c}
html.theme-dark .todo-prio-chip.p-important{background:rgba(255,90,80,.14);color:#ff8d84}
html.theme-dark .todo-del{color:#5d6880}
html.theme-dark .todo-del:hover{background:rgba(255,90,80,.14);color:#ff8d84}
html.theme-dark .todo-empty{color:#6f7a90}
html.theme-dark .todo-pop{background:#161d2c;border-color:#262f42}
html.theme-dark .todo-prio-item:hover,.theme-dark .todo-link-item:hover,.theme-dark .todo-vis-item:hover{background:#1c2333}
html.theme-dark .todo-prio-item.current,.theme-dark .todo-link-item.current{background:#1c2748;color:#8fa5ff}
html.theme-dark .todo-vis-item-text b{color:#c9d2e2}
html.theme-dark .todo-vis-item.current .todo-vis-item-text b{color:#8fa5ff}
html.theme-dark .todo-vis-item.current svg{color:#8fa5ff}

/* —— 文件页签 —— */
html.theme-dark .files-panel{background:#151b2a;border-color:#232c40}
html.theme-dark .fp-toolbar{border-bottom-color:#1f2839}
html.theme-dark .fp-link{color:#9aa5ba}
html.theme-dark .fp-link:hover{color:#8fa5ff}
html.theme-dark .fp-quota{color:#76819f}
html.theme-dark .fp-headrow{color:#6f7a90;border-bottom-color:#1f2839}
html.theme-dark .fp-row{border-bottom-color:#1a2130}
html.theme-dark .fp-row:hover{background:#1a2132}
html.theme-dark .fp-row.fp-row-hl{background:#1c2a44;box-shadow:inset 3px 0 0 #3f8cff;animation:fpRowHlPulseDark 1.1s ease 2}
@keyframes fpRowHlPulseDark{0%,100%{background:#1c2a44}50%{background:#26426e}}
html.theme-dark .fp-empty{color:#6f7a90}
html.theme-dark .td-fp-body{color:#cdd5e4}
html.theme-dark .fp-group-title{color:#cdd5e4}
html.theme-dark .fp-group-count{background:#222b3d;color:#8a94a8}
html.theme-dark .fp-group-empty{background:#171f2e;border-color:#27304a;color:#6f7a90}
html.theme-dark .fp-group + .fp-group .fp-list{border-top-color:#1a2130}
html.theme-dark .fp-list .fp-row:first-child{border-top-color:#1a2130}
html.theme-dark .fp-th-check{color:#9aa5ba}
html.theme-dark .fp-check{accent-color:#5b7dff}
html.theme-dark .fp-row:has(.fp-check:checked){background:#1a2438}
html.theme-dark .fp-batch-del{color:#ff8585;border-color:#4a2a2e;background:#161d2e}
html.theme-dark .fp-batch-del:hover{background:#2e1c1f;border-color:#5e3338}
html.theme-dark .fp-batch-del .fp-batch-count{background:#3a2226;color:#ff8585}
html.theme-dark .fp-batch-del.active{background:#ff5b5b;color:#1a1f2b;border-color:#ff5b5b}
html.theme-dark .fp-batch-del.active:hover{background:#ff7070}
html.theme-dark .fp-batch-del.active .fp-batch-count{background:#1a1f2b;color:#ff5b5b}
html.theme-dark .fp-batch-cancel{color:#aab3c5;border-color:#2c364a;background:#161d2e}
html.theme-dark .fp-batch-cancel:hover{background:#1e2638;border-color:#3a465e}

/* —— 看板四宫格 —— */
html.theme-dark .db-panel{background:#151b2a;border-color:#232c40}
html.theme-dark .db-panel-head{border-bottom-color:#1f2839}
html.theme-dark .db-panel-title h2{color:#e7ebf4}
html.theme-dark .db-panel-sub{color:#6f7a90}
html.theme-dark .db-count{background:#1c2333;color:#8a94a8}
html.theme-dark .db-icon-btn{color:#76819f}
html.theme-dark .db-icon-btn:hover{background:#1c2333;color:#8fa5ff}
html.theme-dark .db-link-btn{color:#8a94a8}
html.theme-dark .db-link-btn:hover{background:#1c2333;color:#8fa5ff}
html.theme-dark .db-filter-toggle{background:#1a2132;border-color:#2b3550;color:#9aa5ba}
html.theme-dark .db-filter-toggle:hover{background:#232c40;color:#8fa5ff}
html.theme-dark .db-todo-row,.theme-dark .db-task-row,.theme-dark .db-proj-row{color:#c9d2e2}
html.theme-dark .db-todo-row:hover,.theme-dark .db-task-row:hover,.theme-dark .db-proj-row:hover{background:#1a2132}
html.theme-dark .db-proj-gantt:hover{background:#26304a}
html.theme-dark .db-todo-row.done .db-todo-text{color:#5d6880}
html.theme-dark .db-todo-group{background:#1c2333;color:#8a94a8}
html.theme-dark .db-todo-group.overdue{background:rgba(255,90,80,.14);color:#ff8d84}
html.theme-dark .db-todo-check{border-color:#3a4459;background:#141a27}
html.theme-dark .db-todo-check.checked{background:#27ae60;border-color:#27ae60}
html.theme-dark .db-todo-group.today{background:rgba(255,180,40,.14);color:#ffcf6b}
html.theme-dark .db-todo-proj,.theme-dark .db-task-proj,.theme-dark .db-task-meta{color:#7b869c}
html.theme-dark .db-todo-task{color:#aebbe0;background:#1a2438;border-color:#283452}
html.theme-dark .db-sub{color:#6f7a90;border-top-color:#1f2839}
html.theme-dark .db-empty{color:#6f7a90}
html.theme-dark .db-task-bar,.theme-dark .db-proj-bar,.theme-dark .db-work-bar{background:#232c40}
html.theme-dark .db-task-pct,.theme-dark .db-proj-pct,.theme-dark .db-work-pct{color:#8a94a8}
html.theme-dark .db-avg{background:#151b2a;border-top-color:#1f2839;color:#8a94a8}
html.theme-dark .db-avg-bar{background:#232c40}
html.theme-dark .db-avg-num{color:#7b9bf5}
html.theme-dark .db-stat-num{color:#e7ebf4}
html.theme-dark .db-stat-label{color:#8a94a8}
html.theme-dark .db-stat-sub{color:#6f7a90}
html.theme-dark .db-filter-menu{background:#161d2c;border-color:#262f42}
html.theme-dark .db-filter-menu button{color:#aab5c9}
html.theme-dark .db-filter-menu button.active{background:#1c2748;color:#8fa5ff}

/* —— 通用下拉（项目列表页 + 看板共用） —— */
html.theme-dark .filter-toggle{background:#1a2132;border-color:#2b3550;color:#9aa5ba}
html.theme-dark .filter-toggle.group-team-toggle[aria-pressed="true"]{background:#1e2a48;border-color:#3b56a8;color:#9fb4ff}
html.theme-dark #projects .project-team-divider{color:#cbd5e7}
html.theme-dark .project-team-divider .ptd-line{background:#2a3549}
html.theme-dark .filter-menu{background:#161d2c;border-color:#262f42}
html.theme-dark .filter-menu button{color:#aab5c9}
html.theme-dark .filter-menu button.active{background:#1c2748;color:#8fa5ff}

/* —— 数据页签（主要表面） —— */
html.theme-dark .data-panel{background:#151b2a;border-color:#232c40}
html.theme-dark .dp-card{background:#161d2c;border-color:#232c40}
html.theme-dark .dp-cardtitle{color:#e7ebf4}
html.theme-dark .dp-cardtitle em{color:#7b869c}
html.theme-dark .dp-axisbtns{background:#1c2333}
html.theme-dark .dp-axis{color:#9aa5ba}
html.theme-dark .dp-axis.active{background:#4a66e0;color:#fff}

/* —— 用户设置浮框 —— */
html.theme-dark .user-settings-nav{background:#101624;border-right-color:#1f2839}
html.theme-dark .user-settings-nav-item{color:#9aa5ba}
html.theme-dark .user-settings-nav-item:hover{background:#1c2333;color:#dfe5f0}
html.theme-dark .user-settings-nav-item.active{background:#1c2748;color:#8fa5ff}
html.theme-dark .user-settings-title{color:#e7ebf4}
html.theme-dark .user-settings-desc{color:#8a94a8}
html.theme-dark .user-settings-tip{color:#6f7a90}
html.theme-dark .user-settings-tip code{background:#1c2748;color:#8fa5ff}
html.theme-dark .user-settings-notice{background:rgba(93,124,255,.08);border-color:#24304f;color:#b9c6e2}
html.theme-dark .user-settings-notice-icon{background:#1c2748;color:#8fa5ff}

/* —— 主题选择卡片（设置浮框 · 外观页） —— */
.theme-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0 6px}
.theme-card{position:relative;border:1.5px solid #dbe1ea;border-radius:12px;background:#fff;padding:10px;cursor:pointer;font:inherit;text-align:left;transition:border-color .15s,transform .15s}
.theme-card:hover{transform:translateY(-1px)}
.theme-card.active{border-color:#5278fa;box-shadow:0 0 0 3px rgba(82,120,250,.12)}
.theme-card .theme-thumb{height:86px;border-radius:8px;overflow:hidden;border:1px solid rgba(0,0,0,.06);display:flex;flex-direction:column}
.theme-thumb .tt-head{height:18px;display:flex;align-items:center;gap:4px;padding:0 7px;flex:none}
.theme-thumb .tt-dot{width:5px;height:5px;border-radius:50%;flex:none}
.theme-thumb .tt-nav{width:26px;height:4px;border-radius:2px;flex:none}
.theme-thumb .tt-body{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:7px}
.theme-thumb .tt-cell{border-radius:4px}
.theme-thumb-light .tt-head{background:#fff;border-bottom:1px solid #e8eaf0}
.theme-thumb-light .tt-body{background:#f5f6f8}
.theme-thumb-light .tt-cell{background:#fff;border:1px solid #e8eaf0}
.theme-thumb-light .tt-nav{background:#5278fa}
.theme-thumb-light .tt-dot{background:#5278fa}
.theme-thumb-dark .tt-head{background:#121828;border-bottom:1px solid #232c40}
.theme-thumb-dark .tt-body{background:#0e1320}
.theme-thumb-dark .tt-cell{background:#151b2a;border:1px solid #262f42}
.theme-thumb-dark .tt-nav{background:#7c96ff}
.theme-thumb-dark .tt-dot{background:#7c96ff}
.theme-card .theme-name{display:flex;align-items:center;gap:6px;margin-top:9px;font-size:12.5px;font-weight:600;color:#2c3850}
.theme-card .theme-desc{font-size:11px;color:#8a94a6;margin-top:2px}
.theme-card .theme-check{position:absolute;top:14px;right:12px;width:20px;height:20px;border-radius:50%;background:#5278fa;color:#fff;font-size:12px;display:none;align-items:center;justify-content:center}
.theme-card.active .theme-check{display:flex}
html.theme-dark .theme-card{background:#1a2132;border-color:#2b3550}
html.theme-dark .theme-card.active{border-color:#7c96ff;box-shadow:0 0 0 3px rgba(124,150,255,.16)}
html.theme-dark .theme-card .theme-name{color:#e7ebf4}
html.theme-dark .theme-card .theme-desc{color:#7b869c}
html.theme-dark .theme-thumb{border-color:rgba(255,255,255,.08)}

html.theme-dark .db-stat-bar{background:#232c40}
html.theme-dark .db-stat-sub .danger{color:#ff8d84}
html.theme-dark .db-stat-sub .ok{color:#6abf4b}
html.theme-dark .db-work-sub{color:#6f7a90}
html.theme-dark .db-dist-row:hover{background:#1a2132}
html.theme-dark .db-dist-label{color:#9aa5ba}
html.theme-dark .db-dist-bar{background:#232c40}
html.theme-dark .db-dist-num{color:#8a94a8}

/* 任务详情抽屉（深色） */
html.theme-dark #project-dialog .td-drawer{ background: #151b2a; border-left-color: #232c40; box-shadow: -8px 0 28px rgba(0, 0, 0, .45); }
html.theme-dark .td-head, html.theme-dark .td-tabs{ border-bottom-color: #232c40; }
html.theme-dark .td-name{ background: #1b2233; border-color: #2b3448; color: #e6ebf5; }
html.theme-dark .td-hbtn{ background: #1b2233; border-color: #2b3448; color: #b6c0d4; }
html.theme-dark .td-x{ color: #8a94a8; }
html.theme-dark .td-x:hover{ color: #e6ebf5; }
html.theme-dark .td-tabs button{ color: #9aa4ba; }
html.theme-dark .td-tabs button.active{ color: #7b9bf5; }
html.theme-dark .td-tabs button.active::after{ background: #7b9bf5; }
html.theme-dark .td-sec-title{ color: #8a94a8; }
html.theme-dark .td-f, html.theme-dark .td-f > span{ color: #9aa4ba; }
html.theme-dark .td-input{ background: #1b2233; border-color: #2b3448; color: #e6ebf5; }
html.theme-dark .td-input[readonly], html.theme-dark .td-input:disabled{ background: #171d2b; color: #8a94a8; }
html.theme-dark .td-plus{ background: #1b2233; border-color: #2b3448; color: #b6c0d4; }
html.theme-dark .td-help-q{ border-color: #3a445c; color: #aab4c8; }
html.theme-dark .td-help-q:hover{ border-color: #5a7dff; color: #5a7dff; }
/* 任务详情抽屉：关联需求/风险只读卡片（深色） */
html.theme-dark #project-dialog .td-linked-card{ border-color: #2b3448; background: #1b2233; }
html.theme-dark #project-dialog .td-linked-head{ background: #171d2b; border-bottom-color: #2b3448; }
html.theme-dark #project-dialog .td-linked-title{ color: #dbe3f2; }
html.theme-dark #project-dialog .td-linked-meta{ color: #8a94a8; }
html.theme-dark #project-dialog .td-linked-empty{ border-color: #2b3448; background: #171d2b; color: #8a94a8; }
html.theme-dark #project-dialog .td-linked-grid .req-grid thead th,
html.theme-dark #project-dialog .td-linked-grid .bug-grid thead th{ background: #222b3d; color: #c9d3e6; }
html.theme-dark #project-dialog .td-linked-grid .req-grid th,
html.theme-dark #project-dialog .td-linked-grid .req-grid td,
html.theme-dark #project-dialog .td-linked-grid .bug-grid th,
html.theme-dark #project-dialog .td-linked-grid .bug-grid td{ border-color: #2b3448; color: #c9d3e6; }
/* 输入控件自带深色字（.req-cell/.bug-cell 硬编码 #303b50），暗色下需单独提亮；行头/角标补暗底，避免浅底浅字 */
html.theme-dark #project-dialog .td-linked-grid input.req-cell,
html.theme-dark #project-dialog .td-linked-grid input.bug-cell,
html.theme-dark #project-dialog .td-linked-grid .req-color-cell,
html.theme-dark #project-dialog .td-linked-grid .bug-color-cell{ color: #c9d3e6; }
html.theme-dark #project-dialog .td-linked-grid .req-grid .req-row-head,
html.theme-dark #project-dialog .td-linked-grid .req-grid .req-corner,
html.theme-dark #project-dialog .td-linked-grid .bug-grid .bug-row-head,
html.theme-dark #project-dialog .td-linked-grid .bug-grid .bug-corner{ background: #222b3d; }
html.theme-dark .td-overdue{ background: rgba(229, 72, 77, .16); color: #ff8d84; }
html.theme-dark .td-deviation{ background: #161c2a; border-color: #283149; }
html.theme-dark .td-dev-row{ color: #b6c0d4; }
html.theme-dark .td-dev-head{ color: #d7deec; }
html.theme-dark .td-dev-early{ color: #57c97e; }
html.theme-dark .td-dev-late{ color: #ff8d84; }
html.theme-dark .td-dev-info{ color: #7c8798; }
html.theme-dark .td-editor{ border-color: #2b3448; }
html.theme-dark .td-tools{ background: #1a2130; border-bottom-color: #232c40; }
html.theme-dark .td-tools button{ color: #b6c0d4; }
html.theme-dark .td-tools button:hover{ background: #26304a; }
html.theme-dark .td-tsep{ background: #2b3448; }
html.theme-dark .td-note{ color: #e6ebf5; }
html.theme-dark .td-todo{ color: #d5dceb; }
html.theme-dark .td-todo:hover{ background: #1a2132; }
html.theme-dark .td-todo.done .td-todo-text{ color: #6f7a90; }
html.theme-dark .td-todo-composer{ background: #161c2a; border-color: #232c40; }
html.theme-dark #project-dialog .td-todo-due:placeholder-shown{ background: #1c2333; color: #7f89a0; }
html.theme-dark .td-todo-pop{ background: #151b28; border-color: #28324a; box-shadow: 0 12px 34px rgba(0, 0, 0, .5); }
html.theme-dark .td-todo-prio-item{ color: #c9d2e2; }
html.theme-dark .td-todo-prio-item:hover{ background: #1c2333; }
html.theme-dark .td-todo-prio-item.current{ background: #1c2748; color: #8fa5ff; }
html.theme-dark .td-file{ background: #1a2132; border-color: #2b3448; }
html.theme-dark .td-file-main b, html.theme-dark .td-file-main span, html.theme-dark .td-file-foot span{ color: #d5dceb; }
html.theme-dark .td-meta{ border-color: #2b3448; }
html.theme-dark .td-meta-k{ background: #1a2132; color: #8a93a3; border-right-color: #232c40; }
html.theme-dark .td-meta-v{ color: #d5dceb; }
html.theme-dark .td-meta-row{ border-bottom-color: #232c40; }
html.theme-dark .td-save{ background: #3b5bdb; }
html.theme-dark .td-save:hover{ background: #4a6ae8; }

/* 依赖选择浮框（深色） */
html.theme-dark #project-dialog .td-dep-pop{ background: #151b2a; border-color: #2b3448; box-shadow: 0 12px 32px rgba(0, 0, 0, .5); }
html.theme-dark .td-dep-pop-head{ border-bottom-color: #232c40; }
html.theme-dark .td-dep-pop-head b{ color: #e6ebf5; }
html.theme-dark .td-dep-search{ border-bottom-color: #232c40; }
html.theme-dark .td-dep-search input{ background: #1b2233; border-color: #2b3448; color: #e6ebf5; }
html.theme-dark .td-dep-item{ color: #d5dceb; }
html.theme-dark .td-dep-item:hover{ background: #1a2132; }
html.theme-dark .td-dep-item i{ background: rgba(123, 155, 245, .16); color: #9db4ff; }
html.theme-dark .td-dep-item em{ color: #6f7a90; }
html.theme-dark .td-dep-item select.td-dep-type{ background: #1a2132; border-color: #2b3448; color: #d5dceb; }
html.theme-dark .td-dep-foot{ background: #1a2130; border-top-color: #232c40; }
html.theme-dark .td-dep-foot button{ background: #1b2233; border-color: #2b3448; color: #b6c0d4; }
html.theme-dark .td-dep-foot button.primary{ background: #3b5bdb; border-color: #3b5bdb; color: #fff; }

/* 登录弹窗（深色主题） */
html.theme-dark .auth-login-dialog{ background: #141a29; border-color: #262f42; }
html.theme-dark .auth-login-close{ background: #1c2333; color: #9aa5ba; }
html.theme-dark .auth-switch-tab{ background: #101624; border-color: #2b3550; color: #aab5c9; }
html.theme-dark .auth-switch-tab:hover{ border-color: #3d4f85; color: #c9d4ea; }
html.theme-dark .auth-switch-tab.active{ background: #1a2440; border-color: #4d63b8; color: #c9d4ea; box-shadow: inset 0 0 0 1px #4d63b8; }
html.theme-dark .auth-login-heading{ color: #e7ebf4; }
html.theme-dark .auth-input{ background: #101624; border-color: #2b3550; color: #e7ebf4; }
html.theme-dark .auth-input:focus{ background: #0c1220; border-color: #4d63b8; }
html.theme-dark .auth-link{ color: #8aa2ff; }
html.theme-dark .auth-agreement{ color: #9aa5ba; }
html.theme-dark .auth-agree-link{ color: #8aa2ff; }

/* 项目模板搜索模块（项目列表页） */
html.theme-dark .tpl-search-module{ background: #151b2a; border-color: #232c40; }
html.theme-dark .tsm-bar{ background: #7c96ff; }
html.theme-dark .tsm-head h2{ color: #dfe5f0; }
html.theme-dark .tsm-search{ background: #101624; border-color: #2b3550; }
html.theme-dark .tsm-search:focus-within{ border-color: #4d63b8; box-shadow: 0 0 0 3px rgba(124,150,255,.12); }
html.theme-dark .tsm-input{ color: #e7ebf4; }
html.theme-dark .tsm-input::placeholder{ color: #5d6880; }
html.theme-dark .tsm-search-btn{ background: #5b7dff; border-left-color: #2b3550; }
html.theme-dark .tsm-search-btn:hover{ background: #4a6bf0; }
html.theme-dark .tsm-square-link{ color: #8aa2ff; }
html.theme-dark .tsm-square-link:hover{ background: #1c2333; }
html.theme-dark .tsm-rec-empty{ color: #6f7a90; }
html.theme-dark .tsm-card{ background: #1a2132; border-color: #2b3448; }
html.theme-dark .tsm-card:hover{ background: #1c2748; border-color: #3d4f85; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
html.theme-dark .tsm-card-name{ color: #c9d2e2; }
html.theme-dark .tpl-square-dialog{ background:#141b29; border-color:#2a3450; color:#e6ebf4; }
html.theme-dark .tpl-square-dialog .dialog-head{ border-bottom-color:#2a3450; }
html.theme-dark .tpl-square-cats{ border-right-color:#2a3450; }
html.theme-dark .tpl-square-cat{ color:#c9d2e2; }
html.theme-dark .tpl-square-cat:hover{ background:#1c2333; }
html.theme-dark .tpl-square-cat.active{ background:#233156; color:#9db4ff; }
html.theme-dark .tpl-square-cat-desc{ color:#6f7a90; }
html.theme-dark .tpl-square-cat.active .tpl-square-cat-desc{ color:#7d97e0; }
html.theme-dark .tpl-square-cards-head > span:first-child{ color:#dfe5f0; }
html.theme-dark .tpl-mine-btn{ background:#1a2132; border-color:#2b3448; color:#c9d2e2; }
html.theme-dark .tpl-mine-btn:hover{ background:#1c2748; border-color:#3d4f85; color:#9db4ff; }
html.theme-dark .tpl-mine-btn.active{ background:#2f6bff; border-color:#2f6bff; color:#fff; }
html.theme-dark .tpl-square-del{ background:rgba(229,72,77,.22); }
html.theme-dark .tpl-square-count{ color:#6f7a90; }
html.theme-dark .tpl-square-card{ background:#1a2132; border-color:#2b3448; }
html.theme-dark .tpl-square-card:hover{ background:#1c2748; border-color:#3d4f85; box-shadow:0 6px 18px rgba(0,0,0,.35); }
html.theme-dark .tpl-square-card-cat{ color:#9db4ff; background:#233156; }
html.theme-dark .tpl-square-card-desc{ color:#6f7a90; }
html.theme-dark .tpl-square-card-sharer{ color:#6f7a90; }
html.theme-dark .tpl-square-card-sharer.anon{ color:#566079; }
html.theme-dark .share-tpl-dialog{ background:#141b29; border-color:#2a3450; color:#e6ebf4; }
html.theme-dark .share-tpl-sharer{ border-color:#2b3448; }
html.theme-dark .share-radio{ color:#c9d2e2; }
html.theme-dark .tpl-square-empty{ color:#6f7a90; }

/* ============================================================
   补充深色覆盖 · 非甘特板块（自查补全 · 2026-10-26）
   以下板块此前为浅色硬编码、未接入主题层：
   数据页签 / 头像浮框·账号切换 / 项目切换浮框 / 上传·通用弹窗 /
   在线文档编辑器 / 账号设置 / 用户管理浮窗 / 团队设置弹窗 /
   通知中心 / 智能创建·AI 生成弹窗 / 脑图编辑器外壳
   说明：甘特表画布与脑图 KityMinder 画布为第三方自绘组件，
        保持浅色观感（同甘特表约定），此处只适配外壳与浮层。
   ============================================================ */

/* —— 数据页签：顶部范围选择器 + 弹窗 —— */
html.theme-dark .dp-top{ background:#151b2a; border-color:#232c40; }
html.theme-dark .dp-ranges,html.theme-dark .dp-scope{ background:#1c2333; }
html.theme-dark .dp-range{ color:#9aa5ba; }
html.theme-dark .dp-range:hover{ color:#dfe5f0; }
html.theme-dark .dp-range.active{ background:#1a2132; color:#e7ebf4; box-shadow:0 1px 3px rgba(0,0,0,.35); }
html.theme-dark .dp-all{ color:#9aa5ba; }
html.theme-dark .dp-all:hover{ color:#dfe5f0; }
html.theme-dark .dp-all.active{ background:#1c2748; border-color:#3d4f85; color:#8fa5ff; }
html.theme-dark .dp-daterange{ background:#1a2132; border-color:#2b3550; color:#cdd6e6; }
html.theme-dark .dp-arrow{ color:#8a94a8; }
html.theme-dark .dp-arrow:hover{ background:#232c40; color:#8fa5ff; }
html.theme-dark .dp-range-text{ color:#cdd6e6; }
html.theme-dark .dp-modal{ background:#141a29; border-color:#262f42; box-shadow:0 18px 50px rgba(0,0,0,.5); }
html.theme-dark .dp-modal-head{ border-bottom-color:#1f2941; }
html.theme-dark .dp-modal-head h2{ color:#e7ebf4; }
html.theme-dark .dp-modal-op{ color:#8a94a8; }
html.theme-dark .dp-modal-op:hover{ background:#232c40; color:#e7ebf4; }
html.theme-dark .dp-mask{ background:rgba(4,8,18,.5); }
html.theme-dark .dp-modal-body.dp-body-list>.dp-tasklist::-webkit-scrollbar-thumb{ background:#2b3550; border-color:#141a29; }
html.theme-dark .dp-hint{ background:#1c2748; border-color:#2a3a63; color:#a9b8dc; }
html.theme-dark .dp-hint:hover{ background:#223057; border-color:#3a4f85; color:#c2d0ee; }
html.theme-dark .dp-hint.dp-hint-static,html.theme-dark .dp-hint.dp-hint-static:hover{ background:#1c2748; border-color:#2a3a63; color:#a9b8dc; }
html.theme-dark .dp-pill{ background:#1c2333; color:#8a94a8; border-color:#2b3550; }
html.theme-dark .dp-pill.on{ background:#16331f; color:#6abf4b; }
html.theme-dark .dp-pill.doing{ background:#1c2748; color:#8fa5ff; }
html.theme-dark .dp-needuser{ background:#2a2410; border-color:#5a4a1e; color:#e0b35c; }
html.theme-dark .dp-minetabs{ border-bottom-color:#1f2839; }
html.theme-dark .dp-minetab b{ color:#8a94a8; }
html.theme-dark .dp-minetab span{ color:#6f7a90; }
html.theme-dark .dp-minetab.active{ border-bottom-color:#7c96ff; }
html.theme-dark .dp-minetab.active b{ color:#8fa5ff; }
html.theme-dark .dp-minetab.active span{ color:#9aa5ba; }
html.theme-dark .dp-metric{ background:#161d2c; border-color:#232c40; }
html.theme-dark .dp-metric:hover{ background:#1c2333; }
html.theme-dark .dp-metric strong{ color:#e7ebf4; }
html.theme-dark .dp-metric span{ color:#8a94a8; }
html.theme-dark .dp-pstat{ background:#161d2c; border-color:#232c40; }
html.theme-dark .dp-pstat-label{ color:#8a94a8; }
html.theme-dark .dp-pstat strong{ color:#e7ebf4; }
html.theme-dark .dp-pstat-sub{ color:#6f7a90; }
html.theme-dark .dp-mrow:hover,html.theme-dark .dp-msrow:hover,html.theme-dark .dp-taskrow:hover{ background:#1a2132; }
html.theme-dark .dp-mtable-head{ color:#6f7a90; border-bottom-color:#1f2839; }
html.theme-dark .dp-mrow{ color:#c9d2e2; }
html.theme-dark .dp-mthead{ color:#6f7a90; }

/* —— 右上角头像浮框 / 账号切换 —— */
html.theme-dark .auth-toggle{ color:#9aa5ba; }
html.theme-dark .auth-switch{ background:#39435c; }
html.theme-dark .site-bell{ color:#9aa5ba; }
html.theme-dark .site-bell:hover{ background:#1c2333; color:#dfe5f0; }
html.theme-dark .site-help{ color:#9aa5ba; }
html.theme-dark .site-help:hover{ background:#1c2333; color:#dfe5f0; }
html.theme-dark .help-menu{ background:#141a29; border-color:#262f42; }
html.theme-dark .help-menu-item{ color:#c9d2e2; }
html.theme-dark .help-menu-item:hover{ background:#1c2748; color:#aebfff; }
html.theme-dark .fb-cat{ border-color:#2b3550; color:#aab4c8; }
html.theme-dark .fb-cat:hover{ border-color:#3a466a; }
html.theme-dark .fb-cat:has(input:checked){ border-color:#4d63b8; background:#1c2748; color:#aebfff; }
html.theme-dark .text-area{ background:#101624; border-color:#2b3550; color:#e7ebf4; }
html.theme-dark .text-area:focus{ border-color:#4d63b8; box-shadow:0 0 0 3px rgba(124,150,255,.12); }
html.theme-dark .fb-item{ background:#141a29; border-color:#262f42; }
html.theme-dark .fb-item-title{ color:#e7ebf4; }
html.theme-dark .fb-item-content{ color:#c2ccde; }
html.theme-dark .fb-badge.cat-改进建议{ background:#1c2748; color:#8fa5ff; }
html.theme-dark .fb-badge.cat-系统BUG{ background:#3a2522; color:#ff9a90; }
html.theme-dark .fb-badge.status-pending{ background:#3a2f1c; color:#e0b566; }
html.theme-dark .fb-badge.status-done{ background:#1c3326; color:#7fd6a0; }
html.theme-dark .auth-popover{ background:#141a29; border-color:#262f42; box-shadow:0 14px 34px rgba(0,0,0,.5); }
html.theme-dark .auth-popover-head{ border-bottom-color:#1f2941; }
html.theme-dark .auth-popover-name{ color:#e7ebf4; }
html.theme-dark .auth-popover-phone{ color:#8a94a8; }
html.theme-dark .auth-menu-item{ color:#aab5c9; }
html.theme-dark .auth-menu-item:hover{ background:#1c2333; color:#8fa5ff; }
html.theme-dark .auth-switch-list{ background:#1a2132; }
html.theme-dark .auth-user-item{ color:#aab5c9; }
html.theme-dark .auth-user-item:hover{ background:#26304a; color:#8fa5ff; }
html.theme-dark .auth-user-item.current{ color:#8fa5ff; background:#1c2748; }
html.theme-dark .auth-user-avatar{ background:#26304a; color:#8fa5ff; }
html.theme-dark .auth-user-item-check{ color:#8fa5ff; background:#1c2748; }
html.theme-dark .auth-user-remove{ color:#7c8aa3; }
html.theme-dark .auth-user-remove:hover{ background:#3a2430; color:#ff8b8b; }
html.theme-dark .auth-switch-toggle .auth-caret{ color:#9aa5ba; }

/* —— 项目切换浮框 —— */
html.theme-dark .psw-pop{ background:#141a29; border-color:#262f42; box-shadow:0 12px 32px rgba(0,0,0,.5); }
html.theme-dark .psw-search{ background:#1a2132; border-color:#2b3550; }
html.theme-dark .psw-search input{ color:#e7ebf4; }
html.theme-dark .psw-meta{ color:#8a94a8; border-bottom-color:#1f2839; }
html.theme-dark .psw-group{ color:#8a94a8; }
html.theme-dark .psw-item{ color:#e7ebf4; }
html.theme-dark .psw-item:hover{ background:#1a2132; }
html.theme-dark .psw-item.current{ background:#1c2748; color:#8fa5ff; }
html.theme-dark .psw-item-star{ color:#ffcf6b; }
html.theme-dark .psw-item-dot{ background:#39435c; }
html.theme-dark .psw-item-dot.on{ background:#2fbf71; }
html.theme-dark .psw-item-check{ color:#8fa5ff; }
html.theme-dark .psw-empty{ color:#8a94a8; }
html.theme-dark .psw-foot{ color:#6f7a90; border-top-color:#1f2839; }

/* —— 上传文件 / 通用提示弹窗 —— */
html.theme-dark .upl-dialog,html.theme-dark .alert-dialog{ background:#141a29; border-color:#262f42; color:#e7ebf4; }
html.theme-dark .upl-head{ border-bottom-color:#1f2941; }
html.theme-dark .upl-head h2{ color:#e7ebf4; }
html.theme-dark .upl-label{ color:#9aa5ba; }
html.theme-dark .upl-select{ background:#101624; border-color:#2b3550; color:#e7ebf4; }
html.theme-dark .upl-select:focus{ border-color:#4d63b8; box-shadow:0 0 0 3px rgba(124,150,255,.12); }
html.theme-dark .upl-caret{ stroke:#6f7a90; }
html.theme-dark .upl-radio{ color:#e7ebf4; }
html.theme-dark .upl-drop{ background:#101624; border-color:#2b3550; }
html.theme-dark .upl-drop:hover,html.theme-dark .upl-drop.dragover{ border-color:#3d4f85; background:#1a2132; }
html.theme-dark .upl-cloud{ stroke:#5b7dff; }
html.theme-dark .upl-drop-main{ color:#c9d2e2; }
html.theme-dark .upl-drop-sub{ color:#6f7a90; }
html.theme-dark .upl-file{ background:#192230; border-color:#2a3346; color:#cdd6e6; }
html.theme-dark .upl-file-name{ color:#cdd6e6; }
html.theme-dark .upl-file-size{ color:#6b7689; }
html.theme-dark .upl-file-x{ color:#6b7689; }
html.theme-dark .upl-file-x:hover{ color:#ff8d84; }
html.theme-dark .upl-error{ color:#ff8d84; }
html.theme-dark .upl-btn{ background:#1a2132; border-color:#2b3550; color:#aab5c9; }
html.theme-dark .upl-btn:hover{ background:#232c40; }
html.theme-dark .upl-btn.primary{ background:#5b7dff; border-color:#5b7dff; color:#fff; }
html.theme-dark .upl-btn.primary:hover{ background:#4a6bf0; }
html.theme-dark .alert-body{ color:#aab5c9; }

/* —— 在线文档编辑器 —— */
html.theme-dark .doc-head{ border-bottom-color:#1f2941; }
html.theme-dark .doc-head h2{ color:#e7ebf4; }
html.theme-dark .doc-name,html.theme-dark .doc-task{ background:#101624; border-color:#2b3550; color:#e7ebf4; }
html.theme-dark .doc-name:focus,html.theme-dark .doc-task:focus{ border-color:#4d63b8; background:#0c1220; box-shadow:0 0 0 3px rgba(124,150,255,.12); }
html.theme-dark .ai-polish-btn{ background:#101624; border-color:#2b3550; color:#e7ebf4; }
html.theme-dark .ai-polish-btn:hover{ border-color:#3d4f85; background:#1a2132; }
html.theme-dark .ai-polish-btn:active{ background:#1c2333; }
html.theme-dark .ai-polish-spark{ color:#8fa5ff; }
html.theme-dark .doc-toolbar{ background:#161d2c; border-bottom-color:#232c40; }
html.theme-dark .dt-btn{ color:#b6c0d4; }
html.theme-dark .dt-btn:hover{ background:#26304a; color:#8fa5ff; }
html.theme-dark .dt-sep{ background:#2b3550; }
html.theme-dark .dt-select{ background:#101624; border-color:#2b3550; color:#b6c0d4; }
html.theme-dark .doc-editor{ background:#141a29; color:#e7ebf4; }
html.theme-dark .doc-editor:empty::before{ color:#5d6880; }
html.theme-dark .doc-editor blockquote{ color:#9aa5ba; border-left-color:#2b3550; }
html.theme-dark .doc-meta{ background:#101624; border-top-color:#1f2839; color:#6f7a90; }
html.theme-dark .doc-actions{ border-top-color:#1f2941; }
html.theme-dark .doc-error{ color:#ff8d84; }
html.theme-dark .doc-error:not(:empty){ background:#3a1d20; border-color:#6b3038; color:#ff9a92; }
html.theme-dark .doc-hint{ color:#76819f; }
html.theme-dark .doc-hint.is-warn{ color:#f0b86a; }
/* 管理员 AI 用量统计弹窗 */
html.theme-dark #ai-usage-dialog{ background:#151c2b; color:#e7ebf4; border-color:#2b3550; }
html.theme-dark #ai-usage-dialog .aiu-head,
html.theme-dark #ai-usage-dialog .aiu-foot{ border-color:#2b3550; }
html.theme-dark #ai-usage-dialog .aiu-head h2,
html.theme-dark #ai-usage-dialog .aiu-detail-head h3,
html.theme-dark #ai-usage-dialog .aiu-sumcard b{ color:#e7ebf4; }
html.theme-dark #ai-usage-dialog .aiu-sumcard{ background:#1a2132; border-color:#2b3550; }
html.theme-dark #ai-usage-dialog .aiu-chart{ background:#101624; border-color:#2b3550; }
html.theme-dark .aiu-bar{ fill:#8fa5ff; }
html.theme-dark .aiu-line{ stroke:#f0b86a; }
html.theme-dark .aiu-dot{ fill:#f0b86a; }
html.theme-dark .aiu-grid{ stroke:#2b3550; }
html.theme-dark .aiu-axis{ stroke:#3d4f85; }
html.theme-dark .aiu-label{ fill:#8b96ae; }
html.theme-dark #ai-usage-dialog .aiu-config{ background:#26315a; color:#a9b8ff; }
html.theme-dark #ai-usage-dialog .aiu-left.is-low{ color:#ff8d84; }
html.theme-dark #ai-usage-dialog .aiu-billing{ background:#26315a; color:#a9b8ff; }
html.theme-dark #ai-usage-dialog .aiu-billing.is-team{ background:#1d3a30; color:#8fd3ae; }
html.theme-dark #ai-usage-dialog .aiu-filter-count,
html.theme-dark #ai-usage-dialog .aiu-time{ color:#8b96ae; }

/* —— 账号设置（账号信息 / 密码设置）+ 项目团队分组 chips —— */
html.theme-dark .acct-tabs{ background:#1c2333; }
html.theme-dark .acct-tab{ color:#9aa5ba; }
html.theme-dark .acct-tab.active{ background:#151b2a; color:#e7ebf4; box-shadow:0 1px 3px rgba(0,0,0,.3); }
html.theme-dark .acct-profile{ background:linear-gradient(120deg,#1c2748,#161d2c 60%,#1c2748); border-color:#2a3a63; }
html.theme-dark .acct-status{ background:#1c2333; color:#8a94a8; }
html.theme-dark .acct-status.on{ background:#15321f; color:#6abf4b; }
html.theme-dark .acct-status.on::before{ background:#2f9e58; }
html.theme-dark .acct-account{ color:#e7ebf4; }
html.theme-dark .acct-name-row .acct-role-tag{ color:#a9bcff; background:#23305c; border-color:#33457f; }
html.theme-dark .acct-nickname{ color:#8a94a8; }
html.theme-dark .acct-card{ background:#161d2c; border-color:#232c40; }
html.theme-dark .acct-card-head h3{ color:#e7ebf4; }
html.theme-dark .acct-hint{ color:#6f7a90; }
html.theme-dark #upd-current-ver[data-state="doing"]{ color:#fb923c; }
html.theme-dark #upd-current-ver[data-state="done"]{ color:#34d399; }
html.theme-dark .upd-pending{ background:rgba(251,146,60,.12); border-color:rgba(251,146,60,.35); color:#fdba74; }
html.theme-dark .upd-pending b{ color:#fb923c; }
html.theme-dark .acct-field>label{ color:#9aa5ba; }
html.theme-dark .acct-static{ color:#c9d2e2; }
html.theme-dark .acct-tip{ color:#6f7a90; }
html.theme-dark .acct-entry{ background:#161d2c; border-color:#232c40; }
html.theme-dark .acct-entry:hover{ border-color:#3d4f85; box-shadow:0 4px 14px rgba(0,0,0,.35); }
html.theme-dark .acct-entry.active{ border-color:#7c96ff; box-shadow:0 0 0 3px rgba(124,150,255,.16); }
html.theme-dark .acct-entry-ico{ background:#1c2748; color:#8fa5ff; }
html.theme-dark .acct-entry-top b{ color:#e7ebf4; }
html.theme-dark .acct-entry-desc{ color:#7b869c; }
/* PDF 转换 */
html.theme-dark .pc-detail{ background:#131a28; border-color:#232c40; }
html.theme-dark .pc-note{ color:#9aa5ba; }
html.theme-dark .pc-hint{ color:#6f7a90; }
html.theme-dark .pc-status.ok{ color:#6abf4b; }
html.theme-dark .pc-status.bad{ color:#ef7a6d; }
html.theme-dark .pc-status-path,html.theme-dark .pc-path{ color:#6f7a90; }
html.theme-dark .pc-test-result{ color:#6f7a90; }
html.theme-dark .pc-test-result.ok{ color:#6abf4b; }
html.theme-dark .pc-test-result.bad{ color:#ef7a6d; }
html.theme-dark .acct-select-btn{ background:#101624; border-color:#2b3550; color:#e7ebf4; }
html.theme-dark .acct-select-btn:hover{ border-color:#3d4f85; }
html.theme-dark .acct-select-btn[aria-expanded="true"]{ border-color:#4d63b8; box-shadow:0 0 0 3px rgba(124,150,255,.12); }
html.theme-dark .acct-select-caret{ stroke:#6f7a90; }
html.theme-dark .acct-select-menu{ background:#141a29; border-color:#262f42; }
html.theme-dark .acct-select-opt{ color:#c9d2e2; }
html.theme-dark .acct-select-opt:hover{ background:#1c2333; }
html.theme-dark .acct-select-opt.active{ background:#1c2748; color:#8fa5ff; }
html.theme-dark .text-input.is-locked,html.theme-dark .text-input:disabled{ background:#101624; color:#8a94a8; border-color:#2b3550; }
html.theme-dark .field-label em{ color:#6f7a90; }
html.theme-dark .member-group-tip{ background:#2a2410; border-color:#5a4a1e; color:#e0b35c; }
html.theme-dark .member-groups-label{ color:#7b869c; }
html.theme-dark .member-group-chip{ background:#1c2748; color:#8fa5ff; }
html.theme-dark .member-group-chip-x{ background:#26304a; color:#8fa5ff; }
html.theme-dark .member-group-chip-x:hover{ background:#33406a; color:#c2d0ee; }
html.theme-dark .um-actions .outline-button{ background:#1a2132; border-color:#2b3550; color:#aab5c9; }

/* —— 系统设置 · 用户管理浮窗 —— */
html.theme-dark .user-manager-dialog{ background:#141a29; border-color:#262f42; color:#e7ebf4; }
html.theme-dark .user-manager-dialog::backdrop{ background:rgba(4,8,18,.7); }
html.theme-dark .um-count{ color:#8a94a8; }
html.theme-dark .um-table-wrap{ border-color:#232c40; }
html.theme-dark .um-table thead th{ background:#192230; color:#7b869c; border-bottom-color:#232c40; }
html.theme-dark .um-table tbody td{ color:#c9d2e2; border-bottom-color:#1f2839; }
html.theme-dark .um-table tbody tr:hover{ background:#1a2132; }
html.theme-dark .um-user-text b{ color:#e7ebf4; }
html.theme-dark .um-user-text em{ color:#6f7a90; }
html.theme-dark .um-account{ color:#9aa5ba; }
html.theme-dark .um-badge{ background:#1c2748; color:#8fa5ff; }
html.theme-dark .um-badge.admin{ background:#2a2410; color:#e0b35c; }
html.theme-dark .um-badge.mute{ background:#1c2333; color:#6f7a90; }
html.theme-dark .um-op{ color:#8fa5ff; }
html.theme-dark .um-op.danger{ color:#ff8d84; }
html.theme-dark .um-op.danger:hover{ background:#2a1c20; }
html.theme-dark .um-op[disabled]{ color:#6f7a90; }
html.theme-dark .um-empty{ color:#6f7a90; }
html.theme-dark .um-tip{ color:#6f7a90; }
html.theme-dark .um-check{ color:#9aa5ba; }
html.theme-dark .um-actions .primary-button{ background:#5b7dff; }

/* —— 团队设置弹窗 —— */
html.theme-dark .ts-note{ color:#8a94a8; }
html.theme-dark .ts-field>label{ color:#e7ebf4; }
html.theme-dark .ts-input-wrap input{ background:#101624; border-color:#2b3550; color:#e7ebf4; }
html.theme-dark .ts-input-wrap input:focus{ border-color:#4d63b8; box-shadow:0 0 0 3px rgba(124,150,255,.12); }
html.theme-dark .ts-count{ color:#6f7a90; }
html.theme-dark .ts-hint{ color:#ff8d84; }
html.theme-dark .ts-input-wrap input:disabled{ background:#101624; color:#8a94a8; border-color:#2b3550; }
html.theme-dark .ts-icon-preview{ background:#1c2748; color:#8fa5ff; }
html.theme-dark .ts-icon-preview.has-img{ background:#101624; border-color:#2b3550; }
html.theme-dark .ts-icon-remove{ color:#8a94a8; }
html.theme-dark .ts-icon-remove:hover{ color:#ff8d84; }
html.theme-dark .ts-icon-remove:disabled{ color:#6f7a90; }
html.theme-dark .ts-icon-tip{ color:#6f7a90; }

/* —— 右上角通知中心 —— */
html.theme-dark .site-bell-dot{ border-color:#121828; }
html.theme-dark .notify-panel{ background:#141a29; border-color:#262f42; }
html.theme-dark .notify-head{ color:#e7ebf4; border-bottom-color:#1f2941; }
html.theme-dark .notify-clear{ color:#7b869c; }
html.theme-dark .notify-clear:hover{ background:#1c2333; color:#8fa5ff; }
html.theme-dark .notify-item{ color:#c9d2e2; border-bottom-color:#1f2839; }
html.theme-dark .notify-item.unread{ background:#1c2748; }
html.theme-dark .notify-item:hover{ background:#1a2132; }
html.theme-dark .notify-time{ color:#6f7a90; }
html.theme-dark .notify-handle{ color:#8aa2ff; }
html.theme-dark .notify-handle:hover{ color:#aebfff; }
html.theme-dark .notify-empty{ color:#6f7a90; }
html.theme-dark .notify-state{ color:#6f7a90; }

/* —— 智能创建 / AI 生成弹窗（routes.css · smart-dialog 系列） —— */
html.theme-dark .smart-dialog{ background:#141a29; color:#e7ebf4; }
html.theme-dark .smart-dialog .dialog-head{ background:#141a29; border-bottom-color:#1f2941; }
html.theme-dark .smart-dialog .dialog-foot{ background:#141a29; border-top-color:#1f2941; }
html.theme-dark .ai-banner{ background:#1c2748; border-color:#2a3a63; color:#c2d0ee; }
html.theme-dark .ai-banner p{ color:#8a94a8; }
html.theme-dark .ai-bulb{ color:#fff; }
html.theme-dark .template-head{ color:#8a94a8; }
html.theme-dark .template-head strong{ color:#c9d2e2; }
html.theme-dark .template-head span{ color:#6f7a90; }
html.theme-dark .template-toggle{ color:#9aa5ba; }
html.theme-dark .template-toggle:hover{ background:#1c2748; color:#8fa5ff; }
html.theme-dark .template-chip{ background:#1a2132; border-color:#2b3550; color:#9aa5ba; }
html.theme-dark .template-chip:hover{ border-color:#3d4f85; color:#8fa5ff; }
html.theme-dark .template-chip.is-active{ border-color:#5b7dff; background:#1c2748; color:#8fa5ff; }
html.theme-dark .smart-field{ color:#aab5c9; }
html.theme-dark .smart-field input,html.theme-dark .smart-field select,html.theme-dark .duration-input{ background:#101624; border-color:#2b3550; color:#e7ebf4; }
html.theme-dark .smart-field input:focus,html.theme-dark .smart-field select:focus{ border-color:#4d63b8; box-shadow:0 0 0 3px rgba(124,150,255,.12); }
html.theme-dark .duration-input span{ color:#6f7a90; }
html.theme-dark .smart-tabs{ border-bottom-color:#232c40; }
html.theme-dark .smart-tab{ color:#9aa3b3; }
html.theme-dark .smart-tab.active{ border-bottom-color:#7c96ff; color:#8fa5ff; }
html.theme-dark .ai-panel textarea{ background:#101624; border-color:#3d4f85; color:#e7ebf4; box-shadow:0 0 0 2px rgba(124,150,255,.12); }
html.theme-dark .textarea-head{ color:#aab5c9; }
html.theme-dark .textarea-head b{ color:#ff8d84; }
html.theme-dark .textarea-head span{ color:#6f7a90; }
html.theme-dark .textarea-head .link-button{ color:#8aa2ff; }
html.theme-dark .ai-hint{ color:#6f7a90; }
html.theme-dark .upload-drop{ background:#101624; border-color:#2b3550; color:#9aa5ba; }
html.theme-dark .upload-drop>span{ color:#5b7dff; }
html.theme-dark .upload-drop strong{ color:#c9d2e2; }
html.theme-dark .upload-drop small{ color:#6f7a90; }
html.theme-dark .example-box{ background:#161d2c; border-color:#232c40; color:#8a94a8; }
html.theme-dark .advanced-options{ color:#8aa2ff; }
html.theme-dark .advanced-options summary{ color:#8aa2ff; }
html.theme-dark .advanced-options summary:hover{ background:#1c2748; color:#aebfff; }
html.theme-dark .advanced-checks{ color:#9aa5ba; border-top-color:#1f2839; }
html.theme-dark .advanced-checks small{ color:#6f7a90; }
html.theme-dark .advanced-checks input{ accent-color:#5b7dff; }
html.theme-dark .clarification-options{ color:#9aa5ba; }
html.theme-dark .clarify-title strong{ color:#e7ebf4; }
html.theme-dark .clarify-title span{ color:#6f7a90; }
html.theme-dark .clarify-label{ color:#8a94a8; }
html.theme-dark .choice-row label{ background:#1a2132; border-color:#2b3550; color:#c9d2e2; }
html.theme-dark .choice-row label:hover{ border-color:#3d4f85; background:#1c2333; }
html.theme-dark .choice-row input{ border-color:#39435c; }
html.theme-dark .choice-row input:checked{ border-color:#5b7dff; }
html.theme-dark .choice-row label:has(input:checked){ border-color:#5b7dff; background:#1c2748; color:#e7ebf4; }
html.theme-dark .choice-row label:has(input:checked) input{ background:#5b7dff; border-color:#5b7dff; }
html.theme-dark .link-button{ color:#8aa2ff; }
html.theme-dark .example-toggle{ color:#9aa5ba; }
html.theme-dark .example-toggle:hover{ background:#1c2748; color:#8fa5ff; }

/* —— 脑图编辑器外壳 + 取色浮层 —— */
html.theme-dark .mmed{ background:#101624; }
html.theme-dark .kk-colorpicker-panel{ background:#141a29; border-color:#262f42; }
html.theme-dark .kk-colorpicker-cell{ border-color:rgba(255,255,255,.16); }
html.theme-dark .kk-colorpicker-reset{ background:#1a2132; border-color:#2b3550; color:#aab5c9; }
html.theme-dark .kk-colorpicker-reset:hover{ background:#232c40; }

/* —— 数据页签：内部灰字 / 文档编辑器边框 / 取色悬停（可读性补全） —— */
html.theme-dark .dp-legend{ color:#7b869c; }
html.theme-dark .dp-axlabels{ color:#6f7a90; }
html.theme-dark .dp-ticks span{ color:#6f7a90; }
html.theme-dark .dp-taskrow-sub{ color:#6f7a90; }
html.theme-dark .dp-rankrow em{ color:#6f7a90; }
html.theme-dark .dp-counts{ color:#6f7a90; }
html.theme-dark .dp-counts b{ color:#c9d2e2; }
html.theme-dark .dp-teamavatars{ color:#6f7a90; }
html.theme-dark .dp-minesub{ color:#6f7a90; }
html.theme-dark .dp-chartnote{ color:#6f7a90; }
html.theme-dark .dp-msdate{ color:#6f7a90; }
html.theme-dark .dp-more{ color:#6f7a90; }
html.theme-dark .dp-more:hover{ color:#8fa5ff; }
html.theme-dark .dp-health-lead{ color:#6f7a90; }
html.theme-dark .dp-healthfoot{ color:#6f7a90; }
html.theme-dark .dp-minetab b{ color:#8a94a8; }
html.theme-dark .doc-frame{ border-color:#232c40; }
html.theme-dark .dt-color:hover{ background:#26304a; }
/* AI 报告弹窗暗色适配；iframe 内是文档本身，保留白底便于阅读 */
html.theme-dark #ai-report-dialog{ background:#1b2233; color:#dbe3f2; border-color:#2a3448; }
html.theme-dark #ai-report-dialog .ai-report-head,html.theme-dark #ai-report-dialog .ai-report-meta,html.theme-dark #ai-report-dialog .ai-report-foot{ border-color:#2a3448; }
html.theme-dark #ai-report-dialog .ai-report-body{ background:#151b29; }
html.theme-dark #ai-report-dialog .ai-report-meta,html.theme-dark #ai-report-dialog .ai-report-state{ color:#8a94a8; }
html.theme-dark #ai-report-dialog .ai-report-state.is-notice{ color:#f0b86a; }
html.theme-dark #ai-report-dialog .ai-report-x{ background:#26304a; color:#aab4c8; }
/* 日历页签暗色适配 */
html.theme-dark .calendar-panel{ background:#1b2233; border-color:#2b3448; }
html.theme-dark .cal-seg,html.theme-dark .cal-seg .cal-btn{ border-color:#2b3448; }
html.theme-dark .cal-btn{ background:#1b2233; color:#b6c0d4; }
html.theme-dark .cal-btn:hover{ background:#232c40; }
html.theme-dark .cal-btn.active,html.theme-dark .cal-btn.active:hover{ background:#3b5bdb; color:#fff; }
html.theme-dark .cal-title{ color:#e6ebf5; }
html.theme-dark .cal-weekdays{ border-color:#2b3448; }
html.theme-dark .cal-weekdays span{ background:#202a3d; color:#8a94a8; }
html.theme-dark .cal-grid{ border-color:#2b3448; }
html.theme-dark .cal-cell{ background:#1b2233; border-color:#2b3448; }
html.theme-dark .cal-cell.cal-rest{ background:#161c2b; }
html.theme-dark .cal-cell.cal-today{ background:#20325a; }
html.theme-dark .cal-daynum{ color:#8a94a8; }
html.theme-dark .cal-band{ background:#2b447d; color:#dbe6ff; }
html.theme-dark .cal-band.done{ background:#1e4a35; color:#c9f0da; }
html.theme-dark .cal-band-name-dim{ opacity:.65; }
html.theme-dark .cal-todo{ background:#33291c; color:#e6d7bd; }
html.theme-dark .cal-link,html.theme-dark .cal-foot{ color:#8a94a8; }
html.theme-dark .team-usage-projects-btn{background:none;color:inherit}
html.theme-dark .team-usage-projects-btn:hover b{color:#8fa8ff}
html.theme-dark .tp-member{border-color:#2a3549}
html.theme-dark .tp-member-head{color:#d9e2f2}
html.theme-dark .tp-count{color:#aab8d4;background:#243049}
html.theme-dark .tp-project{color:#aab6cb;background:#212b3d;border-color:#2c384c}
html.theme-dark .tp-project.is-detached{background:#3a2823;border-color:#5a3a30;color:#e0a58d}
html.theme-dark .tp-empty{color:#8491a8}
html.theme-dark .acct-plan-term{color:#aab8d4;background:#243049}
html.theme-dark .acct-plan-term.warn{color:#e5c07b;background:#3a3221}
html.theme-dark .acct-plan-term.expired{color:#e0a58d;background:#3a2823}

/* 更新管理 · 深色 */
html.theme-dark .upd-group-head{border-bottom-color:#232c40;color:#8b96ad}
html.theme-dark .upd-group-head b{color:#dbe3f2}
html.theme-dark .upd-list li{border-bottom-color:#202839}
html.theme-dark .upd-path{color:#c3ccdd}
html.theme-dark .upd-size{color:#7b87a0}
html.theme-dark .upd-rejected .upd-group-head{color:#ff8a80;border-bottom-color:#4a2a2a}
html.theme-dark .upd-rejected .upd-size{color:#ff8a80}
html.theme-dark .upd-log-text{background:#141b29;border-color:#232c40;color:#c3ccdd}
html.theme-dark .upd-dim{color:#6f7b94}
html.theme-dark .upd-step{background:#141b29;border-color:#232c40}
html.theme-dark .upd-step.is-done{background:#12211a;border-color:#1e3a2b}
html.theme-dark .upd-step-no{background:#1d2740;color:#8fa8ff}
html.theme-dark .upd-step-name{color:#dbe3f2}
html.theme-dark .upd-step-name em{color:#7b87a0}
html.theme-dark .upd-run{background:#141b29;border-color:#232c40}
html.theme-dark .upd-run-head{color:#dbe3f2}
html.theme-dark .upd-run-kind{background:#1d2740;color:#8fa8ff}
html.theme-dark .upd-run-meta{color:#8b96ad}
html.theme-dark .upd-run-sum{color:#a9b4c9}
