/* ============================================================================
   Vector · 登录 / 注册页（自包含，无外部 CDN 依赖）
   复用 css/style.css 的主题变量与字体；本文件只负责认证页布局与表单
   ========================================================================== */

body.auth-body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
}

/* 背景：细网格 + 柔和光晕（不依赖图片） */
body.auth-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 88px 88px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 35%, transparent 100%);
}
body.auth-body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  width: 720px;
  height: 720px;
  right: -220px;
  top: -260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 68%);
  opacity: 0.9;
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ---------------------------- 顶部 ---------------------------- */
.auth-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 76px;
}
.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}
.auth-logo img { width: 30px; height: 30px; border-radius: 8px; object-fit: contain; }
.auth-logo span { font-weight: 700; font-size: 1.05rem; letter-spacing: 0.3px; }
.auth-top-right { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; }
.auth-top-link {
  font-size: 0.84rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.42rem 0.8rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.auth-top-link:hover { color: var(--ink); border-color: var(--line-strong); }
.auth-theme {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.auth-theme:hover { border-color: var(--accent); transform: translateY(-1px); }
.auth-theme svg { width: 17px; height: 17px; }
body.light .auth-theme .i-moon { display: none; }
body:not(.light) .auth-theme .i-sun { display: none; }

/* ---------------------------- 主体两栏 ---------------------------- */
.auth-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  align-items: center;
  gap: clamp(2rem, 6vw, 5.5rem);
  padding: clamp(1.5rem, 5vh, 3.4rem) 0 clamp(2.4rem, 6vh, 4rem);
}

/* 左栏：品牌叙事 */
.auth-side { max-width: 34rem; }
.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}
.auth-eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.auth-title {
  margin-top: 1.15rem;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  line-height: 1.14;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: var(--ink);
}
.auth-title em { font-style: normal; color: var(--accent); }
.auth-lede {
  margin-top: 1.15rem;
  max-width: 30rem;
  color: var(--muted);
  line-height: 1.9;
  font-size: 0.98rem;
}
.auth-points {
  margin-top: 1.9rem;
  list-style: none;
  display: grid;
  gap: 0.95rem;
  max-width: 28rem;
}
.auth-points li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding-top: 0.95rem;
  border-top: 1px solid var(--line);
}
.auth-points li:first-child { border-top: 0; padding-top: 0; }
.auth-points .ap-ico {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--line);
}
.auth-points .ap-ico svg { width: 15px; height: 15px; }
.auth-points b { display: block; font-size: 0.92rem; color: var(--ink); font-weight: 600; }
.auth-points span { display: block; margin-top: 0.18rem; font-size: 0.82rem; line-height: 1.65; color: var(--muted); }
.auth-foot {
  margin-top: 2.2rem;
  font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
}
.auth-foot span { display: inline-flex; align-items: center; gap: 0.4rem; }
.auth-foot i { width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); }

/* ---------------------------- 右栏：表单卡片 ---------------------------- */
.auth-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(1.6rem, 3vw, 2.3rem);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.35;
}
.auth-card-head .auth-card-kicker {
  font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Consolas, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.auth-card h2 {
  margin-top: 0.55rem;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink);
}
.auth-card-sub { margin-top: 0.4rem; font-size: 0.86rem; color: var(--muted); line-height: 1.7; }

/* 状态提示 */
.auth-msg {
  display: none;
  margin-top: 1.15rem;
  padding: 0.66rem 0.85rem;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.6;
  border: 1px solid transparent;
}
.auth-msg.is-on { display: block; }
.auth-msg.is-ok { color: var(--accent); background: var(--accent-soft); border-color: rgba(16, 185, 129, 0.28); }
.auth-msg.is-err { color: #e11d48; background: rgba(225, 29, 72, 0.08); border-color: rgba(225, 29, 72, 0.24); }
body:not(.light) .auth-msg.is-err { color: #fda4af; }

/* 表单 */
.auth-form { margin-top: 1.5rem; display: grid; gap: 1.05rem; }
.auth-field label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Consolas, monospace;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.auth-field label em { font-style: normal; color: var(--accent); }
.auth-input-wrap { position: relative; }
.auth-input {
  width: 100%;
  height: 46px;
  padding: 0 0.95rem;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
body:not(.light) .auth-input { background: rgba(255, 255, 255, 0.04); }
.auth-input::placeholder { color: var(--muted); opacity: 0.75; }
.auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.auth-input-wrap .auth-input { padding-right: 2.9rem; }
.auth-pw-toggle {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.auth-pw-toggle:hover { color: var(--ink); }
.auth-pw-toggle svg { width: 16px; height: 16px; }

/* 验证码行 */
.auth-code-row { display: flex; gap: 0.6rem; }
.auth-code-row .auth-input-wrap { flex: 1; }
.auth-code-btn {
  flex: 0 0 auto;
  height: 46px;
  padding: 0 1rem;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-2);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.auth-code-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.auth-code-btn:disabled { opacity: 0.55; cursor: default; }

/* 提交按钮 */
.auth-submit {
  margin-top: 0.35rem;
  height: 48px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.25s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)), box-shadow 0.25s, opacity 0.2s;
}
.auth-submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 30px var(--accent-soft); }
.auth-submit:active:not(:disabled) { transform: translateY(0); }
.auth-submit:disabled { opacity: 0.6; cursor: default; }
.auth-submit svg { width: 17px; height: 17px; }

/* 切换 / 辅助链接 */
.auth-switch {
  margin-top: 1.3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.86rem;
  color: var(--muted);
}
.auth-switch a { color: var(--accent); text-decoration: none; margin-left: 0.35rem; }
.auth-switch a:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-note {
  margin-top: 1.05rem;
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--muted);
  text-align: center;
}
.auth-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------------------------- 响应式 ---------------------------- */
@media (max-width: 960px) {
  .auth-main {
    grid-template-columns: 1fr;
    gap: 2.1rem;
    padding-top: 0.8rem;
    align-items: start;
  }
  .auth-side { max-width: none; }
  .auth-title { font-size: clamp(1.85rem, 6vw, 2.5rem); }
  .auth-points { display: none; }
  .auth-foot { margin-top: 1.4rem; }
  .auth-card { max-width: 460px; width: 100%; margin: 0 auto 1.4rem; }
}
@media (max-width: 560px) {
  .auth-shell { padding: 0 1rem; }
  .auth-top { height: 64px; }
  .auth-top-link { display: none; }
  .auth-card { padding: 1.35rem 1.2rem 1.5rem; border-radius: 18px; }
  .auth-card h2 { font-size: 1.32rem; }
  .auth-code-btn { padding: 0 0.7rem; font-size: 0.76rem; }
  body.auth-body::after { width: 460px; height: 460px; right: -160px; top: -180px; }
}
