table.dataTable thead .sorting, table.dataTable thead .sorting_asc, table.dataTable thead .sorting_asc_disabled, table.dataTable thead .sorting_desc, table.dataTable thead .sorting_desc_disabled {
    background: transparent
}

table th {
    font-weight: 400
}

table.dataTable thead .sorting:after {
    content: "\f0dc";
    margin-left: 10px;
    font-family: fontawesome !important;
    cursor: pointer;
    color: rgba(50, 50, 50, 0.5);
}

table.dataTable thead .sorting_asc:after {
    content: "\f0de";
    margin-left: 10px;
    font-family: fontawesome;
    cursor: pointer;
}

.custom-modal-saldo {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.custom-modal-content-saldo {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    width: 100%;
    max-width: 1200px;
    position: relative;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
}

.modal-title {
    color: rgb(255, 108, 14);
    text-align: center;
    margin-bottom: 10px;
}

.table-container-saldo {
    overflow-x: auto;
}

th {
    background-color: rgb(25, 78, 144);
    color: white;
    padding: 10px;
    text-align: center;
    vertical-align: middle;
    border-top: 1px solid gray;
    border-bottom: 1px solid gray;
}

#saldoTable tbody tr {
    text-align: center;
    vertical-align: middle;
}

.dt-button {
    background-color: rgb(255, 108, 14);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.dt-buttons {
    background-color: rgb(255, 108, 14);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.dt-button:hover {
    background-color: rgb(25, 78, 144);
    color: white;
}

.expand-container {
    position: relative;
}

.expand-btn {
    background-color: rgb(13, 197, 87);
    color: white;
    border: none;
    padding: 5px 10px;
    height: 100%;
    border-radius: 5px;
    cursor: pointer;
}

/* Estilos para el botón de exportación */
.btn-export-left {
    background-color: rgb(255, 108, 14);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
}

.btn-export-left:hover {
    background-color: rgb(255, 108, 14);
    color: white;
}

/* Contenedor para los botones desplegados */
.dt-button-collection {
    display: none; 
    flex-direction: column; 
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-16%);
    background-color: white;
    border: 1px solid grey;
    border-radius: 5px;
    overflow: hidden;
    z-index: 1000;
}

.dt-button-collection button {
    background-color: rgb(255, 108, 14);
    margin: 5px;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    width: 93%;
}

.dt-button-collection button:hover {
    background-color: rgb(25, 78, 144);
    color: white;
}

.dropdown-toggle::after {
    display: inline-block;
    margin-left: .255em;
    vertical-align: .255em;
    content: "";
    border-top: .3em solid;
    border-right: .3em solid transparent;
    border-bottom: 0;
    border-left: .3em solid transparent;
}

.dt-buttons .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    float: left;
    min-width: 10rem;
    padding: .5rem 0;
    margin: .125rem 0 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: .25rem;
}

.dt-buttons .dropdown-menu .dropdown-item {
    display: block;
    width: 100%;
    padding: .25rem 1.5rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}

.dt-buttons .dropdown-menu .dropdown-item:hover {
    background-color: rgb(255, 108, 14);
    color: white;
}

.dt-buttons .btn-export-left:hover + .dropdown-menu,
.dt-buttons .dropdown-menu:hover {
    display: block;
}

.button-group {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border: 1px solid grey;
    border-radius: 5px;
    overflow: hidden;
}

.button-group.hidden {
    display: none;
}

.button-group button {
    background-color: grey;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
}

.button-group button:hover {
    background-color: rgb(255, 108, 14);
    color: white;
}

.btn-primary {
    background-color: rgb(255, 108, 14);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    color: white;
}

.btn-primary:hover {
    background-color: rgb(25, 78, 144);
}

.btn-secondary {
    background-color: grey;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    color: white;
}

.btn-secondary:hover {
    background-color: rgb(255, 108, 14);
}

/* Estilos para los elementos input */
.custom-modal-saldo input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.custom-modal-saldo input:focus {
    border-color: rgb(255, 108, 14);
    outline: none;
}

/* Clases personalizadas para DataTable */
.top {
    display: flex;
    flex-direction: column;
}

