/* ═══════════════════════════════════════════════════
   VAPT Scanner Pro — Auth Pages
   Split-panel design: animated gradient left + clean right
   ═══════════════════════════════════════════════════ */

:root {
  --blue:        #2563EB;
  --blue-dark:   #1d4ed8;
  --blue-light:  #EFF6FF;
  --blue-mid:    #DBEAFE;
  --text:        #1e293b;
  --text-muted:  #64748b;
  --border:      #e2e8f0;
  --bg:          #f1f5f9;
  --white:       #ffffff;
  --red:         #ef4444;
  --green:       #22c55e;
  --shadow:      0 8px 40px rgba(37,99,235,0.13);
}

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

/* ── Body ──────────────────────────────────────── */
body.auth-body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* ═══════════════════════════════════════════════════
   SPLIT CARD WRAPPER
   ═══════════════════════════════════════════════════ */
.auth-card {
  display: flex;
  width: 100%;
  max-width: 960px;
  min-height: 600px;
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: cardFadeUp 0.5s cubic-bezier(0.22, 0.68, 0, 1.15) both;
}

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

/* ═══════════════════════════════════════════════════
   LEFT PANEL — Animated gradient branding
   ═══════════════════════════════════════════════════ */
.auth-left {
  flex: 0 0 42%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem 2.5rem 2rem;
  background: #1a3aaf;
}

/* Animated mesh gradient */
.auth-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 10% 20%, #3b6ef5 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 80%, #1d4ed8 0%, transparent 60%),
    radial-gradient(ellipse 80% 70% at 50% 50%, #2a4fcb 0%, transparent 70%),
    linear-gradient(135deg, #1a40c8 0%, #0d2a9e 100%);
  animation: meshShift 8s ease-in-out infinite alternate;
}

@keyframes meshShift {
  0%   { filter: hue-rotate(0deg) saturate(1.1); }
  50%  { filter: hue-rotate(15deg) saturate(1.3) brightness(1.05); }
  100% { filter: hue-rotate(-10deg) saturate(1.2); }
}

/* Subtle orbs */
.auth-left::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,153,255,0.35) 0%, transparent 70%);
  top: -80px;
  right: -80px;
  animation: orbFloat 6s ease-in-out infinite;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(-20px, 20px) scale(1.08); }
}

.auth-left-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Logo */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
  animation: fadeInDown 0.6s 0.1s both;
}

.auth-logo-box {
  width: 42px;
  height: 42px;
  background: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  animation: logoEntrance 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) both, logoFloat 4s infinite ease-in-out 0.8s;
}
.auth-logo-box:hover {
  transform: translateY(-2px) scale(1.08) rotate(5deg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25), 0 0 12px rgba(255, 255, 255, 0.4);
}
.auth-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}
.auth-logo-box:hover .auth-logo-img {
  transform: scale(1.05);
}
.auth-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.auth-logo-text strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}
.auth-logo-text small {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.5px;
}
@keyframes logoEntrance {
  from {
    transform: scale(0.5) rotate(-15deg);
    opacity: 0;
  }
  to {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}
@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 255, 255, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1);
  }
}

/* Hero headline */
.auth-left-headline {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-left-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
  animation: fadeInUp 0.6s 0.2s both;
}

.auth-left-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  animation: fadeInUp 0.6s 0.3s both;
}

.auth-left-desc {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.65;
  animation: fadeInUp 0.6s 0.4s both;
}

/* Feature pills */
.auth-features {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1.8rem;
  animation: fadeInUp 0.6s 0.5s both;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.88);
}

.auth-feature-dot {
  width: 22px;
  height: 22px;
  background: rgba(255,255,255,0.15);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: #fff;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.2);
}

/* Bottom strip */
.auth-left-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.2rem;
  animation: fadeInUp 0.6s 0.55s both;
}

.auth-trusted {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-trust-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.auth-badge {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
  backdrop-filter: blur(4px);
}

/* ═══════════════════════════════════════════════════
   RIGHT PANEL — Clean form area
   ═══════════════════════════════════════════════════ */
.auth-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 2.5rem 2.8rem;
  overflow-y: auto;
  position: relative;
}

/* Heading area */
.auth-form-header {
  margin-bottom: 2rem;
  animation: fadeInUp 0.5s 0.15s both;
}

.auth-form-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.auth-form-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Form elements ─────────────────────────────── */
.form-group {
  margin-bottom: 1.1rem;
  animation: fadeInUp 0.45s both;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.45rem;
}

