/* Auth page */
.auth-page {
  min-height: 100vh;
  background: var(--paper-soft);
  color: var(--ink);
}
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(440px, .94fr);
  min-height: 100vh;
}

/* ---------- dark showcase ---------- */
.auth-showcase {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 38px 46px 30px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #3c3a34 transparent;
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 90, 45, .24), transparent 27rem),
    radial-gradient(circle at 16% 82%, rgba(242, 201, 76, .09), transparent 22rem),
    #141410;
  color: var(--white);
}
.showcase-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 72%);
  pointer-events: none;
}
.showcase-orb {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  pointer-events: none;
}
.orb-1 { width: 430px; height: 430px; right: -110px; top: 41%; }
.orb-2 { width: 610px; height: 610px; right: -200px; top: 32%; border-color: rgba(255, 255, 255, .045); }
.showcase-orb::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  top: 13%;
  left: 15%;
  box-shadow: 0 0 16px rgba(255, 90, 45, .8);
}
.orb-2::after { background: var(--sun); top: auto; bottom: 17%; left: 8%; width: 4px; height: 4px; }

.showcase-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.brand-light { color: var(--white); }
.brand-light .brand-mark { background: var(--white); color: var(--ink); }
.brand-light .brand-cn { color: #837f73; }
.showcase-edition {
  color: #77736a;
  font-family: var(--font-display);
  font-size: 7.5px;
  letter-spacing: .18em;
}

.showcase-content {
  position: relative;
  z-index: 2;
  width: min(570px, 100%);
  margin: auto 0;
  padding: 50px 0;
}
.eyebrow.light { color: #999487; }
.showcase-content h1 {
  margin-top: 22px;
  font-family: var(--font-display);
  font-size: clamp(54px, 5.8vw, 84px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.065em;
  color: var(--white);
}
.showcase-content h1 .serif-accent { color: var(--orange); }
.showcase-content > p {
  max-width: 420px;
  margin-top: 24px;
  color: #9c978b;
  font-size: 13.5px;
  line-height: 1.85;
}

.showcase-card {
  width: min(410px, 100%);
  margin-top: 42px;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  background: rgba(255, 255, 255, .04);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
  backdrop-filter: blur(14px);
}
.showcase-card-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.showcase-card-label { color: #716d63; font-family: var(--font-display); font-size: 7px; letter-spacing: .16em; }
.showcase-live { display: flex; align-items: center; gap: 6px; color: #7f7b70; font-family: var(--font-display); font-size: 6.5px; letter-spacing: .09em; }
.showcase-live .live-dot { width: 4px; height: 4px; }
.showcase-project {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 11px;
  background: rgba(255, 255, 255, .035);
}
.showcase-project-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 8px;
  background: var(--orange);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 19px;
  font-style: italic;
  font-weight: 700;
}
.showcase-project div { flex: 1; }
.showcase-project strong { display: block; color: #e5e0d5; font-family: var(--font-display); font-size: 12px; font-weight: 500; letter-spacing: -.01em; }
.showcase-project div span { display: block; margin-top: 2px; color: #6f6c63; font-size: 8px; }
.showcase-arrow { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 50%; color: #8e8a7e; font-size: 10px; }
.showcase-bars {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 47px;
  margin-top: 14px;
  padding: 0 4px;
}
.showcase-bars i {
  flex: 1;
  height: var(--h);
  border-radius: 2px 2px 0 0;
  background: rgba(255, 255, 255, .09);
}
.showcase-bars i:nth-last-child(-n+4) { background: rgba(255, 90, 45, .55); }
.showcase-bars i:last-child { background: var(--orange); }
.showcase-card-foot { display: flex; justify-content: space-between; margin-top: 10px; color: #6f6c63; font-size: 7.5px; }
.showcase-card-foot span:last-child { color: #77b999; }

.showcase-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #666258;
  font-family: var(--font-display);
  font-size: 7.5px;
  letter-spacing: .12em;
}
.showcase-foot-rule { width: 30px; height: 1px; background: #3c3a34; }

/* ---------- form side ---------- */
.auth-form-side {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 30px 46px 24px;
  background:
    radial-gradient(circle at 80% 0%, rgba(255, 90, 45, .045), transparent 22rem),
    var(--paper-soft);
}
.auth-topline { display: flex; align-items: center; justify-content: flex-end; min-height: 38px; }
.auth-mobile-brand { display: none; }
.back-home {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  transition: color .2s;
}
.back-home:hover { color: var(--ink); }

.auth-form-wrap {
  width: min(400px, 100%);
  margin: auto;
  padding: 46px 0;
}
.auth-kicker {
  display: block;
  margin-bottom: 12px;
  color: var(--orange-deep);
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .18em;
}
.auth-intro h2 {
  font-family: var(--font-display);
  font-size: 45px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.055em;
}
.auth-intro p { max-width: 330px; margin-top: 12px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }

.mode-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 31px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f1ecdf;
}
.mode-btn {
  position: relative;
  z-index: 2;
  height: 37px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  transition: color .25s;
}
.mode-btn.is-active { color: var(--ink); }
.mode-indicator {
  position: absolute;
  z-index: 1;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: 37px;
  border-radius: 9px;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(54, 45, 27, .09);
  transition: transform .3s var(--ease);
}
.mode-switch[data-mode="register"] .mode-indicator { transform: translateX(100%); }

#authForm { margin-top: 24px; }
.auth-field { display: grid; gap: 7px; margin-top: 15px; }
.auth-field:first-child { margin-top: 0; }
.auth-field label { color: var(--ink); font-size: 11.5px; font-weight: 700; }
.auth-label-row { display: flex; align-items: center; justify-content: space-between; }
.password-hint { color: var(--muted-2); font-size: 9.5px; font-weight: 500; }
.password-hint.is-error { color: var(--danger); }
.auth-input-wrap { position: relative; display: flex; align-items: center; }
.auth-input-wrap input {
  width: 100%;
  height: 49px;
  padding: 0 45px 0 43px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s;
}
.auth-input-wrap input::placeholder { color: #aba598; }
.auth-input-wrap input:hover { border-color: var(--line-strong); }
.auth-input-wrap input:focus {
  outline: 0;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20, 20, 16, .07);
}
.input-icon {
  position: absolute;
  left: 14px;
  display: grid;
  place-items: center;
  color: #979185;
  pointer-events: none;
}
.password-toggle {
  position: absolute;
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #999386;
  transition: color .2s, background .2s;
}
.password-toggle:hover { color: var(--ink); background: #f1ecdf; }
.password-toggle .eye-closed { display: none; }
.password-toggle.is-showing .eye-open { display: none; }
.password-toggle.is-showing .eye-closed { display: block; }

.auth-error {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 15px;
  padding: 10px 11px;
  border: 1px solid #efc4b9;
  border-radius: 9px;
  background: #fff1ed;
  color: #9f3826;
}
.auth-error > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  border-radius: 50%;
  background: #c83a2a;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}
.auth-error p { font-size: 11.5px; line-height: 1.5; }

.auth-submit {
  height: 51px;
  margin-top: 22px;
  border-radius: 11px;
  font-size: 13.5px;
}
.auth-submit .arr { margin-left: auto; }
.auth-terms { margin-top: 18px; color: var(--muted); font-size: 11.5px; text-align: center; }
.text-switch {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-switch:hover { color: var(--orange-deep); }
.auth-fineprint { margin-top: 12px; color: var(--muted-2); font-size: 9px; line-height: 1.6; text-align: center; }

.auth-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 30px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 8.5px;
}
.auth-trust span:first-child { display: flex; align-items: center; gap: 6px; }
.auth-trust .live-dot { width: 5px; height: 5px; background: var(--green); box-shadow: none; }

.auth-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted-2);
  font-family: var(--font-display);
  font-size: 6.5px;
  letter-spacing: .1em;
}

@media (max-width: 1080px) {
  .auth-layout { grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr); }
  .auth-showcase { padding: 32px 34px 26px; }
  .showcase-content h1 { font-size: 55px; }
  .auth-form-side { padding: 26px 36px 22px; }
}

@media (min-width: 861px) and (max-height: 900px) {
  .auth-showcase { padding: 26px 38px 22px; }
  .showcase-content { padding: 26px 0; }
  .showcase-content h1 { font-size: clamp(44px, 4.7vw, 64px); }
  .showcase-content > p { margin-top: 16px; font-size: 12px; line-height: 1.7; }
  .showcase-card { margin-top: 25px; padding: 13px; }
  .showcase-card-top { gap: 10px; }
  .showcase-project { margin-top: 11px; padding: 9px; }
  .showcase-bars { height: 33px; margin-top: 10px; }
  .showcase-card-foot { margin-top: 6px; }
  .showcase-foot { font-size: 6.5px; }
}

@media (max-width: 860px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-showcase { display: none; }
  .auth-form-side { min-height: 100svh; padding: 24px 24px 20px; }
  .auth-topline { justify-content: space-between; }
  .auth-mobile-brand { display: inline-flex; }
  .auth-form-wrap { width: min(420px, 100%); padding: 44px 0; }
  .auth-intro h2 { font-size: 40px; }
  .auth-bottom { margin-top: 10px; }
}

@media (max-width: 480px) {
  .auth-form-side { padding: 20px 20px 16px; }
  .auth-form-wrap { padding: 34px 0 30px; }
  .auth-intro h2 { font-size: 36px; }
  .auth-intro p { font-size: 12px; }
  .auth-form-side .back-home { font-size: 10px; }
  .auth-bottom span:last-child { display: none; }
}
