/* ================= 全站暗黑模式（v3） ================= */
html[data-theme="dark"]{ color-scheme:dark; background:#0e1116; }
html[data-theme="dark"] body{ background:#0e1116 !important; color:#e7e9ee !important; }
html[data-theme="dark"] .content-section,
html[data-theme="dark"] #sec-fee,
html[data-theme="dark"] #sec-liushui,
html[data-theme="dark"] .page-container{ background:#0e1116 !important; }

/* ---------- 卡片 / 容器（类） ---------- */
html[data-theme="dark"] .card,
html[data-theme="dark"] .balance-card,
html[data-theme="dark"] .balance-detail-card,
html[data-theme="dark"] .action-card,
html[data-theme="dark"] .acct-group,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .amount-card,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .channel-card,
html[data-theme="dark"] .coupon-card,
html[data-theme="dark"] .qrcode-card,
html[data-theme="dark"] .bind-card,
html[data-theme="dark"] .help-card,
html[data-theme="dark"] .setup-card,
html[data-theme="dark"] .update-card,
html[data-theme="dark"] .record-item,
html[data-theme="dark"] .ticket-card,
html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .ls-item,
html[data-theme="dark"] .ls-stats,
html[data-theme="dark"] .ls-cats,
html[data-theme="dark"] .ls-seg,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .swal2-popup{
  background:#171a21 !important; border-color:#2a2f3a !important; box-shadow:0 1px 10px rgba(0,0,0,.5) !important;
}

/* ---------- 内联浅色背景 <i class="bi bi-arrow-right"></i> 深色（更全，含 background-color/大写/rgb） ---------- */
html[data-theme="dark"] [style*="background:#ffffff"],
html[data-theme="dark"] [style*="background: #ffffff"],
html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background:#FFFFFF"],
html[data-theme="dark"] [style*="background:#FFF"],
html[data-theme="dark"] [style*="background:white"],
html[data-theme="dark"] [style*="background: white"],
html[data-theme="dark"] [style*="background-color:#ffffff"],
html[data-theme="dark"] [style*="background-color:#fff"],
html[data-theme="dark"] [style*="background-color: #fff"],
html[data-theme="dark"] [style*="background-color:white"],
html[data-theme="dark"] [style*="background:rgb(255"],
html[data-theme="dark"] [style*="background: rgb(255"],
html[data-theme="dark"] [style*="background-color:rgb(255"],
html[data-theme="dark"] [style*="background-color: rgb(255"]{ background:#171a21 !important; }

/* 各类浅底（scoped to background 属性） */
html[data-theme="dark"] [style*="background:#f9fafb"],
html[data-theme="dark"] [style*="background:#fafafa"],
html[data-theme="dark"] [style*="background:#fafbfc"],
html[data-theme="dark"] [style*="background:#f4f5f9"],
html[data-theme="dark"] [style*="background:#f5f5f5"],
html[data-theme="dark"] [style*="background:#f5f7fa"],
html[data-theme="dark"] [style*="background:#f7f8fa"],
html[data-theme="dark"] [style*="background:#f8fafc"],
html[data-theme="dark"] [style*="background:#f1f3f5"],
html[data-theme="dark"] [style*="background:#f0f2f5"],
html[data-theme="dark"] [style*="background:#f3f4f6"],
html[data-theme="dark"] [style*="background:#eef1f5"],
html[data-theme="dark"] [style*="background:#eef0f3"],
html[data-theme="dark"] [style*="background:#eef4ff"],
html[data-theme="dark"] [style*="background:#eff6ff"],
html[data-theme="dark"] [style*="background:#e8f0ff"],
html[data-theme="dark"] [style*="background:#f0f7ff"]{ background:#13161c !important; }

/* 常见浅色边框 */
html[data-theme="dark"] [style*="border-top:0.5px solid #e5e6eb"],
html[data-theme="dark"] [style*="border-top:1px solid #e5e6eb"],
html[data-theme="dark"] [style*="border-bottom:1px solid #f3f4f6"],
html[data-theme="dark"] [style*="border:1px solid #e5e7eb"],
html[data-theme="dark"] [style*="border:1px solid #eef0f3"],
html[data-theme="dark"] [style*="border:1px solid #f1f3f5"],
html[data-theme="dark"] [style*="border:1px solid #eef1f5"]{ border-color:#2a2f3a !important; }

/* ---------- 表单 ---------- */
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{ background:#0f1218 !important; color:#e7e9ee !important; border-color:#2a2f3a !important; }
html[data-theme="dark"] option{ background:#0f1218; color:#e7e9ee; }

/* ---------- 按钮 ---------- */
html[data-theme="dark"] .tab-btn{ background:#171a21 !important; border-color:#2a2f3a !important; color:#cbd2dd !important; }
html[data-theme="dark"] .tab-btn.active{ background:#0052d9 !important; color:#fff !important; border-color:#0052d9 !important; }
html[data-theme="dark"] .submit-btn{ color:#fff !important; }

/* ---------- 导航 ---------- */
html[data-theme="dark"] .bottom-nav,
html[data-theme="dark"] .nav-tabs:not(.nav),
html[data-theme="dark"] .topbar,
html[data-theme="dark"] header{ background:rgba(16,19,25,0.95) !important; border-color:#2a2f3a !important; }
html[data-theme="dark"] .nav-tab,
html[data-theme="dark"] .bottom-nav .nav-item,
html[data-theme="dark"] .bottom-nav .nav-label{ color:#8e93a3 !important; }
html[data-theme="dark"] .nav-tab.active{ color:#4da3ff !important; }

/* ---------- 表格 ---------- */
html[data-theme="dark"] table{ color:#e7e9ee !important; background:transparent !important; }
html[data-theme="dark"] th{ background:#101319 !important; color:#cbd2dd !important; }
html[data-theme="dark"] th,html[data-theme="dark"] td{ border-color:#2a2f3a !important; }

/* ---------- 弹窗 ---------- */
html[data-theme="dark"] .swal2-popup{ background:#171a21 !important; color:#e7e9ee !important; }
html[data-theme="dark"] .alert-box,
html[data-theme="dark"] .toast{ background:#171a21 !important; color:#e7e9ee !important; border-color:#2a2f3a !important; }
html[data-theme="dark"] .swal2-container{ background:rgba(0,0,0,0.6) !important; }

/* ---------- 滚动条 ---------- */
html[data-theme="dark"] ::-webkit-scrollbar{ width:8px; height:8px; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb{ background:#313845; border-radius:8px; }

/* ================= 深色模式：文字「流光」效果（仅深色） ================= */
@keyframes dkFlow {
  0%   { background-position: 0% 0; }
  100% { background-position: -200% 0; }
}
html[data-theme="dark"] :is(
  h1,h2,h3,h4,h5,h6,p,b,strong,small,em,label,td,th,li,dt,dd,a,button,
  .action-title,.action-desc,.user-name:not(.lianghao-name-home),.user-qq,.balance-value,.balance-label,
  .section-title,.record-title,.ls-name,.ls-sub2,.ls-amt,.ls-stat-num,.ls-stat-lbl,
  .acct-group-title,.tab-btn,.detail-label,.detail-value,.nav-tab span,
  .bottom-nav .nav-item span,.bottom-nav .nav-label
):not(.bi):not(i):not(svg):not(img){
  background-image: linear-gradient(100deg,
      rgba(196,205,222,0.85) 0%,
      #ffffff 22%,
      rgba(150,170,210,0.9) 45%,
      rgba(196,205,222,0.75) 70%,
      #ffffff 88%,
      rgba(196,205,222,0.85) 100%) !important;
  background-size: 200% 100% !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  animation: dkFlow 4.5s linear infinite !important;
}
/* 图标/图片不受流光影响 */
html[data-theme="dark"] .bi,
html[data-theme="dark"] i,
html[data-theme="dark"] svg,
html[data-theme="dark"] img{ -webkit-text-fill-color: currentColor !important; }

/* 运行时扫描给文字加的流光类（仅深色） */
html[data-theme="dark"] .dk-flow{
  background-image: linear-gradient(100deg, rgba(196,205,222,.85) 0%, #ffffff 22%, rgba(150,170,210,.92) 45%, rgba(196,205,222,.75) 70%, #ffffff 88%, rgba(196,205,222,.85) 100%) !important;
  background-size: 200% 100% !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  animation: dkFlow 4.5s linear infinite !important;
}

/* 顶栏描边（深色下用浅色描边） */
html[data-theme="dark"] .top-header,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .navbar{ border-bottom-width:1.5px !important; border-bottom-color:rgba(255,255,255,0.16) !important; }
html[data-theme="dark"] .nav-tabs:not(.nav),
html[data-theme="dark"] .bottom-nav{ border-top-color:rgba(255,255,255,0.14) !important; }


/* ===== 纯CSS跟随系统（无需JS）===== */
@media (prefers-color-scheme: dark){
/* ================= 全站暗黑模式（v3） ================= */
html:not([data-theme="light"]){ color-scheme:dark; background:#0e1116; }
html:not([data-theme="light"]) body{ background:#0e1116 !important; color:#e7e9ee !important; }
html:not([data-theme="light"]) .content-section,
html:not([data-theme="light"]) #sec-fee,
html:not([data-theme="light"]) #sec-liushui,
html:not([data-theme="light"]) .page-container{ background:#0e1116 !important; }

/* ---------- 卡片 / 容器（类） ---------- */
html:not([data-theme="light"]) .card,
html:not([data-theme="light"]) .balance-card,
html:not([data-theme="light"]) .balance-detail-card,
html:not([data-theme="light"]) .action-card,
html:not([data-theme="light"]) .acct-group,
html:not([data-theme="light"]) .stat-card,
html:not([data-theme="light"]) .amount-card,
html:not([data-theme="light"]) .form-card,
html:not([data-theme="light"]) .channel-card,
html:not([data-theme="light"]) .coupon-card,
html:not([data-theme="light"]) .qrcode-card,
html:not([data-theme="light"]) .bind-card,
html:not([data-theme="light"]) .help-card,
html:not([data-theme="light"]) .setup-card,
html:not([data-theme="light"]) .update-card,
html:not([data-theme="light"]) .record-item,
html:not([data-theme="light"]) .ticket-card,
html:not([data-theme="light"]) .list-group-item,
html:not([data-theme="light"]) .ls-item,
html:not([data-theme="light"]) .ls-stats,
html:not([data-theme="light"]) .ls-cats,
html:not([data-theme="light"]) .ls-seg,
html:not([data-theme="light"]) .modal-content,
html:not([data-theme="light"]) .swal2-popup{
  background:#171a21 !important; border-color:#2a2f3a !important; box-shadow:0 1px 10px rgba(0,0,0,.5) !important;
}

/* ---------- 内联浅色背景 <i class="bi bi-arrow-right"></i> 深色（更全，含 background-color/大写/rgb） ---------- */
html:not([data-theme="light"]) [style*="background:#ffffff"],
html:not([data-theme="light"]) [style*="background: #ffffff"],
html:not([data-theme="light"]) [style*="background:#fff"],
html:not([data-theme="light"]) [style*="background: #fff"],
html:not([data-theme="light"]) [style*="background:#FFFFFF"],
html:not([data-theme="light"]) [style*="background:#FFF"],
html:not([data-theme="light"]) [style*="background:white"],
html:not([data-theme="light"]) [style*="background: white"],
html:not([data-theme="light"]) [style*="background-color:#ffffff"],
html:not([data-theme="light"]) [style*="background-color:#fff"],
html:not([data-theme="light"]) [style*="background-color: #fff"],
html:not([data-theme="light"]) [style*="background-color:white"],
html:not([data-theme="light"]) [style*="background:rgb(255"],
html:not([data-theme="light"]) [style*="background: rgb(255"],
html:not([data-theme="light"]) [style*="background-color:rgb(255"],
html:not([data-theme="light"]) [style*="background-color: rgb(255"]{ background:#171a21 !important; }

/* 各类浅底（scoped to background 属性） */
html:not([data-theme="light"]) [style*="background:#f9fafb"],
html:not([data-theme="light"]) [style*="background:#fafafa"],
html:not([data-theme="light"]) [style*="background:#fafbfc"],
html:not([data-theme="light"]) [style*="background:#f4f5f9"],
html:not([data-theme="light"]) [style*="background:#f5f5f5"],
html:not([data-theme="light"]) [style*="background:#f5f7fa"],
html:not([data-theme="light"]) [style*="background:#f7f8fa"],
html:not([data-theme="light"]) [style*="background:#f8fafc"],
html:not([data-theme="light"]) [style*="background:#f1f3f5"],
html:not([data-theme="light"]) [style*="background:#f0f2f5"],
html:not([data-theme="light"]) [style*="background:#f3f4f6"],
html:not([data-theme="light"]) [style*="background:#eef1f5"],
html:not([data-theme="light"]) [style*="background:#eef0f3"],
html:not([data-theme="light"]) [style*="background:#eef4ff"],
html:not([data-theme="light"]) [style*="background:#eff6ff"],
html:not([data-theme="light"]) [style*="background:#e8f0ff"],
html:not([data-theme="light"]) [style*="background:#f0f7ff"]{ background:#13161c !important; }

/* 常见浅色边框 */
html:not([data-theme="light"]) [style*="border-top:0.5px solid #e5e6eb"],
html:not([data-theme="light"]) [style*="border-top:1px solid #e5e6eb"],
html:not([data-theme="light"]) [style*="border-bottom:1px solid #f3f4f6"],
html:not([data-theme="light"]) [style*="border:1px solid #e5e7eb"],
html:not([data-theme="light"]) [style*="border:1px solid #eef0f3"],
html:not([data-theme="light"]) [style*="border:1px solid #f1f3f5"],
html:not([data-theme="light"]) [style*="border:1px solid #eef1f5"]{ border-color:#2a2f3a !important; }

/* ---------- 表单 ---------- */
html:not([data-theme="light"]) input,
html:not([data-theme="light"]) select,
html:not([data-theme="light"]) textarea{ background:#0f1218 !important; color:#e7e9ee !important; border-color:#2a2f3a !important; }
html:not([data-theme="light"]) option{ background:#0f1218; color:#e7e9ee; }

/* ---------- 按钮 ---------- */
html:not([data-theme="light"]) .tab-btn{ background:#171a21 !important; border-color:#2a2f3a !important; color:#cbd2dd !important; }
html:not([data-theme="light"]) .tab-btn.active{ background:#0052d9 !important; color:#fff !important; border-color:#0052d9 !important; }
html:not([data-theme="light"]) .submit-btn{ color:#fff !important; }

/* ---------- 导航 ---------- */
html:not([data-theme="light"]) .bottom-nav,
html:not([data-theme="light"]) .nav-tabs:not(.nav),
html:not([data-theme="light"]) .topbar,
html:not([data-theme="light"]) header{ background:rgba(16,19,25,0.95) !important; border-color:#2a2f3a !important; }
html:not([data-theme="light"]) .nav-tab,
html:not([data-theme="light"]) .bottom-nav .nav-item,
html:not([data-theme="light"]) .bottom-nav .nav-label{ color:#8e93a3 !important; }
html:not([data-theme="light"]) .nav-tab.active{ color:#4da3ff !important; }

/* ---------- 表格 ---------- */
html:not([data-theme="light"]) table{ color:#e7e9ee !important; background:transparent !important; }
html:not([data-theme="light"]) th{ background:#101319 !important; color:#cbd2dd !important; }
html:not([data-theme="light"]) th,html:not([data-theme="light"]) td{ border-color:#2a2f3a !important; }

/* ---------- 弹窗 ---------- */
html:not([data-theme="light"]) .swal2-popup{ background:#171a21 !important; color:#e7e9ee !important; }
html:not([data-theme="light"]) .alert-box,
html:not([data-theme="light"]) .toast{ background:#171a21 !important; color:#e7e9ee !important; border-color:#2a2f3a !important; }
html:not([data-theme="light"]) .swal2-container{ background:rgba(0,0,0,0.6) !important; }

/* ---------- 滚动条 ---------- */
html:not([data-theme="light"]) ::-webkit-scrollbar{ width:8px; height:8px; }
html:not([data-theme="light"]) ::-webkit-scrollbar-thumb{ background:#313845; border-radius:8px; }

/* ================= 深色模式：文字「流光」效果（仅深色） ================= */
@keyframes dkFlow {
  0%   { background-position: 0% 0; }
  100% { background-position: -200% 0; }
}
html:not([data-theme="light"]) :is(
  h1,h2,h3,h4,h5,h6,p,b,strong,small,em,label,td,th,li,dt,dd,a,button,
  .action-title,.action-desc,.user-name:not(.lianghao-name-home),.user-qq,.balance-value,.balance-label,
  .section-title,.record-title,.ls-name,.ls-sub2,.ls-amt,.ls-stat-num,.ls-stat-lbl,
  .acct-group-title,.tab-btn,.detail-label,.detail-value,.nav-tab span,
  .bottom-nav .nav-item span,.bottom-nav .nav-label
):not(.bi):not(i):not(svg):not(img){
  background-image: linear-gradient(100deg,
      rgba(196,205,222,0.85) 0%,
      #ffffff 22%,
      rgba(150,170,210,0.9) 45%,
      rgba(196,205,222,0.75) 70%,
      #ffffff 88%,
      rgba(196,205,222,0.85) 100%) !important;
  background-size: 200% 100% !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  animation: dkFlow 4.5s linear infinite !important;
}
/* 图标/图片不受流光影响 */
html:not([data-theme="light"]) .bi,
html:not([data-theme="light"]) i,
html:not([data-theme="light"]) svg,
html:not([data-theme="light"]) img{ -webkit-text-fill-color: currentColor !important; }

/* 运行时扫描给文字加的流光类（仅深色） */
html:not([data-theme="light"]) .dk-flow{
  background-image: linear-gradient(100deg, rgba(196,205,222,.85) 0%, #ffffff 22%, rgba(150,170,210,.92) 45%, rgba(196,205,222,.75) 70%, #ffffff 88%, rgba(196,205,222,.85) 100%) !important;
  background-size: 200% 100% !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  animation: dkFlow 4.5s linear infinite !important;
}

/* 顶栏描边（深色下用浅色描边） */
html:not([data-theme="light"]) .top-header,
html:not([data-theme="light"]) .topbar,
html:not([data-theme="light"]) .navbar{ border-bottom-width:1.5px !important; border-bottom-color:rgba(255,255,255,0.16) !important; }
html:not([data-theme="light"]) .nav-tabs:not(.nav),
html:not([data-theme="light"]) .bottom-nav{ border-top-color:rgba(255,255,255,0.14) !important; }

}

/* ===== 悬浮毛玻璃底栏（Apple 风格）2026-09-17 ===== */
html body .bottom-nav.bottom-nav,
html body .nav-tabs:not(.nav):not(.nav){
  left: 16px !important; right: 16px !important;
  bottom: calc(12px + env(safe-area-inset-bottom,0px)) !important;
  border: 0 !important;
  border-radius: 999px !important;
  height: 64px !important;
  padding-bottom: 2px !important;
  background: rgba(255,255,255,0.68) !important;
  -webkit-backdrop-filter: saturate(180%) blur(30px) !important;
  backdrop-filter: saturate(180%) blur(30px) !important;
  box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.55), 0 12px 32px -10px rgba(15,23,42,.22) !important;
  overflow: hidden;
}
@media (prefers-color-scheme: dark){
  html body .bottom-nav.bottom-nav,
  html body .nav-tabs:not(.nav):not(.nav){
    background: rgba(28,28,30,0.66) !important;
    box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.14), 0 12px 32px -10px rgba(0,0,0,.5) !important;
  }
}
html[data-theme="dark"] body .bottom-nav.bottom-nav,
html[data-theme="dark"] body .nav-tabs:not(.nav):not(.nav),
html.dark body .bottom-nav.bottom-nav,
body.dark .bottom-nav.bottom-nav{ background: rgba(28,28,30,0.66) !important; }
/* 隐藏顶/底补白条（原先的黑线来源） */
html body #cy-topfill, html body #cy-botfill{ display: none !important; }

/* ===== 报备系统顶栏颜色统一为苹果灰（2026-09-17） ===== */
html body .top-header.top-header{
  background: #F2F2F7 !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  border-color: rgba(60,60,67,0.12) !important;
}
@media (prefers-color-scheme: dark){
  html body .top-header.top-header{ background:#1C1C1E !important; border-color: rgba(84,84,88,0.5) !important; }
}
html[data-theme="dark"] body .top-header.top-header,
html.dark body .top-header.top-header,
body.dark .top-header.top-header{ background:#1C1C1E !important; border-color: rgba(84,84,88,0.5) !important; }
