:root {
  color-scheme: dark;
  --bg: #050816;
  --bg-elevated: rgba(10, 16, 33, 0.74);
  --bg-elevated-strong: rgba(11, 18, 37, 0.92);
  --surface: rgba(255, 255, 255, 0.06);
  --surface-border: rgba(166, 207, 255, 0.16);
  --surface-border-strong: rgba(130, 198, 255, 0.28);
  --text: #f5f8ff;
  --text-soft: rgba(226, 236, 255, 0.7);
  --text-muted: rgba(201, 215, 240, 0.5);
  --accent: #8ee7ff;
  --accent-strong: #5ba8ff;
  --accent-deep: #1b4da8;
  --success: #74f5b7;
  --danger: #ff8892;
  --warning: #ffd27d;
  --shadow-lg: 0 32px 90px rgba(3, 8, 21, 0.55);
  --shadow-md: 0 24px 48px rgba(3, 8, 21, 0.35);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --input-height: 56px;
  --focus-ring: 0 0 0 4px rgba(91, 168, 255, 0.2);
}

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

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  font-family: "Space Grotesk", system-ui, sans-serif;
  background:
    radial-gradient(circle at 12% 18%, rgba(91, 168, 255, 0.18), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(142, 231, 255, 0.15), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(99, 57, 255, 0.12), transparent 26%),
    linear-gradient(180deg, #050816 0%, #060a18 48%, #040610 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.025), transparent 24%),
    linear-gradient(300deg, rgba(255, 255, 255, 0.03), transparent 30%);
  opacity: 0.55;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92em;
  color: var(--accent);
}

.page-noise,
.page-grid,
.page-orb {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.page-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 90%);
  opacity: 0.18;
}

.page-noise {
  opacity: 0.08;
  background-image:
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.4) 0 0.8px, transparent 0.9px),
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.26) 0 0.8px, transparent 0.9px),
    radial-gradient(circle at 45% 80%, rgba(255, 255, 255, 0.22) 0 0.9px, transparent 1px);
  background-size: 180px 180px;
}

.page-orb {
  filter: blur(90px);
  opacity: 0.42;
}

.page-orb-a {
  inset: 0 auto auto 0;
  width: 320px;
  height: 320px;
  background: rgba(64, 116, 255, 0.45);
  transform: translate(-18%, -6%);
}

.page-orb-b {
  inset: auto 0 4% auto;
  width: 360px;
  height: 360px;
  background: rgba(68, 214, 255, 0.25);
  transform: translate(10%, 6%);
}

.page-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 520px);
  gap: 36px;
  width: min(1240px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 32px 0;
  min-height: 100vh;
  align-items: stretch;
}

.brand-panel,
.auth-panel {
  display: flex;
  flex-direction: column;
}

.brand-panel {
  justify-content: space-between;
  gap: 28px;
  padding: 28px 0;
}

.brand-lockup,
.auth-card__header,
.split-row,
.session-card__header,
.quick-links,
.session-actions {
  display: flex;
  align-items: center;
}

.brand-lockup {
  gap: 16px;
}

.brand-mark {
  position: relative;
  width: 66px;
  height: 66px;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(144, 230, 255, 0.26), rgba(91, 168, 255, 0.1)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(166, 207, 255, 0.16);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 22px 48px rgba(4, 9, 24, 0.38);
  backdrop-filter: blur(18px);
}

.brand-mark::before,
.brand-mark::after,
.brand-mark__core {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), rgba(91, 168, 255, 0.6));
  box-shadow: 0 0 22px rgba(142, 231, 255, 0.28);
}

.brand-mark__core {
  inset: 20px;
}

.brand-mark::before {
  width: 10px;
  height: 10px;
  top: 12px;
  left: 14px;
}

.brand-mark::after {
  width: 10px;
  height: 10px;
  right: 12px;
  bottom: 14px;
}

