:root {
  --accent: #8ea3ff;
  --accent-bright: #d7e0ff;
  --accent-soft: rgba(142, 163, 255, 0.18);
  --accent-border: rgba(142, 163, 255, 0.30);
  --accent-shadow: rgba(77, 101, 255, 0.30);
  --panel: rgba(12, 17, 40, 0.72);
  --panel-strong: rgba(10, 14, 32, 0.84);
  --bg-start: #020511;
  --bg-middle: #0a1130;
  --bg-end: #141d49;
  --text-main: rgba(255, 255, 255, 0.96);
  --text-soft: rgba(255, 255, 255, 0.72);
  --border: rgba(255, 255, 255, 0.10);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background-color: #050813;
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  isolation: isolate;
  font-family: "Manrope", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-start);
  background:
    radial-gradient(circle at 16% 18%, color-mix(in srgb, var(--accent) 22%, transparent) 0%, transparent 34%),
    radial-gradient(circle at 82% 22%, color-mix(in srgb, var(--accent-bright) 18%, transparent) 0%, transparent 30%),
    linear-gradient(135deg, var(--bg-start) 0%, var(--bg-middle) 48%, var(--bg-end) 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 16%, transparent) 0%, transparent 22%),
    radial-gradient(circle at 24% 74%, rgba(255, 255, 255, 0.04) 0%, transparent 18%);
  filter: blur(96px);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 0.7px, transparent 0.7px);
  background-size: 22px 22px;
  opacity: 0.16;
  pointer-events: none;
}

body > * {
  position: relative;
  z-index: 1;
}

.auth-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 24%, transparent 76%, rgba(255, 255, 255, 0.025)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.012));
  mix-blend-mode: screen;
  opacity: 0.45;
}

.auth-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(20px, 4vw, 40px);
  backdrop-filter: blur(18px);
}

.brand {
  color: var(--text-main);
  text-decoration: none;
  font-family: "Playfair Display", serif;
  font-size: 28px;
  letter-spacing: 0.12em;
}

.back-link {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.back-link:hover {
  transform: translateY(-1px);
  border-color: var(--accent-border);
  background: rgba(255, 255, 255, 0.08);
}

.auth-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 420px);
  gap: 28px;
  align-items: stretch;
}

.auth-shell-login {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
}

.auth-story,
.auth-panel {
  border-radius: 32px;
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.auth-story {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 44px);
  background:
    linear-gradient(160deg, rgba(10, 14, 28, 0.98), rgba(8, 11, 23, 0.94)),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, rgba(6, 8, 18, 0.88)), rgba(8, 10, 22, 0.22));
}

.auth-story::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -90px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  filter: blur(24px);
  opacity: 0.28;
}

.auth-panel {
  background: var(--panel-strong);
  padding: clamp(24px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow,
.panel-kicker,
.agent-label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
}

.auth-title {
  margin: 12px 0 16px;
  font-family: "Playfair Display", serif;
  font-size: clamp(42px, 5vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.auth-lead {
  margin: 0 0 26px;
  max-width: 620px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-soft);
}

.agent-quote {
  margin: 0 0 28px;
  padding: 24px 24px 24px 28px;
  border-left: 2px solid var(--accent);
  border-radius: 0 24px 24px 0;
  background: rgba(255, 255, 255, 0.03);
  font-family: "Playfair Display", serif;
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.25;
}

.agent-preview {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.agent-preview img {
  width: 100%;
  aspect-ratio: 1 / 1.18;
  object-fit: cover;
  object-position: center top;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.agent-preview-copy h2 {
  margin: 8px 0 8px;
  font-family: "Playfair Display", serif;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: 0.06em;
}

.agent-preview-copy p:last-child {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.auth-notes {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

.note-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.note-card span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent) 24%, transparent);
  color: var(--accent-bright);
  font-weight: 700;
}

.note-card p {
  margin: 0;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.76);
}

.panel-head h2 {
  margin: 10px 0 10px;
  font-family: "Playfair Display", serif;
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.08;
}

.panel-head p:last-child {
  margin: 0 0 24px;
  color: var(--text-soft);
  line-height: 1.65;
}

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

.auth-form.is-hidden,
.billing-gate.is-hidden,
.demo-lab.is-hidden,
.session-switch.is-hidden {
  display: none;
}

.billing-card,
.billing-gate,
.session-switch {
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent) 16%, rgba(255, 255, 255, 0.04)),
      rgba(255, 255, 255, 0.04)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 42px color-mix(in srgb, var(--accent-shadow) 18%, transparent);
}

.billing-head {
  display: grid;
  gap: 8px;
}

.billing-head h3 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.08;
}

.billing-copy {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.65;
}

.billing-meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.billing-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.2;
}

.purchase-price {
  margin: 18px 0 16px;
  font-family: "Playfair Display", serif;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1;
  color: var(--accent-bright);
}

.session-switch-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.session-switch-actions .ghost-button {
  flex: 1 1 220px;
}

.session-switch-actions .ghost-button.is-hidden {
  display: none;
}

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

.field.is-hidden,
.purchase-price.is-hidden {
  display: none;
}

