:root {
  color-scheme: dark;
  --page-bg: #010609;
  --panel-bg: rgba(3, 15, 22, .78);
  --field-bg: rgba(3, 14, 20, .78);
  --line: rgba(137, 176, 184, .42);
  --text: #f3fbfc;
  --muted: #879b9f;
  --cyan: #45e7dc;
  --cyan-strong: #25cbd6;
  --danger: #ff8178;
  font-family: Inter, "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { overflow: hidden; background: var(--page-bg); color: var(--text); }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.landing-shell {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--page-bg);
}

.landing-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(0, 4, 7, .08);
}

.neural-scene {
  position: absolute;
  inset: 0;
  z-index: -2;
  transform: translate3d(var(--scene-x, 0px), var(--scene-y, 0px), 0) scale(1.012);
  transition: transform .8s cubic-bezier(.16, 1, .3, 1);
  will-change: transform;
}

.neural-scene img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(.94) saturate(.98) contrast(1.02);
  animation: neuralDrift 22s ease-in-out infinite alternate;
  will-change: transform, filter;
}

.login-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: center;
  gap: 154px;
  width: min(1240px, calc(100% - 80px));
  min-height: 100dvh;
  margin: 0 auto;
  padding: 48px 0;
}

.login-intro {
  min-width: 0;
  padding-left: 16px;
  transform: translateY(-34px);
}

.brand-lockup { display: flex; align-items: center; gap: 22px; }
.brand-lockup > img {
  width: 140px;
  height: 52px;
  object-fit: contain;
  border-radius: 0;
  mix-blend-mode: screen;
}
.brand-divider { width: 1px; height: 43px; background: rgba(171, 200, 205, .32); }
.brand-copy, .brand-copy b, .brand-copy small { display: block; }
.brand-copy b {
  color: #f5fbfc;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.018em;
  white-space: nowrap;
}
.brand-copy small { display: none; }

.hero-copy { margin-top: 58px; max-width: 700px; }
.hero-copy h1 {
  margin: 0 0 13px;
  color: #f4fbfc;
  font-size: 42px;
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -.035em;
  text-shadow: 0 10px 36px rgba(0, 0, 0, .5);
}
.hero-copy p {
  margin: 0;
  color: #9aa9ac;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
}

.auth-panel {
  position: relative;
  align-self: center;
  width: 420px;
  min-height: 631px;
  max-height: calc(100dvh - 52px);
  overflow: auto;
  padding: 68px 35px 28px;
  transform: translateY(-10px);
  border: 1px solid rgba(92, 117, 126, .42);
  border-top-color: rgba(202, 232, 238, .62);
  border-left-color: rgba(135, 207, 216, .68);
  border-right-color: rgba(91, 111, 120, .44);
  border-bottom-color: rgba(69, 91, 100, .30);
  border-radius: 21px;
  background: var(--panel-bg);
  box-shadow:
    -3px -3px 9px rgba(218, 253, 255, .33),
    -12px -12px 30px rgba(74, 222, 232, .25),
    -30px -26px 72px rgba(24, 171, 192, .13),
    0 38px 96px rgba(0, 0, 0, .60),
    inset 1px 1px rgba(235, 255, 255, .13),
    inset -1px -1px rgba(11, 39, 47, .34),
    inset 82px 62px 116px rgba(31, 136, 158, .21),
    inset 0 0 56px rgba(23, 102, 118, .08);
  backdrop-filter: blur(22px) saturate(122%);
  scrollbar-width: thin;
  scrollbar-color: rgba(69, 231, 220, .30) transparent;
}

.auth-panel:focus-within {
  border-top-color: rgba(218, 245, 248, .74);
  border-left-color: rgba(143, 230, 230, .76);
  border-right-color: rgba(91, 133, 141, .48);
  border-bottom-color: rgba(69, 111, 120, .36);
  box-shadow:
    -3px -3px 10px rgba(226, 255, 255, .38),
    -13px -13px 34px rgba(76, 229, 234, .29),
    -32px -28px 78px rgba(28, 184, 201, .16),
    0 38px 96px rgba(0, 0, 0, .60),
    0 0 32px rgba(37, 203, 214, .05),
    inset 1px 1px rgba(228, 255, 255, .12),
    inset -1px -1px rgba(11, 39, 47, .38),
    inset 86px 66px 120px rgba(31, 146, 165, .23),
    inset 0 0 56px rgba(23, 102, 118, .09);
}

.auth-eyebrow, .auth-panel-head p { display: none; }
.auth-panel-head h2 {
  margin: 0;
  color: #eff8f9;
  font-size: 30px;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  letter-spacing: -.025em;
}

