/* ============================================================
   Jam3a Web Top-up · 双主题样式 v3（收银台布局 + 走查修复）
   EN=Light(Inter/Poppins) · AR=Dark RTL(Tajawal)
   断点：900px（桌面三栏收银台 / 移动单列+底部悬浮条）
   ============================================================ */

/* ---------- 主题令牌 ---------- */
:root {
  /* 亮色 EN */
  --bg: #F7F7FF;
  --surface: #FFFFFF;
  --surface-2: #F2EFFF;
  --text: #2C2C3A;
  --text-2: #6B6B76;             /* 走查 P1-1：加深至 4.7:1 */
  --text-3: #BFBFC6;
  --primary: #7F60EF;
  --primary-strong: #7F60FF;
  --accent: #F04BA0;
  --border: rgba(151, 114, 217, 0.20);
  --border-soft: #ECECF4;
  --grad-cta: linear-gradient(90deg, #7F60FF 0%, #F04BA0 100%);
  --shadow-card: 0 4px 20px rgba(127, 96, 239, 0.09);
  --shadow-cta: 0 4px 13px rgba(226, 67, 153, 0.12);
  --shadow-pop: 0 9px 17px rgba(40, 26, 69, 0.28);
  --sheet-bg: #FFFFFF;
  --mask: rgba(44, 44, 58, 0.45);
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-title: 'Poppins', 'Inter', Arial, sans-serif;
  --success: #41C97C;
  --success-strong: #1E8F55;     /* 走查 P1-2/3：文字用深绿档 */
  --danger: #E94052;
}

[data-theme="dark"] {
  /* 暗色 AR */
  --bg: #17102E;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(127, 96, 239, 0.08);
  --text: #E6E6F0;
  --text-2: #9CA3AF;
  --text-3: #6E6D7F;
  --primary: #B6A2FF;
  --primary-strong: #7F60FF;
  --accent: #F04BA0;
  --border: rgba(182, 162, 255, 0.20);
  --border-soft: rgba(255, 255, 255, 0.12);
  --grad-cta: linear-gradient(90deg, #7F60FF 0%, #F04BA0 100%);
  --shadow-card: 0 6px 20px rgba(103, 70, 200, 0.10);
  --shadow-cta: 0 4px 12px rgba(127, 96, 239, 0.40);
  --shadow-pop: 0 9px 17px rgba(40, 26, 69, 0.28);
  --sheet-bg: #211D34;
  --mask: rgba(10, 8, 20, 0.60);
  --success: #41C97C;
  --success-strong: #41C97C;     /* 暗底上原绿对比达标，保持 */
  --danger: #E94052;
}

/* 字体跟语言走（阿语=Tajawal），不随主题变 */
html[lang="ar"] {
  --font-body: 'Tajawal', 'Inter', Arial, sans-serif;
  --font-title: 'Tajawal', 'Inter', Arial, sans-serif;
}

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  transition: background 0.25s ease;
}
button { font: inherit; border: none; background: none; cursor: pointer; color: inherit; } /* 走查 P2-3 */
input { font-family: inherit; }
[hidden] { display: none !important; }   /* 防止 display:flex/grid 覆盖 hidden 语义 */

.ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 走查 P2-6：动效降级 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- 顶栏 ---------- */
.tx-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0 4px;   /* 贴 banner 顶 */
}

