:root {
  --ink: #0b0b0c;
  --paper: #f3f2ee;
  --paper-deep: #e9e7e0;
  --muted: #77756f;
  --line: rgba(11, 11, 12, .13);
  --gold: #cda45a;
  --gold-pale: #efd69f;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --hero-x: 0px;
  --hero-y: 0px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--ink);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  color: #f8f6ef;
  background: #080809;
  transition: opacity .8s var(--ease), visibility .8s;
}

.page-loader.is-finished { opacity: 0; visibility: hidden; }

.loader-mark {
  position: relative;
  display: grid;
  gap: 14px;
  width: 140px;
  text-align: center;
}

.loader-mark strong { font-size: 20px; letter-spacing: .26em; }

.loader-track {
  height: 1px;
  overflow: hidden;
  background: rgba(255,255,255,.14);
}

.loader-track::after {
  content: "";
  display: block;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--gold-pale));
  animation: loading 1.15s var(--ease) infinite;
}

@keyframes loading { from { transform: translateX(-110%); } to { transform: translateX(210%); } }

.login-shell {
  display: grid;
  grid-template-columns: minmax(520px, 1.14fr) minmax(510px, .86fr);
  min-height: 100svh;
  background: var(--paper);
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  color: #fff;
  background: #080809;
  isolation: isolate;
}

.hero-image {
  position: absolute;
  inset: -6%;
  width: 112%;
  height: 112%;
  object-fit: cover;
  object-position: 53% 36%;
  filter: grayscale(1) contrast(1.05) brightness(.76);
  transform: translate3d(var(--hero-x), var(--hero-y), 0) scale(1.03);
  transition: transform 1.5s var(--ease), filter 1.2s var(--ease);
  will-change: transform;
  animation: heroReveal 1.7s .18s var(--ease) both;
}

@keyframes heroReveal {
  from { opacity: 0; filter: grayscale(1) contrast(1.2) brightness(.25); transform: scale(1.12); }
  to { opacity: 1; filter: grayscale(1) contrast(1.05) brightness(.76); }
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(700px circle at var(--light-x, 58%) var(--light-y, 38%), rgba(255,255,255,.10), transparent 46%),
    linear-gradient(90deg, rgba(3,3,4,.2), transparent 42%, rgba(3,3,4,.34)),
    linear-gradient(0deg, rgba(3,3,4,.86) 0%, rgba(3,3,4,.08) 47%, rgba(3,3,4,.18) 100%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: .22;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 15% 23%, rgba(255,255,255,.42) 0 .45px, transparent .6px),
    radial-gradient(circle at 72% 61%, rgba(255,255,255,.28) 0 .4px, transparent .55px);
  background-size: 5px 5px, 7px 7px;
  mix-blend-mode: soft-light;
}

.scanline {
  position: absolute;
  z-index: 3;
  top: -30%;
  left: 0;
  width: 100%;
  height: 20%;
  opacity: .25;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.28), transparent);
  animation: scan 8s linear infinite;
  pointer-events: none;
}

@keyframes scan { to { transform: translateY(720%); } }

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: .23;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(50% - .5px), rgba(255,255,255,.16) 50%, transparent calc(50% + .5px)),
    linear-gradient(0deg, transparent calc(50% - .5px), rgba(255,255,255,.10) 50%, transparent calc(50% + .5px));
  background-size: 33.333% 100%, 100% 25%;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 78%);
}

