/* theme.css —— 深色主题（通过 [data-theme="dark"] 覆盖 CSS 变量） */

[data-theme="dark"] {
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --primary-lighter: #172554;
    --accent-orange: #FFA726;
    --accent-orange-light: #3B2A12;
    --accent-blue: #42A5F5;
    --accent-blue-light: #12283D;
    --accent-purple: #AB47BC;
    --accent-purple-light: #2C1738;
    --bg-warm: #14171A;
    --bg-white: #1C2126;
    --text-primary: #E6E8EB;
    --text-secondary: #9BA3AE;
    --text-muted: #6B7480;
    --border: #2C333B;
    --border-light: #232930;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.5), 0 1px 2px -1px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.55), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
}

/* 深色下标签/徽章改为半透明底色，避免亮块刺眼 */
[data-theme="dark"] .tag-priority-紧急 { background: rgba(239, 68, 68, .18); color: #FCA5A5; }
[data-theme="dark"] .tag-priority-高   { background: rgba(249, 115, 22, .18); color: #FDBA74; }
[data-theme="dark"] .tag-priority-中   { background: rgba(245, 158, 11, .16); color: #FCD34D; }
[data-theme="dark"] .tag-priority-低   { background: rgba(148, 163, 184, .18); color: #CBD5E1; }

[data-theme="dark"] .tag-status-待开始 { background: rgba(148, 163, 184, .16); color: #CBD5E1; }
[data-theme="dark"] .tag-status-进行中 { background: rgba(59, 130, 246, .20); color: #93C5FD; }
[data-theme="dark"] .tag-status-待确认 { background: rgba(245, 158, 11, .18); color: #FCD34D; }
[data-theme="dark"] .tag-status-已延期 { background: rgba(239, 68, 68, .18); color: #FCA5A5; }
[data-theme="dark"] .tag-status-已取消 { background: rgba(107, 114, 128, .22); color: #9CA3AF; }

[data-theme="dark"] .tag-type-问题解决 { background: rgba(198, 40, 40, .20); color: #F19A9A; }
[data-theme="dark"] .tag-type-成本优化 { background: rgba(46, 125, 50, .22); color: #8FD69A; }
[data-theme="dark"] .tag-type-效率提升 { background: rgba(249, 168, 37, .18); color: #F7D479; }
[data-theme="dark"] .tag-type-培训分享 { background: rgba(106, 27, 154, .24); color: #D4A6E8; }
[data-theme="dark"] .tag-type-学习成长 { background: rgba(0, 121, 107, .24); color: #7FD8CD; }

[data-theme="dark"] .risk-high   { background: rgba(239, 68, 68, .18); color: #FCA5A5; }
[data-theme="dark"] .risk-medium { background: rgba(245, 158, 11, .18); color: #FCD34D; }
[data-theme="dark"] .quick-icon { background: rgba(59, 130, 246, .18); color: #93C5FD; }

/* 表单控件在深色下的可读性 */
[data-theme="dark"] .form-control,
[data-theme="dark"] .search-box input,
[data-theme="dark"] select.form-control {
    background: #171B20;
    border-color: var(--border);
    color: var(--text-primary);
}
[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] .search-box input::placeholder { color: var(--text-muted); }
[data-theme="dark"] select.form-control option { background: #171B20; color: var(--text-primary); }

/* 滚动条 */
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #39424C; }
[data-theme="dark"] ::-webkit-scrollbar-track { background: #14171A; }

/* 弹窗遮罩加深 */
[data-theme="dark"] .modal-overlay { background: rgba(0, 0, 0, .65); }

/* Toast 在深色下保持可读 */
[data-theme="dark"] .toast {
    background: #2C333B;
    color: var(--text-primary);
    border: 1px solid var(--border);
}
