:root {
  /* ══════════════════════════════════════════════════════════════
     HoyiPAY 设计令牌
     来源：对 dashboard.tazapay.com 生产 CSS 的实测提取（Tailwind 4 @theme）
     色值不是"看着像"，是从 411KB CSS 里逐个读出来的

     ⚠ 命名保留语义层（--brand / --bg / --text），
       这样换主题只改这一块，不用动下面 2000 行规则。
     ══════════════════════════════════════════════════════════════ */

  /* ── 品牌主色：深青蓝阶梯（Tazapay primary 1000→600）── */
  --brand-1000: #051b23;
  --brand-900:  #0b3747;
  --brand-800:  #10526a;
  --brand-700:  #156b8a;
  --brand-600:  #1b89b1;   /* ← 主色（实心按钮底色用它，但**文字必须用白**，见 --on-brand）*/
  --brand:      #1b89b1;
  --brand-dark: #10526a;
  --brand-soft: #e9f6fb;   /* info-100，用于选中态底色 */

  /* ⚠ 主色上的文字色，不能直接用 #fff。
     实测：白字 on #1b89b1 = 3.99:1，达不到 WCAG AA 的 4.5:1。
     Tazapay 生产环境同样是 3.99:1（他们没修），但照搬缺陷不是"还原设计"。
     两条路：① 底色压深到 brand-700 #156b8a（白字 6.00:1）
             ② 文字不用纯白，用带蓝调的浅色也救不回来（3.99 → 最多 4.3）
     选 ①：实心按钮/主色块用 --brand-solid（= brand-700），文字 --on-brand 纯白。
     这样既保住青蓝识别，又真的可读。--brand 本身仍留在图表/描边等非文字场合。 */
  --brand-solid: #156b8a;
  --on-brand:    #ffffff;

  /* ── 辅色：青柠绿（Tazapay secondary）——最鲜明的识别特征 ── */
  --accent:      #bfed45;
  --accent-dark: #a8d633;
  --accent-ink:  #051b23;  /* 辅色上的文字用深墨色，不用白（对比度不够） */

  /* ── 中性阶梯（Tazapay neutral）── */
  --n-900: #0b1620;
  --n-800: #27303f;
  --n-700: #364152;
  --n-600: #475569;
  --n-500: #718096;
  --n-400: #97a6ba;
  --n-300: #cfd8e3;
  --n-200: #e2e8f0;
  --n-150: #f1f5f9;
  --n-120: #f4f5f7;
  --n-100: #f7fafc;
  --n-50:  #fbfdfe;

  /* ── 语义映射（下面的规则只用这些）── */
  --bg:            var(--n-120);
  --surface:       #ffffff;
  --surface-2:     var(--n-100);
  --line:          var(--n-200);
  --line-strong:   var(--n-300);
  --text:          var(--n-900);
  --text-2:        var(--n-600);
  /* ⚠ --muted 不能用 n-500 #718096：实测对比度
       白卡 #ffffff  → 4.02:1  ✗
       n-100 #f7fafc → 3.83:1  ✗
       n-150 #f1f5f9 → 3.67:1  ✗
     它被大量用于 stat-label / th / 副标题这类**小字**，全都读不清。
     改成 #5a6b82（n-500 与 n-600 之间的补偿色）：
       白卡 5.44:1 ✓ / n-100 5.19:1 ✓ / n-150 4.97:1 ✓ —— 三种底都过。
     视觉上仍是"灰蓝次要文字"，与 Tazapay 观感基本一致，只是深一档。 */
  --muted:         #5a6b82;

  /* 状态色（对齐 Tazapay success/danger/warn/info）
     ⚠ --info 原来用 #20a5d5：作为 25px 数字压在白卡上只有 2.84:1，
       连大文本的 3:1 都不到（实测运营台"对账差异 1"就是这种）。
       改成 #1780a3 → 4.51:1，大数字达标；同时仍是"比主色亮一点的信息蓝"。
       注意 --info-soft 是底色不是字色，保持浅色不动。 */
  --ok:            #057a55;
  --ok-soft:       #def7ec;
  --warn:          #b07207;
  --warn-soft:     #fef0d8;
  --danger:        #c81e1e;
  --danger-soft:   #fdf2f8;
  --info:          #1780a3;
  --info-soft:     #e9f6fb;
  --purple:        #6d28d9;
  --purple-soft:   #f5f0ff;

  /* ── 圆角：Tazapay 用 4/6/8/12，比原来 12px 更紧凑 ── */
  --radius:        8px;
  --radius-sm:     6px;
  --radius-xs:     4px;
  --radius-lg:     12px;

  /* ── 阴影：Tazapay 的阴影很轻，靠边框分层而非投影 ── */
  --shadow-sm: 0 1px 2px #e2e8f03d, 0 1px 3px #e2e8f080;
  --shadow-md: 0 2px 4px #e2e8f03d, 0 4px 6px #e2e8f080;
  --shadow-lg: 0 4px 8px #e2e8f03d, 0 8px 16px #e2e8f080;

  /* ── 字体：Inter（正文）+ Archivo（标题/数字）── */
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  --font-display: Archivo, Inter, -apple-system, "PingFang SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;

  /* ── 字号（Tazapay text 阶梯）── */
  --text-2xs: 10px;
  --text-xs:  12px;
  --text-sm:  13px;
  --text-base:14px;
  --text-lg:  16px;
  --text-xl:  18px;
  --text-2xl: 22px;

  /* ── 侧栏宽度单一源（避免多处硬编码不一致）── */
  --sidebar-w: 236px;
  --topbar-h: 58px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
  /* ★ 必须建立独立的层叠上下文，::before 的 z-index:-1 才能停在 body 背景之上、
     内容之下。少了这一行，底纹会沉到 body 背景后面 ⇒ 完全看不见。
     （这就是"写了但没生效"的经典形态：规则在、效果无，且没有任何报错。） */
  position: relative;
  isolation: isolate;
}

