/* ESTILOS PARA ESTADOS */
.estado-1 {
    background-color: rgba(0, 0, 255, 0.1);
}

.estado-2 {
    background-color: rgba(255, 193, 7, 0.1);
}

.estado-3 {
    background-color: rgba(255, 0, 0, 0.1);
}

/* ESTILOS BASE PARA TABLA */
#tablaJuntas thead th {
    background-color: #9faec5;
    color: white;
    vertical-align: middle;
    position: relative;
    padding: 12px 15px;
}

/* ESTILOS PARA VISTA ESCRITORIO (md y lg) */
@media (min-width: 768px) {
    #tablaJuntas thead {
        display: table-header-group;
    }

    #tablaJuntas tr {
        display: table-row;
    }

    #tablaJuntas td {
        display: table-cell;
    }

    /* Iconos de ordenación solo en desktop */
    #tablaJuntas thead th.sorting:after,
    #tablaJuntas thead th.sorting_asc:after,
    #tablaJuntas thead th.sorting_desc:after {
        position: absolute;
        right: 8px;
        color: white;
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
    }

    #tablaJuntas thead th.sorting:after {
        content: "\f0dc";
        opacity: 0.5;
    }

    #tablaJuntas thead th.sorting_asc:after {
        content: "\f0de";
    }

    #tablaJuntas thead th.sorting_desc:after {
        content: "\f0dd";
    }
}

/* ESTILOS PARA VISTA MÓVIL (sm y xs) */
@media (max-width: 767.98px) {
    #tablaJuntas thead {
        display: none;
    }

    #tablaJuntas tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 0.25rem;
    }

    #tablaJuntas td {
        display: flex;
        justify-content: space-between;
        width: 100%;
        padding: 0.5rem;
        border-bottom: 1px solid #f0f0f0;
    }

    #tablaJuntas td::before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 1rem;
    }

    #tablaJuntas td:last-child {
        border-bottom: none;
    }
}

/* ESTILOS COMPARTIDOS */
#tablaJuntas td:nth-child(5),
#tablaJuntas td:nth-child(7) {
    white-space: nowrap;
}

.badge {
    font-size: 0.85rem;
    padding: 0.5em 0.75em;
}

.filter-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0.5rem 0;
}

.filter-container .form-select {
    width: 150px;
    margin-left: 10px;
}

/* ESTILOS DATA TABLES (si es necesario) */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    margin: 1rem 0;
}

.dt-buttons .btn {
    margin: 0 5px 5px 0;
}