/* ============ 易借白条 H5 全局样式 ============ */
* { 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", "Microsoft YaHei", sans-serif;
  background: #f2f4f9; color: #1a1a2e; font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 480px; margin: 0 auto; min-height: 100%; background: #f2f4f9; position: relative; padding-bottom: 24px; }

/* toast / loading */
.toast {
  position: fixed; top: 18%; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.78); color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 14px; z-index: 9999; max-width: 78%; text-align: center; display: none;
  animation: toastIn .18s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; } }
.loading-mask { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 9998; display: flex; align-items: center; justify-content: center; }
.loading-box { background: #fff; border-radius: 14px; padding: 26px 34px; text-align: center; }
.loading-spin {
  width: 34px; height: 34px; margin: 0 auto 12px;
  border: 3px solid #dfe4f3; border-top-color: #4d6bfe; border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: #666; font-size: 13px; }

/* ============ 登录/首页 ============ */
.hero {
  background: linear-gradient(160deg, #4d6bfe 0%, #6a5bff 55%, #7c4dff 100%);
  padding: 20px 16px 58px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px;
  background: rgba(255,255,255,.08); border-radius: 50%;
}
.brand-row { display: flex; align-items: center; gap: 8px; position: relative; z-index: 2; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 15px;
  border: 1px solid rgba(255,255,255,.35);
}
.brand-name { color: #fff; font-size: 17px; font-weight: 600; letter-spacing: 1px; }
.brand-sub { color: rgba(255,255,255,.75); font-size: 11px; margin-left: auto; }

.tags { display: flex; gap: 8px; margin-top: 16px; position: relative; z-index: 2; flex-wrap: wrap; }
.tag {
  display: flex; align-items: center; gap: 4px; color: #fff; font-size: 11.5px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
  padding: 4px 9px; border-radius: 999px;
}
.tag .tick { width: 13px; height: 13px; border-radius: 50%; background: #fff; color: #4d6bfe;
  display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; }

.card {
  background: #fff; border-radius: 16px; margin: -42px 14px 0; padding: 18px 16px 20px;
  box-shadow: 0 6px 24px rgba(77,107,254,.08); position: relative; z-index: 3;
}
.amount-head { font-size: 14px; color: #333; margin-bottom: 6px; }
.amount-row { display: flex; align-items: baseline; gap: 6px; }
.amount-yuan { font-size: 22px; font-weight: 700; color: #1a1a2e; }
.amount-input {
  border: none; outline: none; font-size: 38px; font-weight: 700; color: #1a1a2e;
  width: 200px; background: transparent; font-family: inherit;
}
.amount-input::placeholder { color: #d3d8ec; }
.all-borrow { margin-left: auto; display: flex; align-items: center; gap: 4px; color: #4d6bfe; font-size: 14px; }
.clear-btn { width: 18px; height: 18px; border-radius: 50%; background: #e8ebf5; color: #b0b7d0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; border: none; }

.divider { height: 1px; background: #f0f2f9; margin: 14px 0; }
.opt-row { display: flex; align-items: center; padding: 11px 0; }
.opt-label { color: #333; font-size: 14.5px; width: 76px; }
.opt-value { margin-left: auto; color: #1a1a2e; font-size: 14.5px; display: flex; align-items: center; gap: 4px; }
.opt-value.muted { color: #b0b7d0; }
.opt-arrow { color: #c3c9de; font-size: 12px; margin-left: 4px; }
.opt-sub { font-size: 11px; color: #b0b7d0; text-align: right; margin-top: 2px; }
.opt-col { margin-left: auto; text-align: right; }
.blue { color: #4d6bfe !important; }

.phone-card { background: #fff; border-radius: 16px; margin: 14px 14px 0; padding: 18px 16px 20px; box-shadow: 0 6px 24px rgba(77,107,254,.08); }
.phone-input {
  width: 100%; height: 52px; border: none; outline: none; background: #f4f6fc;
  border-radius: 12px; padding: 0 16px; font-size: 16px; color: #1a1a2e;
}
.phone-input::placeholder { color: #b8bfd8; }
.apply-wrap { position: relative; margin-top: 14px; }
.rib {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%); z-index: 4;
  background: linear-gradient(90deg, #ff5b3a, #ff7a45); color: #fff; font-size: 11px;
  padding: 3px 12px; border-radius: 999px; white-space: nowrap; box-shadow: 0 3px 8px rgba(255,91,58,.35);
}
.btn-main {
  width: 100%; height: 50px; border: none; border-radius: 25px; outline: none;
  background: linear-gradient(90deg, #4d6bfe, #7c4dff); color: #fff; font-size: 17px; font-weight: 600;
  letter-spacing: 2px; cursor: pointer; box-shadow: 0 8px 20px rgba(77,107,254,.32);
}
.btn-main:active { transform: scale(.985); }
.btn-main:disabled { opacity: .55; }

.agree-row { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; font-size: 12px; color: #8a90a8; }
.agree-circle {
  width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #c3c9de; background: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .15s;
}
.agree-circle.on { background: #4d6bfe; border-color: #4d6bfe; }
.agree-circle.on::after { content: ""; width: 8px; height: 4.5px; border-left: 1.6px solid #fff; border-bottom: 1.6px solid #fff;
  transform: rotate(-45deg) translate(0.5px, -0.5px); }
.agree-row a { color: #4d6bfe; text-decoration: none; }

.steps-card { background: #fff; border-radius: 16px; margin: 14px 14px 0; padding: 20px 12px 22px; box-shadow: 0 6px 24px rgba(77,107,254,.06); }
.steps-title { text-align: center; color: #666; font-size: 13px; margin-bottom: 18px; letter-spacing: 1px; }
.steps-row { display: flex; align-items: center; justify-content: space-between; padding: 0 10px; }
.step { text-align: center; width: 84px; }
.step-ico {
  width: 52px; height: 52px; margin: 0 auto 8px; border-radius: 50%;
  background: linear-gradient(150deg, #eef1ff, #e6e0ff);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.step-name { font-size: 13px; color: #333; }
.step-arrow { color: #d3d8ec; font-size: 18px; padding-bottom: 22px; }

.foot-tip { text-align: center; color: #b0b7d0; font-size: 11.5px; margin-top: 18px; padding: 0 30px; line-height: 1.7; }

/* ============ 弹层(验证码/协议/选项) ============ */
.popup-mask { position: fixed; inset: 0; background: rgba(10,12,30,.5); z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.popup { background: #fff; width: 100%; max-width: 480px; border-radius: 20px 20px 0 0; padding: 22px 18px calc(20px + env(safe-area-inset-bottom)); animation: up .22s ease; max-height: 80vh; overflow-y: auto; }
@keyframes up { from { transform: translateY(40%); opacity: .5; } to { transform: none; opacity: 1; } }
.popup-title { font-size: 16px; font-weight: 600; text-align: center; margin-bottom: 18px; position: relative; }
.popup-close { position: absolute; right: 0; top: -2px; color: #b0b7d0; font-size: 20px; background: none; border: none; padding: 2px 6px; }
.code-row { display: flex; gap: 10px; }
.code-row .phone-input { flex: 1; }
.btn-code {
  min-width: 112px; height: 52px; border: 1px solid #4d6bfe; color: #4d6bfe; background: #eef1ff;
  border-radius: 12px; font-size: 14px; padding: 0 10px;
}
.btn-code:disabled { color: #b0b7d0; border-color: #e3e7f3; background: #f6f7fc; }
.code-tip { color: #8a90a8; font-size: 12px; margin-top: 12px; text-align: center; }
.agreement-body { font-size: 13px; color: #555; line-height: 1.9; white-space: pre-wrap; }

.opt-list { max-height: 46vh; overflow-y: auto; }
.opt-item { padding: 14px 8px; border-bottom: 1px solid #f2f4f9; font-size: 15px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.opt-item:active { background: #f6f7ff; }
.opt-item.selected { color: #4d6bfe; font-weight: 600; }
.opt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 4px 0 8px; }
.opt-cell { height: 44px; border-radius: 10px; background: #f4f6fc; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #333; border: 1.5px solid transparent; }
.opt-cell.on { border-color: #4d6bfe; color: #4d6bfe; background: #eef1ff; font-weight: 600; }

/* ============ 资料表单页 ============ */
.page-bg { background: linear-gradient(160deg, #4d6bfe 0%, #6a5bff 60%, #7c4dff 100%); padding: 18px 14px 0; }
.page-nav { display: flex; align-items: center; color: #fff; font-size: 16px; font-weight: 600; padding: 4px 0 14px; position: relative; z-index: 2; }
.back-btn { background: none; border: none; color: #fff; font-size: 20px; padding: 2px 10px 2px 0; }
.form-card { background: #fff; border-radius: 16px; padding: 6px 16px; margin-bottom: 14px; box-shadow: 0 6px 24px rgba(77,107,254,.08); }
.form-item { display: flex; align-items: center; padding: 15px 0; border-bottom: 1px solid #f2f4f9; }
.form-item:last-child { border-bottom: none; }
.form-label { width: 96px; color: #333; font-size: 14.5px; flex-shrink: 0; }
.form-control { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-height: 24px; }
.form-control input {
  border: none; outline: none; text-align: right; font-size: 15px; color: #1a1a2e; width: 100%; background: transparent;
}
.form-control input::placeholder { color: #c3c9de; }
.form-control .ph { color: #c3c9de; font-size: 14.5px; }
.form-sec-title { font-size: 13px; color: #8a90a8; padding: 14px 2px 4px; }
.chip-row { display: flex; gap: 8px; padding: 6px 0 12px; flex-wrap: wrap; }
.chip { padding: 7px 14px; border-radius: 999px; background: #f4f6fc; color: #555; font-size: 13px; border: 1.5px solid transparent; }
.chip.on { background: #eef1ff; color: #4d6bfe; border-color: #4d6bfe; font-weight: 600; }
.submit-bar { padding: 4px 14px calc(20px + env(safe-area-inset-bottom)); }
.form-tip { font-size: 11.5px; color: #b0b7d0; text-align: center; margin-top: 10px; line-height: 1.7; }

/* ============ 审批/结果页 ============ */
.center-page { min-height: 82vh; display: flex; flex-direction: column; align-items: center; padding-top: 60px; }
.big-ring {
  width: 110px; height: 110px; border-radius: 50%; position: relative;
  background: conic-gradient(#4d6bfe 0 62%, #e8ebf5 62% 100%);
  display: flex; align-items: center; justify-content: center; margin-bottom: 24px;
}
.big-ring::before { content: ""; position: absolute; inset: 9px; background: #fff; border-radius: 50%; }
.big-ring .pct { position: relative; z-index: 2; font-size: 22px; font-weight: 700; color: #4d6bfe; }
.result-quota { font-size: 46px; font-weight: 700; color: #4d6bfe; line-height: 1.15; }
.result-label { color: #8a90a8; font-size: 14px; margin-bottom: 6px; }
.result-card { background: #fff; border-radius: 16px; margin: 22px 14px 0; width: calc(100% - 28px); padding: 6px 16px; }
.result-sub { color: #8a90a8; font-size: 13px; margin-top: 14px; text-align: center; line-height: 1.8; }
.delivery-box {
  margin-top: 18px; background: #f6f7ff; border: 1px dashed #c9d4ff; border-radius: 12px;
  padding: 12px 16px; font-size: 13px; color: #4d6bfe; text-align: center; word-break: break-all;
}
.status-steps { margin: 26px 30px 0; width: calc(100% - 60px); }
.s-step { display: flex; gap: 12px; padding: 8px 0; }
.s-dot { width: 18px; height: 18px; border-radius: 50%; background: #e3e7f3; flex-shrink: 0; margin-top: 2px; position: relative; }
.s-dot.done { background: #4d6bfe; }
.s-dot.done::after { content: ""; position: absolute; inset: 5px; width: 4px; height: 2.5px; border-left: 1.6px solid #fff; border-bottom: 1.6px solid #fff; transform: rotate(-45deg); }
.s-dot.doing { background: #4d6bfe; animation: pulse 1.1s ease infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(77,107,254,.35);} 50% { box-shadow: 0 0 0 7px rgba(77,107,254,0);} }
.s-text { font-size: 14px; color: #333; }
.s-text .t { display: block; font-size: 11.5px; color: #b0b7d0; margin-top: 2px; }

/* 审批通过横幅 */
.pass-banner {
  margin: 0 14px; background: linear-gradient(120deg, #22b07d, #2fd39c); color: #fff;
  border-radius: 14px; padding: 14px 18px; font-size: 14px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 20px rgba(34,176,125,.28);
}
