/**
 * NeoVault Login / Register — brand theme (Logo/logo.png)
 * Colors: cyan #22d3ee · blue #2563eb · purple #7c3aed
 */
:root {
  --nv-cyan: #22d3ee;
  --nv-cyan-bright: #67e8f9;
  --nv-blue: #2563eb;
  --nv-purple: #7c3aed;
  --nv-purple-deep: #5b21b6;
  --nv-ink: #0b0f1a;
  --nv-muted: #64748b;
  --nv-line: #e2e8f0;
  --nv-bg: #f0f4ff;
  --nv-card: #ffffff;
  --nv-glass: rgba(255, 255, 255, 0.06);
}

html.nv-prelogin,
body.nv-auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--nv-ink);
  background: var(--nv-bg);
  -webkit-font-smoothing: antialiased;
}

body.nv-auth-body a { color: inherit; text-decoration: none; }

.nv-auth-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 1fr);
  min-height: 100vh;
}

/* ── Brand panel (dark, logo colors) ── */
.nv-auth-brand {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 2.75rem;
  color: #fff;
  background: #050508;
}

.nv-auth-brand-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.nv-auth-brand-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 10% 20%, rgba(34, 211, 238, 0.18), transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(124, 58, 237, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 30% at 70% 10%, rgba(37, 99, 235, 0.15), transparent 45%);
}

.nv-auth-brand-grid {
  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: 48px 48px;
  mask-image: linear-gradient(180deg, #000 30%, transparent 95%);
}

.nv-auth-brand-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-height: calc(100vh - 5rem);
}

.nv-auth-logo-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nv-auth-logo-main {
  display: block;
  width: min(100%, 320px);
  height: auto;
  object-fit: contain;
}

.nv-auth-tagline {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  padding-left: 2px;
}

.nv-auth-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 24rem;
  background: linear-gradient(135deg, #fff 0%, var(--nv-cyan-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nv-auth-hero p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: #94a3b8;
  max-width: 26rem;
}

.nv-auth-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  max-width: 26rem;
}

.nv-auth-stat {
  padding: 0.85rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--nv-glass);
  backdrop-filter: blur(8px);
}

.nv-auth-stat b {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--nv-cyan), var(--nv-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nv-auth-stat small {
  font-size: 0.65rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nv-auth-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 26rem;
}

.nv-auth-feat {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: var(--nv-glass);
}

.nv-auth-feat-ic {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(124, 58, 237, 0.25));
  border: 1px solid rgba(34, 211, 238, 0.25);
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.nv-auth-feat b { display: block; font-size: 0.82rem; margin-bottom: 2px; }
.nv-auth-feat p { margin: 0; font-size: 0.76rem; line-height: 1.45; color: #94a3b8; }

.nv-auth-quote {
  margin-top: auto;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.15);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(34, 211, 238, 0.06));
  max-width: 26rem;
}

.nv-auth-quote p {
  margin: 0 0 0.5rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #cbd5e1;
  font-style: italic;
}

.nv-auth-quote-who {
  font-size: 0.72rem;
  color: var(--nv-cyan);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nv-auth-register .nv-auth-quote-default { display: none; }

.nv-auth-recover .nv-auth-quote-default { display: none; }

/* ── Form side ── */
.nv-auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  overflow-y: auto;
  background:
    radial-gradient(900px 500px at 100% 0%, rgba(124, 58, 237, 0.06), transparent 50%),
    radial-gradient(700px 400px at 0% 100%, rgba(34, 211, 238, 0.08), transparent 50%),
    var(--nv-bg);
}

body.nv-auth-register .nv-auth-main {
  align-items: flex-start;
  padding-top: 2.25rem;
  padding-bottom: 2.5rem;
}

.nv-auth-form-outer { width: 100%; max-width: 430px; }

.nv-auth-form-card {
  background: var(--nv-card);
  border: 1px solid var(--nv-line);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(255,255,255,0.8) inset;
  padding: 1.85rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nv-auth-form-logo {
  display: none;
  text-align: center;
  margin-bottom: 0.25rem;
}

.nv-auth-form-logo img {
  height: 44px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  background: #050508;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(34, 211, 238, 0.15);
}

.nv-auth-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--nv-muted);
}

.nv-auth-meta a {
  color: var(--nv-purple);
  font-weight: 600;
}

.nv-auth-meta a:hover { color: var(--nv-blue); }

