/* Estilos generales para la tabla */
.table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    padding-top: 20px;
}

/* Estilos del encabezado con borde exterior verde */
.table thead {
    background-color: #184E35 !important; /* Fondo blanco */
    color: #ffffff;
    /* Aplica borde verde en todas las esquinas */
}

/* Eliminar bordes internos de las columnas del encabezado */
.table thead th {
    border: none !important;
    padding: 12px;

}

/* Asegurar que el primer y último th no sobresalgan */
.table thead tr th:first-child {
    border-left: none !important;
}
.table thead tr th:last-child {
    border-right: none !important;
}

/* Fondo blanco puro en filas impares */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: #ffffff !important; /* Fuerza blanco puro */
}

/* Fondo más claro en filas pares */
.table-striped tbody tr:nth-of-type(even) {
    background-color: #f8f8f8 !important; /* Gris muy suave */
}

/* Hover en filas */
.table tbody tr:hover {
    background-color: #effffa !important; /* Verde muy suave */
}

/* Acciones alineadas */
.action-column {
    width: 100px;
    text-align: center;
}

/* Personalización del selector de registros */
.dataTables_length {
    font-size: 14px;
}

.dataTables_length label {
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
}

.dataTables_length select {
    margin-left: 5px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f8f9fa;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    margin-right: 5px;
}

.dataTables_length select:hover {
    border-color: #007bff;
    background-color: #e9ecef;
}

/* Estilos para el cuadro de búsqueda */
.dataTables_filter {
    display: flex;
    align-items: center;
}



.dataTables_filter input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #f8f9fa;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease-in-out;
    width: 200px;
}

.dataTables_filter input::placeholder {
    color: #999;
    font-style: italic;
    text-align: center;
}

.dataTables_filter input:focus {
    border-color: #007bff;
    background-color: #ffffff;
}

/* Responsividad */
@media screen and (max-width: 768px) {
    .table, .table thead, .table tbody, .table th, .table td, .table tr {
        display: block;
    }
    .table thead tr {
        display: none;
    }
    .table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 10px;
    }
    .table td {
        display: flex;
        justify-content: space-between;
        padding: 8px;
        font-size: 14px;
        border-bottom: 1px solid #eee;
    }
    .table td:last-child {
        border-bottom: none;
    }
    .table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #555;
    }
}
/* Estilizar la fila para hacerla clickeable */
/* Hacer que la fila sea interactiva */
.dropdown-row {
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
    position: relative;
}

.dropdown-row:hover {
    background-color: #f1f1f1;
}

/* Asegurar que el menú aparece flotante y en la posición correcta */
.dropdown-menu {
    display: none;
    position: fixed; /* Cambiado de absolute a fixed para mayor control */
    z-index: 1050;
    min-width: 140px;
    border-radius: 8px;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
    background: white;
    padding: 5px 0;
}

/* Mostrar el menú cuando tiene la clase .show */
.dropdown-menu.show {
    display: block;
}

/* Opciones dentro del menú */
.dropdown-item {
    font-size: 14px;
    padding: 8px 12px;
}

.dropdown-item i {
    margin-right: 8px;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* --------- Estilos de paginación DataTables --------- */

/* Botón de la página actual (seleccionado) */
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: #2F9F5A !important; /* Fondo verde */
    color: white !important; /* Texto blanco */
    border: none !important; /* Sin borde */

    font-weight: bold;
    padding: 6px 12px;
}

/* Forzar color blanco en el número seleccionado */
.dataTables_wrapper .dataTables_paginate .paginate_button.current a {
    color: white !important;
}

/* Hover para el botón seleccionado */
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background-color: #27377d !important; /* Un tono más oscuro */
}

/* Botones normales (no seleccionados) */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    background-color: white !important; /* Fondo blanco */
    color: #277D49 !important; /* Texto verde */
    border: none !important; /* Sin borde */
    font-weight: bold;
    margin: 0 3px;
    padding: 6px 12px;
}

/* Hover en botones normales */
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background-color: rgba(47, 159, 90, 0.1) !important; /* Verde muy claro */
    color: #277D49 !important;
}

/* Deshabilitar el fondo gris predeterminado en DataTables */
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    color: #cccccc !important;
    background-color: transparent !important;
    border-color: transparent !important;
}

/* ------ Flechas en lugar de "Anterior" y "Siguiente" ------ */

/* Ocultar el texto "Anterior" y "Siguiente" */
.dataTables_wrapper .dataTables_paginate .paginate_button.previous,
.dataTables_wrapper .dataTables_paginate .paginate_button.next {
    text-indent: -9999px; /* Oculta el texto */
    width: 30px;
    height: 30px;
    text-align: center;
    display: inline-block;
    position: relative;
    padding: 6px 10px;
    border: none !important; /* Sin borde */
    background: transparent !important; /* Sin fondo */
}

/* Flecha izquierda */
.dataTables_wrapper .dataTables_paginate .paginate_button.previous::after {
    content: "«";
    font-size: 18px;
    font-weight: bold;
    color: #277D49; /* Flecha verde */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-indent: 0;
}

/* Flecha derecha */
.dataTables_wrapper .dataTables_paginate .paginate_button.next::after {
    content: "»";
    font-size: 18px;
    font-weight: bold;
    color: #277D49; /* Flecha verde */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-indent: 0;
}

/* Hover en las flechas */
.dataTables_wrapper .dataTables_paginate .paginate_button.previous:hover::after,
.dataTables_wrapper .dataTables_paginate .paginate_button.next:hover::after {
    color: #2F9F5A !important; /* Verde más claro al pasar el mouse */
}

/* Fondo de la pantalla de carga */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75); /* Fondo oscuro semitransparente */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Estilo del spinner */
.loading-spinner {
    text-align: center;
}

/* Ajusta el tamaño del spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Ocultar el botón de menú en escritorio */
.mobile-menu {
    display: none;
}

/* Mostrar el botón de menú en dispositivos móviles */
@media (max-width: 768px) {
    .mobile-menu {
        display: table-cell;
        text-align: right;
    }

    .mobile-menu button {
        background: none;
        border: none;
        color: #333;
        font-size: 1.2rem;
    }
}

/* Asegurar que el menú desplegable se muestre en la parte superior en móviles */
.dropdown-menu {
    position: absolute;
    z-index: 1050;
    min-width: 140px;
    border-radius: 8px;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
    background: white;
    padding: 5px 0;
}

/* Ajustar posición del menú en móviles */
@media (max-width: 768px) {
    .dropdown-menu {
        right: auto;
        left: auto;
        transform: translateX(0); /* Evitar que se desplace fuera */
        min-width: 150px;
        z-index: 1050;
    }
}

.card {

    border: none;
}

.card-header {


    color: #000000;
    font-weight: bold;
}



.dropdown-menu {
    background-color: #ffffff;
}

.dropdown-item {
    color: #051910;
}

.dropdown-item:hover {
    background-color: #DBE2DA;
    color: #000000;
}

#filtrosContainer {
    background-color: #FFFFFF;

    padding: 10px;

}
