:root {
  --bg: #f7f5ff;
  --bg-strong: #ede7ff;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --surface-muted: #f3efff;
  --line: rgba(92, 63, 183, 0.14);
  --line-strong: rgba(104, 70, 209, 0.26);
  --text: #1f1834;
  --text-soft: #625879;
  --accent: #6f3ff5;
  --accent-strong: #5c30d8;
  --accent-soft: rgba(111, 63, 245, 0.12);
  --success: #126c53;
  --success-bg: rgba(18, 108, 83, 0.12);
  --error: #a22652;
  --error-bg: rgba(162, 38, 82, 0.12);
  --shadow: 0 30px 80px rgba(79, 42, 163, 0.18);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(156, 118, 255, 0.22), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(111, 63, 245, 0.18), transparent 24%),
    linear-gradient(180deg, #fbfaff 0%, #f4f1ff 48%, #f8f6ff 100%);
  color: var(--text);
  font-family: "Manrope", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(111, 63, 245, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 63, 245, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 1), transparent 88%);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.auth-shell {
  position: relative;
  min-height: 100vh;
  padding: 32px;
}

.auth-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 460px);
  gap: 56px;
  align-items: start;
  max-width: 1240px;
  min-height: calc(100vh - 64px);
  margin: 0 auto;
}

.auth-copy,
.auth-card {
  border: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.auth-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 0;
}

.brand-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 28px;
}

.brand-logo {
  flex: 0 0 auto;
  width: 112px;
  height: 112px;
  padding: 8px;
}

.brand-overline {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-lockup h1 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.25rem, 2vw, 2.35rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.auth-lead {
  max-width: 62ch;
  margin: 28px 0 0;
  color: var(--text-soft);
  font-size: 1.06rem;
  line-height: 1.8;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 34px;
}

.feature-card {
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
}

.feature-card strong {
  display: block;
  margin-bottom: 10px;
  font-family: "Sora", sans-serif;
  font-size: 1rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.auth-panel {
  display: flex;
  align-items: flex-start;
  min-height: 100%;
  padding: 28px 0 28px 48px;
  border-left: 1px solid var(--line-strong);
}

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

.auth-card-head h2,
.session-title {
  margin: 8px 0 12px;
  font-family: "Sora", sans-serif;
  font-size: 2rem;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.auth-card-head p,
.session-copy {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.auth-eyebrow,
.session-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-message {
  min-height: 24px;
  margin: 22px 0 0;
  color: var(--text-soft);
  font-size: 0.96rem;
  line-height: 1.6;
}

.auth-message[data-state="success"] {
  color: var(--success);
}

.auth-message[data-state="error"] {
  color: var(--error);
}

.auth-view {
  margin-top: 22px;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-field {
  display: grid;
  gap: 10px;
}

.auth-field span,
.session-list dt {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
}

.auth-field input {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  color: var(--text);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.auth-field input:focus {
  outline: none;
  border-color: rgba(111, 63, 245, 0.44);
  box-shadow: 0 0 0 4px rgba(111, 63, 245, 0.12);
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.auth-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.button-primary,
.button-secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 56px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), #8f61ff);
  color: #ffffff;
  box-shadow: 0 20px 40px rgba(111, 63, 245, 0.28);
}

.button-primary:hover,
.button-secondary:hover {
  transform: translateY(-1px);
}

.button-primary:focus-visible,
.button-secondary:focus-visible,
.auth-link:focus-visible {
  outline: 3px solid rgba(111, 63, 245, 0.2);
  outline-offset: 2px;
}

.button-primary:disabled,
.button-secondary:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.button-secondary {
  background: var(--surface-muted);
  border-color: var(--line);
  color: var(--text);
}

.auth-links {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.auth-link {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-link.is-disabled {
  color: var(--text-soft);
  cursor: default;
  text-decoration: none;
}

.auth-note {
  margin: 18px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  line-height: 1.6;
}

.session-list {
  display: grid;
  gap: 14px;
  margin: 24px 0 0;
}

.session-list div {
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.session-list dd {
  margin: 8px 0 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.session-actions {
  margin-top: 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1080px) {
  .auth-shell {
    padding: 20px;
  }

  .auth-stage {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 32px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .auth-copy {
    padding: 8px 0 0;
  }

  .auth-panel {
    padding: 28px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line-strong);
  }
}

@media (max-width: 720px) {
  .auth-shell {
    padding: 14px;
  }

  .brand-lockup {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-logo {
    width: 88px;
    height: 88px;
  }

  .auth-copy {
    padding: 0;
  }

  .auth-panel {
    padding-top: 24px;
  }

  .auth-card-head h2,
  .session-title {
    font-size: 1.7rem;
  }
}
