/* =====================================================================
   auth-modern.css — Pantallas públicas (login, registro, verificación,
   términos, privacidad). Mantiene el estilo claro de Skote: solo agrega
   un fondo sutil acorde a la marca y el badge circular del logo.
   Sin imágenes ni recursos externos: todo es CSS / SVG inline.
   ===================================================================== */

:root {
  --nx-brand: #556ee6;
  --nx-brand-2: #50a5f1;
  --nx-brand-3: #34c38f;
}

/* ---------- Fondo moderno (capas fijas, no interfieren con el contenido) ---------- */
body.nx-auth {
  position: relative;
  min-height: 100vh;
  background-color: #f8f8fb;
  overflow-x: hidden;
}
body.nx-auth::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(1100px 560px at 8% -8%, rgba(85, 110, 230, .17), transparent 62%),
    radial-gradient(900px 520px at 104% 6%, rgba(80, 165, 241, .16), transparent 58%),
    radial-gradient(900px 560px at 52% 112%, rgba(52, 195, 143, .13), transparent 62%),
    linear-gradient(180deg, #f8f8fb 0%, #eef1fb 100%);
}
body.nx-auth::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: radial-gradient(rgba(85, 110, 230, .16) 1px, transparent 1.3px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .35) 45%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .35) 45%, transparent 85%);
}

.nx-auth-deco {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.nx-auth-deco .nx-orb {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(85, 110, 230, .16);
}
.nx-auth-deco .nx-orb::after {
  content: "";
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  border: 1px dashed rgba(80, 165, 241, .22);
}
.nx-auth-deco .nx-orb-1 { width: 420px; height: 420px; left: -140px; bottom: -150px; }
.nx-auth-deco .nx-orb-2 { width: 300px; height: 300px; right: -90px; top: 18%; border-color: rgba(52, 195, 143, .20); }
.nx-auth-deco .nx-orb-2::after { border-color: rgba(52, 195, 143, .26); }
.nx-auth-deco .nx-orb-3 { width: 150px; height: 150px; left: 9%; top: 14%; background: radial-gradient(circle at 30% 30%, rgba(85, 110, 230, .12), rgba(85, 110, 230, 0) 70%); border-color: transparent; }
.nx-auth-deco .nx-orb-3::after { display: none; }
.nx-auth-deco .nx-nodes { position: absolute; right: 6%; bottom: 8%; width: 220px; height: 150px; opacity: .55; }

@media (prefers-reduced-motion: no-preference) {
  .nx-auth-deco .nx-orb-1 { animation: nx-drift 26s ease-in-out infinite alternate; }
  .nx-auth-deco .nx-orb-2 { animation: nx-drift 32s ease-in-out infinite alternate-reverse; }
  .nx-auth-deco .nx-orb-3 { animation: nx-drift 22s ease-in-out infinite alternate; }
  @keyframes nx-drift {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(18px, -16px, 0); }
  }
}
@media (max-width: 575.98px) {
  .nx-auth-deco .nx-orb-1 { width: 300px; height: 300px; left: -120px; bottom: -120px; }
  .nx-auth-deco .nx-orb-2, .nx-auth-deco .nx-nodes { display: none; }
}

/* ---------- Tarjeta: sombra suave de marca (sin cambiar su color) ---------- */
body.nx-auth .account-pages .card {
  border: 0;
  box-shadow: 0 14px 44px rgba(85, 110, 230, .12), 0 2px 8px rgba(18, 38, 63, .05);
}

/* ---------- Badge circular del logo (anillo de color + sombra) ---------- */
.nx-brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, var(--nx-brand), var(--nx-brand-2), var(--nx-brand-3), var(--nx-brand));
  box-shadow: 0 8px 22px rgba(85, 110, 230, .30), 0 0 0 4px rgba(255, 255, 255, .9);
  transition: transform .25s ease, box-shadow .25s ease;
}
.nx-brand-badge .nx-brand-core {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #ffffff 0%, #f3f5ff 100%);
  box-shadow: inset 0 2px 6px rgba(85, 110, 230, .12);
}
.nx-brand-badge svg { width: 2.35rem; height: 2.35rem; display: block; }
a:hover > .avatar-md > .nx-brand-badge,
a:focus-visible > .avatar-md > .nx-brand-badge {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 10px 26px rgba(85, 110, 230, .38), 0 0 0 4px rgba(255, 255, 255, .95);
}
.nx-auth-logo-link:focus-visible { outline: 2px solid var(--nx-brand); outline-offset: 4px; border-radius: 50%; }