/* ---------- 品牌通栏 banner（图片层 + 顶栏融入，业务区不侵入） ---------- */
.banner {
  position: relative;
  color: #fff;
  overflow: hidden;
  min-height: 190px;
  display: flex;
  background: linear-gradient(90deg, #7F60FF 0%, #9A56F5 55%, #F04BA0 100%);   /* 图片加载兜底 */
}
.banner::before {                       /* 生图 banner 图片层（整体压亮一档，白字/按钮更突出） */
  content: ""; position: absolute; inset: 0;
  background: url('app-res/banner.png') center / cover no-repeat;
  filter: brightness(.9) saturate(.96);
}
.banner::after {                        /* 压暗层：LTR压左，RTL压右（跟随文字侧） */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(var(--scrim-dir, to right), rgba(23, 12, 46, 0.60) 0%, rgba(23, 12, 46, 0.28) 45%, transparent 72%);
}
[dir="rtl"] .banner { --scrim-dir: to left; }
[data-theme="dark"] .banner::after {
  background: linear-gradient(var(--scrim-dir, to right), rgba(8, 5, 20, 0.68) 0%, rgba(8, 5, 20, 0.34) 45%, transparent 72%);
}
.banner-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 20px;
  position: relative; z-index: 1;
  display: flex; flex-direction: column; justify-content: flex-start;   /* 内容靠上，header 贴顶 */
  width: 100%;
}
.banner .tx-header { max-width: none; margin: 0; }
.banner .tx-logo-badge { background: rgba(255, 255, 255, 0.82); }
/* banner 顶行：tab 开关（分段控件）——主题 / 语言各一枚，当前态品牌渐变填充 */
.seg {
  display: flex; align-items: center; gap: 2px;
  background: rgba(23, 12, 46, 0.50);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 200px;
  padding: 3px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.seg-opt {
  height: 30px; min-width: 38px; padding: 0 12px;
  border-radius: 200px;
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.78); font-size: 12px; font-weight: 600;
  transition: background .18s ease, color .18s ease;
}
.seg-opt .ic { width: 15px; height: 15px; }
.seg-opt:hover { color: #fff; }
.seg-opt.on { background: var(--grad-cta); color: #fff; }
.seg-opt.pop { animation: segpop .3s cubic-bezier(.34,1.56,.64,1); }
@keyframes segpop { from { transform: scale(.75); } to { transform: scale(1); } }
.banner-brand { padding: 14px 0 0; }
.banner-title { font-family: var(--font-title); font-weight: 700; font-size: 27px; line-height: 1.2; }
.banner-sub { font-size: 13px; color: rgba(255, 255, 255, 0.88); margin-top: 6px; }
.tx-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-title); font-weight: 700; font-size: 17px; text-decoration: none; color: inherit; }
.tx-logo-badge {
  width: 34px; height: 34px; border-radius: 12px;
  background: #C9C9D2;                  /* 占位灰块：官方 logo 未定 */
  display: block;
}
[data-theme="dark"] .tx-logo-badge { background: rgba(255, 255, 255, 0.18); }
.banner .tx-logo-badge,
[data-theme="dark"] .banner .tx-logo-badge { background: rgba(255, 255, 255, 0.82); }   /* banner 内恒定白片，不随主题跳 */
.header-tools { display: flex; align-items: center; gap: 8px; }

/* 主题切换按钮 */
.theme-toggle {
  position: relative;
  width: 44px; height: 40px; border-radius: 200px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid; place-items: center;
  color: var(--text-2);
  transition: color .2s ease, border-color .2s ease, transform .15s ease;
}
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); }
.theme-toggle:active { transform: scale(.92); }
.theme-toggle .t-ico { width: 17px; height: 17px; }
[data-theme="light"] .t-sun { display: none; }
[data-theme="dark"]  .t-moon { display: none; }
[data-theme="dark"]  .t-sun  { display: block; }
/* 切换小巧思：图标弹簧翻转一圈 + 品牌色光环扩散一次 */
.theme-toggle.fx .t-ico { animation: tflip .55s cubic-bezier(.34,1.56,.64,1); }
@keyframes tflip {
  0%   { transform: rotate(0deg) scale(1); }
  45%  { transform: rotate(150deg) scale(.55); }
  100% { transform: rotate(360deg) scale(1); }
}
.theme-toggle.fx::after {
  content: ""; position: absolute; inset: -1px; border-radius: 200px;
  border: 2px solid var(--primary);
  pointer-events: none;
  animation: tpulse .55s ease-out forwards;
}
@keyframes tpulse { from { opacity: .6; transform: scale(1); } to { opacity: 0; transform: scale(1.7); } }

.lang-switch {
  display: flex; align-items: center;
  border: 1px solid var(--border);
  border-radius: 200px;
  background: var(--surface);
}
.lang-switch button {
  padding: 10px 18px; border-radius: 200px;
  font-size: 12px; font-weight: 600; color: var(--primary);
}

