@import url("https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.3.0/flowbite.min.css");
@import url("https://cdn.jsdelivr.net/npm/tailwindcss@3.4.3/base.min.css");
@import url("https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css");

/* Custom styles */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f4f8;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-link {
    color: #4a5568;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav-link:hover {
    background-color: #edf2f7;
}

.btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #4299e1;
    color: white;
}

.btn-primary:hover {
    background-color: #3182ce;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    margin-bottom: 15px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th, .table td {
    border: 1px solid #e2e8f0;
    padding: 12px;
    text-align: left;
}

.table th {
    background-color: #edf2f7;
    font-weight: bold;
}

.table tr:nth-child(even) {
    background-color: #f7fafc;
}

th, td {
    width: 125px;
    word-wrap: break-word;
}

.lightbox .close-btn {
    /* Posición absoluta dentro de la lightbox */
    top: 10px;
    /* Distancia desde la parte superior */
    left: 10px;
    /* Distancia desde la parte izquierda */
    background-color: transparent;
    /* Fondo transparente */
    border: none;
    /* Sin borde */
    color: #ff0000;
    /* Color blanco para el icono */
    font-size: 30px;
    /* Tamaño del icono */
    padding: 10px;
    /* Espaciado alrededor del icono */
    cursor: pointer;
    /* Hacer que se vea como un botón interactivo */
    z-index: 10000;
    /* Asegurarse de que esté encima del contenido */
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Efecto suave */
}

.lightbox .close-btn:hover {
    background-color: rgba(0, 0, 0, 0.5);
    /* Fondo gris semi-transparente en hover */
    color: #f44336;
    /* Color del icono (rojo) en hover */
    border-radius: 50%;
    /* Bordes redondeados en el fondo */
}

.tooltip-msg {
    position: fixed;
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #facc15;
    border-radius: 0.5rem;
    padding: 4px 8px;
    font-size: 13px;
    z-index: 9999;
    animation: fadeOut 2s forwards;
    pointer-events: none;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Centrar la lightbox */
.lightbox {
    display: flex;
    justify-content: center;
    /* Alineación horizontal */
    align-items: center;
    /* Alineación vertical */
    position: fixed;
    /* Mantener la lightbox en su lugar */
    top: 0;
    left: 0;
    width: 100vw;
    /* Tomar el 100% del ancho */
    height: 100vh;
    /* Tomar el 100% del alto */
    background: rgba(0, 0, 0, 0.7);
    /* Fondo semitransparente */
    z-index: 9999;
    /* Asegurarse de que esté encima de otros elementos */
}

/* Ajustar el tamaño de la caja */
.lightbox-content {
    max-width: 90%;
    /* Limitar el tamaño máximo al 90% del ancho de la pantalla */
    max-height: 90%;
    /* Limitar el tamaño máximo al 90% del alto de la pantalla */
    overflow: auto;
    /* Si el contenido es grande, aparecerán barras de desplazamiento */
    background: white;
    padding: 20px;
    border-radius: 8px;
}

/* Asegurarse de que la tabla se ajuste al contenido disponible */
.lightbox-content table {
    width: 100%;
    /* La tabla ocupará todo el ancho disponible */
    table-layout: fixed;
    /* La tabla se ajustará al espacio sin desbordarse */
    border-collapse: collapse;
    /* Para que las celdas se peguen sin márgenes */
    overflow-x: auto;
    /* Habilitar el desplazamiento horizontal si es necesario, pero intentaremos evitarlo */
}

.lightbox-content th,
.lightbox-content td {
    padding: 8px;
    /* Espaciado dentro de las celdas */
    text-align: left;
    /* Alineación de texto */
    word-wrap: break-word;
    /* Asegura que el texto largo se ajuste */
    white-space: normal;
    /* No permitir desbordamiento de texto */
}

/* Si quieres hacer que los títulos de las columnas se ajusten más dinámicamente */
.lightbox-content th {
    width: 1%;
    white-space: nowrap;
}

.mi-btn-confirmar {
  display: inline-block !important;
  background-color: #4f46e5 !important;
  color: white !important;
  border-radius: 0.5rem !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  padding: 0.625rem 1.75rem !important;
  border: none !important;
  margin: 0.25rem !important;
  cursor: pointer !important;
  transition: background-color 0.2s !important;
  outline: none !important;
  box-shadow: none !important;
}
.mi-btn-confirmar:hover {
  background-color: #3730a3 !important;
}
.mi-btn-confirmar:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.3) !important;
}

