/* ═══════════════════════════════════════════════════════════════════
   FLOWZ LOGIN V2
   Electric blue / cyan · production-focused · mobile-first
   ═══════════════════════════════════════════════════════════════════ */
body.auth-v2-body {
  background: #050914;
  color: #f7faff;
  font-family: "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.auth-v2-body::before {
  height: 100%;
  background:
    radial-gradient(circle at 12% 12%, rgba(22, 119, 255, .20), transparent 34%),
    radial-gradient(circle at 86% 86%, rgba(57, 211, 255, .10), transparent 30%),
    linear-gradient(145deg, #050914 0%, #071120 52%, #04070d 100%);
}

.auth-session-gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(22, 119, 255, .18), transparent 30%),
    #050914;
}
.session-gate-brand {
  margin-bottom: 24px;
}
.session-gate-brand .brand {
  justify-content: center;
}
.session-gate-spinner {
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  border: 3px solid rgba(255,255,255,.16);
  border-top-color: #39d3ff;
  border-radius: 50%;
  animation: auth-session-spin .8s linear infinite;
}
.auth-session-gate strong {
  color: #f7faff;
  font-size: 18px;
}
.auth-session-gate > span:last-child {
  color: #9baac0;
  font-size: 14px;
}
@keyframes auth-session-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .session-gate-spinner { animation: none; }
}

.auth.auth-v2 {
  --v2-blue: #1677ff;
  --v2-blue-deep: #0757d7;
  --v2-cyan: #39d3ff;
  --v2-ink: #071120;
  --v2-muted: #667085;
  --v2-line: #dfe7f1;
  --v2-panel: #f7f9fd;
  position: relative;
  display: block !important;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0 !important;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(22,119,255,.18), transparent 33%),
    radial-gradient(circle at 78% 82%, rgba(57,211,255,.08), transparent 30%),
    #050914;
  isolation: isolate;
  font-family: "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "kern" 1, "liga" 1;
}

/* Atmosphere: reuse the existing scene, recolored for V2. */
.auth-v2 > .auth-bg {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: .72;
  mix-blend-mode: screen;
  pointer-events: none;
}
.auth-v2 .bg-scene {
  background:
    radial-gradient(ellipse 85% 70% at 12% 8%, rgba(16,99,235,.16), transparent 62%),
    radial-gradient(ellipse 70% 65% at 90% 92%, rgba(32,190,238,.09), transparent 64%),
    #050914;
}
.auth-v2 .bg-orb-t {
  background: radial-gradient(circle at 45% 45%, rgba(32,133,255,.28), rgba(5,87,215,.09) 45%, transparent 72%);
}
.auth-v2 .bg-orb-p {
  background: radial-gradient(circle at 45% 45%, rgba(57,211,255,.16), rgba(15,96,220,.06) 48%, transparent 74%);
}
.auth-v2 .bg-orb-c {
  background: radial-gradient(circle, rgba(38,125,255,.10), transparent 68%);
}
.auth-v2 .bg-wave-a { border-color: rgba(75,145,255,.07); }
.auth-v2 .bg-wave-b { border-color: rgba(57,211,255,.05); }
.auth-v2 .bg-star { filter: hue-rotate(165deg) saturate(1.35); }
.auth-v2 .bg-vignette {
  background: radial-gradient(ellipse at center, transparent 18%, rgba(3,8,18,.76) 100%);
}

/* Main shell */
.auth-v2 .auth-shell {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100dvh - 48px);
  margin: 24px auto;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(420px, .94fr);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 34px;
  overflow: hidden;
  background: rgba(7,17,32,.58);
  box-shadow:
    0 36px 100px rgba(0,0,0,.48),
    0 1px 0 rgba(255,255,255,.08) inset;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.auth-v2 .auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(38px, 5vw, 68px);
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(19,97,222,.16), transparent 48%),
    linear-gradient(160deg, rgba(8,18,35,.68), rgba(4,9,20,.82));
}
.auth-v2 .auth-story::before {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  left: -190px;
  bottom: -220px;
  border-radius: 50%;
  border: 1px solid rgba(57,211,255,.16);
  box-shadow:
    0 0 0 58px rgba(22,119,255,.035),
    0 0 0 116px rgba(22,119,255,.025);
}
.auth-v2 .auth-story::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image:
    linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom right, transparent 5%, #000 42%, transparent 92%);
  pointer-events: none;
}

