/* 收款系统前台样式（手机优先） */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: #f4f5f7;
  color: #1f2329;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: #07c160; text-decoration: none; }
h1, h2, h3 { margin: 0; }
h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }

.wrap {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 24px;
}
.wrap.wide { max-width: 720px; }
.wrap > main { flex: 1; }

/* 品牌头 */
.brand {
  background: linear-gradient(135deg, #07c160 0%, #2ed573 100%);
  color: #fff;
  padding: 28px 18px 22px;
}
.brand h1 { font-size: 22px; font-weight: 600; }
.brand p { margin: 6px 0 0; font-size: 13px; opacity: .92; }

/* 顶部返回栏 */
.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid #eee;
  font-size: 15px;
}
.nav .back {
  width: 36px; height: 36px; line-height: 36px;
  text-align: center; font-size: 28px; color: #333;
  margin-left: -6px;
}

.sec-title { font-size: 16px; font-weight: 600; padding: 16px 16px 10px; }
main > .sec-title:first-child, main > .notice:first-child { padding-top: 14px; }

/* 商品卡片 */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 12px; }
.prod {
  display: block;
  background: #fff;
  border-radius: 12px;
  padding: 16px 14px 14px;
  color: #1f2329;
}
.prod:active { background: #f0f0f0; }
.prod .name { font-size: 16px; font-weight: 600; line-height: 1.35; }
.prod .desc { color: #8a8f99; font-size: 12px; margin-top: 6px; min-height: 34px; line-height: 17px; }
.price-row { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; }
.price { color: #ff5000; font-weight: 700; font-size: 22px; }
.price small { font-size: 14px; margin-right: 1px; }
.market { color: #b0b3ba; font-size: 12px; text-decoration: line-through; }
.price-row.big .price { font-size: 30px; }

.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin: 0 12px 12px;
}
.card.entry { display: flex; align-items: center; justify-content: space-between; }
.card.entry .name { font-size: 16px; font-weight: 600; }
.card.entry .desc { color: #8a8f99; font-size: 12px; margin-top: 4px; }
.card.entry .arrow { color: #c5c8ce; font-size: 26px; line-height: 1; }

.detail { padding: 12px 0 84px; }
.p-name { font-size: 20px; font-weight: 600; }
.features { margin: 0; padding: 0; list-style: none; }
.features li { position: relative; padding: 4px 0 4px 18px; font-size: 14px; color: #3b3f45; }
.features li::before { content: "✓"; position: absolute; left: 0; color: #07c160; font-weight: 700; }

.field { display: block; margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field > span { display: block; font-size: 13px; color: #6b7075; margin-bottom: 6px; }
.field > span em { font-style: normal; color: #a8acb3; margin-left: 4px; font-size: 12px; }
input[type="text"], textarea, select {
  width: 100%;
  font-size: 16px;
  color: #1f2329;
  border: 1px solid #dcdee3;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  outline: none;
  -webkit-appearance: none;
}
input[type="text"]:focus { border-color: #07c160; }
input::placeholder { color: #b8bbc1; }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  position: relative;
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid #dcdee3;
  border-radius: 20px;
  font-size: 14px;
  color: #3b3f45;
  background: #fff;
  cursor: pointer;
}
.tab input { position: absolute; opacity: 0; left: 0; top: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.tab.on { border-color: #07c160; color: #07c160; background: #e9f9f0; font-weight: 600; }

.amount { display: flex; align-items: baseline; border-bottom: 1px solid #e5e6eb; padding-bottom: 6px; margin-top: 4px; }
.amount .yen { font-size: 26px; color: #1f2329; margin-right: 4px; }
.amount input { border: 0 !important; padding: 0 !important; font-size: 34px !important; font-weight: 600; width: 100%; }

.tip { color: #8a8f99; font-size: 12px; margin: 8px 0 0; }
.notice {
  margin: 12px 12px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7e6;
  color: #ad6800;
  font-size: 13px;
}
.card .notice { margin: 12px 0 0; }

/* 按钮 */
.btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: #07c160;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
}
.btn:active { opacity: .85; }
.btn.ghost { background: #fff; color: #07c160; border: 1px solid #07c160; font-weight: 500; }
.btn[disabled] { background: #c8f0d8; cursor: not-allowed; }

/* 底部支付栏 */
.bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  margin: 0 auto;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: #fff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, .05);
  z-index: 10;
}
.bar-price { flex: 1; display: flex; flex-direction: column; }
.bar-price small { color: #8a8f99; font-size: 12px; }
.bar-price span { color: #ff5000; font-size: 20px; font-weight: 700; }
.bar-btn { width: 46%; margin: 0; }

/* 付款页 */
.pay-page { padding: 16px 0 0; }
.pay-card { text-align: center; padding: 22px 18px 20px; }
.pay-title { font-size: 16px; font-weight: 600; color: #1f2329; }
.pay-title + .tip { margin-top: 2px; }
.pay-amount { color: #1f2329; font-size: 34px; font-weight: 700; margin: 10px 0 14px; }
.pay-amount small { font-size: 20px; margin-right: 2px; }
.qr-box {
  width: 220px; height: 220px;
  margin: 0 auto;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e5e6eb;
}
.qr-box img { width: 100%; height: 100%; display: block; }
.qr-tip { font-size: 14px; color: #3b3f45; margin: 14px 0 0; }
.pay-actions { display: flex; flex-direction: column; gap: 10px; padding: 0 12px; margin-top: 14px; }

/* 结果页与提示页 */
.result .msg-icon { margin: 0 auto 10px; }
.kv { display: grid; grid-template-columns: 76px 1fr; gap: 6px 10px; margin: 16px 0 0; text-align: left; font-size: 13px; }
.kv dt { color: #8a8f99; }
.kv dd { margin: 0; color: #1f2329; word-break: break-all; }
.msg-page { text-align: center; padding: 56px 24px 24px; }
.msg-page h2 { font-size: 20px; font-weight: 600; margin-top: 14px; }
.msg-text { color: #6b7075; font-size: 14px; margin: 10px 0 0; }
.msg-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.msg-icon {
  width: 64px; height: 64px; line-height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  font-size: 32px; font-weight: 700;
  color: #fff;
}
.msg-icon.ok { background: #07c160; }
.msg-icon.warn { background: #ff976a; }
.msg-icon.info { background: #409eff; }

.rich { font-size: 14px; color: #3b3f45; }
.rich p { margin: 0 0 8px; }

.foot {
  text-align: center;
  color: #a8acb3;
  font-size: 12px;
  padding: 10px 12px calc(14px + env(safe-area-inset-bottom));
  line-height: 1.8;
}
.foot a { color: #a8acb3; margin: 0 6px; }

@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .wrap.wide .grid { grid-template-columns: repeat(4, 1fr); }
}
