/* ============================================================================
   VANTAGE · Auth pages v6 — particle constellation
   Split-screen: animated canvas network + pristine form panel
   ========================================================================== */

html { min-height: 100%; }

body {
  min-height: 100vh;
  min-height: 100svh;
  background: #060912;
  color: #0B1020;
  overflow-x: hidden;
}

/* ── Layout ──────────────────────────────────────────────────── */
.auth-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(420px, .95fr);
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
}

/* ── Brand Panel (left) ──────────────────────────────────────── */
.auth-brand {
  position: relative;
  min-width: 0;
  background:
    radial-gradient(circle at 48% 42%, rgba(36,82,255,.18), transparent 34%),
    radial-gradient(circle at 72% 20%, rgba(22,138,232,.14), transparent 24%),
    #060912;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 4vw, 56px);
}

/* canvas fills entire panel */
.auth-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* center logo floating above canvas */
.auth-brand__mark {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.auth-brand__mark img,
.auth-brand__mark svg {
  height: 38px;
  width: auto;
  flex: none;
  margin: 0 !important;
  filter: drop-shadow(0 0 30px rgba(36,82,255,.35));
}

.auth-brand__mark-label {
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -.03em;
  color: #fff;
  line-height: 1;
  margin-top: 0;
}

/* (er) — quiet mono code-style suffix, subordinate to Refetch (visual hierarchy) */
.auth-brand__mark-label .fn,
.auth-logo .fn {
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  font-size: .72em;
  letter-spacing: -.02em;
  margin-left: 2px;
  vertical-align: baseline;
}
.auth-brand__mark-label .fn { color: #9fb0d8; }  /* muted steel on dark (variant D) */
.auth-logo .fn { color: #8a93a8; }               /* muted steel on light */

/* copy below */
.auth-brand__copy {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: 56px;
  pointer-events: none;
}

.auth-brand__headline {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: #fff;
}

.auth-brand__headline .muted {
  color: rgba(255,255,255,.25);
}

/* ── Form Panel (right) ──────────────────────────────────────── */
.auth-form {
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 5vw, 60px);
  background: #fff;
}

.auth-form__inner {
  width: 100%;
  max-width: 420px;
  opacity: 0;
  transform: translateY(16px);
  animation: authReveal .7s cubic-bezier(.16,1,.3,1) .15s forwards;
}

/* logo */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -.02em;
  line-height: 1;
  color: #0B1020;
  text-decoration: none;
  margin-bottom: 44px;
}

.auth-logo img,
.auth-logo svg {
  height: 19px;
  width: auto;
  flex-shrink: 0;
  margin: 0 !important;
}

.auth-logo__wm { white-space: nowrap; }

.auth-logo .fn {
  color: #8B96AD;
  font-family: inherit;
  font-size: 1em;
  font-weight: 500;
  letter-spacing: 0;
  margin-left: 0;
}

/* heading */
.auth-heading {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -.03em;
  color: #0B1020;
  line-height: 1.05;
}

.auth-subtitle {
  margin-top: 10px;
  font-size: .95rem;
  color: #59647A;
  line-height: 1.5;
}

.auth-subtitle strong {
  color: #0B1020;
  font-weight: 600;
}

/* google button */
.auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  margin-top: 32px;
  border-radius: 12px;
  border: 1px solid rgba(11,16,32,.12);
  background: #fff;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: .92rem;
  font-weight: 600;
  color: #0B1020;
  cursor: pointer;
  transition: all .25s cubic-bezier(.16,1,.3,1);
}

.auth-google:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px rgba(11,16,32,.1);
  border-color: rgba(11,16,32,.2);
}

.auth-google:active { transform: translateY(0); }
.auth-google svg { width: 18px; height: 18px; flex-shrink: 0; }

/* divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0;
  font-family: "JetBrains Mono", monospace;
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #97A0B2;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(11,16,32,.08);
}

/* form fields */
.auth-field { margin-bottom: 20px; }

.auth-label {
  display: block;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: .8rem;
  font-weight: 600;
  color: #0B1020;
  margin-bottom: 7px;
}

.auth-input-wrap { position: relative; }

.auth-input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid rgba(11,16,32,.1);
  border-radius: 12px;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: .9rem;
  color: #0B1020;
  background: #F7F9FC;
  outline: none;
  transition: all .2s cubic-bezier(.16,1,.3,1);
}

.auth-input:focus {
  border-color: #2452FF;
  box-shadow: 0 0 0 4px rgba(36,82,255,.08);
  background: #fff;
}

