* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  background: #f0eef8;
  position: relative;
  overflow: hidden;
}

/* Gradient blobs */
body::before {
  content: '';
  position: fixed;
  top: -80px; left: -80px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(180,170,240,0.55) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  bottom: -80px; right: -80px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(240,180,200,0.5) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.card {
  background: #fff;
  border-radius: 20px;
  padding: 40px 44px 36px;
  width: 100%;
  max-width: 380px;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 32px rgba(100,80,200,0.07);
}

/* Logo area */
.logo-area { text-align: center; margin-bottom: 6px; }
.logo-icon {
  width: 62px; height: 62px;
  margin: 0 auto 10px;
  display: block;
}
.brand-name {
  font-size: 22px;
  font-weight: 700;
  color: #6c56e0;
  margin: 0 0 5px;
  letter-spacing: 0.3px;
}
.brand-sub {
  font-size: 12px;
  color: #aaa;
  margin: 0 0 22px;
}
.section-title {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  text-align: center;
  margin: 0 0 24px;
}

/* Form fields */
.field-wrap { margin-bottom: 20px; }
.field-label {
  font-size: 13px;
  color: #444;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.req { color: #e0334d; font-size: 13px; }

.input-box {
  width: 100%;
  height: 44px;
  border: 1px solid #e5e4f0;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  color: #333;
  background: #f9f9fc;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}
.input-box:focus { border-color: #8b7ae0; background: #fff; }
.input-box::placeholder { color: #c0bdd8; }

/* Password wrapper */
.pw-wrap { position: relative; }
.pw-wrap .input-box { padding-right: 42px; }
.pw-eye {
  position: absolute;
  right: 13px; top: 50%;
  transform: translateY(-50%);
  color: #c0bdd8;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  user-select: none;
}
.pw-eye:hover { color: #7c6be0; }

/* Captcha row */
.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-row .input-box { flex: 1; }
.captcha-img {
  height: 44px;
  min-width: 110px;
  border-radius: 8px;
  background: #f0eef8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid #e5e4f0;
  flex-shrink: 0;
}
.captcha-img canvas { display: block; }

/* Forgot link row */
.forgot-row {
  text-align: right;
  margin-top: -10px;
  margin-bottom: 20px;
}
.link {
  font-size: 13px;
  color: #7c6be0;
  text-decoration: none;
  cursor: pointer;
}
.link:hover { text-decoration: underline; }

/* Primary button */
.btn-primary {
  width: 100%;
  height: 48px;
  background: linear-gradient(90deg, #7464d8 0%, #8b7ae0 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 3px;
  transition: opacity 0.15s, transform 0.1s;
  font-family: inherit;
}
.btn-primary:hover { opacity: 0.91; }
.btn-primary:active { transform: scale(0.99); }

/* Bottom link row */
.bottom-row {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: #999;
}

/* ── Forgot password modal card ── */
.modal-card {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 380px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(100,80,200,0.1);
}
.modal-header {
  background: linear-gradient(135deg, #7464d8 0%, #9580e8 100%);
  padding: 32px 20px 26px;
  text-align: center;
}
.modal-header-icon {
  width: 52px; height: 52px;
  background: rgba(255,255,255,0.22);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.modal-header-icon i { font-size: 26px; color: #fff; }
.modal-title { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.modal-sub { font-size: 13px; color: rgba(255,255,255,0.8); }

/* Step dots */
.step-dots {
  display: flex; gap: 8px;
  align-items: center; justify-content: center;
  padding: 16px 0 8px;
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #e0ddf5;
  transition: background 0.2s, width 0.2s;
}
.dot.active { background: #7c6be0; width: 22px; border-radius: 5px; }

.modal-body { padding: 10px 36px 32px; }