/* ---------- 主布局：桌面两栏（内容+右轨）/ 移动单列 ---------- */
.tx-main {
  max-width: 1120px; margin: 0 auto;   /* 业务区不侵入 banner，正常下排 */
  padding: 28px 20px 120px;
}
.layout { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
.tx-rail { display: contents; }   /* 移动端：内部卡片直接并入单列流 */

@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr) 360px; }   /* 总宽1120：内容736+轨360 */
  .tx-content { grid-column: 1; grid-row: 1; }
  .tx-rail {
    display: flex; flex-direction: column; gap: 24px;
    grid-column: 2; grid-row: 1;
    position: sticky; top: 24px;
  }
  /* 桌面端：账号卡区在右轨顶部，支付方式标题与档位卡顶对齐 */
  .tx-content .sec-title { height: 18px; line-height: 18px; margin-bottom: 14px; }
}

/* ---------- 账号卡（容器：态卡 + 底部安全声明） ---------- */
.account-card {
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
[data-theme="dark"] .account-card { border-color: var(--border); }
.account-body { padding: 18px; }
.account-guest { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.account-guest-ava {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface-2);
  display: grid; place-items: center; color: var(--primary);
}
.account-guest-ava .ic { width: 20px; height: 20px; }
.account-guest-main { flex: 1; min-width: 0; }
.account-guest-t1 { font-family: var(--font-title); font-weight: 600; font-size: 15px; }
.account-guest-t2 { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.account-guest .btn-login {
  flex: 1 1 100%;                 /* 布局第1刀：按钮通栏，文字不再被挤 */
  height: 44px; border-radius: 200px;
  background: var(--grad-cta); color: #fff;
  font-size: 15px; font-weight: 600;
  box-shadow: var(--shadow-cta);
}
.account-user { display: flex; align-items: center; gap: 12px; }
.account-user-ava {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad-cta); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-title); font-weight: 700; font-size: 18px;
}
.account-user-main { flex: 1; min-width: 0; }
.account-user-name { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.account-user-meta { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.account-verified {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--success-strong); /* 走查 P1-2 */
}
.balance-row {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
}
[data-theme="dark"] .balance-row { border-top-color: rgba(255,255,255,0.10); }
.balance-label { font-size: 12px; color: var(--text-2); }
.balance-val { font-family: var(--font-title); font-weight: 700; font-size: 19px; color: var(--primary); display: flex; align-items: center; gap: 6px; }
.balance-val img { width: 18px; height: 18px; }
.account-actions { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-ghost {
  height: 44px; border-radius: 12px;      /* 走查 P2-5 触控 */
  border: 1px solid var(--border); color: var(--primary);
  font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent; text-decoration: none;
}
.btn-ghost .ic { width: 15px; height: 15px; }
.btn-ghost:hover { background: var(--surface-2); }

/* ---------- 主区通用 ---------- */
.tx-content { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.sec-title {
  font-family: var(--font-title); font-size: 16px; font-weight: 600;
  line-height: 1.2; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.sec-hint { font-size: 12px; color: var(--text-2); font-weight: 400; }

/* ---------- 档位网格 ---------- */
.packs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 480px) { .packs { grid-template-columns: repeat(3, 1fr); } }
.pack {
  position: relative; border-radius: 16px; padding: 18px 14px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border-soft);
  cursor: pointer; text-align: center;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
  overflow: hidden;                    /* 布局第6刀：徽章嵌入不悬空 */
}
[data-theme="dark"] .pack { border-color: var(--border); }
.pack:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.pack:active { transform: scale(0.97); }
.pack--on {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--surface-2), var(--shadow-card);
}
/* POPULAR 徽章：卡内顶部嵌入横条 */
.pack--hot::before {
  content: attr(data-hot);
  position: absolute; top: 0; inset-inline: 0;
  background: var(--grad-cta); color: #fff;
  font-size: 11px; font-weight: 600; line-height: 22px;
  text-align: center; white-space: nowrap;
}
.pack--hot { padding-top: 32px; }
.pack-ico { width: 40px; height: 40px; margin: 2px auto 8px; display: block; }
.pack-gold { font-family: var(--font-title); font-weight: 700; font-size: 18px; display: flex; align-items: center; justify-content: center; gap: 5px; }
/* 价格条：通栏底部横条，选中变渐变 */
.pack-price {
  display: block; width: 100%; margin: 10px 0 0;
  font-size: 13px; font-weight: 600; color: var(--primary);
  background: var(--surface-2); border-radius: 10px; padding: 6px 0; text-align: center;
}
.pack--on .pack-price { background: var(--grad-cta); color: #fff; }
.vat-note { font-size: 12px; color: var(--text-2); margin-top: 10px; }

/* ---------- 支付方式：大卡片内单选列表 ---------- */
.methods-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  overflow: hidden;
}
[data-theme="dark"] .methods-card { border-color: var(--border); }
.method-row {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: start;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  transition: background .15s ease;
}
[dir="rtl"] .method-row { border-bottom: none; border-top: 1px solid var(--border-soft); }
.method-row:last-child { border-bottom: none; }
[data-theme="dark"] .method-row { border-color: rgba(255,255,255,0.08); }
.method-row:hover { background: var(--surface-2); }
.method-row--on { background: var(--surface-2); }
.method-row--on:hover { background: var(--surface-2); }
.radio {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--text-3);
  display: grid; place-items: center;
  transition: border-color .15s ease;
}
.method-row--on .radio { border-color: var(--primary); }
.radio::after {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--primary); transform: scale(0); transition: transform .15s ease;
}
.method-row--on .radio::after { transform: scale(1); }
.brand-badge {
  width: 50px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: #fff; border: 1px solid var(--border-soft);
  display: grid; place-items: center;
  color: #2C2C3A;   /* 白底片固定深色 glyph，双主题一致 */
}
[data-theme="dark"] .brand-badge { border-color: rgba(255,255,255,0.15); }
.brand-badge svg { max-width: 38px; max-height: 22px; }
.brand-badge img { max-width: 36px; max-height: 20px; }
.brand-badge .mask-logo { width: 20px; height: 20px; display: block; background: currentColor; }
.method-main { flex: 1; min-width: 0; }
.method-name { display: block; font-size: 15px; font-weight: 600; }

