/* ── NexA Authentication — Design System v4 ──────────────────
   Matches the chat page (nexa-main.css) colour system exactly.
   Dark-first · Pitch black · Indigo accent · Outfit + JetBrains Mono
   Fully self-contained — no inline style dependencies.              */

/* Fonts are self-hosted in /vendor/fonts.css; keep login usable offline. */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design Tokens (matching nexa-main.css exactly) ── */
:root {
  --primary:        #625BEE;
  --primary-strong: #4F46E5;
  --accent:         #6B6EF3;
  --accent2:        #8E8BFF;

  --bg:       #000000;
  --bg2:      #0A0A0C;
  --bg3:      #121216;
  --surface:  #0A0A0C;
  --surface2: #121216;
  --border:   #1C1C20;
  --border2:  #2A2A30;

  --text:     #FFFFFF;
  --text2:    #E2E8F0;
  --text3:    #A0AEC0;

  --sans:     'Outfit', system-ui, sans-serif;
  --mono:     'JetBrains Mono', 'Fira Code', monospace;
  --sans-bn:  'Hind Siliguri', 'Noto Sans Bengali', system-ui, sans-serif;

  --radius:    18px;
  --radius-sm: 10px;
  --ease:      cubic-bezier(.16, 1, .3, 1);
  --shadow:    0 8px 32px rgba(0,0,0,0.85);
}


/* ── Base ── */

html, body {
  height: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
}

body {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--sans);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--text);
  animation: fadeInPage 0.3s ease-out forwards;
}

body.page-exit {
  opacity: 0 !important;
  transition: opacity 0.2s ease-out !important;
}

@keyframes fadeInPage {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

::selection {
  background: rgba(98, 91, 238, .25);
  color: #fff;
}


/* ── Background Orbs ── */

.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
}

.orb-1 {
  width: clamp(300px, 35vw, 550px);
  height: clamp(300px, 35vw, 550px);
  background: radial-gradient(circle, rgba(98,91,238,0.30), transparent 70%);
  top: -15%;
  right: -8%;
  animation: o1 22s ease-in-out infinite;
}

.orb-2 {
  width: clamp(250px, 28vw, 450px);
  height: clamp(250px, 28vw, 450px);
  background: radial-gradient(circle, rgba(107,110,243,0.18), transparent 70%);
  bottom: -10%;
  left: -5%;
  animation: o2 28s ease-in-out infinite;
}

.orb-3 {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(142,139,255,0.08), transparent 70%);
  top: 50%;
  left: 40%;
  animation: o3 18s ease-in-out infinite;
}

@keyframes o1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-50px,60px) scale(1.08); } }
@keyframes o2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(50px,-50px) scale(1.1); } }
@keyframes o3 { 0%,100% { transform: translate(-50%,-50%) scale(1); } 50% { transform: translate(calc(-50% + 30px),calc(-50% - 30px)) scale(1.15); } }


/* ── Layout — split panel ── */

.layout {
  display: grid;
  grid-template-columns: 1fr clamp(380px, 34vw, 540px);
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  z-index: 1;
}


/* ── Left Panel ── */

.left-panel {
  min-height: 100dvh;
  padding: clamp(40px, 6vh, 100px) clamp(32px, 5vw, 120px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(10, 10, 12, 0.5);
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.left-panel::after {
  content: "";
  position: absolute;
  width: clamp(280px, 28vw, 500px);
  height: clamp(280px, 28vw, 500px);
  right: -22%;
  bottom: -22%;
  border: 1px solid rgba(98,91,238,0.06);
  border-radius: 50%;
  box-shadow: 0 0 0 40px rgba(98,91,238,0.015), 0 0 0 80px rgba(98,91,238,0.006);
  pointer-events: none;
}

.left-panel > * { position: relative; z-index: 1; }
.left-panel > div,
.left-panel > h1,
.left-panel > p { width: min(100%, 560px); }


/* ── Brand ── */

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(36px, 5vh, 80px);
}

.brand-logo, .ml-icon {
  width: clamp(38px, 3vw, 48px);
  height: clamp(38px, 3vw, 48px);
  border-radius: 14px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(98,91,238,0.15), 0 8px 20px rgba(0,0,0,0.5);
}

.brand-logo img, .ml-icon img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 5px;
  box-sizing: border-box;
}

