﻿/* =========================================================
   用户端 H5 样式 —— 与登录页/后台同款品牌视觉
   主色 #165dff · 品牌绿 #00d09c · 内容底 #f0f4fa
   ========================================================= */
:root {
  --bg: #f0f4fa;
  --card: #ffffff;
  --line: #e7edf5;
  --ink1: #1e2b40;
  --ink2: #435166;
  --muted: #7a8699;
  --faint: #919cad;
  --brand1: #165dff;
  --brand2: #00d09c;
  --grad: linear-gradient(135deg, #165dff 0%, #00b8e6 55%, #00d09c 100%);
  --grad-soft: linear-gradient(90deg, rgba(22,93,255,.14), rgba(0,208,156,.10));
  --success: #00b42a;
  --danger: #f53f3f;
  --radius: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(1100px 320px at 50% -80px, rgba(22,93,255,.14), transparent 70%), #f0f4fa;
  color: var(--ink1); min-height: 100vh; line-height: 1.55;
}
.page { max-width: 540px; margin: 0 auto; padding: 16px 12px 64px; }

/* ---------- 卡片 ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(31,56,110,.06); padding: 16px; margin-bottom: 12px; }
.card h3 { font-size: 16px; color: var(--ink1); margin-bottom: 10px; }
.muted { color: var(--muted); font-size: 13px; }

/* ---------- 顶部品牌栏 ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; margin-top: 6px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 19px; box-shadow: 0 8px 18px rgba(22,93,255,.28); }
.logo-t { font-weight: 800; font-size: 16px; color: var(--ink1); }
.logo-s { font-size: 11px; color: var(--faint); }
.top-link { font-size: 13px; color: var(--brand1); text-decoration: none; font-weight: 600; }

/* ---------- 按钮 ---------- */
.btn { display: block; width: 100%; border: 0; border-radius: 12px; padding: 13px 18px; font-size: 16px; font-weight: 700; cursor: pointer; text-align: center; transition: opacity .15s, transform .06s, box-shadow .2s; font-family: inherit; }
.btn:active { transform: scale(.985); }
.btn.primary { background: linear-gradient(90deg, #165dff 0%, #00b8e6 60%, #00d09c 100%); color: #fff; box-shadow: 0 10px 22px rgba(22,93,255,.28); }
.btn.primary:hover { filter: saturate(1.08); }
.btn.ghost { background: #eef3fe; color: var(--brand1); }
.btn.ghost2 { background: #fff; color: var(--muted); border: 1px solid #dbe3f0; }
.btn.big { padding: 15px 18px; font-size: 17px; border-radius: 14px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; margin-top: 16px; }
.btn-row .btn { flex: 1; }

/* ---------- 步骤条 ---------- */
.steps { display: flex; align-items: flex-start; padding: 14px 8px 12px; }
.step { flex: 1; text-align: center; position: relative; }
.step .dot { width: 27px; height: 27px; border-radius: 50%; margin: 0 auto 6px; background: #e4e9f2; color: #8b95a7; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; position: relative; z-index: 2; transition: all .2s; }
.step .lab { font-size: 11px; color: var(--faint); }
.step::before { content: ""; position: absolute; top: 13px; left: calc(-50% + 22px); right: calc(50% + 22px); height: 2px; background: #e4e9f2; }
.step:first-child::before { display: none; }
.step.done .dot { background: linear-gradient(135deg, #00cfa5, #00b42a); color: #fff; }
.step.done .lab { color: var(--success); }
.step.done::before { background: linear-gradient(90deg, #00cfa5, #00b42a); }
.step.active .dot { background: linear-gradient(135deg, #165dff, #00b8e6); color: #fff; box-shadow: 0 0 0 5px rgba(22,93,255,.14); }
.step.active .lab { color: var(--brand1); font-weight: 700; }

/* ---------- 设备信息条 ---------- */
.devinfo { background: linear-gradient(135deg, #165dff 0%, #00a8e8 60%, #00d09c 120%); color: #fff; border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: 0 12px 26px rgba(22,93,255,.25); }
.devinfo .dn { font-size: 17px; font-weight: 800; }
.devinfo .dl { font-size: 13px; opacity: .94; margin-top: 3px; }
.devinfo .grid { display: flex; margin-top: 12px; gap: 10px; }
.devinfo .grid > div { flex: 1; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 8px 10px; backdrop-filter: blur(4px); }
.devinfo .grid .k { font-size: 11px; opacity: .9; }
.devinfo .grid .v { font-size: 15px; font-weight: 800; margin-top: 2px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 13px; color: var(--ink2); margin-bottom: 6px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid #dbe3f0; border-radius: 10px; padding: 11px 12px; font-size: 15px; outline: none; background: #fbfcff; font-family: inherit; color: var(--ink1); transition: border .15s, box-shadow .15s, background .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand1); background: #fff; box-shadow: 0 0 0 3px rgba(22,93,255,.12); }
.field-err { color: var(--danger); font-size: 12px; margin-top: 5px; display: none; line-height: 1.4; }
.agree-line { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ink2); margin: 4px 0 14px; }
.agree-line input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--brand1); }
.agree-line a { color: var(--brand1); }

/* ---------- 协议文本 ---------- */
.agree-box { background: #f7fafd; border: 1px solid #e7edf5; border-radius: 12px; padding: 12px; max-height: 320px; overflow: auto; margin-bottom: 14px; }
.agree-box pre { white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 13px; color: var(--ink2); line-height: 1.75; }

/* ---------- 金额展示 ---------- */
.amount-row { text-align: center; padding: 4px 0 2px; }
.amount-row .cur { font-size: 16px; color: var(--muted); font-weight: 600; }
.amount-row .num { font-size: 42px; font-weight: 900; color: var(--ink1); letter-spacing: -1px; }
.amount-row .num em { font-style: normal; font-size: 26px; margin-right: 2px; }

/* ---------- 支付方式 / 种类 ---------- */
.method-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin: 14px 0; }
.method { border: 1.5px solid #e4e9f2; border-radius: 13px; padding: 13px 6px; text-align: center; cursor: pointer; transition: all .15s; background: #fff; }
.method .m-ic { width: 36px; height: 36px; border-radius: 10px; margin: 0 auto 7px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; font-weight: 800; }
.method .m-t { font-size: 13px; color: var(--ink2); }
.method.on { border-color: var(--brand1); background: linear-gradient(180deg, #f4f8ff, #fff); box-shadow: 0 0 0 2px rgba(22,93,255,.12); }
.method.on .m-t { color: var(--brand1); font-weight: 700; }
.mic-wechat { background: linear-gradient(135deg, #1fbf63, #14a94f); } .mic-alipay { background: linear-gradient(135deg, #1677ff, #0a5ad8); } .mic-card { background: linear-gradient(135deg, #ff8b2c, #f4731d); }

/* ---------- 提示条 / 收款方 ---------- */
.info-line { display: flex; gap: 8px; background: #fff6e0; border: 1px solid #ffe6a8; border-radius: 12px; padding: 10px 12px; font-size: 13px; color: #8a5f00; margin: 10px 0; line-height: 1.5; }
.info-line .ic { flex: 0 0 auto; }
.info-line.blue { background: #eef4ff; border-color: #c9dbfb; color: #2456c8; }
.info-line.green { background: #e9faf0; border-color: #bde9cf; color: #137a3c; }
.payee { background: #f7fafd; border-radius: 12px; padding: 11px 12px; font-size: 13px; color: var(--ink2); display: flex; justify-content: space-between; margin-bottom: 8px; }
.payee b { color: var(--ink1); }

/* ---------- 成功页 ---------- */
.success-ic { width: 80px; height: 80px; border-radius: 50%; margin: 12px auto 16px; background: linear-gradient(135deg, #00cfa5, #00b42a); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 42px; box-shadow: 0 14px 30px rgba(0,180,42,.3); }
.summary { width: 100%; border-collapse: collapse; font-size: 14px; }
.summary td { padding: 9px 4px; border-bottom: 1px dashed #e7edf5; }
.summary td:first-child { color: var(--muted); width: 92px; }
.summary td:last-child { text-align: right; font-weight: 700; }

/* ---------- 扫码首页 ---------- */
.scan-stage { text-align: center; padding: 22px 18px 20px; background: linear-gradient(165deg, #fff 0%, #f3f8ff 100%); }
.phone { width: 150px; height: 150px; margin: 8px auto 16px; background: #0d1b3a; border-radius: 28px; padding: 10px; position: relative; box-shadow: 0 16px 34px rgba(13,27,58,.35); }
.phone-cam { width: 34px; height: 5px; border-radius: 4px; background: #0d1b3a; margin: -6px auto 4px; }
.scan-screen { position: relative; width: 100%; height: 100%; background: #101f42; border-radius: 18px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.scan-frame { width: 84px; height: 84px; position: relative; }
.scan-frame .corner { position: absolute; width: 20px; height: 20px; border: 3px solid #34e0a1; }
.corner.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 4px 0 0 0; }
.corner.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 4px 0 0; }
.corner.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 4px; }
.corner.br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 4px 0; }
.scan-line { position: absolute; left: 22px; right: 22px; top: 14px; height: 2px; background: linear-gradient(90deg, transparent, #34e0a1, transparent); box-shadow: 0 0 12px #34e0a1; animation: scanmove 1.6s ease-in-out infinite; }
@keyframes scanmove { 0%,100% { top: 14px; } 50% { top: 128px; } }
.scan-stage h2 { font-size: 19px; color: var(--ink1); margin-bottom: 4px; }
.mini-note { font-size: 12px; color: var(--faint); margin-top: 12px; line-height: 1.7; }

/* ---------- 流程小标签 ---------- */
.flow-chips { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px; background: transparent; border: 0; box-shadow: none; }
.chip { display: inline-flex; align-items: center; gap: 5px; background: #e8efff; color: #2456c8; border-radius: 999px; padding: 6px 11px; font-size: 12px; font-weight: 700; }
.chip b { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, #165dff, #00b8e6); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.chip.done { background: #e4f8ee; color: #137a3c; }
.chip.done b { background: linear-gradient(135deg, #00cfa5, #00b42a); }
.farrow { color: #b9c3d4; font-weight: 800; }

/* ---------- 设备选择列表 ---------- */
.dev-item { display: flex; align-items: center; gap: 12px; padding: 13px 12px; border: 1.5px solid #e4e9f2; border-radius: 14px; margin-bottom: 10px; cursor: pointer; transition: all .15s; background: #fff; width: 100%; text-align: left; font-family: inherit; }
.dev-item:hover { border-color: var(--brand1); background: #f6f9ff; }
.dev-ic { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, #e8efff, #e2faf3); color: var(--brand1); display: flex; align-items: center; justify-content: center; font-size: 19px; flex: 0 0 auto; }
.dev-t { flex: 1; }
.dev-t .n { font-weight: 700; font-size: 15px; color: var(--ink1); }
.dev-t .l { font-size: 12px; color: var(--muted); margin-top: 2px; }
.dev-price { font-weight: 900; color: #f05050; font-size: 15px; }
.dev-price small { font-weight: 400; color: var(--muted); font-size: 11px; }

/* ---------- 遮罩与提示 ---------- */
.overlay { position: fixed; inset: 0; background: rgba(13,27,58,.86); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 90; color: #fff; }
.overlay.hidden { display: none; }
.overlay .ring { width: 54px; height: 54px; border: 4px solid rgba(255,255,255,.25); border-top-color: #34e0a1; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 18px; }
@keyframes spin { to { transform: rotate(360deg); } }
.overlay .ov-t { font-size: 17px; font-weight: 700; }
.overlay .ov-s { font-size: 13px; opacity: .75; margin-top: 6px; }
.toast { position: fixed; left: 50%; bottom: 42px; transform: translateX(-50%); background: rgba(30,43,64,.94); color: #fff; font-size: 14px; padding: 11px 18px; border-radius: 12px; z-index: 99; opacity: 0; pointer-events: none; transition: opacity .25s; max-width: 86%; text-align: center; box-shadow: 0 10px 26px rgba(0,0,0,.22); }
.toast.show { opacity: 1; }
.section-tip { text-align: center; padding: 30px 10px; }
.section-tip .ic { font-size: 46px; margin-bottom: 10px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