.brand-name {
  margin: 4px 0 0;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.eyebrow,
.surface-label,
.metric-label,
.helper-copy,
.footer-note,
.session-details dt {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow,
.surface-label {
  margin: 0 0 10px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.hero-copy {
  max-width: 680px;
}

.hero-copy h1,
.hero-surface h2,
.auth-card__header h2,
.session-card h3 {
  margin: 0;
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(2.9rem, 4.5vw, 5.2rem);
}

.hero-text,
.hero-surface p,
.auth-intro,
.field-label,
.field-error,
.feedback-banner,
.session-details dd {
  line-height: 1.55;
}

.hero-text {
  max-width: 58ch;
  margin: 18px 0 0;
  font-size: 1.04rem;
  color: var(--text-soft);
}

.hero-surface,
.auth-card,
.session-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    var(--bg-elevated);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(22px);
  animation: rise-in 680ms ease both;
}

.hero-surface {
  padding: 26px;
}

.hero-surface--spotlight {
  min-height: 220px;
}

.hero-surface--spotlight h2 {
  font-size: clamp(1.6rem, 2.2vw, 2.3rem);
  margin-bottom: 12px;
}

.surface-glow {
  position: absolute;
  inset: -40% auto auto 42%;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(142, 231, 255, 0.26), transparent 68%);
  filter: blur(10px);
}

.signal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.signal-list span,
.quick-link,
.secondary-button,
.ghost-button,
.text-button {
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

.signal-list span,
.quick-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(166, 207, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.92rem;
  color: var(--text-soft);
  text-decoration: none;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.metric-card {
  min-height: 148px;
}

.metric-value {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 2vw, 2rem);
  font-weight: 700;
}

.metric-label,
.helper-copy,
.footer-note {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.hero-surface--links {
  display: grid;
  gap: 16px;
}

.quick-links,
.session-actions {
  gap: 12px;
  flex-wrap: wrap;
}

.quick-link:hover,
.secondary-button:hover,
.ghost-button:hover,
.text-button:hover {
  transform: translateY(-1px);
  border-color: rgba(142, 231, 255, 0.34);
}

.auth-panel {
  justify-content: center;
  padding: 14px 0;
}

.auth-card {
  padding: 26px;
  background:
    radial-gradient(circle at top, rgba(91, 168, 255, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    var(--bg-elevated-strong);
  box-shadow: var(--shadow-lg);
}

.auth-card::after {
  content: "";
  position: absolute;
  inset: auto -22% -28% auto;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(142, 231, 255, 0.18), transparent 66%);
  filter: blur(12px);
}

.auth-card__header {
  justify-content: space-between;
  gap: 16px;
}

.auth-card__header h2 {
  margin-top: 6px;
  font-size: clamp(1.85rem, 3vw, 2.5rem);
}

.service-pill {
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(166, 207, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-soft);
  white-space: nowrap;
}

.service-pill__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--warning);
  box-shadow: 0 0 14px rgba(255, 210, 125, 0.5);
}

.service-pill.is-live .service-pill__dot {
  background: var(--success);
  box-shadow: 0 0 14px rgba(116, 245, 183, 0.44);
}

.service-pill.is-error .service-pill__dot {
  background: var(--danger);
  box-shadow: 0 0 14px rgba(255, 136, 146, 0.44);
}

.auth-switch {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 24px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(166, 207, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.auth-switch::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  width: calc(50% - 6px);
  height: calc(100% - 12px);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(142, 231, 255, 0.28), rgba(91, 168, 255, 0.16)),
    rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 20px rgba(6, 12, 30, 0.24);
  transform: translateX(calc(var(--switch-index, 0) * 100%));
  transition: transform 220ms ease;
}

.auth-switch__tab {
  position: relative;
  z-index: 1;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font-weight: 500;
  cursor: pointer;
}

.auth-switch__tab[aria-selected="true"] {
  color: var(--text);
}

.auth-intro {
  margin: 18px 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.feedback-banner {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(166, 207, 255, 0.16);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-soft);
}

.feedback-banner.is-success {
  border-color: rgba(116, 245, 183, 0.22);
  background: rgba(116, 245, 183, 0.1);
  color: #ccffe7;
}

.feedback-banner.is-error {
  border-color: rgba(255, 136, 146, 0.22);
  background: rgba(255, 136, 146, 0.12);
  color: #ffe1e5;
}

.feedback-banner.is-info {
  border-color: rgba(255, 210, 125, 0.22);
  background: rgba(255, 210, 125, 0.12);
  color: #ffefcf;
}

.forms-stage {
  margin-top: 20px;
}

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

.auth-form-panel[hidden] {
  display: none;
}

.auth-form-panel:not([hidden]) {
  animation: form-enter 220ms ease both;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-label {
  font-size: 0.95rem;
  color: var(--text-soft);
  letter-spacing: normal;
  text-transform: none;
  font-family: "Space Grotesk", system-ui, sans-serif;
}

.input-shell {
  position: relative;
}

.input-shell input {
  width: 100%;
  min-height: var(--input-height);
  padding: 0 18px;
  border: 1px solid rgba(166, 207, 255, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.input-shell input::placeholder {
  color: rgba(226, 236, 255, 0.34);
}

.input-shell input:focus,
.auth-switch__tab:focus-visible,
.check-row input:focus-visible,
.submit-button:focus-visible,
.secondary-button:focus-visible,
.quick-link:focus-visible,
.ghost-button:focus-visible,
.text-button:focus-visible {
  box-shadow: var(--focus-ring);
  outline: none;
}

.input-shell input:focus {
  border-color: rgba(142, 231, 255, 0.38);
  background: rgba(255, 255, 255, 0.07);
}

.input-shell input[aria-invalid="true"] {
  border-color: rgba(255, 136, 146, 0.52);
  background: rgba(255, 136, 146, 0.08);
}

.toggle-visibility {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(166, 207, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  cursor: pointer;
}

.field-error {
  min-height: 20px;
  margin: 0;
  font-size: 0.88rem;
  color: var(--danger);
}

.split-row {
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.split-row--align-start {
  align-items: flex-start;
}

.check-row {
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-soft);
  cursor: pointer;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--accent-strong);
}

.text-button,
.ghost-button {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}

.submit-button,
.secondary-button,
.ghost-button {
  text-decoration: none;
}

.submit-button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 58px;
  padding: 0 24px;
  border: 0;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(142, 231, 255, 0.96), rgba(91, 168, 255, 0.88)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent);
  color: #02111e;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
  box-shadow: 0 20px 40px rgba(91, 168, 255, 0.24);
}

.submit-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.submit-button:disabled {
  opacity: 0.78;
  cursor: wait;
}

.submit-button.is-loading .submit-button__label {
  opacity: 0.15;
}

.submit-button__spinner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(2, 17, 30, 0.28);
  border-top-color: rgba(2, 17, 30, 0.88);
  border-radius: 999px;
  opacity: 0;
  animation: spin 750ms linear infinite;
}

.submit-button.is-loading .submit-button__spinner {
  opacity: 1;
}

.helper-copy {
  font-size: 0.74rem;
}

.helper-copy a {
  color: var(--accent);
  text-decoration: none;
}

.session-card {
  margin-top: 20px;
  padding: 22px;
}

.session-card__header {
  justify-content: space-between;
  gap: 16px;
}

.session-card h3 {
  margin-top: 8px;
  font-size: 1.6rem;
}

.session-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0 0;
}

.session-details div {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(166, 207, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.session-details dt {
  margin: 0 0 10px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.session-details dd {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}

.secondary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(166, 207, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
}

.footer-note {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 6px 0;
}

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

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes form-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1120px) {
  .page-shell {
    grid-template-columns: 1fr;
    width: min(900px, calc(100vw - 32px));
    padding: 24px 0 36px;
  }

  .brand-panel {
    padding-bottom: 0;
  }

  .brand-panel,
  .auth-panel {
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 20px, 100%);
  }

  .brand-panel,
  .auth-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .brand-panel {
    gap: 20px;
  }

  .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(2.5rem, 13vw, 3.5rem);
  }

  .metrics-grid,
  .field-grid,
  .session-details {
    grid-template-columns: 1fr;
  }

  .auth-card__header,
  .session-card__header,
  .footer-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-card {
    padding: 20px;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: calc(100vw - 16px);
    padding-top: 12px;
  }

  .brand-panel {
    padding: 18px 0 0;
  }

  .hero-surface,
  .auth-card,
  .session-card {
    border-radius: 24px;
  }

  .auth-switch__tab,
  .service-pill,
  .quick-link,
  .secondary-button {
    width: 100%;
    justify-content: center;
  }

  .quick-links,
  .session-actions {
    width: 100%;
  }

  .toggle-visibility {
    right: 10px;
    min-height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
