/* ============================================================
   会员中心深色模式
   由 theme.js.php 在 <html> 上设置 data-theme="dark" 时生效
   颜色变量带 !important 以压过 currency.tpl 注入的 inline 变量
   ============================================================ */
:root[data-theme="dark"] {
  --fu-uc-page: #0b1220 !important;
  --fu-uc-card: #141e2e !important;
  --fu-uc-ink: #d8e1ee !important;
  --fu-uc-muted: #8b98ab !important;
  --fu-uc-line: #26334a !important;
  --fu-uc-blue: #5b96f7 !important;
  --fu-uc-blue-soft: rgba(59, 130, 246, .14) !important;

  --topbar-bg: #0b1220 !important;
  --topbar-text: #d8e1ee !important;
  --topbar-hover-bg: #1a2637 !important;

  --sidebar-bg: #070d16 !important;
  --sidebar-text: #b6c2d4 !important;
  --sidebar-icon: #7c89a0 !important;
  --sidebar-hover-bg: rgba(255, 255, 255, .07) !important;
  --sidebar-hover-text: #ffffff !important;
  --sidebar-hover-icon: #ffffff !important;
  --sidebar-active-bg: rgba(59, 130, 246, .25) !important;
  --sidebar-active-text: #ffffff !important;
  --sidebar-active-icon: #93c5fd !important;
  --sidebar-sub-text: #7c89a0 !important;
  --sidebar-sub-hover-bg: rgba(255, 255, 255, .06) !important;
  --sidebar-sub-hover-text: #cbd5e1 !important;
  --sidebar-head: #5f6d84 !important;
  --sidebar-border: transparent !important;

  --blue: #5b96f7 !important;
  --primary: #5b96f7 !important;
  --primary-hover: #7aabf9 !important;

  --fu-primary: #5b96f7 !important;
  --fu-primary-dark: #3b82f6 !important;
  --fu-primary-light: #7aabf9 !important;
  --fu-blue: #5b96f7 !important;
  --fu-bg: #0b1220 !important;
  --fu-bg-gray: #0e1726 !important;
  --fu-text: #d8e1ee !important;
  --fu-text-secondary: #8b98ab !important;
  --fu-border: #26334a !important;
  --fu-ink: #d8e1ee !important;
  --fu-muted: #8b98ab !important;
  --fu-line: #26334a !important;
}

