/* ── Auth Gateway ── */
.auth-page {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #06091e 0%, #0d1535 50%, #08091f 100%);
  z-index: 9999;
  overflow: hidden;
  font-family: "Gellix", sans-serif;
}

.auth-screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-screen.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  overflow-y: auto;
}

.auth-wrapper {
  width: 100%;
  max-width: 420px;
  min-height: 100%;
  margin: 0 auto;
  padding: 24px 20px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.auth-wrapper-form {
  height: auto;
  justify-content: center;
  gap: 15px;
}

.auth-logo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.auth-logo-label {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.2px;
  color: rgba(203, 216, 252, 0.56);
}

.auth-logo-main {
  font-size: clamp(46px, 18vw, 90px);
  font-weight: 600;
  line-height: 0.65;
  max-width: 290px;
  letter-spacing: -7px;
  background: linear-gradient(160deg, #d1ddff 0%, #8fb5ff 45%, #61a4ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 30px;
}

.auth-logo-desc {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(203, 216, 252, 0.58);
  max-width: 300px;
  letter-spacing: -0.2px;
  margin-bottom: 10px;
}

.auth-cta-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.auth-users-count {
  font-size: 11px;
  color: rgba(203, 216, 252, 0.45);
}

.auth-heading {
  width: 100%;
  margin-top: 28px;
  text-align: center;
}

.auth-title {
  /* font-size: clamp(72px, 22vw, 108px); */
  font-size: 44px;
  font-weight: 500;
  line-height: 0.85;
  letter-spacing: -3px;
  text-align: center;
  padding-bottom: 5px;
  padding-right: 10px;
  color: rgba(242, 247, 255, 0.96);
}

.auth-title-forgot {
  line-height: 0.8;
  margin-bottom: 10px;
}

.auth-subtitle {
  margin-top: 8px;
  font-size: 15px;
  color: rgba(194, 207, 240, 0.62);
  letter-spacing: -0.9px;
  text-align: center;
}

.auth-switch {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.auth-switch-btn {
  height: 66px;
  border-radius: 34px;
  border: 0.5px solid rgba(122, 143, 214, 0.25);
  background: rgba(6, 10, 37, 0.42);
  color: rgba(216, 227, 255, 0.74);
  font-size: 17px;
  letter-spacing: -0.75px;
  font-weight: 400;
  cursor: pointer;
  font-family: "Gellix", sans-serif;
}

.auth-switch-btn.is-active {
  background: rgba(245, 248, 255, 0.92);
  color: rgba(90, 99, 119, 0.78);
}

.auth-signup-step {
  width: 100%;
  display: none;
  flex-direction: column;
  gap: 10px;
}

.auth-signup-step.is-active {
  display: flex;
}

.auth-inputs {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-signin-inputs {
  margin-top: 4px;
}

.auth-input {
  width: 100%;
  height: 66px;
  border-radius: 34px;
  border: 0.5px solid rgba(122, 143, 214, 0.3);
  background: rgba(6, 10, 37, 0.4);
  color: rgba(235, 242, 255, 0.95);
  text-align: center;
  font-size: 15px;
  letter-spacing: -0.75px;
  outline: none;
  padding: 0 18px;
  font-family: "Gellix", sans-serif;
}

.auth-input::placeholder {
  color: rgba(191, 205, 241, 0.55);
}

.auth-dual-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.auth-choice-btn {
  height: 66px;
  border-radius: 34px;
  border: 1.5px solid rgba(122, 143, 214, 0.35);
  background: rgba(6, 10, 37, 0.4);
  color: rgba(221, 232, 255, 0.74);
  font-size: 17px;
  letter-spacing: -0.75px;
  font-weight: 500;
  cursor: pointer;
  font-family: "Gellix", sans-serif;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.auth-choice-btn:active {
  background: rgba(30, 60, 150, 0.7);
}

.auth-choice-btn.is-selected {
  border-color: rgba(100, 160, 255, 1);
  background: rgba(30, 80, 200, 0.75);
  color: rgba(255, 255, 255, 1);
  font-weight: 600;
  box-shadow:
    0 0 0 2px rgba(100, 160, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth-page-bars {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  padding: 15px;
}

.auth-page-bar {
  width: 64px;
  height: 3px;
  border-radius: 99px;
  background: rgba(196, 208, 244, 0.35);
}

.auth-page-bar.is-on {
  background: rgba(239, 246, 255, 0.9);
}

.auth-btn {
  width: 100%;
  height: 70px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: "Gellix", sans-serif;
}

.auth-btn-primary {
  background: rgba(26, 143, 255, 0.88);
  color: #fff;
  font-size: 17px;
  letter-spacing: -0.75px;
}

.auth-btn-dark {
  background: rgba(3, 6, 18, 0.92);
  color: rgba(216, 226, 255, 0.9);
  font-size: 17px;
  letter-spacing: -0.75px;
}

.auth-btn-bottom {
  margin-top: 8px;
}

.auth-link-btn {
  border: none;
  background: transparent;
  color: rgba(195, 208, 244, 0.74);
  font-size: 12px;
  letter-spacing: -0.2px;
  cursor: pointer;
  font-family: "Gellix", sans-serif;
  text-align: left;
  padding: 0;
}

.auth-inline-links {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.auth-outline-btn {
  width: 100%;
  height: 66px;
  border-radius: 34px;
  border: 0.5px solid rgba(122, 143, 214, 0.3);
  background: rgba(6, 10, 37, 0.3);
  color: rgba(216, 227, 255, 0.8);
  font-size: 15px;
  letter-spacing: -0.75px;
  cursor: pointer;
  font-family: "Gellix", sans-serif;
  margin-top: 8px;
}

.auth-screen-forgot .auth-outline-btn {
  margin-top: 8px;
}

.auth-forgot-caption {
  width: 100%;
  text-align: left;
  margin-top: -4px;
}

.auth-passcode-inputs {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.auth-passcode-input {
  width: 100%;
  height: 82px;
  border-radius: 12px;
  border: 0.5px solid rgba(122, 143, 214, 0.34);
  background: rgba(6, 10, 37, 0.38);
  color: rgba(232, 241, 255, 0.96);
  text-align: center;
  font-size: 18px;
  letter-spacing: -0.75px;
  outline: none;
  font-family: "Gellix", sans-serif;
}

.auth-bottom-brand {
  text-align: center;
  font-size: 11px;
  font-weight: 400;
  color: rgba(200, 215, 255, 0.4);
  letter-spacing: var(--letter-spacing-normal);
  padding: 10px 0 28px;
}

.auth-note {
  width: 100%;
  min-height: 16px;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 198, 198, 0.88);
}

.auth-note.success {
  color: rgba(188, 250, 206, 0.95);
}

/* ── Post-login Transition ── */
.auth-screen-transition.is-active {
  pointer-events: none;
}

.auth-transition-wrap {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
}

.auth-transition-brand {
  color: rgba(213, 225, 255, 0.4);
  font-size: 11px;
  letter-spacing: -0.5px;
}

.auth-transition-logo {
  color: rgba(245, 250, 255, 0.96);
  font-size: clamp(72px, 22vw, 108px);
  font-weight: 500;
  line-height: 0.7;
  letter-spacing: -10px;
  text-align: center;
  background: linear-gradient(160deg, #e8e8e8 0%, #b8b8b8 50%, #888888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 30px;
  padding-right: 10px;
  animation: authTransitionPulse 0.9s ease-out both;
}

@keyframes authTransitionPulse {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 390px) {
  .auth-title {
    font-size: clamp(62px, 18vw, 92px);
  }

  .auth-input,
  .auth-choice-btn,
  .auth-switch-btn,
  .auth-outline-btn {
    font-size: 30px;
  }

  .auth-btn-dark {
    font-size: 34px;
  }
}