/* Brand */
.auth-v2 .brand {
  position: relative;
  z-index: 2;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  margin: 0;
  width: fit-content;
}
.auth-v2 .brand-icon {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  box-shadow:
    0 14px 35px rgba(22,119,255,.35),
    0 0 0 1px rgba(255,255,255,.16);
}
.auth-v2 .brand-word {
  font-family: "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -.45px;
  background: none;
  -webkit-text-fill-color: #fff;
  filter: none;
}
.auth-v2 .brand-voltz {
  margin: 0 0 0 2px;
  padding-left: 14px;
  border-left: 1px solid rgba(255,255,255,.16);
}
.auth-v2 .brand-voltz-by {
  color: rgba(224,235,255,.54);
  font-family: inherit;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .15px;
  text-transform: none;
}
.auth-v2 .brand-voltz-logo {
  height: 18px;
  filter: none;
  opacity: 1;
}

.auth-v2 .auth-story-copy {
  position: relative;
  z-index: 2;
  margin: auto 0;
  max-width: 600px;
  padding: 72px 0 56px;
}
.auth-v2 .story-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  color: rgba(218,232,255,.72);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .25px;
  text-transform: none;
}
.auth-v2 .story-kicker-dot,
.auth-v2 .story-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--v2-cyan);
  box-shadow: 0 0 0 5px rgba(57,211,255,.10), 0 0 20px rgba(57,211,255,.65);
}
.auth-v2 .story-title {
  max-width: 590px;
  color: #fff;
  font-family: "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(44px, 5.1vw, 70px);
  font-weight: 700;
  line-height: 1.01;
  letter-spacing: -2.2px;
  text-wrap: balance;
}
.auth-v2 .story-title span {
  display: block;
  color: transparent;
  background: linear-gradient(100deg, #6aa8ff 0%, #39d3ff 72%);
  -webkit-background-clip: text;
  background-clip: text;
}
.auth-v2 .story-sub {
  max-width: 520px;
  margin-top: 24px;
  color: rgba(219,230,247,.66);
  font-size: 16px;
  line-height: 1.7;
}

.auth-v2 .story-grid {
  display: grid;
  gap: 11px;
  margin-top: 34px;
  max-width: 520px;
}
.auth-v2 .story-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
  backdrop-filter: blur(10px);
}
.auth-v2 .story-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--v2-cyan);
  border-radius: 10px;
  background: rgba(37,135,255,.12);
  border: 1px solid rgba(91,164,255,.18);
}
.auth-v2 .story-item strong,
.auth-v2 .story-item small {
  display: block;
}
.auth-v2 .story-item strong {
  color: #f7faff;
  font-size: 13px;
  font-weight: 700;
}
.auth-v2 .story-item small {
  margin-top: 2px;
  color: rgba(218,231,249,.50);
  font-size: 11px;
  line-height: 1.35;
}
.auth-v2 .story-live {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(221,233,250,.62);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3px;
}

/* Light sign-in panel */
.auth-v2 .auth-panel {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 5vw, 70px);
  color: var(--v2-ink);
  background:
    radial-gradient(circle at 95% 3%, rgba(22,119,255,.08), transparent 28%),
    linear-gradient(165deg, rgba(255,255,255,.985), rgba(244,248,254,.97));
}
.auth-v2 .auth-card {
  width: 100%;
  max-width: 440px;
  margin: auto;
}
.auth-v2 .auth-card-head {
  margin-bottom: 30px;
}
.auth-v2 .auth-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #3169aa;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .15px;
  text-transform: none;
}
.auth-v2 .auth-card-badge span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--v2-blue), var(--v2-cyan));
}
.auth-v2 .auth-card-head h2 {
  color: #071120;
  font-family: "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(32px, 3vw, 42px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.15px;
}
.auth-v2 .auth-card-head p {
  max-width: 370px;
  margin-top: 11px;
  color: #667085;
  font-size: 15px;
  line-height: 1.58;
}

