/* ==========================================================================
   CONTENEDOR DEL MODAL CON DESENFOQUE (OVERLAY)
   ========================================================================== */
.modal-superpuesto {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-superpuesto.activo {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   ESTILO RETRO-BRUTALISTA PARA EL FORMULARIO
   ========================================================================== */
.formulario-modal {
  --enfoque-entrada: #2ecc71;
  --color-fuente: #1a1a1a;
  --color-fuente-sub: #555;
  --color-fondo: #ffffff;
  --color-principal: #1a1a1a;
  
  padding: 30px;
  background: #f0f0f0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  border-radius: 12px;
  border: 3px solid var(--color-principal);
  box-shadow: 8px 8px var(--color-principal);
  max-width: 500px;
  width: 90%;
  position: relative;
  transform: scale(0.7);
}

.formulario-titulo {
  color: var(--color-fuente);
  font-weight: 900;
  font-size: 22px;
  margin-bottom: 5px;
  font-family: 'Ubuntu', sans-serif;
}

.formulario-titulo span {
  color: var(--color-fuente-sub);
  font-weight: 600;
  font-size: 15px;
  display: block;
  margin-top: 5px;
}

.formulario-modal .boton-confirmar {
  width: 100%;             /* Obliga al botón a adaptarse al ancho del modal */
  margin-left: 0 !important; /* Resetea los 400px que lo mandaban a la derecha */
  margin-right: 0;
  margin-top: 25px;         /* Le da una separación elegante respecto al campo "Moneda" */
  box-sizing: border-box;
}

.formulario-modal .boton-confirmar .btn-3d-sombra,
.formulario-modal .boton-confirmar .btn-3d-borde-lateral,
.formulario-modal .boton-confirmar .btn-3d-cara-frontal {
  width: 100%;
  box-sizing: border-box;
}

.grupo-campo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.grupo-campo label {
  font-weight: 700;
  font-size: 14px;
  color: var(--color-fuente);
}

.entrada-formulario {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  border: 2px solid var(--color-principal);
  background-color: var(--color-fondo);
  box-shadow: 4px 4px var(--color-principal);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-fuente);
  padding: 5px 12px;
  outline: none;
  box-sizing: border-box;
}

.entrada-formulario::placeholder {
  color: var(--color-fuente-sub);
  opacity: 0.6;
}

.entrada-formulario:focus {
  border: 2px solid var(--enfoque-entrada);
  box-shadow: 4px 4px var(--enfoque-entrada);
}

.boton-confirmar {
  margin-top: 20px;
  width: 100%;
}

.boton-cerrar-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: red;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.boton-cerrar-modal:hover {
  transform: scale(1.2);
}

/* ==========================================================================
   LOADER COMPARTIDO EXIGIDO
   ========================================================================== */
.cargador-contenedor {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  padding: 20px;
  width: 100%;
}

.cargador-barra {
  overflow: hidden;
  background-color: white;
  margin: 0 8px;
  height: 70px;
  width: 14px;
  border-radius: 15px;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.1),
              inset -2px -2px 5px rgba(0, 0, 255, 0.05),
              inset 2px 2px 5px rgba(0, 0, 0, 0.1);
  position: relative;
}

/* ==========================================================================
   CHECKBOX BRUTALISTA DE UIVERSE (APLICA ISV)
   ========================================================================== */
.uiverse-wrapper {
  --size: 35px;
  --color-default: #1a1a1a; /* Cambiado a negro para mantener el estilo brutalista */
  --color-active: #2ecc71;  /* Cambiado a verde de enfoque para consistencia visual */
  --transition: 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 5px;
}

.cb-container {
  display: block;
  position: relative;
  cursor: pointer;
  width: var(--size);
  height: var(--size);
  user-select: none;
}

.cb-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: white;
  border: 3px solid var(--color-default);
  border-radius: 10px;
  transition: var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 4px 4px 0px var(--color-default);
}
boton-cerrar-modal
.checkmark svg {
  width: 18px;
  height: 18px;
  color: white;
  transform: scale(0) rotate(-45deg);
  transition: var(--transition);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.cb-container:hover .checkmark {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--color-default);
}

.cb-container input:checked ~ .checkmark {
  background-color: var(--color-active);
  border-color: var(--color-default);
  box-shadow: 4px 4px 0px var(--color-default);
  transform: scale(1.05);
}

.cb-container input:checked ~ .checkmark svg {
  transform: scale(1) rotate(0deg);
}

.cb-container:active .checkmark {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px var(--color-default);
}

/* Texto descriptivo al lado del checkbox */
.label-checkbox-brutal {
  font-weight: 700;
  font-size: 14px;
  color: #1a1a1a;
  cursor: pointer;
}

.cargador-barra::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  border-radius: 100%;
  box-shadow: 0px 420px 0 400px #FF6B6B;
  animation: animar-cargador 2s ease-in-out infinite;
  animation-delay: calc(-1s * var(--i));
}

@keyframes animar-cargador {
  0% { transform: translateY(50px); filter: hue-rotate(0deg); }
  50% { transform: translateY(0); }
  100% { transform: translateY(50px); filter: hue-rotate(360deg); }
}
/* ==========================================================================
   BOTONES DEL MODAL DE CONFIRMACIÓN
   ========================================================================== */

.modal-botones {
  display: flex;
  gap: 15px;
  width: 100%;
  margin-top: 20px;
  align-items: stretch;
}

.modal-botones > div {
  flex: 1;
  display: flex;
}

.modal-botones .btn-3d-contenedor {
  width: 100%;
  margin: 0 !important;
  display: flex;
}

.modal-botones .btn-3d-sombra,
.modal-botones .btn-3d-borde-lateral,
.modal-botones .btn-3d-cara-frontal {
  width: 100%;
  box-sizing: border-box;
}

/* Responsive */
@media (max-width: 600px) {
  .modal-botones {
    flex-direction: column;
  }
}