#authGate {
  position: absolute;
  inset: 0;
  z-index: 70;
  min-height: 0;
  padding: 12px;
  overflow: auto;
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(46, 158, 255, 0.16), transparent 55%),
    var(--bg);
}

#authGate .auth-card {
  padding: 18px 16px 14px;
  border-radius: 24px;
  border: 1px solid rgba(120, 170, 255, 0.16);
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(46, 158, 255, 0.16), transparent 55%),
    #0b1018;
  color: #eef4fb;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.85);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: #eef4fb;
  font: 700 13px var(--font);
  letter-spacing: 0.08em;
}

.auth-brand .logo-glyph {
  width: 22px;
  height: 22px;
}

#authGate h2 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.045em;
  font-weight: 700;
  color: #fff;
}

.auth-lead {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  line-height: 1.5;
}

.auth-tabs[hidden] {
  display: none !important;
}

.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0 0 16px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-tab-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: #2e9eff;
  box-shadow: 0 8px 20px -12px rgba(46, 158, 255, 0.8);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.auth-tabs[data-on="register"] .auth-tab-thumb {
  transform: translateX(100%);
}

.auth-tabs button {
  position: relative;
  z-index: 1;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font: 650 13px var(--font);
  cursor: pointer;
}

.auth-tabs button.active {
  color: #061018;
}

.auth-card form label {
  display: block;
  margin-top: 12px;
}

.auth-card form label > span {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 650;
}

.auth-card input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #eef4fb;
  font: 14px var(--font);
  outline: none;
}

.auth-card input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.auth-card input:focus {
  border-color: rgba(46, 158, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(46, 158, 255, 0.15);
}

.auth-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 18px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #2e9eff;
  color: #061018;
  font: 700 14px var(--font);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-submit:hover:not(:disabled) {
  filter: brightness(1.04);
}

.auth-submit:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

#authOnboarding {
  display: grid;
  gap: 10px;
}

#authOnboarding[hidden] {
  display: none !important;
}

#authOnboarding label {
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 600;
}

#authOnboarding input {
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #eef4fb;
  padding: 0 12px;
  font: inherit;
}

.auth-skip {
  height: 40px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  font: 600 13px var(--font);
}

.auth-skip:hover {
  color: #fff;
}

.auth-card > small {
  display: block;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 12px;
  text-align: center;
}

.auth-error {
  margin: 10px 0 0;
  color: #ff8b8b;
  font-size: 13px;
}

html[data-theme="light"] #authGate .auth-card {
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(12, 121, 216, 0.1), transparent 55%),
    #ffffff;
  color: #111827;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 30px 70px -36px rgba(15, 23, 42, 0.35);
}

html[data-theme="light"] .auth-brand,
html[data-theme="light"] #authGate h2 {
  color: #111827;
}

html[data-theme="light"] .auth-lead,
html[data-theme="light"] .auth-card form label > span,
html[data-theme="light"] .auth-card > small {
  color: #5b6573;
}

html[data-theme="light"] .auth-tabs {
  background: #eef0f3;
  border-color: rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .auth-tabs button {
  color: #5b6573;
}

html[data-theme="light"] .auth-tabs button.active {
  color: #061018;
}

html[data-theme="light"] .auth-card input {
  background: #f5f6f8;
  border-color: rgba(15, 23, 42, 0.1);
  color: #111827;
}

html[data-theme="light"] .auth-card input::placeholder {
  color: #9aa3af;
}

