:root {
  color-scheme: dark;
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  background: #07130f;
  color: #f4efe5;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; margin: 0; }

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 88% 12%, rgba(198, 147, 73, 0.1), transparent 30rem),
    #07130f;
}

button, input { font: inherit; }

.login-layout {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(410px, 0.82fr);
  overflow: hidden;
}

.atlas-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  border-right: 1px solid rgba(213, 166, 91, 0.18);
}

.atlas-hero__image,
.atlas-hero__veil {
  position: absolute;
  inset: 0;
}

.atlas-hero__image {
  z-index: -3;
  background: url("/auth-assets/login-atlas-bg-v1.webp") 42% center / cover no-repeat;
  transform: scale(1.02);
  animation: reveal-image 1.25s cubic-bezier(.2,.8,.2,1) both;
}

.atlas-hero__veil {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(3, 12, 9, 0.28), rgba(3, 12, 9, 0.05) 58%, rgba(3, 12, 9, 0.72)),
    linear-gradient(0deg, rgba(3, 11, 8, 0.9), transparent 55%, rgba(3, 11, 8, 0.46));
}

.atlas-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.18;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(211, 165, 91, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(211, 165, 91, 0.12) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, black, transparent 82%);
}

.brand-lockup {
  position: absolute;
  top: clamp(28px, 4vw, 58px);
  left: clamp(30px, 5vw, 78px);
  display: block;
}

