
@font-face {
  font-family: "Geist";
  src: url("/assets/geist-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/geist-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/geist-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
/* 中性单色 token，亮/暗双模式跟随系统。形状约定：控件与消息条 10px 圆角。 */
:root {
  color-scheme: light dark;
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --bg: #fafafa;
  --ink: #18181b;
  --muted: #52525b;
  --line: #e4e4e7;
  --subtle: #f4f4f5;
  --field-border: #d4d4d8;
  --field-border-hover: #a1a1aa;
  --field-bg: #ffffff;
  --btn-bg: #18181b;
  --btn-bg-hover: #27272a;
  --btn-text: #fafafa;
  --ring: rgb(24 24 27 / 14%);
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --danger-line: #f0d4cf;
  --ok: #067647;
  --ok-bg: #ecfdf3;
  --ok-line: #c6e9d4;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b;
    --ink: #f4f4f5;
    --muted: #a1a1aa;
    --line: #26262a;
    --subtle: #1c1c1f;
    --field-border: #3a3a40;
    --field-border-hover: #52525b;
    --field-bg: #1a1a1d;
    --btn-bg: #f4f4f5;
    --btn-bg-hover: #d4d4d8;
    --btn-text: #18181b;
    --ring: rgb(244 244 245 / 18%);
    --danger: #f04438;
    --danger-bg: #2a1412;
    --danger-line: #4a1f1a;
    --ok: #47cd89;
    --ok-bg: #0f2419;
    --ok-line: #1d4530;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
}
/* 分屏布局：左侧常暗品牌面板（两种模式下一致的有意色块），右侧表单列跟随主题。 */
.auth-layout {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(400px, 5fr) 7fr;
}
.brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: 48px 52px;
  color: #f4f4f5;
  background:
    radial-gradient(720px 420px at 12% -8%, rgb(255 255 255 / 7%), transparent 62%),
    #131315;
}
.brand-top {
  display: flex;
  align-items: center;
  gap: 10px;
  animation: rise .45s .06s ease-out both;
}
.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f4f4f5;
  color: #131315;
  font-size: 15px;
  font-weight: 600;
}
.brand-wordmark {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
}
.brand-tagline {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.25;
  text-wrap: balance;
  color: #e4e4e7;
  animation: rise .45s .14s ease-out both;
}
.auth-panel {
  display: grid;
  place-items: center;
  padding: 48px 24px;
}
.auth-form {
  width: min(100%, 344px);
  animation: card-in .45s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(12px); }
}
h1 {
  margin: 0 0 28px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.2;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
}
form {
  display: grid;
  gap: 14px;
  animation: rise .45s .2s ease-out both;
}
.field { display: grid; gap: 6px; }
label { font-size: 13px; font-weight: 500; color: var(--ink); }
input, button {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  font: inherit;
}
input[type="checkbox"], input[type="radio"] {
  width: auto;
  min-height: 0;
}
input {
  border: 1px solid var(--field-border);
  padding: 10px 12px;
  background: var(--field-bg);
  color: var(--ink);
  caret-color: var(--ink);
  transition: border-color .16s ease, box-shadow .16s ease;
}
input::placeholder { color: var(--muted); }
input:hover { border-color: var(--field-border-hover); }
input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--ring);
}
button {
  border: 0;
  padding: 10px 16px;
  color: var(--btn-text);
  background: var(--btn-bg);
  font-weight: 500;
  cursor: pointer;
  transition: background .16s ease, transform .1s ease;
}
button:hover { background: var(--btn-bg-hover); }
button:active { transform: scale(.99); }
button:disabled { opacity: .55; cursor: default; }
.provider-action {
  color: var(--ink);
  background: var(--field-bg);
  border: 1px solid var(--field-border);
}
.provider-action:hover {
  background: var(--subtle);
  border-color: var(--field-border-hover);
}
/* 第三方登录与密码表单之间的分隔线。 */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0;
  color: var(--muted);
  font-size: 12px;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.provider-actions {
  display: grid;
  margin-top: 12px;
}
.provider-link {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 500;
  color: var(--ink);
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, transform .1s ease;
}
.provider-link:hover {
  background: var(--subtle);
  border-color: var(--field-border-hover);
}
.provider-link:active { transform: scale(.99); }
.alternate-flow {
  margin: 20px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  animation: rise .45s .26s ease-out both;
}
.alternate-flow a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--field-border);
  text-underline-offset: 3px;
  transition: text-decoration-color .16s ease;
}
.alternate-flow a:hover { text-decoration-color: var(--ink); }
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.message-summary {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  animation: rise .45s .2s ease-out both;
}
.message-summary p { margin: 0; }
.message-summary p + p { margin-top: 4px; }
.message-summary-error {
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
}
.message-summary-info {
  color: var(--ok);
  background: var(--ok-bg);
  border: 1px solid var(--ok-line);
}
.field-message {
  margin: 0;
  font-size: 13px;
  color: var(--danger);
}
/* home / error 等静态页的链接按钮。 */
.message-summary + .button-link { margin-top: 12px; }
.error-detail {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.home-actions {
  display: grid;
  gap: 12px;
}
.button-link {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 500;
  text-decoration: none;
  color: var(--btn-text);
  background: var(--btn-bg);
  transition: background .16s ease, border-color .16s ease, transform .1s ease;
}
.button-link:hover { background: var(--btn-bg-hover); }
.button-link:active { transform: scale(.99); }
.button-secondary {
  color: var(--ink);
  background: var(--field-bg);
  border: 1px solid var(--field-border);
}
.button-secondary:hover {
  background: var(--subtle);
  border-color: var(--field-border-hover);
}
/* 移动端：品牌面板折叠为顶部横条，定位语隐藏，表单单列。 */
@media (max-width: 860px) {
  .auth-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .brand-panel {
    flex-direction: row;
    align-items: center;
    padding: 18px 24px;
  }
  .brand-tagline { display: none; }
  .auth-panel { padding: 40px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
