/* ======================================================
   VARIABLES GLOBALES
====================================================== */
:root {
  --color-primary: #6f42c1;
  --color-accent: #e83e8c;
  --color-accent-soft: #f5a0c7;

  --gradient-accent: linear-gradient(135deg, #f3b2ff, #ff7abf);

  --glass-bg: rgba(255,255,255,.10);
  --glass-bg-soft: rgba(255,255,255,.08);
  --glass-border: rgba(255,255,255,.18);
  --glass-border-strong: rgba(255,255,255,.25);
  --glass-shadow: 0 20px 50px rgba(0,0,0,.45);
  --glass-blur: blur(20px);

  --gradient-user-purple: linear-gradient(
    135deg,
    #c77dff 0%,
    #9d4edd 40%,
    #6f42c1 70%,
    #4b2a86 100%
  );

    /* Verde cristal */
  --glass-green-bg: rgba(25,135,84,.32);
  --glass-green-border: rgba(25,135,84,.65);
  --glass-green-glow: rgba(25,135,84,.65);
  --glass-green-gradient: linear-gradient(
      135deg,
      #3ddc97 0%,
      #20c997 45%,
      #198754 100%
  );

  /* Naranja cristal */
  --glass-orange-bg: rgba(255,140,0,.32);
  --glass-orange-border: rgba(255,140,0,.65);
  --glass-orange-glow: rgba(255,140,0,.65);
  --glass-orange-gradient: linear-gradient(
      135deg,
      #ffc107 0%,
      #ff9800 50%,
      #ff6f00 100%
  );

  /* Avatar – versión rosa */
  --gradient-user-pink: linear-gradient(
    135deg,
    #ff7abf 0%,
    #ff4f9a 45%,
    #e83e8c 75%,
    #b83280 100%
  );
}

html,
body {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior-y: auto;
}

body {
  scrollbar-width: none;        /* Firefox */
}

body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

@supports (-webkit-touch-callout: none) {
  body {
    overscroll-behavior-y: auto;
  }
}


/* ======================================================
   BASE
====================================================== */
html {
  font-size: 12px;
}
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.screen-registro {
  height: 100%;
  overflow-y: auto;
}

/* Fondo principal */
body.screen-registro {
  background:
    linear-gradient(135deg,
      #050508 0%,
      #2b0f3a 35%,
      #7a1e6a 65%,
      #d14c8c 100%);
  color: #fff;
  overscroll-behavior-y: auto;   /* ⬅ permite pull-to-refresh */
  overscroll-behavior-x: none;   /* ⬅ evita rebotes laterales */
  position: relative;
}

/* Luces ambientales */
body.screen-registro::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 40%, rgba(255,255,255,.08), transparent 40%),
    radial-gradient(circle at 30% 70%, rgba(255,255,255,.06), transparent 45%);
  pointer-events: none;
}

/* ======================================================
   GLASS UI (reutilizable)
====================================================== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* ======================================================
   LAYOUT
====================================================== */
.page-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-center.full {
  align-items: center;
  padding-top: 0;
}

