/* Desktop-owned auth gateway (#desktop-auth)
 * Left stage restored to the previous GBC × LINKA map composition.
 */

#desktop-auth {
  position: fixed;
  inset: 0;
  z-index: 120;
  overflow: auto;
  color: #e8f4f2;
  background:
    radial-gradient(circle at 78% 22%, rgba(53, 214, 197, 0.14), transparent 42%),
    radial-gradient(circle at 12% 78%, rgba(92, 141, 255, 0.08), transparent 46%),
    linear-gradient(160deg, #070a0d 0%, #0d1418 45%, #0a1014 100%);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
}

#desktop-auth .desktop-auth-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

#desktop-auth .desktop-auth-ambient i {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.4;
}

#desktop-auth .desktop-auth-ambient i:nth-child(1) {
  top: -8%;
  right: 8%;
  width: 280px;
  height: 280px;
  background: rgba(53, 214, 197, 0.22);
}

#desktop-auth .desktop-auth-ambient i:nth-child(2) {
  bottom: 5%;
  left: -4%;
  width: 220px;
  height: 220px;
  background: rgba(92, 141, 255, 0.16);
}

#desktop-auth .desktop-auth-ambient i:nth-child(3) {
  top: 40%;
  left: 40%;
  width: 160px;
  height: 160px;
  background: rgba(255, 155, 139, 0.08);
}

/* ---- Original homebar ---- */
#desktop-auth .desktop-auth-homebar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 0 46px;
  border-bottom: 1px solid rgba(126, 159, 161, 0.12);
  background: rgba(9, 12, 16, 0.9);
}

#desktop-auth .desktop-auth-homebar-brand {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  color: #effaf8;
  text-decoration: none;
}

#desktop-auth .desktop-auth-homebar-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  letter-spacing: 0.03em;
}

#desktop-auth .desktop-auth-homebar-wordmark b {
  color: #57dfd1;
  font-size: 18px;
}

#desktop-auth .desktop-auth-homebar-wordmark i {
  color: #839091;
  font-style: normal;
}

#desktop-auth .desktop-auth-homebar-wordmark strong {
  color: #f0f8f7;
  font-size: 18px;
  letter-spacing: 0.01em;
}

#desktop-auth .desktop-auth-homebar-brand > em {
  padding-left: 15px;
  border-left: 1px solid rgba(125, 157, 159, 0.28);
  color: #9baaaa;
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.02em;
}

#desktop-auth .desktop-auth-homebar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

#desktop-auth .desktop-auth-homebar-actions button {
  min-width: 0;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #aab8b8;
  font: 600 12px inherit;
  cursor: pointer;
}

#desktop-auth .desktop-auth-homebar-actions button:last-child {
  padding: 0 13px;
  border: 1px solid rgba(83, 222, 209, 0.66);
  border-radius: 999px;
  color: #dffcf7;
}

#desktop-auth .desktop-auth-homebar-actions button.is-active {
  border-color: rgba(83, 222, 209, 0.66);
  background: rgba(53, 214, 197, 0.12);
  color: #effffd;
}

/* ---- Layout + original left stage ---- */
#desktop-auth .desktop-auth-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(370px, 430px);
  gap: clamp(70px, 9vw, 158px);
  align-items: center;
  width: min(1180px, calc(100% - 72px));
  margin: 0 auto;
  min-height: calc(100vh - 74px);
  padding: 36px 0 56px;
  box-sizing: border-box;
}

#desktop-auth .desktop-auth-stage {
  position: relative;
  z-index: 2;
  min-height: 420px;
  display: grid;
  align-content: center;
  padding: 0;
  overflow: hidden;
}

/* Map / city diagram intentionally omitted — matches the last shipping auth look. */
#desktop-auth .desktop-auth-home-map,
#desktop-auth .desktop-auth-city-visual,
#desktop-auth .desktop-auth-stage-visual,
#desktop-auth .desktop-auth-mosaic,
#desktop-auth .desktop-auth-feature-list,
#desktop-auth .desktop-auth-learning-pulse {
  display: none !important;
}

#desktop-auth .desktop-auth-stage-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding: 0 0 20px 3px;
}

#desktop-auth .desktop-auth-public-beta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  color: #6c8585;
  font: 700 10px/1 "IBM Plex Mono", Menlo, monospace;
  letter-spacing: 0.13em;
}

#desktop-auth .desktop-auth-public-beta::before {
  width: 28px;
  height: 2px;
  background: #5c8dff;
  content: "";
}

#desktop-auth .desktop-auth-public-beta b {
  color: #70ebdd;
  font-family: "PingFang SC", sans-serif;
  font-size: 11px;
  letter-spacing: 0;
}

#desktop-auth .desktop-auth-stage-copy h1,
#desktop-auth .desktop-auth-stage-copy [data-auth-stage-title] {
  max-width: none;
  margin: 16px 0 11px;
  color: #5be4d2;
  font-family: "Arial Narrow", "Avenir Next Condensed", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(36px, 3.7vw, 58px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.035em;
  white-space: nowrap;
  -webkit-text-fill-color: #5be4d2;
}

#desktop-auth .desktop-auth-stage-copy h1 i,
#desktop-auth .desktop-auth-stage-copy [data-auth-stage-title] i {
  color: #45daca;
  font-style: normal;
}

#desktop-auth .desktop-auth-cn-title {
  margin-top: 15px;
  color: #e5fbf7;
  font-family: "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.12em;
}

#desktop-auth .desktop-auth-stage-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: none;
  margin: 22px 0 0;
  color: #79d9ce;
  font-family: "IBM Plex Mono", Menlo, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#desktop-auth .desktop-auth-stage-sub::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff9b8b;
  box-shadow: 0 0 12px rgba(255, 155, 139, 0.58);
  content: "";
}

