/* ============================================================
   Auth pages (login / register) — 浅蓝画布 + 白卡 + 双 Tab
   ============================================================ */

body.authx-body {
  background: var(--bg) !important;
}

.authx-page {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 54px 20px 64px;
  background:
    radial-gradient(1000px 480px at 10% -14%, rgba(18, 168, 154, .11), transparent 62%),
    radial-gradient(880px 440px at 94% -6%, rgba(96, 140, 255, .10), transparent 64%),
    var(--bg);
}

.authx-card {
  width: min(524px, 100%);
  padding: 40px 38px 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 26px 64px rgba(31, 51, 79, .10), 0 2px 8px rgba(31, 51, 79, .04);
}

.authx-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2em;
  color: var(--accent);
}

.authx-card h1 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
}

.authx-sub {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

/* ---------- tabs ---------- */
.authx-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 5px;
  margin-bottom: 22px;
  background: var(--surface-2);
  border-radius: 14px;
}

.authx-tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.authx-tabs a:hover { color: var(--accent-strong); }

.authx-tabs a.active {
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: 0 4px 14px rgba(31, 51, 79, .10);
}

/* ---------- form ---------- */
.authx-form label.authx-field {
  display: block;
  margin-bottom: 15px;
}

.authx-form label.authx-field > span {
  display: block;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}

.authx-form input[type="text"],
.authx-form input[type="password"],
.authx-form input[type="email"],
.authx-form input[type="number"],
.authx-form input[type="tel"],
.authx-form textarea {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
  box-shadow: none;
}

.authx-form input::placeholder { color: #9aa8bb; }

.authx-form input:focus {
  background: var(--surface);
  border-color: rgba(18, 168, 154, .55);
  box-shadow: 0 0 0 3px rgba(18, 168, 154, .14);
}

.authx-captcha {
  display: grid;
  grid-template-columns: 1fr 122px;
  gap: 10px;
  align-items: center;
}

.authx-captcha img,
.authx-captcha .image-code {
  width: 100%;
  height: 48px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  display: block;
}

.authx-code-row {
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 10px;
}

.authx-code-btn {
  height: 48px;
  border: 1px solid rgba(18, 168, 154, .38);
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .16s ease;
  padding: 0;
}

.authx-code-btn:hover { background: rgba(18, 168, 154, .18); }
.authx-code-btn:disabled { opacity: .6; cursor: default; }

.authx-hint {
  display: block;
  margin: 7px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.authx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0 20px;
  font-size: 13px;
}

.authx-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  cursor: pointer;
}

.authx-check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.authx-check span { font-size: 13px; }

.authx-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-strong);
}

.authx-link:hover { text-decoration: underline; }

.authx-submit {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #17b8a8 0%, #0d8f84 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(13, 143, 132, .26);
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}

.authx-submit:hover { filter: brightness(1.04); box-shadow: 0 16px 32px rgba(13, 143, 132, .32); }
.authx-submit:active { transform: translateY(1px); }
.authx-submit[disabled] { opacity: .7; cursor: default; }

.authx-sep {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .06em;
}

.authx-sep::before,
.authx-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.authx-foot {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.authx-foot a { color: var(--accent-strong); font-weight: 700; }

.authx-notice {
  margin: 0 0 16px;
  padding: 11px 13px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12.5px;
  line-height: 1.6;
}

/* ---------- footer ---------- */
.authx-footer {
  padding: 6px 0 0;
}

/* ---------- dark ---------- */
html[data-theme="dark"] .authx-card {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 26px 64px rgba(0, 0, 0, .5);
}

html[data-theme="dark"] .authx-page {
  background:
    radial-gradient(1000px 480px at 10% -14%, rgba(31, 201, 182, .13), transparent 62%),
    radial-gradient(880px 440px at 94% -6%, rgba(96, 140, 255, .10), transparent 64%),
    var(--bg);
}

html[data-theme="dark"] .authx-form input {
  background: var(--surface-2);
  color: var(--text);
}

html[data-theme="dark"] .authx-form input::placeholder { color: #6f809a; }
html[data-theme="dark"] .authx-captcha img { background: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .authx-page { padding: 22px 14px 34px; }
  .authx-card { padding: 26px 20px 24px; border-radius: 20px; }
  .authx-card h1 { font-size: 23px; }
  .authx-eyebrow { margin-bottom: 8px; font-size: 10px; }
  .authx-sub { margin-bottom: 16px; font-size: 12.5px; }
  .authx-tabs { margin-bottom: 16px; }
  .authx-tabs a { height: 38px; font-size: 13.5px; }
  .authx-form label.authx-field { margin-bottom: 12px; }
  .authx-captcha { grid-template-columns: 1fr 100px; }
  .authx-code-row { grid-template-columns: 1fr 112px; }
  .authx-code-btn { font-size: 12px; }
}

/* captcha row: keep input and code image exactly the same height */
.authx-captcha{align-items:stretch!important}
.authx-captcha>input,.authx-captcha .image-code{height:48px!important;min-height:48px!important;box-sizing:border-box!important}
.authx-captcha>input{width:100%!important;padding:0 14px!important;border:1.5px solid #dbe3ee!important;border-radius:12px!important;background:#fff!important;font:inherit!important;color:#111a31!important}
.authx-captcha>input:focus{border-color:#15a99d!important;outline:0!important;box-shadow:0 0 0 3px rgba(21,169,157,.14)!important}
.authx-captcha .image-code{width:100%!important;object-fit:cover!important;border-radius:12px!important}
@media (max-width:760px){.authx-captcha .image-code,.authx-captcha>input{height:46px!important;min-height:46px!important}}

/* ============================================================
   2026-11-23 页脚贴底（内容不足一屏时 footer 贴到页面底部）
   ============================================================ */
body.authx-body {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: 100vh;
}
@supports (min-height: 100dvh) {
  body.authx-body { min-height: 100dvh; }
}
body.authx-body > .site-header,
body.authx-body > .mobile-tabbar,
body.authx-body > .site-footer,
body.authx-body > .authx-footer {
  flex: 0 0 auto;
}
body.authx-body > main.authx-page {
  flex: 1 1 auto;
  width: 100%;
}
body.authx-body > footer.authx-footer {
  margin-top: auto;
}