/* ══════════════════════════════════════════════════════════════════════════
   底纹：斜向渐变光带（2026-11-18）
   ──────────────────────────────────────────────────────────────────────────
   为什么这么做：
   ① 纯色 #f4f5f7 铺满整屏会显得"死"——一张 1440×900 的平色块没有任何纵深，
      所有卡片像贴在纸上。加极淡的斜向光带后，页面有了"从左上角来光"的方向感。
   ② 选"斜向光带"而不是网格/点阵，是因为本项目表格密集（收款单、对账、审计）。
      规则图案会和表格的网格线打架（两套网格叠在一起会显脏），
      而斜向渐变不带网格语义，永远不会和数据争夺结构感。
   ③ 强度按"极淡"落地：最亮处与 --bg 的对比度约 1.03:1，
      正常观看察觉不到"有图案"，只觉得白得通透。
      ⚠ 不要为了"看得见"而加深 —— 见下方 --tex-strength 的说明。

   实现要点（每条都对应一个踩过的坑）：
   · 用 position:fixed 而不是 background-attachment:fixed
     —— attachment:fixed 在部分浏览器里会触发整页重绘，长页面滚动掉帧。
   · z-index:-1 + body 建立层叠上下文
     —— 侧栏/顶栏的 z-index 都≥1，底纹必须沉到最底，否则会盖住卡片。
   · pointer-events:none
     —— 伪元素即使沉底也可能挡住点击（同 #261 那类"看不见但吃事件"）。
   · 只让内容区可见：靠 .sidebar / .topbar / .card 自身的不透明底色盖住，
     不额外做 clip-path —— 少一层计算，也不会在滚动时错位。

   ⚠ 令牌：光带色取自品牌青蓝（--brand-600 / --brand-800），
     不用新发明的颜色 —— 与 #639「令牌定义≠被消费」同一条纪律。
   ══════════════════════════════════════════════════════════════════════════ */
:root {
  /* 光带强度单一源：改这一个值就能整体调浓调淡 */
  --tex-strength: .045;   /* 极淡：主光带不透明度 */
  --tex-strength-2: .028; /* 次光带，更弱，避免两条一样重 */
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  /* 三条斜向光带：左上主光（青蓝）、右下补光（深青）、中间一道横向柔光 */
  background:
    /* ① 左上主光带：从左上角斜切下来，最宽最亮 */
    linear-gradient(135deg,
      rgba(27, 137, 177, var(--tex-strength)) 0%,
      rgba(27, 137, 177, calc(var(--tex-strength) * .45)) 18%,
      transparent 38%),
    /* ② 右下补光：让画面右下不至于空，方向与①相反形成对拉 */
    linear-gradient(315deg,
      rgba(16, 82, 106, var(--tex-strength-2)) 0%,
      transparent 34%),
    /* ③ 中部横向柔光：穿过内容区，避免"只有两个角有光"的机械感 */
    linear-gradient(90deg,
      transparent 0%,
      rgba(27, 137, 177, calc(var(--tex-strength) * .28)) 50%,
      transparent 100%);

  /* 光带只做静态，不加入动画 —— 后台界面里任何动效都可能被误认为"加载中" */
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -.01em;
}

.mono { font-family: var(--mono); font-size: .92em; }

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--line);
}

/* 侧栏改用新的圆形 H 图标。旧的 CSS 字母标仍保留，以免历史页面引用崩掉。 */
.brand-mark-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: block;
  flex: none;
  object-fit: contain;
  background: #fff;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-800) 100%);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.03em;
  box-shadow: 0 2px 6px rgba(27, 137, 177, .28);
  flex: none;
  position: relative;
  overflow: hidden;
}
/* 青柠绿角标：辅色在极小面积出现，正是 Tazapay 的做法 */
.brand-mark::after {
  content: "";
  position: absolute;
  right: -6px; bottom: -6px;
  width: 14px; height: 14px;
  background: var(--accent);
  transform: rotate(45deg);
}