/* ---------- Utilidades de formularios de autenticación ---------- */
.nx-auth .form-control.is-invalid { background-image: none; }
.nx-auth .invalid-feedback { display: block; }
.nx-auth .nx-field-error { color: #f46a6a; font-size: .8125rem; margin-top: .25rem; min-height: 0; }
.nx-hp { position: absolute !important; left: -10000px !important; top: auto !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.nx-pw-meter { height: 6px; border-radius: 6px; background: #e9ecef; overflow: hidden; margin-top: .5rem; }
.nx-pw-meter > span { display: block; height: 100%; width: 0; border-radius: 6px; transition: width .25s ease, background-color .25s ease; }
.nx-pw-hint { font-size: .75rem; color: #74788d; margin-top: .25rem; }
.nx-pw-rules { list-style: none; padding: 0; margin: .4rem 0 0; display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .75rem; color: #74788d; }
.nx-pw-rules li::before { content: "\25CB"; margin-right: .3rem; }
.nx-pw-rules li.ok { color: #1c9a6e; }
.nx-pw-rules li.ok::before { content: "\2713"; }

/* Captcha propio */
.nx-captcha-box { display: flex; align-items: stretch; gap: .5rem; flex-wrap: wrap; }
.nx-captcha-img {
  border: 1px solid #ced4da; border-radius: .25rem; background: #fff;
  min-width: 190px; height: 66px; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.nx-captcha-img img { display: block; height: 64px; width: auto; max-width: 100%; }
.nx-captcha-q { font-weight: 600; font-size: 1.05rem; padding: 0 .9rem; color: #495057; }
.nx-captcha-actions { display: flex; flex-direction: column; justify-content: center; gap: .15rem; font-size: .75rem; }
.nx-captcha-actions .btn-link { padding: 0; font-size: .75rem; text-decoration: none; }

/* Verificación: 6 casillas */
.nx-otp { display: flex; gap: .5rem; justify-content: center; }
.nx-otp input { width: 3rem; height: 3.4rem; text-align: center; font-size: 1.5rem; font-weight: 600; padding: 0; }
@media (max-width: 380px) { .nx-otp { gap: .3rem; } .nx-otp input { width: 2.5rem; height: 3rem; font-size: 1.25rem; } }
.nx-otp input:focus { border-color: var(--nx-brand); box-shadow: 0 0 0 .2rem rgba(85, 110, 230, .2); }

.nx-footer-legal a { color: #74788d; text-decoration: none; }
.nx-footer-legal a:hover { color: var(--nx-brand); text-decoration: underline; }
.nx-footer-legal .nx-sep { margin: 0 .4rem; color: #ced4da; }

/* Páginas legales */
.nx-legal-card h2 { font-size: 1.05rem; font-weight: 600; color: #495057; margin-top: 1.75rem; }
.nx-legal-card h3 { font-size: .95rem; font-weight: 600; color: #495057; margin-top: 1.1rem; }
.nx-legal-card p, .nx-legal-card li { color: #495057; line-height: 1.65; font-size: .9rem; }
.nx-legal-toc { background: #f8f8fb; border: 1px solid #eff2f7; border-radius: .5rem; padding: .85rem 1.1rem; }
.nx-legal-toc ol { margin: 0; padding-left: 1.1rem; columns: 2; column-gap: 2rem; font-size: .85rem; }
@media (max-width: 575.98px) { .nx-legal-toc ol { columns: 1; } }
.nx-legal-card .nx-pend { background: rgba(241, 180, 76, .22); border-bottom: 1px dashed #f1b44c; padding: 0 .2rem; border-radius: 2px; }
.nx-legal-card table { font-size: .85rem; }
.nx-legal-card h2[id], .nx-legal-card section[id] { scroll-margin-top: 1rem; }

/* Reduce transiciones si el usuario lo pide */
@media (prefers-reduced-motion: reduce) {
  .nx-brand-badge, .nx-pw-meter > span { transition: none; }
}
