:root {
  color-scheme: dark;
  --bg: #090d18;
  --panel: rgba(20, 26, 43, 0.9);
  --panel-border: rgba(255, 255, 255, 0.09);
  --text: #f5f7ff;
  --muted: #aeb7cf;
  --accent: #7c8cff;
  --accent-strong: #5f70ee;
  --danger-bg: rgba(255, 96, 112, 0.12);
  --danger-border: rgba(255, 96, 112, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 15%, rgba(93, 109, 238, 0.26), transparent 32rem),
    radial-gradient(circle at 90% 90%, rgba(123, 70, 201, 0.18), transparent 30rem),
    var(--bg);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.28;
  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: 32px 32px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

.shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 20px;
}

.card {
  width: min(100%, 440px);
  padding: 38px;
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
}

.card.compact { width: min(100%, 500px); }

.brand {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 24px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #a45ee7);
  box-shadow: 0 14px 35px rgba(95, 112, 238, .3);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.eyebrow {
  margin: 0 0 10px;
  color: #aeb9ff;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 38px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.intro {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.alert {
  margin-top: 20px;
  padding: 12px 14px;
  border: 1px solid var(--danger-border);
  border-radius: 12px;
  color: #ffd6da;
  background: var(--danger-bg);
  font-size: 14px;
  line-height: 1.45;
}

.form {
  display: grid;
  gap: 17px;
  margin-top: 28px;
}

label { display: grid; gap: 8px; }
label span { color: #d7dcef; font-size: 13px; font-weight: 700; }

input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 12px;
  outline: 0;
  color: var(--text);
  background: rgba(5, 9, 19, .64);
  font: inherit;
  transition: border-color .18s ease, box-shadow .18s ease;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(124, 140, 255, .14);
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 12px 30px rgba(95, 112, 238, .24);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button-link:hover { filter: brightness(1.08); }

.button-link { margin-top: 26px; }

.secondary {
  display: inline-block;
  margin-top: 18px;
  color: #bdc5ff;
  font-weight: 700;
  text-decoration: none;
}

.secondary:hover { color: #fff; }

.meta {
  margin: 24px 0 0;
  color: #7f89a3;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 520px) {
  .shell { padding: 18px 12px; }
  .card { padding: 28px 22px; border-radius: 19px; }
}

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