[hidden] {
  display: none !important;
}

:root {
  --auth-ink: #062826;
  --auth-lime: #f0c75e;
  --auth-mint: #7ee0c8;
  --auth-paper: #e8f3ef;
}

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

.auth-screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 16% 22%, rgba(126, 224, 200, 0.2), transparent 32%),
    radial-gradient(circle at 84% 78%, rgba(240, 199, 94, 0.16), transparent 34%),
    linear-gradient(160deg, #062826 0%, #0b3d3a 48%, #0a2f3a 100%);
}

.auth-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.08;
  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: 68px 68px;
  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 "Sora", sans-serif;
  letter-spacing: -0.05em;
}

.auth-brand img {
  display: block;
}

.auth-layout {
  position: relative;
  z-index: 3;
  width: min(1120px, calc(100% - 48px));
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 430px;
  gap: 90px;
  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;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-kicker span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--auth-lime);
  box-shadow: 0 0 0 4px rgba(240, 199, 94, 0.2);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.7; }
}

.auth-intro h1 {
  margin: 0 0 18px;
  font: 800 clamp(2.4rem, 5vw, 3.6rem)/1.05 "Sora", sans-serif;
  letter-spacing: -0.05em;
}

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

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

.auth-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.auth-proof div {
  padding: 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
}

.auth-proof strong {
  display: block;
  margin-bottom: 4px;
  font: 700 0.92rem/1.2 "Sora", sans-serif;
}

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

.auth-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.auth-orbit {
  position: absolute;
  border: 1px solid rgba(126, 224, 200, 0.18);
  border-radius: 50%;
  animation: orbit-spin 28s linear infinite;
}

.orbit-a {
  width: 420px;
  height: 420px;
  top: -80px;
  right: -60px;
}

.orbit-b {
  width: 280px;
  height: 280px;
  bottom: 8%;
  left: 6%;
  animation-duration: 36s;
  animation-direction: reverse;
  border-color: rgba(240, 199, 94, 0.2);
}

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

.auth-node {
  position: absolute;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(11, 61, 58, 0.7);
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  animation: float-node 5s ease-in-out infinite;
}

.node-one { top: 18%; right: 18%; }
.node-two { top: 42%; right: 8%; animation-delay: 0.8s; }
.node-three { bottom: 22%; left: 12%; animation-delay: 1.4s; }
.node-four { top: 28%; left: 8%; animation-delay: 2s; }

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

.login-card {
  padding: 28px 26px 22px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.96);
  color: #0f1c1a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  animation: card-in 0.55s ease both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.login-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #0b3d3a;
  color: var(--auth-lime);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.login-card-head p {
  margin: 0;
  color: #6b7c78;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.login-card-head h2 {
  margin: 4px 0 0;
  font: 750 1.25rem/1.2 "Sora", sans-serif;
  letter-spacing: -0.03em;
}

.login-hint {
  margin: 0 0 18px;
  color: #5b6d68;
  font-size: 0.92rem;
  line-height: 1.55;
}

.login-card label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 650;
  color: #314441;
}

.login-card input {
  width: 100%;
  border: 1.5px solid #d5e2dd;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  background: #f7fbf9;
  margin-bottom: 8px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-card input:focus {
  border-color: #0b3d3a;
  box-shadow: 0 0 0 3px rgba(11, 61, 58, 0.12);
}

.code-input {
  letter-spacing: 0.35em;
  font-weight: 700;
  font-size: 1.2rem;
  text-align: center;
}

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

.login-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: #0b3d3a;
  color: #f0c75e;
  font: 700 0.98rem/1 "Sora", sans-serif;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}

.login-submit:hover {
  background: #062826;
  transform: translateY(-1px);
}

.login-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.demo-code {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eefaf4;
  color: #0b3d3a;
  font-size: 0.9rem;
}

.back-button {
  border: 0;
  background: transparent;
  color: #5b6d68;
  font-weight: 650;
  cursor: pointer;
  margin-bottom: 12px;
  padding: 0;
}

.login-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e4eeea;
  color: #7a8c87;
  font-size: 0.78rem;
}

.login-footer a {
  color: #0b3d3a;
  font-weight: 700;
  text-decoration: none;
}

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

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

  .auth-node {
    display: none;
  }
}
