/* ═══════════════════════════════════════════════════════════════
   Salon Platform · 暗色模式修复 + 硬色内联样式覆盖
   覆盖所有 HTML 页面中硬编码的 #fff / #f7f6f3 / #37352f / #6b6b6b 等
   ═══════════════════════════════════════════════════════════════ */

/* ─── 浅色模式：把白色卡片统一为新拟物背景色 ─── */
body {
  background: var(--bg) !important;
  color: var(--ink) !important;
}

/* 覆盖所有白色背景内联样式 */
[style*="background:#fff"],
[style*="background: #fff"],
[style*="background:#ffffff"],
[style*="background: #ffffff"],
[style*="background:#f7f6f3"],
[style*="background: #f7f6f3"],
[style*="background:#f8f8f8"],
[style*="background: #f8f8f8"],
[style*="background:#efedea"],
[style*="background: #efedea"],
[style*="background:#e8e5df"],
[style*="background: #e8e5df"],
[style*="background:#f3f2ef"],
[style*="background: #f3f2ef"],
[style*="background-color:#fff"],
[style*="background-color: #fff"],
[style*="background-color:#f7f6f3"],
[style*="background-color: #f7f6f3"] {
  background: var(--bg) !important;
}

/* 覆盖深色文字为变量 */
[style*="color:#37352f"],
[style*="color: #37352f"],
[style*="color:#333333"],
[style*="color: #333333"],
[style*="color:#333"],
[style*="color: #333"] {
  color: var(--ink) !important;
}

[style*="color:#6b6b6b"],
[style*="color: #6b6b6b"] {
  color: var(--ink-soft) !important;
}

/* ─── 暗色模式全面覆盖 ─── */
[data-theme="dark"] [style*="background:#fff"],
[data-theme="dark"] [style*="background: #fff"],
[data-theme="dark"] [style*="background:#ffffff"],
[data-theme="dark"] [style*="background: #ffffff"],
[data-theme="dark"] [style*="background:#f7f6f3"],
[data-theme="dark"] [style*="background: #f7f6f3"],
[data-theme="dark"] [style*="background:#f8f8f8"],
[data-theme="dark"] [style*="background: #f8f8f8"],
[data-theme="dark"] [style*="background:#efedea"],
[data-theme="dark"] [style*="background: #efedea"],
[data-theme="dark"] [style*="background:#e8e5df"],
[data-theme="dark"] [style*="background: #e8e5df"],
[data-theme="dark"] [style*="background:#f3f2ef"],
[data-theme="dark"] [style*="background: #f3f2ef"],
[data-theme="dark"] [style*="background-color:#fff"],
[data-theme="dark"] [style*="background-color: #fff"],
[data-theme="dark"] [style*="background-color:#f7f6f3"],
[data-theme="dark"] [style*="background-color: #f7f6f3"] {
  background: var(--bg) !important;
}

[data-theme="dark"] [style*="color:#37352f"],
[data-theme="dark"] [style*="color: #37352f"],
[data-theme="dark"] [style*="color:#333333"],
[data-theme="dark"] [style*="color: #333333"],
[data-theme="dark"] [style*="color:#333"],
[data-theme="dark"] [style*="color: #333"] {
  color: var(--ink) !important;
}

[data-theme="dark"] [style*="color:#6b6b6b"],
[data-theme="dark"] [style*="color: #6b6b6b"] {
  color: var(--ink-soft) !important;
}

/* 暗色模式：边框颜色适配 */
[data-theme="dark"] [style*="border: 1px solid #e8e5df"],
[data-theme="dark"] [style*="border:1px solid #e8e5df"],
[data-theme="dark"] [style*="border: 1px solid #e5e5e5"],
[data-theme="dark"] [style*="border:1px solid #e5e5e5"],
[data-theme="dark"] [style*="border-color: #e8e5df"],
[data-theme="dark"] [style*="border-color:#e8e5df"] {
  border-color: var(--bg-elevated) !important;
}

/* ─── 内联 <style> 块中的白色卡片（通过 class 覆盖） ─── */
.stat-card,
.path-card,
.skill-card,
.course-card,
.kb-section,
.board-card,
.vote-btn,
.success-card,
.event-card,
.need-item,
.inbox-item,
.daily-item,
.me-card,
.rec-card,
.price-card,
.gw-card,
.gw-intro-card,
.gw-stat-card,
.gw-mini-link,
.graph-box,
.searchbox,
.sg-search,
.chip {
  background: var(--bg) !important;
  border: none !important;
  box-shadow: var(--raise-sm);
}

/* 暗色模式下的特殊适配 */
[data-theme="dark"] .stat-card,
[data-theme="dark"] .path-card,
[data-theme="dark"] .skill-card,
[data-theme="dark"] .course-card,
[data-theme="dark"] .kb-section,
[data-theme="dark"] .board-card,
[data-theme="dark"] .vote-btn,
[data-theme="dark"] .success-card,
[data-theme="dark"] .event-card,
[data-theme="dark"] .need-item,
[data-theme="dark"] .inbox-item,
[data-theme="dark"] .daily-item,
[data-theme="dark"] .me-card,
[data-theme="dark"] .rec-card,
[data-theme="dark"] .price-card,
[data-theme="dark"] .gw-card,
[data-theme="dark"] .gw-intro-card,
[data-theme="dark"] .gw-stat-card,
[data-theme="dark"] .gw-mini-link,
[data-theme="dark"] .graph-box {
  background: var(--bg) !important;
  border: none !important;
  box-shadow: var(--raise-sm);
}

/* 暗色模式：输入框适配 */
[data-theme="dark"] .input,
[data-theme="dark"] .select,
[data-theme="dark"] .textarea,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] textarea {
  background: var(--bg) !important;
  color: var(--ink) !important;
  border: none !important;
  box-shadow: var(--inset-md);
}

/* 暗色模式：按钮适配 */
[data-theme="dark"] .btn,
[data-theme="dark"] button {
  background: var(--bg) !important;
  color: var(--ink) !important;
  border: none !important;
  box-shadow: var(--raise-sm);
}

[data-theme="dark"] .btn-primary {
  background: var(--accent) !important;
  color: #fff !important;
}

/* 暗色模式：顶部底部导航 */
[data-theme="dark"] .topbar,
[data-theme="dark"] .bottombar {
  background: var(--bg) !important;
  border: none !important;
  box-shadow: var(--raise-sm);
}

/* 暗色模式：下拉菜单 */
[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .user-menu {
  background: var(--bg) !important;
  border: none !important;
  box-shadow: var(--raise-lg);
}

/* 暗色模式：模态框 */
[data-theme="dark"] .modal-box,
[data-theme="dark"] .modal-card {
  background: var(--bg) !important;
  border: none !important;
  box-shadow: var(--raise-xl);
}

/* 暗色模式：特殊元素 */
[data-theme="dark"] .hero-eyebrow {
  background: var(--bg-elevated) !important;
  color: var(--ink-soft) !important;
  border: none !important;
}

[data-theme="dark"] .skill-icon,
[data-theme="dark"] .course-cover {
  background: var(--bg-elevated) !important;
}

/* 暗色模式：Toast */
[data-theme="dark"] .toast {
  background: var(--ink) !important;
  color: var(--bg) !important;
}

/* 暗色模式：通知红点边框 */
[data-theme="dark"] .badge-dot {
  border-color: var(--bg) !important;
}
