.auth-page {
  min-height: 100svh;
  background:
    radial-gradient(circle at 50% 28%, rgba(239, 249, 255, 0.88), transparent 34%),
    radial-gradient(circle at 8% 80%, rgba(100, 154, 192, 0.28), transparent 27%),
    var(--sky);
}

.auth-page::before {
  position: fixed;
  inset: 0;
  content: "";
  opacity: 0.42;
  pointer-events: none;
  background-image: linear-gradient(rgba(7, 22, 37, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(7, 22, 37, 0.045) 1px, transparent 1px);
  background-size: 110px 110px;
  mask-image: radial-gradient(circle at center, #000, transparent 82%);
}

.auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100svh;
  padding: 2rem 1.2rem;
  place-items: center;
}

.auth-brand {
  position: absolute;
  top: 2rem;
  left: 2.2rem;
}

.auth-brand .brand__code { font-size: 1.45rem; }
.auth-brand .brand__name { font-size: 1.35rem; }

.auth-card {
  position: relative;
  width: min(100%, 430px);
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 1.8rem;
  background: linear-gradient(145deg, rgba(235, 247, 254, 0.85), rgba(183, 215, 236, 0.67));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 32px 80px rgba(24, 62, 90, 0.2);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
}

.auth-card__glow {
  position: absolute;
  top: -7rem;
  left: 50%;
  width: 20rem;
  height: 13rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.48);
  filter: blur(42px);
  transform: translateX(-50%);
  pointer-events: none;
}

.auth-heading { position: relative; text-align: center; }
.auth-eyebrow { color: rgba(7, 22, 37, 0.48); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.18em; }
.auth-heading h1 { margin: 0.5rem 0 0; font-size: clamp(1.8rem, 6vw, 2.35rem); letter-spacing: -0.045em; }
.auth-heading p { margin: 0.45rem 0 0; color: rgba(7, 22, 37, 0.58); font-size: 0.8rem; }

.auth-oauth { display: grid; gap: 0.65rem; margin-top: 1.7rem; }
.oauth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 3.15rem;
  border: 1px solid rgba(7, 22, 37, 0.14);
  border-radius: 0.95rem;
  background: rgba(246, 252, 255, 0.67);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  font-size: 0.76rem;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease;
}
.oauth-button:hover { background: rgba(255, 255, 255, 0.88); transform: translateY(-1px); }
.oauth-button svg { width: 1.25rem; height: 1.25rem; }
.oauth-button--discord { color: #fff; border-color: rgba(88, 101, 242, 0.5); background: #5865f2; }
.oauth-button--discord:hover { background: #6873f4; }

.auth-divider { display: flex; align-items: center; gap: 0.8rem; margin: 1.35rem 0; color: rgba(7, 22, 37, 0.42); font-size: 0.61rem; }
.auth-divider::before, .auth-divider::after { height: 1px; content: ""; flex: 1; background: rgba(7, 22, 37, 0.12); }
.auth-form { display: grid; gap: 0.9rem; }
.auth-form[hidden], .auth-oauth[hidden], .auth-divider[hidden] { display: none; }
.auth-field { display: grid; gap: 0.38rem; font-size: 0.68rem; font-weight: 700; }
.auth-field small { color: rgba(7, 22, 37, 0.5); font-size: 0.57rem; font-weight: 400; }
.auth-field input {
  width: 100%;
  height: 3.15rem;
  padding: 0 0.95rem;
  border: 1px solid rgba(7, 22, 37, 0.14);
  border-radius: 0.9rem;
  outline: none;
  color: var(--ink);
  background: rgba(244, 251, 255, 0.62);
  font-size: 0.78rem;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.auth-field input:focus { border-color: rgba(16, 63, 98, 0.55); box-shadow: 0 0 0 3px rgba(69, 123, 162, 0.12); }
.otp-input { text-align: center; font-size: 1.3rem !important; font-weight: 800; letter-spacing: 0.35em; }
.auth-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.2rem;
  margin-top: 0.2rem;
  padding: 0 1.05rem;
  border: 0;
  border-radius: 0.9rem;
  color: #edf8ff;
  background: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}
.auth-submit:disabled { opacity: 0.55; cursor: wait; }
.auth-text-button, .auth-switch button { padding: 0; border: 0; color: #154e76; background: none; font: inherit; font-weight: 800; cursor: pointer; }
.auth-text-button { justify-self: center; font-size: 0.65rem; }
.auth-status { min-height: 1.2rem; margin: 0.85rem 0 0; color: #9f1f2d; text-align: center; font-size: 0.65rem; font-weight: 700; }
.auth-status.is-success { color: #176140; }
.auth-switch { margin: 0.5rem 0 0; color: rgba(7, 22, 37, 0.58); text-align: center; font-size: 0.68rem; }
.auth-security { position: absolute; bottom: 1.3rem; margin: 0; color: rgba(7, 22, 37, 0.46); font-size: 0.58rem; }

@media (max-width: 600px) {
  .auth-shell { align-items: start; padding-top: 5.5rem; }
  .auth-brand { top: 1.35rem; left: 1.35rem; }
  .auth-card { padding: 1.4rem; border-radius: 1.45rem; }
  .auth-security { position: static; margin-top: 1rem; text-align: center; }
}