.nv-auth-head h2 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nv-auth-head p {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--nv-muted);
}

.nv-auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--nv-muted);
}

.nv-auth-divider::before,
.nv-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--nv-line), transparent);
}

.nv-auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nv-auth-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--nv-ink);
}

.nv-auth-fields-row {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 0.75rem;
}

.nv-auth-form-card .form-control,
.nv-auth-form-card .form-select {
  border: 1px solid var(--nv-line);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
  background: #fafbff;
  color: var(--nv-ink);
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.nv-auth-form-card .form-control:focus,
.nv-auth-form-card .form-select:focus {
  border-color: var(--nv-blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.nv-auth-pw-wrap { position: relative; }

.nv-auth-pw-toggle {
  position: absolute;
  right: 10px;
  bottom: 9px;
  border: none;
  background: transparent;
  color: var(--nv-muted);
  cursor: pointer;
  padding: 4px;
}

.nv-auth-pw-toggle .fa-eye { display: none; }
.nv-auth-pw-toggle.active .fa-eye-slash { display: none; }
.nv-auth-pw-toggle.active .fa-eye { display: inline; }

.nv-auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.nv-auth-link {
  color: var(--nv-purple);
  font-weight: 600;
}

.nv-auth-link:hover { color: var(--nv-blue); }

.nv-auth-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--nv-purple) 0%, var(--nv-blue) 50%, var(--nv-cyan) 100%);
  background-size: 200% auto;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
  transition: background-position 0.3s, transform 0.15s;
}

.nv-auth-btn:hover {
  background-position: right center;
  transform: translateY(-1px);
}

a.nv-auth-btn {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  line-height: 1.25;
}

.nv-auth-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.nv-auth-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.5;
}

.nv-auth-val,
.nv-auth-form-card .nv-auth-val {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #b91c1c;
}

.nv-auth-form-card input.form-control,
.nv-auth-form-card textarea.form-control,
.nv-auth-form-card select.form-control {
  width: 100%;
  box-sizing: border-box;
}

.nv-auth-foot {
  text-align: center;
  font-size: 0.82rem;
  color: var(--nv-muted);
}

.nv-auth-foot a {
  color: var(--nv-purple);
  font-weight: 600;
}

.nv-auth-legal {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.78rem;
  color: var(--nv-muted);
}

.nv-auth-legal a:hover { color: var(--nv-purple); }

.nv-auth-pw-rules {
  display: none;
  background: #f8fafc;
  border: 1px solid var(--nv-line);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.78rem;
}

.nv-auth-pw-rules h6 { margin: 0 0 0.35rem; font-size: 0.78rem; }
.nv-auth-pw-rules p { margin: 0.15rem 0; padding-left: 1.25rem; }
.nv-auth-pw-rules .valid { color: #16a34a; }
.nv-auth-pw-rules .invalid { color: #dc2626; }

.nv-auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5, 5, 8, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.nv-auth-modal-panel {
  background: #fff;
  border-radius: 18px;
  max-width: 440px;
  width: 100%;
  padding: 1.75rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.nv-auth-modal-panel img {
  max-width: 200px;
  height: auto;
}

.nv-auth-affiliate-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--nv-muted);
  cursor: pointer;
  padding: 0.35rem 0;
}

.nv-auth-form-card .form-check-input:checked {
  background-color: var(--nv-blue);
  border-color: var(--nv-blue);
}

@media (max-width: 960px) {
  .nv-auth-wrap { grid-template-columns: 1fr; }

  .nv-auth-brand {
    padding: 1.75rem 1.5rem;
    min-height: auto;
  }

  .nv-auth-brand-inner {
    min-height: auto;
    gap: 1.25rem;
  }

  .nv-auth-logo-main { width: min(100%, 260px); }

  .nv-auth-quote,
  .nv-auth-features { display: none; }

  .nv-auth-hero h1 { font-size: 1.35rem; }

  .nv-auth-stats { max-width: none; }

  .nv-auth-form-logo { display: block; }

  .nv-auth-main { padding: 1.5rem 1.25rem 2.5rem; }
}

@media (max-width: 480px) {
  .nv-auth-stats { grid-template-columns: 1fr 1fr; }
  .nv-auth-fields-row { grid-template-columns: 1fr; }
  .nv-auth-form-card { padding: 1.5rem 1.25rem; }
}