.hero-top,
.hero-bottom {
  position: absolute;
  z-index: 5;
  left: clamp(28px, 4vw, 72px);
  right: clamp(28px, 4vw, 72px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-top { top: clamp(26px, 4.5vh, 52px); }
.hero-bottom { bottom: clamp(30px, 5vh, 58px); align-items: end; }

.brand-kicker,
.system-state,
.microcopy {
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.brand-kicker { display: flex; align-items: center; gap: 13px; font-weight: 650; }

.brand-kicker::before {
  content: "";
  width: 27px;
  height: 1px;
  background: var(--gold-pale);
  box-shadow: 0 0 16px rgba(239,214,159,.65);
}

.system-state { display: flex; align-items: center; gap: 9px; opacity: .68; }

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d8f2c4;
  box-shadow: 0 0 0 4px rgba(216,242,196,.09), 0 0 14px rgba(216,242,196,.65);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse { 50% { opacity: .45; transform: scale(.74); } }

.hero-copy {
  max-width: 560px;
  animation: rise 1.15s .72s var(--ease) both;
}

.hero-copy h2 {
  margin: 0 0 17px;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-weight: 400;
  font-size: clamp(42px, 4.8vw, 76px);
  line-height: .98;
  letter-spacing: -.055em;
  text-shadow: 0 8px 32px rgba(0,0,0,.28);
}

.hero-copy h2 em {
  color: var(--gold-pale);
  font-style: normal;
  text-shadow: 0 0 35px rgba(205,164,90,.14);
}

.hero-copy p {
  margin: 0;
  color: rgba(255,255,255,.62);
  font-size: 13px;
  letter-spacing: .18em;
}

.hero-index {
  display: grid;
  justify-items: end;
  gap: 11px;
  color: rgba(255,255,255,.48);
  animation: rise 1.15s .86s var(--ease) both;
}

.hero-index strong { color: #fff; font-size: 15px; font-weight: 450; letter-spacing: .1em; }

.index-line {
  position: relative;
  width: 92px;
  height: 1px;
  overflow: hidden;
  background: rgba(255,255,255,.22);
}

.index-line::after {
  content: "";
  position: absolute;
  inset: 0 58% 0 0;
  background: var(--gold-pale);
  animation: indexMove 4s ease-in-out infinite alternate;
}

@keyframes indexMove { to { transform: translateX(135%); } }

.orbit {
  position: absolute;
  z-index: 5;
  top: 50%;
  right: -70px;
  width: 142px;
  height: 142px;
  margin-top: -71px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  animation: rotate 18s linear infinite;
}

.orbit::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--gold-pale);
  box-shadow: 0 0 14px var(--gold);
}

@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.auth {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(700px circle at var(--auth-x, 50%) var(--auth-y, 35%), rgba(255,255,255,.92), transparent 54%),
    var(--paper);
}

.auth::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .55;
  pointer-events: none;
  background-image: linear-gradient(rgba(11,11,12,.027) 1px, transparent 1px), linear-gradient(90deg, rgba(11,11,12,.027) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 45%, #000, transparent 72%);
}

.topbar {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(25px, 4.5vh, 48px) clamp(28px, 4.2vw, 68px);
  animation: fadeIn .9s .75s both;
}

@keyframes fadeIn { from { opacity: 0; } }

.wordmark { display: flex; align-items: baseline; gap: 10px; }
.wordmark-logo { width: 34px; height: 34px; object-fit: contain; align-self: center; }
.wordmark b { font-size: 19px; letter-spacing: -.04em; }
.wordmark small { font-size: 12px; letter-spacing: .05em; }

.language-wrap {
  position: relative;
  display: inline-flex;
}

.language-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 1.5px solid #62605b;
  border-bottom: 1.5px solid #62605b;
  transform: rotate(45deg);
  pointer-events: none;
}

.language {
  appearance: none;
  -webkit-appearance: none;
  min-width: 108px;
  height: 40px;
  padding: 0 34px 0 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background: rgba(255,255,255,.34);
  font-size: 12px;
  font-weight: 670;
  letter-spacing: .06em;
  cursor: pointer;
  transition: border-color .35s, background .35s, box-shadow .35s, transform .35s var(--ease);
}

html[dir="rtl"] .language-wrap::after {
  right: auto;
  left: 14px;
}

html[dir="rtl"] .language {
  direction: rtl;
  padding-right: 14px;
  padding-left: 34px;
  text-align: right;
}

html[dir="rtl"] .auth,
html[dir="rtl"] .login-form {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .hero {
  direction: ltr;
  text-align: left;
}

.language:hover {
  border-color: rgba(11,11,12,.22);
  background: rgba(255,255,255,.58);
}

.language:focus {
  border-color: rgba(11,11,12,.42);
  background: rgba(255,255,255,.72);
  box-shadow: 0 12px 28px rgba(25,23,18,.06);
  transform: translateY(-1px);
}

.language:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.auth-stage {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 112px clamp(30px, 7vw, 104px) 84px;
}

.auth-card { width: min(100%, 500px); }

.intro { margin-bottom: clamp(34px, 5vh, 52px); animation: rise 1.05s .55s var(--ease) both; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 16px;
  color: #a17a36;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .27em;
  text-transform: uppercase;
}

.eyebrow::before { content: ""; width: 23px; height: 1px; background: currentColor; }

.intro h1 {
  margin: 0;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: clamp(42px, 4.1vw, 64px);
  font-weight: 550;
  line-height: 1.06;
  letter-spacing: -.065em;
  color: var(--ink);
}

.intro-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.secure-tag { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 10px; letter-spacing: .12em; }
.secure-tag::before { content: ""; width: 5px; height: 5px; border: 1px solid #8d8a82; border-radius: 50%; }

.login-form { animation: rise 1.05s .68s var(--ease) both; }

.field { position: relative; margin-bottom: 25px; }

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
}

.label-row label { font-size: 12px; font-weight: 670; letter-spacing: .02em; }

.text-link {
  position: relative;
  color: #696761;
  font-size: 11px;
}

.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  transition: right .35s var(--ease);
}

.text-link:hover::after, .text-link:focus-visible::after { right: 0; }

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
  height: 59px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.34);
  transition: border-color .35s, background .35s, box-shadow .35s, transform .35s var(--ease);
}