.brand-name {
  font-size: clamp(19px, 1.5vw, 24px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.04em;
}

.brand-name span, .ml-name span {
  color: var(--accent);
}


/* ── Hero Tag ── */

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  margin-bottom: clamp(16px, 2vh, 24px);
  border-radius: 100px;
  background: rgba(98,91,238,0.08);
  border: 1px solid rgba(98,91,238,0.15);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.hero-dot {
  width: 6px; height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.8); }
}


/* ── Hero Title ── */

.hero-title {
  max-width: 560px;
  margin-bottom: clamp(14px, 2vh, 22px);
  color: #fff;
  font-size: clamp(30px, 3.8vw, 64px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ── Hero Sub ── */

.hero-sub {
  max-width: 440px;
  margin-bottom: clamp(28px, 3vh, 44px);
  color: var(--text3);
  font-size: clamp(14px, 1.1vw, 18px);
  line-height: 1.7;
}


/* ── Exam Pills ── */

.exam-pills {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(6px, 0.5vw, 10px);
  margin-bottom: clamp(24px, 3vh, 36px);
  max-width: 480px;
}

.exam-pill {
  padding: 5px clamp(12px, 1vw, 16px);
  border: 1px solid rgba(98,91,238,0.14);
  border-radius: 100px;
  background: rgba(98,91,238,0.06);
  color: var(--text2);
  font-family: var(--mono);
  font-size: clamp(10px, 0.75vw, 13px);
  font-weight: 600;
  letter-spacing: .02em;
  transition: all .2s var(--ease);
  cursor: default;
  user-select: none;
}

.exam-pill:hover {
  background: rgba(98,91,238,0.12);
  border-color: rgba(98,91,238,0.28);
  color: #fff;
  transform: translateY(-1px);
}


/* ── Social Proof ── */

.social-proof {
  display: flex;
  align-items: center;
  gap: clamp(16px, 1.5vw, 28px);
}

.social-proof__metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.social-proof__number {
  color: #fff;
  font-size: clamp(16px, 1.3vw, 24px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.social-proof__label {
  color: var(--text3);
  font-size: clamp(10px, 0.75vw, 13px);
  font-weight: 500;
}

.social-proof__dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--border2);
  flex-shrink: 0;
}


/* ── Right Panel ── */

.right-panel {
  width: auto;
  min-height: 100dvh;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 5vh, 80px) clamp(28px, 3vw, 56px);
  background: var(--surface);
  border-left: 1px solid var(--border);
  overflow-y: auto;
}


/* ── Form Box ── */

.form-box {
  width: 100%;
  max-width: clamp(320px, 22vw, 400px);
  animation: fadeUp 0.5s var(--ease) both;
}

.form-title {
  margin-bottom: 6px;
  color: #fff;
  font-size: clamp(24px, 2vw, 34px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.form-sub {
  margin-bottom: clamp(20px, 2vh, 28px);
  color: var(--text3);
  font-size: clamp(13px, 0.9vw, 16px);
  line-height: 1.5;
}


/* ── Google Button ── */

.google-wrap {
  display: flex;
  justify-content: center;
  min-height: 44px;
  margin-bottom: clamp(14px, 1.5vh, 20px);
}

.google-wrap > div { width: 100%; }

.local-google-note {
  display: none;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  margin: -6px 0 16px;
}

html.local-runtime .google-wrap { display: none; }
html.local-runtime .local-google-note { display: block; }


/* ── Divider ── */

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(14px, 1.5vh, 20px);
  color: var(--text3);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}


/* ── Form Fields ── */

.field {
  margin-bottom: clamp(12px, 1.2vh, 16px);
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--text3);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.field label span {
  color: var(--text3) !important;
  font-weight: 400 !important;
  font-size: 10px !important;
  text-transform: lowercase !important;
  opacity: 0.7;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
  transition:
    border-color .15s var(--ease),
    box-shadow .15s var(--ease),
    background .15s var(--ease);
}

.field input:focus {
  border-color: var(--primary);
  background: rgba(98,91,238,0.04);
  box-shadow: 0 0 0 3px rgba(98,91,238,0.12);
}

.field input::placeholder {
  color: rgba(160, 174, 192, 0.4);
  font-weight: 400;
}


/* ── Primary Button ── */

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 14px;
  margin-top: 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(98,91,238,0.30);
  transition:
    transform .15s var(--ease),
    box-shadow .15s var(--ease);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(98,91,238,0.45);
}

.btn-primary:active:not(:disabled) {
  transform: scale(.98);
  box-shadow: 0 4px 12px rgba(98,91,238,0.20);
  transition-duration: .05s;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}


/* ── Links ── */

.form-toggle {
  text-align: center;
  margin-top: 18px;
  color: var(--text3);
  font-size: 13px;
}

.form-toggle a,
.resend-row a,
.form-box a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color .15s var(--ease);
}