/* ---- 基础 ---- */
html[data-theme="dark"] body.fu-uc,
html[data-theme="dark"] body.inherit,
html[data-theme="dark"] body[data-sidebar] {
  background: var(--fu-uc-page) !important;
  color: var(--fu-uc-ink);
}
html[data-theme="dark"] .page-content { color: var(--fu-uc-ink); }
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] .page-title { color: #e6edf7; }
html[data-theme="dark"] .text-muted { color: var(--fu-uc-muted) !important; }

/* ---- 顶栏 ---- */
html[data-theme="dark"] .fu-uc-topbar { border-bottom-color: var(--fu-uc-line) !important; }
html[data-theme="dark"] .fu-uc-icon-btn { color: #a9b7cc !important; }
html[data-theme="dark"] .fu-uc-icon-btn:hover { background: var(--topbar-hover-bg) !important; color: var(--fu-uc-blue) !important; }
html[data-theme="dark"] .fu-uc-chip { border-color: var(--fu-uc-line) !important; color: #a9b7cc !important; }

/* ---- 侧栏 ---- */
html[data-theme="dark"] .fu-uc-sidebar,
html[data-theme="dark"] .vertical-menu { background: var(--sidebar-bg) !important; border-color: transparent !important; }
html[data-theme="dark"] .fu-uc-sidebar .fu-uc-side-title { color: var(--sidebar-head); }

/* ---- 卡片 ---- */
html[data-theme="dark"] .fu-card,
html[data-theme="dark"] .card,
html[data-theme="dark"] .bgw,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .panel-default > .panel-heading {
  background-color: var(--fu-uc-card) !important;
  border-color: var(--fu-uc-line) !important;
  color: var(--fu-uc-ink);
}
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .card-footer,
html[data-theme="dark"] .panel-heading,
html[data-theme="dark"] .panel-footer { background-color: #111a29 !important; border-color: var(--fu-uc-line) !important; }
html[data-theme="dark"] .card-header h3,
html[data-theme="dark"] .card-header .card-title { color: #e6edf7; }

/* ---- 表单 ---- */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] select.form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .input-group-text,
html[data-theme="dark"] .custom-select {
  background-color: #0e1726 !important;
  border-color: var(--fu-uc-line) !important;
  color: var(--fu-uc-ink) !important;
}
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus {
  background-color: #101b2d !important;
  border-color: var(--fu-uc-blue) !important;
  color: var(--fu-uc-ink) !important;
  box-shadow: 0 0 0 .2rem rgba(59, 130, 246, .15) !important;
}
html[data-theme="dark"] .form-control::placeholder { color: #5f6d84 !important; }
html[data-theme="dark"] select.form-control option { background: #141e2e; color: var(--fu-uc-ink); }
html[data-theme="dark"] .form-group label,
html[data-theme="dark"] .form-check-label { color: var(--fu-uc-muted); }

/* ---- 表格 ---- */
html[data-theme="dark"] .table { color: var(--fu-uc-ink); }
html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .table th {
  background-color: #111a29 !important;
  color: #a9b7cc;
  border-color: var(--fu-uc-line) !important;
}
html[data-theme="dark"] .table td,
html[data-theme="dark"] .table tbody tr { border-color: var(--fu-uc-line) !important; background-color: transparent; }
html[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd) { background-color: rgba(255, 255, 255, .03) !important; }
html[data-theme="dark"] .table-hover tbody tr:hover { background-color: rgba(255, 255, 255, .05) !important; }
html[data-theme="dark"] .table-bordered,
html[data-theme="dark"] .table-bordered td,
html[data-theme="dark"] .table-bordered th { border-color: var(--fu-uc-line) !important; }
html[data-theme="dark"] .table .badge { background-color: rgba(59, 130, 246, .18) !important; color: #93c5fd !important; }

/* ---- 下拉菜单 ---- */
html[data-theme="dark"] .dropdown-menu {
  background-color: var(--fu-uc-card) !important;
  border-color: var(--fu-uc-line) !important;
}
html[data-theme="dark"] .dropdown-item { color: var(--fu-uc-ink); }
html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .dropdown-item:focus { background-color: #1a2637 !important; color: #fff !important; }
html[data-theme="dark"] .dropdown-divider { border-color: var(--fu-uc-line) !important; }
html[data-theme="dark"] .dropdown-menu .text-danger { color: #f87171 !important; }

/* ---- 模态框 ---- */
html[data-theme="dark"] .modal-content {
  background-color: var(--fu-uc-card) !important;
  border-color: var(--fu-uc-line) !important;
  color: var(--fu-uc-ink);
}
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer { border-color: var(--fu-uc-line) !important; }
html[data-theme="dark"] .modal-title { color: #e6edf7; }
html[data-theme="dark"] .close,
html[data-theme="dark"] .modal-header .close { color: var(--fu-uc-ink) !important; text-shadow: none !important; }

/* ---- 分页 ---- */
html[data-theme="dark"] .pagination .page-link {
  background-color: var(--fu-uc-card) !important;
  border-color: var(--fu-uc-line) !important;
  color: #a9b7cc;
}
html[data-theme="dark"] .pagination .page-item.active .page-link { background-color: var(--fu-uc-blue) !important; border-color: var(--fu-uc-blue) !important; color: #fff !important; }
html[data-theme="dark"] .pagination .page-item.disabled .page-link { background-color: #0e1726 !important; color: #5f6d84 !important; }
html[data-theme="dark"] .pagination .page-item .page-link:hover { background-color: #1a2637 !important; color: #fff !important; }

/* ---- 标签页 ---- */
html[data-theme="dark"] .nav-tabs { border-color: var(--fu-uc-line) !important; }
html[data-theme="dark"] .nav-tabs .nav-link { color: var(--fu-uc-muted); }
html[data-theme="dark"] .nav-tabs .nav-link:hover { color: var(--fu-uc-blue); border-color: transparent; }
html[data-theme="dark"] .nav-tabs .nav-link.active {
  background-color: var(--fu-uc-card) !important;
  border-color: var(--fu-uc-line) !important;
  color: var(--fu-uc-blue) !important;
}

/* ---- 面包屑 / 页头 ---- */
html[data-theme="dark"] .breadcrumb { background-color: transparent; }
html[data-theme="dark"] .breadcrumb-item + .breadcrumb-item::before { color: var(--fu-uc-muted); }
html[data-theme="dark"] .breadcrumb-item.active { color: var(--fu-uc-muted); }

/* ---- 按钮 ---- */
html[data-theme="dark"] .btn-light { background-color: #1a2637 !important; border-color: var(--fu-uc-line) !important; color: var(--fu-uc-ink) !important; }
html[data-theme="dark"] .btn-light:hover { background-color: #223047 !important; color: #fff !important; }
html[data-theme="dark"] .btn-outline-secondary,
html[data-theme="dark"] .btn-secondary { border-color: var(--fu-uc-line) !important; color: #a9b7cc !important; }
html[data-theme="dark"] .btn-outline-secondary:hover { background-color: #1a2637 !important; color: #fff !important; }

/* ---- 列表 / 内容区 ---- */
html[data-theme="dark"] .list-group-item {
  background-color: var(--fu-uc-card) !important;
  border-color: var(--fu-uc-line) !important;
  color: var(--fu-uc-ink);
}
html[data-theme="dark"] .list-group-item.active { background-color: var(--fu-uc-blue) !important; border-color: var(--fu-uc-blue) !important; }
html[data-theme="dark"] .fu-content-item { border-color: var(--fu-uc-line) !important; }
html[data-theme="dark"] .fu-content-item-title { color: #e6edf7; }

/* ---- 徽章 / 提示 ---- */
html[data-theme="dark"] .badge-light { background-color: #1a2637 !important; color: var(--fu-uc-ink) !important; }
html[data-theme="dark"] .alert { background-color: #141e2e !important; border-color: var(--fu-uc-line) !important; color: var(--fu-uc-ink); }
html[data-theme="dark"] .toastr,
html[data-theme="dark"] #toast-container > div { background-color: #141e2e !important; color: var(--fu-uc-ink) !important; box-shadow: 0 4px 18px rgba(0, 0, 0, .45) !important; }

/* ---- 代码 / 引用 ---- */
html[data-theme="dark"] pre,
html[data-theme="dark"] code { background-color: #0e1726 !important; color: #a9b7cc; border-color: var(--fu-uc-line) !important; }

/* ---- 滚动条 ---- */
html[data-theme="dark"] ::-webkit-scrollbar-track { background: #0b1220; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #2c3b55; border-radius: 6px; }

/* ---- 深浅色切换按钮图标 ---- */
html[data-theme="dark"] .fu-dark-icon-sun { display: none !important; }
html[data-theme="dark"] .fu-dark-icon-moon { display: inline-flex !important; }

/* ---- 账单 / 产品页卡片容器（zjmf 原生写死白底） ---- */
html[data-theme="dark"] .fu-tabs-card,
html[data-theme="dark"] .table-container.tabs_table {
  background: var(--fu-uc-card) !important;
  border-color: var(--fu-uc-line) !important;
  color: var(--fu-uc-ink);
}
html[data-theme="dark"] .fu-tabs-card .fu-tabs,
html[data-theme="dark"] .fu-tabs-card .fu-tabs-nav,
html[data-theme="dark"] .fu-tabs-card .fu-tabs.prevent { background: transparent !important; color: var(--fu-uc-ink); }
html[data-theme="dark"] .fu-tabs-card .fu-tabs .tab-item,
html[data-theme="dark"] .fu-tabs-card .fu-tabs-nav .tab-item { color: var(--fu-uc-muted); }
html[data-theme="dark"] .fu-tabs-card .fu-tabs .tab-item.on,
html[data-theme="dark"] .fu-tabs-card .fu-tabs-nav .tab-item.on { color: var(--fu-uc-blue); }

/* ---- 表格：表头 .bg-light / 浅灰底 .table.tablelist ---- */
html[data-theme="dark"] .bg-light { background-color: #111a29 !important; color: #a9b7cc !important; }
html[data-theme="dark"] .table.tablelist,
html[data-theme="dark"] .tablelist { background-color: var(--fu-uc-card) !important; color: var(--fu-uc-ink); }
html[data-theme="dark"] .table.tablelist thead th,
html[data-theme="dark"] .tablelist thead th { background-color: #111a29 !important; color: #a9b7cc !important; border-color: var(--fu-uc-line) !important; }
html[data-theme="dark"] .table.tablelist td,
html[data-theme="dark"] .tablelist td { border-color: var(--fu-uc-line) !important; }

/* ---- 产品页工具条 / 行操作按钮 ---- */
html[data-theme="dark"] .table-header.fu-service-toolbar,
html[data-theme="dark"] .fu-service-toolbar { background: #111a29 !important; border-color: var(--fu-uc-line) !important; color: var(--fu-uc-ink); }
html[data-theme="dark"] .btn-outline-primary {
  background: transparent !important;
  border-color: var(--fu-uc-blue) !important;
  color: var(--fu-uc-blue) !important;
}
html[data-theme="dark"] .btn-outline-primary:hover,
html[data-theme="dark"] .btn-outline-primary:focus {
  background: var(--fu-uc-blue) !important;
  color: #fff !important;
}
html[data-theme="dark"] .btn.batch.btn-outline-primary.not-allowed,
html[data-theme="dark"] .btn.batch.btn-outline-primary[disabled] { opacity: .45; }

/* ---- 深色下文字兜底：容器继承浅色（zjmf 原生大量黑色文字） ---- */
html[data-theme="dark"] body.fu-uc .page-content,
html[data-theme="dark"] body.fu-uc .fu-card,
html[data-theme="dark"] body.fu-uc .card,
html[data-theme="dark"] body.fu-uc .bgw,
html[data-theme="dark"] body.fu-uc .panel,
html[data-theme="dark"] body.fu-uc .modal-content { color: var(--fu-uc-ink) !important; }
html[data-theme="dark"] body.fu-uc p,
html[data-theme="dark"] body.fu-uc li,
html[data-theme="dark"] body.fu-uc dd,
html[data-theme="dark"] body.fu-uc dt { color: var(--fu-uc-ink); }
html[data-theme="dark"] body.fu-uc .text-dark,
html[data-theme="dark"] body.fu-uc .text-body,
html[data-theme="dark"] body.fu-uc .text-secondary { color: var(--fu-uc-muted) !important; }
html[data-theme="dark"] body.fu-uc .text-danger { color: #f87171 !important; }
html[data-theme="dark"] body.fu-uc .text-success { color: #4ade80 !important; }
html[data-theme="dark"] body.fu-uc .text-warning { color: #fbbf24 !important; }
html[data-theme="dark"] body.fu-uc .text-info { color: #38bdf8 !important; }

/* ---- 顶栏 / 页面标题 / 面包屑 ---- */
html[data-theme="dark"] body.fu-uc .fu-uc-crumb,
html[data-theme="dark"] body.fu-uc .fu-uc-crumb strong,
html[data-theme="dark"] body.fu-uc .fu-uc-user-btn,
html[data-theme="dark"] body.fu-uc .fu-uc-user-meta,
html[data-theme="dark"] body.fu-uc .fu-uc-user-btn strong,
html[data-theme="dark"] body.fu-uc .fu-uc-user-btn small { color: var(--fu-uc-ink) !important; }
html[data-theme="dark"] body.fu-uc .breadcrumbsTitle,
html[data-theme="dark"] body.fu-uc .fu-page-ident,
html[data-theme="dark"] body.fu-uc .fu-row-txt { color: #e6edf7 !important; }
/* 页面标题栏深色下移除浅蓝背景 */
html[data-theme="dark"] body.fu-uc .fu-page-ident-wrap,
html[data-theme="dark"] body.fu-uc .fu-page-ident,
html[data-theme="dark"] body.fu-uc .breadcrumbsTitle,
html[data-theme="dark"] body.fu-uc .page-title-box { background: transparent !important; }
/* 标题文字（fu-theme.css 对 h4 带 !important，需同权重覆盖） */
html[data-theme="dark"] body.fu-uc .breadcrumbsTitle h4,
html[data-theme="dark"] body.fu-uc .fu-page-ident h4,
html[data-theme="dark"] body.fu-uc .fu-page-ident h1,
html[data-theme="dark"] body.fu-uc .page-title-box h4 { color: #e6edf7 !important; }
html[data-theme="dark"] body.fu-uc .fu-uc-drop,
html[data-theme="dark"] body.fu-uc .fu-uc-drop .dropdown-item { color: var(--fu-uc-ink) !important; }

/* ---- 标签页 / 表格表头 / 分页下拉 ---- */
html[data-theme="dark"] body.fu-uc .fu-tabs-item,
html[data-theme="dark"] body.fu-uc .fu-tabs .fu-tabs-item { color: var(--fu-uc-muted) !important; }
html[data-theme="dark"] body.fu-uc .fu-tabs-item.on,
html[data-theme="dark"] body.fu-uc .fu-tabs-item.active,
html[data-theme="dark"] body.fu-uc .fu-tabs .fu-tabs-item.on { color: var(--fu-uc-blue) !important; }
html[data-theme="dark"] body.fu-uc .table .pointer,
html[data-theme="dark"] body.fu-uc .pointer,
html[data-theme="dark"] body.fu-uc .bg-light { color: #a9b7cc !important; }
html[data-theme="dark"] body.fu-uc .selectpicker,
html[data-theme="dark"] body.fu-uc .bootstrap-select .filter-option-inner-inner,
html[data-theme="dark"] body.fu-uc .bootstrap-select .text { color: var(--fu-uc-ink) !important; }
html[data-theme="dark"] body.fu-uc .bootstrap-select .dropdown-menu { background: var(--fu-uc-card) !important; border-color: var(--fu-uc-line) !important; }
html[data-theme="dark"] body.fu-uc .bootstrap-select .dropdown-menu .dropdown-item,
html[data-theme="dark"] body.fu-uc .bootstrap-select .dropdown-menu .dropdown-item .text { color: var(--fu-uc-ink) !important; }
html[data-theme="dark"] body.fu-uc .bootstrap-select .dropdown-menu .dropdown-item:hover { background: #1a2637 !important; }

/* ---- 会员首页信息卡片文字 ---- */
html[data-theme="dark"] body.fu-uc .userInformation-itme-name,
html[data-theme="dark"] body.fu-uc .userInformation-itme-email,
html[data-theme="dark"] body.fu-uc .action,
html[data-theme="dark"] body.fu-uc .number,
html[data-theme="dark"] body.fu-uc .unit,
html[data-theme="dark"] body.fu-uc .card .title,
html[data-theme="dark"] body.fu-uc .fu-card .title,
html[data-theme="dark"] body.fu-uc .score,
html[data-theme="dark"] body.fu-uc .earnCommission-info,
html[data-theme="dark"] body.fu-uc .company-name,
html[data-theme="dark"] body.fu-uc .cutOneSHair,
html[data-theme="dark"] body.fu-uc .details-userInfo,
html[data-theme="dark"] body.fu-uc .cardContent,
html[data-theme="dark"] body.fu-uc .displayName,
html[data-theme="dark"] body.fu-uc .ellipsis { color: var(--fu-uc-ink) !important; }
html[data-theme="dark"] body.fu-uc .cutOneSHair { color: var(--fu-uc-blue) !important; }

/* ---- AI 客服气泡 ---- */
html[data-theme="dark"] body.fu-uc .fu-ai-msg.bot { color: var(--fu-uc-ink) !important; }
/* AI 助手面板 / bootstrap-select 下拉 深色化 */
html[data-theme="dark"] body.fu-uc .fu-ai-panel,
html[data-theme="dark"] body.fu-uc .fu-ai-body,
html[data-theme="dark"] body.fu-uc .fu-ai-foot,
html[data-theme="dark"] body.fu-uc .fu-ai-input-wrap { background: var(--fu-uc-card) !important; border-color: var(--fu-uc-line) !important; color: var(--fu-uc-ink); }
html[data-theme="dark"] body.fu-uc .fu-ai-input-wrap input,
html[data-theme="dark"] body.fu-uc .fu-ai-input-wrap textarea { background: #0e1726 !important; color: var(--fu-uc-ink) !important; border-color: var(--fu-uc-line) !important; }
html[data-theme="dark"] body.fu-uc .bootstrap-select .btn.dropdown-toggle,
html[data-theme="dark"] body.fu-uc .bootstrap-select .btn {
  background: #0e1726 !important;
  border-color: var(--fu-uc-line) !important;
  color: var(--fu-uc-ink) !important;
}

/* ---- 普通链接（非按钮）深色下保持主色可见 ---- */
html[data-theme="dark"] body.fu-uc a:not(.btn):not(.dropdown-item):not(.fu-uc-icon-btn):not(.nav-link):not(.fu-uc-brand) { color: var(--fu-uc-blue); }
html[data-theme="dark"] body.fu-uc a:not(.btn):not(.dropdown-item):hover { color: var(--fu-primary-light); }
