/* ===== 代付流程公共样式（按截图 1:1 还原） ===== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Helvetica, "Microsoft YaHei", Arial, sans-serif;
  color: #1a1a1a;
  background: #f5f5f5;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
img { display: block; }

.page {
  max-width: 500px;
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 30px;
}

/* ---------- 顶部用户信息 ---------- */
.user-bar {
  display: flex;
  align-items: center;
  padding: 20px 18px 16px;
}
.user-bar .avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #ececec;
  border: 2px solid #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,.08);
  object-fit: cover;
  flex: none;
}
.user-bar .user-text { margin-left: 16px; min-width: 0; }
.user-bar .nickname {
  font-size: 20px;
  font-weight: 600;
  color: #222;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-bar .greeting {
  margin-top: 5px;
  font-size: 16px;
  color: #8b8b8b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 白色卡片 ---------- */
.card {
  background: #fff;
  border-radius: 16px;
  margin: 0 12px 14px;
  padding: 28px 18px 26px;
}

/* ---------- 金额 ---------- */
.pay-label {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  color: #222;
}
.pay-amount {
  text-align: center;
  margin: 14px 0 16px;
  color: #111;
  font-weight: 700;
}
.pay-amount .yen { font-size: 32px; }
.pay-amount .num { font-size: 58px; letter-spacing: -1px; }
.pay-amount.small .yen { font-size: 26px; }
.pay-amount.small .num { font-size: 50px; }

/* ---------- 倒计时（支付前：黑底方块） ---------- */
.countdown {
  text-align: center;
  font-size: 16px;
  color: #8b8b8b;
}
.countdown .cd-box {
  display: inline-block;
  min-width: 25px;
  padding: 2px 5px 3px;
  margin: 0 1px;
  background: #1f1f1f;
  color: #fff;
  border-radius: 5px;
  font-family: "DIN Alternate", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.1;
  vertical-align: 2px;
}
.countdown .cd-colon {
  color: #1f1f1f;
  font-weight: 700;
  margin: 0 3px;
}

/* ---------- 付款须知 ---------- */
.notice {
  margin-top: 24px;
  background: #fff7d6;
  border-radius: 12px;
  padding: 18px 20px;
}
.notice .notice-title {
  font-size: 17px;
  font-weight: 600;
  color: #ab8743;
  margin-bottom: 10px;
}
.notice .notice-body {
  font-size: 16px;
  line-height: 1.75;
  color: #ab8743;
}

/* ---------- 黄色主按钮 ---------- */
.btn-primary {
  display: block;
  width: 100%;
  height: 60px;
  margin-top: 24px;
  border: none;
  border-radius: 14px;
  background: #ffe127;
  color: #222;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1px;
}
.btn-primary:active { opacity: .85; }
.btn-primary.disabled { background: #f0e6b0; color: #8a8260; pointer-events: none; }

/* ---------- 店铺 / 商品卡片 ---------- */
.goods-card { padding-bottom: 20px; }
.store-name {
  font-size: 17px;
  font-weight: 600;
  color: #1f1f1f;
  padding: 18px 12px 14px;
}
.goods-row {
  display: flex;
  padding: 0 12px;
}
.goods-img {
  width: 62px;
  height: 62px;
  border-radius: 8px;
  object-fit: cover;
  background: #f2f2f2;
  flex: none;
}
.goods-info {
  flex: 1;
  min-width: 0;
  margin-left: 10px;
}
.goods-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.goods-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f1f1f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 8px;
}
.goods-price {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
  flex: none;
}
.goods-spec {
  margin-top: 6px;
  font-size: 13px;
  color: #9a9a9a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 8px;
}
.goods-origin {
  margin-top: 6px;
  font-size: 14px;
  color: #b0b0b0;
  text-decoration: line-through;
  flex: none;
}
.goods-qty { margin-top: 6px; font-size: 13px; color: #9a9a9a; }

/* ===============  收银台 =============== */
body.cashier-page, body.paysuccess-page { background: #f7f7f7; }
.cash-head { text-align: center; padding: 50px 20px 0; }
.cash-time { font-size: 16px; color: #9a9a9a; }
.cash-amount {
  margin: 14px 0 0;
  font-size: 56px;
  font-weight: 700;
  color: #161616;
}
.cash-amount .yen { font-size: 30px; }

.pay-method {
  display: flex;
  align-items: center;
  margin: 64px 14px 0;
  background: #fff;
  border-radius: 14px;
  padding: 22px 20px;
}
.pay-method .wx-name {
  margin-left: 12px;
  font-size: 18px;
  color: #1a1a1a;
}
.pay-method .wx-check { margin-left: auto; }

.cash-footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(14px + constant(safe-area-inset-bottom));
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  max-width: 500px;
  margin: 0 auto;
}
.btn-pill {
  display: block;
  width: 100%;
  height: 60px;
  border: none;
  border-radius: 30px;
  background: #ffe127;
  color: #222;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 2px;
}
.btn-pill:active { opacity: .85; }
.btn-pill.loading { opacity: .6; pointer-events: none; }

/* 调起支付加载提示 */
.cash-loading {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.cash-loading.show { display: flex; }
.cash-loading .toast {
  background: rgba(0,0,0,.72);
  color: #fff;
  border-radius: 12px;
  padding: 22px 26px;
  font-size: 15px;
  text-align: center;
}
.cash-loading .spinner {
  width: 30px;
  height: 30px;
  margin: 0 auto 12px;
  border: 3px solid rgba(255,255,255,.3);
  border-top-color: #ffe127;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===============  微信支付成功页 =============== */
.ps-head { text-align: center; padding: 62px 20px 0; }
.ps-title {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
  color: #1a1a1a;
}
.ps-title .check-ico { margin-right: 12px; flex: none; }
.ps-title .ps-amount { margin-left: 12px; }
.ps-sub { margin-top: 18px; font-size: 17px; color: #8b8b8b; }

.reward-list { margin-top: 46px; padding: 0 14px; }
.reward-card {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  margin-bottom: 14px;
  min-height: 92px;
  overflow: hidden;
}
.reward-icon {
  width: 74px;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px dashed #e6e6e6;
  flex: none;
}
.reward-info { flex: 1; min-width: 0; padding: 0 10px; }
.reward-title {
  font-size: 15px;
  font-weight: 600;
  color: #f63546;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reward-sub {
  margin-top: 8px;
  font-size: 13px;
  color: #9a9a9a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reward-btn {
  flex: none;
  margin-right: 14px;
  border: none;
  border-radius: 20px;
  padding: 9px 16px;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(90deg, #ff6a76, #f4263d);
}
.reward-btn:active { opacity: .85; }

.ps-footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(14px + constant(safe-area-inset-bottom));
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  max-width: 500px;
  margin: 0 auto;
  background: linear-gradient(to top, #f7f7f7 70%, rgba(247,247,247,0));
  padding-top: 26px;
}
.btn-outline {
  display: block;
  width: 100%;
  height: 60px;
  border-radius: 30px;
  border: 1px solid #d3d3d3;
  background: #fff;
  color: #222;
  font-size: 19px;
  letter-spacing: 2px;
}
.btn-outline:active { background: #f2f2f2; }

/* ===============  代付成功 =============== */
.result-head { text-align: center; }
.result-head .success-title {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
}
.result-head .success-title .check-ico { margin-right: 10px; }
.result-head .pay-type { margin-top: 14px; font-size: 16px; color: #9a9a9a; }