.form-toggle a:hover,
.resend-row a:hover,
.form-box a:hover {
  color: var(--accent2);
}

/* Forgot password link */
.form-box a[data-login-action="toggle-view"][data-view="forgotView"] {
  color: var(--text3) !important;
  font-size: 13px !important;
  font-weight: 500;
}
.form-box a[data-login-action="toggle-view"][data-view="forgotView"]:hover {
  color: var(--accent) !important;
}


/* ── OTP ── */

.otp-label {
  margin-bottom: 16px;
  color: var(--text3);
  font-size: 14px;
  line-height: 1.5;
}

.otp-label strong {
  color: var(--text);
  font-weight: 600;
}

.otp-boxes {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 18px 0;
}

.otp-box {
  width: 48px;
  height: 56px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--mono);
  outline: none;
  transition:
    border-color .12s var(--ease),
    box-shadow .12s var(--ease),
    background .12s var(--ease),
    transform .12s var(--ease);
}

.otp-box:focus {
  border-color: var(--primary);
  background: rgba(98,91,238,0.06);
  box-shadow: 0 0 0 3px rgba(98,91,238,0.12);
  transform: scale(1.03);
}

.otp-box.filled {
  border-color: var(--accent);
  background: rgba(98,91,238,0.06);
}

.resend-row {
  text-align: center;
  font-size: 13px;
  color: var(--text3);
  margin-top: 14px;
}

#resendTimer {
  font-family: var(--mono);
  font-size: 12px;
}


/* ── Toast ── */

#toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  padding: 13px 24px;
  border-radius: 14px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 13px;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s var(--ease);
  white-space: nowrap;
  background: linear-gradient(135deg, #625BEE, #4F46E5);
  color: #fff;
  box-shadow: 0 12px 40px rgba(98,91,238,0.45), 0 4px 12px rgba(0,0,0,0.5);
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#toast.success {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 12px 40px rgba(16,185,129,0.35), 0 4px 12px rgba(0,0,0,0.5);
}

#toast.info {
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  box-shadow: 0 12px 40px rgba(59,130,246,0.35), 0 4px 12px rgba(0,0,0,0.5);
}


/* ── View Show/Hide ── */

.view {
  display: none;
}

.view.active {
  display: block;
  animation: authViewEnter .3s var(--ease) both;
}

html.gsap-ready .view.active {
  animation: none;
}

@keyframes authViewEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ── Password Strength ── */

#strengthBar { border-radius: 4px !important; }
#strengthLabel {
  font-family: var(--mono) !important;
  font-size: 10px !important;
  letter-spacing: .03em;
}


/* ── Terms text ── */

.form-box div[style*="font-size:11px"] {
  font-size: 11px !important;
  color: var(--text3) !important;
}
.form-box div[style*="font-size:11px"] a {
  font-weight: 600 !important;
}


/* ── Mobile Logo (hidden on desktop) ── */

.mobile-logo { display: none; }


/* ═══════════════════════════════════════════
   Responsive — Mobile (≤800px)
   ═══════════════════════════════════════════ */

