/* ════════════════════════════════════════════════════════
   CFJ-LINK 对客端 — 组件样式（A-3 + A-4 + A-5）
   ════════════════════════════════════════════════════════ */

/* ── 欢迎卡 / 占位卡 / 空状态 ── */
.welcome-card {
  margin: var(--sp-md);
  padding: var(--sp-lg);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #FFF;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.welcome-card::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 24px 24px;
}
.welcome-title { font-family: var(--font-heading); font-size: 22px; font-weight: 800; margin-bottom: 6px; position: relative; }
.welcome-sub   { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; opacity: .85; position: relative; }

.placeholder-card { margin: 0 var(--sp-md) var(--sp-md); padding: var(--sp-lg); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.placeholder-card h3 { font-family: var(--font-heading); font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.placeholder-sub { font-size: 13px; color: var(--muted); line-height: 1.6; }
.placeholder-sub code { font-family: var(--font-mono); background: var(--pill); color: var(--pill-text); padding: 2px 6px; border-radius: 4px; font-size: 11.5px; }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; gap: 12px; color: var(--muted); text-align: center; }

/* ── 个人资料卡 ── */
.profile-card { margin: var(--sp-lg) var(--pad-page) var(--sp-md); padding: var(--sp-lg); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-xs); }
.profile-avatar { width: 56px; height: 56px; border-radius: var(--radius); background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%); color: var(--accent-ink); font-family: var(--font-heading); font-size: 22px; font-weight: var(--fw-black); display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: var(--shadow-accent); }
.profile-info { flex: 1; min-width: 0; }
.profile-name { font-size: var(--fs-lg); font-weight: var(--fw-bold); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-email { font-size: var(--fs-xs); color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-tag {
  display: inline-flex;
  margin-top: 8px;
  align-items: center;
  background: var(--pill); color: var(--pill-text);
  font-size: 9.5px; font-weight: var(--fw-black);
  padding: 3px 10px; border-radius: var(--radius-pill); letter-spacing: .08em;
}
/* 会员号 pill：可点复制 + 等宽数字易读 */
.profile-uid { cursor: pointer; font-variant-numeric: tabular-nums; letter-spacing: .12em; }
.profile-uid:active { opacity: .7; }

/* ── 头像（圆形，可换图） ──
   .avatar-host 是定位上下文 + 圆形裁剪框；有图 → .avatar-img 铺满，
   无图 → 保留原首字母色块兜底（继承 .profile-avatar/.acc-avatar 的渐变背景）。 */
.avatar-host { position: relative; overflow: visible; border-radius: 50%; }
.profile-avatar.avatar-host, .acc-avatar.avatar-host { border-radius: 50%; }
.avatar-host.editable { cursor: pointer; }
.avatar-host .avatar-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%; display: block;
  background: var(--bg-2);
}
.avatar-host .avatar-initial { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
/* 有图时隐去渐变背景，避免透明 PNG 边缘漏色 */
.avatar-host:has(.avatar-img) { background: var(--surface); box-shadow: var(--shadow-xs); }
/* 相机角标（仅可编辑时） */
.avatar-host .avatar-cam {
  position: absolute; right: -2px; bottom: -2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface);
  box-shadow: var(--shadow-xs);
}
.avatar-host .avatar-cam::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 9px; height: 7px; border-radius: 2px;
  border: 1.6px solid var(--accent-ink);
  top: 1px;
}
.avatar-host .avatar-cam::before {
  content: ''; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -10%);
  width: 3.2px; height: 3.2px; border-radius: 50%;
  border: 1.4px solid var(--accent-ink); z-index: 1;
}
.avatar-host.editable:active { transform: scale(.96); transition: transform .12s; }
.avatar-host:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* 账号管理页头像行 */
.acc-avatar-row { display: flex; align-items: center; gap: 14px; margin: var(--sp-md) var(--pad-page) 4px; }
.acc-avatar {
  width: 64px; height: 64px; flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: var(--accent-ink); font-family: var(--font-heading);
  font-size: 24px; font-weight: var(--fw-black);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-accent);
}
.acc-avatar-link {
  background: transparent; border: none; padding: 0;
  color: var(--accent); font-size: 15px; font-weight: var(--fw-bold);
  cursor: pointer;
}
.acc-avatar-link:active { opacity: .6; }

/* 头像操作 sheet（更换 / 删除 / 取消） */
.avatar-sheet { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 8px; }
.avatar-opt {
  width: 100%; padding: 15px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); font-size: 16px; font-weight: var(--fw-bold);
  font-family: inherit; cursor: pointer; text-align: center;
  transition: background var(--transition-fast);
}
.avatar-opt:active { background: var(--bg-2); }
.avatar-opt.danger { color: var(--danger); }
.avatar-opt.cancel { background: transparent; border-color: transparent; color: var(--muted); margin-top: 2px; }

/* ── 危险按钮（独立） ── */
.btn-danger { display: block; width: calc(100% - 32px); margin: var(--sp-lg) var(--sp-md); padding: 13px; background: transparent; border: 1.5px solid var(--danger); color: var(--danger); font-family: var(--font-heading); font-weight: 700; font-size: 14px; border-radius: var(--radius-pill); transition: all var(--transition-fast); }
.btn-danger:hover { background: var(--danger); color: #FFF; }
.btn-danger:disabled { opacity: .5; cursor: not-allowed; }
/* 危险区分组标签 + 删除账号说明文案（sheet 内） */
.section-label.danger-label { color: var(--danger); }
.del-warn { font-size: 13px; line-height: 1.55; color: var(--text); background: var(--danger-bg); border: 1px solid rgba(239,68,68,.22); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }

/* ════════════════════════════════════════════════════════
   商城 Hero（A 视觉重塑）
   ════════════════════════════════════════════════════════ */
.mall-hero {
  padding: var(--sp-lg) var(--pad-page) var(--sp-md);
}
.mall-hero-title {
  font-family: var(--font-heading);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-black);
  letter-spacing: -.02em;
  line-height: var(--lh-tight);
  color: var(--text);
}
.mall-hero-sub {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-top: 6px;
  line-height: var(--lh-snug);
}

