/* ============ 云充充值 · 前台样式（浅色主题） ============ */
:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e6eaf2;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eef4ff;
  --violet: #7c3aed;
  --ok: #0e9f6e;
  --ok-soft: #e7f8f1;
  --warn: #c2760a;
  --warn-soft: #fdf3e3;
  --bad: #dc2626;
  --bad-soft: #fdecec;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  box-shadow: 0 6px 14px rgba(37, 99, 235, .28);
}

.brand-name { font-weight: 700; font-size: 17px; }

.shop-tag {
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid #dbe7ff;
  padding: 2px 8px;
  border-radius: 999px;
}

.nav { display: flex; gap: 6px; }

.nav a {
  font-size: 14px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 8px;
}

.nav a:hover { color: var(--text); background: #f1f5fb; }

/* ---------- 提示 ---------- */
.alert {
  margin: 14px 0 0;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14px;
  border: 1px solid transparent;
}

.alert-success { background: var(--ok-soft); color: #05603a; border-color: #c9f0dd; }
.alert-error { background: var(--bad-soft); color: #991b1b; border-color: #f7d4d4; }
.alert-info { background: var(--primary-soft); color: #173a8a; border-color: #dbe7ff; }

/* ---------- 首页 Hero ---------- */
.hero {
  margin: 18px 0;
  padding: 26px 24px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(120deg, #1d4ed8 0%, #4f46e5 55%, #7c3aed 100%);
  box-shadow: 0 14px 34px rgba(37, 99, 235, .22);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}

.hero h1 { font-size: 24px; margin-bottom: 6px; }
.hero p { color: rgba(255, 255, 255, .86); font-size: 14px; }

.hero-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.hero-badges span {
  font-size: 12px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---------- 业务类型 Tab ---------- */
.kind-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 2px;
  margin-bottom: 6px;
  scrollbar-width: none;
}

.kind-tabs::-webkit-scrollbar { display: none; }

.kind-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.kind-tab.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .16);
}

.kind-panel { display: none; padding-top: 12px; }
.kind-panel.active { display: block; }

/* ---------- 分类与商品 ---------- */
.cat-block { margin-bottom: 22px; }

.cat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 10px;
}

.cat-head h3 { font-size: 15px; }
.cat-head .hint { font-size: 12px; color: var(--muted); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 12px;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: #cfdcf7;
  box-shadow: var(--shadow);
}

.pc-face {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.pc-face small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 2px; }

.pc-name {
  font-size: 12.5px;
  color: var(--muted);
  min-height: 38px;
  line-height: 1.45;
}

.pc-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; }

.pc-price { color: var(--bad); font-weight: 800; font-size: 18px; }
.pc-price small { font-size: 12px; font-weight: 700; }

.pc-btn {
  border: 0;
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}

.pc-btn:hover { filter: brightness(1.05); }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 60px 20px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px dashed var(--line);
}

/* ---------- 卡片 / 表单 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.page-title { margin: 22px 0 4px; font-size: 20px; }
.page-sub { color: var(--muted); font-size: 13px; margin-bottom: 16px; }

.field { margin-bottom: 15px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.field .tip { font-size: 12px; color: var(--muted); margin-top: 5px; }

.input, select.input, textarea.input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #d8e0ec;
  border-radius: 11px;
  font-size: 14.5px;
  background: #fff;
  color: var(--text);
  outline: none;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 11px;
  padding: 11px 18px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  background: #eef2f8;
  color: var(--text);
  font-family: inherit;
}

.btn:hover { filter: brightness(.98); }
.btn-primary { background: linear-gradient(135deg, var(--primary), #4f46e5); color: #fff; box-shadow: 0 8px 18px rgba(37, 99, 235, .22); }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 20px; font-size: 15.5px; }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn-ghost { background: #fff; border: 1px solid var(--line); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ---------- 下单页 ---------- */
.buy-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 40px;
}

.face-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8faff, #eef4ff);
  border: 1px solid #e0e9fb;
  margin-bottom: 18px;
}

.face-hero .icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
  border: 1px solid #e6edf9;
}

.face-hero .name { font-weight: 700; font-size: 15px; }
.face-hero .meta { font-size: 12.5px; color: var(--muted); }

.pay-summary { font-size: 14px; }
.pay-summary .row { display: flex; justify-content: space-between; padding: 7px 0; color: var(--muted); }
.pay-summary .row b { color: var(--text); }
.pay-summary .total { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 12px; }
.pay-summary .total b { color: var(--bad); font-size: 22px; font-weight: 800; }

