/* ============================================================
   丽人梦想秀® · 暗金主题淡色卡片补丁 v1
   Dark Theme Card Patch — 把暗金主题下残留的淡色(白色半透明)卡片
   统一改成暗紫金配色，与暗金主题背景协调
   绝对最后加载（排在 typography-upgrade.css 之后）· 仅影响暗金主题
   ============================================================ */

/* ── 1. 联邦/赋能系统卡片 (fed-card 等) ──
   原 background: rgba(255,255,255,0.65) 淡色，暗金下突兀 */
body.dark-mode .fed-card {
  background: rgba(20, 8, 40, 0.82) !important;
  border: 1px solid rgba(212, 165, 116, 0.14) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 8px 28px rgba(0,0,0,0.35) !important;
}
body.dark-mode .fed-card:hover {
  border-color: rgba(232, 201, 160, 0.32) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 16px 44px rgba(0,0,0,0.45) !important;
}

body.dark-mode .fed-tab {
  background: rgba(20, 8, 40, 0.6) !important;
  border-color: rgba(212, 165, 116, 0.16) !important;
  color: #B8B0C8 !important;
}
body.dark-mode .fed-tab:hover {
  border-color: #D4A574 !important;
  color: #E8C9A0 !important;
}
body.dark-mode .fed-tab.active {
  background: linear-gradient(135deg, #6B1D6E, #8B3A8E) !important;
  color: #fff !important;
  border-color: transparent !important;
}

body.dark-mode .fed-detail-card,
body.dark-mode .fed-back-btn {
  background: rgba(20, 8, 40, 0.72) !important;
  border-color: rgba(212, 165, 116, 0.14) !important;
}
body.dark-mode .fed-btn-alt {
  background: rgba(20, 8, 40, 0.65) !important;
  color: #E8C9A0 !important;
  border: 1px solid rgba(212, 165, 116, 0.2) !important;
}

/* ── 2. 百花池卡片 (hf-* 等) ──
   原 background: rgba(255,255,255,0.6) 淡色 */
body.dark-mode .hf-carousel {
  background: rgba(20, 8, 40, 0.75) !important;
  border: 1px solid rgba(212, 165, 116, 0.14) !important;
}
body.dark-mode .hf-brand-card {
  background: rgba(20, 8, 40, 0.8) !important;
  border: 1px solid rgba(212, 165, 116, 0.14) !important;
}
body.dark-mode .hf-brand-card:hover {
  border-color: rgba(232, 201, 160, 0.3) !important;
  box-shadow: 0 14px 40px rgba(0,0,0,0.4) !important;
}
body.dark-mode .hf-filter {
  background: rgba(20, 8, 40, 0.6) !important;
  border-color: rgba(212, 165, 116, 0.16) !important;
  color: #B8B0C8 !important;
}
body.dark-mode .hf-filter:hover {
  border-color: #D4A574 !important;
  color: #E8C9A0 !important;
}
body.dark-mode .hf-filter.active {
  background: linear-gradient(135deg, #6B1D6E, #8B3A8E) !important;
  color: #fff !important;
  border-color: transparent !important;
}
body.dark-mode .hf-carousel-nav {
  background: rgba(20, 8, 40, 0.7) !important;
  border: 1px solid rgba(212, 165, 116, 0.2) !important;
  color: #E8C9A0 !important;
}

/* ── 3. 金色卡片 card-gold ──
   原白金色渐变 rgba(255,255,255,0.75)，暗金下改暗紫金 */
body.dark-mode .card-gold {
  background: linear-gradient(135deg, rgba(26, 10, 46, 0.9) 0%, rgba(20, 8, 40, 0.92) 100%) !important;
  border: 1px solid rgba(212, 165, 116, 0.16) !important;
}

/* ── 4. 统计卡片 stat-card ──
   原 rgba(255,255,255,0.7) 淡色 */
body.dark-mode .stat-card {
  background: rgba(20, 8, 40, 0.8) !important;
  border: 1px solid rgba(212, 165, 116, 0.14) !important;
}

/* ── 5. 首页登录/注册卡（内联淡色渐变 → 暗紫金）──
   index.php 里 #home-login / #home-register 硬编码了近白渐变
   linear-gradient(180deg, rgba(255,254,249,0.98), rgba(253,248,242,0.95)) */
body.dark-mode #home-login > div,
body.dark-mode #home-register > div {
  background: linear-gradient(180deg, rgba(26, 10, 46, 0.96) 0%, rgba(18, 6, 34, 0.96) 100%) !important;
  border-color: rgba(212, 165, 116, 0.18) !important;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45) !important;
}

