/* ================================================================
   U支付系统 · 设计系统 v2（Coinbase 蓝 · 浅色侧栏 · 对标顶级支付平台）
   ================================================================ */

:root {
  --brand: #1652F0;
  --brand-dk: #0A3BC7;
  --brand-lt: #EBF1FF;
  --brand-2: #3A6BFF;
  --ink: #0B1526;
  --ink-2: #3D4E68;
  --ink-3: #8494AD;
  --line: #E4E9F2;
  --bg: #F5F7FB;
  --card: #FFFFFF;
  --ok: #00A870;
  --ok-bg: #E6F7F1;
  --warn: #ED7B2F;
  --warn-bg: #FEF3E8;
  --err: #E34D59;
  --err-bg: #FEF1F1;
  --purple: #7B5CF5;
  --purple-bg: #F0EDFE;
  --shadow: 0 1px 3px rgba(16, 42, 89, .04), 0 8px 24px rgba(16, 42, 89, .06);
  --radius: 10px;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.7;
  letter-spacing: .2px;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

/* ================================================================
   布局
   ================================================================ */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 238px;
  flex: none;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  height: 100vh;
  z-index: 50;
}

.sb-logo {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}
.logo-mark {
  width: 34px; height: 34px;
  border-radius: 50%;
  flex: none;
  background: #26A17B;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: 0 4px 14px rgba(38, 161, 123, .38);
  overflow: hidden;
}
.logo-mark svg, .brand-mark svg { width: 100%; height: 100%; display: block; }
.logo-txt b { display: block; font-size: 13px; letter-spacing: .2px; }
.logo-txt span { font-size: 10.5px; color: var(--ink-3); letter-spacing: .3px; }

.sb-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.sb-nav::-webkit-scrollbar { width: 6px; }
.sb-nav::-webkit-scrollbar-thumb { background: #D8DEE8; border-radius: 3px; }

.nav-group {
  font-size: 10.5px;
  color: var(--ink-3);
  font-weight: 700;
  letter-spacing: .6px;
  padding: 15px 12px 6px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-group::before {
  content: '';
  width: 3px; height: 11px;
  border-radius: 2px;
  background: var(--brand);
  opacity: .5;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: .15s;
  margin-bottom: 2px;
}
.nav-item .nav-ico { display: inline-flex; color: var(--ink-2); opacity: .75; flex: none; }
.nav-item .nav-ico .ico { width: 16px; height: 16px; display: block; }
.nav-item:hover { background: var(--bg); color: var(--ink); }
.nav-item.active { background: var(--brand-lt); color: var(--brand-dk); font-weight: 600; }
.nav-item.active .nav-ico { color: var(--brand-dk); opacity: 1; }

.ni-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.25; }
.ni-name { font-size: 13px; font-weight: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ni-desc { font-size: 10px; color: var(--ink-3); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item.active .ni-desc { color: var(--brand-dk); opacity: .7; }

.nav-badge {
  margin-left: auto;
  background: var(--err);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  font-style: normal;
}
.nav-badge.on { display: inline-flex; }

.sb-foot { padding: 12px; border-top: 1px solid var(--line); }

.sys-switch {
  display: block;
  width: 100%;
  background: var(--bg);
  border: none;
  border-radius: 10px;
  padding: 11px 13px;
  margin-bottom: 10px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: .2s;
}
.sw-label { font-size: 11px; color: var(--ink-3); margin-bottom: 6px; font-weight: 600; }
.sw-ctl { display: flex; align-items: center; gap: 7px; }
.sw-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(0, 168, 112, .16);
}
.sw-ctl.off .sw-dot { background: var(--err); box-shadow: 0 0 0 3px rgba(227, 77, 89, .16); }
.sw-txt { font-size: 12.5px; font-weight: 600; }

.sb-user { display: flex; align-items: center; gap: 10px; padding: 4px 4px 2px; }
.user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--brand-lt);
  color: var(--brand-dk);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex: none;
  font-size: 13px;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.3; }
.user-name { color: var(--ink); font-size: 13px; font-weight: 600; }
.user-logout { color: var(--ink-3); font-size: 12px; }
.user-logout:hover { color: var(--err); }

.build-tag {
  margin-top: 9px;
  padding: 0 4px; /* 与 sb-user 左边缘一致，侧栏底部统一左对齐 */
  text-align: left;
  font-size: 10.5px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  letter-spacing: .2px;
}

/* 主区 */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; margin-left: 238px; }

.topbar {
  height: 58px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 26px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.menu-btn {
  display: none;
  width: 38px; height: 38px;
  flex: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  color: var(--ink-2);
  align-items: center;
  justify-content: center;
  transition: .15s;
}
.menu-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-lt); }
.menu-btn svg { width: 19px; height: 19px; }

