/* ============================================================================
   H5 端 · 商业级移动后台（吸顶工具栏 + 摘要卡 + 固定标签栏 + 底部抽屉）
   ============================================================================ */
body { font-size: 14px; }

.page { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(72px + var(--safe-bottom)); }
.page.no-nav { padding-bottom: 28px; }

/* ---------------- 顶部栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: var(--bar);
  border-bottom: 1px solid var(--line);
}
.topbar .title { font-size: 15px; font-weight: 600; flex: 1; letter-spacing: -.1px; }
.topbar .sub { font-size: 11.5px; color: var(--muted); font-weight: 400; display: block; margin-top: 1px; }
.topbar .action {
  font-size: 12.5px; font-weight: 550; color: var(--text-2); background: var(--surface);
  border: 1px solid var(--line); padding: 0 12px; height: 30px; border-radius: 7px; cursor: pointer; font-family: inherit;
}
.topbar .action:hover { background: var(--surface-3); }

/* ---------------- 券摘要卡 ---------------- */
.balance-card {
  margin: 12px; padding: 16px 16px 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.balance-card .head { display: flex; align-items: center; gap: 8px; }
.balance-card .head .mark {
  width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center;
  background: var(--gold-soft); color: var(--gold); flex: none;
}
.balance-card .head .mark svg { width: 15px; height: 15px; }
.balance-card .label { font-size: 12.5px; color: var(--muted); flex: 1; }
.balance-card .amount { font-size: 32px; font-weight: 650; letter-spacing: -1px; margin-top: 10px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.balance-card .amount small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.balance-card .meta { display: flex; margin-top: 14px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.balance-card .meta > div { flex: 1; min-width: 0; }
.balance-card .meta > div + div { border-left: 1px solid var(--line-2); padding-left: 12px; }
.balance-card .meta .k { font-size: 11.5px; color: var(--muted); }
.balance-card .meta b { font-size: 15px; display: block; margin-top: 2px; font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---------------- 固定标签栏 ---------------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-width: 560px; margin: 0 auto;
  display: flex; background: var(--bar);
  border-top: 1px solid var(--line); padding: 6px 4px calc(6px + var(--safe-bottom));
}
.tabbar .nav {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px;
  border: none; background: none; font-family: inherit; font-size: 10.5px; font-weight: 500;
  color: var(--muted); cursor: pointer; border-radius: 7px;
}
.tabbar .nav .ico { display: flex; align-items: center; justify-content: center; height: 20px; }
.tabbar .nav .ico svg { width: 20px; height: 20px; }
.tabbar .nav.on { color: var(--accent); font-weight: 600; }

/* ---------------- 底部抽屉 ---------------- */
.modal-mask { display: flex; align-items: flex-end; justify-content: center; }
.modal-box {
  width: 100%; max-width: 560px; border-radius: 14px 14px 0 0; padding-top: 6px; position: relative;
  border-bottom: none; animation: sheetUp .2s ease;
}
.modal-box::before {
  content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 34px; height: 4px; border-radius: 2px; background: var(--line);
}
.modal-head { padding-top: 16px; }
.modal-body { max-height: 66vh; }
.modal-foot { padding-bottom: calc(14px + var(--safe-bottom)); }
.modal-foot .btn { flex: 1; }
@keyframes sheetUp { from { transform: translateY(20px); opacity: .6; } to { transform: none; opacity: 1; } }

/* ---------------- 表单与按钮（触控尺寸） ---------------- */
.input, select.input, textarea.input { height: 42px; font-size: 14.5px; }
textarea.input { height: auto; }
select.input { padding-right: 32px; }
.btn { height: 40px; font-size: 14px; border-radius: var(--radius-sm); }
.btn.sm { height: 30px; font-size: 12.5px; }
.btn.xs { height: 26px; font-size: 12px; }
.card { padding: 14px 15px; }

/* ---------------- 登录（结构来自 base.css，这里只做移动端适配） ---------------- */
.login-screen { padding: 18px; align-items: center; }
.login-box { width: 100%; max-width: 400px; padding: 22px 18px 18px; }
.login-box .btn[type=submit] { height: 42px; font-size: 14.5px; }

/* ---------------- 指标小卡 ---------------- */
.ticker { display: grid; grid-template-columns: repeat(auto-fit, minmax(102px, 1fr)); gap: 10px; margin: 0 12px 2px; }
.ticker .t { padding: 11px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line-2); }
.ticker .t .k { font-size: 11.5px; color: var(--muted); }
.ticker .t .v { font-size: 17px; font-weight: 650; margin-top: 3px; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.ticker .t .v.green { color: var(--pos); }
.ticker .t .v.red { color: var(--neg); }
.ticker .t .v.brand { color: var(--accent); }