.form-group label i {
  color: var(--blue);
  font-size: 0.8rem;
  width: 14px;
  text-align: center;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  appearance: none;
}

.form-group textarea { resize: vertical; min-height: 80px; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3.5px rgba(37,99,235,0.1);
  background: #fafcff;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: #a0aec0; }
.form-group input.error { border-color: var(--red); }
.form-group input.ok    { border-color: var(--green); }

/* Password wrap */
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 2.8rem; }
.pass-wrap .eye-btn {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.2rem;
  transition: color 0.2s;
}
.pass-wrap .eye-btn:hover { color: var(--blue); }

/* Forgot link */
.forgot-link {
  display: block;
  text-align: right;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: 0.35rem;
  transition: opacity 0.2s;
}
.forgot-link:hover { opacity: 0.75; text-decoration: underline; }

/* Primary button */
.btn-primary {
  width: 100%;
  padding: 0.85rem;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 3px 12px rgba(37,99,235,0.28);
  letter-spacing: 0.01em;
}
.btn-primary:hover {
  background: var(--blue-dark);
  box-shadow: 0 5px 18px rgba(37,99,235,0.38);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

/* Secondary button */
.btn-secondary {
  width: 100%;
  padding: 0.85rem;
  background: var(--white);
  color: var(--blue);
  border: 1.5px solid var(--blue);
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.2s, transform 0.15s;
  margin-bottom: 0.6rem;
}
.btn-secondary:hover { background: var(--blue-light); transform: translateY(-1px); }

/* Button row */
.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}
.btn-row .btn-secondary,
.btn-row .btn-primary { width: 100%; margin-bottom: 0; }

/* ── Alerts ────────────────────────────────────── */
.error-msg {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--red);
  padding: 0.65rem 0.9rem;
  border-radius: 9px;
  font-size: 0.835rem;
  margin-bottom: 1.1rem;
  display: none;
  align-items: center;
  gap: 0.5rem;
}
.error-msg.show { display: flex; }

.success-msg {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 0.65rem 0.9rem;
  border-radius: 9px;
  font-size: 0.835rem;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Dividers & notes ──────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: #94a3b8;
  font-size: 0.78rem;
  margin-top: 1.2rem;
}

.signup-note, .signin-note {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 1rem;
}
.signup-note a, .signin-note a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}
.signup-note a:hover, .signin-note a:hover { text-decoration: underline; }

/* ── Steps indicator ───────────────────────────── */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.6rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  flex: 1;
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 13px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
  transition: background 0.4s;
}
.step.active:not(:last-child)::after,
.step.done:not(:last-child)::after { background: var(--blue); }

.step-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  transition: all 0.3s;
}
.step.active .step-dot { border-color: var(--blue); background: var(--blue); color: #fff; }
.step.done .step-dot   { border-color: var(--green); background: var(--green); color: #fff; }

.step-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }
.step.active .step-label { color: var(--blue); font-weight: 600; }
.step.done .step-label   { color: var(--green); }

/* ── Step panels ───────────────────────────────── */
.step-panel { display: none; }
.step-panel.active { display: block; animation: fadeInUp 0.3s both; }

/* ── Form rows ─────────────────────────────────── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

/* ── Select wrap ───────────────────────────────── */
.select-wrap { position: relative; }
.select-wrap::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.68rem;
  pointer-events: none;
}

/* ── Terms ─────────────────────────────────────── */
.terms-check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-bottom: 1.2rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.terms-check input[type="checkbox"] {
  width: 16px; height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--blue);
}
.terms-check a { color: var(--blue); text-decoration: none; }
.terms-check a:hover { text-decoration: underline; }