.pg-head { flex: 1; min-width: 0; }
.pg-title { font-size: 16.5px; font-weight: 700; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.chain-chip {
  background: var(--brand-lt);
  color: var(--brand-dk);
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #D6E2FF;
}
.topbar-user { color: var(--ink-3); font-size: 12.5px; }

.content { padding: 24px 26px 40px; flex: 1; max-width: 1440px; width: 100%; margin: 0 auto; }
/* 客户钱包：完全占满内容区（无宽度上限，宽屏下两侧不再留白） */
.role-customer .content { max-width: none; }
/* 我的钱包页组件强制全宽（防任何内联/继承收缩，占满内容区） */
.role-customer .hero-balance,
.role-customer .grid,
.role-customer .card { width: 100%; max-width: none; }

.sb-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 21, 38, .44);
  z-index: 55;
  backdrop-filter: blur(2px);
}
.sb-mask.on { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
body.sb-locked { overflow: hidden; }

/* ================================================================
   通用组件
   ================================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 20px;
}
.card h2, .card h3 { font-size: 14.5px; font-weight: 700; letter-spacing: -.2px; }
.card-title {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.card-title h2, .card-title h3 { margin: 0; }
.card-title .muted { font-size: 12px; }

.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { font-size: 17px; font-weight: 700; letter-spacing: -.2px; }
.page-head .desc { color: var(--ink-3); font-size: 12.5px; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  background: #fff;
  color: var(--ink-2);
  transition: .15s;
  white-space: nowrap;
  line-height: 1;
}
.btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-lt); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #3A6BFF);
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(22, 82, 240, .24);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(22, 82, 240, .32); background: linear-gradient(135deg, var(--brand), #3A6BFF); color: #fff; }

.btn-danger { background: #fff; border: 1px solid #FBCFD2; color: var(--err); font-weight: 600; }
.btn-danger:hover { background: var(--err-bg); color: var(--err); }

.btn-ok { background: #fff; border: 1px solid #A8E6D0; color: var(--ok); font-weight: 600; }
.btn-ok:hover { background: var(--ok-bg); color: var(--ok); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-3); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); border-color: transparent; }

.btn-sm { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 8px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat {
  padding: 18px 20px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: .2s;
  display: flex;
  flex-direction: column;
  min-height: 118px;
}
.stat:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(16, 42, 89, .06), 0 14px 34px rgba(16, 42, 89, .09); }
.stat::after {
  content: '';
  position: absolute;
  right: -24px;
  top: -24px;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--brand-lt);
  opacity: .55;
}
.stat.s-green::after { background: var(--ok-bg); }
.stat.s-warn::after { background: var(--warn-bg); }
.stat.s-purple::after { background: var(--purple-bg); }
.stat .num {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -.8px;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  position: relative;
  color: var(--ink);
}
.stat .num small { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
.stat .label { font-size: 11.5px; color: var(--ink-3); font-weight: 600; letter-spacing: .2px; margin-bottom: 8px; position: relative; }
.stat .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; position: relative; }
.stat .hint a { color: var(--brand); font-weight: 600; }
.trend-up { color: var(--err); font-weight: 600; }
.trend-dn { color: var(--ok); font-weight: 600; }

/* 表格 */
.tbl-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 720px; }
thead th {
  background: #FAFBFD;
  color: var(--ink-3);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .3px;
  text-align: left;
  padding: 11px 16px; /* 与 tbody td 左右内边距一致：表头与数据列边界完全对齐 */
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td { padding: 14px 16px; border-bottom: 1px solid #F1F4F9; vertical-align: middle; line-height: 1.65; white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: .13s; }
tbody tr:hover { background: #FAFCFF; }
/* 长串优先一行完整显示，容器放不下才在合适处断行（不随意折断） */
.mono { overflow-wrap: anywhere; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-size: 12px; }
td.actions { text-align: right; white-space: nowrap; }
.cell-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.empty-row td { text-align: center; color: var(--ink-3); padding: 32px 12px; }

/* 客户钱包到账动画播报 */
.balance-banner {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #16a34a, #22c55e); color: #fff;
  padding: 13px 26px; border-radius: 14px; z-index: 9999;
  font-size: 15px; font-weight: 600; letter-spacing: .3px;
  box-shadow: 0 10px 34px rgba(22, 163, 74, .38);
  animation: balDrop .45s cubic-bezier(.2, .9, .3, 1.2);
}
.balance-banner b { font-size: 17px; }
.balance-banner.out { opacity: 0; transition: opacity .9s; }
@keyframes balDrop {
  from { opacity: 0; transform: translate(-50%, -26px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.balance-pulse { animation: balPulse 1.1s ease; }
@keyframes balPulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.07); color: #16a34a; }
  100% { transform: scale(1); }
}
body.theme-dark .balance-pulse { animation-name: balPulseDark; }
@keyframes balPulseDark {
  0% { transform: scale(1); }
  35% { transform: scale(1.07); color: #4ade80; }
  100% { transform: scale(1); }
}

/* 调账申请：客户搜索候选 */
.adjust-form { display: flex; gap: 14px; flex-wrap: wrap; }
.af-customer { flex: 1.4; min-width: 300px; display: flex; flex-direction: column; gap: 7px; }
.af-amount { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 7px; }
.af-customer label, .af-amount label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.cust-search { position: relative; }
.cust-cands {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(22, 82, 240, .12); overflow: hidden; max-height: 260px; overflow-y: auto;
}
.cust-cand { padding: 10px 14px; font-size: 13px; cursor: pointer; border-bottom: 1px solid #F1F4F9; }
.cust-cand:last-child { border-bottom: none; }
.cust-cand:hover { background: #F5F8FF; }

/* 商户信息/结算页规整布局 */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.settle-form { display: flex; gap: 16px; flex-wrap: wrap; }
.sf-amount { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 7px; }
.sf-addr { flex: 1.4; min-width: 300px; display: flex; flex-direction: column; gap: 7px; }
/* 结算金额输入行 + 全部提取精致按钮 */
.settle-all-btn {
  flex: none;
  border: 1.5px solid var(--brand);
  background: var(--brand-lt);
  color: var(--brand-dk);
  border-radius: 8px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  letter-spacing: .3px;
  line-height: 1.5;
}
.settle-all-btn:hover { background: var(--brand); color: #fff; }
@media (max-width: 900px) { .info-grid { grid-template-columns: 1fr; } }

/* 商户调账申请：客户搜索定位 + 两列布局 */
.adjust-form { display: flex; gap: 16px; flex-wrap: wrap; }
.af-customer { flex: 1.4; min-width: 280px; display: flex; flex-direction: column; gap: 7px; }
.af-amount { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 7px; }
.cust-search { position: relative; }
.cust-cands {
  position: absolute; top: 44px; left: 0; right: 0; z-index: 30;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12); max-height: 260px; overflow-y: auto;
}
.cust-cand {
  padding: 10px 14px; cursor: pointer; font-size: 13px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
}
.cust-cand:last-child { border-bottom: none; }
.cust-cand:hover { background: var(--brand-lt); }
.cust-cand .cc-no { font-family: var(--font-mono); color: var(--brand); font-weight: 600; }
.cust-cand .cc-bal { color: var(--ink-3); font-size: 12px; }

/* 充值页快捷金额（第三方支付同款） */
.recharge-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.rf-amount { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 7px; }
.rf-amount label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.rf-submit { display: flex; align-items: flex-end; padding-bottom: 1px; }
.quick-amounts { margin: 12px 0 2px; }
.quick-amounts .muted { font-size: 12px; }
.qa-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.qa-btn {
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-2);
  border-radius: 10px; padding: 8px 18px; font-size: 13.5px; font-weight: 650;
  cursor: pointer; transition: all .15s; font-variant-numeric: tabular-nums; line-height: 1.2;
}
.qa-btn:hover { border-color: var(--brand); color: var(--brand); }
.qa-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(22, 82, 240, .28); }
.qa-btn.qa-custom { color: var(--ink-3); font-weight: 500; }
.qa-btn.qa-custom:hover { color: var(--ink-1); border-color: var(--ink-3); }

/* 弹窗表单分组标题（新增商户/客户弹窗精致化） */
.fg-group {
  font-size: 12.5px; font-weight: 700; color: var(--brand);
  padding: 4px 0 8px; margin-top: 6px; border-bottom: 1px solid var(--line);
  letter-spacing: .5px;
}
.fg-group .optional { font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.fg-group:first-of-type { margin-top: 0; }

/* 通用分页条 */
.pg-nav { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.pg-info { font-size: 12.5px; color: var(--ink-3); }
.pg-btn {
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-2);
  border-radius: 9px; padding: 6px 14px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: all .15s; text-decoration: none; line-height: 1.3;
}
.pg-btn:hover { border-color: var(--brand); color: var(--brand); }
.pg-btn.off { opacity: .4; cursor: default; pointer-events: none; }

/* 收银台大金额响应 */
.order-amt-lg { font-size: clamp(20px, 2.5vw, 26px); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--brand); letter-spacing: -.5px; white-space: nowrap; }

/* 全局文字溢出防御 */
.page-head, .card-title, .toolbar { min-width: 0; }
.toolbar .btn, .form-foot .btn { flex: none; }
h1, h2, h3, h4 { overflow-wrap: break-word; }

/* 商户管理：每商户独立板块 */
.m-card { padding: 18px 22px; }
.m-card-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.m-card-hd .m-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.m-card-hd .mono { color: var(--ink-3); font-size: 12px; }
.m-card-hd .m-meta { font-size: 12.5px; color: var(--ink-2); }
.m-card-hd .m-meta b { color: var(--brand); }
.m-cust-hd {
  font-size: 12.5px; font-weight: 700; color: var(--brand);
  background: var(--brand-lt); border: 1px solid #D9E4FF; border-bottom: none;
  padding: 9px 16px; border-radius: 10px 10px 0 0; margin-top: 12px;
}
.m-cust-hd + .tbl-wrap { border: 1px solid var(--line); border-top: none; }

/* 商户管理：商户行下方直接展开名下客户 */
tr.sub-row { border: none; box-shadow: none; padding: 0; }
tr.sub-row > td { padding: 12px 8px 18px; background: transparent; border: none; border-top: 2px dashed var(--line); }
.sub-customers { border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 10px; background: var(--bg-soft); overflow: hidden; box-shadow: 0 3px 12px rgba(22, 82, 240, .05); }
/* 商户主行加重分隔：与名下客户子表形成清晰分区 */
tr.m-row td { border-bottom: 2px solid #DDE4F0; background: #FFFDFB; }
tr.m-row td:first-child { border-left: 3px solid var(--brand); }
tr.m-row:hover td { background: #FAFCFF; }
.sub-customers .sub-hd { background: var(--brand-lt); border-bottom: 1px solid #D9E4FF; }
/* 全局卡片标题基线统一（上下不再参差） */
.card-title { min-height: 24px; }
.page-head { min-height: 26px; }
.card > .toolbar { margin-bottom: 16px; }
.sub-customers .sub-hd { padding: 9px 14px; font-size: 12.5px; font-weight: 700; color: var(--brand); border-bottom: 1px solid var(--line); background: var(--bg); }
.sub-customers .sub-hd .muted { font-weight: 400; margin-left: 8px; }
.sub-customers .tbl-wrap { border-radius: 0; box-shadow: none; margin: 0; }
.sub-customers table { border: none; }
.sub-customers thead th { font-size: 11px; padding: 7px 10px; }
.sub-customers tbody td { font-size: 12.5px; padding: 7px 10px; }
.sub-customers tbody tr:last-child { border-bottom: none; }

/* 徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3.5px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge-ok { background: var(--ok-bg); color: #017A52; }
.badge-err { background: var(--err-bg); color: #C9333E; }
.badge-warn { background: var(--warn-bg); color: #B25A12; }
.badge-info { background: var(--brand-lt); color: var(--brand-dk); }
.badge-neutral { background: #EEF1F6; color: #5C6B82; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-row { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.form-row.full { grid-column: 1 / -1; }
.form-grid .form-row { margin-bottom: 0; }
.form-grid .form-row.full { margin-bottom: 0; }
label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
label .optional { color: var(--ink-3); font-weight: 400; }
.ipt, input, select, textarea {
  height: 40px;
  padding: 0 13px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  font-size: 13px;
  background: #FAFBFD;
  color: var(--ink-1);
  transition: border-color .15s;
  transition: .16s;
  font-family: inherit;
  color: var(--ink);
  width: 100%;
}
/* 下拉框友好化：自定义箭头 + 选中值不撑破框 + 紧凑列表 */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 36px;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2364748B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}
select option { font-size: 13px; padding: 4px 8px; }
textarea { height: auto; padding: 10px 13px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3.5px rgba(22, 82, 240, .1);
}
select { cursor: pointer; }
input[readonly] { background: #F3F5FA; color: var(--ink-2); }
input.mono { font-family: var(--font-mono); font-size: 12px; }
.fi-hint { font-size: 11px; color: var(--ink-3); line-height: 1.5; }
.form-foot { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }

/* 提示 */
.alert {
  display: flex;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.6;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-error, .alert-e { background: var(--err-bg); border-color: #FBCFD2; color: #C9333E; }
.alert-ok { background: var(--ok-bg); border-color: #A8E6D0; color: #017A52; }

.muted { color: var(--ink-3); line-height: 1.7; }
.mono {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-2);
}
.link-box {
  display: inline-block;
  word-break: break-all;
  line-height: 1.5;
  vertical-align: middle;
  color: var(--ink-3);
  font-size: 11.5px;
}

.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar { display: flex; gap: 9px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select { width: auto; min-width: 150px; }
.spacer { flex: 1; }

/* 密钥展示 */
.key-row { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.key-lb { font-size: 11px; color: var(--ink-3); font-weight: 600; width: 74px; flex: none; }
.key-val {
  flex: 1;
  background: #FAFBFD;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 11px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  word-break: break-all;
  color: var(--ink-2);
}
.btn-copy {
  flex: none;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  font-size: 11.5px;
  cursor: pointer;
  color: var(--ink-2);
  font-weight: 600;
  transition: .15s;
}
.btn-copy:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-lt); }

/* 弹窗 */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(11, 21, 38, .42);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-mask.on { display: flex; }
.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(11, 21, 38, .22);
  animation: pop .22s cubic-bezier(.2, .8, .3, 1);
}
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
.modal-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.modal-title { font-size: 15.5px; font-weight: 700; }
.modal-x {
  width: 30px; height: 30px;
  border: none;
  background: var(--bg);
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink-3);
  font-size: 17px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: .15s;
}
.modal-x:hover { background: var(--err-bg); color: var(--err); }
.modal-body { padding: 22px 24px; }
.modal-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  position: sticky;
  bottom: 0;
  background: #fff;
}

/* Toast */
.toast-wrap {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 10px;
  padding: 13px 17px;
  font-size: 12.5px;
  box-shadow: 0 8px 26px rgba(16, 42, 89, .14);
  min-width: 230px;
  max-width: 420px;
  animation: slideIn .26s cubic-bezier(.2, .8, .3, 1);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  word-break: break-all;
}
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--err); }
/* 服务端 flash-toast 固定右上角（不随页面流、不被侧栏遮挡） */
#flash-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  animation: slideIn .26s cubic-bezier(.2, .8, .3, 1);
}
@keyframes slideIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }

/* 图表（纯 CSS 柱状图） */
.chart-card { padding: 20px 22px; margin-bottom: 20px; }
.chart-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.bar {
  width: 100%;
  max-width: 46px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #5B8BFF, var(--brand));
  transition: height .7s cubic-bezier(.2, .8, .3, 1);
  position: relative;
  min-height: 4px;
}
.bar:hover { background: linear-gradient(180deg, #3A6BFF, var(--brand-dk)); }
.bar-lb { font-size: 10.5px; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.bar-vl {
  font-size: 10.5px;
  color: var(--ink-2);
  font-weight: 700;
  position: absolute;
  top: -17px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* 空态 */
.empty { padding: 50px 20px; text-align: center; }
.empty-ico {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: var(--brand-lt);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
}
.empty-t { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.empty-d { font-size: 12.5px; color: var(--ink-3); }

/* 二维码 */
.qr-box { text-align: center; padding: 8px 0; }
.qr-box img {
  border: 1px solid var(--line);
  border-radius: 12px;
  max-width: 230px;
  width: 100%;
  box-shadow: var(--shadow);
}
.recharge-layout { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 18px; align-items: start; }

/* 提现页：两列版式（精致尺寸：表单与全局一致，不放大） */
.withdraw-layout { display: grid; grid-template-columns: minmax(340px, 420px) 1fr; gap: 20px; align-items: start; }
.wd-card { padding: 22px 24px; }
.wd-card .card-title { margin-bottom: 16px; }
.wd-card .card-title h2 { font-size: 15px; }
.wd-card .form-row { gap: 8px; margin-bottom: 16px; }
.wd-card .form-row label { font-size: 12.5px; }
.wd-card input { height: 42px; padding: 0 13px; font-size: 13px; border-radius: 9px; }
.wd-card .btn-lg { height: 40px; padding: 0 22px; font-size: 13.5px; }
.wd-card .form-foot { margin-top: 16px; }
.wd-card .tbl-wrap td, .wd-card .tbl-wrap th { padding: 11px 13px; font-size: 12.5px; }

/* 收银台增强：大二维码 + 完整地址 + 大金额 + 成功卡片 */
.role-customer .recharge-layout { grid-template-columns: minmax(320px, 430px) 1fr; }
.role-customer .qr-box img { max-width: 300px; }
.addr-full {
  display: block; font-family: var(--font-mono); font-size: 14px; line-height: 1.7;
  word-break: break-all; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; margin-top: 8px;
}
.order-amt-lg { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--brand); letter-spacing: -.5px; }
.pay-success-card {
  background: linear-gradient(135deg, #10b981, #059669); color: #fff; border-radius: 14px;
  padding: 22px 20px; text-align: center; margin-top: 14px;
}
.pay-success-card .ps-ico { font-size: 30px; line-height: 1; }
.pay-success-card .ps-t { font-size: 18px; font-weight: 700; margin-top: 8px; }
.pay-success-card .ps-d { font-size: 13px; opacity: .92; margin-top: 5px; }
.pay-success-card .ps-bar { display:inline-block; background:#fff; color:#059669; border-radius:999px; padding:7px 20px; font-weight:700; font-size:13.5px; margin-top:12px; animation: balPulse 1.2s ease infinite; }

/* 系统设置配置项 */
.cfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
.cfg-item { display: flex; flex-direction: column; gap: 5px; }
.cfg-item label { margin-bottom: 0; }
.cfg-item input { font-family: var(--font-mono); font-size: 12px; }
.cfg-desc { font-size: 11px; color: var(--ink-3); line-height: 1.5; }

/* 钱包能量进度条 */
.energy-cell { display: flex; align-items: center; gap: 8px; }
.energy-bar {
  width: 88px; height: 7px;
  background: #EEF1F6;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}
.energy-fill { height: 100%; background: var(--ok); border-radius: 999px; transition: width .25s ease; }
.energy-fill.low { background: var(--err); }
.energy-num { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--ink); }
.energy-num.low-text { color: var(--err); font-weight: 600; }

/* 分页 */
.pagination { margin-top: 14px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 12.5px;
  color: var(--ink-2);
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* ================================================================
   精修细节：Hero 渐变余额卡 / sticky 表头 / 微交互
   ================================================================ */
.hero-balance {
  background: linear-gradient(135deg, #0B2A6B 0%, #1449DB 55%, #2E6BFF 100%);
  border-radius: 16px;
  padding: 26px 28px;
  color: #fff;
  box-shadow: 0 12px 32px rgba(22, 82, 240, .28);
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}
.hero-balance::after {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.hero-balance::before {
  content: '';
  position: absolute;
  right: 60px;
  bottom: -80px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
}
.hero-bal { position: relative; }
.hero-bal .hb-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hero-bal .lb { font-size: 12px; color: rgba(255, 255, 255, .72); font-weight: 600; letter-spacing: .4px; }
.hero-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #4ADE80;
  background: rgba(74, 222, 128, .14);
  padding: 4px 10px;
  border-radius: 20px;
}
.hero-live i { width: 6px; height: 6px; border-radius: 50%; background: #4ADE80; animation: pulse 2.2s infinite; }
.hero-bal .vl {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -.8px;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.hero-bal .vl small { font-size: 15px; font-weight: 600; opacity: .75; margin-left: 6px; }
.hero-bal .hb-sub { margin-top: 6px; font-size: 12px; color: rgba(255, 255, 255, .66); }
.hero-bal .acts { display: flex; gap: 10px; margin-top: 18px; position: relative; }
.hero-bal .acts .btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: .15s;
  border: none;
}
.btn-hero-solid { background: #fff; color: var(--brand-dk); }
.btn-hero-solid:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.btn-hero-ghost { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .3) !important; }
.btn-hero-ghost:hover { background: rgba(255, 255, 255, .24); }

/* 表头吸顶（长表格滚动时列名可见） */
.tbl-wrap { position: relative; max-height: none; }
thead th { position: sticky; top: 0; z-index: 5; }

/* 按钮按压反馈与键盘焦点 */
.btn:active { transform: scale(.97); }
.btn-primary:active { transform: scale(.97) translateY(0); }
.btn:focus-visible, .ipt:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 8px;
}

/* 数字/金额统一等宽 */
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* 页面淡入 */
.content { animation: fadeUp .28s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 滚动条美化 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #C9D2E0; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #A9B6C9; }
::-webkit-scrollbar-track { background: transparent; }

/* 选择文本 */
::selection { background: rgba(22, 82, 240, .18); }

/* 顶栏铃铛与红点 */
.bell-btn { position: relative; padding: 0 10px; }
.bell-btn svg { width: 18px; height: 18px; }
.bell-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--err);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: badgePulse 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(227, 77, 89, .45); }
  50% { box-shadow: 0 0 0 5px rgba(227, 77, 89, 0); }
}

/* SDK 代码块 */
.sdk-code {
  background: #0d1117;
  color: #c9d1d9;
  border-radius: 10px;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.6;
  overflow-x: auto;
  max-height: 320px;
  white-space: pre;
}

/* ================================================================
   动态感系统：极光背景 / 卡片入场 / 数字滚动 / 柱状图生长 / 光效
   ================================================================ */

/* ---- 极光流动背景（未登录界面） ---- */
.login-body {
  position: relative;
  overflow: hidden;
}
.login-body::before {
  content: '';
  position: absolute;
  inset: -45%;
  background:
    radial-gradient(620px 420px at 18% 22%, rgba(22, 82, 240, .17), transparent 62%),
    radial-gradient(540px 400px at 82% 26%, rgba(123, 92, 245, .15), transparent 62%),
    radial-gradient(720px 520px at 48% 88%, rgba(0, 168, 112, .13), transparent 62%),
    radial-gradient(420px 320px at 70% 70%, rgba(237, 123, 47, .08), transparent 60%);
  animation: aurora 16s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes aurora {
  0%   { transform: translate3d(-2%, -2%, 0) scale(1); }
  50%  { transform: translate3d(3%, 2%, 0) scale(1.06); }
  100% { transform: translate3d(-1%, 3%, 0) scale(1.03); }
}
/* 细微网格纹（渐隐） */
.login-body::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(22, 82, 240, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 82, 240, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(700px 500px at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(700px 500px at 50% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

/* ---- 登录卡片入场 ---- */
.login-card {
  position: relative;
  z-index: 1;
  animation: cardIn .55s cubic-bezier(.2, .8, .3, 1) both;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, .92);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(26px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

/* Logo 悬浮呼吸 */
.login-brand .brand-mark, .sb-logo .logo-mark {
  animation: logoFloat 4s ease-in-out infinite;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* 特性徽章逐个浮现 */
.login-feats span {
  animation: featIn .45s cubic-bezier(.2, .8, .3, 1) both;
}
.login-feats span:nth-child(1) { animation-delay: .28s; }
.login-feats span:nth-child(2) { animation-delay: .38s; }
.login-feats span:nth-child(3) { animation-delay: .48s; }
@keyframes featIn {
  from { opacity: 0; transform: translateY(8px) scale(.92); }
  to   { opacity: 1; transform: none; }
}

/* ---- 按钮流光（shimmer） ---- */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 55%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .34), transparent);
  transform: skewX(-18deg);
  transition: left .55s ease;
}
.btn-primary:hover::after { left: 130%; }

/* ---- 待办角标脉冲 ---- */
.nav-badge.on { animation: badgePulse 2.4s ease-in-out infinite; }
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(227, 77, 89, .45); }
  50% { box-shadow: 0 0 0 5px rgba(227, 77, 89, 0); }
}

/* ---- 柱状图生长（配合 JS 从 0 到目标高度） ---- */
.bar, .screen-bars .bar { transition: height .8s cubic-bezier(.2, .8, .3, 1); }

/* ---- 数字滚动（count-up，JS 驱动，无样式即可，提供 .count-target 钩子） ---- */

/* ---- 侧栏导航项滑入（整列加载动画） ---- */
.nav-group { animation: navFade .4s ease both; }
.nav-item { animation: navFade .45s ease both; }
.nav-group:nth-of-type(1), .nav-item:nth-of-type(1) { animation-delay: .03s; }
.nav-group:nth-of-type(2), .nav-item:nth-of-type(2) { animation-delay: .06s; }
.nav-group:nth-of-type(3), .nav-item:nth-of-type(3) { animation-delay: .09s; }
.nav-group:nth-of-type(4), .nav-item:nth-of-type(4) { animation-delay: .12s; }
.nav-group:nth-of-type(5), .nav-item:nth-of-type(5) { animation-delay: .15s; }
.nav-group:nth-of-type(6), .nav-item:nth-of-type(6) { animation-delay: .18s; }
@keyframes navFade {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: none; }
}

/* ---- 统计卡错落入场 ---- */
.grid > .stat, .stat-grid > .stat, .screen-grid > .screen-stat {
  animation: statIn .5s cubic-bezier(.2, .8, .3, 1) both;
}
.grid > .stat:nth-child(1), .screen-grid > .screen-stat:nth-child(1) { animation-delay: .02s; }
.grid > .stat:nth-child(2), .screen-grid > .screen-stat:nth-child(2) { animation-delay: .06s; }
.grid > .stat:nth-child(3), .screen-grid > .screen-stat:nth-child(3) { animation-delay: .10s; }
.grid > .stat:nth-child(4), .screen-grid > .screen-stat:nth-child(4) { animation-delay: .14s; }
.grid > .stat:nth-child(5), .screen-grid > .screen-stat:nth-child(5) { animation-delay: .18s; }
.grid > .stat:nth-child(6), .screen-grid > .screen-stat:nth-child(6) { animation-delay: .22s; }
.grid > .stat:nth-child(7), .screen-grid > .screen-stat:nth-child(7) { animation-delay: .26s; }
.grid > .stat:nth-child(8), .screen-grid > .screen-stat:nth-child(8) { animation-delay: .30s; }
@keyframes statIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---- 卡片入场 ---- */
.card { animation: cardIn .45s cubic-bezier(.2, .8, .3, 1) both; }
.card:nth-of-type(2) { animation-delay: .06s; }
.card:nth-of-type(3) { animation-delay: .12s; }

/* ---- toast 进度条（JS 控制宽度） ---- */
.toast { position: relative; overflow: hidden; }
.toast .toast-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2.5px;
  background: var(--brand);
  width: 100%;
  animation: toastBar 4.5s linear forwards;
  border-radius: 2px;
}
.toast.ok .toast-bar { background: var(--ok); }
.toast.err .toast-bar { background: var(--err); }
@keyframes toastBar { from { width: 100%; } to { width: 0%; } }

/* ---- 自定义确认弹窗（替代原生 confirm） ---- */
.confirm-modal { max-width: 420px; }
.confirm-ico {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--brand-lt);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  animation: logoFloat 2.6s ease-in-out infinite;
}
.confirm-ico svg { width: 26px; height: 26px; }
.confirm-ico.warn { background: var(--warn-bg); color: #B25A12; }
.confirm-title { font-size: 15.5px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.confirm-desc { font-size: 13px; color: var(--ink-2); text-align: center; line-height: 1.7; }
.confirm-foot { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.confirm-foot .btn { min-width: 96px; }

/* ---- 输入框聚焦抬升 ---- */
.login-card label, .form-row label { transition: color .2s ease; }
input:focus { border-color: var(--brand); }

/* ---- 登录页双栏（左侧品牌介绍 + 右侧登录卡）---- */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(22, 82, 240, .12), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(0, 168, 112, .09), transparent 55%),
    #F5F7FB;
  padding: 24px;
}
.login-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1020px;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 56px;
  align-items: center;
  animation: cardIn .55s cubic-bezier(.2, .8, .3, 1) both;
}
.brand-side { display: flex; flex-direction: column; gap: 24px; }
.logo-row { display: flex; align-items: center; gap: 12px; }
.logo-row .brand-mark {
  width: 46px; height: 46px;
  border-radius: 50%;
  font-size: 19px;
  background: #26A17B;
  box-shadow: 0 6px 20px rgba(38, 161, 123, .4);
  animation: logoFloat 4s ease-in-out infinite;
  overflow: hidden;
}
.hero-title {
  font-size: 36px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -.8px;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, #1652F0 0%, #00A870 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub { font-size: 14.5px; color: var(--ink-2); line-height: 1.75; max-width: 460px; }
.feat-list { display: grid; gap: 12px; margin-top: 4px; }
.feat { display: flex; gap: 12px; align-items: flex-start; animation: featIn .45s cubic-bezier(.2, .8, .3, 1) both; }
.feat:nth-child(2) { animation-delay: .08s; }
.feat:nth-child(3) { animation-delay: .16s; }
.feat:nth-child(4) { animation-delay: .24s; }
.feat-ico {
  flex: none; width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--brand-lt);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
}
.feat-ico svg { width: 16px; height: 16px; }
.feat-t { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.feat-d { font-size: 12.5px; color: var(--ink-3); line-height: 1.55; }

.login-card {
  position: relative;
  z-index: 1;
  animation: cardIn .55s cubic-bezier(.2, .8, .3, 1) both;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, .94);
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(16, 42, 89, .06), 0 12px 32px rgba(16, 42, 89, .1);
  border: 1px solid var(--line);
  overflow: hidden;
  width: 100%;
  padding: 36px 34px 28px;
}
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1652F0, #00A870);
}
@media (max-width: 860px) {
  .login-wrap { grid-template-columns: 1fr; gap: 28px; max-width: 440px; }
  .brand-side { gap: 16px; }
  .hero-title { font-size: 26px; }
  .hero-sub { font-size: 13px; }
  .feat-list { display: none; }
}

/* ================================================================
   登录页
   ================================================================ */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(22, 82, 240, .12), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(0, 168, 112, .09), transparent 55%),
    #F5F7FB;
  padding: 24px;
}
.login-card {
  width: 380px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px;
  box-shadow: var(--shadow);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.login-brand .brand-mark {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #26A17B;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  flex: none;
  box-shadow: 0 4px 14px rgba(38, 161, 123, .38);
  overflow: hidden;
}
.login-card h1 { margin: 0; font-size: 19px; font-weight: 700; }
.login-sub { color: var(--ink-3); margin: 2px 0 0; font-size: 13px; }
.login-card label { margin-bottom: 14px; display: block; }
.login-card .btn { margin-top: 4px; }
.login-feats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.login-feats span {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-dk);
  background: var(--brand-lt);
  border: 1px solid #D6E2FF;
  padding: 3.5px 9px;
  border-radius: 20px;
}
.login-foot { margin-top: 16px; text-align: center; font-size: 12.5px; color: var(--ink-3); }

/* 数据大屏（浅色主题） */
.screen-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 20px; }
.screen-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.screen-stat .lb { font-size: 11.5px; color: var(--ink-3); font-weight: 600; letter-spacing: .3px; margin-bottom: 8px; }
.screen-stat .vl { font-size: 28px; font-weight: 700; letter-spacing: -.6px; font-variant-numeric: tabular-nums; color: var(--ink); }
.screen-stat .vl small { font-size: 13px; color: var(--ink-3); margin-left: 4px; }
.screen-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.screen-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 16px; }
.screen-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.screen-bars { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 14px; }
.screen-bars .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.screen-bars .bar { width: 100%; max-width: 52px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #3A6BFF, #1652F0); min-height: 4px; position: relative; transition: height .7s cubic-bezier(.2,.8,.3,1); }
.screen-bars .bar-lb { font-size: 10.5px; color: var(--ink-3); font-weight: 600; }
.screen-bars .bar-vl { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--ink-2); font-weight: 700; white-space: nowrap; }
.screen-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 0; }
.screen-table td { padding: 9px 0; border-bottom: 1px solid #F1F4F9; color: var(--ink-2); }
.screen-table tr:last-child td { border-bottom: none; }
.screen-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.screen-rank { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12.5px; }
.screen-rank .rk { width: 22px; height: 22px; border-radius: 6px; background: var(--bg); color: var(--ink-3); font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; font-size: 11px; }
.screen-rank .rk.top { background: linear-gradient(135deg, #F59E0B, #EF7B2F); color: #fff; }
.screen-rank .nm { flex: 1; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen-rank .vl { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }

/* ================================================================
   响应式（对标顶级系统多级断点）
   ================================================================ */
@media (max-width: 1024px) {
  .sidebar { width: 200px; }
  .main { margin-left: 200px; }
  .content { padding: 20px; }
}

@media (max-width: 900px) {
  .main { margin-left: 0; }
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    height: 100vh;
    width: 232px;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform .26s cubic-bezier(.2, .8, .3, 1);
  }
  .sidebar.open { transform: translateX(0); box-shadow: 6px 0 34px rgba(11, 21, 38, .18); }
  .menu-btn { display: flex; }
  .topbar { padding: 0 14px; gap: 10px; justify-content: flex-start; }
  .pg-head { flex: 1; }
  .top-right { margin-left: auto; gap: 8px; }
  .topbar-user { display: none; }
  .content { padding: 16px 14px 32px; }
  .form-grid { grid-template-columns: 1fr; }
  .grid, .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cfg-grid { grid-template-columns: 1fr; }
  .recharge-layout { grid-template-columns: 1fr; }
  .withdraw-layout { grid-template-columns: 1fr; gap: 16px; }
  .wd-card { padding: 20px 18px; }
  .menu-btn { width: 44px; height: 44px; }
  .menu-btn svg { width: 21px; height: 21px; }
  .nav-item { padding: 13px 14px; font-size: 14px; }
  .nav-item .nav-ico .ico { width: 18px; height: 18px; }
  .btn-primary { height: 44px; }
  .btn-sm { height: 40px; }
  .ipt, input, select { height: 44px; }
  .toolbar input, .toolbar select { width: 100%; min-width: 0; }
  .toast-wrap { left: 12px; right: 12px; top: 12px; }
  .toast { min-width: 0; width: 100%; }
}

@media (max-width: 768px) {
  .tbl-wrap { border: none; background: transparent; overflow: visible; border-radius: 0; }
  .tbl-wrap table { min-width: 0; width: 100%; font-size: 13px; display: block; }
  .tbl-wrap thead { display: none; }
  .tbl-wrap tbody { display: block; }
  .tbl-wrap tbody tr {
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 6px 14px;
    box-shadow: var(--shadow);
  }
  .tbl-wrap tbody tr:hover { background: #fff; }
  .tbl-wrap tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px solid #F4F6FA;
    font-size: 13px;
    text-align: right;
    border-bottom: 1px solid #F4F6FA;
  }
  .tbl-wrap tbody td:last-child { border-bottom: none; }
  .tbl-wrap tbody td::before {
    content: attr(data-label);
    flex: none;
    font-size: 12px;
    color: var(--ink-3);
    font-weight: 600;
    text-align: left;
    max-width: 44%;
  }
  .tbl-wrap tbody td:not([data-label])::before { content: ''; display: none; }
  .tbl-wrap tbody td .mono { font-size: 12px; word-break: break-all; }
  .tbl-wrap tbody td.actions { justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
  .tbl-wrap tbody td.actions::before { display: none; }
  .tbl-wrap tbody tr.empty-row { border: none; box-shadow: none; padding: 0; }
}

@media (max-width: 560px) {
  .grid, .stat-grid { grid-template-columns: 1fr; gap: 10px; }
  .stat { padding: 15px 16px; }
  .stat .num { font-size: 23px; }
  .content { padding: 14px 12px 30px; }
  .page-head { flex-wrap: wrap; }
  .chain-chip { display: none; }
  .screen-cols { grid-template-columns: 1fr; }
  .screen-body { padding: 18px 14px; }
  .form-foot .btn, .form-foot .btn-primary { flex: 1 1 100%; }
  .hero-bal .acts { flex-wrap: wrap; }
  .hero-bal .acts .btn-hero { flex: 1 1 100%; justify-content: center; }
  .recharge-form, .settle-form, .adjust-form { flex-direction: column; }
  .qa-btn { flex: 1 1 30%; text-align: center; }
  .pg-nav { justify-content: center; }
}

@media (hover: none) {
  .stat:hover { transform: none; }
  .btn-primary:hover { transform: none; }
}

@media print {
  .sidebar, .topbar, .toast-wrap, .menu-btn, .sb-mask { display: none !important; }
  .content { padding: 0; }
  body { background: #fff; }
}

/* ================================================================

/* 仪表盘最新订单动态（浅色/深色通用） */
.tick-list { display: flex; flex-direction: column; }
.tick-item {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 12.5px;
}
.tick-item:last-child { border-bottom: none; }
.tick-item .mono { flex: none; }
.tick-item b.num { color: var(--brand); font-variant-numeric: tabular-nums; }
.tick-item > span:nth-last-child(2) { color: var(--ink-2); }
.tick-item .badge { margin-left: auto; }


/* 登录错误提示框（参考系统 err-box：表单顶部固定红色提示） */
.err-box {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--err-bg); border: 1px solid rgba(227, 77, 89, .3);
  color: var(--err); font-size: 12.5px; font-weight: 500;
  padding: 10px 12px; border-radius: 8px; margin-bottom: 16px;
  word-break: break-all;
}
.err-box.show { animation: errShake .3s ease; }
@keyframes errShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

   Web3 深色主题（覆盖浅色变量，全站生效）
   ================================================================ */
body.theme-dark {
  --brand: #7B3FE4;
  --brand-dk: #6B2FD8;
  --brand-lt: rgba(123, 63, 228, .16);
  --brand-2: #3B82F6;
  --brand-3: #00D4FF;
  --matrix: #00FFA3;
  --ink: #E5E9F5;
  --ink-2: #A5AFC4;
  --ink-3: #6B768C;
  --line: rgba(255, 255, 255, .08);
  --bg: #0A0E17;
  --card: #111627;
  --ok: #10B981;
  --ok-bg: rgba(16, 185, 129, .14);
  --warn: #F59E0B;
  --warn-bg: rgba(245, 158, 11, .14);
  --err: #EF4444;
  --err-bg: rgba(239, 68, 68, .14);
  --purple: #7B3FE4;
  --purple-bg: rgba(123, 63, 228, .16);
  --shadow: 0 2px 10px rgba(0, 0, 0, .35), 0 12px 40px rgba(0, 0, 0, .3);
}

body.theme-dark body { background: var(--bg); color: var(--ink); }
body.theme-dark ::-webkit-scrollbar-thumb { background: #2A3550; }
body.theme-dark ::-webkit-scrollbar-thumb:hover { background: #3A4666; }

/* 侧栏 */
body.theme-dark .sidebar { background: #0C1120; border-right: 1px solid var(--line); }
body.theme-dark .sb-logo { border-bottom: 1px solid var(--line); }
body.theme-dark .logo-txt b { color: var(--ink); }
body.theme-dark .logo-txt span { color: var(--ink-3); }
body.theme-dark .nav-item { color: var(--ink-2); }
body.theme-dark .nav-item:hover { background: rgba(255, 255, 255, .05); color: var(--ink); }
body.theme-dark .nav-item.active { background: var(--brand-lt); color: #9F7BFF; }
body.theme-dark .nav-item.active .ni-desc { color: #9F7BFF; opacity: .8; }
body.theme-dark .nav-group { color: var(--ink-3); }
body.theme-dark .nav-group::before { background: var(--brand); }
body.theme-dark .sb-foot { border-top: 1px solid var(--line); }
body.theme-dark .sys-switch { background: rgba(255, 255, 255, .05); }
/* 支付总开关 · Web3 深色适配 */
body.theme-dark .sys-switch { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
body.theme-dark .sys-switch:hover { border-color: rgba(123, 63, 228, .5); background: rgba(123, 63, 228, .08); }
body.theme-dark .sys-switch .sw-label { letter-spacing: .4px; }
body.theme-dark .sys-switch .sw-txt { color: #34D399; letter-spacing: .2px; }
body.theme-dark .sys-switch .sw-ctl.off .sw-txt { color: #F87171; }
body.theme-dark .sys-switch .sw-dot { animation: badgePulse 2.4s ease-in-out infinite; }
body.theme-dark .sys-switch .sw-ctl.off .sw-dot { animation: none; }
body.theme-dark .user-avatar { background: var(--brand-lt); color: #9F7BFF; }
body.theme-dark .user-name { color: var(--ink); }
body.theme-dark .build-tag { color: var(--ink-3); }
body.theme-dark .logo-mark { background: #26A17B; box-shadow: 0 6px 18px rgba(38, 161, 123, .42); }

/* 顶栏 */
body.theme-dark .topbar { background: #0C1120; border-bottom: 1px solid var(--line); }
body.theme-dark .pg-title { color: var(--ink); }
body.theme-dark .chain-chip { background: var(--brand-lt); color: #9F7BFF; border-color: rgba(123, 63, 228, .35); }
body.theme-dark .btn-ghost { color: var(--ink-2); }
body.theme-dark .menu-btn { background: transparent; border-color: var(--line); color: var(--ink-2); }

/* 卡片 */
body.theme-dark .card { background: var(--card); border: 1px solid var(--line); }
body.theme-dark .stat { background: var(--card); border: 1px solid var(--line); }
body.theme-dark .stat .num { color: var(--ink); }
body.theme-dark .stat::after { opacity: .12; }
body.theme-dark .stat:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, .4), 0 16px 40px rgba(0, 0, 0, .35); }

/* 表格 */
body.theme-dark .tbl-wrap { background: var(--card); border-color: var(--line); }
body.theme-dark thead th { background: rgba(255, 255, 255, .04); color: var(--ink-3); border-color: var(--line); }
body.theme-dark tbody td { border-color: rgba(255, 255, 255, .05); }
body.theme-dark tbody tr:hover { background: rgba(255, 255, 255, .03); }
body.theme-dark .mono { color: #9FB3E0; }
body.theme-dark .cell-amount { color: var(--ink); }

/* 表单 */
body.theme-dark input, body.theme-dark select, body.theme-dark textarea { background: #0E1424; border-color: var(--line); color: var(--ink); }
body.theme-dark input:focus, body.theme-dark select:focus, body.theme-dark textarea:focus { background: #121A2E; border-color: var(--brand); box-shadow: 0 0 0 3.5px rgba(123, 63, 228, .18); }
body.theme-dark input[readonly] { background: #0A0F1C; color: var(--ink-2); }
body.theme-dark .key-val { background: #0E1424; border-color: var(--line); color: #9FB3E0; }

/* 按钮 */
body.theme-dark .btn { background: #161E33; border-color: var(--line); color: var(--ink-2); }
body.theme-dark .btn:hover { border-color: var(--brand); color: #9F7BFF; background: rgba(123, 63, 228, .1); }
body.theme-dark .btn-primary { background: linear-gradient(135deg, #7B3FE4, #3B82F6 60%, #00D4FF); color: #fff; box-shadow: 0 4px 14px rgba(123, 63, 228, .35); }
body.theme-dark .btn-primary:hover { background: linear-gradient(135deg, #7B3FE4, #3B82F6 60%, #00D4FF); }
body.theme-dark .btn-ghost:hover { background: rgba(255, 255, 255, .06); color: var(--ink); }
body.theme-dark .btn-copy:hover { border-color: var(--brand); color: #9F7BFF; background: var(--brand-lt); }

/* 徽章 */
body.theme-dark .badge-ok { background: var(--ok-bg); color: #34D399; }
body.theme-dark .badge-err { background: var(--err-bg); color: #F87171; }
body.theme-dark .badge-warn { background: var(--warn-bg); color: #FBBF24; }
body.theme-dark .badge-info { background: var(--brand-lt); color: #9F7BFF; }
body.theme-dark .badge-neutral { background: rgba(255, 255, 255, .07); color: var(--ink-2); }

/* 弹窗 / toast */
body.theme-dark .modal-mask { background: rgba(4, 8, 18, .72); }
body.theme-dark .modal { background: #111627; border: 1px solid var(--line); }
body.theme-dark .modal-head, body.theme-dark .modal-foot { background: #111627; border-color: var(--line); }
body.theme-dark .modal-x { background: rgba(255, 255, 255, .06); color: var(--ink-3); }
body.theme-dark .toast { background: #111627; border-color: var(--line); color: var(--ink); }
body.theme-dark .toast-err { color: #F87171; }

/* 空态/提示 */
body.theme-dark .empty-ico { background: var(--brand-lt); color: #9F7BFF; }
body.theme-dark .alert-ok { background: var(--ok-bg); color: #34D399; border-color: rgba(16, 185, 129, .3); }
body.theme-dark .alert-error, body.theme-dark .alert-e { background: var(--err-bg); color: #F87171; border-color: rgba(239, 68, 68, .3); }
body.theme-dark .muted { color: var(--ink-3); }
body.theme-dark .fi-hint, body.theme-dark .cfg-desc { color: var(--ink-3); }
body.theme-dark .energy-bar { background: rgba(255, 255, 255, .08); }

/* 图表 */
body.theme-dark .bar { background: linear-gradient(180deg, #7B3FE4, #3B82F6 60%, #00D4FF); }
body.theme-dark .screen-card, body.theme-dark .screen-stat { background: var(--card); border-color: var(--line); }
body.theme-dark .screen-stat .vl { color: var(--ink); }
body.theme-dark .screen-rank .rk { background: rgba(255, 255, 255, .06); color: var(--ink-2); }
body.theme-dark .screen-rank .nm { color: var(--ink-2); }
body.theme-dark .screen-rank .vl { color: var(--ink); }
body.theme-dark .screen-table td { border-color: rgba(255, 255, 255, .05); color: var(--ink-2); }
body.theme-dark .screen-table td:last-child { color: var(--ink); }

/* hero 渐变余额卡（Crypto 三色霓虹） */
body.theme-dark .hero-balance {
  background: linear-gradient(135deg, #140B33 0%, #3B1E8E 48%, #0E4B8C 100%);
  border: 1px solid rgba(123, 63, 228, .4);
  box-shadow: 0 14px 40px rgba(123, 63, 228, .3), inset 0 0 60px rgba(0, 212, 255, .08);
}

/* 分页 */
body.theme-dark .pagination a, body.theme-dark .pagination span { background: #161E33; border-color: var(--line); color: var(--ink-2); }
body.theme-dark .pagination .current { background: var(--brand); }

/* SDK 代码块 */
body.theme-dark .sdk-code { background: #070B14; color: #C9D4EE; border: 1px solid var(--line); }

/* 登录页 Web3 化 */
body.theme-dark.login-body {
  background:
    radial-gradient(1100px 520px at 80% -10%, rgba(123, 63, 228, .22), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(59, 130, 246, .16), transparent 55%),
    radial-gradient(700px 420px at 50% 60%, rgba(0, 212, 255, .07), transparent 60%),
    #0A0E17;
}
body.theme-dark .login-card {
  background: rgba(17, 22, 39, .92);
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .4), 0 16px 48px rgba(0, 0, 0, .45);
}
body.theme-dark .login-card::before { background: linear-gradient(90deg, #7B3FE4, #3B82F6, #00D4FF); }
body.theme-dark.login-body::before {
  background:
    radial-gradient(620px 420px at 18% 22%, rgba(123, 63, 228, .24), transparent 62%),
    radial-gradient(540px 400px at 82% 26%, rgba(59, 130, 246, .2), transparent 62%),
    radial-gradient(720px 520px at 48% 88%, rgba(0, 212, 255, .1), transparent 62%);
}
body.theme-dark.login-body::after {
  background-image:
    linear-gradient(rgba(123, 63, 228, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123, 63, 228, .07) 1px, transparent 1px);
}
body.theme-dark .hero-title em { background: linear-gradient(135deg, #9F7BFF 0%, #22D3EE 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.theme-dark .hero-sub { color: var(--ink-2); }
body.theme-dark .feat-ico { background: var(--brand-lt); color: #9F7BFF; }
body.theme-dark .feat-t { color: var(--ink); }
body.theme-dark .feat-d { color: var(--ink-3); }
body.theme-dark .logo-row .logo-txt b { color: var(--ink); }
body.theme-dark .logo-row .logo-txt span { color: var(--ink-3); }
body.theme-dark .login-sub { color: var(--ink-3); }
body.theme-dark .login-feats span { background: var(--brand-lt); color: #9F7BFF; border-color: rgba(123, 63, 228, .35); }
body.theme-dark .login-foot { color: var(--ink-3); }

/* 链状态芯片（Web3 实时数据） */
body.theme-dark .chain-live { display: inline-flex; align-items: center; gap: 8px; }
body.theme-dark .chain-live .dot { width: 7px; height: 7px; border-radius: 50%; background: #10B981; box-shadow: 0 0 0 3px rgba(16, 185, 129, .2); animation: badgePulse 2.4s ease-in-out infinite; }
body.theme-dark .chain-live .blk { font-family: var(--font-mono); font-size: 11.5px; color: #A5AFC4; }
body.theme-dark .chain-stat-card { display: flex; flex-direction: column; gap: 6px; }
body.theme-dark .chain-stat-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; }
body.theme-dark .chain-stat-row span { color: var(--ink-3); }
body.theme-dark .chain-stat-row b { font-family: var(--font-mono); color: var(--ink); font-weight: 600; }

/* ================================================================
   Crypto 2026 升级：Matrix Green 点缀 + Bento Grid 便当盒布局
   ================================================================ */
body.theme-dark .stat.s-green .num { color: var(--matrix); text-shadow: 0 0 18px rgba(0, 255, 163, .35); }
body.theme-dark .chain-live .dot { background: var(--matrix); box-shadow: 0 0 0 3px rgba(0, 255, 163, .2); }

body.theme-dark .dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  grid-auto-flow: dense;
  gap: 14px;
  margin-bottom: 20px;
}
body.theme-dark .bento-lg {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(160deg, rgba(123, 63, 228, .26), rgba(59, 130, 246, .12) 55%, rgba(0, 212, 255, .1)),
    var(--card);
  border-color: rgba(123, 63, 228, .45) !important;
  box-shadow: 0 0 0 1px rgba(123, 63, 228, .15), 0 14px 44px rgba(123, 63, 228, .3);
}
body.theme-dark .bento-lg .label { font-size: 12.5px; letter-spacing: .5px; }
body.theme-dark .bento-lg .num { font-size: 42px; letter-spacing: -1.5px; line-height: 1.05; }
body.theme-dark .bento-lg::after {
  width: 230px; height: 230px;
  right: -70px; top: -70px;
  background: radial-gradient(circle, rgba(0, 212, 255, .3), transparent 70%);
  opacity: 1;
}
body.theme-dark .bento-lg .hint { margin-bottom: 2px; }
/* 仪表盘最新订单动态 */
body.theme-dark .tick-list { display: flex; flex-direction: column; }
body.theme-dark .tick-item {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 12.5px;
}
body.theme-dark .tick-item:last-child { border-bottom: none; }
body.theme-dark .tick-item .mono { flex: none; }
body.theme-dark .tick-item b.num { color: var(--matrix); font-variant-numeric: tabular-nums; }
body.theme-dark .tick-item > span:nth-last-child(2) { color: var(--ink-2); }
body.theme-dark .tick-item .badge { margin-left: auto; }
/* 仪表盘今日待办卡（浅色/深色通用） */
.bento-todo .todo-list { display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 1; }
.bento-todo .todo-list a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px; border-radius: 8px; background: rgba(22, 82, 240, .06);
  color: var(--ink-2); text-decoration: none; font-size: 12px; transition: .15s;
}
.bento-todo .todo-list a:hover { background: var(--warn-bg); color: var(--ink); }
.bento-todo .todo-list b {
  font-size: 15px; font-weight: 700; color: var(--err);
  font-variant-numeric: tabular-nums; min-width: 24px; text-align: right;
}

@media (max-width: 900px) {
  body.theme-dark .bento-lg { grid-column: span 2; grid-row: span 1; }
  body.theme-dark .bento-lg .num { font-size: 30px; }
}