/* Form controls */
.auth-v2 .auth-form-v2 {
  gap: 15px;
  padding: 0 !important;
}
.auth-v2 .in-field {
  background: rgba(255,255,255,.92);
  border-color: #d9e2ee;
  border-radius: 15px;
  box-shadow: 0 1px 2px rgba(16,24,40,.03);
}
.auth-v2 .in-field input {
  color: #0b1426;
  caret-color: var(--v2-blue);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.1px;
}
.auth-v2 .in-field input:-webkit-autofill {
  -webkit-text-fill-color: #0b1426;
}
.auth-v2 .in-field .lbl,
.auth-v2 .in-field .ico,
.auth-v2 .in-field .eye {
  color: #7a8799;
}
.auth-v2 .in-field .lbl {
  font-weight: 500;
}
.auth-v2 .in-field.has-value .lbl,
.auth-v2 .in-field.is-focus .lbl,
.auth-v2 .in-field.is-focus .ico {
  color: var(--v2-blue);
}
.auth-v2 .in-field.is-focus {
  background: #fff;
  border-color: rgba(22,119,255,.72);
  box-shadow: 0 0 0 4px rgba(22,119,255,.11), 0 8px 22px rgba(7,87,215,.08);
}
.auth-v2 .in-field.has-error {
  border-color: #ef5b73;
  box-shadow: 0 0 0 4px rgba(239,91,115,.10);
}
.auth-v2 .in-help {
  color: #8a96a7;
  font-size: 11.5px;
}
.auth-v2 .in-help a {
  color: var(--v2-blue-deep);
}
.auth-v2 .in-help.err {
  color: #d13c56;
}
.auth-v2 .cta-v2 {
  min-height: 55px;
  margin-top: 3px;
  border-radius: 15px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0;
  background: linear-gradient(115deg, var(--v2-blue-deep), var(--v2-blue) 58%, #1b9ae8);
  box-shadow:
    0 12px 26px rgba(7,87,215,.25),
    0 1px 0 rgba(255,255,255,.23) inset;
}
.auth-v2 .cta-v2:hover {
  box-shadow:
    0 16px 32px rgba(7,87,215,.32),
    0 1px 0 rgba(255,255,255,.26) inset;
  transform: translateY(-1px);
}
.auth-v2 .cta-v2:active {
  transform: translateY(0) scale(.985);
}
.auth-v2 .cta-spinner {
  border-color: rgba(255,255,255,.32);
  border-top-color: #fff;
}

.auth-v2 .divider {
  margin: 24px 0 17px;
}
.auth-v2 .divider::before,
.auth-v2 .divider::after {
  background: linear-gradient(90deg, transparent, #dbe3ee, transparent);
}
.auth-v2 .divider span {
  color: #98a3b2;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.auth-v2 .social-row {
  gap: 10px;
}
.auth-v2 .social-btn {
  min-height: 50px;
  border-color: #dce4ef;
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  color: #233044;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16,24,40,.03);
}
.auth-v2 .social-btn:hover {
  border-color: #bfcddd;
  background: #fff;
  transform: translateY(-1px);
}
.auth-v2 .auth-foot {
  margin-top: 25px;
  padding: 0;
  color: #7a8797;
  font-size: 13.5px;
}
.auth-v2 .auth-foot a {
  color: var(--v2-blue-deep);
}
.auth-v2 .auth-foot a::after {
  background: var(--v2-blue);
}
.auth-v2 .trust-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  max-width: 440px;
  margin: 30px auto 0;
  padding: 0;
}
.auth-v2 .trust {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8290a1;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
.auth-v2 .trust svg {
  color: var(--v2-blue);
}

/* Toast */
.auth-v2 > .toast-host {
  position: fixed;
  z-index: 100;
  width: min(420px, calc(100% - 32px));
  left: 50%;
  transform: translateX(-50%);
}
.auth-v2 .toast {
  background: rgba(7,17,32,.95);
  border-color: rgba(255,255,255,.12);
}

/* Recovery / invite keeps the same V2 language. */
.auth-v2-recovery {
  display: grid !important;
  place-items: center;
  padding: 24px !important;
}
.auth-v2-recovery .enter {
  position: relative;
  z-index: 2;
  width: min(500px, 100%);
  margin: auto;
  padding: clamp(28px, 5vw, 48px);
  border-radius: 28px;
  color: var(--v2-ink);
  background: rgba(250,252,255,.97);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 32px 90px rgba(0,0,0,.48);
}
.auth-v2-recovery .brand {
  margin: 0 auto;
}
.auth-v2-recovery .brand-word {
  -webkit-text-fill-color: #071120;
  color: #071120;
}
.auth-v2-recovery .brand-voltz {
  border-left-color: #d8e1ec;
}
.auth-v2-recovery .brand-voltz-by {
  color: #7a8797;
}
.auth-v2-recovery .brand-voltz-logo {
  filter: none;
}
.auth-v2-recovery .auth-head {
  margin: 30px 0 26px;
}
.auth-v2-recovery .auth-eyebrow {
  color: var(--v2-blue);
}
.auth-v2-recovery .auth-h1 {
  color: #071120;
  font-family: "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.auth-v2-recovery .auth-sub {
  color: #667085;
}
.auth-v2-recovery .auth-form {
  padding: 0 !important;
}

/* Responsive */
@media (max-width: 900px) {
  /* iOS Safari can exhaust its graphics process when the legacy scene
     combines dozens of animations, giant waves and blend filters. */
  .auth-v2 > .auth-bg {
    display: none !important;
    mix-blend-mode: normal;
  }
  .auth-v2 .auth-shell {
    width: 100%;
    min-height: 100dvh;
    margin: 0;
    grid-template-columns: 1fr;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }
  .auth-v2 .auth-story {
    min-height: auto;
    padding: calc(var(--safe-top) + 22px) 24px 26px;
    background: transparent;
  }
  .auth-v2 .auth-story::before,
  .auth-v2 .auth-story::after,
  .auth-v2 .auth-story-copy,
  .auth-v2 .story-live {
    display: none;
  }
  .auth-v2 .brand {
    margin: 0 auto;
  }
  .auth-v2 .brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }
  .auth-v2 .brand-word {
    font-size: 23px;
  }
  .auth-v2 .auth-panel {
    min-height: calc(100dvh - 98px);
    justify-content: flex-start;
    padding: 34px 22px calc(30px + var(--safe-bottom));
    border-radius: 28px 28px 0 0;
    background:
      radial-gradient(circle at 100% 0%, rgba(22,119,255,.09), transparent 30%),
      #f8faff;
  }
  .auth-v2 .auth-card {
    max-width: 480px;
  }
  .auth-v2 .auth-card-head {
    margin-bottom: 25px;
  }
  .auth-v2 .auth-card-head h2 {
    font-size: 34px;
    letter-spacing: -1px;
  }
  .auth-v2 .trust-row {
    flex-wrap: wrap;
    row-gap: 8px;
    margin-top: 26px;
  }
}

@media (max-width: 420px) {
  .auth-v2 .auth-panel {
    padding-left: 18px;
    padding-right: 18px;
  }
  .auth-v2 .social-row {
    grid-template-columns: 1fr 1fr;
  }
  .auth-v2 .trust-row {
    gap: 12px;
  }
  .auth-v2 .trust {
    font-size: 10px;
  }
  .auth-v2-recovery {
    padding: 0 !important;
  }
  .auth-v2-recovery .enter {
    min-height: 100dvh;
    border-radius: 0;
    padding: calc(var(--safe-top) + 28px) 20px calc(var(--safe-bottom) + 28px);
  }
}

/* Motion and focus */
.auth-v2 :focus-visible {
  outline: 3px solid rgba(22,119,255,.32);
  outline-offset: 3px;
}
html.reduce-motion .auth-v2 *,
html.reduce-motion .auth-v2 *::before,
html.reduce-motion .auth-v2 *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
}
@media (prefers-reduced-motion: reduce) {
  .auth-v2 *,
  .auth-v2 *::before,
  .auth-v2 *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

