/* 全局皮肤：浅色主题采用暖灰与低饱和肤色层级，蓝色仅用于操作、链接和当前选中态。 */
:root {
  --theme-primary: #3b82f6;
  --theme-primary-hover: #2563eb;
  --theme-link: #60a5fa;
}

.theme-toggle {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 36px; margin: 10px 0 8px; padding: 7px 10px;
  border:1px solid #344154;border-radius:5px;background:#111a28;
  color: #cbd5e1; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600;
  transition:background-color .16s,border-color .16s,color .16s;
}
.theme-toggle:hover { border-color:#526178;background:#223047;color:#fff; }
.theme-toggle-icon { display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border:1px solid currentColor;border-radius:4px;text-align:center;font-size:10px;font-weight:750; }
.theme-toggle-standalone {
  position: fixed; z-index: 20; top: 18px; right: 18px; width: auto; min-width: 108px;
  margin: 0; padding: 8px 13px; box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.sidebar.collapsed .sidebar-footer {
  display:flex;flex-direction:column;padding:10px;align-items:center;justify-content:center;
}
.sidebar.collapsed .user-profile { margin:0;justify-content:center; }
.sidebar.collapsed .sidebar-footer .account-actions,
.sidebar.collapsed .theme-toggle-label { display: none; }
.sidebar.collapsed .theme-toggle { width:36px;min-width:36px;min-height:34px;margin:8px 0 0;padding:6px; }

html[data-theme="light"] {
  color-scheme: light;
  --theme-primary: #007aff;
  --theme-primary-hover: #0066d6;
  --theme-primary-soft: #e5eef8;
  --theme-bg: #e5e2de;
  --theme-surface: #fbf9f6;
  --theme-surface-soft: #eeeae5;
  --theme-surface-skin: #f4e8de;
  --theme-hover: #e1ddd8;
  --theme-border: #b9b5b0;
  --theme-text: #20252b;
  --theme-text-strong: #161b21;
  --theme-text-soft: #343c45;
  --theme-muted: #4f5a66;
  --theme-subtle: #626d78;
  --theme-link: #0066cc;
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 86% 4%, rgba(222,181,148,.18), transparent 30%),
    linear-gradient(135deg,#e1e0de 0%,#ece8e4 52%,#e6e1dc 100%) fixed !important;
  color: var(--theme-text) !important;
}
html[data-theme="light"] .sidebar {
  background: #f3f0ec; border-color: #bcb8b3;
  box-shadow: 1px 0 0 rgba(42,38,34,.08);backdrop-filter:none;
}
html[data-theme="light"] .sidebar-brand,
html[data-theme="light"] .sidebar-footer,
html[data-theme="light"] .page-header,
html[data-theme="light"] .header,
html[data-theme="light"] .dashboard-header,
html[data-theme="light"] .card-header-row,
html[data-theme="light"] .project-body,
html[data-theme="light"] .project-footer,
html[data-theme="light"] .footer-bar { border-color: var(--theme-border) !important; }
html[data-theme="light"] .sidebar-brand .logo,
html[data-theme="light"] .sidebar-footer .user,
html[data-theme="light"] .page-title,
html[data-theme="light"] .header-title,
html[data-theme="light"] .dashboard-title,
html[data-theme="light"] .card-title,
html[data-theme="light"] .section-title,
html[data-theme="light"] .login-title,
html[data-theme="light"] .order-title,
html[data-theme="light"] .employee-name,
html[data-theme="light"] .project-title,
html[data-theme="light"] .focus-title,
html[data-theme="light"] .focus-board-title,
html[data-theme="light"] .section-sub,
html[data-theme="light"] .mini-value,
html[data-theme="light"] .work-main strong,
html[data-theme="light"] .rk b,
html[data-theme="light"] .kpi b,
html[data-theme="light"] .wt-stats-title,
html[data-theme="light"] .duty-label,
html[data-theme="light"] .node-amount,
html[data-theme="light"] .chain-title,
html[data-theme="light"] .skill-chip strong { color: var(--theme-text-strong) !important; }
html[data-theme="light"] .sidebar-brand .sub,
html[data-theme="light"] .menu-label,
html[data-theme="light"] .page-subtitle,
html[data-theme="light"] .dashboard-subtitle,
html[data-theme="light"] .login-subtitle,
html[data-theme="light"] .tips,
html[data-theme="light"] .info-label,
html[data-theme="light"] .overview-label,
html[data-theme="light"] .summary-label,
html[data-theme="light"] .muted,
html[data-theme="light"] .sub,
html[data-theme="light"] .sort-rule,
html[data-theme="light"] .project-meta,
html[data-theme="light"] .focus-meta,
html[data-theme="light"] .brief-label,
html[data-theme="light"] .info-box-title,
html[data-theme="light"] .info-box-sub,
html[data-theme="light"] .mini-label,
html[data-theme="light"] .empty-note,
html[data-theme="light"] .payment-row,
html[data-theme="light"] .timeline-meta,
html[data-theme="light"] .detail-box label,
html[data-theme="light"] .rk label,
html[data-theme="light"] .rk em,
html[data-theme="light"] .kpi span,
html[data-theme="light"] .wt-chart-bar-label,
html[data-theme="light"] .pagination-info,
html[data-theme="light"] .empty { color: var(--theme-muted) !important; }
html[data-theme="light"] .presence-toggle.office { --presence-glow:rgba(5,150,105,.2);border-color:#34d399; }
html[data-theme="light"] .presence-toggle.travel { --presence-glow:rgba(234,88,12,.2);border-color:#fb923c; }
html[data-theme="light"] .presence-toggle:hover { box-shadow:inset 0 1px 0 rgba(255,255,255,.4),inset 0 -1px 0 rgba(15,23,42,.12),0 7px 18px var(--presence-glow); }
html[data-theme="light"] .login-footer { border-color:var(--theme-border); }
html[data-theme="light"] .login-footer-brand { color:var(--theme-text-soft); }
html[data-theme="light"] .login-footer-icp { color:var(--theme-muted); }

html[data-theme="light"] .menu-item { color: var(--theme-muted); }
html[data-theme="light"] .menu-item:hover { background: var(--theme-hover); color: var(--theme-text-strong); }
html[data-theme="light"] .menu-item.active {
  background:var(--theme-primary-soft);color:#005ec4;box-shadow:inset 3px 0 0 var(--theme-primary);
}
html[data-theme="light"] .menu-group-trigger { color:var(--theme-text-soft); }
html[data-theme="light"] .menu-group-trigger:hover { background:var(--theme-hover);border-color:#c9d3df;color:var(--theme-text-strong); }
html[data-theme="light"] .menu-group.is-open .menu-group-trigger { background:#edf5ff;border-color:#c8dcf4;color:#164e8c; }
html[data-theme="light"] .menu-group-arrow { color:#68798d; }
html[data-theme="light"] .menu-group.is-open .menu-group-arrow { color:#0066cc; }
html[data-theme="light"] .menu-icon { color:#728096; }
html[data-theme="light"] .menu-item:hover .menu-icon,
html[data-theme="light"] .menu-item.active .menu-icon { color:#0066cc; }
html[data-theme="light"] .sidebar-toggle { background:#fff;border-color:var(--theme-border);color:var(--theme-muted); }
html[data-theme="light"] .sidebar-toggle:hover { background:var(--theme-hover);border-color:#b9c5d4;color:var(--theme-primary-hover); }
html[data-theme="light"] .user-avatar { background:#eaf3ff;border-color:#c7ddf7;color:#005ec4; }
html[data-theme="light"] .user-meta strong { color:var(--theme-text-strong); }
html[data-theme="light"] .user-meta span { color:var(--theme-muted); }
html[data-theme="light"] .user-meta .presence-toggle-label { color:#fff; }
html[data-theme="light"] .user-meta .presence-toggle-thumb { color:var(--presence-deep); }
html[data-theme="light"] .card-badge-danger { background:#fff1f2;border-color:#f8bac3;color:#a61b2b; }
html[data-theme="light"] .card-badge-success { background:#edf9f0;border-color:#b9e5c4;color:#1d7a39; }
html[data-theme="light"] .card-badge-info { background:#edf5ff;border-color:#c1daf8;color:#175ea8; }
html[data-theme="light"] .card-badge-violet { background:#f3f0ff;border-color:#d5caf8;color:#5b3eae; }
html[data-theme="light"] .card-badge-neutral { background:#f0f4f8;border-color:#ccd6e1;color:#425466; }

html[data-theme="light"] .card,
html[data-theme="light"] .section,
html[data-theme="light"] .overview-card,
html[data-theme="light"] .summary-card,
html[data-theme="light"] .wt-stats-card,
html[data-theme="light"] .rk,
html[data-theme="light"] .kpi,
html[data-theme="light"] .project-card,
html[data-theme="light"] .login-box,
html[data-theme="light"] .box,
html[data-theme="light"] .modal,
html[data-theme="light"] table {
  background: var(--theme-surface) !important; border-color: var(--theme-border) !important;
  box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
html[data-theme="light"] .info-item,
html[data-theme="light"] .formal-box,
html[data-theme="light"] .event,
html[data-theme="light"] .detail-box,
html[data-theme="light"] .risk-item,
html[data-theme="light"] .cost-row,
html[data-theme="light"] .payment-node-circle,
html[data-theme="light"] .duty-item,
html[data-theme="light"] .skill-chip,
html[data-theme="light"] .chain-box,
html[data-theme="light"] .work-row,
html[data-theme="light"] .info-box,
html[data-theme="light"] .mini-item,
html[data-theme="light"] .wt-tabs {
  background: var(--theme-surface-soft) !important; border-color: var(--theme-border) !important;
}
/* 责任链保留三层独立语义色，浅色主题不能被通用卡片白底抹平层级。 */
html[data-theme="light"] .chain-box { background:linear-gradient(145deg,var(--theme-surface),var(--theme-surface-soft))!important;border-color:color-mix(in srgb,var(--chain-accent) 32%,var(--theme-border))!important;box-shadow:0 10px 22px rgba(45,40,36,.11),inset 0 1px 0 rgba(255,255,255,.72)!important; }
html[data-theme="light"] .chain-icon { background:color-mix(in srgb,var(--chain-accent) 9%,var(--theme-surface))!important;border-color:color-mix(in srgb,var(--chain-accent) 34%,var(--theme-border))!important;color:var(--chain-accent)!important; }
html[data-theme="light"] .chain-tier { background:color-mix(in srgb,var(--chain-accent) 8%,var(--theme-surface))!important;border-color:color-mix(in srgb,var(--chain-accent) 30%,var(--theme-border))!important;color:color-mix(in srgb,var(--chain-accent) 72%,#243447)!important; }
html[data-theme="light"] .chain-list { color:#556577!important; }
html[data-theme="light"] .info-value,
html[data-theme="light"] .detail-box div,
html[data-theme="light"] .timeline-title,
html[data-theme="light"] .risk-title,
html[data-theme="light"] .cost-label,
html[data-theme="light"] .brief-value,
html[data-theme="light"] .work-main,
html[data-theme="light"] .info-box-main,
html[data-theme="light"] .confirm-line,
html[data-theme="light"] .wt-personnel-table td { color: var(--theme-text-soft) !important; }

html[data-theme="light"] th,
html[data-theme="light"] .skill-table th,
html[data-theme="light"] .wt-personnel-table th {
  background: var(--theme-surface-soft) !important; color: var(--theme-muted) !important;
  border-color: var(--theme-border) !important;
}
html[data-theme="light"] td,
html[data-theme="light"] .skill-table td,
html[data-theme="light"] .wt-personnel-table td { border-color: var(--theme-border) !important; }
html[data-theme="light"] tr:hover,
html[data-theme="light"] .skill-table tr:hover,
html[data-theme="light"] .wt-personnel-table tr:hover { background: var(--theme-hover) !important; }
html[data-theme="light"] .user-table-wrap { border-color: var(--theme-border) !important; }
html[data-theme="light"] .user-table-wrap th:last-child { background: var(--theme-surface-soft) !important; }
html[data-theme="light"] .user-table-wrap td:last-child { background: var(--theme-surface) !important; box-shadow: -8px 0 12px rgba(0,0,0,.055) !important; }
html[data-theme="light"] .user-table-wrap tr:hover td:last-child { background: var(--theme-hover) !important; }

html[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] .form-group input,
html[data-theme="light"] .form-group select,
html[data-theme="light"] .form-group textarea,
html[data-theme="light"] .toolbar input,
html[data-theme="light"] .toolbar select {
  color-scheme: light; background: var(--theme-surface) !important;
  border-color: var(--theme-border) !important; color: var(--theme-text) !important;
}
html[data-theme="light"] select option,
html[data-theme="light"] select optgroup { background: var(--theme-surface); color: var(--theme-text); }
html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus {
  border-color: var(--theme-primary) !important;
  box-shadow: 0 0 0 3px rgba(0,122,255,.14) !important;
}
html[data-theme="light"] .form-group label { color:var(--theme-text-soft) !important; }
html[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="light"] input[type="month"]::-webkit-calendar-picker-indicator { filter: none; }

html[data-theme="light"] .btn { background: var(--theme-primary); color: #fff; }
html[data-theme="light"] .btn:hover { background: var(--theme-primary-hover); opacity: 1; }
html[data-theme="light"] .btn-success { background: #34c759; color: #fff; }
html[data-theme="light"] .btn-danger { background: #ff3b30; color: #fff; }
html[data-theme="light"] .btn-warning,
html[data-theme="light"] .btn-amber { background: #ff9f0a; color: #fff; }
html[data-theme="light"] .btn-blue { background: #007aff; color: #fff; }
html[data-theme="light"] .btn-outline {
  background: var(--theme-surface) !important; color: #344154 !important;
  border-color: #aeb9c7 !important;
}
html[data-theme="light"] .btn-outline:hover { background:#f0f6ff !important;color: var(--theme-primary-hover) !important; border-color: var(--theme-primary) !important; }
html[data-theme="light"] .main-content .btn-outline { background:var(--theme-surface) !important;color:#344154 !important;border-color:#9ea4aa !important; }
html[data-theme="light"] .main-content .btn-outline:hover { background:#edf5ff !important;color:#005ec4 !important;border-color:#007aff !important; }
html[data-theme="light"] .scope-btn.active,
html[data-theme="light"] .page-btn.active,
html[data-theme="light"] .tab.active,
html[data-theme="light"] .tab-main.active,
html[data-theme="light"] .wt-tab.active {
  background: var(--theme-primary-soft) !important; color: #005ec4 !important;
  border-color: rgba(0,122,255,.28) !important;
}
html[data-theme="light"] .tab,
html[data-theme="light"] .tab-main,
html[data-theme="light"] .page-btn { background: var(--theme-surface); border-color: var(--theme-border); color: var(--theme-muted); }
html[data-theme="light"] .progress-bar,
html[data-theme="light"] .progress-mini,
html[data-theme="light"] .cost-bar-track,
html[data-theme="light"] .load-track,
html[data-theme="light"] .bar,
html[data-theme="light"] .wt-chart-bar-track,
html[data-theme="light"] .ledger-progress,
html[data-theme="light"] .chart-bar-track,
html[data-theme="light"] .payment-bar-track,
html[data-theme="light"] .io-bar {
  background:linear-gradient(90deg,#d5d0ca 0%,#e8e3dd 100%) !important;
  border-color:#c1bbb4 !important;
  box-shadow:inset 0 1px 2px rgba(59,52,46,.12) !important;
}
html[data-theme="light"] .progress-fill,
html[data-theme="light"] .progress-mini-fill { background: var(--theme-primary) !important; }
html[data-theme="light"] .link,
html[data-theme="light"] .impact-link,
html[data-theme="light"] .order-no { color: var(--theme-link) !important; }

html[data-theme="light"] .tag-yet,
html[data-theme="light"] .tag-low,
html[data-theme="light"] .member-pill,
html[data-theme="light"] .status-pill.gray { background: #eef1ef !important; color: #5c6964 !important; }
html[data-theme="light"] .tag-done,
html[data-theme="light"] .status-pill.green,
html[data-theme="light"] .status-active { background: #e9f8ed !important; color: #248a3d !important; }
html[data-theme="light"] .tag-pending,
html[data-theme="light"] .status-pill.amber { background: #fff4dc !important; color: #946200 !important; }
html[data-theme="light"] .tag-danger,
html[data-theme="light"] .status-pill.red,
html[data-theme="light"] .status-disabled { background: #fff0ef !important; color: #c9363e !important; }
html[data-theme="light"] .risk-level.critical { background: #fff0ef; color: #c9363e; }
html[data-theme="light"] .risk-level.warning { background: #fff4dc; color: #946200; }
html[data-theme="light"] .risk-level.normal { background: #e9f8ed; color: #248a3d; }

html[data-theme="light"] .duty-banner {
  background: var(--theme-surface) !important;
  border-color: rgba(0,122,255,.18) !important;
}
html[data-theme="light"] .focus-board {
  background: var(--theme-surface) !important;border-color:var(--theme-border) !important;
}
html[data-theme="light"] .focus-card { background: var(--theme-surface) !important; border-color: var(--theme-border) !important; }
/* 浅色语义色使用深色文字加浅色底，避免深色模式的浅色字直接落在白底上。 */
html[data-theme="light"] .focus-card.importance-5 { border-left-color:#cf3d4c !important; }
html[data-theme="light"] .focus-card.importance-4 { border-left-color:#d59a24 !important; }
html[data-theme="light"] .project-card.importance-critical { border-color:#f1b6be !important;box-shadow:inset 3px 0 0 #cf3d4c !important; }
html[data-theme="light"] .project-card.importance-high { border-color:#ead097 !important;box-shadow:inset 3px 0 0 #d59a24 !important; }
html[data-theme="light"] .project-focus { color:#7a4b00 !important;background:#fff7e6 !important;border-color:#e9c977 !important; }
html[data-theme="light"] .project-focus-label { color:#8a5700 !important; }
html[data-theme="light"] .stage-tag { color:#425466 !important;background:#f0f4f8 !important;border-color:#ccd6e1 !important; }
html[data-theme="light"] .importance-tag.importance-critical,
html[data-theme="light"] .status-tag.status-high-risk,
html[data-theme="light"] .focus-status.brief-status-blocked,
html[data-theme="light"] .priority-pill.red,
html[data-theme="light"] .alert-critical { color:#a61b2b !important;background:#fff1f2 !important;border-color:#f8bac3 !important; }
html[data-theme="light"] .importance-tag.importance-high,
html[data-theme="light"] .status-tag.status-risk,
html[data-theme="light"] .focus-status.brief-status-wait,
html[data-theme="light"] .priority-pill.amber { color:#8a5700 !important;background:#fff4dc !important;border-color:#e7bf68 !important; }
html[data-theme="light"] .importance-tag.importance-medium,
html[data-theme="light"] .status-tag.status-running,
html[data-theme="light"] .focus-status.brief-status-progress,
html[data-theme="light"] .priority-pill.blue,
html[data-theme="light"] .brief-value.next,
html[data-theme="light"] .work-date,
html[data-theme="light"] .duty-icon { color:#175ea8 !important;background:#edf5ff !important;border-color:#bfd8f3 !important; }
html[data-theme="light"] .importance-tag.importance-normal,
html[data-theme="light"] .status-tag.status-default { color:#425466 !important;background:#f0f4f8 !important;border-color:#ccd6e1 !important; }
html[data-theme="light"] .status-tag.status-completed,
html[data-theme="light"] .focus-status.brief-status-done { color:#1d7a39 !important;background:#edf9f0 !important;border-color:#b9e5c4 !important; }
html[data-theme="light"] .status-tag.status-paused,
html[data-theme="light"] .focus-status.brief-status-review { color:#5b3eae !important;background:#f3f0ff !important;border-color:#d5caf8 !important; }
html[data-theme="light"] .brief-value.blocker { color:#a61b2b !important; }
html[data-theme="light"] .amount-tag { color:#175ea8 !important;background:#edf5ff !important;border-color:#bfd8f3 !important; }
html[data-theme="light"] .notice { color:#8a5700 !important;background:#fff7e6 !important;border-color:#e9c977 !important; }
html[data-theme="light"] .batch-tip { color:#175ea8 !important;background:#edf5ff !important;border-color:#bfd8f3 !important; }
html[data-theme="light"] .batch-review.warn { color:#8a5700 !important;background:#fff4dc !important;border-color:#e7bf68 !important; }
html[data-theme="light"] .tag-urgent { color:#a61b2b !important;background:#fff1f2 !important; }
html[data-theme="light"] .tag-high { color:#9a3c00 !important;background:#fff0e6 !important; }
html[data-theme="light"] .tag-normal { color:#175ea8 !important;background:#edf5ff !important; }
html[data-theme="light"] .status-待接单,
html[data-theme="light"] .status-paused { color:#5b3eae !important;background:#f3f0ff !important; }
html[data-theme="light"] .status-已接单,
html[data-theme="light"] .status-待验收 { color:#175ea8 !important;background:#edf5ff !important; }
html[data-theme="light"] .status-进行中 { color:#8a5700 !important;background:#fff4dc !important; }
html[data-theme="light"] .status-已完成 { color:#1d7a39 !important;background:#edf9f0 !important; }
html[data-theme="light"] .status-已取消 { color:#425466 !important;background:#f0f4f8 !important; }
html[data-theme="light"] .priority-pill.green,
html[data-theme="light"] .cost-value.green,
html[data-theme="light"] .payment-node-circle.done,
html[data-theme="light"] .kpi.good b,
html[data-theme="light"] .good,
html[data-theme="light"] .presence.office,
html[data-theme="light"] .push.sent { color:#1d7a39 !important; }
html[data-theme="light"] .cost-value.amber,
html[data-theme="light"] .payment-node-circle.pending,
html[data-theme="light"] .kpi.warn b,
html[data-theme="light"] .push.pending,
html[data-theme="light"] .alert-warning { color:#8a5700 !important; }
html[data-theme="light"] .cost-value.red,
html[data-theme="light"] .payment-node-circle.hold,
html[data-theme="light"] .kpi.danger b,
html[data-theme="light"] .danger,
html[data-theme="light"] .presence.travel { color:#a61b2b !important; }
html[data-theme="light"] .tag-pm,
html[data-theme="light"] .tag-shouqian { color:#5b3eae !important;background:#f3f0ff !important; }
html[data-theme="light"] .tag-hardware,
html[data-theme="light"] .tag-shishi,
html[data-theme="light"] .tag-jinxing,
html[data-theme="light"] .cat-transport { color:#175ea8 !important;background:#edf5ff !important; }
html[data-theme="light"] .tag-software { color:#5b3eae !important;background:#f3f0ff !important; }
html[data-theme="light"] .tag-ai,
html[data-theme="light"] .tag-yanshou,
html[data-theme="light"] .cat-meal { color:#8a5700 !important;background:#fff4dc !important; }
html[data-theme="light"] .tag-field,
html[data-theme="light"] .tag-shouhou,
html[data-theme="light"] .tag-wancheng,
html[data-theme="light"] .cat-hotel { color:#1d7a39 !important;background:#edf9f0 !important; }
html[data-theme="light"] .tag-yichang { color:#a61b2b !important;background:#fff1f2 !important; }
html[data-theme="light"] .tag-low,
html[data-theme="light"] .cat-other { color:#425466 !important;background:#f0f4f8 !important; }
html[data-theme="light"] .push.issue { color:#55606e !important; }
html[data-theme="light"] .project-header { background: var(--theme-surface-soft) !important; }
html[data-theme="light"] .expand-btn,
html[data-theme="light"] .count-chip { background: var(--theme-surface) !important; border-color: var(--theme-border) !important; color: var(--theme-text-soft) !important; }
html[data-theme="light"] .gantt-row.project-header,
html[data-theme="light"] .gantt-scale { background: #eef7f1 !important; }
html[data-theme="light"] .gantt-row.project-header:hover { background: #e4f3ea !important; }
html[data-theme="light"] .gantt-row.node-row { background: var(--theme-surface) !important; }
html[data-theme="light"] .gantt-row.node-row:nth-child(even) { background: var(--theme-surface-soft) !important; }
html[data-theme="light"] .gantt-row,
html[data-theme="light"] .gantt-scale,
html[data-theme="light"] .gantt-scale-label,
html[data-theme="light"] .gantt-scale-track .unit { border-color: var(--theme-border) !important; }
html[data-theme="light"] .gantt-row.project-header .gantt-label,
html[data-theme="light"] .gantt-row.node-row .gantt-label { color: var(--theme-text-soft) !important; }
html[data-theme="light"] .gantt-today-label { background: rgba(251,249,246,.95) !important; }
html[data-theme="light"] .formal-note { background: #f0f7ff !important; color: #36567e !important; border-color: #b8d4f4 !important; }
html[data-theme="light"] .formal-note strong { color: #25476d !important; }
html[data-theme="light"] .travel-planned { color:#1d4ed8 !important;background:#eff6ff !important;border-color:#bfdbfe !important; }
html[data-theme="light"] .travel-active { color:#c2410c !important;background:#fff7ed !important;border-color:#fed7aa !important;box-shadow:0 0 12px rgba(249,115,22,.12) !important; }
html[data-theme="light"] .travel-returned { color:#047857 !important;background:#ecfdf5 !important;border-color:#a7f3d0 !important; }
html[data-theme="light"] .travel-local { color:#64748b !important;background:#f8fafc !important;border-color:#e2e8f0 !important; }
html[data-theme="light"] .modal-overlay { background: rgba(30,30,32,.42); backdrop-filter: blur(2px); }
html[data-theme="light"] .login-box { box-shadow: 0 4px 18px rgba(15,23,42,.10); }
html[data-theme="light"] .theme-toggle {
  background: var(--theme-surface-soft); border-color: var(--theme-border); color: var(--theme-text-soft);
}
html[data-theme="light"] .theme-toggle:hover { background: var(--theme-primary-soft); border-color: rgba(0,122,255,.32); color: #005ec4; }
html[data-theme="light"] .preference-switches .theme-toggle-icon { background:linear-gradient(145deg,#fff,#eef2f7);color:#334155; }
html[data-theme="light"] .brand-mark,
html[data-theme="light"] .login-page-logo {
  background:var(--theme-surface) !important;border-color:var(--theme-border) !important;
  box-shadow:0 1px 2px rgba(15,23,42,.08) !important;
}
html[data-theme="light"] .login-page-brand {
  background:var(--theme-surface);border-color:var(--theme-border);backdrop-filter:none;
  box-shadow:0 1px 3px rgba(15,23,42,.08);
}
html[data-theme="light"] .login-page-brand-name { color:var(--theme-text-strong); }
html[data-theme="light"] .login-page-brand-sub { color:var(--theme-muted); }
html[data-theme="light"] .account-button {
  background:var(--theme-surface);border-color:var(--theme-border);color:var(--theme-muted);
}
html[data-theme="light"] .account-button:hover {
  background:var(--theme-hover);border-color:rgba(0,122,255,.28);color:#005ec4;
}
html[data-theme="light"] .account-button.password {
  background:var(--theme-primary-soft);border-color:rgba(0,122,255,.24);color:#005ec4;
}
html[data-theme="light"] .password-icon {
  background:var(--theme-primary-soft);border-color:rgba(0,122,255,.22);color:#0066cc;
}
html[data-theme="light"] .password-subtitle,
html[data-theme="light"] .password-hint { color:var(--theme-muted); }
html[data-theme="light"] .password-modal .modal-actions { border-color:var(--theme-border); }
html[data-theme="light"] .app-dialog { background:var(--theme-surface)!important;border-color:var(--theme-border)!important;box-shadow:0 26px 70px rgba(45,40,36,.24),0 0 0 1px rgba(45,40,36,.06)!important; }
html[data-theme="light"] .app-dialog-heading { border-color:var(--theme-border);background:linear-gradient(135deg,#e8eef5,var(--theme-surface-skin) 100%); }
html[data-theme="light"] .app-dialog-heading .modal-title { color:var(--theme-text-strong); }
html[data-theme="light"] .app-dialog-kicker { color:var(--theme-muted); }
html[data-theme="light"] .app-dialog-message { color:var(--theme-text-soft); }
html[data-theme="light"] .app-dialog-input-wrap label { color:var(--theme-muted); }
html[data-theme="light"] .app-dialog-input-wrap textarea { background:var(--theme-surface-soft);border-color:var(--theme-border);color:#1f2937; }
html[data-theme="light"] .app-dialog-actions { border-color:var(--theme-border); }
html[data-theme="light"] .required-mark { color:#d70015; }

/* 动态模板里遗留的结构色使用内联 style，需要以主题值覆盖；语义红黄绿不在此列。 */
html[data-theme="light"] [style*="background:#0f172a"],
html[data-theme="light"] [style*="background: #0f172a"] { background: var(--theme-surface-soft) !important; }
html[data-theme="light"] [style*="background:#1e293b"],
html[data-theme="light"] [style*="background: #1e293b"] { background: var(--theme-surface) !important; }
html[data-theme="light"] [style*="border:1px solid #334155"],
html[data-theme="light"] [style*="border: 1px solid #334155"] { border-color: var(--theme-border) !important; }
html[data-theme="light"] [style*="color:#f8fafc"],
html[data-theme="light"] [style*="color: #f8fafc"] { color: var(--theme-text-strong) !important; }
html[data-theme="light"] [style*="color:#e2e8f0"],
html[data-theme="light"] [style*="color: #e2e8f0"],
html[data-theme="light"] [style*="color:#cbd5e1"],
html[data-theme="light"] [style*="color: #cbd5e1"] { color: var(--theme-text-soft) !important; }
html[data-theme="light"] [style*="color:#94a3b8"],
html[data-theme="light"] [style*="color: #94a3b8"] { color: var(--theme-muted) !important; }
html[data-theme="light"] [style*="color:#64748b"],
html[data-theme="light"] [style*="color: #64748b"] { color: var(--theme-subtle) !important; }
html[data-theme="light"] [style*="color:#60a5fa"],
html[data-theme="light"] [style*="color: #60a5fa"] { color: var(--theme-link) !important; }
html[data-theme="light"] [style*="color:#fca5a5"],
html[data-theme="light"] [style*="color: #fca5a5"],
html[data-theme="light"] [style*="color:#fecaca"],
html[data-theme="light"] [style*="color: #fecaca"],
html[data-theme="light"] [style*="color:#f87171"],
html[data-theme="light"] [style*="color: #f87171"],
html[data-theme="light"] [style*="color:#ef4444"],
html[data-theme="light"] [style*="color: #ef4444"] { color:#a61b2b !important; }
html[data-theme="light"] [style*="color:#fde68a"],
html[data-theme="light"] [style*="color: #fde68a"],
html[data-theme="light"] [style*="color:#fbbf24"],
html[data-theme="light"] [style*="color: #fbbf24"],
html[data-theme="light"] [style*="color:#f59e0b"],
html[data-theme="light"] [style*="color: #f59e0b"] { color:#8a5700 !important; }
html[data-theme="light"] [style*="color:#93c5fd"],
html[data-theme="light"] [style*="color: #93c5fd"],
html[data-theme="light"] [style*="color:#bfdbfe"],
html[data-theme="light"] [style*="color: #bfdbfe"] { color:#175ea8 !important; }
html[data-theme="light"] [style*="color:#bbf7d0"],
html[data-theme="light"] [style*="color: #bbf7d0"],
html[data-theme="light"] [style*="color:#4ade80"],
html[data-theme="light"] [style*="color: #4ade80"] { color:#1d7a39 !important; }
html[data-theme="light"] [style*="color:#e9d5ff"],
html[data-theme="light"] [style*="color: #e9d5ff"],
html[data-theme="light"] [style*="color:#a78bfa"],
html[data-theme="light"] [style*="color: #a78bfa"] { color:#5b3eae !important; }
html[data-theme="light"] [style*="color:#3b82f6"],
html[data-theme="light"] [style*="color: #3b82f6"],
html[data-theme="light"] [style*="color:#38bdf8"],
html[data-theme="light"] [style*="color: #38bdf8"],
html[data-theme="light"] [style*="color:#67e8f9"],
html[data-theme="light"] [style*="color: #67e8f9"] { color:#175ea8 !important; }
html[data-theme="light"] [style*="color:#10b981"],
html[data-theme="light"] [style*="color: #10b981"],
html[data-theme="light"] [style*="color:#34d399"],
html[data-theme="light"] [style*="color: #34d399"],
html[data-theme="light"] [style*="color:#86efac"],
html[data-theme="light"] [style*="color: #86efac"] { color:#1d7a39 !important; }
html[data-theme="light"] [style*="color:#fcd34d"],
html[data-theme="light"] [style*="color: #fcd34d"],
html[data-theme="light"] [style*="color:#fdba74"],
html[data-theme="light"] [style*="color: #fdba74"],
html[data-theme="light"] [style*="color:#fb923c"],
html[data-theme="light"] [style*="color: #fb923c"] { color:#8a5700 !important; }
html[data-theme="light"] [style*="color:#f0abfc"],
html[data-theme="light"] [style*="color: #f0abfc"],
html[data-theme="light"] [style*="color:#c4b5fd"],
html[data-theme="light"] [style*="color: #c4b5fd"],
html[data-theme="light"] [style*="color:#ddd6fe"],
html[data-theme="light"] [style*="color: #ddd6fe"] { color:#5b3eae !important; }

/* CSS 变量名包含 color 时会被上面的历史兼容选择器命中；甘特条文字始终保持高对比白色。 */
html[data-theme="light"] .gantt-track .gantt-bar { color:#fff !important; }

/* 全站数据表统一使用两档轻量底色隔行显示：只强化横向阅读，不增加新线框。 */
table:not(.no-zebra) tbody > tr:nth-child(odd) { background-color:#192638 !important; }
table:not(.no-zebra) tbody > tr:nth-child(even) { background-color:#202e42 !important; }
table:not(.no-zebra) tbody > tr:hover { background-color:#2a3b52 !important; }
/* 用户表操作列为粘性单元格，需跟随所在行底色，横向滚动时仍保持遮挡。 */
.user-table-wrap table:not(.no-zebra) tbody > tr:nth-child(odd) > td:last-child { background-color:#192638 !important; }
.user-table-wrap table:not(.no-zebra) tbody > tr:nth-child(even) > td:last-child { background-color:#202e42 !important; }
.user-table-wrap table:not(.no-zebra) tbody > tr:hover > td:last-child { background-color:#2a3b52 !important; }
html[data-theme="light"] table:not(.no-zebra) tbody > tr:nth-child(odd) { background-color:#fbf9f6 !important; }
html[data-theme="light"] table:not(.no-zebra) tbody > tr:nth-child(even) { background-color:#eee9e4 !important; }
html[data-theme="light"] table:not(.no-zebra) tbody > tr:hover { background-color:#dde3e8 !important; }
html[data-theme="light"] .user-table-wrap table:not(.no-zebra) tbody > tr:nth-child(odd) > td:last-child { background-color:#fbf9f6 !important; }
html[data-theme="light"] .user-table-wrap table:not(.no-zebra) tbody > tr:nth-child(even) > td:last-child { background-color:#eee9e4 !important; }
html[data-theme="light"] .user-table-wrap table:not(.no-zebra) tbody > tr:hover > td:last-child { background-color:#dde3e8 !important; }

@media print {
  table:not(.no-zebra) tbody > tr { background:#fff !important; }
}

@media (max-width: 900px) {
  .theme-toggle-standalone { top: 12px; right: 12px; min-width: 42px; }
  .theme-toggle-standalone .theme-toggle-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .theme-toggle { transition: none; }
}