.brand-text { line-height: 1.2; min-width: 0; }
.brand-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--brand-1000);
}
.brand-sub {
  font-size: var(--text-2xs);
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 500;
}

.nav {
  padding: 10px 8px;
  overflow-y: auto;
  flex: 1;
}

.nav-group-label {
  font-size: var(--text-2xs);
  font-weight: 600;
  color: var(--n-400);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 14px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 450;
  margin-bottom: 1px;
  transition: background .13s, color .13s;
  cursor: pointer;
}

.nav-item:hover { background: var(--n-150); color: var(--text); }

.nav-item.active {
  background: var(--brand-soft);
  color: var(--brand-700);
  font-weight: 600;
}

.nav-item svg { width: 16px; height: 16px; flex: none; opacity: .78; }
.nav-item.active svg { opacity: 1; color: var(--brand-600); }

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: var(--text-2xs);
  font-weight: 650;
  padding: 1px 5.5px;
  border-radius: 999px;
  min-width: 17px;
  text-align: center;
}

.nav-badge.neutral { background: var(--line-strong); color: var(--text-2); }

/* ══════════ 二级菜单（线上 Payouts→Beneficiary / Hoyimatch→3 / Settings→13）══════════
 * ★ 一级项用 <button> 而不是 <a>：它只负责展开，不导航。
 *   写成 <a href> 会多出一个「点了跳哪」的问题，而线上根本没有聚合页。
 * ★ 折叠态用 [hidden] 属性而不是 display:none 类：
 *   hidden 是语义化的，且能被子树的 aria-expanded 同步；⛔ 别用 opacity/height 动画藏，
 *   那样「看不见但还能 Tab 到」——键盘用户可以聚焦到不可见的链接上。 */
.nav-parent { position: relative; }

.nav-toggle-item {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: inherit;
  text-align: left;
}

.nav-caret {
  margin-left: auto;
  display: inline-flex;
  transition: transform .16s ease;
  opacity: .5;
}
.nav-caret svg { width: 13px; height: 13px; }
.nav-parent.open > .nav-toggle-item .nav-caret { transform: rotate(90deg); opacity: .8; }

/* 子菜单缩进：与父项图标同宽，视觉上对齐文字而不是图标 */
.nav-sub {
  margin: 2px 0 4px;
  padding-left: 26px;
  border-left: 1px solid var(--line);
  margin-left: 17px;
}

.nav-sub-item {
  padding: 6px 10px;
  font-size: calc(var(--text-sm) - 1px);
  color: var(--n-500, var(--text-2));
}
.nav-sub-item:hover { background: var(--n-150); color: var(--text); }
.nav-sub-item.active {
  background: var(--brand-soft);
  color: var(--brand-700);
  font-weight: 600;
}

/* 父项在子项被选中时也高亮（否则用户看不出自己在哪个组里） */
.nav-parent.has-active > .nav-toggle-item {
  color: var(--brand-700);
  font-weight: 600;
}
.nav-parent.has-active > .nav-toggle-item svg { opacity: 1; color: var(--brand-600); }

@media (prefers-reduced-motion: reduce) {
  .nav-caret { transition: none; }
}

.sidebar-foot {
  border-top: 1px solid var(--line);
  padding: 12px 14px;
  font-size: var(--text-xs);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot-live {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(5, 122, 85, .12);
  flex: none;
}

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar h1 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 640;
  margin: 0;
  letter-spacing: -.015em;
  color: var(--brand-1000);
}

.crumb { font-size: var(--text-xs); color: var(--muted); }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text-2);
  transition: background .13s;
}
.icon-btn:hover { background: var(--n-150); border-color: var(--line); }
.icon-btn svg { width: 17px; height: 17px; }

.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #334155, #64748B);
  color: #fff; font-size: var(--text-xs); font-weight: 600;
  display: grid; place-items: center;
}

.content { padding: 24px 26px 60px; max-width: 1400px; width: 100%; }

.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.page-head h2 { font-size: 21px; font-weight: 660; margin: 0 0 4px; letter-spacing: -.02em; }
.page-head p { margin: 0; color: var(--text-2); font-size: 13.5px; max-width: 720px; }
.page-head-actions { margin-left: auto; display: flex; gap: 8px; flex: none; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-pad { padding: 18px 20px; }

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: var(--text-base); font-weight: 620; margin: 0; letter-spacing: -.01em; }
.card-head .sub { font-size: var(--text-xs); color: var(--muted); }
.card-head-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.g-1-2 { grid-template-columns: 1fr 2fr; }

