:root {
  --bg-0: #030712;
  --bg-1: #060f1f;
  --bg-2: #091529;
  --surface: rgba(11, 21, 38, 0.72);
  --surface-2: rgba(14, 26, 48, 0.92);
  --line: rgba(180, 202, 255, 0.22);
  --line-soft: rgba(180, 202, 255, 0.12);
  --text-1: #f5f9ff;
  --text-2: #b6c3df;
  --text-3: #8393b7;
  --green: #70de88;
  --blue: #2758ff;
  --cyan: #78d8ff;
  --danger: #ff7d7d;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.45);
  --font-ui: "Sora", "Segoe UI", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-1);
  font-family: var(--font-ui);
  background:
    radial-gradient(circle at 80% 8%, rgba(38, 88, 255, 0.16), transparent 32%),
    radial-gradient(circle at 16% 78%, rgba(111, 223, 134, 0.1), transparent 36%),
    radial-gradient(circle at 92% 92%, rgba(221, 99, 171, 0.08), transparent 32%),
    linear-gradient(160deg, var(--bg-0) 0%, var(--bg-1) 48%, var(--bg-2) 100%);
  line-height: 1.45;
  overflow-x: hidden;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 44px 44px;
  mask: radial-gradient(circle at 50% 32%, black 30%, transparent 88%);
  z-index: -2;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.geo-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.geo {
  position: absolute;
  width: 240px;
  height: 240px;
  opacity: 0.85;
  filter: drop-shadow(0 0 32px rgba(179, 221, 255, 0.32));
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0px) rotate(var(--rt, 0deg));
  transition: transform 220ms linear;
}

.geo::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(145deg, var(--from), var(--to) 70%, #071629 110%);
}

.geo::after {
  content: "";
  position: absolute;
  inset: 13%;
  border-radius: inherit;
  background: radial-gradient(circle at 22% 24%, rgba(255, 255, 255, 0.55), transparent 42%);
  filter: blur(16px);
  opacity: 0.5;
}

.geo--diamond {
  border-radius: 28%;
}

.geo--triangle {
  clip-path: polygon(0 100%, 100% 50%, 0 0);
}

.geo--kite {
  clip-path: polygon(17% 0, 100% 42%, 84% 100%, 0 58%);
}

.geo--slab {
  border-radius: 24% / 30%;
}

.geo--g1 {
  top: -70px;
  right: -90px;
  width: 320px;
  height: 280px;
  --from: #84e1ff;
  --to: #2849ff;
  --rt: 22deg;
}

.geo--g2 {
  top: 18%;
  left: -120px;
  width: 320px;
  height: 230px;
  --from: #86e8ff;
  --to: #20367f;
}

.geo--g3 {
  bottom: 8%;
  right: -100px;
  width: 270px;
  height: 240px;
  --from: #90e391;
  --to: #243ff7;
  --rt: -22deg;
}

.geo--g4 {
  bottom: -90px;
  left: 24%;
  width: 270px;
  height: 190px;
  --from: #79dbff;
  --to: #173247;
  --rt: -8deg;
}

.geo--g5 {
  top: 56%;
  left: -90px;
  width: 200px;
  height: 200px;
  --from: #71de89;
  --to: #2855ff;
  --rt: 28deg;
  opacity: 0.45;
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  padding: clamp(1.4rem, 4vw, 2.4rem) clamp(1.1rem, 4vw, 2rem) 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.7rem;
  align-items: stretch;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0.3rem auto 0;
  padding: 0.4rem 0.6rem;
  border-radius: 14px;
  transition: transform 200ms ease;
}

.auth-brand:hover {
  transform: translateY(-1px);
}

.auth-brand img {
  width: 168px;
  height: auto;
  filter: drop-shadow(0 6px 18px rgba(38, 88, 255, 0.18));
}

.auth-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(1.6rem, 4.6vw, 2.4rem);
  background:
    radial-gradient(circle at 100% 0%, rgba(122, 161, 255, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(11, 22, 39, 0.94), rgba(7, 13, 24, 0.92));
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.auth-head {
  text-align: left;
  margin-bottom: 1.4rem;
}

.eyebrow {
  margin: 0;
  color: #7be08f;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
}

.auth-head h1 {
  margin: 0.7rem 0 0.6rem;
  font-size: clamp(1.55rem, 3.4vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.lede {
  margin: 0;
  color: var(--text-2);
  font-size: 0.96rem;
  line-height: 1.5;
}

.auth-form {
  display: grid;
  gap: 0.95rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
  font-family: var(--font-mono);
}

.field input {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(190, 211, 255, 0.22);
  border-radius: 12px;
  background: rgba(8, 16, 28, 0.78);
  padding: 0.78rem 0.95rem;
  color: var(--text-1);
  font: inherit;
  font-size: 0.98rem;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.field input::placeholder {
  color: rgba(180, 198, 230, 0.45);
}

.field input:hover {
  border-color: rgba(190, 211, 255, 0.32);
}

.field input:focus {
  outline: none;
  border-color: rgba(135, 188, 255, 0.6);
  background: rgba(11, 22, 39, 0.92);
  box-shadow: 0 0 0 4px rgba(120, 168, 255, 0.16);
}

.field-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: #87e89b;
  font: inherit;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-mono);
}

.field-link:hover {
  color: #b3f1c4;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 0.1rem;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}

.check input {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1px solid rgba(190, 211, 255, 0.32);
  background: rgba(10, 18, 33, 0.7);
  display: inline-grid;
  place-content: center;
  transition: 180ms ease;
  cursor: pointer;
}

.check input:checked {
  background: linear-gradient(130deg, #8ef6d6, #87cdff 46%, #8f9eff);
  border-color: rgba(130, 200, 255, 0.6);
}

.check input:checked::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #061328;
}

.muted-link {
  color: var(--text-2);
  font-size: 0.86rem;
  border-bottom: 1px dashed rgba(180, 200, 235, 0.25);
  transition: color 180ms ease, border-color 180ms ease;
}

.muted-link:hover {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.6);
}

.btn {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: progress;
  filter: saturate(0.7);
  transform: none;
}

.btn--primary {
  color: #081325;
  background: linear-gradient(120deg, var(--green), #96f5d9 40%, #95d0ff 70%, #7f95ff);
  box-shadow: 0 14px 32px rgba(82, 152, 255, 0.3);
  margin-top: 0.4rem;
}

.btn--primary:hover {
  box-shadow: 0 20px 42px rgba(87, 158, 255, 0.42);
}

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(8, 19, 37, 0.35);
  border-top-color: #081325;
  animation: spin 0.7s linear infinite;
}

.btn.is-loading .btn-spinner {
  display: inline-block;
}

.btn.is-loading .btn-label {
  opacity: 0.85;
}

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

.auth-note {
  margin: 0.6rem 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-3);
}

.auth-foot {
  text-align: center;
  margin-top: 0.4rem;
  display: grid;
  gap: 0.7rem;
}

.auth-foot p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-2);
}

.auth-foot a {
  color: #d6e7ff;
  border-bottom: 1px solid rgba(180, 200, 235, 0.3);
  transition: color 180ms ease, border-color 180ms ease;
}

.auth-foot a:hover {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.7);
}

.auth-foot .copyright {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-3);
}

.field.is-error input {
  border-color: rgba(255, 130, 130, 0.6);
  box-shadow: 0 0 0 4px rgba(255, 130, 130, 0.14);
}

@media (max-width: 480px) {
  .auth-brand img {
    width: 140px;
  }

  .geo--g2,
  .geo--g5 {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .geo {
    transition: none;
  }
}
