/* ==========================================================================
   skin-dash-dark.css  ·  数据看板大屏风（暗色 + 霓虹 + 指标环）
   素材来源（真实扒取，未手编）：
     1) @tabler/core v1.0.0-beta20 — tabler.css:189 `[data-bs-theme=dark]` 变量块
        body-bg #040a11 / body-color #fcfdfe / border-color #1f2e41
        bg-surface #0e1722（由 secondary-bg #182433 按层级推导）/ tertiary #0e1722
     2) @kjgl77/datav-vue3 v1.7.4 — dist/style.css 霓虹主色 #28f8ff
   启用：<html data-fh-skin="dark">，由 js/skin-switch.js 切换
   ========================================================================== */

html[data-fh-skin="dark"] {
  color-scheme: dark;

  /* --- Tabler 皮肤层令牌重映射 --- */
  --sk-body-color: #fcfdfe;
  --sk-body-color-rgb: 252, 253, 254;
  --sk-bg-surface: #0e1722;
  --sk-bg-surface-tertiary: #131f2e;
  --sk-body-bg: #040a11;
  --sk-border-color: #1f2e41;
  --sk-border-color-translucent: rgba(72, 110, 149, 0.24);
  --sk-secondary-color: rgba(252, 253, 254, 0.62);
  --sk-primary: #28f8ff;
  --sk-primary-rgb: 40, 248, 255;
  --sk-primary-hover: #6dfbff;
  --sk-shadow-card: 0 0 0 1px rgba(40, 248, 255, 0.10), 0 0 22px rgba(40, 248, 255, 0.07);
  --sk-shadow-input: none;
  --sk-focus-ring: 0 0 0 0.25rem rgba(40, 248, 255, 0.28);

  /* --- 既有 --fh-* 令牌重映射（覆盖 ui-polish / ui-tokens 硬编码浅色） --- */
  --fh-text: #e8f6ff;
  --fh-text-2: #9fb6c9;
  --fh-text-muted: #7d94a8;
  --fh-bg-page: #040a11;
  --fh-bg-card: #0e1722;
  --fh-border: #1f2e41;
  --fh-border-strong: #2b3f57;
  --fh-zebra: #131f2e;
  --fh-color-text: #e8f6ff;
  --fh-color-muted: #7d94a8;
  --fh-color-bg: #040a11;
  --fh-color-card: #0e1722;
  --fh-color-border: #1f2e41;
  --fh-sidebar: #050d16;
  --fh-primary: #28f8ff;
  --fh-primary-hover: #6dfbff;
  --fh-primary-soft: rgba(40, 248, 255, 0.10);
  --fh-shadow: 0 0 0 1px rgba(40, 248, 255, 0.08);
}

/* ---------- 页面骨架 ---------- */
html[data-fh-skin="dark"] body,
html[data-fh-skin="dark"] .main-content,
html[data-fh-skin="dark"] #pageContainer {
  background: #040a11 !important;
  color: #e8f6ff !important;
}
html[data-fh-skin="dark"] .topbar {
  background: #0a1420 !important;
  border-bottom: 1px solid rgba(40, 248, 255, 0.16) !important;
  box-shadow: 0 1px 18px rgba(40, 248, 255, 0.05) !important;
  color: #dff6ff !important;
}
html[data-fh-skin="dark"] .topbar input,
html[data-fh-skin="dark"] .topbar .search-box input {
  background: #0e1722 !important;
  border-color: #1f2e41 !important;
  color: #e8f6ff !important;
}
html[data-fh-skin="dark"] #breadcrumb,
html[data-fh-skin="dark"] .breadcrumb {
  color: #9fb6c9 !important;
}
html[data-fh-skin="dark"] .sidebar {
  background: #050d16 !important;
  border-right: 1px solid rgba(40, 248, 255, 0.12) !important;
}
html[data-fh-skin="dark"] .nav-item.active,
html[data-fh-skin="dark"] .nav-item.router-link-active {
  background: rgba(40, 248, 255, 0.10) !important;
  box-shadow: inset 2px 0 0 #28f8ff, 0 0 16px rgba(40, 248, 255, 0.12) !important;
  color: #28f8ff !important;
}

