.workspace-auth .app {
  display: none;
}

#workspaceAuth {
  --auth-ink: var(--ink);
  --auth-muted: var(--ink-2);
  --auth-accent: var(--ember);
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: auto;
  color: var(--auth-ink);
  background: var(--bg);
  font-family: var(--font);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(380px, 1fr);
  min-height: 100%;
  min-height: 100dvh;
}

.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 640px;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(36px, 6vw, 100px);
  color: var(--rail-strong);
  background: linear-gradient(150deg, var(--rail), var(--rail-2));
}

.auth-brand::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(#c9d0e016 1px, transparent 1px),
    linear-gradient(90deg, #c9d0e016 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(165deg, #000 0%, #000 12%, transparent 88%);
}

.auth-wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: .08em;
}

.auth-symbol {
  width: 33px;
  height: 33px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid var(--ember);
  border-radius: 8px;
}

.auth-symbol i {
  width: 3px;
  height: 10px;
  border-radius: 2px;
  background: var(--ember);
  transform: rotate(27deg);
}

.auth-symbol i:nth-child(2) { height: 17px; }
.auth-symbol i:nth-child(3) { height: 23px; }

.auth-brand-title {
  position: relative;
  z-index: 1;
  margin-top: clamp(65px, 12vh, 144px);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: clamp(36px, 4.2vw, 72px);
  font-weight: 800;
  letter-spacing: -.06em;
  line-height: 1.12;
}

.auth-globe {
  position: absolute;
  width: min(84%, 620px);
  aspect-ratio: 1;
  right: -6%;
  bottom: -21%;
  z-index: -1;
}

.auth-sphere {
  position: absolute;
  inset: 6%;
  overflow: hidden;
  border: 1px solid #c9d0e080;
  border-radius: 50%;
  background:
    repeating-radial-gradient(ellipse 42% 98% at 50% 50%, transparent 0 18px, #c9d0e042 19px 20px, transparent 21px 40px),
    repeating-linear-gradient(0deg, transparent 0 26px, #c9d0e030 27px 28px),
    radial-gradient(circle at 33% 24%, var(--ink-2), var(--rail-2) 45%, var(--rail) 86%);
  box-shadow: inset -28px -36px 60px #15203b9e, 0 0 78px #e8512a22;
  transform: rotate(-24deg);
}

.auth-orbit {
  position: absolute;
  inset: 27% -8%;
  border: 1px solid #c9d0e09e;
  border-radius: 50%;
  transform: rotate(-27deg);
}

.auth-point {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 14px #e8512a;
}

.auth-point-one { top: 42%; left: 12%; }
.auth-point-two { top: 31%; left: 61%; }
.auth-point-three { top: 57%; left: 75%; }

.auth-content {
  display: grid;
  place-items: center;
  padding: 56px clamp(32px, 6vw, 100px);
  background: var(--bg);
}

.auth-form-panel {
  width: min(100%, 420px);
}

.auth-form-panel h1 {
  margin: 0;
  font-size: clamp(32px, 3.25vw, 52px);
  line-height: 1.18;
  letter-spacing: -.045em;
}

.auth-intro {
  margin: 14px 0 38px;
  color: var(--auth-muted);
  font-size: 15px;
}

.auth-field {
  margin: 0 0 18px;
}

.auth-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 650;
}

.auth-field input {
  width: 100%;
  min-height: 54px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--auth-ink);
  background: var(--panel);
  font: inherit;
  font-size: 16px;
}

.auth-field input:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.auth-password {
  position: relative;
}

.auth-password input {
  padding-right: 58px;
}

.auth-show-password {
  position: absolute;
  inset: 5px 5px 5px auto;
  display: grid;
  width: 44px;
  place-items: center;
  border: 0;
  border-radius: 5px;
  color: var(--auth-muted);
  background: transparent;
  cursor: pointer;
}

.auth-show-password .i { width: 20px; height: 20px; }
.auth-show-password:hover, .auth-show-password[aria-pressed="true"] { background: var(--ember-soft); color: var(--auth-accent); }

.auth-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 54px;
  margin-top: 10px;
  padding: 0 17px;
  border: 0;
  border-radius: 8px;
  color: var(--on-ember);
  background: var(--auth-accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background .16s ease;
}

.auth-submit:hover { background: var(--ember-2); }
.auth-submit:disabled { background: var(--ember-2); cursor: wait; }
.auth-submit span:last-child { color: var(--on-ember); font-size: 22px; }

.auth-return {
  margin-top: 14px;
  padding: 7px 0;
  border: 0;
  color: var(--auth-accent);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.auth-form-panel button:focus-visible {
  outline: 2px solid var(--auth-accent);
  outline-offset: 3px;
}

.auth-error {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--bad);
  border-radius: 4px;
  color: var(--bad);
  background: var(--bad-bg);
}

.auth-help {
  margin: 32px 0 0;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--auth-muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  .auth-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-brand { min-height: 0; padding: 24px clamp(24px, 7vw, 48px) 27px; }
  .auth-wordmark { gap: 8px; font-size: 17px; }
  .auth-symbol { width: 29px; height: 29px; }
  .auth-brand-title { margin-top: 20px; font-size: clamp(29px, 6.5vw, 48px); letter-spacing: -.035em; }
  .auth-brand-title br { display: none; }
  .auth-globe { width: min(62%, 365px); right: -7%; bottom: -112%; }
  .auth-content { place-items: start center; padding: 35px 24px 32px; }
  .auth-intro { margin-bottom: 26px; }
  .auth-help { margin-top: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-submit { transition: none; }
}