/* ════════════════════════════════════════════════════════
   筛选 bar（A-4 / A-5 通用）
   ════════════════════════════════════════════════════════ */
.mall-filter-bar {
  display: flex; gap: 6px;
  padding: 4px var(--pad-page) 12px;
  background: var(--bg);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  position: sticky; top: 0; z-index: 10;
}
.mall-filter-bar::-webkit-scrollbar { display: none; }
.filter-tab {
  font-family: var(--font-body); font-size: var(--fs-sm); font-weight: var(--fw-semi);
  padding: 8px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); color: var(--text-2);
  white-space: nowrap; flex-shrink: 0; background: var(--surface);
  transition: all var(--transition-fast); min-height: 36px;
}
.filter-tab:hover { color: var(--text); border-color: var(--border-strong); }
.filter-tab.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-accent); }

.mall-list, .sim-list, .order-list { padding: 4px 0 8px; }
.mall-loading { display: flex; justify-content: center; align-items: center; padding: 48px 24px; }
.spinner { width: 28px; height: 28px; border: 2.5px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════════
   A-4 商城卡
   ════════════════════════════════════════════════════════ */
.country-card {
  display: flex; align-items: center; gap: 14px;
  margin: 0 var(--pad-page) 10px; padding: 14px var(--sp-md);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  position: relative; box-shadow: var(--shadow-xs);
}
.country-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.country-card:active { transform: scale(.99); }
.country-flag { width: 46px; height: 46px; border-radius: var(--radius-sm); background: var(--bg-2); display: flex; align-items: center; justify-content: center; font-size: 27px; flex-shrink: 0; }
.country-info { flex: 1; min-width: 0; }
.country-name { font-size: var(--fs-md); font-weight: var(--fw-bold); color: var(--text); margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country-meta { font-size: var(--fs-xs); color: var(--muted); display: flex; align-items: center; gap: 6px; }
.country-meta strong { color: var(--text); font-weight: var(--fw-bold); font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.country-sep { opacity: .4; }
.country-hot-badge {
  font-family: var(--font-body); font-size: 9px; font-weight: var(--fw-black); letter-spacing: .1em;
  padding: 3px 8px; border-radius: var(--radius-pill);
  background: var(--warn-bg); color: var(--warn); flex-shrink: 0;
}
.country-arrow { display: inline-flex; color: var(--muted); flex-shrink: 0; }
.country-arrow svg { width: 18px; height: 18px; }
[dir="rtl"] .country-arrow { transform: scaleX(-1); }

/* 套餐 sheet 卡 */
.package-list { display: flex; flex-direction: column; gap: 10px; }
.package-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; background: var(--surface-2);
  border: 1.5px solid var(--border); border-radius: var(--radius);
  transition: all var(--transition-fast);
}
.package-card:hover { border-color: var(--accent); }
.package-card.popular { border-color: var(--accent); background: var(--pill); }
.package-info { flex: 1; min-width: 0; }
.package-name {
  font-family: var(--font-heading); font-size: 15px; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.package-days { font-weight: 600; color: var(--text-2); font-size: 13px; }
.package-badge {
  font-family: var(--font-mono); font-size: 9px; font-weight: 800; letter-spacing: .12em;
  padding: 2px 7px; border-radius: var(--radius-pill); background: var(--accent); color: #FFF;
}
.package-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.package-data-only {
  font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: .1em;
  padding: 2px 7px; border-radius: var(--radius-pill); background: var(--bg-2); color: var(--muted);
}
.package-price { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.package-amount { font-family: var(--font-heading); font-size: 18px; font-weight: 800; color: var(--text); line-height: 1; }
.btn-buy {
  padding: 7px 16px; background: var(--accent); color: #FFF;
  border-radius: var(--radius-pill); font-family: var(--font-heading);
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  transition: all var(--transition-fast); white-space: nowrap;
}
.btn-buy:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-buy:active { transform: translateY(0); }

/* 手动上架套餐（source=manual）：暂不可购买 → 灰态「即将上线」按钮 + 臻选徽标 */
.btn-buy-soon {
  background: var(--bg-2); color: var(--muted); cursor: not-allowed;
}
.btn-buy-soon:hover { filter: none; transform: none; }
.package-card.manual { border-style: dashed; }
.package-badge-curated { background: var(--warn-bg); color: var(--warn); }

/* 目录空态（后台尚未上架国家/套餐时） */
.mall-empty { padding: 56px 24px; }
.mall-empty-icon { color: var(--muted); opacity: .5; margin-bottom: 4px; }
.mall-empty-icon svg { width: 40px; height: 40px; }
.mall-empty-title { font-size: var(--fs-md); font-weight: var(--fw-bold); color: var(--text); }
.mall-empty-desc { font-size: var(--fs-sm); color: var(--muted); max-width: 260px; }

/* ════════════════════════════════════════════════════════
   A-5 SIM 卡
   ════════════════════════════════════════════════════════ */
.sim-card {
  margin: 0 var(--sp-md) 10px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: all var(--transition-fast);
}
.sim-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.sim-card:active { transform: scale(.99); }

.sim-head { display: flex; align-items: center; padding: 14px var(--sp-md); gap: 12px; border-bottom: 1px solid var(--border); }
.sim-flag { width: 40px; height: 40px; border-radius: 10px; background: var(--bg-2); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.sim-head-info { flex: 1; min-width: 0; }
.sim-name { font-size: 14px; font-weight: 700; color: var(--text); }
.sim-plan { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); margin-top: 2px; }

.sim-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: .08em;
  padding: 4px 10px; border-radius: var(--radius-pill); flex-shrink: 0;
}
.sim-status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sim-status.active   { background: rgba(34,197,94,.12); color: #16A34A; }
.sim-status.pending  { background: rgba(245,158,11,.12); color: #D97706; }
.sim-status.expired  { background: rgba(107,114,128,.12); color: #6B7280; }
[data-theme="dark"] .sim-status.active   { background: rgba(34,197,94,.18); color: #4ADE80; }
[data-theme="dark"] .sim-status.pending  { color: #FCD34D; }

.sim-progress-wrap { padding: 14px var(--sp-md); }
.sim-progress-head { display: flex; justify-content: space-between; margin-bottom: 6px; font-family: var(--font-mono); font-size: 11px; }
.sim-progress-pct { font-weight: 800; color: var(--accent); font-size: 14px; }
.sim-progress-meta { color: var(--muted); }
.sim-progress-track { width: 100%; height: 6px; background: var(--bg-2); border-radius: var(--radius-pill); overflow: hidden; }
.sim-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%); border-radius: inherit; transition: width .4s ease; }
.sim-progress-fill.warn { background: linear-gradient(90deg, var(--warn) 0%, var(--danger) 100%); }
.sim-progress-foot { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }
.sim-tap-hint strong { color: var(--accent); font-weight: 700; }

/* SIM 详情 sheet */
.sim-detail-progress {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 16px;
}
.sim-detail-stat { text-align: center; padding: 14px 8px; border-right: 1px solid var(--border); }
.sim-detail-stat:last-child { border-right: none; }
.sim-detail-num { font-family: var(--font-heading); font-size: 20px; font-weight: 800; color: var(--accent); line-height: 1; }
.sim-detail-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: .08em; color: var(--muted); margin-top: 4px; text-transform: uppercase; }

.sim-qr-block { text-align: center; padding: 16px; background: var(--bg-2); border-radius: var(--radius); margin-bottom: 16px; }
.sim-qr-title { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; text-transform: uppercase; }
.sim-qr-placeholder { font-size: 28px; line-height: 1.2; letter-spacing: 4px; font-family: monospace; color: var(--text-2); }
.sim-qr-note { display: block; font-size: 10px; font-family: var(--font-mono); color: var(--muted); margin-top: 12px; letter-spacing: 0; }

.sim-meta-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border-radius: var(--radius); overflow: hidden; }
.sim-meta-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); padding: 12px 14px;
}
.sim-meta-key { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: .06em; flex-shrink: 0; min-width: 80px; }
.sim-meta-val { flex: 1; font-size: 12px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-meta-val.mono { font-family: var(--font-mono); font-size: 11px; }
.btn-copy-mini {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--pill); color: var(--pill-text);
  transition: all var(--transition-fast); flex-shrink: 0;
}
.btn-copy-mini:hover { background: var(--accent); color: #FFF; }

/* ════════════════════════════════════════════════════════
   订单卡
   ════════════════════════════════════════════════════════ */
.order-card {
  margin: 0 var(--sp-md) 10px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px var(--sp-md);
  cursor: pointer; transition: all var(--transition-fast);
}
.order-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.order-card:active { transform: scale(.99); }

.order-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.order-flag { width: 36px; height: 36px; border-radius: 10px; background: var(--bg-2); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.order-head-info { flex: 1; min-width: 0; }
.order-name { font-size: 14px; font-weight: 700; color: var(--text); }
.order-plan { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.order-status {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 800; letter-spacing: .1em;
  padding: 4px 10px; border-radius: var(--radius-pill); flex-shrink: 0;
}
.order-status.active   { background: rgba(34,197,94,.12); color: #16A34A; }
.order-status.pending  { background: rgba(245,158,11,.12); color: #D97706; }
.order-status.expired  { background: rgba(107,114,128,.12); color: #6B7280; }
.order-status.refunded { background: rgba(107,114,128,.12); color: #6B7280; }
[data-theme="dark"] .order-status.active   { background: rgba(34,197,94,.18); color: #4ADE80; }
[data-theme="dark"] .order-status.pending  { color: #FCD34D; }

.order-foot {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
}
.order-foot-thin { margin-top: 4px; font-size: 10px; opacity: .8; }
.order-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.order-amount { font-family: var(--font-heading); font-size: 14px; font-weight: 800; color: var(--accent); flex-shrink: 0; }

/* ════════════════════════════════════════════════════════
   我的页
   ════════════════════════════════════════════════════════ */
.balance-card {
  margin: 0 var(--pad-page) 16px; padding: 22px var(--sp-lg);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #FFF; border-radius: var(--radius-lg);
  position: relative; overflow: hidden; box-shadow: var(--shadow-accent);
}
.balance-card::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 24px 24px; pointer-events: none;
}
.balance-label {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: .12em; opacity: .85; margin-bottom: 8px; position: relative;
}
.balance-amount {
  font-family: var(--font-heading); font-size: 36px; font-weight: 800;
  line-height: 1; position: relative;
}
.balance-cur { font-size: 20px; font-weight: 700; vertical-align: super; margin-right: 4px; }
.balance-actions { display: flex; gap: 10px; margin-top: 18px; position: relative; }
.balance-btn {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 16px; border-radius: var(--radius-pill);
  font-family: var(--font-body); font-size: var(--fs-sm); font-weight: var(--fw-bold);
  min-height: var(--tap);
  transition: all var(--transition-fast); border: none;
}
.balance-btn svg { width: 16px; height: 16px; }
.balance-btn.primary { background: #FFF; color: var(--accent); }
.balance-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.balance-btn.secondary { background: rgba(255,255,255,.18); color: #FFF; border: 1px solid rgba(255,255,255,.32); }
.balance-btn.secondary:hover { background: rgba(255,255,255,.28); }

.stats-row {
  margin: 0 var(--pad-page) 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  display: grid; grid-template-columns: 1fr 1fr 1fr; box-shadow: var(--shadow-xs);
}
.stat-item { text-align: center; padding: 16px 8px; border-right: 1px solid var(--border); }
.stat-item:last-child { border-right: none; }
.stat-val { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: var(--fs-xl); font-weight: var(--fw-black); color: var(--text); line-height: 1; }
.stat-lbl { font-size: 9.5px; color: var(--muted); letter-spacing: .06em; margin-top: 6px; text-transform: uppercase; font-weight: var(--fw-semi); }

.section-label {
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); padding: 16px var(--pad-page) 8px;
}

.cell-group {
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  margin: 0 var(--pad-page) 12px; overflow: hidden; box-shadow: var(--shadow-xs);
}
.cell {
  display: flex; align-items: center; padding: 12px 16px; gap: 14px;
  border-bottom: 1px solid var(--border); cursor: pointer;
  transition: background var(--transition-fast); min-height: 56px;
}
.cell:last-child { border-bottom: none; }
.cell:hover { background: var(--bg-2); }
.cell-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); background: var(--pill); color: var(--pill-text);
}
.cell-icon svg { width: 19px; height: 19px; }
.cell-icon.danger { background: var(--danger-bg); color: var(--danger); }
.cell-body { flex: 1; min-width: 0; }
.cell-title { font-size: var(--fs-md); color: var(--text); font-weight: var(--fw-medium); }
.cell-title.danger { color: var(--danger); font-weight: var(--fw-semi); }
.cell-sub { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-arrow { display: inline-flex; color: var(--muted); flex-shrink: 0; }
.cell-arrow svg { width: 18px; height: 18px; }
[dir="rtl"] .cell-arrow { transform: scaleX(-1); }
.cell.cell-danger { border-bottom: none; }

/* ════════════════════════════════════════════════════════
   FAQ 手风琴（帮助中心子页）
   ════════════════════════════════════════════════════════ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: none; border: none; cursor: pointer;
  text-align: start; color: var(--text); font: inherit;
  transition: background var(--transition-fast);
}
.faq-q:hover { background: var(--bg-2); }
.faq-q-text { flex: 1; font-size: 14px; font-weight: 500; line-height: 1.4; }
.faq-chevron {
  width: 16px; height: 16px; flex-shrink: 0; color: var(--muted);
  transition: transform var(--transition-fast);
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-a {
  display: none; padding: 0 16px 14px;
  font-size: 13px; line-height: 1.7; color: var(--muted);
}
.faq-item.open .faq-a { display: block; }

/* ════════════════════════════════════════════════════════
   A-6 Checkout 流程
   ════════════════════════════════════════════════════════ */

.co-summary {
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.co-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.co-key {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .06em;
}
.co-val {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  text-align: right;
}
.co-val.mono { font-family: var(--font-mono); font-size: 11px; }
.co-row-total {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 4px;
}
.co-amount {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
}

.co-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.co-methods {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.co-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}
.co-method:hover { border-color: var(--accent); }
.co-method.selected {
  border-color: var(--accent);
  background: var(--pill);
}
.co-method.disabled {
  opacity: .5;
  cursor: not-allowed;
}
.co-method-main { flex: 1; min-width: 0; }
.co-method-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.co-method-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 3px;
}
.co-method-hint {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--pill);
  color: var(--pill-text);
}
.co-method-hint.danger {
  background: rgba(239,68,68,.12);
  color: var(--danger);
}
.co-method-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  flex-shrink: 0;
  transition: all var(--transition-fast);
  position: relative;
}
.co-method.selected .co-method-dot {
  border-color: var(--accent);
  background: var(--accent);
}
.co-method.selected .co-method-dot::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #FFF;
}

.co-confirm:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* ── Stripe 深色 Payment Element（沉浸式收银）──
   .stripe-pe-pane 在内部把核心配色 token 覆写为深色 → 整块支付区强制深色，
   无论 App 当前明/暗主题，消除老板痛点「黑页冒白框」。品牌蓝锁 #1B6FF8。
   子元素 .stripe-amount-row / .stripe-mount-loading 复用 var(--surface/--muted...) 自动转深。 */
.stripe-pe-pane {
  --bg: #0B0F1A; --bg-2: #161B26; --surface: #12161F; --surface-2: #161B26;
  --border: rgba(255,255,255,.08); --border-strong: rgba(255,255,255,.14);
  --text: #ECEFF5; --text-2: #A0A8BA; --muted: #69717F;
  --accent: #1B6FF8; --glow: rgba(27,111,248,.16); --danger: #F04438;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
}
.stripe-amount-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.stripe-amount-key {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.stripe-amount-val {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}
.stripe-mount-wrap {
  position: relative;
  min-height: 120px;
}
.stripe-mount-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 36px 16px;
  font-size: 13px;
  color: var(--muted);
}
/* Stripe Payment Element 渲染容器（深色 iframe） */
#stripe-pe-mount { width: 100%; min-height: 40px; }
#stripe-pe-mount iframe { width: 100% !important; }
.stripe-pe-pay { margin-top: 16px; width: 100%; }
.stripe-pe-cancel { margin-top: 10px; width: 100%; }
.stripe-pe-error {
  margin-top: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
}
.stripe-pe-secured {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}
.stripe-pe-secured svg { color: var(--muted); flex-shrink: 0; }

/* ── 预告页（加密货币卡 / 话费充值）── */
.preview-wrap { padding: 4px 2px 24px; }
.preview-hero {
  position: relative; text-align: center;
  padding: 30px 20px 26px; border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--accent), var(--accent-2));
  color: var(--accent-ink); overflow: hidden;
}
.preview-hero.preview-phone { background: linear-gradient(160deg, #6D5BFF, #9B7BFF); }
.preview-hero-ico {
  width: 64px; height: 64px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.18); border-radius: 18px; color: #fff;
}
.preview-badge {
  display: inline-block; font-size: 11px; font-weight: var(--fw-black); letter-spacing: .1em;
  padding: 4px 12px; border-radius: var(--radius-pill); background: rgba(0,0,0,.22); color: #fff; margin-bottom: 12px;
}
.preview-headline { font-size: 22px; font-weight: 800; }
.preview-sub { font-size: 13px; opacity: .92; margin-top: 6px; line-height: 1.5; }
.preview-points { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.preview-point {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.preview-point-ico {
  flex-shrink: 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: var(--pill); color: var(--pill-text); border-radius: 11px;
}
.preview-point-t { font-size: 14px; font-weight: 700; color: var(--text); }
.preview-point-s { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.preview-foot { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 20px; }

/* ── 处理中 ── */
.co-processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  gap: 16px;
  text-align: center;
}
.co-spinner-lg {
  width: 48px;
  height: 48px;
  border-width: 3px;
}
.co-processing-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-top: 8px;
}
.co-processing-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  max-width: 280px;
}

/* ── 成功 ── */
.co-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0 8px;
  text-align: center;
}
.co-success-check {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--safe) 0%, #16A34A 100%);
  color: #FFF;
  font-size: 38px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(34,197,94,.3);
  animation: pop .35s cubic-bezier(.16,1,.3,1) both;
}
@keyframes pop {
  from { transform: scale(.3); opacity: 0; }
  60%  { transform: scale(1.1); }
  to   { transform: scale(1); opacity: 1; }
}
.co-success-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.co-success-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 22px;
  line-height: 1.5;
  max-width: 320px;
}
.co-success-detail {
  width: 100%;
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

/* ── 失败 ── */
.co-failed {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0 8px;
  text-align: center;
}
.co-failed-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(239,68,68,.12);
  color: var(--danger);
  font-size: 38px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.co-failed-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.co-failed-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 22px;
  max-width: 280px;
  word-break: break-word;
}

/* 次按钮 */
.btn-secondary {
  display: block;
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1.5px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
/* 破坏性次按钮（取消订单等） */
.btn-secondary.danger {
  color: var(--danger);
  border-color: var(--danger-bg);
}
.btn-secondary.danger:hover {
  border-color: var(--danger);
  color: var(--danger);
}

/* 写操作进行中（guard 加 .is-loading）：禁手势 + 视觉降透明，防重复点击的可视反馈 */
.btn-primary.is-loading,
.btn-secondary.is-loading {
  opacity: 0.6;
  cursor: progress;
  pointer-events: none;
}

/* ════════════════════════════════════════════════════════
   A-7a USDT 支付
   ════════════════════════════════════════════════════════ */

.usdt-amount-card {
  background: linear-gradient(135deg, #16A34A 0%, #22C55E 100%);
  color: #FFF;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.usdt-amount-card::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 24px 24px;
}
.usdt-amount-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  opacity: .85;
  margin-bottom: 8px;
  position: relative;
}
.usdt-amount-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  position: relative;
}
.usdt-amount-val {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
}
.usdt-amount-unit {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
}
.usdt-amount-fiat {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: .85;
  margin-top: 6px;
  position: relative;
}
.usdt-countdown {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .12em;
  margin-top: 12px;
  padding: 6px 14px;
  background: rgba(0,0,0,.2);
  border-radius: var(--radius-pill);
  display: inline-block;
  position: relative;
}

.usdt-chains {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}
.usdt-chain {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  gap: 4px;
  position: relative;
}
.usdt-chain:hover { border-color: var(--accent); }
.usdt-chain.disabled,
.usdt-chain:disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}
.usdt-chain.disabled .usdt-chain-hint {
  background: var(--pill);
  color: var(--muted);
}
.usdt-chain.selected {
  border-color: var(--accent);
  background: var(--pill);
}
.usdt-chain.selected::before {
  content: '✓';
  position: absolute;
  top: 8px; right: 10px;
  color: var(--accent);
  font-weight: 800;
}
.usdt-chain-label {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}
.usdt-chain-hint {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #FFF;
}
.usdt-chain-fee {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.usdt-address-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.usdt-address {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text);
  word-break: break-all;
  background: transparent;
}

.usdt-qr-placeholder {
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-bottom: 14px;
}
.usdt-qr-grid {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 4px;
  font-family: monospace;
  color: var(--text-2);
}
.usdt-qr-note {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 12px;
}

.usdt-warning {
  background: rgba(245,158,11,.10);
  border: 1px solid rgba(245,158,11,.3);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--warn);
  margin-bottom: 18px;
  line-height: 1.5;
}

.usdt-confirms {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: .1em;
  margin-top: 12px;
  padding: 6px 14px;
  background: var(--pill);
  border-radius: var(--radius-pill);
}

/* ════════════════════════════════════════════════════════
   A-7b 全屏子页面栈（设置 / 钱包 / 邀请 / 关于 / 法律）
   ════════════════════════════════════════════════════════ */
.subpage-overlay {
  position: fixed; inset: 0;
  left: var(--canvas-l); width: var(--canvas-w);
  z-index: var(--z-subpage);
  background: var(--bg);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  visibility: hidden;
}
@media (min-width: 600px) {
  .subpage-overlay { border-radius: var(--radius-xl); overflow: hidden; }
}
.subpage-overlay.open { transform: translateX(0); visibility: visible; }
[dir="rtl"] .subpage-overlay { transform: translateX(-100%); }
[dir="rtl"] .subpage-overlay.open { transform: translateX(0); }

.subpage-header {
  display: flex; align-items: center; gap: 8px;
  padding: calc(var(--safe-top) + 12px) var(--pad-page) 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg); flex-shrink: 0;
}
.subpage-back {
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; color: var(--text); background: transparent;
  border: none; cursor: pointer; transition: background var(--transition-fast);
}
.subpage-back:hover { background: var(--bg-2); }
.subpage-back svg { width: 22px; height: 22px; }
[dir="rtl"] .subpage-back svg { transform: scaleX(-1); }
.subpage-title { font-family: var(--font-heading); font-size: 18px; font-weight: 800; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subpage-header-spacer { width: 36px; flex-shrink: 0; }
.subpage-body { flex: 1; overflow-y: auto; padding-bottom: calc(var(--safe-bottom) + 24px); }
.subpage-body::-webkit-scrollbar { display: none; }
.subpage-body.slide-in { animation: subpage-slide var(--transition-base); }
@keyframes subpage-slide { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }
[dir="rtl"] .subpage-body.slide-in { animation: subpage-slide-rtl var(--transition-base); }
@keyframes subpage-slide-rtl { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: translateX(0); } }

