/* 登录页独立作用域：所有组件使用 auth- 前缀。 */
:root {
  --auth-navy: #17324d;
  --auth-navy-hover: #21425f;
  --auth-warm: #f6f4ef;
  --auth-paper: #ffffff;
  --auth-ink: #1e293b;
  --auth-muted: #667085;
  --auth-line: #dce1e5;
  --auth-gold: #aa8b55;
  --auth-danger: #963f35;
}
html { background: var(--auth-warm); }
.auth-body {
  margin: 0;
  min-width: 0;
  min-height: 100dvh;
  color: var(--auth-ink);
  background: var(--auth-warm);
  font: 14px/1.65 "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.auth-page *, .auth-page *::before, .auth-page *::after { box-sizing: border-box; }
.auth-page [hidden] { display: none !important; }
.auth-page { min-height: 100dvh; min-width: 0; }
.auth-page a { -webkit-tap-highlight-color: transparent; }
.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(100% - 48px, 1120px);
  min-height: 82px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(23, 50, 77, 0.10);
}
.auth-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--auth-navy); text-decoration: none; }
.auth-brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--auth-navy);
  color: #fff;
  box-shadow: inset 0 -2px 0 rgba(170, 139, 85, 0.72);
  font: 20px/1 "Songti SC", "SimSun", serif;
}
.auth-brand-name { font: 700 22px/1.2 "Songti SC", "SimSun", serif; letter-spacing: 2px; }
.auth-brand-edition { margin-left: 1px; padding-left: 11px; border-left: 1px solid var(--auth-line); color: var(--auth-muted); font-size: 10px; font-weight: 600; letter-spacing: 1.5px; }
.auth-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--auth-navy);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 140ms ease, transform 140ms ease;
}
.auth-back:hover { background: rgba(23, 50, 77, 0.055); transform: translateY(-1px); }
.auth-back:active { transform: translateY(0) scale(0.985); }
.auth-brand:focus-visible, .auth-back:focus-visible, .auth-tab:focus-visible, .auth-password-toggle:focus-visible, .auth-submit:focus-visible, .auth-page input:focus-visible {
  outline: 3px solid rgba(170, 139, 85, 0.46);
  outline-offset: 3px;
}
.auth-main { display: grid; place-items: center; padding: 42px 20px 54px; }
.auth-shell { width: min(100%, 420px); min-width: 0; }
.auth-intro { margin: 0 2px 23px; }
.auth-eyebrow { margin: 0 0 6px; color: var(--auth-gold); font-size: 11px; font-weight: 700; letter-spacing: 2px; }
.auth-intro h1 { margin: 0; color: var(--auth-navy); font: 700 29px/1.35 "Songti SC", "SimSun", serif; letter-spacing: 1px; }
.auth-intro > p:last-child { margin: 9px 0 0; color: var(--auth-muted); font-size: 13px; }
.auth-card {
  width: 100%;
  padding: 7px 28px 28px;
  overflow: hidden;
  border: 1px solid var(--auth-line);
  border-radius: 14px;
  background: var(--auth-paper);
  box-shadow: 0 2px 3px rgba(23, 50, 77, 0.025), 0 16px 38px rgba(23, 50, 77, 0.065);
}
.auth-tabs { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 -4px 23px; border-bottom: 1px solid var(--auth-line); }
.auth-tab {
  position: relative;
  min-width: 0;
  min-height: 52px;
  padding: 10px 8px 13px;
  border: 0;
  border-radius: 7px 7px 0 0;
  background: transparent;
  color: var(--auth-muted);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: color 140ms ease, background-color 140ms ease;
  -webkit-tap-highlight-color: transparent;
}
.auth-tab:hover { color: var(--auth-navy); background: rgba(23, 50, 77, 0.028); }
.auth-tab[aria-selected="true"] { color: var(--auth-navy); }
.auth-tab-indicator {
  position: absolute;
  z-index: 1;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--auth-gold);
  transform: translateX(0);
  transform-origin: left center;
  transition: transform 300ms cubic-bezier(.22, 1, .36, 1), width 300ms cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
}
.auth-form { min-width: 0; }
.auth-field { min-width: 0; margin: 0 0 17px; }
.auth-account-field { margin-bottom: 19px; }
.auth-field label { display: inline-block; margin: 0 0 7px; color: #344054; font-size: 13px; font-weight: 600; }
.auth-page input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #cbd3da;
  border-radius: 8px;
  background: #fff;
  color: var(--auth-ink);
  font: inherit;
  line-height: 1.6;
  caret-color: var(--auth-navy);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.auth-page input::placeholder { color: #89929d; opacity: 1; }
.auth-page input:hover { border-color: #aebac4; }
.auth-page input:focus { border-color: var(--auth-navy); box-shadow: 0 0 0 3px rgba(23, 50, 77, 0.065); outline: none; }
.auth-page input:focus-visible { outline: 3px solid rgba(170, 139, 85, 0.46); outline-offset: 2px; }
.auth-page input[aria-invalid="true"] { border-color: var(--auth-danger); box-shadow: 0 0 0 3px rgba(150, 63, 53, 0.06); }
.auth-password-wrap { position: relative; min-width: 0; }
.auth-password-wrap input { padding-right: 52px; }
.auth-password-toggle {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #647385;
  cursor: pointer;
  transition: color 140ms ease, background-color 140ms ease, transform 140ms ease;
}
.auth-password-toggle:hover { color: var(--auth-navy); background: #f1f3f5; }
.auth-password-toggle:active { transform: scale(0.92); }
.auth-eye-closed { display: none; }
.auth-password-toggle[aria-pressed="true"] .auth-eye-open { display: none; }
.auth-password-toggle[aria-pressed="true"] .auth-eye-closed { display: block; }
/* Edge adds its own reveal control inside password fields; the page already has one. */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear { display: none; }
.auth-field-error { margin: 6px 0 0; color: var(--auth-danger); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.auth-panel-viewport { position: relative; display: flow-root; min-width: 0; }
.auth-panel { top: 0; left: 0; width: 100%; min-width: 0; }
.auth-panel[aria-hidden="true"] { pointer-events: none; }
.auth-panel-note { margin: 1px 0 19px; color: var(--auth-muted); font-size: 12px; line-height: 1.6; }
.auth-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 11px 18px;
  border: 1px solid var(--auth-navy);
  border-radius: 8px;
  background: var(--auth-navy);
  color: #fff;
  box-shadow: 0 3px 8px rgba(23, 50, 77, 0.16);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  letter-spacing: 1px;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.auth-submit:hover:not(:disabled) { transform: translateY(-1px); background: var(--auth-navy-hover); border-color: var(--auth-navy-hover); box-shadow: 0 5px 12px rgba(23, 50, 77, 0.20); }
.auth-submit:active:not(:disabled) { transform: translateY(0) scale(0.985); box-shadow: 0 2px 5px rgba(23, 50, 77, 0.15); }
.auth-submit:disabled { opacity: 0.64; cursor: wait; box-shadow: none; }
.auth-submit.is-error { box-shadow: 0 0 0 3px rgba(150, 63, 53, 0.14); }
.auth-submit-label { display: block; min-width: 4em; line-height: 24px; text-align: center; transition: opacity 120ms ease; }
.auth-spinner {
  position: absolute;
  width: 19px;
  height: 19px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
  animation: auth-spin 700ms linear infinite;
}
.auth-submit.is-loading .auth-submit-label { opacity: 0; }
.auth-submit.is-loading .auth-spinner { opacity: 1; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-form-message { margin: 14px 0 0; padding: 10px 12px; border: 1px solid #e5c9c3; border-radius: 7px; background: #fbf0ed; color: #83382f; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.auth-form-message.is-success { border-color: #c6d8d0; background: #eef6f2; color: #285846; }
.auth-service-note { display: flex; align-items: flex-start; justify-content: center; gap: 7px; margin: 17px 0 0; color: #6c5a3e; font-size: 12px; text-align: center; }
.auth-service-note::before { content: ""; flex: 0 0 auto; width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: var(--auth-gold); }
.auth-privacy { margin: 6px 0 0; color: var(--auth-muted); font-size: 11px; text-align: center; }

@media (max-width: 560px) {
  .auth-topbar { width: calc(100% - 32px); min-height: 72px; }
  .auth-brand-edition { display: none; }
  .auth-brand-name { font-size: 20px; }
  .auth-main { place-items: start center; padding: 28px 16px 38px; }
  .auth-intro { margin-bottom: 19px; }
  .auth-intro h1 { font-size: 26px; }
  .auth-card { padding: 6px 20px 23px; border-radius: 12px; }
  .auth-tabs { margin-bottom: 21px; }
  .auth-service-note { font-size: 11px; }
}
@media (max-width: 340px) {
  .auth-main { padding-left: 12px; padding-right: 12px; }
  .auth-card { padding-left: 16px; padding-right: 16px; }
  .auth-back { padding-left: 8px; padding-right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-page *, .auth-page *::before, .auth-page *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .auth-back:hover, .auth-submit:hover:not(:disabled) { transform: none; }
}