/* ---------- 订单状态 ---------- */
.status-hero { text-align: center; padding: 26px 16px 10px; }
.status-icon { font-size: 44px; line-height: 1; margin-bottom: 8px; }
.status-hero h2 { font-size: 20px; }
.status-hero p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

.kv { border-top: 1px solid var(--line); margin-top: 16px; }
.kv .row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f4f9; font-size: 14px; }
.kv .row span { color: var(--muted); flex: none; }
.kv .row b { font-weight: 600; text-align: right; word-break: break-all; }

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  line-height: 1.7;
}

.badge.ok { background: var(--ok-soft); color: #05704c; }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--primary-soft); color: #1b49a8; }
.badge.muted { background: #eef1f6; color: var(--muted); }

.qr-box { display: grid; place-items: center; padding: 14px; }
.qr-box canvas, .qr-box img { border-radius: 10px; border: 1px solid var(--line); }
.qr-amount { text-align: center; font-size: 13px; color: var(--muted); margin-top: 10px; }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 16px 0; }
.pager a, .pager span {
  font-size: 13px;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}
.pager a.active { background: var(--text); border-color: var(--text); color: #fff; }
.pager-info { border: 0 !important; background: transparent !important; }

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 40px;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
  background: #fff;
}

.footer a { color: var(--muted); }

/* ---------- 登录页 ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px 16px;
  background:
    radial-gradient(900px 400px at 10% 0%, #e8f0ff 0%, transparent 60%),
    radial-gradient(700px 400px at 100% 100%, #f3e8ff 0%, transparent 55%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 20px;
  padding: 30px 26px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .1);
  border: 1px solid var(--line);
}

.auth-card h1 { font-size: 22px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.auth-foot { margin-top: 18px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
  .buy-layout { grid-template-columns: 1fr; }
  .hero { padding: 20px 18px; }
  .hero h1 { font-size: 20px; }
  .nav a { padding: 6px 8px; font-size: 13px; }
  .brand-name { font-size: 15px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .card { padding: 16px; }
}

@media (max-width: 480px) {
  .topbar-inner { gap: 4px; }
  .brand-name {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .shop-tag { display: none; }
  .nav {
    margin-left: auto;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 6px 6px; font-size: 12.5px; white-space: nowrap; }
  body { overflow-x: hidden; }
}

/* ============ 用户中心 ============ */
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.empty { padding: 26px 4px; text-align: center; color: var(--muted); font-size: 13.5px; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.card-head h3 { margin: 0; font-size: 15px; }

.me-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.me-label { font-size: 12.5px; color: var(--muted); }
.me-balance {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.5px;
  margin: 4px 0 2px;
  color: #0f172a;
}
.me-sub { font-size: 12.5px; color: var(--muted); }

.me-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.me-stat {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.me-stat span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.me-stat b { font-size: 18px; }

.me-table-wrap { overflow-x: auto; }
.me-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.me-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.me-table td { padding: 11px 10px; border-bottom: 1px solid #f2f5fa; vertical-align: middle; }
.me-table tr:last-child td { border-bottom: 0; }

.me-logs { list-style: none; margin: 0; padding: 0; }
.me-logs li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}
.me-logs li:last-child { border-bottom: 0; }

@media (max-width: 560px) {
  .me-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .me-balance { font-size: 27px; }
}

/* ============ 支付方式 ============ */
.nav-bal {
  font-size: 12.5px;
  font-weight: 700;
  color: #1d4ed8;
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}
.pay-block { margin-bottom: 4px; }
.pay-or {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  margin: 14px 0 12px;
}
.pay-or::before,
.pay-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ============ 余额充值页 ============ */
.pay-cols { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.pay-qr { flex: 0 0 auto; text-align: center; }
.pay-qr img {
  width: 210px; height: 210px; object-fit: contain;
  border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 8px;
}
.qr-cap { margin-top: 8px; font-size: 12px; color: var(--muted); }
.qr-placeholder {
  width: 210px; min-height: 210px;
  border: 1px dashed #d8e0ec; border-radius: 14px; background: #fbfdff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px; gap: 6px;
}
.qr-placeholder b { color: #64748b; font-size: 13px; }
.qr-placeholder p { margin: 0; font-size: 12px; color: var(--muted); }
.pay-info { flex: 1; min-width: 260px; }
.pay-steps { margin: 0 0 14px; padding-left: 20px; font-size: 13.5px; line-height: 2; color: #334155; }
.pay-steps li::marker { color: #2563eb; font-weight: 700; }
.copy-row { display: flex; gap: 8px; }
.copy-row .ipt { flex: 1; }

/* ============ 悬浮客服 ============ */
.svc-fab {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 15px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #4f8bf5);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(37, 99, 235, .35);
}
.svc-fab:hover { transform: translateY(-1px); }
.svc-fab-icon { font-size: 15px; line-height: 1; }
.svc-mask {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 23, 42, .48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.svc-mask[hidden] { display: none; }
.svc-dialog {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .3);
}
.svc-dialog h3 { margin: 0 0 4px; font-size: 17px; }
.svc-sub { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); }
.svc-dialog img {
  width: 216px; height: 216px; object-fit: contain;
  border: 1px solid var(--line); border-radius: 12px; padding: 6px; background: #fff;
}
.svc-noqr {
  width: 216px; min-height: 150px; margin: 0 auto;
  border: 1px dashed #d8e0ec; border-radius: 12px; background: #fbfdff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; color: var(--muted); padding: 14px;
}
.svc-wechat {
  margin-top: 12px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; color: #334155;
}
.svc-wechat b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.svc-note { margin-top: 10px; font-size: 12px; color: var(--muted); line-height: 1.65; }
.svc-x {
  position: absolute; top: 8px; right: 10px;
  border: 0; background: transparent; font-size: 22px; line-height: 1;
  color: #94a3b8; cursor: pointer;
}
.svc-link { display: inline-block; margin-top: 12px; font-size: 12.5px; color: #2563eb; }

@media (max-width: 480px) {
  .svc-fab { right: 12px; bottom: 14px; padding: 9px 13px; font-size: 13px; }
  .svc-dialog img, .svc-noqr { width: 180px; }
  .svc-dialog img { height: 180px; }
}

/* ============ 充值说明（后台可配置） ============ */
.guide-title { font-size: 15px; margin-bottom: 12px; }
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.7;
}
.guide-item b { display: block; color: #0f172a; }
.guide-item p { margin: 2px 0 0; }

/* ============ 商品页：支付方式 ============ */
.pay-opts { display: grid; gap: 8px; }
.pay-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid #d8e0ec;
  border-radius: 11px;
  background: #fbfdff;
  cursor: pointer;
  position: relative;
}
.pay-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pay-opt.active { border-color: var(--primary); background: #f5f9ff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.pay-opt.is-disabled { opacity: .62; cursor: not-allowed; }
.po-ico { font-size: 18px; }
.po-body { display: flex; flex-direction: column; min-width: 0; }
.po-body b { font-size: 14px; }
.po-body small { font-size: 12px; color: var(--muted); }
.po-dot {
  margin-left: auto;
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  position: relative;
}
.pay-opt.active .po-dot { border-color: var(--primary); background: var(--primary); }
.pay-opt.active .po-dot::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

/* ============ 订单页：支付方式切换 ============ */
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.pay-method {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  padding: 11px 12px;
  border: 1px solid #d8e0ec;
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
}
.pay-method.active { border-color: var(--primary); background: #f5f9ff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.pm-ico { font-size: 19px; }
.pm-body { display: flex; flex-direction: column; min-width: 0; }
.pm-body b { font-size: 13.5px; color: var(--text); }
.pm-body small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-check { margin-left: auto; width: 15px; height: 15px; flex: none; border-radius: 50%; border: 1.5px solid #cbd5e1; }
.pay-method.active .pm-check { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 3px #fff; }

.balance-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fbfdff; }
.balance-box p { font-size: 13px; color: var(--muted); }
.balance-line { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--muted); padding: 3px 0; }
.balance-line b { color: var(--text); font-size: 15px; }
.balance-box form { margin-top: 10px; }
.balance-actions { display: flex; gap: 8px; margin-top: 12px; }
.balance-actions .btn { flex: 1; }
.status-refund { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 10px; font-size: 12px; }

/* ============ 退单页 ============ */
.refund-amount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff5f5, #fff);
  border: 1px solid #fde2e2;
  margin-top: 6px;
}
.refund-amount span { font-size: 13px; color: var(--muted); }
.refund-amount b { font-size: 24px; color: var(--bad); }
.refund-way { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12.5px;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.chip.active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.me-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ============ H5 手机版 ============ */
.mnav { display: none; }
.mobile-buybar { display: none; }

@media (max-width: 640px) {
  body { font-size: 14.5px; -webkit-text-size-adjust: 100%; }
  body.has-mnav { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  body.has-mnav:has(.mobile-buybar) { padding-bottom: calc(128px + env(safe-area-inset-bottom)); }
  .container { padding: 0 12px; }
  .topbar-inner { height: 52px; }
  .brand-mark { width: 28px; height: 28px; border-radius: 9px; font-size: 14px; }
  .brand-name { font-size: 15px; max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .shop-tag { font-size: 11px; padding: 2px 6px; }
  .nav { display: none; }

  .hero { margin: 12px 0; padding: 18px 16px; border-radius: 16px; }
  .hero h1 { font-size: 19px; line-height: 1.35; }
  .hero p { font-size: 13px; }
  .hero-badges { gap: 6px; margin-top: 10px; }
  .hero-badges span { font-size: 11.5px; padding: 3px 8px; }

  .kind-tabs {
    position: sticky;
    top: 52px;
    z-index: 20;
    background: var(--bg);
    margin: 0 -12px 4px;
    padding: 8px 12px;
  }
  .kind-tab { padding: 8px 13px; font-size: 13.5px; border-radius: 10px; }
  .cat-head { margin: 10px 0 8px; }

  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .product-card { padding: 11px; border-radius: 13px; gap: 7px; }
  .product-card:hover { transform: none; box-shadow: none; }
  .pc-face { font-size: 19px; }
  .pc-name { font-size: 12px; min-height: 34px; line-height: 1.4; }
  .pc-price { font-size: 17px; }
  .pc-btn { padding: 5px 8px; font-size: 11.5px; border-radius: 8px; }

  .card { padding: 14px; border-radius: 14px; }
  .page-title { margin: 16px 0 3px; font-size: 18px; }
  .page-sub { font-size: 12.5px; margin-bottom: 12px; }
  .field { margin-bottom: 13px; }
  .input, select.input, textarea.input { font-size: 16px; padding: 11px 12px; }
  .btn { min-height: 42px; }
  .btn-lg { min-height: 48px; }
  .pay-summary .total b { font-size: 20px; }

  .status-hero { padding: 16px 8px 4px; }
  .status-icon { font-size: 38px; }
  .status-hero h2 { font-size: 18px; }
  .kv .row { font-size: 13.5px; padding: 9px 0; }
  .footer { margin-top: 26px; padding: 18px 0 22px; font-size: 12px; }

  /* 商品页底部支付条 */
  .buy-layout { margin-bottom: 20px; }
  .desktop-only { display: none !important; }
  .mobile-buybar {
    display: flex;
    align-items: center;
    gap: 12px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(58px + env(safe-area-inset-bottom));
    z-index: 30;
    padding: 8px 12px;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
  }
  .mobile-buybar .mb-price { display: flex; flex-direction: column; line-height: 1.2; }
  .mobile-buybar .mb-price small { font-size: 11px; color: var(--muted); }
  .mobile-buybar .mb-price b { font-size: 20px; color: var(--bad); font-weight: 800; }
  .mobile-buybar .btn { flex: 1; }

  .pay-methods { grid-template-columns: 1fr; gap: 8px; }
  .pay-method { padding: 12px; }
  .pm-body small { white-space: normal; }

  /* 我的订单：表格转卡片 */
  .me-table-wrap { overflow: visible; }
  .me-table { display: block; min-width: 0; }
  .me-table thead { display: none; }
  .me-table tbody { display: block; }
  .me-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 10px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
  }
  .me-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0;
    border: 0;
    font-size: 13px;
    text-align: right;
  }
  .me-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    flex: none;
    text-align: left;
  }
  .me-table td[data-label="订单号"],
  .me-table td[data-label="商品"] { grid-column: 1 / -1; }
  .me-table td[data-label="订单号"] { justify-content: flex-start; font-size: 11.5px; color: var(--muted); }
  .me-table td[data-label="订单号"]::before { display: none; }
  .me-table td[data-label="商品"] { font-weight: 600; font-size: 14px; }
  .me-table td[data-label="操作"] {
    grid-column: 1 / -1;
    justify-content: flex-end;
    margin-top: 2px;
    padding-top: 8px;
    border-top: 1px dashed var(--line);
  }
  .me-table td[data-label="操作"]::before { display: none; }
  .me-actions { justify-content: flex-end; }
  .me-head > div:last-child { width: 100%; }
  .me-head .btn { flex: 1; }

  /* 底部导航 */
  .mnav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    height: 56px;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 11px;
    color: var(--muted);
    cursor: pointer;
  }
  .mnav-item .mi { font-size: 19px; line-height: 1; }
  .mnav-item.active { color: var(--primary); font-weight: 700; }

  .svc-fab { display: none; }
  .svc-dialog img, .svc-noqr { width: 190px; }
  .svc-dialog img { height: 190px; }
}

@media (max-width: 360px) {
  .product-grid { gap: 8px; }
  .pc-btn { display: none; }
}