.field span {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.86);
}

.field-note {
  margin: -2px 2px 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.62);
}

.field-note.is-hidden {
  display: none;
}

.field-note.is-success {
  color: rgba(193, 255, 214, 0.86);
}

.field-note.is-warning {
  color: rgba(255, 231, 171, 0.9);
}

.field-note.is-error {
  color: #ffbdbd;
}

.field input,
.field textarea {
  width: 100%;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font: inherit;
  outline: none;
  transition: border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent-border);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: #ffbdbd;
  font-size: 14px;
}

.form-note {
  min-height: 20px;
  margin: -6px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.5;
}

.support-link {
  width: fit-content;
  color: var(--accent-bright);
  text-decoration: none;
  font-size: 14px;
}

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

.primary-button {
  appearance: none;
  border: none;
  cursor: pointer;
  width: 100%;
  padding: 16px 18px;
  border-radius: 18px;
  font: inherit;
  font-weight: 700;
  color: #11151f;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  box-shadow:
    0 18px 40px color-mix(in srgb, var(--accent-shadow) 72%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.56);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  filter: saturate(1.04);
}

.panel-footer {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
}

.panel-footer a {
  color: var(--accent-bright);
  text-decoration: none;
}

.panel-footer a:hover {
  text-decoration: underline;
}

.demo-lab {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 16px;
}

.demo-head h3 {
  margin: 10px 0 8px;
  font-family: "Playfair Display", serif;
  font-size: 28px;
  line-height: 1.08;
}

.demo-head p:last-child {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.demo-grid {
  display: grid;
  gap: 12px;
}

.demo-card {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 12px;
}

.demo-card h4 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.96);
}

.demo-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.demo-meta {
  display: grid;
  gap: 6px;
}

.demo-meta span {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.44);
}

.demo-credentials {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  line-height: 1.55;
}

.demo-actions,
.demo-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.88);
  border-radius: 16px;
  padding: 11px 14px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.ghost-button:hover {
  transform: translateY(-1px);
  border-color: var(--accent-border);
  background: rgba(255, 255, 255, 0.08);
}

.verification-action {
  width: 100%;
  justify-content: center;
}

.verification-action.is-hidden {
  display: none;
}

.mail-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  gap: 10px;
}

.mail-card.is-hidden {
  display: none;
}

.mail-card-head {
  display: grid;
  gap: 6px;
}

.mail-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.6;
}

.mail-meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.52);
}

.mail-link {
  text-decoration: none;
  width: 100%;
  text-align: center;
}

.verify-story::after {
  content: "";
  position: absolute;
  inset: auto 26px 24px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent-bright) 38%, transparent) 0%, transparent 48%),
    radial-gradient(circle at 50% 50%, transparent 54%, color-mix(in srgb, var(--accent) 28%, transparent) 55%, transparent 62%);
  opacity: 0.46;
  filter: blur(2px);
  pointer-events: none;
}

.verify-stage {
  margin: 0 0 24px;
  padding: 22px 24px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at 16% 18%, color-mix(in srgb, var(--accent) 22%, transparent) 0%, transparent 42%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
}

.verify-stage-copy h2 {
  margin: 8px 0 10px;
  font-family: "Playfair Display", serif;
  font-size: clamp(26px, 2.8vw, 36px);
  line-height: 1.05;
}

.verify-stage-copy p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
}

.verify-stage-pulse {
  position: relative;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
}

.verify-stage-pulse span {
  position: absolute;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent-bright) 60%, transparent);
}

.verify-stage-pulse span:nth-child(1) {
  width: 24px;
  height: 24px;
  background: radial-gradient(circle, var(--accent-bright), var(--accent));
  box-shadow: 0 0 32px color-mix(in srgb, var(--accent-shadow) 88%, transparent);
}

.verify-stage-pulse span:nth-child(2) {
  width: 58px;
  height: 58px;
  opacity: 0.75;
}

.verify-stage-pulse span:nth-child(3) {
  width: 88px;
  height: 88px;
  opacity: 0.42;
}

.verify-agent-preview {
  margin-bottom: 6px;
}

.verify-panel {
  justify-content: flex-start;
}

.verify-status-card {
  overflow: hidden;
}

.verify-email-highlight {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 6px;
}

.verify-email-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.46);
}

.verify-email-highlight strong {
  font-size: 18px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.96);
  word-break: break-word;
}

.verify-code-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -4px;
}

.verify-code-note span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-form.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

@media (max-width: 980px) {
  .auth-shell,
  .auth-shell-login {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    order: -1;
  }
}

@media (max-width: 640px) {
  .auth-header {
    padding: 18px 18px 0;
  }

  .auth-shell {
    width: min(100% - 24px, 1180px);
    padding: 18px 0 32px;
  }

  .agent-preview {
    grid-template-columns: 1fr;
  }

  .agent-preview img {
    max-width: 220px;
  }

  .panel-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .verify-stage {
    grid-template-columns: 1fr;
  }

  .verify-stage-pulse {
    width: 74px;
    height: 74px;
  }

  .demo-actions,
  .demo-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .ghost-button {
    width: 100%;
  }
}