@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-2-1, .g-1-2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  /* 侧栏不删掉，改成可滑出的抽屉 —— 原来直接 display:none 且没有替代入口，
     窄屏下用户被钉在当前页，无法换页（能打开、点不动）。 */
  .sidebar {
    display: flex;
    position: fixed;
    left: 0; top: 0;
    width: 244px;
    height: 100vh;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform .22s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 0 0 rgba(15,23,42,0);
    background: var(--surface);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 12px 0 32px rgba(15,23,42,.18);
  }
  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.42);
    z-index: 55;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
  }
  .nav-scrim.on { opacity: 1; pointer-events: auto; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
}

/* 桌面端：菜单按钮与遮罩都不出现 */
.nav-toggle { display: none; }
.nav-scrim { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
}

.stat { padding: 16px 18px; }
.stat-label { font-size: var(--text-xs); color: var(--muted); font-weight: 500; margin-bottom: 7px; display: flex; align-items: center; gap: 6px; }
/* ★ 大数字是 Tazapay 最强的识别特征之一：Archivo 的几何感字面 + 收紧字距。
   ⚠ 这里原来是漏的：--font-display 只用在 .brand-name 和 .topbar h1，
     统计卡数字实测走的是 body 的 Inter（我用 getComputedStyle 读出来的：
     family=Inter, size=25px, weight=640）—— 令牌定义了却没被消费，
     等于"色卡买回来了但墙还是白的"。照 brand-check 的规矩，令牌必须真的生效。 */
.stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;  /* 数字等宽，多行数字列才对得齐 */
}
.stat-value .unit { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--muted); font-weight: 500; margin-left: 3px; letter-spacing: 0; }
.stat-foot { margin-top: 8px; font-size: var(--text-xs); color: var(--text-2); display: flex; align-items: center; gap: 6px; }

.delta { font-weight: 600; font-size: var(--text-xs); display: inline-flex; align-items: center; gap: 3px; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--danger); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 550;
  font-family: inherit;
  cursor: pointer;
  transition: background .13s, border-color .13s, box-shadow .13s, opacity .13s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { background: var(--surface-2); border-color: var(--muted); }
.btn:active { transform: translateY(.5px); }
.btn svg { width: 15px; height: 15px; }

/* ⚠ 实心主色按钮：底色用 --brand-solid（#156b8a）而不是 --brand（#1b89b1）。
   原因：白字 on #1b89b1 只有 3.99:1，不达 AA；on #156b8a 是 6.00:1。
   --brand 仍用于描边、图表、进度条等"不是文字底"的场合。
   box-shadow 里的 rgba 也改成青蓝调（原来是旧蓝 35,84,230 的残留）。 */
.btn-primary {
  background: var(--brand-solid);
  border-color: var(--brand-solid);
  color: var(--on-brand);
  box-shadow: 0 1px 2px rgba(16, 82, 106, .24);
}
.btn-primary:hover { background: var(--brand-800); border-color: var(--brand-800); }

.btn-danger { color: var(--danger); border-color: #F3C6D0; background: #fff; }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }

.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line); }

/* ⚠ .btn-sm 原来 28px，低于触摸目标下限。
   实测 client 页 5 个、admin 页 2 个按钮因此过小（"去处理""查看全部""充值"等）。
   提到 32px：仍是"小按钮"的视觉层级（主按钮 36、大按钮 40），但可点性达标。
   行高/padding 同步微调，保持文字垂直居中。 */
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: var(--radius-sm); }
.btn-sm svg { width: 13px; height: 13px; }
.btn-lg { height: 40px; padding: 0 20px; font-size: var(--text-base); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { background: var(--surface); border-color: var(--line-strong); }
.btn-primary:disabled:hover { background: var(--brand-solid); border-color: var(--brand-solid); }

.btn-block { width: 100%; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  line-height: 1.5;
  white-space: nowrap;
}
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }

.b-ok { background: var(--ok-soft); color: var(--ok); }
.b-warn { background: var(--warn-soft); color: var(--warn); }
.b-danger { background: var(--danger-soft); color: var(--danger); }
.b-info { background: var(--info-soft); color: var(--info); }
.b-neutral { background: var(--n-150); color: var(--text-2); }
.b-brand { background: var(--brand-soft); color: var(--brand); }
.b-purple { background: var(--purple-soft); color: var(--purple); }