/* ── 6. 百花池搜索框（JS 内联 #FFFEF9 白底 → 暗色）── */
body.dark-mode #bh-search {
  background: rgba(20, 8, 40, 0.75) !important;
  color: #D4C5E2 !important;
  border-color: rgba(212, 165, 116, 0.22) !important;
}
body.dark-mode #bh-search::placeholder {
  color: rgba(212, 197, 226, 0.35) !important;
}

/* ── 7. 首页登录/注册输入框（内联 rgba(255,254,249,0.8) 白底 → 暗色）── */
body.dark-mode #home-login input,
body.dark-mode #home-register input,
body.dark-mode #home-register select {
  background: rgba(20, 8, 40, 0.75) !important;
  border-color: rgba(212, 165, 116, 0.2) !important;
  color: #D4C5E2 !important;
}
body.dark-mode #home-login input::placeholder,
body.dark-mode #home-register input::placeholder {
  color: rgba(212, 197, 226, 0.35) !important;
}

/* ── 8. 兜底：暗金下清除 premium-pro 残留的白色玻璃边框 ── */
body.dark-mode .card-stat,
body.dark-mode .card-glass,
body.dark-mode .fed-card {
  border-color: rgba(212, 165, 116, 0.14) !important;
}

/* ── 9. 内联淡色卡片/横幅 → 暗紫金（属性选择器匹配硬编码 hex）──
   覆盖：coach 打卡格/横幅/卡片、liren-intro 统计卡、mall 禁用按钮 */
body.dark-mode [style*="FFFDF5" i],
body.dark-mode [style*="FFFEF9" i],
body.dark-mode [style*="FBF3E6" i],
body.dark-mode [style*="FDF6F0" i],
body.dark-mode [style*="F8F0FA" i],
body.dark-mode [style*="F7F5F6" i],
body.dark-mode [style*="F3F0F2" i],
body.dark-mode [style*="F3EFF4" i] {
  background: linear-gradient(160deg, rgba(26, 10, 46, 0.94) 0%, rgba(18, 6, 34, 0.96) 100%) !important;
}

/* 暗金下：淡灰禁用按钮（商城「积分不足」等）→ 暗色 */
body.dark-mode [style*="f5f5f5" i] {
  background: rgba(20, 8, 40, 0.7) !important;
  color: rgba(212, 197, 226, 0.45) !important;
  border-color: rgba(212, 165, 116, 0.18) !important;
}
body.dark-mode [style*="#ddd" i] {
  border-color: rgba(212, 165, 116, 0.18) !important;
}

/* ── 10. 淡色徽章 badge（Material 50/100 色阶 → 暗紫金）──
   core.min.css / design-system.css 定义的 .badge-dreamer/.badge-queen/
   .badge-partner/.badge-sponsor/.badge-mentor 用淡粉/紫/青/金/蓝渐变 */
body.dark-mode .badge-dreamer,
body.dark-mode .badge-queen,
body.dark-mode .badge-partner,
body.dark-mode .badge-sponsor,
body.dark-mode .badge-mentor {
  background: linear-gradient(135deg, rgba(26, 10, 46, 0.85) 0%, rgba(18, 6, 34, 0.9) 100%) !important;
  color: #E8C9A0 !important;
  border: 1px solid rgba(212, 165, 116, 0.2) !important;
}

/* ── 11. 彩色→白渐变卡片（linear-gradient(...rgba(255,255,255,0.8)) 终点）
   覆盖 private-domain / 丽人联邦等「彩色 → 80% 白」统计卡 */
body.dark-mode [style*="linear-gradient"][style*="255,255,255,0.8" i],
body.dark-mode [style*="linear-gradient"][style*="255, 255, 255, 0.8" i] {
  background: linear-gradient(135deg, rgba(26, 10, 46, 0.92) 0%, rgba(18, 6, 34, 0.95) 100%) !important;
}