.input-shell::after {
  content: "";
  position: absolute;
  left: -1px;
  right: 100%;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), var(--ink));
  transition: right .55s var(--ease);
}

.input-shell:focus-within {
  border-color: rgba(11,11,12,.42);
  background: rgba(255,255,255,.72);
  box-shadow: 0 15px 35px rgba(25,23,18,.06);
  transform: translateY(-2px);
}

.input-shell:focus-within::after { right: -1px; }

.field-number {
  width: 45px;
  flex: 0 0 45px;
  text-align: center;
  color: #a6a39b;
  font: 9px ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .1em;
  border-right: 1px solid rgba(11,11,12,.08);
}

.input-shell input {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 18px;
  color: var(--ink);
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  caret-color: var(--gold);
}

.input-shell input::placeholder { color: #aaa79f; }

.password-toggle {
  align-self: stretch;
  padding: 0 18px;
  color: #62605b;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
  font-weight: 660;
  cursor: pointer;
}

.password-toggle:focus-visible { box-shadow: inset 0 0 0 1px var(--gold); }

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -5px 0 24px;
}

.remember { display: flex; align-items: center; gap: 9px; color: #73716c; font-size: 11px; cursor: pointer; }
.remember input { position: absolute; opacity: 0; pointer-events: none; }

.checkmark {
  position: relative;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(11,11,12,.22);
  background: rgba(255,255,255,.4);
  transition: .25s;
}

.checkmark::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid var(--paper);
  border-width: 0 1.5px 1.5px 0;
  opacity: 0;
  transform: rotate(45deg) scale(.6);
  transition: .25s var(--ease);
}

.remember input:checked + .checkmark { border-color: var(--ink); background: var(--ink); }
.remember input:checked + .checkmark::after { opacity: 1; transform: rotate(45deg) scale(1); }
.remember input:focus-visible + .checkmark { box-shadow: 0 0 0 3px rgba(205,164,90,.28); }

.caps-hint { min-height: 15px; color: #9a6d29; font-size: 10px; opacity: 0; transform: translateY(3px); transition: .25s; }
.caps-hint.visible { opacity: 1; transform: none; }

.submit {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  height: 61px;
  overflow: hidden;
  padding: 0 24px;
  color: #fff;
  border: 0;
  background: var(--ink);
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(11,11,12,.13);
  transition: transform .35s var(--ease), box-shadow .35s, background .35s;
}

.submit::before {
  content: "";
  position: absolute;
  top: -130%;
  left: -18%;
  width: 20%;
  height: 360%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.26), transparent);
  transform: rotate(18deg);
  transition: left .75s var(--ease);
}

.submit:hover { transform: translateY(-3px); box-shadow: 0 23px 46px rgba(11,11,12,.19); }
.submit:hover::before { left: 112%; }
.submit:active { transform: translateY(0) scale(.99); }
.submit:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.submit:disabled { cursor: wait; }

.submit-label { grid-column: 2; font-size: 13px; font-weight: 690; letter-spacing: .18em; }
.submit-arrow { grid-column: 3; justify-self: end; font-size: 18px; transition: transform .35s var(--ease); }
.submit:hover .submit-arrow { transform: translateX(5px); }

.submit.loading .submit-label { color: transparent; }
.submit.loading .submit-arrow { display: none; }

.submit.loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 15px;
  height: 15px;
  margin: -8px;
  border: 1.5px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rotate .7s linear infinite;
}

.signup {
  margin: 24px 0 0;
  color: #85827b;
  text-align: center;
  font-size: 12px;
}

.signup a { margin-left: 6px; color: var(--ink); font-weight: 680; }

.legal {
  margin: 39px auto 0;
  color: #9a978f;
  text-align: center;
  font-size: 10px;
  line-height: 1.8;
  animation: fadeIn 1s 1.1s both;
}

