/* QTPAY 前台：第一步按 QT 线上页实测值 1:1 还原，第二/三步沿用同一套视觉语言 */
:root {
  --qt-blue: #75bafa;
  --qt-shadow: rgb(39 134 237 / 45%);
  --ink: rgb(83 92 102);
  --grad: linear-gradient(89.93deg, #86cefb 0.02%, #398de9 99.9%);
  --card-w: min(325px, calc(100vw - 50px));
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #dceafd;
  color: #123;
}

/* 舞台：桌面端用 QT 原背景铺满整屏，中间悬浮 375×812 的手机版心；
   窄屏（真手机）则让版心直接铺满视口，和 QT 线上 H5 完全一致 */
.stage {
  position: relative;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
  background-color: #b9d9fb;
  background-image: url("/static/img/bg.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
/* 桌面端四周做柔白渐晕 + 背景轻虚化，把视线收到中间的手机版心上 */
.stage::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(75% 65% at 50% 44%, rgb(255 255 255 / 0%) 0%, rgb(245 250 255 / 58%) 100%);
  -webkit-backdrop-filter: blur(9px) saturate(1.05);
  backdrop-filter: blur(9px) saturate(1.05);
}

/* 375 x 812 的手机版心 */
.login-wrap {
  position: relative;
  z-index: 1;
  width: min(375px, 100vw);
  height: min(812px, calc(100vh - 48px));
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgb(255 255 255 / 60%);
  background: url("/static/img/bg.png") center / 100% 100% no-repeat;
  box-shadow: 0 24px 64px rgb(10 54 120 / 30%), 0 2px 0 rgb(255 255 255 / 45%) inset;
}

/* 手机 / 窄屏：整屏铺满，去掉圆角与悬浮感 */
@media (max-width: 560px), (max-height: 700px) {
  .stage {
    padding: 0;
    background-attachment: scroll;
    align-items: stretch;
  }
  .stage::before { display: none; }
  .login-wrap {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
}
.screen.on { display: flex; }

/* ---------- 第一步 ---------- */
.logo-box { width: var(--card-w); height: 200px; display: flex; align-items: center; justify-content: center; }
.logo-box img { width: 168px; height: 157px; object-fit: contain; }

.login-out-box {
  width: var(--card-w);
  height: 273px;
  padding: 40px 15px;
  border-radius: 30px;
  background: var(--qt-blue);
  box-shadow: 0 5px 4px var(--qt-shadow);
}

.van-field {
  position: relative;
  display: flex;
  align-items: center;
  height: 45px;
  margin-bottom: 8px;
  padding: 10px 16px 10px 5px;
  border-bottom: 1px solid rgb(83 92 102 / 55%);
}
.van-field:last-of-type { margin-bottom: 0; }
.field-icon { width: 24px; height: 24px; margin-right: 8px; opacity: .95; }
.van-field input {
  flex: 1;
  height: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
  outline: none;
}
.van-field input::placeholder { color: rgb(255 255 255 / 60%); }
.van-field input:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  transition: background-color 99999s ease-in-out 0s;
}

.eye {
  width: 24px; height: 24px; flex: 0 0 24px;
  margin-left: 6px; padding: 0; border: 0; background: transparent; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M2 12s3.6-6.4 10-6.4S22 12 22 12s-3.6 6.4-10 6.4S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='2.6'/%3E%3C/svg%3E");
  background-size: 22px 22px; background-repeat: no-repeat; background-position: center;
}
.eye.on {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M2 12s3.6-6.4 10-6.4S22 12 22 12s-3.6 6.4-10 6.4S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='2.6'/%3E%3Cpath d='M3 21 21 3'/%3E%3C/svg%3E");
}

.code-field input { padding-right: 100px; }
.code-img {
  position: absolute;
  right: 16px; top: 7px;
  width: 93px; height: 30px;
  border-radius: 4px;
  cursor: pointer;
  background: #fff;
}

.forget-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 20px;
  margin-top: 15px;
  color: #fff;
  font-size: 13px;
}
.remember { display: flex; align-items: center; gap: 6px; }
.remember input {
  appearance: none;
  width: 14px; height: 14px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  margin: 0;
  position: relative;
}
.remember input:checked::after {
  content: "";
  position: absolute; inset: 2.5px;
  border-radius: 50%;
  background: #fff;
}
.service { cursor: pointer; }

.btns { width: var(--card-w); margin-top: 24px; display: flex; gap: 10px; }
.login-btn-box, .reg-btn-box {
  height: 45px; border-radius: 41px; font-size: 16px; cursor: pointer;
  border: 1px solid transparent;
}
.login-btn-box { flex: 0 0 157px; background: var(--grad); color: #fff; border: 0; }
.reg-btn-box { flex: 1; background: transparent; border: 1px solid #8dd5fc; color: #fff; }
.login-btn-box:disabled, .reg-btn-box:disabled { opacity: .7; cursor: default; }

.tips {
  width: var(--card-w); margin: 10px 0 0;
  text-align: center; font-size: 13px; line-height: 20px;
  color: rgb(0 28 56 / 78%);
}
.tips.err { color: #c8283a; font-weight: 600; }

/* ---------- 第二步 ---------- */
#screen-verify { justify-content: flex-start; padding-top: 54px; }
.verify-head { width: var(--card-w); color: #fff; margin-bottom: 18px; }
.verify-head h1 { margin: 0 0 6px; font-size: 22px; letter-spacing: 1px; }
.verify-head p { margin: 0; font-size: 13px; color: rgb(255 255 255 / 88%); }

.verify-card {
  width: var(--card-w);
  padding: 22px 18px 18px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 12px 30px rgb(23 74 150 / 18%);
}
.vf { display: block; margin-bottom: 14px; }
.vf-label { display: block; margin-bottom: 6px; font-size: 13px; color: #5b6472; }
.vf input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #dfe6f2;
  border-radius: 12px;
  background: #f7faff;
  font-size: 15px;
  color: #1c2430;
  outline: none;
}
.vf input:focus { border-color: #398de9; background: #fff; box-shadow: 0 0 0 3px rgb(57 141 233 / 14%); }
.vf-code { position: relative; }
.vf-code input { padding-right: 116px; }
.code-btn {
  position: absolute;
  right: 4px; top: 25px;
  height: 36px; padding: 0 12px;
  border: 0; border-radius: 10px;
  background: #eaf3ff; color: #1c50d8;
  font-size: 13px; cursor: pointer;
}
.code-btn:disabled { color: #93a3bb; background: #f1f5fb; cursor: default; }

.submit-btn {
  width: var(--card-w);
  height: 48px;
  margin-top: 22px;
  border: 0; border-radius: 41px;
  background: var(--grad);
  color: #fff; font-size: 17px; letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgb(57 141 233 / 35%);
}
.submit-btn:disabled { opacity: .72; cursor: default; }
.verify-tips { width: var(--card-w); margin: 12px 0 0; text-align: center; font-size: 12px; color: rgb(0 28 56 / 66%); }
.verify-tips.err { color: #c8283a; font-weight: 600; }

/* ---------- 第三步 ---------- */
#screen-done { justify-content: center; }
.done-card {
  width: var(--card-w);
  padding: 34px 24px 26px;
  border-radius: 26px;
  background: #fff;
  text-align: center;
  box-shadow: 0 14px 34px rgb(23 74 150 / 20%);
}
.done-icon {
  width: 60px; height: 60px; margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4fbe8b, #2f9e6f);
  color: #fff; font-size: 32px; line-height: 60px;
}
.done-card h1 { margin: 0 0 10px; font-size: 20px; color: #1c2430; }
.done-card p { margin: 0; font-size: 14px; line-height: 1.7; color: #5b6472; }
.done-card .submit-btn { width: 100%; margin-top: 22px; }