/* ---------- 卡片：暗底 + 霓虹描边光晕 ---------- */
html[data-fh-skin="dark"] .card,
html[data-fh-skin="dark"] .stat-card,
html[data-fh-skin="dark"] .module-container,
html[data-fh-skin="dark"] .lg-card,
html[data-fh-skin="dark"] .lg-kpi,
html[data-fh-skin="dark"] .wh-kpi {
  background: linear-gradient(180deg, #101d2c 0%, #0b1421 100%) !important;
  border: 1px solid rgba(40, 248, 255, 0.18) !important;
  box-shadow: 0 0 0 1px rgba(40, 248, 255, 0.06), 0 0 24px rgba(40, 248, 255, 0.07),
              inset 0 1px 0 rgba(40, 248, 255, 0.08) !important;
  color: #e8f6ff !important;
}
html[data-fh-skin="dark"] .card:hover,
html[data-fh-skin="dark"] .stat-card:hover {
  border-color: rgba(40, 248, 255, 0.4) !important;
  box-shadow: 0 0 0 1px rgba(40, 248, 255, 0.14), 0 0 34px rgba(40, 248, 255, 0.16) !important;
}
html[data-fh-skin="dark"] .card-header {
  background: rgba(40, 248, 255, 0.04) !important;
  border-bottom: 1px solid rgba(40, 248, 255, 0.16) !important;
}
html[data-fh-skin="dark"] .card-title,
html[data-fh-skin="dark"] .card h3,
html[data-fh-skin="dark"] .module-header h2 {
  color: #e8f6ff !important;
}
html[data-fh-skin="dark"] .module-header { border-bottom-color: rgba(40, 248, 255, 0.16) !important; }
html[data-fh-skin="dark"] .module-header p,
html[data-fh-skin="dark"] .card-subtitle { color: #9fb6c9 !important; }

/* KPI 数值霓虹发光（指标环观感） */
html[data-fh-skin="dark"] .stat-value,
html[data-fh-skin="dark"] .stat-num,
html[data-fh-skin="dark"] .stat-card b,
html[data-fh-skin="dark"] .lg-kpi b,
html[data-fh-skin="dark"] .wh-kpi b {
  color: #28f8ff !important;
  text-shadow: 0 0 12px rgba(40, 248, 255, 0.55), 0 0 2px rgba(40, 248, 255, 0.9);
}
html[data-fh-skin="dark"] .stat-label,
html[data-fh-skin="dark"] .lg-kpi span,
html[data-fh-skin="dark"] .wh-kpi span,
html[data-fh-skin="dark"] .caption,
html[data-fh-skin="dark"] .text-muted { color: #7d94a8 !important; }

/* ---------- 表格 ---------- */
html[data-fh-skin="dark"] .table { color: #d8ecf7 !important; }
html[data-fh-skin="dark"] .table > :not(caption) > * > * {
  border-bottom-color: rgba(72, 110, 149, 0.24) !important;
}
html[data-fh-skin="dark"] .table > thead > tr > *,
html[data-fh-skin="dark"] .table th {
  background: rgba(40, 248, 255, 0.05) !important;
  color: #7dd8e8 !important;
  border-bottom-color: rgba(40, 248, 255, 0.18) !important;
}
html[data-fh-skin="dark"] .table > tbody > tr:hover > * {
  background: rgba(40, 248, 255, 0.06) !important;
}
html[data-fh-skin="dark"] .data-table,
html[data-fh-skin="dark"] .biz-table { color: #d8ecf7 !important; }
html[data-fh-skin="dark"] .biz-table th {
  background: rgba(40, 248, 255, 0.05) !important;
  color: #7dd8e8 !important;
  border-bottom-color: rgba(40, 248, 255, 0.18) !important;
}
html[data-fh-skin="dark"] .biz-table td {
  color: #c3dceb !important;
  border-bottom-color: rgba(72, 110, 149, 0.2) !important;
}
html[data-fh-skin="dark"] .biz-table tr:hover { background: rgba(40, 248, 255, 0.05) !important; }

/* ---------- 按钮 ---------- */
html[data-fh-skin="dark"] .btn {
  background: #131f2e !important;
  border-color: #2b3f57 !important;
  color: #dff6ff !important;
  box-shadow: none !important;
}
html[data-fh-skin="dark"] .btn:hover { background: #1a2b3e !important; border-color: #3d5a78 !important; }
html[data-fh-skin="dark"] .btn-primary,
html[data-fh-skin="dark"] .btn.btn-primary,
html[data-fh-skin="dark"] .login-btn {
  background: linear-gradient(135deg, #28f8ff 0%, #0fb9d6 100%) !important;
  border-color: #28f8ff !important;
  color: #04121a !important;
  font-weight: 700 !important;
  box-shadow: 0 0 18px rgba(40, 248, 255, 0.35) !important;
}
html[data-fh-skin="dark"] .btn-primary:hover {
  box-shadow: 0 0 26px rgba(40, 248, 255, 0.55) !important;
}
html[data-fh-skin="dark"] .lg-btn,
html[data-fh-skin="dark"] .wh-btn,
html[data-fh-skin="dark"] .dm-btn {
  background: #131f2e !important;
  border-color: #2b3f57 !important;
  color: #dff6ff !important;
}
html[data-fh-skin="dark"] .lg-btn.pri,
html[data-fh-skin="dark"] .wh-btn.pri,
html[data-fh-skin="dark"] .dm-btn.on,
html[data-fh-skin="dark"] .bc-tab.active {
  background: rgba(40, 248, 255, 0.16) !important;
  border-color: #28f8ff !important;
  color: #28f8ff !important;
}

/* ---------- 表单 ---------- */
html[data-fh-skin="dark"] .form-control,
html[data-fh-skin="dark"] .form-input,
html[data-fh-skin="dark"] .card select,
html[data-fh-skin="dark"] .card textarea,
html[data-fh-skin="dark"] .card input:not([type="checkbox"]):not([type="radio"]) {
  background: #0b1421 !important;
  border-color: #1f2e41 !important;
  color: #e8f6ff !important;
}
html[data-fh-skin="dark"] .form-control::placeholder,
html[data-fh-skin="dark"] .form-input::placeholder { color: rgba(232, 246, 255, 0.35) !important; }
html[data-fh-skin="dark"] .form-control:focus,
html[data-fh-skin="dark"] .form-input:focus {
  border-color: #28f8ff !important;
  box-shadow: 0 0 0 0.25rem rgba(40, 248, 255, 0.22) !important;
}

/* ---------- 弹层 ---------- */
html[data-fh-skin="dark"] .modal,
html[data-fh-skin="dark"] .modal-content,
html[data-fh-skin="dark"] .modal-box,
html[data-fh-skin="dark"] .ui-modal {
  background: #0e1722 !important;
  color: #e8f6ff !important;
  border: 1px solid rgba(40, 248, 255, 0.2) !important;
}
html[data-fh-skin="dark"] .badge {
  background: rgba(40, 248, 255, 0.12) !important;
  color: #7dd8e8 !important;
}
html[data-fh-skin="dark"] .empty-state,
html[data-fh-skin="dark"] .empty { color: #7d94a8 !important; }

/* ---------- 8. 暗色兜底：实测扫描出的残留亮底容器 ----------
   来源：diag_dark_white.js 在 meetings/documents/contacts/statistics/tasks/todo-center
   六个板块扫描 backgroundColor 亮度>180 的元素，按最大面积排序取前 8 名。 */
html[data-fh-skin="dark"] .fh-table-shell,
html[data-fh-skin="dark"] .rd-panel,
html[data-fh-skin="dark"] .tabs,
html[data-fh-skin="dark"] .fh-table-toolbar,
html[data-fh-skin="dark"] .biz-tabs,
html[data-fh-skin="dark"] .bc-tabs,
html[data-fh-skin="dark"] .wh-host,
html[data-fh-skin="dark"] .chart-container {
  background: #0e1722 !important;
  border-color: rgba(72, 110, 149, 0.24) !important;
  color: #d8ecf7 !important;
}
html[data-fh-skin="dark"] .fh-table-shell,
html[data-fh-skin="dark"] .rd-panel {
  box-shadow: 0 0 0 1px rgba(40, 248, 255, 0.10), 0 0 22px rgba(40, 248, 255, 0.06) !important;
  border: 1px solid rgba(40, 248, 255, 0.16) !important;
  border-radius: 4px !important;
}
html[data-fh-skin="dark"] .tabs {
  border-bottom: 1px solid rgba(40, 248, 255, 0.16) !important;
}
html[data-fh-skin="dark"] .fh-table-toolbar {
  border-bottom: 1px solid rgba(40, 248, 255, 0.12) !important;
}
/* 斑马行与表头（ui-p1 用 #f1f5f9 / #f8fafc 硬编码） */
html[data-fh-skin="dark"] .table tr[style],
html[data-fh-skin="dark"] .table > tbody > tr:nth-child(even) > *,
html[data-fh-skin="dark"] .data-table > tbody > tr:nth-child(even) > *,
html[data-fh-skin="dark"] .biz-table tr:nth-child(even) {
  background: #101d2c !important;
}
html[data-fh-skin="dark"] .table th,
html[data-fh-skin="dark"] .data-table th,
html[data-fh-skin="dark"] .fh-table-shell th {
  background: rgba(40, 248, 255, 0.07) !important;
  color: #7dd8e8 !important;
  border-color: rgba(40, 248, 255, 0.18) !important;
}
html[data-fh-skin="dark"] .fh-table-shell td,
html[data-fh-skin="dark"] .table td {
  color: #c3dceb !important;
  border-color: rgba(72, 110, 149, 0.2) !important;
  background: transparent !important;
}
/* 工具条 / 筛选控件 */
html[data-fh-skin="dark"] .fh-filter-input,
html[data-fh-skin="dark"] .form-select,
html[data-fh-skin="dark"] .ov-search,
html[data-fh-skin="dark"] input[type="text"],
html[data-fh-skin="dark"] input[type="search"],
html[data-fh-skin="dark"] select {
  background: #0b1421 !important;
  border-color: #1f2e41 !important;
  color: #e8f6ff !important;
}
/* 无类名的浅灰筛选条（实测 rgb(248,250,252)） */
html[data-fh-skin="dark"] #pageContainer div[style*="rgb(248, 250, 252)"],
html[data-fh-skin="dark"] #pageContainer div[style*="#f8fafc"] {
  background: #101d2c !important;
  color: #d8ecf7 !important;
}
/* 二次复扫残留：内联 style 写死的行底色与浅蓝提示条 */
html[data-fh-skin="dark"] #pageContainer tr[style*="#f8fafc"],
html[data-fh-skin="dark"] #pageContainer tr[style*="rgb(248, 250, 252)"],
html[data-fh-skin="dark"] #pageContainer tr[style*="#f1f5f9"] {
  background: #101d2c !important;
  color: #c3dceb !important;
}
html[data-fh-skin="dark"] #pageContainer tr[style*="#f8fafc"] > td,
html[data-fh-skin="dark"] #pageContainer tr[style*="rgb(248, 250, 252)"] > td,
html[data-fh-skin="dark"] #pageContainer tr[style*="#f8fafc"] > th,
html[data-fh-skin="dark"] #pageContainer tr[style*="rgb(248, 250, 252)"] > th {
  background: transparent !important;
  color: #c3dceb !important;
}
/* 浅蓝提示条 #eff6ff → 暗色下改成深蓝提示条 */
html[data-fh-skin="dark"] #pageContainer div[style*="#eff6ff"],
html[data-fh-skin="dark"] #pageContainer div[style*="rgb(239, 246, 255)"],
html[data-fh-skin="dark"] #pageContainer div[style*="#dbeafe"],
html[data-fh-skin="dark"] #pageContainer div[style*="#fff7ed"],
html[data-fh-skin="dark"] #pageContainer div[style*="#fef2f2"],
html[data-fh-skin="dark"] #pageContainer div[style*="#fefce8"] {
  background: rgba(40, 248, 255, 0.07) !important;
  border-color: rgba(40, 248, 255, 0.22) !important;
  color: #cfe9f7 !important;
}
html[data-fh-skin="dark"] #pageContainer div[style*="#eff6ff"] *,
html[data-fh-skin="dark"] #pageContainer div[style*="rgb(239, 246, 255)"] * {
  color: #cfe9f7 !important;
}
/* 三次复扫：模块自拼的内联白卡 + 表格行自带底色 */
html[data-fh-skin="dark"] .table > tbody > tr,
html[data-fh-skin="dark"] .data-table > tbody > tr,
html[data-fh-skin="dark"] .biz-table > tbody > tr {
  background: transparent !important;
}
html[data-fh-skin="dark"] .table > tbody > tr:nth-child(even) {
  background: #101d2c !important;
}
html[data-fh-skin="dark"] #pageContainer div[style*="background:#fff"],
html[data-fh-skin="dark"] #pageContainer div[style*="background: #fff"],
html[data-fh-skin="dark"] #pageContainer div[style*="background:#ffffff"],
html[data-fh-skin="dark"] #pageContainer div[style*="background-color:#fff"] {
  background: #0e1722 !important;
  border-color: rgba(40, 248, 255, 0.16) !important;
  color: #cfe9f7 !important;
  box-shadow: 0 0 0 1px rgba(40, 248, 255, 0.08) !important;
}
html[data-fh-skin="dark"] #pageContainer div[style*="background:#fff"] > div,
html[data-fh-skin="dark"] #pageContainer div[style*="background: #fff"] > div,
html[data-fh-skin="dark"] #pageContainer div[style*="background:#fff"] > span,
html[data-fh-skin="dark"] #pageContainer div[style*="background: #fff"] > span {
  color: #cfe9f7 !important;
}
/* 四次复扫：侧栏 p1-shell 组件（类名取自 js/modules/p1-shell.js）+ 顶栏版本徽标 */
html[data-fh-skin="dark"] .fh-nav-search-wrap,
html[data-fh-skin="dark"] .fh-nav-search,
html[data-fh-skin="dark"] .fh-nav-fav,
html[data-fh-skin="dark"] .fh-nav-fav-head,
html[data-fh-skin="dark"] .fh-nav-fav-empty,
html[data-fh-skin="dark"] .fh-nav-tools,
html[data-fh-skin="dark"] .fh-nav-tools-hint,
html[data-fh-skin="dark"] .fh-nav-search-hit,
html[data-fh-skin="dark"] .fh-p1-ver {
  background: #0b1421 !important;
  border-color: rgba(40, 248, 255, 0.14) !important;
  color: #cfe9f7 !important;
}
html[data-fh-skin="dark"] .fh-nav-search::placeholder { color: rgba(207, 233, 247, 0.45) !important; }
html[data-fh-skin="dark"] .fh-nav-fav-head { color: #7dd8e8 !important; }
html[data-fh-skin="dark"] .sidebar-header,
html[data-fh-skin="dark"] .sidebar-nav { background: transparent !important; }
/* 五次复扫：顶栏全局搜索（js/modules/ux-global.js:59）+ 板块材料条（js/modules/plate-files.js:47） */
html[data-fh-skin="dark"] #fhGlobalSearch {
  background: #0b1421 !important;
  border-color: #1f2e41 !important;
  color: #e8f6ff !important;
}
html[data-fh-skin="dark"] #fhGlobalSearch::placeholder { color: rgba(207, 233, 247, 0.42) !important; }
html[data-fh-skin="dark"] #fhGlobalSearchRes {
  background: #0e1722 !important;
  border-color: rgba(40, 248, 255, 0.2) !important;
  color: #cfe9f7 !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6) !important;
}
html[data-fh-skin="dark"] [data-plate-bar] .btn {
  background: #131f2e !important;
  border-color: #2b3f57 !important;
  color: #dff6ff !important;
}
html[data-fh-skin="dark"] [data-plate-bar] span { color: #7d94a8 !important; }
/* 收尾：顶栏两个未覆盖的按钮 */
html[data-fh-skin="dark"] .logout-btn {
  background: rgba(220, 38, 38, 0.18) !important;
  color: #ff9a9a !important;
  border: 1px solid rgba(220, 38, 38, 0.35) !important;
}
html[data-fh-skin="dark"] .fh-notif-btn {
  background: #131f2e !important;
  border-color: #2b3f57 !important;
  color: #dff6ff !important;
}
html[data-fh-skin="dark"] .fh-notif-badge { background: #ff4d4f !important; color: #fff !important; }
html[data-fh-skin="dark"] .user-name { color: #cfe9f7 !important; }