.auth-mode {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 38px;
  border-bottom: 1px solid rgba(122, 157, 164, .30);
}
.auth-mode[hidden] { display: none; }
.auth-mode button {
  position: relative;
  height: 51px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #75878b;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: color .2s ease;
}
.auth-mode button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
}
.auth-mode button.active { color: var(--cyan); }
.auth-mode button.active::after { background: var(--cyan); box-shadow: 0 0 13px rgba(69, 231, 220, .48); }
.auth-mode button:hover { color: #c9f9f5; }
.auth-mode button:focus-visible { outline: 2px solid rgba(69, 231, 220, .48); outline-offset: -4px; }

#loginForm { display: grid; gap: 24px; margin-top: 38px; }
.auth-field { display: grid; gap: 10px; }
.auth-field[hidden] { display: none !important; }
.auth-field label { color: #e2edef; font-size: 14px; font-weight: 560; }
.auth-field > small { color: #70878c; font-size: 10px; line-height: 1.5; }
.auth-field input {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid rgba(132, 171, 179, .38);
  border-radius: 8px;
  background: var(--field-bg);
  color: #f2fbfc;
  font-size: 14px;
  outline: 0;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.auth-field input::placeholder { color: #60757a; }
.auth-field input:hover { border-color: rgba(146, 199, 207, .58); }
.auth-field input:focus {
  border-color: var(--cyan);
  background: rgba(3, 18, 25, .92);
  box-shadow: 0 0 0 3px rgba(69, 231, 220, .10), 0 0 24px rgba(37, 203, 214, .07);
}
.password-control { position: relative; }
.password-control input { padding-right: 54px; }
.password-control button {
  position: absolute;
  top: 3px;
  right: 4px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #82979b;
  cursor: pointer;
}
.password-control button i { font-size: 18px; }
.password-control button:hover, .password-control button:focus-visible { background: rgba(69, 231, 220, .07); color: #c6faf5; outline: 0; }

.auth-error { display: none; color: var(--danger); font-size: 11px; line-height: 1.45; }
.auth-error:not(:empty) { display: block; margin-top: -8px; padding: 8px 10px; border: 1px solid rgba(255, 129, 120, .26); border-radius: 7px; background: rgba(104, 26, 24, .22); }
.auth-error.success { border-color: rgba(69, 231, 220, .24); background: rgba(17, 115, 103, .16); color: #92eee1; }

.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 60px;
  margin-top: 27px;
  border: 1px solid rgba(132, 255, 247, .70);
  border-radius: 8px;
  background: var(--cyan-strong);
  color: #02151b;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 15px 38px rgba(22, 193, 204, .22), inset 0 1px rgba(255, 255, 255, .22);
  cursor: pointer;
  transition: transform .2s cubic-bezier(.16, 1, .3, 1), filter .2s ease, box-shadow .2s ease;
}
.auth-submit:hover, .auth-submit:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.08);
  outline: 3px solid rgba(69, 231, 220, .14);
  box-shadow: 0 18px 42px rgba(22, 193, 204, .29), inset 0 1px rgba(255, 255, 255, .25);
}
.auth-submit:active { transform: translateY(0) scale(.992); }
.auth-submit:disabled { cursor: wait; filter: saturate(.55); opacity: .7; }
.auth-submit i { display: none; width: 14px; height: 14px; border: 2px solid rgba(2, 21, 28, .3); border-top-color: #03151c; border-radius: 50%; animation: spin .7s linear infinite; }
.auth-submit.loading i { display: block; }

.auth-panel footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 50px;
  color: #71868b;
  font-size: 11px;
}
.auth-panel footer > span { display: flex; align-items: center; gap: 9px; }
.auth-panel footer > span::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: -1px;
  border-radius: 50%;
  background: #21e1c3;
  box-shadow: 0 0 12px rgba(33, 225, 195, .75);
  order: -1;
}
.auth-panel footer i { order: 1; color: var(--cyan); font-size: 17px; filter: drop-shadow(0 0 8px rgba(69, 231, 220, .42)); }
.auth-panel footer > span::after { order: 2; }
.auth-panel footer b { order: 3; font-weight: 500; }
.auth-panel footer small { display: none; }

.site-compliance {
  position: absolute;
  right: 20px;
  bottom: 12px;
  left: 20px;
  z-index: 2;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
}
.site-compliance a {
  color: #71868b;
  text-decoration: none;
  transition: color .2s ease;
}
.site-compliance a:hover,
.site-compliance a:focus-visible { color: #b9dfe1; outline: 0; text-decoration: underline; }

@keyframes neuralDrift {
  from { transform: scale(1.004) translate3d(-.15%, -.08%, 0); filter: brightness(.91) saturate(.94) contrast(1.01); }
  to { transform: scale(1.025) translate3d(.18%, .1%, 0); filter: brightness(.98) saturate(1.03) contrast(1.035); }
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1060px) {
  .login-stage { grid-template-columns: minmax(0, 1fr) 390px; gap: 54px; width: min(930px, calc(100% - 48px)); }
  .login-intro { padding-left: 0; }
  .brand-lockup > img { width: 126px; height: 48px; }
  .brand-copy b { font-size: 19px; }
  .hero-copy h1 { font-size: 40px; }
  .auth-panel { width: 390px; padding-right: 32px; padding-left: 32px; }
}

@media (max-width: 800px) {
  body { overflow: auto; }
  .landing-shell { min-height: 100dvh; overflow: hidden; }
  .neural-scene img { object-position: 39% center; }
  .login-stage { grid-template-columns: 1fr; gap: 38px; width: min(520px, calc(100% - 32px)); padding: 30px 0 44px; }
  .login-intro, .auth-panel { transform: none; }
  .login-intro { text-align: center; }
  .brand-lockup { justify-content: center; }
  .hero-copy { margin: 36px auto 0; }
  .hero-copy h1 { font-size: clamp(38px, 10vw, 46px); }
  .auth-panel { width: 100%; min-height: 631px; max-height: none; }
}

@media (max-width: 480px) {
  .login-stage { width: calc(100% - 24px); padding-top: 20px; }
  .brand-lockup { gap: 12px; }
  .brand-lockup > img { width: 111px; height: 43px; }
  .brand-divider { height: 34px; }
  .brand-copy b { max-width: 156px; font-size: 14px; line-height: 1.25; white-space: normal; text-align: left; }
  .hero-copy { margin-top: 30px; }
  .hero-copy h1 { font-size: 36px; }
  .hero-copy p { font-size: 14px; }
  .auth-panel { padding: 52px 20px 24px; border-radius: 18px; }
  .auth-panel-head h2 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .neural-scene { transition: none; transform: none; }
  .neural-scene img, .auth-submit i { animation: none; }
  .auth-submit { transition: none; }
}