.brand-lockup__mark {
  width: 136px;
  height: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.brand-lockup p { margin: 0; }

.brand-lockup__chinese {
  margin-top: 10px !important;
  color: #e1bd7b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.hero-copy {
  position: absolute;
  left: clamp(30px, 7vw, 108px);
  bottom: clamp(105px, 16vh, 180px);
  width: min(590px, 70%);
  animation: rise-in 0.9s 0.12s cubic-bezier(.2,.8,.2,1) both;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: #ddb46d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.27em;
}

.eyebrow span { width: 34px; height: 1px; background: #d5a65b; }

.hero-copy h1 {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(54px, 6vw, 92px);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.02;
  text-shadow: 0 8px 35px rgba(0, 0, 0, 0.34);
}

.hero-copy__subtitle {
  margin: 12px 0 0;
  color: #e5c88f;
  font-size: clamp(19px, 2vw, 27px);
  letter-spacing: 0.2em;
}

.hero-copy__description {
  max-width: 530px;
  margin: 26px 0 0;
  color: rgba(235, 232, 220, 0.76);
  font-size: 15px;
  letter-spacing: 0.06em;
  line-height: 1.9;
}

.atlas-stats {
  display: flex;
  width: fit-content;
  margin-top: 35px;
  padding: 15px 0;
  border-top: 1px solid rgba(222, 180, 107, 0.32);
  border-bottom: 1px solid rgba(222, 180, 107, 0.18);
  backdrop-filter: blur(8px);
}

.atlas-stats div {
  min-width: 110px;
  padding: 0 24px;
  border-right: 1px solid rgba(222, 180, 107, 0.2);
}

.atlas-stats div:first-child { padding-left: 0; }
.atlas-stats div:last-child { border-right: 0; }
.atlas-stats strong, .atlas-stats span { display: block; }
.atlas-stats strong { color: #f2d293; font-size: 19px; letter-spacing: 0.04em; }
.atlas-stats span { margin-top: 7px; color: rgba(225, 226, 216, 0.56); font-size: 11px; letter-spacing: 0.12em; }

.hero-footer {
  position: absolute;
  left: clamp(30px, 5vw, 78px);
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(226, 224, 213, 0.5);
  font-size: 11px;
  letter-spacing: 0.13em;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #dda956;
  box-shadow: 0 0 0 5px rgba(221, 169, 86, 0.12);
  animation: pulse 2.4s ease-in-out infinite;
}

.login-panel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 50px clamp(34px, 5vw, 78px) 76px;
  background:
    radial-gradient(circle at 20% 10%, rgba(210, 161, 84, 0.08), transparent 25rem),
    linear-gradient(145deg, #0b1b16, #06110d 62%);
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(202, 158, 88, 0.08);
  pointer-events: none;
}

.login-panel__inner { width: min(100%, 430px); animation: rise-in 0.75s 0.18s cubic-bezier(.2,.8,.2,1) both; }

.mobile-brand { display: none; }

.login-heading { display: flex; align-items: center; gap: 17px; }

.login-heading__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(218, 169, 90, 0.42);
  border-radius: 18px;
  color: #dca858;
  background: linear-gradient(145deg, rgba(217, 165, 81, 0.12), rgba(217, 165, 81, 0.02));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04), 0 16px 40px rgba(0, 0, 0, 0.16);
}

.login-heading__icon svg { width: 27px; stroke: currentColor; stroke-width: 1.6; }
.login-heading__overline { margin: 0 0 7px; color: #bd9655; font-size: 10px; font-weight: 700; letter-spacing: 0.24em; }
.login-heading h2 { margin: 0; color: #f5f0e7; font-family: "Songti SC", "STSong", serif; font-size: 35px; font-weight: 600; letter-spacing: 0.05em; }

.login-intro {
  margin: 27px 0 34px;
  color: rgba(219, 222, 212, 0.62);
  font-size: 14px;
  line-height: 1.85;
}

.field { display: block; margin-top: 21px; }
.field__label { display: block; margin: 0 0 9px 2px; color: rgba(234, 232, 222, 0.72); font-size: 12px; letter-spacing: 0.12em; }

.field__control {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 0 15px;
  border: 1px solid rgba(169, 183, 172, 0.2);
  border-radius: 13px;
  background: rgba(1, 11, 8, 0.46);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.field__control:focus-within {
  border-color: rgba(218, 168, 88, 0.72);
  background: rgba(2, 16, 11, 0.7);
  box-shadow: 0 0 0 4px rgba(218, 168, 88, 0.08);
}

.field__control > svg { flex: 0 0 auto; width: 21px; margin-right: 12px; stroke: #9eaa9f; stroke-width: 1.55; }

.field input {
  width: 100%;
  height: 52px;
  border: 0;
  outline: 0;
  color: #f3eee4;
  background: transparent;
  font-size: 15px;
  caret-color: #dea95a;
}

.field input::placeholder { color: rgba(163, 175, 166, 0.4); }

.password-toggle {
  flex: 0 0 auto;
  padding: 8px 3px 8px 11px;
  border: 0;
  color: #ba9558;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}

.password-toggle:hover { color: #e3b96f; }

.form-message {
  min-height: 34px;
  padding: 11px 2px 0;
  color: #e68f7e;
  font-size: 12px;
  line-height: 1.5;
}

.form-message.is-success { color: #a9c991; }

.submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  margin-top: 8px;
  border: 1px solid rgba(255, 221, 158, 0.34);
  border-radius: 13px;
  color: #122016;
  background: linear-gradient(135deg, #e2b66c, #c99246);
  box-shadow: 0 14px 35px rgba(189, 132, 54, 0.18), inset 0 1px rgba(255, 255, 255, 0.36);
  font-weight: 700;
  letter-spacing: 0.11em;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.submit-button:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 18px 42px rgba(189, 132, 54, 0.26); }
.submit-button:active { transform: translateY(0); }
.submit-button:focus-visible { outline: 3px solid rgba(231, 185, 109, 0.24); outline-offset: 3px; }
.submit-button:disabled { cursor: wait; filter: saturate(.65); opacity: .76; }
.submit-button svg { width: 21px; stroke: currentColor; stroke-width: 1.8; transition: transform .2s ease; }
.submit-button:hover svg { transform: translateX(3px); }

.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 27px;
  color: rgba(180, 192, 182, 0.46);
  font-size: 11px;
  text-align: center;
}

.security-note svg { width: 18px; stroke: #9d7c49; stroke-width: 1.5; }

.login-panel__footer {
  position: absolute;
  bottom: 29px;
  color: rgba(171, 181, 172, 0.3);
  font-size: 10px;
  letter-spacing: 0.12em;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes reveal-image {
  from { opacity: 0.7; transform: scale(1.06); }
  to { opacity: 1; transform: scale(1.02); }
}

@keyframes pulse {
  0%, 100% { opacity: .65; box-shadow: 0 0 0 4px rgba(221, 169, 86, 0.1); }
  50% { opacity: 1; box-shadow: 0 0 0 8px rgba(221, 169, 86, 0.03); }
}

@media (max-width: 1050px) {
  .login-layout { grid-template-columns: minmax(0, 1.1fr) minmax(390px, 0.9fr); }
  .hero-copy { width: 82%; }
  .atlas-stats div { min-width: 90px; padding: 0 16px; }
}

@media (max-width: 760px) {
  .login-layout { display: block; min-height: 100vh; }
  .atlas-hero { position: fixed; inset: 0; min-height: 0; border: 0; }
  .atlas-hero__image { background-position: 39% center; }
  .atlas-hero__veil { background: linear-gradient(0deg, rgba(4, 14, 10, .97) 28%, rgba(4, 14, 10, .76) 62%, rgba(4, 14, 10, .54)); }
  .brand-lockup, .hero-copy, .hero-footer { display: none; }
  .login-panel { min-height: 100vh; padding: 42px 24px 66px; background: rgba(4, 14, 10, .62); backdrop-filter: blur(5px); }
  .login-panel::before { inset: 12px; }
  .login-panel__inner { padding: 28px 24px 30px; border: 1px solid rgba(206, 161, 89, .2); border-radius: 24px; background: rgba(4, 17, 12, .86); box-shadow: 0 24px 80px rgba(0, 0, 0, .38); backdrop-filter: blur(18px); }
  .mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 34px; color: #e0bd80; font-size: 12px; letter-spacing: .18em; }
  .mobile-brand img { width: 100px; filter: brightness(0) invert(1); }
  .login-heading h2 { font-size: 31px; }
  .login-intro { margin-bottom: 27px; }
}

@media (max-height: 720px) and (min-width: 761px) {
  .hero-copy { bottom: 75px; }
  .hero-copy__description { margin-top: 16px; }
  .atlas-stats { margin-top: 20px; }
  .login-panel { padding-top: 32px; padding-bottom: 48px; }
  .login-intro { margin: 20px 0 24px; }
  .field { margin-top: 15px; }
  .security-note { margin-top: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
