/* ============ 支付中心 移动端优先 ============ */
:root {
  --brand: #2f6bff;
  --brand-dark: #1f56d6;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #17233d;
  --muted: #8a94a6;
  --line: #e6eaf2;
  --success: #16a34a;
  --danger: #dc2626;
  --warn: #d97706;
  --radius: 14px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
#app { max-width: 520px; margin: 0 auto; padding: 16px 16px 40px; }

/* 头部 */
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.topbar h1 { font-size: 20px; margin: 0; font-weight: 700; }
.back-btn { cursor: pointer; font-size: 22px; color: var(--text); padding: 4px 8px; }

/* 卡片 */
.card { background: var(--card); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(23,35,61,.06); }
.card h2 { margin: 0 0 12px; font-size: 16px; }
.card h3 { margin: 0 0 8px; font-size: 14px; }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; background: #fff; color: var(--text); outline: none;
}
.field input:focus, .field select:focus { border-color: var(--brand); }
.amount-wrap { display: flex; align-items: center; gap: 10px; }
.amount-wrap .cur { font-size: 20px; font-weight: 700; color: var(--brand); min-width: 40px; }
.amount-wrap input { font-size: 28px; font-weight: 700; padding: 10px 0; border: none; border-bottom: 2px solid var(--line); border-radius: 0; }

/* 按钮 */
.btn { display: block; width: 100%; padding: 13px; border: none; border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer; text-align: center; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:active { background: var(--brand-dark); }
.btn-primary:disabled { background: #b9c6e8; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn-danger { background: #fee2e2; color: var(--danger); }
.btn-outline { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn-row { display: flex; gap: 10px; margin-top: 10px; }
.btn-row .btn { flex: 1; }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 8px; width: auto; }

/* 金额展示 */
.amount-big { font-size: 32px; font-weight: 800; color: var(--text); }
.amount-big .cur { font-size: 18px; color: var(--muted); margin-right: 4px; }
.muted { color: var(--muted); font-size: 13px; }

/* 银行卡 */
.card-item { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.card-item.active { border-color: var(--brand); background: #f0f5ff; }
.brand-ico { width: 46px; height: 32px; border-radius: 6px; background: linear-gradient(135deg, #2f6bff, #7aa2ff); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.card-meta { flex: 1; }
.card-meta .num { font-weight: 600; }
.card-meta .sub { font-size: 12px; color: var(--muted); }
.tag-default { font-size: 11px; color: var(--brand); background: #e3edff; padding: 1px 7px; border-radius: 8px; }
.card-actions { display: flex; gap: 8px; }

/* 状态屏 */
.status-screen { text-align: center; padding: 30px 10px; }
.status-icon { font-size: 56px; margin-bottom: 10px; }
.status-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.status-desc { color: var(--muted); margin-bottom: 18px; }
.spinner { width: 44px; height: 44px; border: 4px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.c-success { color: var(--success); }
.c-danger { color: var(--danger); }
.c-warn { color: var(--warn); }

/* 列表 */
.list-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: none; }
.list-item .left { flex: 1; }
.list-item .title { font-weight: 600; }
.list-item .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pill { font-size: 12px; padding: 3px 10px; border-radius: 10px; font-weight: 600; }
.pill.PENDING { background: #eef2ff; color: #4f46e5; }
.pill.PROCESSING { background: #e0f2fe; color: #0369a1; }
.pill.SUCCESS { background: #dcfce7; color: #16a34a; }
.pill.FAILED { background: #fee2e2; color: #dc2626; }
.pill.CANCELED { background: #f1f5f9; color: #64748b; }
.pill.EXPIRED { background: #fef3c7; color: #d97706; }

/* 空状态 */
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.empty .ico { font-size: 44px; margin-bottom: 8px; }

/* Toast */
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: rgba(23,35,61,.92); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 999; max-width: 80%; }
.toast.show { opacity: 1; }

/* Tab 导航 */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; max-width: 520px; margin: 0 auto; background: #fff; border-top: 1px solid var(--line); display: flex; padding-bottom: env(safe-area-inset-bottom); }
.tabbar .tab { flex: 1; text-align: center; padding: 10px 0; font-size: 12px; color: var(--muted); cursor: pointer; }
.tabbar .tab.active { color: var(--brand); font-weight: 600; }
.tabbar .tab .ico { font-size: 20px; display: block; }

/* 订单回执 */
.receipt { text-align: center; }
.receipt-head { padding: 8px 0 4px; }
.receipt-icon { width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%; font-size: 28px; line-height: 56px; font-weight: 700; }
.receipt-icon.c-success { background: #dcfce7; color: var(--success); }
.receipt-icon.c-danger { background: #fee2e2; color: var(--danger); }
.receipt-icon.c-warn { background: #fef3c7; color: var(--warn); }
.receipt-status { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.receipt-status.c-success { color: var(--success); }
.receipt-status.c-danger { color: var(--danger); }
.receipt-status.c-warn { color: var(--warn); }
.receipt-amount { font-size: 30px; font-weight: 800; margin: 6px 0 12px; }
.receipt-amount .cur { font-size: 16px; color: var(--muted); margin-right: 2px; font-weight: 600; }
.receipt-meta { text-align: left; border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 8px; }
.receipt-meta .kv { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; }
.receipt-meta .kv .k { color: var(--muted); }
.receipt-meta .kv .v { font-weight: 500; word-break: break-all; text-align: right; max-width: 65%; }

/* 时间线 */
.tl { padding-left: 8px; }
.tl-item { position: relative; padding: 0 0 20px 28px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ''; position: absolute; left: 9px; top: 14px; bottom: -2px; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--line); box-sizing: border-box; }
.tl-item.done .tl-dot { background: var(--brand); border-color: var(--brand); }
.tl-item.done .tl-dot::after { content: ''; position: absolute; left: 5px; top: 3px; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tl-item.active .tl-dot { border-color: var(--warn); background: #fef3c7; }
.tl-title { font-size: 14px; font-weight: 600; }
.tl-time { font-size: 12px; color: var(--muted); margin-top: 1px; }
.tl-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }

@media (min-width: 520px) {
  #app { padding-top: 24px; }
  .tabbar { border-radius: 16px 16px 0 0; box-shadow: 0 -2px 10px rgba(23,35,61,.05); }
}
