[hidden] {
  display: none !important;
}

:root {
  --auth-ink: #0b1220;
  --auth-teal: #0ea5a4;
  --auth-blue: #3b82f6;
  --auth-coral: #f07167;
}

body:not(.is-authenticated) {
  background: var(--auth-ink);
}

.auth-screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 18% 20%, rgba(14, 165, 164, 0.22), transparent 34%),
    radial-gradient(circle at 82% 70%, rgba(59, 130, 246, 0.18), transparent 36%),
    radial-gradient(circle at 50% 100%, rgba(240, 113, 103, 0.12), transparent 40%),
    linear-gradient(155deg, #0b1220 0%, #121a2b 48%, #0f172a 100%);
}

.auth-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.55) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

.auth-brand {
  position: absolute;
  z-index: 4;
  top: 30px;
  left: max(30px, calc((100vw - 1180px) / 2));
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font: 800 24px/1 "Outfit", sans-serif;
  letter-spacing: -0.05em;
}

.auth-brand img {
  display: block;
  border-radius: 12px;
}

.auth-layout {
  position: relative;
  z-index: 3;
  width: min(1120px, calc(100% - 48px));
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 430px;
  gap: 80px;
  align-items: center;
  margin-inline: auto;
  padding: 130px 0 70px;
}

.auth-intro {
  max-width: 560px;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.auth-kicker span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--auth-teal);
  box-shadow: 0 0 0 4px rgba(14, 165, 164, 0.25);
}

.auth-intro h1 {
  font: 800 clamp(2.4rem, 4vw, 3.4rem)/1.05 "Outfit", sans-serif;
  letter-spacing: -0.045em;
  margin-bottom: 1rem;
}

.auth-intro h1 em {
  font-style: normal;
  color: var(--auth-teal);
}

.auth-intro > p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 34rem;
}

.auth-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 2rem;
}

.auth-proof div {
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-proof strong {
  display: block;
  font-family: "Outfit", sans-serif;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.auth-proof span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.auth-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.orbit-a {
  width: 420px;
  height: 420px;
  top: -80px;
  right: -40px;
  animation: spin 48s linear infinite;
}

.orbit-b {
  width: 280px;
  height: 280px;
  bottom: 8%;
  left: 8%;
  animation: spin 36s linear infinite reverse;
}

.auth-node {
  position: absolute;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
  animation: float 5.5s ease-in-out infinite;
}

.node-one { top: 22%; right: 18%; color: var(--auth-teal); }
.node-two { top: 38%; right: 8%; color: var(--auth-blue); animation-delay: 0.6s; }
.node-three { bottom: 28%; left: 12%; color: var(--auth-coral); animation-delay: 1.1s; }
.node-four { bottom: 18%; left: 28%; color: #f59e0b; animation-delay: 1.6s; }

.login-card {
  background: rgba(255, 255, 255, 0.96);
  color: #0b1220;
  border-radius: 22px;
  padding: 1.5rem 1.45rem 1.2rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  animation: rise 0.4s ease both;
}

.login-card-head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.login-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #0b1220;
  color: var(--auth-teal);
  font-weight: 800;
}

.login-card-head p {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(11, 18, 32, 0.45);
  font-weight: 700;
}

.login-card-head h2 {
  font: 800 1.25rem/1.2 "Outfit", sans-serif;
  letter-spacing: -0.03em;
}

.login-hint {
  color: rgba(11, 18, 32, 0.58);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.login-card label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.login-card input {
  width: 100%;
  border: 1.5px solid rgba(11, 18, 32, 0.12);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  background: #f6f8fc;
  margin-bottom: 0.55rem;
}

.code-input {
  letter-spacing: 0.35em;
  font-weight: 700;
  font-size: 1.15rem;
}

.field-error {
  color: #b42318;
  min-height: 1.2em;
  font-size: 0.85rem;
  margin-bottom: 0.45rem;
}

.login-submit {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: #0b1220;
  color: #fff;
  font-weight: 750;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  gap: 0.45rem;
}

.login-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-submit span {
  color: var(--auth-teal);
}

.demo-code {
  background: rgba(14, 165, 164, 0.12);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.55rem;
  font-size: 0.88rem;
}

.back-button {
  border: 0;
  background: transparent;
  color: rgba(11, 18, 32, 0.55);
  font-weight: 650;
  cursor: pointer;
  margin-bottom: 0.75rem;
}

.login-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(11, 18, 32, 0.08);
  color: rgba(11, 18, 32, 0.4);
  font-size: 0.75rem;
  font-weight: 650;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 100px;
  }

  .auth-proof {
    grid-template-columns: 1fr;
  }

  .auth-intro {
    text-align: left;
  }
}
