/* 灰隼速制 H5 · 移动端 · 品牌红 #C41E3A */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif; background: #f6f5f3; color: #333; min-height: 100vh; }
.page { max-width: 480px; margin: 0 auto; padding: 16px 16px 40px; min-height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; }
#tabBuy, #tabRecords { flex: 1 0 auto; }

.hero { padding: 28px 8px 20px; text-align: center; }
.hero-title { font-size: 1.35rem; font-weight: 700; color: #C41E3A; letter-spacing: 1px; }
.hero-sub { margin-top: 8px; font-size: 0.85rem; color: #888; }

.card { background: #fff; border-radius: 14px; padding: 20px 18px; box-shadow: 0 2px 12px rgba(0,0,0,0.05); }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.9rem; color: #555; margin-bottom: 8px; font-weight: 600; }
.field label em { color: #C41E3A; font-style: normal; }
.field input { width: 100%; height: 46px; border: 1px solid #e3e0dc; border-radius: 10px; padding: 0 14px; font-size: 1rem; background: #fbfaf9; outline: none; transition: border-color .15s; }
.field input:focus { border-color: #C41E3A; background: #fff; }
.unit-info { margin-top: 8px; font-size: 0.82rem; color: #2e7d32; min-height: 1.2em; }
.unit-info.err { color: #C41E3A; }
.unit-locked { width: 100%; min-height: 46px; line-height: 46px; border: 1px solid #e3e0dc; border-radius: 10px; padding: 0 14px; font-size: 1rem; background: #f7f6f4; color: #333; box-sizing: border-box; }

.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button { width: 46px; height: 46px; border: 1px solid #e3e0dc; border-radius: 10px; background: #fbfaf9; font-size: 1.3rem; color: #555; }
.stepper button:active { background: #f0eeeb; }
.stepper input { flex: 1; text-align: center; }

.summary { background: #fbf7f2; border: 1px solid #f0e6da; border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; }
.summary-row { display: flex; justify-content: space-between; font-size: 0.88rem; padding: 3px 0; }
.summary-row.muted { color: #999; font-size: 0.8rem; }
.summary-row.total { font-size: 1.05rem; font-weight: 700; color: #C41E3A; border-top: 1px dashed #e8dccd; margin-top: 6px; padding-top: 8px; }

.btn-primary { width: 100%; height: 48px; border: none; border-radius: 24px; background: linear-gradient(135deg, #C41E3A, #a3162e); color: #fff; font-size: 1.05rem; font-weight: 600; letter-spacing: 2px; }
.btn-primary:disabled { background: #d8d5d1; color: #fff; }
.btn-primary:active:not(:disabled) { opacity: .85; }
.btn-sm { height: 34px; padding: 0 16px; border: none; border-radius: 17px; background: #C41E3A; color: #fff; font-size: 0.85rem; }
.btn-sm.plain { background: #fff; color: #C41E3A; border: 1px solid #C41E3A; }

.tip { margin-top: 12px; text-align: center; font-size: 0.78rem; color: #aaa; }

.result { text-align: center; padding: 36px 20px; }
/* 2026-10-03 任务3：支付成功图标改微信官方风——#07C160 绿底 + CSS 绘粗白对勾（与小程序 submit-success 同法） */
.result-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: #07C160; display: flex; align-items: center; justify-content: center; }
.result-icon .icon-check { width: 28px; height: 15px; border-left: 5px solid #fff; border-bottom: 5px solid #fff; border-radius: 2px; transform: rotate(-45deg) translate(1px, -4px); box-sizing: border-box; }
.result-icon.warn { background: #fff3e0; color: #ef6c00; font-size: 2rem; display: block; line-height: 64px; text-align: center; }
.result-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; }
.result-desc { font-size: 0.9rem; color: #777; line-height: 1.7; margin-bottom: 20px; white-space: pre-line; }

.footer { margin-top: auto; padding-top: 24px; text-align: center; font-size: 0.78rem; color: #aaa; }
.footer a { color: #C41E3A; text-decoration: none; }
.footer .sep { margin: 0 6px; }

.toast { position: fixed; left: 50%; top: 18%; transform: translateX(-50%); background: rgba(0,0,0,.75); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 0.88rem; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 999; max-width: 80%; text-align: center; }
.toast.show { opacity: 1; }

/* 我的认购 */
.order-item { background: #fff; border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; box-shadow: 0 1px 8px rgba(0,0,0,.04); }
.order-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.order-unit { font-weight: 600; font-size: 0.95rem; }
.badge { font-size: 0.75rem; padding: 3px 10px; border-radius: 10px; }
.badge.paid { background: #e8f5e9; color: #2e7d32; }
.badge.pending { background: #fff3e0; color: #ef6c00; }
.badge.closed { background: #f1f0ee; color: #999; }
.badge.refund { background: #fdecea; color: #C41E3A; }
.order-body { display: flex; justify-content: space-between; align-items: center; font-size: 0.83rem; color: #888; }
.order-amount { color: #C41E3A; font-weight: 700; font-size: 0.95rem; }
.empty { text-align: center; color: #aaa; padding: 60px 0; font-size: 0.9rem; }
.page-title { font-size: 1.1rem; font-weight: 700; padding: 20px 4px 14px; color: #333; }
.page-title a { float: right; font-size: 0.8rem; color: #C41E3A; text-decoration: none; font-weight: 400; }

/* Tab 切换 */
.tabs { display: flex; background: #fff; border-radius: 12px; padding: 6px; margin-bottom: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
.tabs .tab { flex: 1; height: 40px; border: none; border-radius: 9px; background: transparent; font-size: 0.95rem; font-weight: 600; color: #666; transition: background .15s, color .15s; }
.tabs .tab.active { background: linear-gradient(135deg, #C41E3A, #a3162e); color: #fff; }

/* 表单：标签与输入框同一排，红星在标签左侧 */
.field.row { display: flex; align-items: flex-start; gap: 10px; }
.field.row > label { width: 5.2em; flex-shrink: 0; line-height: 46px; margin-bottom: 0; }
.field.row .field-main { flex: 1; min-width: 0; }
.field.row .field-main input { width: 100%; }

/* 🔴 2026-10-17 合规批：B端采购合规承诺条款勾选（门页单位码下方，未勾不得进入认购）
 * 视觉与小程序端 consent-box 同规范：白底描边空心圆 → 勾选主绿填充+白对勾（纯 CSS） */
.bterms-row {
  display: flex;
  align-items: flex-start;
  padding: 4px 2px 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bterms-box {
  position: relative;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 1.5px solid #C9CFD6;
  border-radius: 50%;
  margin-right: 7px;
  margin-top: 1px;
  flex: none;
  box-sizing: border-box;
}
.bterms-box.checked {
  background: #61C97A;
  border-color: #61C97A;
}
.bterms-box.checked::after {
  content: '';
  position: absolute;
  left: 3.5px;
  top: 4px;
  width: 6.5px;
  height: 3.5px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg);
}
.bterms-text {
  flex: 1;
  font-size: 12px;
  color: #8A8F98;
  line-height: 1.5;
}
.bterms-link {
  color: #576B95;
  text-decoration: none;
}
