:root {
  color-scheme: dark;
  --bg: #0a0d12;
  --panel: #111720;
  --panel-2: #171f2a;
  --line: #263141;
  --text: #edf4ff;
  --muted: #8f9caf;
  --accent: #65e6b4;
  --accent-strong: #49c99a;
  --danger: #ff6b78;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% -10%, #163b35 0, transparent 32rem),
    radial-gradient(circle at 92% 90%, #14233d 0, transparent 28rem),
    var(--bg);
}

a { color: inherit; }
button, input { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 0 4vw;
  border-bottom: 1px solid var(--line);
  background: #0a0d12dc;
  backdrop-filter: blur(18px);
}

.brand {
  color: var(--text);
  font-size: 1.16rem;
  font-weight: 800;
  letter-spacing: -.03em;
  text-decoration: none;
}

.brand span, .eyebrow, .form-switch a { color: var(--accent); }

main { width: min(1180px, 92vw); margin: 0 auto; }

.login-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 72px);
  padding: 4rem 0;
}

.login-card {
  width: min(580px, 100%);
  padding: clamp(1.5rem, 5vw, 3.5rem);
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: #10161ded;
  box-shadow: 0 30px 90px #0008;
  backdrop-filter: blur(18px);
}

.login-heading > p:not(.eyebrow), .success-card > p:not(.eyebrow) {
  max-width: 40rem;
  color: var(--muted);
  line-height: 1.65;
}

.eyebrow {
  margin: 0 0 .8rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
}

h1 {
  margin: .15rem 0;
  font-size: clamp(2.25rem, 7vw, 4.15rem);
  line-height: 1;
  letter-spacing: -.055em;
}

h2 { margin: 0 0 .4rem; letter-spacing: -.03em; }

.auth-form {
  display: grid;
  gap: .75rem;
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid #ffffff08;
  border-radius: 1rem;
  background: var(--panel-2);
}

.auth-form label { margin-top: .35rem; color: var(--muted); font-size: .86rem; }

.auth-form input:not([type="hidden"]) {
  width: 100%;
  min-height: 3rem;
  padding: .75rem .85rem;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: .58rem;
  outline: none;
  background: #0c1118;
  transition: border-color .16s, box-shadow .16s;
}

.auth-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #65e6b425;
}

.auth-form button, .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  margin-top: .65rem;
  padding: .8rem 1rem;
  color: #07130f;
  border: 0;
  border-radius: .7rem;
  background: var(--accent);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s, transform .16s;
}

.auth-form button:hover, .button-link:hover { background: var(--accent-strong); transform: translateY(-1px); }
.auth-form button:focus-visible, .button-link:focus-visible, .form-switch a:focus-visible { outline: 3px solid #65e6b455; outline-offset: 3px; }

.field-hint { margin-top: -.4rem; color: #748298; }
.form-switch { margin: 1.25rem 0 0; color: var(--muted); text-align: center; }
.form-switch a { font-weight: 800; text-underline-offset: .2rem; }

.error {
  margin-top: 1.5rem;
  padding: .85rem 1rem;
  color: #ffb3ba;
  border: 1px solid #71333c;
  border-radius: .6rem;
  background: #35171c;
}

.success-card { text-align: center; }
.success-mark {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.4rem;
  color: #07130f;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 16px 42px #164c47aa;
  font-size: 2rem;
  font-weight: 900;
}
.success-card .button-link { margin-top: 1rem; }

@media (max-width: 600px) {
  .topbar { min-height: 64px; padding: 0 5vw; }
  main { width: min(100% - 1.5rem, 1180px); }
  .login-shell { min-height: calc(100vh - 64px); padding: 1.5rem 0; }
  .login-card { padding: 1.4rem; border-radius: 1rem; }
  .auth-form { margin-top: 1.5rem; padding: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