/* Dashboard: contenido bajo navbar */
.page-dashboard {
  flex: 1;
  display: flex;
  align-items: flex-start;   /* ⬅ NO centrar vertical */
  justify-content: center;   /* ⬅ sí centrar horizontal */
  padding-top: 2.5rem;       /* ⬅ espacio bajo navbar */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ======================================================
   NAVBAR
====================================================== */
.screen-registro .navbar {
  margin: 12px 12px 0;
  border-radius: 999px;
  background: var(--glass-bg) !important;
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.screen-registro .navbar-brand {
  font-weight: 700;
  letter-spacing: .04em;
}

/* ======================================================
   CARD
====================================================== */
.screen-registro .card {
  background: var(--glass-bg-soft);
  backdrop-filter: blur(25px);
  border-radius: 28px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  color: #fff;
}

.screen-registro .card-header {
  background: transparent;
  border-bottom: 1px solid var(--glass-border);
}

/* ======================================================
   TEXTOS
====================================================== */
.screen-registro h3,
.screen-registro h4 {
  font-weight: 700;
  letter-spacing: .03em;
}

.screen-registro h3 {
  font-size: 1.5rem;
}

.screen-registro h4 {
  font-size: 1.25rem;
}

.screen-registro p,
.screen-registro .text-muted {
  font-size: .95rem;
  line-height: 1.6;
  letter-spacing: .02em;
  color: rgba(255,255,255,.78) !important;
}

.screen-registro small {
  font-size: .8rem;
  letter-spacing: .04em;
  color: rgba(255,255,255,.6) !important;
}

/* Gradiente texto */
.ui-gradient,
.ui-gradient-h3,
.ui-gradient-h4,
.icon-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ======================================================
   FORMULARIOS
====================================================== */
.screen-registro .form-control,
.screen-registro .input-group-text {
  background: rgba(255,255,255,.12);
  border: 1px solid var(--glass-border-strong);
  color: #fff;
  border-radius: 14px;
}

.screen-registro .form-control::placeholder {
  color: rgba(255,255,255,.6);
}

.screen-registro .form-control:focus {
  background: rgba(255,255,255,.18);
  border-color: var(--color-accent-soft);
  box-shadow: 0 0 0 .2rem rgba(255,143,211,.35);
}

/* ======================================================
   BOTONES – ROSA ORIGINAL
====================================================== */
.screen-registro .btn-success,
.screen-registro .btn-warning {
  background: linear-gradient(135deg, #f3b2ff, #ff7abf);
  border: none;
  color: #000;
  font-weight: 800;
  letter-spacing: .04em;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(255,122,191,.4);
}

.screen-registro .btn-success:hover,
.screen-registro .btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(255,122,191,.55);
}

/* ======================================================
   BOTÓN GATE – ENTRADA (GLASS VERDE)
====================================================== */
.btn-gate-primary {
  background:
    linear-gradient(rgba(255,255,255,.08), rgba(255,255,255,.02)),
    var(--glass-green-bg);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border: 1px solid var(--glass-green-border);
  border-radius: 999px;

  color: #ffffff;
  font-weight: 800;
  letter-spacing: .06em;

  box-shadow:
    0 12px 30px var(--glass-green-glow),
    inset 0 1px 0 rgba(255,255,255,.35);

  transition: all .28s ease;
}

.btn-gate-primary i {
  background: var(--glass-green-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-gate-primary:hover {
  transform: translateY(-4px);
  box-shadow:
    0 20px 48px rgba(25,135,84,.75),
    inset 0 1px 0 rgba(255,255,255,.45);
}

.btn-gate-primary:active {
  transform: translateY(-1px);
}

/* ======================================================
   BOTÓN GATE – SALIDA (GLASS NARANJA)
====================================================== */
.btn-gate-secondary {
  background:
    linear-gradient(rgba(255,255,255,.08), rgba(255,255,255,.02)),
    var(--glass-orange-bg);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border: 1px solid var(--glass-orange-border);
  border-radius: 999px;

  color: #ffffff;
  font-weight: 800;
  letter-spacing: .06em;

  box-shadow:
    0 12px 30px var(--glass-orange-glow),
    inset 0 1px 0 rgba(255,255,255,.35);

  transition: all .28s ease;
}

.btn-gate-secondary:hover {
  transform: translateY(-4px);
  box-shadow:
    0 20px 48px rgba(255,140,0,.75),
    inset 0 1px 0 rgba(255,255,255,.45);
}

.btn-gate-secondary:active {
  transform: translateY(-1px);
}

.abrir-acceso-form .btn {
  min-height: 95px;
}

/* ======================================================
   ALERTAS (GLASS + COLOR SEMÁNTICO)
====================================================== */
.screen-registro .alert {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border-strong);
  color: #fff;
}

/* 🔴 ERROR */
.screen-registro .alert-danger {
  background: linear-gradient(
    135deg,
    rgba(220,53,69,.35),
    rgba(220,53,69,.15)
  );
  border-color: rgba(220,53,69,.6);
  box-shadow:
    inset 0 3px 0 rgba(220,53,69,.8),
    0 10px 30px rgba(220,53,69,.25);
}

/* 🟢 SUCCESS */
.screen-registro .alert-success {
  background: linear-gradient(
    135deg,
    rgba(25,135,84,.35),
    rgba(25,135,84,.15)
  );
  border-color: rgba(25,135,84,.6);
  box-shadow:
    inset 0 3px 0 rgba(25,135,84,.8),
    0 10px 30px rgba(25,135,84,.25);
}

/* Alerts fijas */
body.screen-registro .alert.position-fixed {
  max-height: 40vh;
  overflow: hidden;
}

/* ======================================================
   AVATAR
====================================================== */
.avatar-glass-halo {
  width: 104px;
  height: 104px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255,122,191,.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border: 1px solid rgba(255,79,154,.45);

  box-shadow:
    0 0 0 8px rgba(255,122,191,.10),
    0 18px 40px rgba(0,0,0,.45);

  overflow: hidden;
}

.icon-user-glass {
  font-size: 4.0rem;
  line-height: 1;

  background: var(--gradient-user-pink);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  filter:
    drop-shadow(0 0 8px rgba(255,122,191,.65))
    drop-shadow(0 0 18px rgba(255,79,154,.45));
}

@media (max-width: 576px) {
  .avatar-glass-halo {
    width: 88px;
    height: 88px;
  }

  .icon-user-glass {
    font-size: 3.2rem;
  }
}

/* ======================================================
   HEADER TITLES
====================================================== */
.header-title h3 {
    color: #ff4f9a;
}


/* ======================================================
SPINNER OVERLAY – BLOQUE GLOBAL
====================================================== */
.spinner-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;

  background:
    radial-gradient(circle at 30% 30%, rgba(255,122,191,.10), transparent 45%),
    radial-gradient(circle at 70% 70%, rgba(111,66,193,.14), transparent 50%),
    rgba(5, 3, 10, 0.78);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  display: flex;
  align-items: center;
  justify-content: center;

  pointer-events: all;
}

/* ======================================================
CONTENEDOR GLASS (CENTRADO REAL)
====================================================== */
.spinner-glass {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;

  padding: 2.5rem 3rem;
  border-radius: 28px;

  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);

  box-shadow: 0 25px 60px rgba(0,0,0,.6);
}

/* ======================================================
SPINNER NEURAL
====================================================== */
.neural-spinner {
  width: 72px;
  height: 72px;
  border-radius: 50%;

  border: 4px solid rgba(255,255,255,.15);
  border-top-color: #ff7abf;
  border-right-color: #6f42c1;

  animation: spin 1s linear infinite;

  box-shadow:
    0 0 25px rgba(255,122,191,.6),
    0 0 45px rgba(111,66,193,.45);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ======================================================
TEXTO DEL SPINNER
====================================================== */
.spinner-text {
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;

  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  animation: pulseText 1.6s ease-in-out infinite;
}

@keyframes pulseText {
  0%, 100% {
    opacity: .65;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

/* ======================================================
LIMPIEZA BOOTSTRAP (YA NO USAMOS)
====================================================== */
.spinner-overlay .spinner-border {
  display: none !important;
}

/* ======================================================
   FIX SCROLL FANTASMA – CARD
====================================================== */
.screen-registro .card {
  margin-bottom: 0 !important;
}

.screen-registro .card > *:last-child {
  margin-bottom: 0 !important;
}

/* ======================================================
   PWA – INSTALAR APP (PILL PURPLE)
====================================================== */
.install-app-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: .7rem 1.4rem;
  border-radius: 999px;

  font-size: clamp(1.25rem, 4.0vw, 1.6rem);
  font-weight: 800;
  letter-spacing: .06em;

  color: #300490;

  background: rgba(111,66,193,.14);
  backdrop-filter: blur(6px);

  border: none;

  box-shadow:
    0 10px 26px rgba(39, 2, 107, 0.45);

  cursor: pointer;
}

/* ======================================================
   BOTÓN FANTASMA – REENVIAR SMS
====================================================== */
.screen-registro .btn-link {
  padding: .45rem 1.15rem;
  border-radius: 999px;
  border: 1.5px solid rgba(83, 32, 178, 0.55);
  background: rgba(111,66,193,.7);   /* ⬅ antes .06 */


  color: #bea5f3;
  font-weight: 800;
  letter-spacing: .05em;

  text-decoration: none;
  transition: all .25s ease;
}

.screen-registro .btn-link:hover,
.screen-registro .btn-link:focus {
  color: #cacaca;
}

.screen-registro .btn-link:disabled {
  background: rgba(255,255,255,.12);
  color: rgba(25, 25, 26, 0.7);
  cursor: not-allowed;
}

/* ======================================================
   INSTRUCCIONES PARA REENVIO DE SMS
====================================================== */
.screen-registro p.text-muted {
    font-size: 1.25rem;   /* más grande y legible */
    font-weight: 600;     /* ligeramente más presente */
    letter-spacing: .01em;
}

/* Nota aclaratoria (cursiva) */
.screen-registro small.text-muted {
    font-size: 1.12rem;      /* mantiene jerarquía */
    font-style: italic;      /* cursivo */
    font-weight: 400;
    opacity: .85;            /* más sutil */
    line-height: 1.4;
}

/* ======================================================
   BOTONES PARA VISTA DE ERRORES CONTROLADOS
====================================================== */
.error-footer {
  padding: 2rem 0 2.5rem;
}

.error-icon i {
  font-size: 4.5rem;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  filter:
    drop-shadow(0 0 12px rgba(255,122,191,.55))
    drop-shadow(0 0 28px rgba(111,66,193,.35));
}

/* ======================================================
   SWEETALERT – NEURAL GLASS THEME
====================================================== */
.swal-glass {
  background: var(--glass-bg-soft);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);

  border-radius: 26px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);

  color: #fff;
}

/* Título */
.swal-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: .04em;

  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  margin-bottom: .75rem;
}