/* ── Password strength ─────────────────────────── */
.strength-bar {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.strength-bar span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}
.strength-bar.s1 span:nth-child(1) { background: #ef4444; }
.strength-bar.s2 span:nth-child(-n+2) { background: #f97316; }
.strength-bar.s3 span:nth-child(-n+3) { background: #eab308; }
.strength-bar.s4 span { background: #22c55e; }

.strength-text { font-size: 0.74rem; margin-top: 4px; font-weight: 500; }

/* ── OTP inputs ────────────────────────────────── */
.otp-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}
.otp-row input {
  width: 48px; height: 54px;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
}
.otp-row input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.otp-row input.filled {
  border-color: var(--blue);
  background: var(--blue-light);
}

/* ── OTP timer ─────────────────────────────────── */
.otp-timer {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 0.5rem;
}
.otp-timer span { color: var(--blue); font-weight: 600; }

/* ── Verify step ───────────────────────────────── */
.verify-icon {
  width: 70px; height: 70px;
  background: var(--blue-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.8rem;
  color: var(--blue);
}
.verify-info { text-align: center; margin-bottom: 1.5rem; }
.verify-info h3 { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 0.4rem; }
.verify-info p  { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
.verify-info .email-highlight { color: var(--blue); font-weight: 600; }

.resend-link { text-align: center; font-size: 0.83rem; color: var(--text-muted); margin-top: 0.8rem; }
.resend-link button {
  background: none; border: none;
  color: var(--blue); font-weight: 600;
  cursor: pointer; font-size: 0.83rem;
  font-family: 'DM Sans', sans-serif;
}
.resend-link button:hover { text-decoration: underline; }

/* ── Feature strip ─────────────────────────────── */
.feature-strip {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin: 0 auto 1.4rem;
  flex-wrap: wrap;
}
.feature-badge {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--blue-light);
  color: var(--blue);
  border-radius: 6px;
  padding: 0.28rem 0.6rem;
  font-size: 0.73rem;
  font-weight: 600;
}

/* ── Section label ─────────────────────────────── */
.section-label {
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.7rem;
}

/* ── Field hint ────────────────────────────────── */
.field-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ── Logout spinner ────────────────────────────── */
.spinner {
  width: 44px; height: 44px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.3rem;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s;
}
.btn-back:hover { border-color: var(--blue); color: var(--blue); }

/* ── Keyframes ─────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */

/* Large screens — no change needed, scales naturally */

/* Tablet / smaller laptop */
@media (max-width: 860px) {
  .auth-card {
    flex-direction: column;
    max-width: 520px;
    min-height: unset;
    border-radius: 20px;
  }

  .auth-left {
    flex: none;
    padding: 1.8rem 2rem 1.5rem;
    min-height: 200px;
  }

  .auth-left-title { font-size: 1.55rem; }

  .auth-left::after { width: 200px; height: 200px; top: -40px; right: -40px; }

  .auth-features { flex-direction: row; flex-wrap: wrap; margin-top: 1.2rem; }

  .auth-right {
    padding: 2rem 2rem 2rem;
  }

  .auth-form-header h1 { font-size: 1.5rem; }
}

/* Mobile (≤ 540px) */
@media (max-width: 540px) {
  body.auth-body { padding: 0; align-items: flex-start; min-height: 100vh; min-height: 100dvh; }

  .auth-card {
    border-radius: 0;
    min-height: 100vh;
    min-height: 100dvh;
    box-shadow: none;
    max-width: 100%;
  }

  .auth-left {
    padding: 1.5rem 1.5rem 1.2rem;
    min-height: 180px;
  }

  .auth-left-title { font-size: 1.4rem; }
  .auth-left-desc  { display: none; }
  .auth-left-footer { display: none; }

  .auth-right {
    padding: 1.6rem 1.4rem 2rem;
  }

  .auth-form-header h1 { font-size: 1.35rem; }

  .form-row { grid-template-columns: 1fr; }
  .btn-row  { grid-template-columns: 1fr; }
  .otp-row input { width: 42px; height: 48px; font-size: 1.2rem; }

  .auth-logo span { font-size: 0.9rem; }
  .auth-left-title { font-size: 1.25rem; }
  .auth-trust-badges { display: none; }
}

/* iPhone Pro Max & large phones (≤ 430px) */
@media (max-width: 430px) {
  .auth-left { min-height: 160px; }
  .auth-features { display: none; }
}

/* Micro screens */
@media (max-width: 380px) {
  .auth-right { padding: 1.3rem 1rem 1.8rem; }
  .auth-left { padding: 1.2rem 1rem 1rem; }
}

/* MacBook / large desktops — ensure 85% → 100% scale consistency */
@media (min-width: 1280px) {
  .auth-card { max-width: 1000px; }
  .auth-left { flex: 0 0 40%; }
  .auth-left-title { font-size: 2.1rem; }
  .auth-right { padding: 3rem 3.2rem; }
  .auth-form-header h1 { font-size: 1.9rem; }
}

@media (min-width: 1440px) {
  .auth-card { max-width: 1060px; }
  .auth-left-title { font-size: 2.25rem; }
}