.auth-input::placeholder { color: #B0B8C9; }
.auth-input--password { padding-right: 48px; }

.auth-toggle-pw {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #97A0B2;
  padding: 4px;
  display: flex;
  transition: color .15s;
}

.auth-toggle-pw:hover { color: #0B1020; }
.auth-toggle-pw svg { width: 18px; height: 18px; }

/* forgot */
.auth-forgot {
  display: block;
  text-align: right;
  margin-top: -12px;
  margin-bottom: 24px;
  font-size: .82rem;
  color: #2452FF;
  font-weight: 500;
  text-decoration: none;
}

.auth-forgot:hover { color: #1736D6; }

.auth-message {
  display: none;
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #D7DEF0;
  background: #F7F9FC;
  color: #47536A;
  font-size: .86rem;
  line-height: 1.45;
}

.auth-message--show {
  display: block;
}

.auth-message + form {
  margin-top: 28px;
}

.auth-message--show + .auth-google,
.auth-message--show + form {
  margin-top: 22px;
}
.auth-message--success {
  border-color: rgba(16,185,129,.28);
  background: rgba(16,185,129,.08);
  color: #087A55;
}
.auth-message--info {
  border-color: rgba(36,82,255,.22);
  background: rgba(36,82,255,.07);
  color: #1736D6;
}
.auth-message--error {
  border-color: rgba(225,29,72,.24);
  background: rgba(225,29,72,.07);
  color: #B91C1C;
}

/* submit */
.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  border-radius: 12px;
  border: none;
  background: #0B1020;
  color: #fff;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all .3s cubic-bezier(.16,1,.3,1);
}

.auth-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(108deg, #2452FF 0%, #168AE8 100%);
  opacity: 0;
  transition: opacity .3s;
}

.auth-submit:hover::before { opacity: 1; }

.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -20px rgba(36,82,255,.35);
}

.auth-submit:active { transform: translateY(0); }

.auth-submit:disabled {
  cursor: not-allowed;
  opacity: .58;
  transform: none;
  box-shadow: none;
}

.auth-submit:disabled::before {
  opacity: 0;
}

.auth-submit span {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-submit .arrow {
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}

.auth-submit:hover .arrow { transform: translateX(4px); }

/* footer */
.auth-footer {
  margin-top: 32px;
  text-align: center;
  font-size: .88rem;
  color: #59647A;
}

.auth-footer a {
  color: #2452FF;
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover { color: #1736D6; }

/* terms */
.auth-terms {
  margin-top: 20px;
  text-align: center;
  font-size: .75rem;
  color: #97A0B2;
  line-height: 1.5;
}

.auth-terms a {
  color: #59647A;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-terms a:hover { color: #2452FF; }

/* ── Keyframes ───────────────────────────────────────────────── */
@keyframes authReveal {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .auth-layout {
    grid-template-columns: minmax(340px, 1fr) minmax(400px, 1fr);
  }
}

@media (max-width: 1020px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    display: none;
  }

  .auth-form {
    min-height: 100vh;
    min-height: 100svh;
    background: linear-gradient(180deg, #F7F9FC 0%, #fff 30%);
  }
}

@media (max-width: 480px) {
  .auth-form {
    align-items: stretch;
    padding: 32px 20px;
  }

  .auth-logo {
    margin-bottom: 38px;
  }

  .auth-logo img,
  .auth-logo svg {
    width: auto;
    height: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .auth-form__inner {
    opacity: 1 !important;
    transform: none !important;
  }
  .auth-canvas { display: none; }
}


/* ── Data Pipeline Left Panel Styles ────────────────────────── */
.auth-brand--pipeline {
  position: relative;
  background: #060912;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(40px, 6vw, 80px);
}

.auth-brand--pipeline::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  z-index: 1;
}

.auth-brand--pipeline .glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  z-index: 1;
  pointer-events: none;
}

.auth-brand--pipeline .glow.b1 {
  background: #2452FF;
  top: -100px;
  left: -200px;
}

.auth-brand--pipeline .glow.b2 {
  background: #168AE8;
  bottom: -200px;
  right: -100px;
}

.auth-brand--pipeline .auth-brand__content {
  position: relative;
  z-index: 2;
  max-width: 500px;
  width: 100%;
  text-align: left;
  margin-top: 0;
}

.auth-brand--pipeline .auth-eyebrow {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: #6C7D99;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.auth-brand--pipeline .auth-eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: #2452FF;
  vertical-align: middle;
  margin-right: 12px;
}

.auth-brand--pipeline .auth-display {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: clamp(2.5rem, 4vw, 3.8rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 48px;
}

.auth-brand--pipeline .grad-text {
  background: linear-gradient(135deg, #2452FF 0%, #168AE8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-brand--pipeline .auth-stats {
  display: flex;
  gap: 40px;
  margin-bottom: 56px;
}

.auth-brand--pipeline .auth-stat__value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.auth-brand--pipeline .auth-stat__value .pct {
  color: #2452FF;
}

.auth-brand--pipeline .auth-stat__label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: #59647A;
  text-transform: uppercase;
}

.auth-bars-container {
  width: 100%;
  margin-top: 56px;
}

.auth-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 64px;
  margin-bottom: 12px;
}

.auth-bars .bar {
  flex: 1;
  background: linear-gradient(180deg, #2452FF 0%, #168AE8 100%);
  border-radius: 4px;
  min-height: 4px;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.auth-bars .bar:hover {
  opacity: 1;
  filter: brightness(1.2);
}

.auth-bars .bar.outage {
  background: #1C2133;
}

.auth-bars-footer {
  display: flex;
  justify-content: space-between;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  color: #59647A;
  letter-spacing: 0.05em;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Split-Screen Verification States (Email Verification states in auth-form) ── */
.auth-state {
  display: none;
  width: 100%;
}

.auth-state--active {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  animation: authReveal .5s cubic-bezier(.16,1,.3,1) forwards;
}

.auth-state__loading-spinner,
.auth-state__success-icon,
.auth-state__error-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
}

.auth-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(36, 82, 255, 0.1);
  border-top-color: #2452FF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.auth-progress-container {
  width: 100%;
  background: rgba(11, 16, 32, 0.05);
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 24px;
  position: relative;
}

.auth-progress-bar {
  background: linear-gradient(90deg, #10B981 0%, #059669 100%);
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 2.5s linear;
}

/* ── Modal ────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 18, 0.6);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s cubic-bezier(.16,1,.3,1);
  padding: 20px;
}

.modal-backdrop--open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 60px -12px rgba(6, 9, 18, 0.15), 0 0 1px 0 rgba(6, 9, 18, 0.1);
  width: 100%;
  max-width: 440px;
  transform: translateY(12px) scale(.98);
  transition: transform .3s cubic-bezier(.16,1,.3,1);
  overflow: hidden;
  border: 1px solid rgba(11, 16, 32, 0.06);
}

.modal-backdrop--open .modal {
  transform: translateY(0) scale(1);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 0;
}

.modal__title {
  font-family: "Outfit", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0B1020;
  letter-spacing: -0.02em;
  margin: 0;
}

.modal__close {
  background: none;
  border: none;
  color: #97A0B2;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal__close:hover {
  background: #F7F9FC;
  color: #0B1020;
}

.modal__body {
  padding: 12px 24px 24px;
}

.modal__desc {
  font-size: 0.92rem;
  color: #59647A;
  line-height: 1.5;
  margin: 0 0 16px 0;
}

/* ── Segmented OTP input ──────────────────────────────────────── */
.otp {
  display: flex;
  gap: 10px;
}
.otp--center {
  justify-content: center;
}
.otp__box {
  width: 46px;
  height: 56px;
  text-align: center;
  font-family: "Outfit", sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #0B1020;
  border: 1.5px solid rgba(11, 16, 32, 0.1);
  border-radius: 12px;
  background: #ffffff;
  outline: none;
  caret-color: #2452FF;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.otp__box:focus {
  border-color: #2452FF;
  box-shadow: 0 0 0 3px rgba(36, 82, 255, .12);
}
.otp__box--filled {
  border-color: #2452FF;
  background: rgba(36, 82, 255, .04);
}

/* compact OTP variant for confirm dialogs */
.otp--compact .otp__box {
  width: 40px;
  height: 48px;
  font-size: 1.2rem;
  border-radius: 8px;
}
.otp--compact {
  gap: 8px;
}

#mfaRecoveryOtp .otp__box {
  width: 30px;
  height: 40px;
  font-size: 1rem;
}
#mfaRecoveryOtp .otp {
  gap: 3px;
}

/* Responsive adjustments for 2FA modals on small mobile screens */
@media (max-width: 440px) {
  .otp { gap: 6px; }
  .otp__box {
    width: 38px;
    height: 48px;
    font-size: 1.15rem;
  }
  .otp--compact .otp__box {
    width: 36px;
    height: 44px;
    font-size: 1.1rem;
  }
}
