:root {
  color-scheme: dark;
  --ink: #eef5f7;
  --muted: rgba(238, 245, 247, 0.62);
  --line: rgba(142, 240, 207, 0.17);
  --mint: #8ef0cf;
  --cyan: #56d7df;
  --warm: #ffd666;
  --font: "Aptos", "Segoe UI Variable", "Trebuchet MS", sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; margin: 0; }

body {
  display: grid;
  place-items: center;
  min-height: 100svh;
  overflow-x: hidden;
  padding: 24px;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 22%, rgba(86, 215, 223, 0.15), transparent 25%),
    radial-gradient(circle at 82% 12%, rgba(142, 240, 207, 0.1), transparent 22%),
    linear-gradient(145deg, #07090d 0%, #0b1016 52%, #080b0f 100%);
  font-family: var(--font);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.26;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, #000, transparent 72%);
}

.auth-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  width: min(1080px, 100%);
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(10, 14, 20, 0.84);
  box-shadow: 0 40px 140px rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(20px);
  animation: gate-arrive 560ms cubic-bezier(.2,.8,.2,1) both;
}

.auth-presence {
  position: relative;
  display: grid;
  align-content: center;
  gap: 34px;
  min-width: 0;
  padding: clamp(38px, 7vw, 82px);
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(86, 215, 223, 0.08), transparent 46%);
}

.auth-presence::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -180px;
  bottom: -180px;
  border: 1px solid rgba(142, 240, 207, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 54px rgba(142,240,207,.02), 0 0 0 108px rgba(86,215,223,.015);
}

.auth-orbit {
  display: grid;
  place-items: center;
  width: 94px;
  aspect-ratio: 1;
  border: 1px solid rgba(142, 240, 207, 0.22);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(142,240,207,.22), rgba(86,215,223,.06) 48%, transparent 50%);
  box-shadow: 0 0 70px rgba(86,215,223,.17);
}

.auth-orbit span { font-size: 2rem; filter: drop-shadow(0 0 14px rgba(142,240,207,.45)); }
.auth-kicker { display: flex; align-items: center; gap: 9px; color: var(--mint); font-size: .7rem; letter-spacing: .15em; text-transform: uppercase; }
.auth-kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px var(--mint); animation: signal 2s ease-in-out infinite; }
.auth-presence-copy h1 { max-width: 520px; margin: 12px 0 0; font-size: clamp(2.8rem, 7vw, 5.8rem); line-height: .88; letter-spacing: -.075em; }
.auth-presence-copy p { max-width: 520px; margin: 25px 0 0; color: var(--muted); font-size: clamp(.9rem, 1.5vw, 1.05rem); line-height: 1.65; }
.auth-signal { display: flex; flex-wrap: wrap; gap: 8px; }
.auth-signal span { padding: 6px 9px; border: 1px solid rgba(142,240,207,.12); border-radius: 999px; color: rgba(238,245,247,.46); font: .64rem ui-monospace, monospace; }

.auth-gate { display: grid; align-content: center; padding: clamp(32px, 5vw, 62px); background: rgba(8, 11, 16, 0.62); }
.auth-gate-head > span { color: var(--warm); font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; }
.auth-gate-head h2 { margin: 10px 0 0; font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -.045em; }
.auth-gate-head p { margin: 10px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.auth-form { display: grid; gap: 15px; margin-top: 30px; }
.auth-form label { display: grid; gap: 7px; }
.auth-form label span { color: rgba(238,245,247,.55); font-size: .7rem; }
.auth-form input { width: 100%; min-height: 48px; border: 1px solid rgba(238,245,247,.12); border-radius: 14px; padding: 0 14px; outline: none; color: var(--ink); background: rgba(255,255,255,.035); font: inherit; transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.auth-form input:focus { border-color: rgba(142,240,207,.62); background: rgba(142,240,207,.045); box-shadow: 0 0 0 4px rgba(142,240,207,.06); }
.auth-form button { display: flex; align-items: center; justify-content: space-between; min-height: 50px; margin-top: 5px; border: 0; border-radius: 14px; padding: 0 17px; color: #071114; background: linear-gradient(90deg, var(--cyan), var(--mint)); font: inherit; font-weight: 800; cursor: pointer; box-shadow: 0 16px 36px rgba(86,215,223,.13); transition: transform 160ms ease, box-shadow 160ms ease; }
.auth-form button:hover:not(:disabled), .auth-form button:focus-visible { transform: translateY(-2px); box-shadow: 0 20px 42px rgba(86,215,223,.2); outline: none; }
.auth-form button:disabled { cursor: not-allowed; opacity: .45; }
.auth-form button i { font-style: normal; font-size: 1.2rem; }
.auth-error { padding: 10px 12px; border-left: 2px solid #ff7f99; color: #ffb3c2; background: rgba(255,127,153,.055); font-size: .75rem; line-height: 1.4; }
.auth-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; color: rgba(238,245,247,.34); font: .58rem ui-monospace, monospace; text-transform: uppercase; }

@keyframes gate-arrive { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes signal { 50% { opacity: .45; box-shadow: 0 0 4px var(--mint); } }

@media (max-width: 780px) {
  body { padding: 12px; }
  .auth-shell { grid-template-columns: 1fr; min-height: 0; border-radius: 24px; }
  .auth-presence { gap: 20px; padding: 30px 26px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-orbit { width: 62px; }
  .auth-orbit span { font-size: 1.35rem; }
  .auth-presence-copy h1 { font-size: clamp(2.4rem, 14vw, 4rem); }
  .auth-presence-copy p { margin-top: 16px; }
  .auth-signal { display: none; }
  .auth-gate { padding: 30px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
