:root {
  --bg: #050405;
  --ink: #fbf7ff;
  --muted: #aaa0af;
  --dim: #766d7b;
  --line: rgba(255, 255, 255, 0.095);
  --panel: rgba(15, 14, 18, 0.86);
  --panel-strong: rgba(22, 20, 27, 0.92);
  --purple: #9b5cff;
  --pink: #e255b7;
  --cyan: #48d6b8;
  --danger: #ff5d6c;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(155, 92, 255, 0.2), transparent 28%),
    radial-gradient(circle at 82% 4%, rgba(72, 214, 184, 0.11), transparent 28%),
    linear-gradient(180deg, #0b080d 0%, #050405 48%, #020202 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 750;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 88px 88px;
  opacity: 0.55;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: min(1180px, calc(100% - 34px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 54px;
  align-items: center;
  margin: 0 auto;
  padding: 42px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 64px;
  color: #ffffff;
  font-size: 25px;
  font-weight: 950;
  letter-spacing: 0;
}

.brand-logo {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(226, 85, 183, 0.36));
}

.kicker {
  margin: 0 0 14px;
  color: #d990ff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 680px;
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(52px, 7vw, 88px);
  line-height: 0.94;
  font-weight: 950;
  letter-spacing: 0;
}

.auth-copy p:not(.kicker) {
  max-width: 585px;
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
}

.auth-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.auth-highlights span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.045);
  color: #ded6e3;
  font-size: 13px;
  font-weight: 900;
}

.preview-stack {
  position: relative;
  height: 206px;
  margin-top: 46px;
}

.preview-stack div {
  position: absolute;
  width: 350px;
  height: 160px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(155, 92, 255, 0.28), rgba(72, 214, 184, 0.1)),
    #111018;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.preview-stack div::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 28px;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 0 28px rgba(226, 85, 183, 0.28);
}

.preview-stack div::after {
  content: "";
  position: absolute;
  left: 100px;
  right: 30px;
  top: 44px;
  height: 44px;
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.52), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
}

.preview-stack div:nth-child(2) {
  left: 126px;
  top: 28px;
  filter: brightness(0.78);
}

.preview-stack div:nth-child(3) {
  left: 252px;
  top: 56px;
  filter: brightness(0.55);
}

.auth-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(155, 92, 255, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    var(--panel);
  box-shadow:
    0 30px 110px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.auth-card-heading {
  margin-bottom: 18px;
}

.auth-card-heading span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-card-heading h2 {
  margin: 7px 0 7px;
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0;
}

.auth-card-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 18px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.mode-switch button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 950;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.mode-switch button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.055);
}

.mode-switch button.active {
  background: linear-gradient(135deg, rgba(155, 92, 255, 0.38), rgba(226, 85, 183, 0.22));
  color: #ffffff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 28px rgba(155, 92, 255, 0.12);
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 13px;
  color: #d7d0db;
  font-size: 13px;
  font-weight: 900;
}

label[hidden] {
  display: none;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(0, 0, 0, 0.26);
  color: var(--ink);
  outline: none;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

input:focus {
  border-color: color-mix(in srgb, var(--purple) 55%, white);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 4px rgba(155, 92, 255, 0.1);
}

#submitButton {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: white;
  font-weight: 950;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.28),
    0 0 28px rgba(155, 92, 255, 0.18);
  transition:
    transform 160ms ease,
    filter 160ms ease,
    box-shadow 160ms ease;
}

#submitButton:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.32),
    0 0 34px rgba(226, 85, 183, 0.24);
}

.auth-help-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
}

.auth-help-row button,
.auth-help-row a {
  border: 0;
  padding: 0;
  background: transparent;
  color: #cfc6d4;
  font-size: 13px;
  font-weight: 900;
}

.auth-help-row button:hover,
.auth-help-row a:hover {
  color: #ffffff;
}

.auth-help-row button[hidden] {
  display: none;
}

#authNote {
  min-height: 44px;
  margin: 16px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
  padding: 12px 13px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

#authNote[data-tone="error"] {
  border-color: rgba(255, 93, 108, 0.28);
  background: rgba(255, 93, 108, 0.08);
  color: #ffc1c8;
}

#authNote[data-tone="success"] {
  border-color: rgba(72, 214, 184, 0.3);
  background: rgba(72, 214, 184, 0.09);
  color: #baf7eb;
}

@media (max-width: 920px) {
  .auth-shell {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 30px 0;
  }

  .brand {
    margin-bottom: 34px;
  }

  .preview-stack {
    display: none;
  }

  .auth-card {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .auth-shell {
    width: min(100% - 24px, 1180px);
  }

  h1 {
    font-size: 46px;
  }

  .auth-copy p:not(.kicker) {
    font-size: 16px;
  }

  .mode-switch {
    grid-template-columns: 1fr;
  }
}
