/* ══════════════════════════════════════════════════════════════════════════
   Auth v2 — tema espacial "Nocturne" para las pantallas de autenticación
   (login y recuperar contraseña). Fuente: design_handoff_venvers_auth.
   Todo el tema vive bajo .vv2 para no afectar al resto del sitio; solo las
   reglas de body/keyframes son globales porque estas vistas no usan el
   layout general.
   ══════════════════════════════════════════════════════════════════════ */

body.vv2-body { margin: 0; padding: 0; background: #120d30; }

.vv2 {
  --vv2-bg: #120d30;
  --vv2-text: #f0edfa;
  --vv2-accent: #9d75ff;
  --vv2-accent-100: #efe9ff;
  --vv2-accent-200: #d9c9ff;
  --vv2-accent-300: #c0a2ff;
  --vv2-accent-600: #7c4df0;
  --vv2-accent-700: #53309c;
  --vv2-accent-800: #33205f;
  --vv2-divider: rgba(200, 180, 255, 0.16);
  --vv2-border: rgba(180, 150, 255, 0.18);
  /* Tokens del resto de la paleta (antes hexes quemados): permiten que un tema
     por dominio (wwwroot/css/temas/*.css) repinte el login completo. */
  --vv2-link: #b79bff;
  --vv2-link-hover: #d3c2ff;
  --vv2-grad-a: #7c4dff;              /* gradiente de botones */
  --vv2-grad-b: #b06bff;
  --vv2-grad-lang: #a05df5;           /* extremo del switch de idioma */
  --vv2-brillo-rgb: 130, 80, 255;     /* glow de botones (tripleta RGB) */
  --vv2-brillo2-rgb: 150, 100, 255;
  --vv2-halo: rgba(157, 117, 255, 0.3);      /* selección y anillo del planeta */
  --vv2-nebulosa-1: rgba(74, 47, 158, 0.55); /* lavados del cielo de fondo */
  --vv2-nebulosa-2: rgba(42, 30, 99, 0.6);
  --vv2-planeta-lg: rgba(83, 48, 156, 0.8);
  --vv2-planeta-sm: rgba(51, 32, 95, 0.85);
  --vv2-carta-a: rgba(60, 40, 120, 0.38);    /* gradiente de la tarjeta */
  --vv2-carta-b: rgba(28, 18, 64, 0.55);
  --vv2-input-bg: rgba(16, 10, 42, 0.45);
  --vv2-input-border: rgba(180, 150, 255, 0.2);
  --vv2-lang-bg: rgba(30, 20, 70, 0.55);
  --vv2-aviso-bg: rgba(51, 32, 95, 0.55);
  --vv2-aviso-border: rgba(157, 117, 255, 0.4);

  min-height: 100vh;
  position: relative;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--vv2-text);
  background:
    radial-gradient(1100px 750px at 88% 100%, var(--vv2-nebulosa-1), transparent 62%),
    radial-gradient(800px 600px at 8% 0%, var(--vv2-nebulosa-2), transparent 60%),
    var(--vv2-bg);
}
.vv2 *, .vv2 *::before, .vv2 *::after { box-sizing: border-box; }

.vv2 a { color: var(--vv2-link); text-decoration: none; text-underline-offset: 3px; }
.vv2 a:hover { color: var(--vv2-link-hover); }
.vv2 :focus { outline: none; }
.vv2 :focus-visible { outline: 2px solid var(--vv2-accent); outline-offset: 2px; }
.vv2 ::selection { background: var(--vv2-halo); }

