/* A11Y-CONTRAST-FIX-START =====================================================
 * 无障碍对比度修复层（A11y Contrast Fix）
 * 链接位置：必须是每个 HTML 的最后一位 CSS，才能用 !important 压过
 *           dg-ui-overrides.css / home-premium.css / dgj-page-head.css 等
 *           后续文件的 !important 写死色。
 * 目的：消灭 axe color-contrast 全部 serious 失败（维度8 发布红线 P0）。
 * 达标依据（≥4.5:1 AA 正常文字）：
 *   #5e6670 白5.81/浅灰5.37  #646a73 白5.46/浅灰5.04
 *   #15803d 白5.02/浅绿4.58  #9a3412 白4.60/浅橙4.60
 *   #1d4ed8 白6.71  #8a6d1f 白4.85(金)  #2563eb 白5.20
 * 删除本块（搜 A11Y-CONTRAST-FIX-START）并移除 link 即整体回退。
 * ========================================================================== */
:root{
 --muted: var(--text-muted) !important;
 --dg-text-2: var(--text-muted) !important;
 --ph-sub: var(--text-muted) !important;
 --text-faint: var(--text-muted) !important;
 --gray-400: var(--text-muted) !important;
  --gray-500:     #646a73 !important;
 --gray-600: var(--text-muted) !important;
 --gray2: var(--text-muted) !important;   /* dgj-page-head.css .top .sub 等用 var(--gray2) */
 --sub: var(--text-muted) !important;   /* .topbar .ts / h1 .en 等用 var(--sub) */
  --success:      #15803d !important;
  --orange:       #9a3412 !important;
  --warning:      #9a3412 !important;
}
/* 次级灰文字类 */
.hint, .note, .dgj-card-t, .dgj-tip, .dgj-empty-cell, .pagination-info, .insight .meta,
.k, .d, .v, .panel, .pb, .empty, .ph, .page-subtitle, .ph-unit, .ph-alert-arrow, .sub, .gray,
.l, .metric .l, .kpi-loading, .ts, .st-standalone, .gray.tag { color:#5e6670 !important; }
/* 英文 / KPI 标签 */
.kpi-card-en, .ph-kpi-en, .en, .en-label, .en-caption, .kpi-view-en, .kpi-view-head, .kpi-card-body,
.fin .kpi-view-head { color:#5e6670 !important; }
/* 状态 / 语义色 */
.dg-ux-inline-msg.is-success, .dg-ux-field-hint.is-ok { color:#15803d !important; }
.dg-ux-field-hint, .dg-ux-inline-msg { color:#5e6670 !important; }
#loginOverlay .foot { color:#5e6670 !important; }
.ph-alert-en { color:#5e6670 !important; }
.pill.off { color:#5e6670 !important; }
.tag.o { color:#9a3412 !important; }
.st.paid, .st-ready, .st.normal, .ok, .vl.ok, .g.tag, .on.pill, .pill.on, .tag.g { color:#15803d !important; }
.bg-green { color:#15803d !important; }
.bg-orange { color:#9a3412 !important; }
.st-active { color:#9a3412 !important; }
.dg-btn.success { background:#15803d !important; border-color:#15803d !important; color:#fff !important; }
.dg-btn.success.outline { background:#fff !important; color:#15803d !important; border-color:#15803d !important; }
.kpi-card-value.gold, .gold.kpi-card-value { color:#8a6d1f !important; }
.sv { background:#1d4ed8 !important; color: var(--surface) !important; }
.ghost { color:#1d4ed8 !important; }
.b-standalone, .badge.b-standalone { background:#9a3412 !important; color: var(--surface) !important; }
.back { color:#1d4ed8 !important; }
/* 内联 style 写死值兜底（!important 压内联） */
[style*="color:#e65100" i], [style*="color:#d97506" i], [style*="color:#ed7b2f" i], [style*="color:#ea580c" i] { color:#9a3412 !important; }
[style*="background:#e65100" i], [style*="background:#d97506" i], [style*="background:#ed7b2f" i], [style*="background:#ea580c" i] { background:#9a3412 !important; }
[style*="color:#16a34a" i], [style*="color:#15803d" i] { color:#15803d !important; }
[style*="color:#2b7de9" i], [style*="background:#2b7de9" i] { color:#1d4ed8 !important; background:#1d4ed8 !important; }
[style*="color:#9ca3af" i], [style*="color:#94a3b8" i], [style*="color:#a6b0bf" i], [style*="color:#9aa0a6" i], [style*="color:#b6bcc4" i], [style*="color:#c0c4cc" i], [style*="color:#6b7280" i], [style*="color:#888" i], [style*="color:#999" i], [style*="color:#8a9099" i] { color:#5e6670 !important; }
[style*="background:#9ca3af" i], [style*="background:#94a3b8" i], [style*="background:#a6b0bf" i], [style*="background:#9aa0a6" i], [style*="background:#b6bcc4" i], [style*="background:#c0c4cc" i] { background:#5e6670 !important; }
[style*="color:#cfe0ff" i] { color:#2563eb !important; }
[style*="color:#b8962e" i], [style*="color:#a8701f" i] { color:#8a6d1f !important; }
/* Tailwind 风格工具类兜底 */
.text-gray-300, .text-gray-400, .text-gray-500, .text-gray-600, .text-slate-300, .text-slate-400, .text-slate-500, .text-zinc-300, .text-zinc-400, .text-zinc-500 { color:#5e6670 !important; }
.text-orange-500, .text-orange-600, .text-orange-700, .text-amber-600 { color:#9a3412 !important; }
.text-green-500, .text-green-600, .text-emerald-500, .text-emerald-600 { color:#15803d !important; }
.text-blue-500, .text-blue-600 { color:#1d4ed8 !important; }
/* ============ 高特异性补刀：压过 dgj-page-head.css / dg-ui-overrides.css 的更高特异性 !important ============ */
/* dgj-page-head.css: .top .sub / .hd .sub / .topbar .sub / .top .meta ... 用 var(--gray2) 且选择器 0,2,0 */
.top .sub, .hd .sub, .topbar .sub, .top .meta, .hd .meta, .topbar .meta { color:#5e6670 !important; }
/* dg-ui-overrides.css: h1 .en / .page-head .en / .page-subtitle .en 用 #A6B0BF 且 0,2,0 */
.page-head .en, h1 .en, .page-subtitle .en { color:#5e6670 !important; }
/* 表单字段标签（内联 <style> .fld label，非 !important） */
.fld label, .form-label, .field-label { color:#5e6670 !important; }
/* 缴费指标下达 #roleTag：白字蓝底(#2b7de9, 4.03) → 改用更深蓝 #1d4ed8(6.71) */
#roleTag { background:#1d4ed8 !important; color: var(--surface) !important; }
/* .ts 时间戳内联 opacity:.7 会把有效对比拉到 ~3.0；还原不透明以满足 AA */
.ts { opacity:1 !important; }
/* A11Y-CONTRAST-FIX-END */

/* 总工作台 .b-sys 蓝字落浅蓝底不达标 -> 降到 AA 合规深蓝 */
.b-sys{color:#0958d9 !important;}
/* link-in-text-block 修复：正文链接加下划线（排除按钮/导航/品牌链接） */
a{text-decoration:underline;}
a.dgj-btn, a.btn, a.button, .topbar a, .nav-links a, .menu a, a.logo, .brand a, a.no-underline{text-decoration:none !important;}
