/* ============================================================
   个人中心页样式（profile.html）
   与投注计算页（index.html）统一设计语言：
   - 基底：纯白底色
   - 主色：亮蓝（品牌 / 选中态 / 主功能）
   - 点缀：红 / 金 仅用于活动福利营销
   - 质感：扁平化、小圆角、无强投影、无渐变
   ============================================================ */
:root {
  --primary: #1677ff;        /* 亮蓝主色 */
  --primary-2: #3b8bff;
  --primary-soft: #eaf2ff;   /* 浅蓝底 */
  --red: #f5222d;            /* 红：活动福利点缀 */
  --gold: #ffb800;           /* 金：活动福利点缀 */
  --gold-deep: #b8860b;
  --bg: #ffffff;             /* 纯白基底 */
  --card: #ffffff;
  --card-alt: #f7f8fa;       /* 浅灰卡片 */
  --text: #111827;           /* 黑色主力信息 */
  --text-sub: #6b7280;       /* 浅灰次级文字 */
  --text-light: #9ca3af;
  --border: #eef0f3;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --shadow-card: 0 1px 2px rgba(17, 24, 39, .05);
  --nav-h: 54px;
  --tabbar-h: 52px;          /* 底部 Tabbar 高度 */
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: calc(30px + var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ========== 顶部导航（与 index 一致：白底 + 蓝色品牌/按钮） ========== */
.nav-bar {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  padding: 0 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-bar .left, .nav-bar .right { display: flex; align-items: center; gap: 8px; z-index: 1; }
.nav-bar .title {
  font-size: 17px; font-weight: 700; letter-spacing: .5px;
  position: absolute; left: 50%; transform: translateX(-50%);
  white-space: nowrap;
  display: flex; align-items: center; gap: 4px;
}
.nav-btn {
  height: 36px; padding: 0 16px; border: none; border-radius: 18px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .15s, transform .1s;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 56px;
}
.nav-btn:active { background: #dbe9ff; transform: scale(.95); }
.nav-btn .nav-ico { width: 18px; height: 18px; margin-right: 6px; flex: none; object-fit: contain; }

/* ========== 用户头部卡（浅蓝信息区 + 白色余额卡） ========== */
.user-hero {
  background: var(--primary-soft);
  color: var(--text);
  padding: 16px 18px 26px;
  position: relative;
  border-bottom: 1px solid #e3edff;
}
.user-info-row {
  display: flex; align-items: center; gap: 12px;
  margin-top: 4px;
}
.avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: #fff;
  border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(22, 119, 255, .18);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.uname-line { font-size: 17px; font-weight: 700; }
.uid-line { font-size: 12px; color: var(--text-sub); margin-top: 3px; }
.badge {
  display: inline-block; padding: 2px 8px;
  background: #fff; border-radius: 9px;
  font-size: 11px; margin-left: 6px; vertical-align: 2px;
  color: var(--gold-deep); font-weight: 600;
  border: 1px solid #ffe9b8;
}

/* 余额卡（白卡 + 金色福利点缀） */
.balance-card {
  background: #fff;
  border: 1px solid #e8eefc;
  border-radius: var(--radius-lg);
  padding: 22px 18px 24px;
  margin-top: 16px;
  box-shadow: 0 2px 10px rgba(22, 119, 255, .08);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.balance-label {
  font-size: 12px; color: var(--text-sub);
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.balance-label .eye { cursor: pointer; padding: 3px 8px; font-size: 12px; background: var(--card-alt); border-radius: 12px; display: inline-flex; align-items: center; color: var(--text-sub); }
.balance-label .eye:active { background: #eef0f3; }
.eye-ico { width: 18px; height: 18px; margin-right: 4px; object-fit: contain; }
.balance-value {
  font-size: 38px; font-weight: 700;
  font-family: "DIN Alternate", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .5px;
  color: var(--text);
  line-height: 1.2;
}
.balance-value small { font-size: 15px; font-weight: 400; margin-left: 4px; color: var(--text-light); }

/* 账户快捷栏：胶囊式功能按钮 */
.balance-actions { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.bal-btn {
  padding: 0; border: none; background: transparent;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: transform .1s;
  color: var(--text-sub); font-size: 12px; font-weight: 500;
}
.bal-btn:active { transform: scale(.95); }
.bal-btn .bal-ico {
  width: 52px; height: 52px; border-radius: 26px;
  background: var(--primary-soft);
  border: 1px solid #d9e8ff;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.bal-btn .bal-ico img { width: 26px; height: 26px; object-fit: contain; }
.bal-btn.gold .bal-ico { background: #fffbea; border-color: #ffe9b8; }
.bal-btn.gold .bal-txt { color: var(--gold-deep); font-weight: 600; }
.bal-btn.solid .bal-ico { background: var(--primary); border-color: var(--primary); }
.bal-btn.solid .bal-ico img { filter: brightness(0) invert(1); }
.bal-btn.solid .bal-txt { color: var(--primary); font-weight: 600; }
.bal-btn .bal-txt { line-height: 1; }

/* ========== 未登录提示（浅蓝区 + 蓝色按钮） ========== */
.login-prompt {
  background: var(--primary-soft);
  color: var(--text);
  padding: 44px 24px 34px;
  text-align: center;
  border-bottom: 1px solid #e3edff;
}
.login-prompt .emoji { display: block; margin-bottom: 10px; }
.login-prompt .emoji img { width: 46px; height: 46px; display: inline-block; }
.login-prompt .tip { font-size: 14px; color: var(--text-sub); margin-bottom: 18px; }
.login-prompt .login-btn {
  padding: 12px 40px;
  background: var(--primary); color: #fff;
  border: none; border-radius: 24px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: transform .12s;
}
.login-prompt .login-btn:active { transform: scale(.96); }

/* ========== 区块容器 ========== */
.section {
  margin: 12px 12px 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.section-hd {
  padding: 14px 16px 8px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.section-hd::before {
  content: ""; width: 3px; height: 14px;
  background: var(--primary); border-radius: 2px; margin-right: 8px;
}
.section-hd .more { font-size: 12px; color: var(--text-light); font-weight: 400; }
.section-bd { padding: 0 16px 12px; }

/* ========== 快捷入口宫格（圆角方形图标 + 文字） ========== */
.grid-menu {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 8px 0 12px;
  gap: 4px;
}
.grid-item {
  text-align: center; padding: 10px 4px; cursor: pointer;
  border-radius: var(--radius-md);
  transition: background .12s, transform .1s;
}
.grid-item:active { background: var(--card-alt); transform: scale(.96); }
.grid-icon {
  width: 44px; height: 44px; margin: 0 auto 6px;
  border-radius: 12px;
  background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center;
}
.grid-icon img { width: 32px; height: 32px; object-fit: contain; display: block; }
.grid-name { font-size: 12px; color: #555; }

/* ========== Tab 切换（选中态蓝色高亮） ========== */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.tab {
  flex: 1; text-align: center;
  padding: 12px 0 10px;
  font-size: 14px; color: #666; cursor: pointer;
  position: relative;
  transition: color .15s;
}
.tab.active { color: var(--primary); font-weight: 600; }
.tab.active::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 28px; height: 3px; background: var(--primary); border-radius: 2px;
}

/* ========== 列表项 ========== */
.list-item {
  display: flex; align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid #f4f5f7;
}
.list-item:last-child { border-bottom: none; }
.li-main { flex: 1; min-width: 0; }
.li-title {
  font-size: 14px; color: var(--text); font-weight: 500;
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.li-sub { font-size: 12px; color: var(--text-light); margin-top: 3px; }
.li-amount {
  font-size: 15px; font-weight: 700;
  font-family: "DIN Alternate", Arial, sans-serif;
  flex-shrink: 0;
}
.li-amount.in { color: var(--primary); }
.li-amount.out { color: var(--text); }
.li-amount.bonus { color: var(--gold-deep); }
.qr-thumb {
  width: 40px; height: 40px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .15s;
}
.qr-thumb:hover { transform: scale(1.1); border-color: var(--primary); }
.status-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10px;
  margin-left: 6px;
  vertical-align: 1px;
}
.status-tag.done { background: #e8f7ec; color: #2e7d32; }
.status-tag.pending { background: #fff3e8; color: #ff7a00; }
.status-tag.cancel { background: #f2f3f5; color: #9aa0a8; }
.status-tag.reject { background: #ffe9eb; color: var(--red); }
.status-tag.win { background: #fffbea; color: var(--gold-deep); font-weight: 600; }
.status-tag.lose { background: #f2f3f5; color: #666; }

/* ========== 投注记录卡片 ========== */
.bet-order-card {
  padding: 13px 0;
  border-bottom: 1px solid #f4f5f7;
}
.bet-order-card:last-child { border-bottom: none; }
.bet-order-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.bet-order-title {
  font-size: 14px; color: var(--text); font-weight: 500;
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap; min-width: 0;
}
.bet-order-sub {
  font-size: 12px; color: var(--text-light); margin-top: 3px;
}
.bet-order-matches {
  margin-top: 10px;
  background: var(--card-alt);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}
.bet-match-row {
  padding: 7px 0;
  border-bottom: 1px solid #f0f1f3;
}
.bet-match-row:last-child { border-bottom: none; }
.bet-match-teams {
  font-size: 13px; color: var(--text); font-weight: 500;
}
.bet-match-info {
  display: flex; align-items: center; gap: 8px;
  margin-top: 3px; font-size: 12px; color: #666;
}
.bet-match-play {
  background: var(--primary-soft); color: var(--primary);
  padding: 1px 6px; border-radius: 4px;
  flex-shrink: 0;
}
.bet-match-sel { color: var(--primary); font-weight: 600; }
.bet-match-odds { color: var(--gold-deep); font-weight: 600; }
.bet-hit {
  display: inline-block; padding: 1px 6px;
  border-radius: 4px; font-size: 10px; font-weight: 600;
}
.bet-hit.hit { background: #e6f7e6; color: #07c160; }
.bet-hit.miss { background: #fde8e8; color: var(--red); }

/* ================= 分页组件 ================= */
.pager-bar { padding: 10px 0 6px; }
.pager {
  display: flex; align-items: center; justify-content: center;
  gap: 5px; flex-wrap: wrap;
}
.pager-btn, .pager-num {
  border: 1px solid var(--border); background: #fff; color: var(--text);
  padding: 6px 12px; border-radius: 8px; font-size: 12px;
  cursor: pointer; transition: all .15s; min-width: 32px;
  text-align: center;
}
.pager-btn:active:not(.disabled), .pager-num:active:not(.active) { background: var(--card-alt); }
.pager-btn:hover:not(.disabled), .pager-num:hover:not(.active) {
  border-color: var(--primary); color: var(--primary);
}
.pager-btn.disabled {
  color: #ccc; cursor: not-allowed; background: #f9f9f9;
}
.pager-num.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
  font-weight: 600;
}
.pager-ellipsis {
  color: #999; padding: 0 2px; font-size: 12px;
}
.pager-info {
  margin-left: 8px; font-size: 11px; color: var(--text-light);
}

/* ================= 提现弹窗：已保存账户小卡片选择 ================= */
.sa-empty {
  background: var(--card-alt);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.6;
}
.saved-accounts-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 6px;
}
.sa-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all .15s;
}
.sa-chip:active {
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: scale(.99);
}
.sa-chip-icon {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px;
  color: #fff;
  font-size: 14px; font-weight: 700;
  flex-shrink: 0;
}
.sa-chip-icon.bank     { background: #2b6cb0; }
.sa-chip-icon.alipay   { background: var(--primary); }
.sa-chip-icon.wechat   { background: #07c160; }
.sa-chip-main { flex: 1; min-width: 0; }
.sa-chip-summary {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sa-chip-detail {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sa-chip-go {
  color: #c0c4cc;
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  flex-shrink: 0;
}
.sa-chip:active .sa-chip-go { color: var(--primary); }

/* ================= 收款账户 Tab ================= */
.accounts-notice {
  background: #fffbea;
  border: 1px solid #ffe9b8;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.an-icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold);
  color: #fff;
  border-radius: 50%;
  font-size: 15px; font-weight: 700;
  flex-shrink: 0;
}
.an-text { flex: 1; color: var(--text); font-size: 12px; line-height: 1.7; }
.an-warn { margin-top: 4px; color: #b26a00; font-weight: 500; }

.accounts-group { margin-bottom: 18px; }
.accounts-group-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 2px;
}
.accounts-group-label {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.accounts-group-label::before {
  content: "";
  display: inline-block;
  width: 3px; height: 14px;
  background: var(--primary);
  border-radius: 2px;
}
.accounts-group-count {
  font-size: 11px;
  color: var(--text-light);
}
.accounts-sub-titles {
  display: flex;
  justify-content: space-between;
  padding: 6px 10px 8px;
  font-size: 11px;
  color: var(--text-light);
  border-bottom: 1px solid #f3f4f6;
}
.as-amount { color: var(--primary); font-size: 12px; font-weight: 600; }
.accounts-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
}
.accounts-empty {
  background: var(--card-alt);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  color: var(--text-light);
  font-size: 12px;
}
.account-card {
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: var(--radius-md);
  padding: 13px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-card);
}
.account-card-main { flex: 1; min-width: 0; }
.acc-info {
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acc-holder {
  margin-top: 4px;
  color: var(--text-sub);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.btn-ghost.sm {
  height: 30px; padding: 0 12px;
  font-size: 11px;
  border-radius: 15px;
  flex: none;
}
.btn-ghost.sm.red { color: var(--red); border: 1px solid #fecaca; background: #fff; }
.btn-ghost.sm.red:active { background: #fef2f2; }

.empty-state { padding: 56px 24px; text-align: center; color: #c0c4cc; }
.empty-state .emoji { font-size: 42px; display: block; margin-bottom: 10px; }
.empty-state .tip { font-size: 13px; }

/* ========== 弹窗（底部抽屉式） ========== */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 500;
  display: none;
  align-items: flex-end; justify-content: center;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff;
  width: 100%; max-width: 460px;
  max-height: 88vh;
  border-radius: 12px 12px 0 0;
  display: flex; flex-direction: column;
  animation: slide-up .25s ease-out;
}
/* 修改密码等简单表单弹窗：收窄，避免过宽 */
#passwordModal .modal { max-width: 380px; }
@keyframes slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid #f0f1f3;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 600; color: var(--text); }
.modal-close {
  width: 30px; height: 30px; line-height: 30px;
  border: none; border-radius: 50%;
  background: #f2f3f5; color: #666;
  font-size: 18px; cursor: pointer;
}
.modal-close:active { background: #e5e6eb; }
.modal-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #f0f1f3;
  display: flex; gap: 10px;
}

/* 表单通用 */
.amount-display {
  background: var(--primary-soft);
  border: 1px solid #d9e8ff;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
  text-align: center;
}
.amount-display.blue {
  background: var(--primary-soft);
  border-color: #d9e8ff;
}
.amount-display .label { font-size: 12px; color: var(--text-sub); }
.amount-display .value {
  font-size: 32px; font-weight: 700; color: var(--primary);
  font-family: "DIN Alternate", Arial, sans-serif;
  margin-top: 4px;
}
.amount-display .value small { font-size: 14px; font-weight: 400; color: var(--text-light); margin-left: 4px; }
.amount-display .sub { font-size: 12px; color: var(--text-light); margin-top: 4px; }

.form-label { font-size: 13px; color: #666; margin: 12px 0 8px; }
.form-label .req { color: var(--primary); margin-right: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; outline: none;
  background: var(--card-alt);
  font-family: inherit;
  transition: border-color .15s, background .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--primary); background: #fff; }
.form-textarea { resize: vertical; min-height: 72px; }
.form-tip { font-size: 12px; color: var(--text-light); margin-top: 6px; }
.form-row-gap { margin-bottom: 6px; }

.quick-amounts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.qa-btn {
  padding: 11px 0;
  border: 1px solid var(--border);
  background: var(--card-alt);
  border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text); font-weight: 600;
  cursor: pointer; transition: all .12s;
  font-family: "DIN Alternate", Arial, sans-serif;
}
.qa-btn:active { transform: scale(.96); }
.qa-btn.selected {
  border-color: var(--primary); background: var(--primary-soft); color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.custom-amount {
  margin-top: 10px;
  display: flex; align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  background: var(--card-alt);
  transition: border-color .15s, background .15s;
}
.custom-amount:focus-within { border-color: var(--primary); background: #fff; }
.custom-amount .prefix { color: #999; font-size: 16px; }
.custom-amount input {
  flex: 1; border: none; outline: none;
  padding: 11px 8px;
  font-size: 16px; background: transparent;
  font-family: "DIN Alternate", Arial, sans-serif;
}

.pay-methods, .withdraw-methods {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 6px;
}
.pm-item, .wm-item {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all .12s;
}
.pm-item:active, .wm-item:active { background: var(--card-alt); transform: scale(.99); }
.pm-item.selected, .wm-item.selected {
  border-color: var(--primary); background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.pm-icon, .wm-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.pm-icon.alipay, .wm-icon.alipay { background: var(--primary); }
.pm-icon.wechat, .wm-icon.wechat { background: #07c160; }
.pm-icon.bank, .wm-icon.bank { background: var(--gold-deep); }
.pm-icon.usdt { background: #26a17b; }
.pm-icon.sim { background: #999; }
.pm-name, .wm-name { flex: 1; font-size: 14px; font-weight: 500; }
.pm-desc, .wm-desc { font-size: 11px; color: #999; margin-top: 2px; }
.pm-radio, .wm-radio {
  width: 18px; height: 18px;
  border: 1.5px solid #ccc; border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.pm-item.selected .pm-radio, .wm-item.selected .wm-radio { border-color: var(--primary); }
.pm-item.selected .pm-radio::after, .wm-item.selected .wm-radio::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 9px; height: 9px;
  border-radius: 50%; background: var(--primary);
}

.method-block { display: none; }
.method-block.active {
  display: block; margin-top: 12px; padding: 14px;
  background: var(--card-alt); border-radius: var(--radius-md);
  border: 1px dashed var(--border);
}
.method-block .form-label { margin-top: 0; }

.btn-primary, .btn-ghost {
  flex: 1; height: 44px;
  border-radius: 22px;
  font-size: 15px; font-weight: 700;
  cursor: pointer; border: none;
  display: flex; align-items: center; justify-content: center;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:active { transform: scale(.97); }
.btn-primary:disabled { background: #d9dce1; cursor: not-allowed; }
.btn-ghost { background: #f2f3f5; color: #555; }
.btn-ghost:active { background: #e5e6eb; }

/* ========== Toast ========== */
.toast {
  position: fixed;
  top: calc(var(--nav-h) + 12px); left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, .8);
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  z-index: 9999;
  display: none;
  max-width: 85%;
  text-align: center;
}
.toast.show { display: block; animation: fade-in .2s; }
@keyframes fade-in { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ========== 通用提示页 ========== */
.info-modal .modal, .success-modal .modal {
  max-width: 360px;
  margin: auto;
  align-self: center;
  border-radius: 16px;
  max-height: 78vh;
}
.success-body { padding: 28px 22px 22px; text-align: center; }
.success-icon {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #4caf50;
  color: #fff;
  font-size: 36px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(76, 175, 80, .3);
}
.success-icon.warn {
  background: #ffb74d;
  box-shadow: 0 4px 14px rgba(255, 183, 77, .3);
}
.success-icon.info {
  background: var(--primary);
  box-shadow: 0 4px 14px rgba(22, 119, 255, .3);
}
.success-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.success-amount {
  font-size: 28px; font-weight: 700; color: var(--primary);
  font-family: "DIN Alternate", Arial, sans-serif;
  margin: 8px 0;
}
.success-amount small { font-size: 14px; color: #999; font-weight: 400; }
.success-tip { font-size: 12px; color: #999; margin-bottom: 6px; }
.success-desc {
  font-size: 13px; color: #666; margin-bottom: 18px; line-height: 1.6;
  text-align: left; background: var(--card-alt); padding: 12px 14px; border-radius: var(--radius-sm);
}
.qr-box {
  margin: 14px auto 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 200px; height: 200px;
  display: flex; align-items: center; justify-content: center;
}
.qr-box img { max-width: 100%; max-height: 100%; }
.qr-box .qrcode-fallback {
  font-size: 13px; color: #666; text-align: center; line-height: 1.6;
}

/* ========== 底部 Tabbar（与 index 一致） ========== */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 300;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex; align-items: stretch;
}
.tabbar-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--text-light); text-decoration: none;
  font-size: 11px; font-weight: 500;
}
.tabbar-item .t-ico { font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.tabbar-item .t-ico img { width: 22px; height: 22px; object-fit: contain; }
.tabbar-item.active { color: var(--primary); font-weight: 600; }

/* ========== 移动端 / 平板适配 ========== */
/* 小屏手机 (<=375px) */
@media (max-width: 375px) {
  body { font-size: 13px; }
  .nav-bar { padding: 0 8px; height: 50px; }
  .nav-bar .title { font-size: 15px; }
  .nav-btn { padding: 0 13px; font-size: 13px; height: 34px; min-width: 50px; }
  .user-hero { padding: 12px 12px 20px; }
  .avatar { width: 48px; height: 48px; }
  .uname-line { font-size: 15px; }
  .uid-line { font-size: 11px; }
  .balance-card { padding: 18px 14px 20px; }
  .balance-value { font-size: 32px; }
  .bal-btn { font-size: 11px; }
  .bal-btn .bal-ico { width: 46px; height: 46px; }
  .bal-btn .bal-ico img { width: 23px; height: 23px; }
  .section { margin: 10px 10px 0; }
  .section-bd { padding: 0 12px 10px; }
  .grid-menu { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .grid-item { padding: 10px 4px; }
  .grid-icon { width: 40px; height: 40px; }
  .grid-icon img { width: 28px; height: 28px; }
  .grid-name { font-size: 11px; }
  .tab { padding: 10px 8px; font-size: 13px; }
  .modal-body { padding: 12px; }
  .qa-btn { padding: 9px 4px; font-size: 13px; }
  .pm-item, .wm-item { padding: 10px 10px; }
  .pm-name, .wm-name { font-size: 13px; }
  .pm-desc, .wm-desc { font-size: 11px; }
  .btn-primary, .btn-ghost { font-size: 14px; }
}

/* 大屏手机 (376px-414px) */
@media (max-width: 414px) {
  .grid-menu { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .balance-card { padding: 19px 15px 21px; }
  .bal-btn .bal-ico { width: 48px; height: 48px; }
}

/* 横屏适配 */
@media (max-height: 500px) and (orientation: landscape) {
  .modal { max-height: 92vh; }
}

/* 平板/桌面：内容居中，宽度限制 480px */
@media (min-width: 768px) {
  body { max-width: 480px; margin: 0 auto; box-shadow: 0 0 24px rgba(0, 0, 0, .08); min-height: 100vh; }
  .nav-bar, .user-hero, .section, .grid-menu { max-width: 480px; margin-left: auto; margin-right: auto; }
  .tabbar { max-width: 480px; left: 50%; transform: translateX(-50%); }
}