/* — animaciones — */
@keyframes vv2Float  { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes vv2Twinkle{ 0%, 100% { opacity: .85; } 50% { opacity: .15; } }
@keyframes vv2Rise   { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes vv2Orbit  { from { transform: rotate(-24deg) scaleY(0.42) rotate(0); } to { transform: rotate(-24deg) scaleY(0.42) rotate(360deg); } }
@keyframes vv2Glow   { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes vv2Comet  {
  0%   { transform: translate(-380px, -190px) rotate(26deg); opacity: 0; }
  8%   { opacity: .9; }
  22%  { transform: translate(0, 0) rotate(26deg); opacity: 0; }
  100% { transform: translate(0, 0) rotate(26deg); opacity: 0; }
}

/* — cielo: estrellas, cometa, planetas — */
.vv2-sky { position: absolute; inset: 0; pointer-events: none; }
.vv2-star {
  position: absolute; border-radius: 50%;
  background: var(--vv2-accent-100);
  animation: vv2Twinkle ease-in-out infinite;
}
.vv2-comet {
  position: absolute; top: 12%; right: 18%;
  width: 90px; height: 1.5px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--vv2-accent-200));
  animation: vv2Comet 11s ease-in 2s infinite;
}
.vv2-planet-lg {
  position: absolute; right: -140px; bottom: -200px;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--vv2-planeta-lg), rgba(63, 66, 77, 0.6) 55%, transparent 75%);
  animation: vv2Float 16s ease-in-out infinite;
}
.vv2-planet-ring { position: absolute; right: -160px; bottom: -140px; width: 720px; height: 720px; pointer-events: none; }
.vv2-planet-ring > div {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--vv2-accent);
  border-right-color: var(--vv2-halo);
  animation: vv2Orbit 14s linear infinite;
  opacity: .6;
}
.vv2-planet-sm {
  position: absolute; left: -120px; top: 16%;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle at 62% 35%, var(--vv2-planeta-sm), transparent 70%);
  animation: vv2Float 20s ease-in-out infinite;
  animation-delay: -7s;
}

/* — top bar — */
.vv2-topbar {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 26px 48px;
}
.vv2-brand { display: flex; align-items: center; gap: 10px; }
.vv2-logo-img { height: 30.6px; width: auto; display: block; }
.vv2-tag {
  display: inline-flex; align-items: center;
  font-size: 11px; letter-spacing: 0.02em; padding: 3px 10px; border-radius: 6px;
  background: var(--vv2-accent-800); color: var(--vv2-accent-100);
  margin-left: 6px;
}
.vv2-tag-outline {
  display: inline-flex; align-items: center;
  font-size: 11px; letter-spacing: 0.02em; padding: 3px 10px; border-radius: 6px;
  border: 1px solid var(--vv2-accent); color: var(--vv2-accent);
  white-space: nowrap;
}

/* Píldora de idioma: reusa el partial _LangSwitch, restilizado solo aquí. */
.vv2 .lang-switch {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--vv2-lang-bg);
  border: 1px solid var(--vv2-border);
  border-radius: 999px; padding: 5px;
  backdrop-filter: blur(8px);
  overflow: visible;
}
.vv2 .lang-switch__btn {
  border: none; cursor: pointer; font-family: inherit;
  font-size: 12.5px; font-weight: 600; line-height: 1.2;
  padding: 8px 18px; border-radius: 999px;
  background: transparent; color: rgba(240, 237, 250, 0.55);
  box-shadow: none; transition: all .25s ease;
}
.vv2 .lang-switch__btn + .lang-switch__btn { border-left: none; }
.vv2 .lang-switch__btn:hover { background: rgba(240, 237, 250, 0.07); color: rgba(240, 237, 250, 0.8); }
.vv2 .lang-switch__btn--active,
.vv2 .lang-switch__btn--active:hover {
  background: linear-gradient(135deg, var(--vv2-grad-a), var(--vv2-grad-lang));
  color: #fff;
  box-shadow: 0 4px 14px rgba(var(--vv2-brillo-rgb), 0.5);
}