/* ── 设置：行 / 开关 / 分段控件 / 下拉 ── */
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border); min-height: 56px;
}
.set-row:last-child { border-bottom: none; }
.set-row-main { min-width: 0; flex: 1; }
.set-row-label { font-size: 14px; color: var(--text); font-weight: 500; }
.set-row-sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); margin-top: 2px; }

.toggle {
  position: relative; width: 46px; height: 28px; flex-shrink: 0;
  border-radius: 100px; background: var(--border-strong);
  transition: background var(--transition-fast); cursor: pointer; border: none;
}
.toggle.on { background: var(--accent); }
.toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%; background: #FFF;
  transition: transform var(--transition-fast); box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.toggle.on::after { transform: translateX(18px); }
[dir="rtl"] .toggle::after { left: auto; right: 3px; }
[dir="rtl"] .toggle.on::after { transform: translateX(-18px); }

.seg { display: inline-flex; background: var(--bg-2); border-radius: 10px; padding: 3px; gap: 2px; flex-shrink: 0; }
.seg-item {
  padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
  color: var(--muted); border: none; background: transparent; cursor: pointer;
  transition: all var(--transition-fast); white-space: nowrap;
}
.seg-item.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }

.set-select {
  background: var(--bg); border: 1.5px solid var(--border-strong); border-radius: 10px;
  color: var(--text); font-family: var(--font-body); font-size: 16px; font-weight: 600;
  padding: 8px 12px; outline: none; cursor: pointer; flex-shrink: 0;
}
.set-select:focus { border-color: var(--accent); }