.mi-btn-cancelar {
  display: inline-block !important;
  background-color: #e5e7eb !important;
  color: #374151 !important;
  border-radius: 0.5rem !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  padding: 0.625rem 1.75rem !important;
  border: none !important;
  margin: 0.25rem !important;
  cursor: pointer !important;
  transition: background-color 0.2s !important;
  outline: none !important;
  box-shadow: none !important;
}
.mi-btn-cancelar:hover {
  background-color: #d1d5db !important;
  color: #111827 !important;
}
.mi-btn-cancelar:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(107,114,128,0.3) !important;
}

.mi-popup-swal {
  border-radius: 1rem !important;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

.color-box {
      width: 30px;
      height: 30px;
      display: inline-block;
      margin: 5px;
      border: 1px solid #ccc;
      cursor: pointer;
    }

.select2-container--default .select2-selection--single {
    height: 42px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    display: flex !important;
    align-items: center !important;

    background-color: white !important;
    border: 1px solid #d1d5db !important;
    /* border-gray-300 */
    border-radius: 0.375rem !important;
    /* rounded-md */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    /* shadow-sm */
    font-size: 0.875rem !important;
    /* sm:text-sm */
}

/* ── SweetAlert2 — tema acorde a la estética de la app ───────────────────── */
.swal2-popup {
    border-radius: 1rem;
    padding: 1.75rem 1.5rem;
    font-family: inherit;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}
.swal2-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
}
.swal2-html-container {
    font-size: 0.9rem;
    color: #6b7280;
}
.swal2-actions {
    gap: 0.5rem;
    margin-top: 1.25rem;
}
/* Botones: radio/tipografía de la app; el color sigue al confirmButtonColor
   en línea cuando se especifica por llamada */
.swal2-styled {
    border-radius: 0.6rem !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    padding: 0.6rem 1.3rem !important;
    box-shadow: none !important;
    transition: filter 0.15s, box-shadow 0.15s;
}
.swal2-styled.swal2-confirm {
    background-color: #7c3aed;
}
.swal2-styled.swal2-confirm:hover {
    filter: brightness(0.94);
}
.swal2-styled.swal2-cancel {
    background-color: #fff !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
}
.swal2-styled.swal2-cancel:hover {
    background-color: #f9fafb !important;
}
.swal2-styled:focus {
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.3) !important;
}
/* Inputs dentro de los modales */
.swal2-popup .swal2-input,
.swal2-popup .swal2-textarea,
.swal2-popup .swal2-select {
    height: auto;
    width: auto;
    min-width: 14rem;
    max-width: 18rem;
    margin: 1rem auto 0.25rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.95rem;
    border: 1px solid #d1d5db;
    border-radius: 0.6rem;
    box-shadow: none;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.swal2-popup .swal2-input:focus,
.swal2-popup .swal2-textarea:focus,
.swal2-popup .swal2-select:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
    outline: none;
}

/* Texto dentro del select */
.select2-selection__rendered {
    color: #374151 !important;
    /* gray-700 */
    line-height: normal !important;
}

/* Flecha */
.select2-selection__arrow {
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: 8px !important;
}

/* Focus igual que Tailwind */
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #4338ca !important;
    /* indigo-700 */
    box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.3) !important;
}

/* Dropdown */
.select2-container--default .select2-dropdown {
    border: 1px solid #d1d5db !important;
    /* gray-300 */
    border-radius: 0.375rem !important;
    /* rounded-md */
}

/* Hover en las opciones */
.select2-container--default .select2-results__option--highlighted {
    background-color: #eef2ff !important;
    /* indigo-100 */
    color: #1f2937 !important;
    /* gray-800 */
}