/* ===========================================================
   云东科技 · 深色主题补丁（2026-10-17）
   用途：清掉各页面里"浅色底 + 浅色字"的遗留（换主题时硬编码颜色没跟着换）
   引入位置：theme-cool.css 之后（base.html 里、以及 static/cap/*.html 里）
   =========================================================== */

/* ---------- ① 内联浅色背景 → 深色卡 ---------- */
[style*="background:#fff"], [style*="background: #fff"], [style*="background:#ffffff"],
[style*="background: #ffffff"], [style*="background:white"],
[style*="background:#f8fafc"], [style*="background:#f9fafb"], [style*="background:#f7f9fc"],
[style*="background:#f6f8fc"], [style*="background:#eff6ff"], [style*="background:#fffbeb"],
[style*="background:#fef2f2"], [style*="background:#f0fdf4"], [style*="background:#f3e8ff"],
[style*="background:#dbeafe"], [style*="background:#fef3c7"], [style*="background:#dcfce7"],
[style*="background:#fee2e2"], [style*="background:#ecfdf5"], [style*="background:#f5f3ff"] {
  background: rgba(17,25,43,.72) !important;
  border-color: rgba(110,160,255,.18) !important;
}

/* ---------- ② 常见"白卡"类名 → 深色卡 ---------- */
.db-card, .ff-card, .stat-card, .mc-card, .exp-card, .ab-card, .biz-cap,
.kv-card, .info-card, .panel, .box-card {
  background: rgba(17,25,43,.72) !important;
  border-color: rgba(110,160,255,.18) !important;
}
.db-card *, .ff-card *, .stat-card *, .mc-card * { border-color: rgba(110,160,255,.14) !important; }

/* ---------- ③ 浅色药丸/角标 → 半透明底 + 亮字 ---------- */
.st-done, .days-badge, .or-state, .b-live, .b-dev, .b-plan {
  background: rgba(59,130,246,.16) !important;
  color: #c3cee4 !important;
}
.days-badge.days-soon, .days-soon, .st-half {
  background: rgba(251,191,36,.16) !important;
  color: #fbbf24 !important;
}
.days-badge.days-over, .days-over {
  background: rgba(248,113,113,.16) !important;
  color: #f87171 !important;
}
.st-dev { background: rgba(159,176,204,.16) !important; color: #9fb0cc !important; }

/* ---------- ④ 表格：表头深色、浅底单元格深色 ---------- */
th { background: rgba(24,34,56,.92) !important; color: #c3cee4 !important; }
td[style*="#eff6ff"], td[style*="#fff"], td[style*="#fef3c7"], td[style*="#dcfce7"] {
  background: rgba(59,130,246,.12) !important; color: #e9effc !important;
}

/* ---------- ⑤ 深色字（浅底遗留）在深色背景上 → 提亮 ---------- */
.logo-text, .db-k, .mc-icon, .or-when,
[style*="color:#333"], [style*="color: #333"], [style*="color:#374151"],
[style*="color:#1f2937"], [style*="color:#111827"], [style*="color:#2c2c2c"] {
  color: #c3cee4 !important;
}
[style*="color:#1e40af"], [style*="color:#1d4ed8"] { color: #7dd3fc !important; }
[style*="color:#6b7280"], [style*="color:#9ca3af"], [style*="color:#888"] { color: #a2b2ce !important; }

/* ---------- ⑥ 收藏/提醒类浅底 ---------- */
.fav-link, .fav-btn { background: rgba(251,191,36,.14) !important; color: #fbbf24 !important; }

/* ---------- ⑦ 收藏按钮（/ai-daily 等页，页内 !important 需更高优先级压过） ---------- */
a.fav-link, .fav-item a.fav-link, a.fav-btn { background: rgba(251,191,36,.16) !important; color: #fbbf24 !important; }

/* ---------- ⑧ 收尾：收藏按钮 / 星级 / 卡片标题（页内 !important 用更高特异性压过） ---------- */
html body a.fav-link, html body .fav-item a.fav-link, html body a.fav-btn {
  background: rgba(251,191,36,.16) !important; color: #fbbf24 !important;
}
html body span.star, html body .star, html body .icon { color: #fbbf24 !important; }
html body h4, html body .ab-sec h2 { color: #eef3ff !important; }
html body .ff-card .n, html body span.n { color: #c3cee4 !important; }

/* ---------- ⑨ 暗红/灰字提亮（10-17晚 双端优化） ---------- */
html body .mc-value.postpaid, html body .stat-card.over .num,
html body .days-badge.days-over, html body .days-over,
html body .exp-over, html body [style*="color:#dc2626"], html body [style*="color:#b91c1c"] {
  color: #f87171 !important;
}
html body .muted, html body .sub, html body .hint, html body .scrm-sub, html body .delta {
  color: #9fb0cc !important;
}
/* 蓝底按钮上的白字略微加深底色，提高可读性 */
html body .btn-submit { background: #2563eb !important; }