/* ── 字号偏好（缩放 type scale 变量） ── */
html[data-fontsize="sm"] { --fs-xs: 9px; --fs-sm: 11px; --fs-md: 12px; --fs-lg: 14px; --fs-xl: 19px; }
html[data-fontsize="lg"] { --fs-xs: 12px; --fs-sm: 14px; --fs-md: 16px; --fs-lg: 19px; --fs-xl: 28px; }
html[data-fontsize="sm"] body { font-size: 13px; }
html[data-fontsize="lg"] body { font-size: 16px; }

/* ── 钱包：账单流水 ── */
.bill-list { margin: 0 var(--sp-md); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.bill-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.bill-row:last-child { border-bottom: none; }
.bill-icon {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700;
}
.bill-icon.in { background: rgba(34,197,94,.12); color: #16A34A; }
.bill-icon.out { background: var(--pill); color: var(--pill-text); }
.bill-body { flex: 1; min-width: 0; }
.bill-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.bill-sub { font-family: var(--font-mono); font-size: 10px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bill-icon.pending { background: rgba(245,158,11,.12); color: var(--warn); }
.bill-amount { font-family: var(--font-heading); font-size: 15px; font-weight: 800; flex-shrink: 0; }
.bill-amount.pos { color: #16A34A; }
.bill-amount.neg { color: var(--text-2); }
.bill-amount.neutral { color: var(--text-2); }
/* 充值记录：金额 + 状态徽标竖排 */
.bill-amount-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.bill-status {
  font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: .06em;
  padding: 1px 7px; border-radius: var(--radius-pill); white-space: nowrap;
}
.bill-status.pending { background: rgba(245,158,11,.12); color: var(--warn); }
.bill-status.in { background: rgba(34,197,94,.12); color: #16A34A; }
.bill-status.out { background: var(--pill); color: var(--pill-text); }

/* ── 充值：金额选择 ── */
.amount-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.amount-opt {
  padding: 18px; border: 1.5px solid var(--border); border-radius: var(--radius);
  text-align: center; font-family: var(--font-heading); font-weight: 800; font-size: 20px;
  color: var(--text); background: var(--surface); cursor: pointer; transition: all var(--transition-fast);
}
.amount-opt:hover { border-color: var(--accent); }
.amount-opt.selected { border-color: var(--accent); background: var(--pill); color: var(--accent); }

/* ── 邀请好友 ── */
.refer-hero {
  margin: var(--sp-md); padding: 26px var(--sp-lg);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: var(--radius-lg); color: #FFF; text-align: center;
  position: relative; overflow: hidden;
}
.refer-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 24px 24px; pointer-events: none;
}
.refer-hero-label { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .12em; opacity: .85; position: relative; }
.refer-code { font-family: var(--font-heading); font-size: 30px; font-weight: 800; letter-spacing: .04em; margin: 8px 0 16px; position: relative; }
.refer-copy-btn {
  position: relative; background: #FFF; color: var(--accent);
  font-family: var(--font-heading); font-weight: 700; font-size: 13px;
  padding: 9px 24px; border-radius: var(--radius-pill); border: none; cursor: pointer;
  transition: transform var(--transition-fast);
}
.refer-copy-btn:hover { transform: translateY(-1px); }
.refer-reward {
  margin: 0 var(--sp-md) 4px; padding: 12px 16px; background: var(--pill);
  color: var(--pill-text); border-radius: var(--radius); font-size: 12.5px; font-weight: 600; text-align: center;
}
.refer-link-box { display: flex; align-items: center; gap: 8px; background: var(--bg-2); border-radius: var(--radius); padding: 10px 12px; }
.refer-link { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 11px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.refer-qr { display: flex; flex-direction: column; align-items: center; margin-top: 16px; }
.refer-qr-grid, .poster-qr {
  display: grid; grid-template-columns: repeat(11, 1fr); gap: 0;
  width: 132px; height: 132px; padding: 8px; background: #FFF; border-radius: 12px;
}
.refer-qr-grid i, .poster-qr i { display: block; width: 100%; aspect-ratio: 1; background: transparent; }
.refer-qr-grid i.on, .poster-qr i.on { background: #0B1630; }
.refer-qr-note { font-family: var(--font-mono); font-size: 10px; color: var(--muted); margin-top: 10px; }

/* ── 分享海报（sheet 内） ── */
.poster-card {
  background: linear-gradient(160deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: var(--radius-lg); padding: 28px 20px; text-align: center; color: #FFF;
}
.poster-logo { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 14px; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-weight: 800; font-size: 22px; }
.poster-brand { font-family: var(--font-heading); font-size: 22px; font-weight: 800; }
.poster-tagline { font-size: 12px; opacity: .9; margin-top: 4px; }
.poster-qr { margin: 18px auto 12px; }
.poster-code { font-family: var(--font-heading); font-size: 18px; font-weight: 800; letter-spacing: .05em; }
.poster-hint { font-size: 11.5px; opacity: .9; margin-top: 8px; }

/* ── 关于页 ── */
.about-hero { text-align: center; padding: 36px var(--sp-md) 22px; }
.about-logo {
  width: 80px; height: 80px; margin: 0 auto 14px; border-radius: 22px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 800; font-size: 30px; color: #FFF;
  box-shadow: var(--shadow-md);
}
.about-name { font-family: var(--font-heading); font-size: 24px; font-weight: 800; color: var(--text); }
.about-tag { font-size: 13px; color: var(--muted); margin-top: 6px; }
.about-version { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: 12px; }
.about-footer { text-align: center; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); padding: 16px; }

/* 关于页：统计网格 */
.about-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  margin: 0 var(--sp-md) var(--sp-md);
}
.about-stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 12px; text-align: center;
}
.about-stat-v { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 800; color: var(--accent); }
.about-stat-k { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* 单元格副文案 / 联系页等位标号采用等宽字体 */
.cell-sub.mono { font-family: var(--font-mono); font-size: 11.5px; }
/* 表单/分组下方说明文字 */
.form-hint { font-size: 11.5px; color: var(--muted); line-height: 1.6; }

/* ── 法律文档 ── */
.legal-doc { padding: var(--sp-md) var(--sp-md) 40px; }
.legal-updated { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); margin-bottom: 16px; }
.legal-h { font-family: var(--font-heading); font-size: 15px; font-weight: 800; color: var(--text); margin: 22px 0 8px; }
.legal-p { font-size: 13.5px; line-height: 1.75; color: var(--text-2); margin-bottom: 12px; }
.legal-disclaimer { margin-top: 24px; padding: 14px 16px; background: var(--bg-2); border-radius: var(--radius); font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.legal-p strong { color: var(--text); font-weight: 700; }
/* 醒目 callout（如 E911 紧急呼叫免责） */
.legal-callout {
  margin: 18px 0; padding: 14px 16px; border-radius: var(--radius);
  background: var(--danger-bg); border: 1px solid var(--danger);
}
.legal-callout-title { font-family: var(--font-heading); font-size: 14px; font-weight: 800; color: var(--danger); margin-bottom: 6px; }
.legal-callout-body { font-size: 13px; line-height: 1.7; color: var(--text); }
.legal-callout-body strong { font-weight: 800; }
/* 联系方式 / 官网完整条款 —— 描述文本 + 点击复制 pill（不显示裸 URL/邮箱） */
.legal-links { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.legal-links-label { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.legal-copy {
  display: flex; align-items: center; gap: 10px; width: 100%;
  text-align: start; padding: 11px 13px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--border); cursor: pointer;
  font-family: var(--font-body); color: var(--text); transition: border-color .18s, background .18s;
}
.legal-copy:active { background: var(--bg-3, var(--bg-2)); }
.legal-copy:hover { border-color: var(--accent); }
.legal-copy-ic { display: inline-flex; flex-shrink: 0; color: var(--accent); }
.legal-copy-label { flex: 1; min-width: 0; font-size: 13px; line-height: 1.4; }
.legal-copy-act { display: inline-flex; flex-shrink: 0; color: var(--muted); }
[dir="rtl"] .legal-copy { text-align: start; }

/* ════════════════════════════════════════════════════════
   数字排版统一（A-7b 收尾 · Claude）
   ─────────────────────────────────────────────────────────
   问题：金额/统计/价格原先用装饰性 Syne 字体（比例数字），位数变化时
        每个数字宽度不同 → 余额、倒计时、统计在刷新时“忽大忽小/跳动”，
        视觉花哨且不专业。
   方案：统一改用 --font-num（Manrope）+ tabular-nums 等宽数字，
        数字宽度恒定、对齐、不跳动。字号沿用各自层级（保持信息层次），
        Syne 仅保留给品牌/标题。符合 App Store / Google Play 数据展示规范。
   注：此块位于文件末尾，单类选择器、同特异度 + 靠后 → 覆盖上方的 font-heading。
   ════════════════════════════════════════════════════════ */
.balance-amount, .balance-cur, .stat-val, .sim-detail-num,
.package-amount, .order-amount, .co-amount,
.usdt-amount-val, .usdt-amount-unit,
.bill-amount, .amount-opt {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: 0;
}

/* ════════════════════════════════════════════════════════
   通知（顶栏铃铛 + 收件箱）
   ════════════════════════════════════════════════════════ */
.icon-btn-bell { position: relative; }
.notif-badge {
  position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 100px; background: var(--danger); color: #fff;
  font-family: var(--font-num); font-size: 10px; font-weight: 800; line-height: 16px;
  text-align: center; box-shadow: 0 0 0 2px var(--bg);
}
[dir="rtl"] .notif-badge { right: auto; left: -2px; }

.notif-bar { display: flex; justify-content: flex-end; padding: 12px var(--sp-md) 4px; }
.btn-text { background: none; border: none; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 8px; }
.notif-item {
  display: flex; align-items: flex-start; gap: 12px; position: relative;
  margin: 0 var(--sp-md) 10px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.notif-item.unread { border-color: var(--accent); background: var(--surface-2); }
.notif-ic {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; background: var(--pill);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.notif-main { flex: 1; min-width: 0; }
.notif-title { font-size: 14px; font-weight: 600; color: var(--text); }
.notif-body { font-size: 12.5px; color: var(--text-2); line-height: 1.5; margin-top: 3px; }
.notif-time { font-family: var(--font-mono); font-size: 10px; color: var(--muted); margin-top: 6px; }
.notif-dot { position: absolute; top: 14px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
[dir="rtl"] .notif-dot { right: auto; left: 14px; }

/* ════════════════════════════════════════════════════════
   应用内确认弹窗 — confirmDialog（utils.js 动态注入）
   ────────────────────────────────────────────────────────
   居中 modal，盖在 bottom sheet 之上（z > --z-sheet）。
   对齐桌面画布（--canvas-l/--canvas-w），动画与 sheet 一致风格。
   ════════════════════════════════════════════════════════ */
.cdialog-overlay {
  position: fixed;
  top: 0; bottom: 0;
  left: var(--canvas-l);
  width: var(--canvas-w);
  z-index: 2400;                 /* > --z-sheet(1800)，< --z-toast(3000) */
  background: rgba(8, 11, 18, .5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}
@media (min-width: 600px) {
  .cdialog-overlay { border-radius: var(--radius-xl); overflow: hidden; }
}
.cdialog-overlay.open { opacity: 1; pointer-events: auto; }

.cdialog {
  width: 100%;
  max-width: 340px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-lg) var(--sp-lg) var(--sp-md);
  transform: translateY(12px) scale(.96);
  opacity: .6;
  transition: transform var(--transition-base), opacity var(--transition-base);
}
.cdialog-overlay.open .cdialog { transform: translateY(0) scale(1); opacity: 1; }

.cdialog-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: 8px;
}
.cdialog-msg {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
  text-align: center;
  margin-bottom: var(--sp-lg);
}
.cdialog-actions {
  display: flex;
  gap: 10px;
}
.cdialog-btn {
  flex: 1;
  height: 46px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}
.cdialog-btn:active { transform: scale(.97); }
.cdialog-cancel {
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.cdialog-cancel:hover { background: var(--pill); }
.cdialog-confirm {
  background: var(--accent);
  color: var(--accent-ink);
}
.cdialog-confirm:hover { filter: brightness(1.05); }
.cdialog-confirm.danger { background: var(--danger); color: #fff; }
.cdialog-confirm.danger:hover { filter: brightness(1.08); }

/* ── 远程配置 Banner（公告 / 维护提示）── */
.app-banners {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.app-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
}
.app-banner-icon {
  display: inline-flex;
  flex: 0 0 auto;
}
.app-banner-icon svg { display: block; }
.app-banner-text { flex: 1 1 auto; word-break: break-word; }
/* 信息（公告默认）：用品牌强调色淡底 */
.app-banner--info {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--text);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
/* 警告（公告 level=warning）：暖色调 */
.app-banner--warning {
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
  color: var(--text);
  border-bottom: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
}
/* 维护提示：更强的暖色调，置顶强提示 */
.app-banner--maintenance {
  background: color-mix(in srgb, var(--danger) 18%, var(--surface));
  color: var(--text);
  border-bottom: 1px solid color-mix(in srgb, var(--danger) 45%, transparent);
}
.app-banner--maintenance .app-banner-icon { color: var(--danger); }
.app-banner--info .app-banner-icon { color: var(--accent); }

/* ── KYC 要求横幅（持续提示，不阻断使用） ── */
/* 用品牌强调色（蓝）淡底：醒目但区别于维护/警告的暖色，传达「需操作」而非「故障」 */
.app-banner--kyc {
  align-items: center;
  gap: 10px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.app-banner--kyc .app-banner-icon { color: var(--accent); }
.kyc-banner-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.kyc-banner-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
.kyc-banner-sub {
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--muted);
}
.kyc-banner-btn {
  flex: 0 0 auto;
  align-self: center;
  padding: 7px 14px;
  border: none;
  border-radius: var(--radius-pill, 999px);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: filter var(--transition-fast);
}
.kyc-banner-btn:hover { filter: brightness(1.06); }
.kyc-banner-btn:active { filter: brightness(.94); }