/* — cuerpo: tarjeta + hero — */
.vv2-main {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 64px; align-items: center;
  padding: 24px 48px 72px;
  max-width: 1360px; margin: 0 auto;
  min-height: calc(100vh - 190px);
}
.vv2-card {
  flex: 0 1 420px; min-width: 330px;
  background: linear-gradient(160deg, var(--vv2-carta-a), var(--vv2-carta-b));
  border: 1px solid var(--vv2-border);
  border-radius: 14px;
  padding: 38px 36px;
  backdrop-filter: blur(18px);
  box-shadow: 0 0 0 1px #9397ab, 0 16px 40px rgba(0, 0, 0, 0.65);
  animation: vv2Rise .5s ease both;
}
.vv2-title {
  margin: 0 0 4px;
  font-size: 26px; font-weight: 500; letter-spacing: -0.3px; line-height: 1.12;
}
.vv2-title--sm { font-size: 24px; }
.vv2-accent-line {
  width: 56px; height: 2px; margin: 10px 0 26px;
  background: linear-gradient(90deg, var(--vv2-accent), transparent);
  animation: vv2Glow 3s ease-in-out infinite;
}
.vv2-form { display: flex; flex-direction: column; gap: 16px; }

.vv2-field > label {
  display: block; font-size: 12px; margin-bottom: 5px;
  color: rgba(240, 237, 250, 0.7);
}
.vv2-input {
  width: 100%; min-height: 36px; padding: 6px 10px;
  font: inherit; font-size: 14px;
  color: var(--vv2-text); caret-color: var(--vv2-accent);
  background: var(--vv2-input-bg);
  border: 1px solid var(--vv2-input-border);
  border-radius: 8px;
}
.vv2-input::placeholder { color: rgba(240, 237, 250, 0.35); }
.vv2-input:hover { border-color: rgba(240, 237, 250, 0.45); }
.vv2-input:focus-visible { border-color: var(--vv2-accent); outline-offset: 0; }
.vv2-pw-wrap { position: relative; }
.vv2-pw-wrap .vv2-input { padding-right: 64px; }
.vv2-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: 14px; padding: 4px;
  color: rgba(240, 237, 250, 0.5);
  text-transform: lowercase;
}
.vv2-eye:hover { color: var(--vv2-accent); }

.vv2-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 6px;
  cursor: pointer; text-decoration: none;
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.2;
  color: #fff;
  border: none; border-radius: 8px;
  padding: 10px 12px;
  background: linear-gradient(135deg, var(--vv2-grad-a), var(--vv2-grad-b));
  box-shadow: 0 10px 30px rgba(var(--vv2-brillo-rgb), 0.45);
  transition: box-shadow .2s ease, filter .2s ease;
}
.vv2-btn:hover { box-shadow: 0 14px 36px rgba(var(--vv2-brillo2-rgb), 0.6); filter: brightness(1.08); }
.vv2-btn:active { filter: brightness(0.95); }
.vv2-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.vv2-btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%;
  cursor: pointer; text-decoration: none;
  font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1.2;
  color: var(--vv2-text);
  background: transparent;
  border: 1px solid var(--vv2-divider);
  border-radius: 8px;
  padding: 10px 12px;
  transition: background .15s ease;
}
.vv2-btn-secondary:hover { background: rgba(240, 237, 250, 0.07); color: var(--vv2-text); }
.vv2-btn-secondary:active { background: rgba(240, 237, 250, 0.14); }

.vv2-link-row { display: flex; justify-content: center; }
.vv2-link-row a { font-size: 13px; }
.vv2-divider {
  display: flex; align-items: center; gap: 12px;
  color: rgba(240, 237, 250, 0.35); font-size: 12px;
  text-transform: lowercase;
}
.vv2-divider::before {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--vv2-divider));
}
.vv2-divider::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--vv2-divider), transparent);
}
.vv2-alt {
  text-align: center; font-size: 13px;
  color: rgba(240, 237, 250, 0.6);
}
.vv2-alt a { font-weight: 600; }