@media (max-width: 800px) {
  html, body {
    height: auto;
    overflow: auto;
  }

  body {
    display: block;
    min-height: 100dvh;
  }

  .bg-canvas { position: fixed; }
  .left-panel { display: none; }

  .layout {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
  }

  .right-panel {
    flex: 1;
    width: 100%;
    min-height: 100dvh;
    padding: clamp(28px, 6vw, 40px) clamp(20px, 5vw, 32px) calc(clamp(28px, 6vw, 40px) + env(safe-area-inset-bottom));
    display: flex;
    align-items: flex-start;
    justify-content: center;
    border-left: none;
  }

  .form-box {
    max-width: 420px;
    margin: 0 auto;
  }

  .mobile-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: clamp(24px, 6vw, 40px);
  }

  .ml-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 24px rgba(98,91,238,0.25);
  }

  .ml-icon img { padding: 4px; }

  .ml-name {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
  }

  .ml-sub {
    color: var(--text3);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .06em;
    margin-top: 1px;
  }

  .form-title { font-size: clamp(22px, 6vw, 28px); }
  .form-sub   { font-size: 13px; }

  .field input {
    min-height: 48px;
    font-size: 16px; /* prevents iOS zoom */
    border-radius: 12px;
  }

  .btn-primary {
    min-height: 50px;
    font-size: 15px;
    border-radius: 12px;
  }

  .otp-box {
    width: calc((100% - 35px) / 6);
    max-width: 52px;
    height: clamp(48px, 14vw, 58px);
    font-size: clamp(18px, 5vw, 22px);
    border-radius: 12px;
  }

  .otp-boxes { gap: 7px; }

  #signupForm > div[style*="display:flex"] {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px !important;
  }

  #toast {
    left: 16px;
    right: 16px;
    transform: translateY(-20px);
    white-space: normal;
    text-align: center;
  }
  #toast.show { transform: translateY(0); }
}

/* Very small phones */
@media (max-width: 380px) {
  .right-panel { padding-inline: 16px; }
  .form-title { font-size: 21px; }
  #signupForm > div[style*="display:flex"] { grid-template-columns: 1fr; }
  .otp-box { height: 46px; }
}

/* Large screens (1920px+) */
@media (min-width: 1920px) {
  .left-panel {
    padding: clamp(80px, 8vh, 140px) clamp(80px, 7vw, 160px);
  }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* ================================================================
   NexA Login Refresh v5
   Direction: dark editorial study studio + quiet ivory auth surface.
   The auth flow and existing DOM contracts remain unchanged.
   ================================================================ */

:root {
  --primary: #7068ff;
  --primary-strong: #5d54ed;
  --accent: #8a83ff;
  --accent2: #b0aaff;
  --bg: #08080b;
  --bg2: #0d0d12;
  --bg3: #15151b;
  --surface: #f5f4f0;
  --surface2: #ffffff;
  --border: #dedee5;
  --border2: #c8c8d2;
  --text: #181820;
  --text2: #4a4a58;
  --text3: #747484;
  --ink-on-dark: #f8f7fb;
  --sans: 'Outfit', 'Noto Sans Bengali', system-ui, sans-serif;
  --sans-bn: 'Noto Sans Bengali', 'Nirmala UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  --radius: 20px;
  --radius-sm: 12px;
}

body { background: var(--bg); color: var(--ink-on-dark); font-family: var(--sans); }

.bg-canvas {
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    radial-gradient(circle at 76% 17%, rgba(112,104,255,.16), transparent 31%),
    radial-gradient(circle at 14% 90%, rgba(112,104,255,.08), transparent 26%);
  background-size: 64px 64px, 64px 64px, auto, auto;
  opacity: .9;
}

.bg-canvas::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 28%, rgba(0,0,0,.56) 100%);
}