.legal a { color: #77746e; transition: color .2s; }
.legal a:hover { color: var(--ink); }

.auth-footer {
  position: absolute;
  z-index: 3;
  left: clamp(28px, 4.2vw, 68px);
  right: clamp(28px, 4.2vw, 68px);
  bottom: 27px;
  display: flex;
  justify-content: space-between;
  color: #aaa79f;
  font: 9px ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
  animation: fadeIn 1s 1.15s both;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 26px;
  bottom: 26px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 330px;
  padding: 16px 18px;
  color: #fff;
  background: rgba(11,11,12,.94);
  font-size: 12px;
  box-shadow: 0 18px 55px rgba(0,0,0,.25);
  opacity: 0;
  transform: translateY(16px);
  visibility: hidden;
  transition: .45s var(--ease);
}

.toast.show { opacity: 1; transform: none; visibility: visible; }
.toast::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--gold-pale); box-shadow: 0 0 12px var(--gold); }

@media (max-width: 1100px) {
  .login-shell { grid-template-columns: minmax(320px, .86fr) minmax(0, 1.14fr); }
  .hero-bottom { display: block; }
  .hero-index { display: none; }
  .hero-copy h2 { font-size: clamp(38px, 5.8vw, 58px); }
}

@media (max-width: 820px) {
  body { overflow: auto; background: var(--paper); }
  .login-shell { display: block; }
  .hero { min-height: 38svh; }
  .hero-image { object-position: 51% 36%; }
  .hero-top { top: 25px; }
  .hero-bottom { bottom: 26px; }
  .hero-copy h2 { margin-bottom: 10px; font-size: clamp(34px, 10vw, 52px); }
  .hero-copy p, .orbit { display: none; }
  .auth { min-height: 62svh; overflow: visible; }
  .topbar { position: relative; padding: 27px 25px 0; }
  .auth-stage { min-height: auto; padding: 55px 25px 98px; place-items: start center; }
  .auth-card { max-width: 560px; }
  .intro { margin-bottom: 38px; }
  .auth-footer { bottom: 24px; }
}

@media (max-width: 520px) {
  .hero { min-height: 32svh; }
  .system-state { display: none; }
  .hero-copy h2 { font-size: 35px; }
  .auth-stage { padding-top: 43px; }
  .intro h1 { font-size: 43px; }
  .intro-note { align-items: flex-start; flex-direction: column; gap: 9px; }
  .field { margin-bottom: 21px; }
  .input-shell { height: 57px; }
  .auth-footer span:last-child { display: none; }
  .toast { left: 16px; right: 16px; bottom: 16px; }
  .language { min-width: 96px; height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero-image { transform: none !important; }
}
/* 服务端验证消息 */
.form-message {
  margin: -5px 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(11, 11, 12, 0.08);
  background: rgba(255, 255, 255, 0.55);
  color: #62605b;
  font-size: 12px;
  line-height: 1.55;
}

.form-message.error {
  border-color: rgba(180, 35, 24, 0.18);
  background: rgba(255, 240, 238, 0.92);
  color: #9a2f26;
}

.form-message.success {
  border-color: rgba(21, 115, 71, 0.18);
  background: rgba(237, 248, 242, 0.92);
  color: #157347;
}

.form-message ul {
  margin: 0;
  padding-left: 18px;
}

/* 登录页固定浅色视觉，不受门户 data-ui-theme 影响 */
html.login-page,
html.login-page[data-ui-theme="dark"],
html.login-page[data-ui-theme="neovision"] {
  --ink: #0b0b0c;
  --paper: #f3f2ee;
  --paper-deep: #e9e7e0;
  --muted: #77756f;
  --line: rgba(11, 11, 12, .13);
  --gold: #cda45a;
  --gold-pale: #efd69f;
  color-scheme: light;
}

html.login-page body {
  background: var(--ink);
  color: var(--ink);
}

html.login-page .login-shell {
  background: var(--paper);
}

html.login-page .auth {
  background:
    radial-gradient(700px circle at var(--auth-x, 50%) var(--auth-y, 35%), rgba(255,255,255,.92), transparent 54%),
    var(--paper);
  color: var(--ink);
}

html.login-page .wordmark,
html.login-page .intro h1,
html.login-page .signup a {
  color: var(--ink);
}

html.login-page .intro-note,
html.login-page .legal,
html.login-page .signup {
  color: var(--muted);
}

html.login-page .input-shell {
  background: rgba(255,255,255,.34);
  border-color: var(--line);
}

html.login-page .input-shell input {
  color: var(--ink);
}

html.login-page .language {
  color: var(--ink);
  background: rgba(255,255,255,.34);
  border-color: var(--line);
}