.export-container {
    margin-bottom: 1rem;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.dt-button-collection {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.custom-flex {
    display: flex;
    justify-content: space-between;
}

.bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Estilos para alinear el label y el input de búsqueda */
.dataTables_filter {
    display: flex;
    align-items: center;
}

.dataTables_filter label {
    margin-right: 10px;
}

.dataTables_filter input {
    width: auto; 
    flex: 1; 
}

/* Estilos para alinear el label y el select de longitud */
.dataTables_length {
    display: flex;
    align-items: center;
}

.dataTables_length label {
    margin-right: 10px;
}

/* Estilos para el selector de longitud de DataTables */
.dataTables_length select {
    width: auto;
    flex: 1;
    border-top: none;
    border-right: none;
    border-left: none;
    background-color: transparent; 
    padding: 5px;
    font-size: 1rem;
    color: #333;
}

/* Estilos para el contenedor del selector de longitud */
.dataTables_length {
    display: flex;
    align-items: center;
}

.dataTables_length label {
    margin-right: 10px;
    font-size: 1rem; 
    color: #333; 
}

/* Estilos para los botones de paginación */
.dataTables_paginate {
    display: flex;
    justify-content: center;
    margin-top: 10px; 
}

.dataTables_paginate span {
    display: flex;
    justify-content: center;
    align-items: center;
}

.dataTables_paginate .paginate_button {
    background-color: white;
    color: #67757c;
    border: 1px solid #ddd;
    padding: 5px 10px;
    border-radius: 10%;
    cursor: pointer;
    margin: 0 5px; 
}

.dataTables_paginate .paginate_button:hover {
    background-color: rgb(25, 78, 144); 
    color: white;
}

.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.current:hover {
    color: #ffffff !important;
    border: 1px solid rgb(255, 108, 14);
    background-color: rgb(255, 108, 14);
}

.dataTables_paginate .paginate_button.disabled,
.dataTables_paginate .paginate_button.disabled:active,
.dataTables_paginate .paginate_button.disabled:hover {
    cursor: default;
    color: #67757c;
    border: 1px solid #ddd;
    background: transparent;
    -webkit-box-shadow: none;
    box-shadow: none;
}

.dataTables_paginate .ellipsis {
    padding: 0 1em;
}

/* Segundo modal */
.custom-modal-detail {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.custom-modal-content-detail {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    width: auto;          
    min-width: 300px;     
    max-width: none;      
    position: relative;
    min-height: auto;
    max-height: 98vh;
}

.custom-modal-detail.show {
    display: flex;
}

.detail-table {
    width: auto;        
    min-width: 100%;      
    border-collapse: collapse;
    table-layout: fixed;   
}

.detail-table td {
    padding: 10px;
    border: 1px solid #ddd;
    vertical-align: top;
    white-space: nowrap;  
    overflow: hidden;    
    text-overflow: ellipsis; 
}

.detail-table td:first-child {
    width: 200px;         
    min-width: 150px;
    font-weight: bold;
    background-color: #f2f2f2;
}

.detail-table td:nth-child(2) {
    width: auto;         
    min-width: 300px;     
}

.detail-table td:hover {
    white-space: normal;  
    z-index: 10;          
    position: relative;   
}

/* Estilos responsivos para pantallas menores a 991px */
@media (max-width: 991px) {
    .export-container,
    .dataTables_info {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin-bottom: 5px;
    }

    .export-container {
        justify-content: center;
    }

    .dataTables_length,
    .dataTables_filter,
    .dataTables_paginate {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin-bottom: 5px;
    }

    .dataTables_length label,
    .dataTables_filter label,
    .dataTables_info,
    .dataTables_paginate {
        width: auto;
        text-align: center;
        font-size: 0.75rem; 
    }

    .dataTables_length select,
    .dataTables_filter input {
        width: auto;
        margin-top: 3px; /* Reducir margen superior */
        padding: 3px; /* Reducir padding */
        font-size: 0.75rem; /* Reducir tamaño de fuente */
    }

    .dataTables_paginate .paginate_button {
        width: auto;
        margin: 3px 0px; /* Reducir margen */
        padding: 3px 5px; /* Reducir padding */
        font-size: 0.75rem; /* Reducir tamaño de fuente */
    }

    .btn-export-left {
        padding: 3px 5px; /* Reducir padding */
        font-size: 0.75rem; /* Reducir tamaño de fuente */
    }

    .dt-button-collection {
        width: auto;
        left: 50%;
        transform: translateX(-30%); /* Alinear al centro */
        padding: 2px; /* Reducir padding */
        font-size: 0.65rem; /* Reducir tamaño de fuente */
    }

    .custom-flex,
    .bottom {
        flex-direction: column;
        align-items: center;
    }

    .custom-flex > * {
        width: 100%;
        margin-bottom: 5px; /* Reducir margen inferior */
    }

    .bottom > * {
        width: 100%;
        margin-bottom: 5px; /* Reducir margen inferior */
    }

    .custom-modal-content-detail {
        width: 95%; /* Ajustar el ancho del modal */
        padding: 15px; /* Reducir el padding */
    }

    .detail-table {
        font-size: 0.75rem; /* Reducir el tamaño de fuente de la tabla */
    }

    .detail-table td {
        padding: 5px; /* Reducir el padding de las celdas */
    }

    .detail-table td:first-child {
        width: 40%;         /* Ancho mayor para etiquetas en móviles */
    }
    
    .detail-table td:nth-child(2) {
        width: 60%;         /* Ancho menor para valores en móviles */
    }

    .custom-modal-detail.show {
        display: flex;
        justify-content: center;
        align-items: center;
        overflow-y: auto; /* Permitir el desplazamiento vertical si es necesario */
    }
}

label {
    font-weight: 500;
}

.modal {
    overflow-y:auto;
}

.modal-backdrop {
    z-index: 1040 !important;
}

hr {
    margin-top: 1.4rem;
    margin-bottom: 1.4rem;
    border: 0;
    border-top: 2px solid rgba(0, 0, 0, 0.3);
}

hr {
    margin-top: 1.4rem;
    margin-bottom: 1.4rem;
    border: 0;
    border-top: 2px solid rgba(0, 0, 0, 0.3);
}

.dataTables_filter input {
    margin-left: 1rem; /* Aplica un margen derecho al contenedor del campo de búsqueda */
}

/* Estilo para el botón desplegable */
.btn-dropdown {
    background-color: transparent; /* Fondo transparente */
    color: rgb(255, 108, 14); /* Letras en naranja */
    border: 2px solid rgb(255, 108, 14); /* Contorno en naranja */
    padding: 5px 10px; /* Espaciado interno */
    border-radius: 5px; /* Bordes redondeados */
    font-size: 14px; /* Tamaño de fuente */
    cursor: pointer; /* Cambiar el cursor al pasar sobre el botón */
    display: inline-flex; /* Alinear el texto y el ícono */
    align-items: center; /* Centrar verticalmente */
    justify-content: center; /* Centrar horizontalmente */
    gap: 5px; /* Espaciado entre el texto y el ícono */
}

/* Cambiar el color al pasar el cursor */
.btn-dropdown:hover {
    background-color: rgba(255, 108, 14, 0.1); /* Fondo ligeramente naranja */
    color: rgb(255, 108, 14); /* Letras en naranja */
    border-color: rgb(255, 108, 14); /* Mantener el contorno en naranja */
}

/* Estilo para el ícono del triángulo hacia abajo */
.btn-dropdown::after {
    content: ""; /* Agregar un triángulo */
    display: inline-block;
    margin-left: 5px;
    border-top: 5px solid rgb(255, 108, 14); /* Triángulo naranja */
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
    vertical-align: middle;
}

/* Estilo para el menú desplegable */
.dropdown-menu {
    background-color: white; /* Fondo blanco */
    border: 1px solid rgba(0, 0, 0, 0.1); /* Contorno gris claro */
    border-radius: 5px; /* Bordes redondeados */
    padding: 5px 0; /* Espaciado interno */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Sombra */
}

/* Estilo para los elementos del menú */
.dropdown-menu .dropdown-item {
    color: rgb(255, 108, 14); /* Letras en naranja */
    padding: 5px 15px; /* Espaciado interno */
    font-size: 14px; /* Tamaño de fuente */
    text-align: left; /* Alinear texto a la izquierda */
    transition: background-color 0.3s ease, color 0.3s ease; /* Transición suave */
}

/* Cambiar el color al pasar el cursor sobre los elementos del menú */
.dropdown-menu .dropdown-item:hover {
    background-color: rgba(255, 108, 14, 0.1); /* Fondo ligeramente naranja */
    color: rgb(255, 108, 14); /* Letras en naranja */
}

@media print {
    th, td {
        padding: 8px; /* Reducir ligeramente el padding para mantener el formato */
        font-size: 13px; /* Reducir el tamaño de la fuente */
        text-align: center; /* Mantener el texto centrado */
        vertical-align: middle; /* Asegurar alineación vertical */
    }

    table {
        width: 100%; /* Asegurar que la tabla ocupe todo el ancho disponible */
        border-collapse: collapse; /* Eliminar espacios entre bordes */
    }

    th {
        background-color: rgb(25, 78, 144) !important; /* Mantener el color del encabezado */
        color: rgb(60, 60, 60) !important; /* Mantener el texto blanco */
        font-weight: bold;
        border-top: 1px solid gray; /* Bordes superiores */
        border-bottom: 1px solid gray; /* Bordes inferiores */
    }

    td {
        border-bottom: 1px solid gray; /* Asegurar bordes visibles */
    }

    /* Reducir márgenes y espacios para impresión */
    body {
        margin: 0;
        padding: 0;
    }

    .dataTables_wrapper {
        margin: 0;
        padding: 0;
    }

    /* Mantener el formato original de la tabla */
    .dataTables_filter, .dataTables_length, .dataTables_info, .dataTables_paginate {
        display: none; /* Ocultar controles innecesarios al imprimir */
    }
}