/* ============================================================
   LOGIN PREMIUM GADIER - VERSIÓN MEJORADA
   ============================================================ */

/* Fondo degradado diagonal moderno */
.login-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: stretch;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  background: linear-gradient(135deg, #b31217 0%, #dd2d28 35%, #fad2d2 100%);
}

/* Envoltorio general */
.login-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 40px 15px 40px;
}

/* HEADER - Logo más grande */
.login-header {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.login-logo {
  height: 120px;
  /* AUMENTADO */
  max-width: 350px;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25));
}

/* CENTRAR TARJETA */
.contenedor {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* FORMULARIO glass moderno */
.formulario {
  width: 700px;
  max-width: 95%;
  padding: 45px 55px;

  border-radius: 22px;

  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.65);
}

/* TITULOS MEJORADOS */
.titulo {
  font-size: 34px;
  font-weight: 800;
  color: #7b0000;
  margin-bottom: 8px;
}

.sub {
  margin-bottom: 35px;
  color: #2e2e2e;
  font-size: 15px;
}

/* SEPARADORES FINOS */
.formulario::before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: rgba(0, 0, 0, 0.15);
  margin-bottom: 25px;
}

/* GRUPOS */
.grupo {
  margin-bottom: 30px;
}

.grupo label {
  font-size: 17px;
  font-weight: 600;
  display: block;
  margin-bottom: 5px;
}

/* INPUTS MÁS VISUALES */
.grupo input {
  width: 100%;
  font-size: 19px;
  padding: 12px 0 8px;
  border: none;
  border-bottom: 2px solid rgba(0, 0, 0, 0.45);
  background: transparent;
  color: #111;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.grupo input:focus {
  outline: none;
  border-bottom: 2px solid #b50000;
  color: #7b0000;
}

/* BOTÓN MEJORADO */
.btn {
  width: 100%;
  padding: 16px;
  margin-top: 18px;
  font-size: 18px;

  background: linear-gradient(180deg, #d10e0e, #9d0000);
  color: white;
  border: none;

  border-radius: 10px;
  cursor: pointer;

  box-shadow: 0 9px #610000;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  background: linear-gradient(180deg, #ff1a1a, #b30000);
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 4px #610000;
}

/* FIRMA */
#firma {
  width: 100%;
  height: 120px;
  display: none;
}

#firmaPath {
  fill: none;
  stroke: #000;
  stroke-width: 3;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: drawSignature 2s forwards ease;
}

@keyframes drawSignature {
  to {
    stroke-dashoffset: 0;
  }
}

.pen {
  width: 600px;
  position: absolute;
  display: none;
  pointer-events: none;
  transform: rotate(-18deg);
}


/* MENSAJE */
.msg {
  margin-top: 15px;
  color: #900;
  font-weight: 600;
  font-size: 15px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .login-logo {
    height: 90px;
  }

  .formulario {
    padding: 30px 25px;
  }

  .titulo {
    font-size: 26px;
  }
}

/* SELLO con logo */
#selloWrapper {
  margin-top: 120px;
  /* antes 80px → baja el logo */
  display: flex;
  justify-content: center;
  align-items: center;
  height: 150px;
  /* un poco más alto para respirar */
}

.cargando-contenido {
  text-align: center;
  color: white;
  margin-bottom: 20px;

  /* 🔥 Centramos mejor la caja */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  transform: translateY(100px);
  /* ⬅️ AJUSTA EL VALOR si quieres más abajo */
}

#sello {
  width: 130px;
  height: 130px;
  object-fit: contain;
  padding: 18px;
  border-radius: 50%;
  background: #b50000;
  box-shadow: 0 0 0 6px #fff, 0 0 0 12px #b50000;
  animation: estampar 0.6s forwards ease-out;
}

@keyframes estampar {
  0% {
    transform: scale(1.5) rotate(-15deg);
    opacity: 0;
  }

  50% {
    transform: scale(1.2) rotate(-5deg);
    opacity: 0.8;
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* ============================================================
   SELECT MODERNO + LISTA PERSONALIZADA (Windows friendly)
   ============================================================ */

/* Contenedor del select */
.grupo select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  font-size: 19px;
  padding: 12px 0 8px;

  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(0, 0, 0, 0.45);
  color: #222;

  padding-right: 32px;
  cursor: pointer;

  transition: border-color 0.2s ease, color 0.2s ease;
}

/* Flecha */
.grupo select {
  background-image: url("data:image/svg+xml;utf8,<svg fill='black' width='22' height='22' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 20px;
}

/* Focus */
.grupo select:focus {
  outline: none;
  border-bottom: 2px solid #b50000;
  color: #7b0000;
}

/* LISTA desplegada (solo navegadores modernos) */
.grupo select option {
  background: #ffffff;
  padding: 12px;
  color: #222;
  font-size: 16px;
  border: none;
}

/* Evita el azul feo de selección */
.grupo select option:checked {
  background-color: #f2f2f2 !important;
  color: #7b0000 !important;
}

/* Hover de cada opción */
.grupo select option:hover {
  background-color: #ffe5e5 !important;
}

/* Scroll elegante en la lista */
.grupo select option::-webkit-scrollbar {
  width: 8px;
}

.grupo select option::-webkit-scrollbar-thumb {
  background-color: #b50000;
  border-radius: 10px;
}

/* ============================================
   SELECT CUSTOM GADIER — VERSIÓN PRO PREMIUM
   ============================================ */
.custom-select {
  position: relative;
  width: 100%;
  font-size: 19px;
  padding: 12px 0 8px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.45);
  background: transparent;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.custom-select:hover,
.custom-select.open {
  border-bottom: 2px solid #b50000;
}

.custom-select span {
  color: #222;
}

.custom-select .arrow {
  transition: transform 0.25s ease;
}

.custom-select.open .arrow {
  transform: rotate(180deg);
}


/* LISTA */
.custom-options {
  position: absolute;
  top: 100%;
  width: 100%;
  background: rgba(255, 255, 255, 0.94);
  /* MÁS SÓLIDO */
  backdrop-filter: blur(16px);
  /* GLASS REAL */
  -webkit-backdrop-filter: blur(16px);

  list-style: none;
  padding: 6px 0;
  margin: 0;

  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);

  display: none;
  z-index: 9999;

  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
}

.custom-options.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.custom-options li {
  padding: 12px 18px;
  font-size: 17px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  color: #222;
}

/* Hover limpio */
.custom-options li:hover {
  background: rgba(255, 230, 230, 0.85);
}

/* Seleccionado */
.custom-options li.selected {
  background: rgba(255, 200, 200, 0.95);
  color: #7b0000;
  font-weight: 700;
}

/* Evitar que el fondo rojo se vea atrás */
.custom-options::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: inherit;
  pointer-events: none;
}

.grupo {
  margin-bottom: 30px;
  position: relative;
  /* 🔥 NECESARIO PARA POSICIONAR LA LISTA */
}

/* ============================================================
   🔧 FIX: Evitar que el SELECT REAL oculto interfiera
   ============================================================ */

#rolUsuario {
  display: none !important;
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  height: 0 !important;
  width: 0 !important;
}

/* Asegurar que el custom select siempre esté encima */
.custom-select {
  position: relative !important;
  z-index: 9999 !important;
}

.custom-options {
  z-index: 99999 !important;
}