/* Texto */
.swal-text {
  font-size: 1.00rem;        /* ⬅ MÁS GRANDE */
  line-height: 1.65;         /* ⬅ más respiración */
  font-weight: 600;
  letter-spacing: .02em;
  color: rgba(255,255,255,.92);
}

/* Íconos */
.swal-icon {
  transform: scale(.85);
}

/* SUCCESS */
.swal2-icon-success {
  border-color: rgba(25,135,84,.6);
}

/* ERROR */
.swal2-icon-error {
  border-color: rgba(220,53,69,.65);
}

/* ======================================================
   SWEETALERT – ESPACIADO DE BOTONES
====================================================== */
.swal2-actions {
  padding: 1.4rem 1.5rem 1.8rem; /* ⬅ aire inferior real */
  margin: 0;
}


/* Header también con aire */
.swal2-header {
  padding: 1.6rem 1.8rem .5rem;
}
/* ======================================================
   SWEETALERT – BOTÓN CONFIRMAR (CERRAR)
====================================================== */
.swal2-confirm {
  background: var(--gradient-accent) !important;
  color: #000 !important;

  border: none !important;
  border-radius: 999px;

  padding: 1.05rem 4.4rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .06em;

  box-shadow:
    0 10px 30px rgba(255,122,191,.45),
    inset 0 1px 0 rgba(255,255,255,.45);

  transition: all .25s ease;
}

.swal2-confirm:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 40px rgba(255,122,191,.65),
    inset 0 1px 0 rgba(255,255,255,.55);
}

/* ======================================================
    BOTÓN CANCELAR INTENTOS (CERRAR)
====================================================== */

.btn-rosa {
    background: var(--gradient-accent);
    color: #fff !important;
    border: none;
    padding: .5rem 1.5rem;
    border-radius: 50rem;
    font-weight: 600;
    display: inline-block;
    opacity: 1 !important;
}

.btn-rosa:hover {
  filter: brightness(1.05);
}

.spinner-glass button,
.spinner-glass .btn-rosa {
  -webkit-text-fill-color: initial !important;
  background-clip: border-box !important;
  -webkit-background-clip: border-box !important;
  color: #000000 !important;
}