/* ---------- 订单摘要卡（桌面右栏） ---------- */
.summary-card {
  border-radius: 16px; padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
}
[data-theme="dark"] .summary-card { border-color: var(--border); }
.summary-title { font-family: var(--font-title); font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.sum-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border-soft);
  font-size: 13px;
}
[dir="rtl"] .sum-row { border-bottom: none; border-top: 1px dashed var(--border-soft); }
.sum-row:first-of-type { border-top: none; }
[data-theme="dark"] .sum-row { border-color: rgba(255,255,255,0.08); }
.sum-label { color: var(--text-2); flex-shrink: 0; }
.sum-val { font-weight: 600; display: flex; align-items: center; gap: 6px; min-width: 0; text-align: end; }
.sum-val .muted { color: var(--text-2); font-weight: 400; }
.sum-total {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0 16px; font-size: 15px;
}
.sum-total-label { font-weight: 600; }
.sum-total-val { font-family: var(--font-title); font-weight: 700; font-size: 22px; color: var(--primary); }
.btn-pay {
  width: 100%; height: 48px; border-radius: 200px;
  background: var(--grad-cta); color: #fff;
  font-family: var(--font-title); font-size: 15px; font-weight: 600;
  box-shadow: var(--shadow-cta);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-pay .ic { width: 17px; height: 17px; }

/* ---------- 移动端底部悬浮摘要条 ---------- */
.pay-bar { display: none; }
@media (max-width: 899.5px) {
  /* 移动端 banner 紧凑版（高约150px） */
  .banner { min-height: 150px; }
  .banner-title { font-size: 21px; }
  .banner-sub { font-size: 12px; margin-top: 4px; }
  .banner .theme-toggle { width: 38px; height: 34px; }
  .banner .lang-switch button { padding: 7px 13px; }
  .tx-main { padding-top: 20px; padding-bottom: 118px; }
  /* 移动端单列：账号卡置顶、摘要卡隐藏（由底部悬浮条代替） */
  .tx-rail .account-card { order: -1; }
  .tx-rail .summary-card { display: none; }
  .pay-bar {
    position: fixed; z-index: 50;
    bottom: 12px; inset-inline: 12px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 10px 10px 18px;
    border-radius: 200px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-pop);
  }
  [data-theme="dark"] .pay-bar { border-color: var(--border); }
  .pay-bar-amount { display: flex; flex-direction: column; min-width: 0; }
  .pay-bar-label { font-size: 11px; color: var(--text-2); }
  .pay-bar-val { font-family: var(--font-title); font-weight: 700; font-size: 18px; color: var(--primary); }
  .btn-pay { width: auto; padding: 0 28px; height: 44px; font-size: 14px; }
}