/* Aviso (recuperar: enviado) y error (login: credenciales). */
.vv2-notice {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--vv2-aviso-bg);
  border: 1px solid var(--vv2-aviso-border);
  border-radius: 8px; padding: 14px 16px; margin-bottom: 20px;
}
.vv2-notice-icon {
  width: 20px; height: 20px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--vv2-accent); color: var(--vv2-accent-200);
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.vv2-notice p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--vv2-accent-100); }
.vv2-error {
  background: rgba(127, 29, 29, 0.35);
  border: 1px solid rgba(248, 113, 113, 0.4);
  border-radius: 8px; padding: 12px 16px; margin-bottom: 18px;
  font-size: 13px; line-height: 1.55; color: #fecaca;
}
.vv2-hint { font-size: 12px; line-height: 1.6; color: rgba(240, 237, 250, 0.45); margin: 0; }
.vv2-hint strong { color: rgba(240, 237, 250, 0.7); font-weight: 600; }

/* — hero — */
.vv2-hero { flex: 1 1 460px; min-width: 0; animation: vv2Rise .6s ease both; animation-delay: .1s; }
.vv2-hero .vv2-tag-outline { margin-bottom: 20px; }
.vv2-hero h2 {
  margin: 0 0 18px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.14; font-weight: 400; letter-spacing: -0.6px;
  max-width: 620px;
}
.vv2-hero h2 strong { font-weight: 700; }
.vv2-hero-rule {
  width: 120px; height: 1px; margin: 0 0 22px;
  background: linear-gradient(90deg, var(--vv2-accent), transparent);
}
.vv2-hero-sub {
  margin: 0 0 32px; font-size: 16px; line-height: 1.65;
  color: rgba(240, 237, 250, 0.65); max-width: 480px;
}
.vv2-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.vv2-stat { display: flex; flex-direction: column; gap: 2px; }
.vv2-stat-value { font-size: 24px; font-weight: 700; color: var(--vv2-accent-200); }
.vv2-stat-label { font-size: 12.5px; color: rgba(240, 237, 250, 0.55); }

/* — sello del producto (solo dominios con tema) — */
/* Cuando el dominio pone su propio logo en la topbar, Venvers firma en la esquina
   inferior derecha: sobre la línea del footer (~53px de alto), alineado con detecno.com. */
.vv2-prodmark {
  position: absolute; right: 48px; bottom: 70px; z-index: 2;
  display: flex; align-items: center; gap: 8px;   /* logo Venvers + chip "v2" */
}
.vv2-prodmark img { height: 22px; width: auto; display: block; opacity: .85; }
@media (max-width: 520px) { .vv2-prodmark { right: 20px; bottom: 78px; } }

/* El logo de un tema (triángulo + texto, proporción ~4:3) necesita más alto que el
   logotipo horizontal de Venvers para leerse; solo aplica a logos de /temas/. */
.vv2-logo-img[src*="/temas/"] { height: 52px; }

/* — footer — */
.vv2-footer {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 48px;
  font-size: 12px; color: rgba(240, 237, 250, 0.45);
  border-top: 1px solid rgba(200, 180, 255, 0.1);
}
.vv2-footer-left { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.vv2-footer a { color: rgba(240, 237, 250, 0.55); }
.vv2-footer a:hover { color: rgba(240, 237, 250, 0.8); }
.vv2-footer-version { color: var(--vv2-accent-300); }
.vv2-footer-domain { font-weight: 600; color: rgba(240, 237, 250, 0.7); }

/* — responsive fino: el wrap del flex hace el trabajo; solo aflojamos padding — */
@media (max-width: 520px) {
  .vv2-topbar, .vv2-footer { padding-left: 20px; padding-right: 20px; }
  .vv2-main { padding: 16px 20px 56px; }
  .vv2-card { min-width: 0; padding: 30px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .vv2 *, .vv2 *::before, .vv2 *::after { animation: none !important; }
}