.orb { filter: blur(140px); opacity: .08; }
.orb-1 { background: #7068ff; }
.orb-2 { background: #8a83ff; }
.orb-3 { background: #b0aaff; }

.layout { grid-template-columns: minmax(0, 1.2fr) minmax(410px, .8fr); }

.left-panel {
  justify-content: flex-start;
  padding: clamp(36px, 5vw, 88px) clamp(32px, 7vw, 132px);
  background: rgba(8,8,11,.42);
  border-right: 1px solid rgba(255,255,255,.09);
}

.brand { margin-bottom: clamp(48px, 8vh, 96px); }
.brand-logo, .ml-icon { border-radius: 14px; box-shadow: 0 0 0 1px rgba(138,131,255,.24), 0 12px 30px rgba(0,0,0,.42); }
.brand-name { font-size: clamp(20px, 1.6vw, 25px); letter-spacing: -.055em; }

.hero-tag {
  align-self: flex-start;
  padding: 8px 13px;
  margin-bottom: 22px;
  background: rgba(112,104,255,.09);
  border: 1px solid rgba(138,131,255,.25);
  color: #aaa5ff;
  font-size: 10px;
  letter-spacing: .16em;
}

.hero-title {
  max-width: 720px;
  margin-bottom: 22px;
  font-size: clamp(38px, 5.2vw, 78px);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.065em;
}

.hero-title em { color: #928cff; background: none; -webkit-text-fill-color: currentColor; }
.hero-sub { max-width: 560px; margin-bottom: 34px; color: #a6a5b2; font-size: clamp(15px, 1.2vw, 18px); line-height: 1.65; }
.exam-pills { max-width: 620px; margin-bottom: 42px; gap: 8px; }
.exam-pill { padding: 7px 12px; background: rgba(255,255,255,.035); border-color: rgba(255,255,255,.12); color: #d8d7df; font-family: var(--sans); font-size: 11px; letter-spacing: .01em; }
.exam-pill:hover { background: rgba(138,131,255,.12); border-color: rgba(138,131,255,.36); }
.social-proof { gap: 22px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.09); }
.social-proof__number { font-size: clamp(18px, 1.55vw, 25px); }
.social-proof__label { color: #898894; font-size: 11px; }

.right-panel {
  align-items: center;
  padding: clamp(28px, 5vh, 70px) clamp(24px, 4vw, 72px);
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    radial-gradient(circle at 72% 12%, rgba(112,104,255,.18), transparent 28%),
    radial-gradient(circle at 18% 88%, rgba(112,104,255,.09), transparent 28%),
    #09090d;
  background-size: 56px 56px, 56px 56px, auto, auto, auto;
  border-left: 1px solid rgba(255,255,255,.08);
}

.form-box {
  max-width: 440px;
  padding: clamp(28px, 3vw, 44px);
  border: 1px solid rgba(20,20,30,.08);
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0,0,0,.48), 0 0 0 1px rgba(255,255,255,.48), 0 2px 4px rgba(0,0,0,.08);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.form-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 14%;
  right: 14%;
  height: 3px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(90deg, transparent, #7068ff 22%, #a39dff 78%, transparent);
  opacity: .9;
}

.form-box::after {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  top: -150px;
  right: -115px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(112,104,255,.12), transparent 68%);
  pointer-events: none;
  z-index: -1;
}

.form-box > .view,
.form-box > .mobile-logo { position: relative; z-index: 1; }

.mobile-logo { color: var(--text); }
.form-title { color: #171720; font-size: clamp(28px, 2.4vw, 38px); letter-spacing: -.055em; }
.form-title::before {
  content: 'NEXA AI  /  ACCOUNT ACCESS';
  display: block;
  margin-bottom: 14px;
  color: #7772e6;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1;
  text-transform: uppercase;
}
.form-sub { color: #777783; margin-bottom: 26px; }
.local-google-note {
  padding: 10px 12px;
  border: 1px solid rgba(112,104,255,.16);
  border-left: 3px solid #817aff;
  border-radius: 10px;
  background: #faf9ff;
  color: #777783;
  font-size: 11px;
  line-height: 1.55;
  text-align: left;
}
.divider { color: #93939e; }
.divider::before, .divider::after { background: #e5e4e8; }

.field label { color: #555562; font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .01em; text-transform: none; }
.field label span { color: #9898a2 !important; font-family: var(--sans); font-size: 11px !important; text-transform: none !important; }
.field input { min-height: 52px; border-color: #dedee5; border-radius: 12px; background: #fafafc; color: #181820; }
.field input:hover { border-color: #c9c8d2; background: #fff; }
.field input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(112,104,255,.13); }
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
  -webkit-text-fill-color: #181820;
  -webkit-box-shadow: 0 0 0 1000px #fafafc inset;
  transition: background-color 9999s ease-out;
}
.field input::placeholder { color: #aaaab4; }

.btn-primary { min-height: 52px; margin-top: 10px; border-radius: 12px; background: #6158ee; box-shadow: 0 10px 22px rgba(97,88,238,.22); position: relative; overflow: hidden; }
.btn-primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.18) 45%, transparent 65%); transform: translateX(-120%); transition: transform .55s var(--ease); pointer-events: none; }
.btn-primary:hover:not(:disabled)::after { transform: translateX(120%); }
.btn-primary:hover:not(:disabled) { background: #554ce0; box-shadow: 0 14px 28px rgba(97,88,238,.28); }
.form-toggle { color: #777783; }
.form-box a { color: #5d54db; }
.form-box a:hover { color: #4139bd; }
.form-box a[data-login-action="toggle-view"][data-view="forgotView"] { color: #767681 !important; }
.form-box a[data-login-action="toggle-view"][data-view="forgotView"]:hover { color: #5d54db !important; }
.otp-label { color: #777783; }
.otp-label strong { color: #181820; }
.otp-box { border-color: #dedee5; background: #fafafc; color: #181820; }
.otp-box:focus, .otp-box.filled { border-color: var(--primary); background: #fff; }
.resend-row { color: #777783; }
.mobile-logo { margin-bottom: 30px; }
.ml-name { color: #181820; }
.ml-sub { color: #858592; font-family: var(--sans); letter-spacing: .02em; }
.form-box div[style*="font-size:11px"] { color: #858592 !important; }

@media (max-width: 1050px) and (min-width: 801px) {
  .layout { grid-template-columns: minmax(0, 1fr) minmax(360px, 410px); }
  .left-panel { padding-inline: 48px; }
  .hero-title { font-size: clamp(42px, 5vw, 62px); }
}

@media (max-width: 1120px) and (min-width: 801px) {
  .layout { grid-template-columns: minmax(0, 1fr) minmax(360px, 40vw); }
  .left-panel { padding-left: clamp(32px, 5vw, 64px); padding-right: 28px; }
  .left-panel > * { width: min(100%, 620px); }
  .hero-title { font-size: clamp(38px, 4.6vw, 56px); }
  .hero-sub { max-width: 500px; }
}

@media (max-width: 800px) {
  .bg-canvas { background-size: 48px 48px, 48px 48px, auto, auto; }
  .right-panel { min-height: 100dvh; padding: 24px 18px calc(28px + env(safe-area-inset-bottom)); background-color: #09090d; }
  .form-box { max-width: 520px; padding: 26px 20px; border-radius: 20px; }
  .mobile-logo { display: flex; }
  .form-title { font-size: clamp(28px, 8vw, 36px); }
  .form-title::before { margin-bottom: 12px; font-size: 8px; letter-spacing: .13em; }
}

/* Stack the auth flow before the two-column layout becomes cramped. */
@media (min-width: 801px) and (max-width: 960px) {
  html, body {
    height: auto;
    overflow: auto;
  }

  body {
    display: block;
    min-height: 100dvh;
  }

  .left-panel { display: none; }

  .layout {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
  }

  .right-panel {
    width: 100%;
    min-height: 100dvh;
    padding: 32px 24px 40px;
    border-left: none;
  }

  .form-box {
    max-width: 520px;
  }

  .mobile-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
  }
}

/* Keep the split layout fully visible on short desktop viewports at 100% zoom. */
@media (min-width: 801px) and (max-height: 920px) {
  .left-panel {
    padding-top: clamp(28px, 4vh, 52px);
    padding-bottom: clamp(28px, 4vh, 52px);
  }

  .brand { margin-bottom: clamp(28px, 4vh, 48px); }

  .hero-title {
    max-width: 820px;
    margin-bottom: 16px;
    font-size: clamp(42px, 4.2vw, 68px);
  }

  .hero-sub {
    max-width: 560px;
    margin-bottom: 22px;
    font-size: clamp(14px, 1vw, 16px);
    line-height: 1.5;
  }

  .exam-pills {
    margin-bottom: 24px;
  }

  .social-proof {
    padding-top: 16px;
  }
}