/* ---------- sheet：移动底部滑出 / 桌面居中 ---------- */
.sheet-mask {
  position: fixed; inset: 0; z-index: 60;
  background: var(--mask);
  opacity: 0; pointer-events: none; transition: opacity .22s ease;
}
.sheet-mask.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; z-index: 61;
  inset-inline: 0; bottom: 0;
  background: var(--sheet-bg);
  border-radius: 24px 24px 0 0;
  padding: 10px 22px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(105%);
  transition: transform .28s cubic-bezier(.32,.72,.33,1);
  max-height: 88vh; overflow: auto;
  pointer-events: none;
}
.sheet.open { pointer-events: auto; }
[data-theme="dark"] .sheet {
  background: linear-gradient(166.45deg, #2A1B5E 0%, #1D1C3A 46%, #17102E 100%);
  border-top: 1px solid var(--border);
}
.sheet.open { transform: translateY(0); }
.sheet-handle { width: 40px; height: 4px; border-radius: 4px; background: var(--text-3); margin: 4px auto 14px; }
.sheet-title { font-family: var(--font-title); font-size: 17px; font-weight: 700; text-align: center; }
.sheet-sub { font-size: 13px; color: var(--text-2); text-align: center; margin: 5px 0 18px; }
.oauth-list { display: flex; flex-direction: column; gap: 10px; }
.oauth-btn {
  height: 48px; border-radius: 200px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 15px; font-weight: 600;
  border: 1px solid var(--border-soft);
  background: var(--surface); color: var(--text);
  transition: transform .12s ease;
}
[data-theme="dark"] .oauth-btn { border-color: var(--border); background: rgba(255,255,255,0.08); }
.oauth-btn:active { transform: scale(0.98); }
.oauth-btn .mask-logo { width: 20px; height: 20px; display: inline-block; background: currentColor; }
.sheet-cancel {
  margin-top: 12px; width: 100%; height: 44px; border-radius: 200px;
  font-size: 14px; font-weight: 600; color: var(--text-2);
  border: 1px solid var(--border-soft);
}
[data-theme="dark"] .sheet-cancel { border-color: var(--border); }
@media (min-width: 900px) {
  .sheet {
    inset-inline: auto; bottom: auto;
    inset-inline-start: 50%; top: 50%;
    transform: translate(-50%, -46%) scale(0.96); opacity: 0;
    width: 380px; border-radius: 24px;
    box-shadow: var(--shadow-pop);
    padding-bottom: 22px;
  }
  [dir="rtl"] .sheet { transform: translate(50%, -46%) scale(0.96); }
  .sheet.open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  [dir="rtl"] .sheet.open { transform: translate(50%, -50%) scale(1); }
  .sheet-handle { display: none; }
}

/* ---------- 充值记录页 ---------- */
.records { display: flex; flex-direction: column; gap: 10px; max-width: 720px; margin: 0 auto; }
.record-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border-soft); border-radius: 14px;
  padding: 13px 16px;
}
[data-theme="dark"] .record-row { border-color: var(--border); }
.record-ico {
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
  background: var(--surface-2); display: grid; place-items: center;
}
.record-ico img { width: 22px; height: 22px; }
.record-main { flex: 1; min-width: 0; }
.record-t1 { font-size: 14px; font-weight: 600; }
.record-t2 { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.record-status {
  font-size: 11px; font-weight: 600; color: var(--success-strong); /* 走查 P1-2 */
  background: color-mix(in srgb, var(--success) 12%, transparent);
  padding: 3px 10px; border-radius: 200px; flex-shrink: 0;
}
.empty { text-align: center; padding: 70px 20px; color: var(--text-2); }
.empty .ic { width: 54px; height: 54px; margin-bottom: 14px; opacity: 0.5; stroke-width: 1.4; }
.empty-t1 { font-weight: 600; font-size: 15px; color: var(--text); }
.empty-t2 { font-size: 13px; margin-top: 4px; }

/* ---------- 支付结果页 ---------- */
.result-wrap {
  max-width: 420px; margin: 0 auto; padding: 44px 24px 40px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.result-ico {
  width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 22px;
}
.result-ico .ic { width: 44px; height: 44px; stroke-width: 1.6; }
.result--success .result-ico { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success-strong); }
.result--fail .result-ico { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.result--cancel .result-ico { background: var(--surface-2); color: var(--text-2); }
.result--processing .result-ico { background: var(--surface-2); color: var(--primary); }
.result-title { font-family: var(--font-title); font-size: 20px; font-weight: 700; }
.result-desc { font-size: 13px; color: var(--text-2); margin: 8px 0 4px; max-width: 300px; }
.result-gold {
  margin: 18px 0 8px;
  font-family: var(--font-title); font-weight: 700; font-size: 34px;
  color: var(--success-strong);   /* 走查 P1-3 */
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.result-gold img { width: 26px; height: 26px; }
.result-meta { font-size: 12px; color: var(--text-2); margin-bottom: 24px; }
.result-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 300px; margin-top: 10px; }
.spinner {
  width: 44px; height: 44px;
  border: 4px solid var(--surface-2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Toast ---------- */
.tx-toast {
  position: fixed; z-index: 90;
  bottom: 84px;
  inset-inline-start: 50%;
  transform: translate(-50%, 16px);
  background: var(--text); color: var(--bg);
  font-size: 13px; font-weight: 600;
  padding: 10px 20px; border-radius: 200px;
  opacity: 0; pointer-events: none; transition: all .25s ease;
  white-space: normal; max-width: calc(100vw - 40px); text-align: center;
}
[dir="rtl"] .tx-toast { transform: translate(50%, 16px); }
.tx-toast.show { opacity: 1; transform: translate(-50%, 0); }
[dir="rtl"] .tx-toast.show { transform: translate(50%, 0); }
@media (min-width: 900px) { .tx-toast { bottom: 28px; } }

/* ════════════════════════════════════════════════════════════
   ── decor ── 装饰层（[decor] 锚点，删本分区即整体回滚）
   三族：光晕族 / 玻璃高光族 / 品牌渐变线族 —— 取色全部来自页面色板
   依据：无风格提示词，按宿主反推（品牌渐变 #7F60FF→#F04BA0 + app 充值页质感）
   约束：纯伪元素/box-shadow/背景层，零 DOM、零布局占位、RTL 用 inset-inline 系
   ════════════════════════════════════════════════════════════ */

/* [decor] 装饰令牌：装饰层只引用这些变量跟随主题，不另起颜色字面量 */
:root {
  --decor-halo-a: rgba(127, 96, 239, 0.08);   /* 光晕族·紫 */
  --decor-halo-b: rgba(240, 75, 160, 0.05);   /* 光晕族·粉 */
  --decor-card-glow: rgba(127, 96, 239, 0.06);/* 光晕族·卡角 */
  --decor-hairline: linear-gradient(90deg, transparent, rgba(127, 96, 239, 0.20), transparent);          /* 玻璃高光族·卡顶微光 */
  --decor-gradline: linear-gradient(90deg, transparent, rgba(127, 96, 239, 0.50), rgba(240, 75, 160, 0.40), transparent); /* 渐变线族·摘要卡 */
}
[data-theme="dark"] {
  --decor-halo-a: rgba(127, 96, 239, 0.20);
  --decor-halo-b: rgba(240, 75, 160, 0.12);
  --decor-card-glow: rgba(182, 162, 255, 0.10);
  --decor-hairline: linear-gradient(90deg, transparent, rgba(182, 162, 255, 0.38), transparent);
  --decor-gradline: linear-gradient(90deg, transparent, rgba(182, 162, 255, 0.62), rgba(240, 75, 160, 0.48), transparent);
}

/* [decor] D1 背景氛围光斑（光晕族）：双光晕对角分布，fixed 不随滚动、
   纯径向渐变无 blur（移动端零性能负担）、inset-inline 定位 RTL 自动镜像 */
body::before, body::after {
  content: ""; position: fixed; z-index: -1;
  width: 64vmax; height: 64vmax; border-radius: 50%;
  pointer-events: none;
}
body::before {
  top: -30vmax; inset-inline-start: -20vmax;
  background: radial-gradient(closest-side, var(--decor-halo-a), transparent 74%);
}
body::after {
  bottom: -32vmax; inset-inline-end: -22vmax;
  background: radial-gradient(closest-side, var(--decor-halo-b), transparent 74%);
}

/* [decor] D2 卡片顶部微光线（玻璃高光族）：账号卡/支付方式卡/记录行同族同参；
   追加 position:relative 与 overflow:hidden 均不参与布局，无位移 */
.account-card, .methods-card, .record-row, .summary-card { position: relative; }
.summary-card, .record-row { overflow: hidden; }
.account-card::before, .methods-card::before, .record-row::before {
  content: ""; position: absolute; top: 0; inset-inline: 0; height: 1px;
  background: var(--decor-hairline);
}

/* [decor] D3 卡角光晕（光晕族）：压角代投影、被圆角裁切探出一角、RTL 镜像换角 */
.account-card::after, .summary-card::after {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(56% 46% at 86% 0%, var(--decor-card-glow), transparent 72%);
  pointer-events: none;
}
[dir="rtl"] .account-card::after, [dir="rtl"] .summary-card::after {
  background: radial-gradient(56% 46% at 14% 0%, var(--decor-card-glow), transparent 72%);
}

/* [decor] D3b 摘要卡顶部品牌渐变发丝线（渐变线族）：收银台关键区块仪式感 */
.summary-card::before {
  content: ""; position: absolute; top: 0; inset-inline: 0; height: 1.5px;
  background: var(--decor-gradline);
  z-index: 1;
}

/* [decor] D4 档位选中仪式感（渐变线族）：--grad-cta 描边环（mask 环不占布局）
   + 下坠悬浮微光；既有选中外环与 POPULAR 徽章保留不动 */
.pack--on::after {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: var(--grad-cta);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask-composite: exclude;
  pointer-events: none;
}
.pack--on {
  box-shadow: 0 0 0 3px var(--surface-2),
              0 10px 24px -10px rgba(127, 96, 239, 0.45),
              var(--shadow-card);
}

/* [decor] D5 CTA/品牌徽章顶部玻璃高光（玻璃高光族）+ CTA 悬浮光晕；
   --grad-cta 渐变与白字未动，仅叠加 1px 内高光 */
.btn-pay, .tx-logo-badge, .account-guest .btn-login {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), var(--shadow-cta);
}
.btn-pay { transition: box-shadow .2s ease; }
.btn-pay:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 18px rgba(226, 67, 153, 0.30);
}

/* [decor] D6 移动端悬浮条玻璃顶光（玻璃高光族）：pay-bar 结构与 backdrop 不动 */
.pay-bar { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), var(--shadow-pop); }

/* [decor] D7 结果页状态光环（光晕族）：光晕跟随图标、随宿主同轴（居中豁免） */
.result--success    .result-ico { box-shadow: 0 0 0 12px color-mix(in srgb, var(--success) 7%, transparent); }
.result--fail       .result-ico { box-shadow: 0 0 0 12px color-mix(in srgb, var(--danger) 7%, transparent); }
.result--cancel     .result-ico,
.result--processing .result-ico { box-shadow: 0 0 0 12px color-mix(in srgb, var(--primary) 7%, transparent); }

/* [decor] D8 空态图标柔光环（光晕族）：跟 result 光环同族同强度 */
.empty .ic {
  border-radius: 50%;
  box-shadow: 0 0 0 14px color-mix(in srgb, var(--primary) 5%, transparent);
}
/* ── decor 结束 ── */