/* ---- Right panel (kept functional; visual aligned) ---- */
#desktop-auth .desktop-auth-panel {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 430px;
  justify-self: end;
  padding: 28px 30px 30px;
  border: 1px solid rgba(132, 186, 187, 0.22);
  border-radius: 8px;
  background: rgba(14, 19, 24, 0.86);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

#desktop-auth .desktop-auth-panel-kicker {
  margin-bottom: 14px;
  color: #a9f5e9;
  font: 700 10px/1 "IBM Plex Mono", Menlo, monospace;
  letter-spacing: 0.16em;
}

#desktop-auth .desktop-auth-mode-switch {
  display: flex !important;
  gap: 4px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(139, 181, 181, 0.18);
}

#desktop-auth .desktop-auth-mode-switch button {
  flex: 1;
  height: 40px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #809092;
  font: 600 14px inherit;
  cursor: pointer;
}

#desktop-auth .desktop-auth-mode-switch button.is-active {
  border-bottom-color: #63e8d9;
  color: #f0fffd;
}

#desktop-auth .desktop-auth-panel h2 {
  margin: 0 0 6px;
  color: #f1fffd;
  font-size: 22px;
  font-weight: 700;
}

#desktop-auth .desktop-auth-panel-sub {
  margin: 0 0 18px;
  color: #8a989a;
  font-size: 13px;
  line-height: 1.55;
}

#desktop-auth .desktop-auth-form {
  display: grid;
  gap: 12px;
}

#desktop-auth .desktop-auth-field {
  display: grid;
  gap: 6px;
  color: #b7c4c4;
  font-size: 12px;
}

#desktop-auth .desktop-auth-field :is(input, select) {
  min-height: 44px;
  padding: 0 12px;
  box-sizing: border-box;
  border: 1px solid rgba(146, 191, 192, 0.2);
  border-radius: 5px;
  background: #0a0e12;
  color: #f0f8f7;
  font: 400 13px inherit;
}

#desktop-auth .desktop-auth-field :is(input, select):focus {
  border-color: #5c8dff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(92, 141, 255, 0.13);
}

#desktop-auth .desktop-auth-remember {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  color: #9aaeae;
  font-size: 12px;
}

#desktop-auth .desktop-auth-remember label,
#desktop-auth .desktop-auth-agree {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

#desktop-auth .desktop-auth-agree {
  color: #9aaeae;
  font-size: 12px;
  line-height: 1.45;
}

#desktop-auth .desktop-auth-remember input,
#desktop-auth .desktop-auth-agree input {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  accent-color: #35d6c5;
}

#desktop-auth .desktop-auth-status {
  min-height: 18px;
  color: #35d6c5;
  font-size: 12px;
}

#desktop-auth .desktop-auth-progress {
  display: grid;
  gap: 8px;
  margin: 2px 0 4px;
  color: #9edfd6;
  font-size: 12px;
  line-height: 1.4;
}

#desktop-auth .desktop-auth-progress[hidden] {
  display: none !important;
}

#desktop-auth .desktop-auth-progress-track {
  position: relative;
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(99, 232, 217, 0.14);
}

#desktop-auth .desktop-auth-progress-track i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -35%;
  width: 35%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #63e8d9, transparent);
  animation: desktop-auth-progress-slide 1.05s ease-in-out infinite;
}

@keyframes desktop-auth-progress-slide {
  0% { left: -35%; }
  100% { left: 100%; }
}

#desktop-auth .desktop-auth-form.is-busy .desktop-auth-field,
#desktop-auth .desktop-auth-form.is-busy .desktop-auth-remember,
#desktop-auth .desktop-auth-form.is-busy .desktop-auth-agree {
  opacity: 0.72;
}

#desktop-auth .desktop-auth-submit {
  min-height: 46px;
  border: 0;
  border-radius: 5px;
  background: #63e8d9;
  color: #06201e;
  font: 700 13px inherit;
  box-shadow: 0 9px 24px rgba(99, 232, 217, 0.16);
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

#desktop-auth .desktop-auth-submit:active:not(:disabled) {
  transform: translateY(1px);
}

#desktop-auth .desktop-auth-submit:disabled {
  opacity: 0.78;
  cursor: wait;
}

#desktop-auth .desktop-auth-switch-link {
  min-height: 36px;
  border: 1px solid rgba(146, 191, 192, 0.28);
  border-radius: 6px;
  background: transparent;
  color: #c7d6d5;
  font: 600 12px inherit;
  cursor: pointer;
}

#desktop-auth [data-auth-panel][hidden] {
  display: none !important;
}

body.desktop-custom-view.route-auth #desktop-nav,
body.desktop-custom-view.route-auth #desktop-contextbar,
body.desktop-custom-view.route-auth #desktop-studio-credit {
  display: none !important;
}

@media (max-width: 980px) {
  #desktop-auth .desktop-auth-homebar {
    padding: 0 16px;
    min-height: 64px;
  }

  #desktop-auth .desktop-auth-homebar-brand > em {
    display: none;
  }

  #desktop-auth .desktop-auth-homebar-actions button[data-auth-home-action="home"] {
    display: none;
  }

  #desktop-auth .desktop-auth-layout {
    grid-template-columns: 1fr;
    width: min(520px, calc(100% - 28px));
    gap: 28px;
    min-height: auto;
    padding-top: 24px;
  }

  #desktop-auth .desktop-auth-stage {
    min-height: 0;
  }

  #desktop-auth .desktop-auth-stage-copy h1,
  #desktop-auth .desktop-auth-stage-copy [data-auth-stage-title] {
    white-space: normal;
    font-size: clamp(28px, 8vw, 40px);
  }

  #desktop-auth .desktop-auth-panel {
    justify-self: stretch;
    max-width: none;
  }
}
