/* ============================================================
   登录 / 注册页样式
   ============================================================ */

.auth-body {
  display: block;
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(74,158,255,.13), transparent 60%),
    radial-gradient(700px 460px at 90% 110%, rgba(155,123,240,.11), transparent 62%),
    var(--bg);
}

.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 26px 24px;
  box-shadow: 0 24px 70px rgba(0,0,0,.45);
}

.auth-brand {
  display: flex;
  gap: 11px;
  align-items: center;
  margin-bottom: 22px;
}
.auth-title { font-size: 16px; font-weight: 700; letter-spacing: .01em; }
.auth-tip { font-size: 11px; color: var(--muted); margin-top: 2px; letter-spacing: .02em; }

/* ---------- 表单 ---------- */
.auth-form { display: flex; flex-direction: column; gap: 13px; }
.auth-form .field label { font-size: 12px; }

.auth-submit {
  margin-top: 5px;
  width: 100%;
  padding: 11px 16px;
  border: none;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--blue), #5f7cf5);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: .15s;
}
.auth-submit:hover { filter: brightness(1.08); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit[disabled] { opacity: .55; cursor: not-allowed; filter: none; }

.auth-err {
  font-size: 12.5px;
  color: var(--red);
  min-height: 0;
  display: none;
  padding: 9px 11px;
  background: var(--red-soft);
  border-radius: var(--r-sm);
  line-height: 1.55;
}
.auth-err.show { display: block; }

.auth-switch {
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
}
.link {
  background: none;
  border: none;
  color: var(--blue);
  font-size: 12.5px;
  padding: 0 2px;
  text-decoration: none;
}
.link:hover { text-decoration: underline; }

.auth-foot-note {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: -2px;
}

/* ---------- 注册完成 ---------- */
.auth-done { text-align: center; padding: 6px 0 4px; }
.done-ico {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--green-soft); color: var(--green);
  font-size: 22px; font-weight: 700;
  display: grid; place-items: center;
  margin: 0 auto 14px;
}
.auth-done h3 { font-size: 16px; margin-bottom: 8px; }
.auth-done p { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; margin-bottom: 18px; }

.auth-copyright {
  margin-top: 18px;
  font-size: 11px;
  color: var(--muted);
  opacity: .75;
}

@media (max-width: 420px) {
  .auth-card { padding: 24px 20px 20px; }
}

/* hidden 属性不被 display:flex 覆盖 */
.auth-form[hidden], .auth-done[hidden] { display: none !important; }
.alert[hidden] { display: none !important; }

/* ---------- 移动端 ---------- */
@media (max-width: 480px) {
  .auth-card { padding: 24px 20px 20px; border-radius: 20px; }
  .auth-form .field input {
    font-size: 16px;               /* 防 iOS 聚焦缩放 */
    padding: 12px 12px; border-radius: 10px;
  }
  .auth-submit { padding: 13px 16px; font-size: 15px; border-radius: 12px; }
}

/* ============================================================
   大气版布局：左侧轮播 + 右侧表单
   ============================================================ */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
}

/* 左侧轮播区 */
.auth-hero {
  flex: 1.25;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  position: relative;
  padding: 48px 56px 48px 24px;
}
.hero-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 560px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(145deg, #141a26, #1b2334 55%, #232c44);
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 30px 90px rgba(0,0,0,.5);
}
.hc-slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity .8s ease;
}
.hc-slide.active { opacity: 1; }
.hc-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hc-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 34px 26px 20px;
  background: linear-gradient(transparent, rgba(0,0,0,.66));
  color: #fff; font-size: 16px; letter-spacing: .02em;
}
.hc-default { display: grid; place-items: center; opacity: 1; }
.hc-brand-big { text-align: center; padding: 30px; }
.hc-logo-fallback {
  width: 92px; height: 92px; margin: 0 auto 20px; border-radius: 26px;
  background: linear-gradient(145deg, var(--blue), var(--violet));
  display: grid; place-items: center;
  font-size: 38px; font-weight: 700; color: #fff;
  box-shadow: 0 16px 50px rgba(80,110,255,.35);
}
.hc-logo-fallback img { border-radius: inherit; }
.hc-slogan b { display: block; font-size: 26px; letter-spacing: .03em; color: #fff; }
.hc-slogan span { display: block; margin-top: 10px; font-size: 13px; color: rgba(255,255,255,.55); letter-spacing: .06em; }

.hc-dots {
  display: flex; gap: 7px; justify-content: center;
  margin-top: 16px;
}
.hc-dots i {
  width: 7px; height: 7px; border-radius: 999px;
  background: rgba(255,255,255,.22); transition: .25s;
}
.hc-dots i.on { width: 20px; background: var(--blue); }

/* 右侧表单区 */
.auth-panel {
  flex: 1;
  min-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 28px;
}
.auth-panel .auth-card { max-width: 420px; }
.auth-panel .auth-copyright { margin-top: 16px; }

/* 手机端：表单在上，轮播在底部 */
.m-hero-bottom { display: none; }
@media (max-width: 860px) {
  .auth-shell { flex-direction: column; padding: 28px 16px 0; }
  .auth-panel { min-width: 0; padding: 0 0 20px; }
  .auth-hero { display: none; }
  .m-hero-bottom {
    display: flex; order: 9;
    padding: 10px 4px 30px;
  }
  .m-hero-bottom .hero-carousel {
    aspect-ratio: 16 / 7; max-height: 220px; border-radius: 18px;
  }
  .hc-slogan b { font-size: 17px; }
  .hc-slogan span { font-size: 11px; }
  .hc-cap { font-size: 13px; padding: 20px 16px 12px; }
  .hc-dots { margin-top: 10px; }
}

/* hidden 属性保护（补 shell 新元素） */
.hc-dots[hidden] { display: none !important; }