table.tbl { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
table.tbl th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
table.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tbody tr { transition: background .1s; }
table.tbl tbody tr:hover { background: #FCFDFF; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl td.right, table.tbl th.right { text-align: right; }
table.tbl tr.clickable { cursor: pointer; }
.tbl-wrap { overflow-x: auto; }

.cell-strong { font-weight: 600; }
.cell-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; font-weight: 560; margin-bottom: 6px; color: var(--text-2); }
.field label .req { color: var(--danger); margin-left: 2px; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }

input[type=text], input[type=number], input[type=email], input[type=password], select, textarea {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color .13s, box-shadow .13s;
}
textarea { height: auto; padding: 9px 11px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(27, 137, 177, .14);
}
input::placeholder { color: #7b8698; }   /* 原 #A9B2C1 在白底仅 2.2:1，占位符也要能读 */
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237A8699' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.amount-input { position: relative; display: flex; align-items: stretch; }
.amount-input input { height: 46px; font-size: 20px; font-weight: 620; padding-right: 64px; letter-spacing: -.02em; flex: 1; min-width: 0; }
.amount-input .cur-tag:not(select) {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  font-size: 12.5px; font-weight: 650; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 2px 7px; border-radius: var(--radius-sm);
  pointer-events: none;
}

.seg {
  display: inline-flex;
  background: var(--n-150);
  border-radius: var(--radius);
  padding: 2px;
  gap: 2px;
}
.seg button {
  border: none;
  background: transparent;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
  transition: background .13s, color .13s;
}
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.alert {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  line-height: 1.55;
  border: 1px solid;
}
.alert svg { width: 16px; height: 16px; flex: none; margin-top: 1.5px; }
.alert-title { font-weight: 620; margin-bottom: 2px; }
.a-warn { background: var(--warn-soft); border-color: #F6DFB8; color: #7C4A03; }
.a-danger { background: var(--danger-soft); border-color: #F5C7D1; color: #8C0E2C; }
.a-info { background: var(--info-soft); border-color: #C9E4F7; color: #075985; }
.a-ok { background: var(--ok-soft); border-color: #BFE9D5; color: #045C43; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 18px; font-size: var(--text-sm); }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; text-align: right; font-weight: 550; }

.divider { height: 1px; background: var(--line); margin: 14px 0; }

.muted { color: var(--muted); }
.small { font-size: var(--text-xs); }
.tiny { font-size: 11.5px; }
.strong { font-weight: 620; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.ml-auto { margin-left: auto; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab {
  padding: 9px 14px;
  font-size: var(--text-sm);
  font-weight: 550;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color .13s, border-color .13s;
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.on { color: var(--brand); border-bottom-color: var(--brand); }

.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 1.5px;
  background: var(--line);
}
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: '';
  position: absolute;
  left: -22px; top: 5px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line-strong);
}
.tl-item.done::before { background: var(--ok); border-color: var(--ok); }
.tl-item.now::before { background: var(--brand-solid); border-color: var(--brand-solid); box-shadow: 0 0 0 3px rgba(16, 82, 106, .16); }
.tl-item.err::before { background: var(--danger); border-color: var(--danger); }
.tl-title { font-size: var(--text-sm); font-weight: 580; }
.tl-time { font-size: 11.5px; color: var(--muted); }

.steps { display: flex; align-items: center; gap: 0; margin-bottom: 26px; }
.step { display: flex; align-items: center; gap: 9px; }
.step-num {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: var(--text-xs); font-weight: 650;
  background: var(--n-150); color: var(--muted);
  flex: none;
  transition: all .15s;
}
.step.active .step-num { background: var(--brand-solid); color: var(--on-brand); box-shadow: 0 0 0 3px rgba(16, 82, 106, .14); }
.step.done .step-num { background: var(--ok); color: #fff; }
.step-label { font-size: var(--text-sm); font-weight: 550; color: var(--muted); }
.step.active .step-label { color: var(--text); font-weight: 620; }
.step.done .step-label { color: var(--text-2); }
.step-line { flex: 1; height: 1.5px; background: var(--line); margin: 0 14px; min-width: 24px; }
.step-line.done { background: var(--ok); }

.radio-card {
  display: flex;
  gap: 11px;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .13s, background .13s;
  margin-bottom: 9px;
  align-items: flex-start;
}
.radio-card:hover { border-color: var(--line-strong); background: var(--surface-2); }
.radio-card.on { border-color: var(--brand); background: var(--brand-soft); }
.radio-card .rc-title { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.radio-card .rc-sub { font-size: var(--text-xs); color: var(--text-2); margin-top: 2px; }
.rc-radio {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  flex: none; margin-top: 2px;
  display: grid; place-items: center;
}
.radio-card.on .rc-radio { border-color: var(--brand); border-width: 5px; }

.empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  font-size: var(--text-sm);
}
.empty svg { width: 34px; height: 34px; margin-bottom: 10px; opacity: .4; }

.filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--radius) var(--radius) 0 0;
}
.filter-bar input, .filter-bar select { height: 32px; font-size: var(--text-sm); width: auto; }
.filter-bar input[type=text] { min-width: 200px; }

.progress { height: 5px; background: var(--n-150); border-radius: var(--radius-xs); overflow: hidden; }
.progress > div { height: 100%; background: var(--brand); border-radius: var(--radius-xs); transition: width .4s; }
.progress.ok > div { background: var(--ok); }
.progress.warn > div { background: #E8A33D; }

.page-fade { animation: fadeUp .22s ease-out; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.drawer-mask {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .34);
  z-index: 90;
  display: none;
}
.drawer-mask.on { display: block; animation: fadeIn .16s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 520px; max-width: 94vw;
  background: var(--surface);
  z-index: 91;
  box-shadow: -8px 0 32px rgba(15, 23, 42, .14);
  display: none;
  flex-direction: column;
}
.drawer.on { display: flex; animation: slideIn .22s cubic-bezier(.22, .61, .36, 1); }
@keyframes slideIn { from { transform: translateX(24px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }
.drawer-head {
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.drawer-head h3 { margin: 0; font-size: 15px; font-weight: 620; }
.drawer-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; }

.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #0F172A; color: #fff;
  padding: 10px 18px; border-radius: var(--radius);
  font-size: var(--text-sm); font-weight: 500;
  box-shadow: 0 6px 24px rgba(15, 23, 42, .28);
  animation: toastIn .2s ease-out;
  display: flex; align-items: center; gap: 8px;
}
.toast svg { width: 15px; height: 15px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.avatar-sq {
  width: 34px; height: 34px; border-radius: var(--radius);
  display: grid; place-items: center;
  font-size: var(--text-sm); font-weight: 650;
  background: var(--brand-soft); color: var(--brand);
  flex: none;
}

.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line);
  transition: background .13s;
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--surface-2); }

.tag-info {
  font-size: 11px; font-weight: 600;
  padding: 1px 6px; border-radius: var(--radius-xs);
  background: var(--n-150); color: var(--text-2);
  font-family: var(--mono);
}

.hl-row { background: #FFFBEB; }

/* ── Merchant user menu (topbar avatar) ── */
.user-chip {
  position: relative;
  display: flex; align-items: center;
}
.user-menu-btn {
  display: flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid transparent;
  border-radius: 999px; padding: 2px 8px 2px 2px;
  cursor: pointer; color: inherit; font: inherit;
}
.user-menu-btn:hover, .user-menu-btn[aria-expanded="true"] {
  background: var(--n-150); border-color: var(--line);
}
.user-menu-btn .avatar { flex: none; }
.user-menu-meta { text-align: left; min-width: 0; max-width: 160px; }
.user-menu-name { font-size: 12.5px; font-weight: 620; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu-email { font-size: 11px; color: var(--muted); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: min(320px, calc(100vw - 24px));
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 40px rgba(15,23,42,.14);
  z-index: 80; padding: 8px; display: none;
}
.user-menu.on { display: block; }
.user-menu-head {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 10px 12px; border-bottom: 1px solid var(--line);
}
.user-menu-head .avatar { width: 40px; height: 40px; font-size: 16px; }
.user-menu-k { font-size: 11px; color: var(--muted); margin: 10px 10px 4px; font-weight: 620; letter-spacing: .04em; text-transform: uppercase; }
.user-menu a, .user-menu button.user-menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border: 0; background: none; border-radius: 8px;
  text-align: left; font: inherit; color: inherit; cursor: pointer; text-decoration: none;
}
.user-menu a:hover, .user-menu button.user-menu-item:hover { background: var(--n-150); }
.user-menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.icon-btn { position: relative; }
.icon-btn .badge-dot-n {
  position: absolute; top: 5px; right: 5px; width: 8px; height: 8px;
  background: var(--danger); border-radius: 50%; border: 2px solid var(--surface);
}

/* ── Overview FX + address bars ── */
.ov-bar { margin-bottom: 16px; }
.ov-bar .fx-rates {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px;
}
.fx-rate {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--n-50, var(--surface));
}
.fx-rate .pair { font-size: 11px; color: var(--muted); }
.fx-rate .mid { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.fx-rate .quote { font-size: 11px; color: var(--text-2); }
.fx-rate.expired { opacity: .6; }
.addr-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.addr-row .field { flex: 1; min-width: 180px; margin: 0; }
.addr-result { margin-top: 10px; }

/* ── Side panels (notify / help) ── */
.panel-mask { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.28); z-index: 90; }
.panel-mask.on { display: block; }
.side-panel {
  display: none; position: fixed; top: 0; right: 0; bottom: 0;
  width: min(400px, 100vw); background: var(--surface);
  border-left: 1px solid var(--line); z-index: 91;
  flex-direction: column; box-shadow: -8px 0 32px rgba(15,23,42,.12);
}
.side-panel.on { display: flex; }

@media (max-width: 640px) {
  .user-menu-meta { display: none; }
  .user-menu-btn { padding: 0; border-radius: 50%; }
  .page-head-actions { flex-wrap: wrap; }
  .addr-row { flex-direction: column; align-items: stretch; }
}

/* ── 支付链接金额栏：币种下拉作为后缀，避免与全局 select 箭头叠影 ── */
.amount-input { display: flex; align-items: stretch; position: relative; }
.amount-input input { flex: 1; min-width: 0; }
.amount-input .cur-tag:not(select) {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  font-size: 12.5px; font-weight: 650; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 2px 7px; border-radius: var(--radius-sm);
  pointer-events: none;
}
.amount-input select.cur-tag,
.amount-input .cur-select {
  position: static;
  top: auto; right: auto;
  transform: none;
  pointer-events: auto;
  z-index: 2;
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--surface-2);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237A8699' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0 28px 0 10px;
  height: 46px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text);
  flex: none;
  min-width: 96px;
  box-shadow: none;
}
.amount-input:has(select.cur-tag) input,
.amount-input:has(.cur-select) input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  padding-right: 12px;
}

/* ── 小 HO 活体头像与面板 ── */
.ho-root { position: fixed; right: 20px; bottom: 20px; z-index: 70; pointer-events: none; }
.ho-fab, .ho-panel { pointer-events: auto; }
.ho-fab {
  width: 48px; height: 48px; padding: 0;
  border: 0; border-radius: 50%;
  background: transparent;
  box-shadow: 0 6px 18px rgba(16, 82, 106, .28);
  cursor: pointer;
  position: relative;
  display: block;
}
.ho-fab-label {
  position: absolute; left: 50%; bottom: -16px;
  transform: translateX(-50%);
  font-size: 10px; font-weight: 700; letter-spacing: .02em;
  color: var(--brand-800); white-space: nowrap;
  text-shadow: 0 1px 0 #fff;
}
.ho-face {
  display: block; width: 48px; height: 48px;
  border-radius: 50%; overflow: hidden;
  background: #7ec8e8;
  perspective: 120px;
}
.ho-panel-head .ho-face { width: 36px; height: 36px; flex: none; }
.ho-panel-head .ho-mark { width: 36px; height: 36px; }
.ho-face-turn {
  display: block; width: 100%; height: 100%;
  position: relative;
  transform-origin: 50% 50%;
  animation: ho-yaw 6.5s ease-in-out infinite;
}
.ho-mark { display: block; width: 48px; height: 48px; border-radius: 50%; }
.ho-eyes {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
}
.ho-eye { transform-box: fill-box; transform-origin: center; animation: ho-blink 5.2s ease-in-out infinite; }
.ho-eye-r { animation-delay: .08s; }
.ho-white { fill: #fff; }
.ho-iris { fill: #0b3747; }
.ho-pupil { fill: #051b23; }
.ho-fab.is-open .ho-face-turn,
.ho-panel:not(.is-thinking) .ho-face-turn { animation-duration: 7.5s; }
.ho-fab.is-thinking .ho-face-turn,
.ho-panel.is-thinking .ho-face-turn {
  animation: ho-think 1.6s ease-in-out infinite;
}
@keyframes ho-yaw {
  0%   { transform: rotateY(-16deg) rotateZ(-2.5deg); }
  50%  { transform: rotateY(16deg) rotateZ(2.5deg); }
  100% { transform: rotateY(-16deg) rotateZ(-2.5deg); }
}
@keyframes ho-think {
  0%   { transform: rotateY(-22deg) rotateZ(-4deg) scale(1.03); }
  50%  { transform: rotateY(22deg) rotateZ(4deg) scale(1.05); }
  100% { transform: rotateY(-22deg) rotateZ(-4deg) scale(1.03); }
}
@keyframes ho-blink {
  0%, 8%, 12%, 100% { transform: scaleY(1); }
  10% { transform: scaleY(0.08); }
  72%, 76% { transform: scaleY(1); }
  74% { transform: scaleY(0.08); }
}
@media (prefers-reduced-motion: reduce) {
  .ho-face-turn, .ho-eye, .ho-fab.is-thinking .ho-face-turn, .ho-panel.is-thinking .ho-face-turn {
    animation: none !important;
  }
}

.ho-panel {
  display: none;
  position: absolute; right: 0; bottom: 72px;
  width: 360px; max-width: calc(100vw - 24px);
  height: min(520px, calc(100vh - 110px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
  flex-direction: column;
  overflow: hidden;
}
.ho-panel.on { display: flex; }
.ho-panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.ho-panel-titles { flex: 1; min-width: 0; }
.ho-panel-name { font-size: 14px; font-weight: 700; }
.ho-panel-sub { font-size: 11.5px; color: var(--muted); }
.ho-panel-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ho-panel-foot {
  display: flex; gap: 8px; padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.ho-panel-foot input { flex: 1; min-width: 0; }
.ho-msg { display: flex; }
.ho-msg-user { justify-content: flex-end; }
.ho-bubble {
  max-width: 92%;
  padding: 8px 11px;
  border-radius: 12px;
  font-size: 13px; line-height: 1.6;
  background: var(--n-150); color: var(--text);
}
.ho-msg-user .ho-bubble { background: var(--brand-soft); }
.ho-tips { display: flex; flex-direction: column; gap: 6px; }
.ho-tip, .ho-link {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; background: var(--surface);
}
.ho-tip b { display: block; font-size: 12.5px; margin-bottom: 2px; color: var(--brand-800); }
.ho-tip span { font-size: 12px; color: var(--text-2); line-height: 1.5; }
.ho-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ho-link { font-size: 12px; color: var(--brand-700); font-weight: 620; padding: 4px 8px; }

@media (max-width: 640px) {
  .ho-root { right: 0; left: 0; bottom: 0; }
  .ho-fab { position: absolute; right: 16px; bottom: 16px; }
  .ho-panel {
    position: fixed; left: 0; right: 0; bottom: 0;
    width: 100%; max-width: 100%;
    height: min(86vh, 620px);
    border-radius: 16px 16px 0 0;
  }
}


/* 裸 <svg viewBox> 在 Chromium 里会落到置换元素默认尺寸（约 300×300），
   工作台「敞口趋势数据不足」的 info 图标曾因此撑满整张卡片。
   :where() 特异度为 0，不覆盖 .nav-item / .btn / .alert / .empty / .ho-* 的既有尺寸。 */
:where(.page-fade, .card, .drawer, .side-panel, .hint, .tiny, .small, .content, .ov-row, .sidebar-foot, .page-head) svg {
  width: 16px;
  height: 16px;
  flex: none;
  vertical-align: -2px;
}

@media (max-width: 900px) {
  .filter-bar input[type=text] { min-width: 0; flex: 1 1 160px; width: 100%; }
  .seg { flex-wrap: wrap; max-width: 100%; }
}

/* ── 商户引导嚮导壳（20261120-ocr）── */
.hp-wizard { max-width: 100%; overflow-x: hidden; }
.hp-wizard-steps {
  display: flex; align-items: flex-start; gap: 0; margin-bottom: 20px;
  flex-wrap: wrap; max-width: 100%;
}
.hp-wizard-step { display: flex; align-items: center; min-width: 0; }
.hp-wizard-line { width: 24px; height: 1.5px; background: var(--line); margin: 0 8px; flex: none; }
.hp-wizard-line.is-done { background: var(--ok); }
.hp-wizard-dot, button.hp-wizard-dot {
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex: none;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.hp-wizard-step.is-current .hp-wizard-dot {
  background: var(--brand-solid); color: var(--on-brand); border-color: transparent;
  box-shadow: 0 0 0 3px rgba(16, 82, 106, .14);
}
.hp-wizard-step.is-done .hp-wizard-dot { background: var(--ok); color: #fff; border-color: transparent; }
button.hp-wizard-dot { cursor: pointer; }
.hp-wizard-step-label {
  margin-left: 8px; font-size: 12px; color: var(--muted); white-space: nowrap;
  max-width: 9em; overflow: hidden; text-overflow: ellipsis;
}
.hp-wizard-step.is-current .hp-wizard-step-label { color: var(--text); font-weight: 600; }
.hp-wizard-actions {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 18px; max-width: 100%;
}
.hp-wizard-actions-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hp-wizard-next-why { font-size: 12px; color: var(--danger); max-width: 280px; line-height: 1.4; }
.hp-wizard-ho { margin: 8px 0 0; }
.hp-wizard-block { margin-bottom: 14px; }
.hp-checklist { display: grid; gap: 8px; }
.hp-checklist-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface);
}
.hp-checklist-item.is-done { opacity: .85; }
.hp-checklist-mark {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; background: var(--surface-2); color: var(--muted);
}
.hp-checklist-item.is-done .hp-checklist-mark { background: var(--ok); color: #fff; }
.hp-fx-countdown { font-variant-numeric: tabular-nums; font-weight: 650; }
@media (max-width: 900px) {
  .hp-wizard, .hp-wizard-actions, .hp-wizard-success, .hp-checklist { overflow-x: hidden; }
  .hp-wizard-step-label { max-width: 6.5em; }
  .hp-wizard-line { width: 16px; margin: 0 6px; }
}
@media (max-width: 640px) {
  .hp-wizard-steps { gap: 6px 0; }
  .hp-wizard-step { flex: 1 1 40%; }
  .hp-wizard-line { display: none; }
  .hp-wizard-actions-right { margin-left: 0; width: 100%; }
  .hp-wizard-next-why { max-width: 100%; }
}

/* ── KYB OCR 预填（20261120-ocr）── */
.kyb-ocr-panel {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2, var(--surface));
}
.kyb-ocr-panel .kyb-ocr-title { font-weight: 600; margin-bottom: 6px; }
.kyb-ocr-conf { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 999px; margin-left: 6px; background: var(--surface); }
.kyb-ocr-conf.is-high { background: color-mix(in srgb, var(--ok) 18%, transparent); }
.kyb-ocr-conf.is-medium { background: color-mix(in srgb, var(--warn) 18%, transparent); }
.kyb-ocr-conf.is-low { background: var(--surface-2); }
.kyb-ocr-suggest { margin-top: 6px; font-size: 12px; line-height: 1.5; }
.kyb-ocr-preview { margin-top: 8px; max-height: 8em; overflow: auto; font-size: 12px; white-space: pre-wrap; word-break: break-word; color: var(--muted); }
