/* Estilos para Reportes de Documentos Faltantes */

#docfalt-reportes-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 100%;
    margin: 20px 0;
}

#docfalt-reportes-container h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8em;
    font-weight: 600;
}

/* Estadísticas */
.docfalt-reportes-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-number {
    display: block;
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}



/* Estilos de DataTables */
#docfalt-reportes-table {
    width: 100% !important;
    border-collapse: collapse;
    font-size: 14px;
}

#docfalt-reportes-table thead th {
    background: #34495e;
    color: white;
    padding: 12px 8px;
    font-weight: 600;
    text-align: left;
    border: none;
}

#docfalt-reportes-table tbody td {
    padding: 10px 8px;
    border-bottom: 1px solid #ecf0f1;
    vertical-align: middle;
}

#docfalt-reportes-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Badges de estado */
.estado-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.estado-aprobado {
    background-color: #d4edda;
    color: #155724;
}

.estado-en-subsanación {
    background-color: #fff3cd;
    color: #856404;
}

.estado-pre-aprobado {
    background-color: #cce5ff;
    color: #004085;
}

.estado-rechazado {
    background-color: #f8d7da;
    color: #721c24;
}

/* Controles de DataTables */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    margin: 10px 0;
    color: #2c3e50;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    padding: 5px;
    margin: 0 5px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    padding: 5px 10px;
    margin: 0 2px;
    background: white;
    color: #2c3e50 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #ecf0f1 !important;
    color: #2c3e50 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #3498db !important;
    color: white !important;
    border-color: #3498db;
}

/* Botones de exportación */
.dt-buttons {
    margin-bottom: 10px;
}

.dt-button {
    background: #3498db !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    margin-right: 5px !important;
    font-size: 0.9em !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

.dt-button:hover {
    background: #2980b9 !important;
}

.dt-button.buttons-excel {
    background: #27ae60 !important;
}

.dt-button.buttons-excel:hover {
    background: #229954 !important;
}

.dt-button.buttons-pdf {
    background: #e74c3c !important;
}

.dt-button.buttons-pdf:hover {
    background: #c0392b !important;
}

.dt-button.buttons-print {
    background: #f39c12 !important;
}

.dt-button.buttons-print:hover {
    background: #e67e22 !important;
}

/* Mensaje de no datos */
.docfalt-no-data {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 10px;
    color: #6c757d;
}

.docfalt-no-data p {
    font-size: 1.1em;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .docfalt-reportes-stats {
        flex-direction: column;
    }
    
    .stat-item {
        min-width: auto;
    }
    
    #docfalt-reportes-table {
        font-size: 0.9em;
    }
    
    #docfalt-reportes-table thead th,
    #docfalt-reportes-table tbody td {
        padding: 8px 4px;
    }
    
    .dt-buttons {
        text-align: center;
    }
    
    .dt-button {
        margin-bottom: 5px;
        font-size: 0.8em;
        padding: 6px 8px;
    }
}

/* Scroll horizontal para tablas grandes */
.dataTables_wrapper {
    overflow-x: auto;
}

/* Estilos para el loader */
.dataTables_processing {
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 5px !important;
    color: #2c3e50 !important;
    font-weight: 600 !important;
}

/* Estilos para el botón de detalles */
.btn-ver-detalles {
   background: #0499a9;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.8em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-ver-detalles:hover {
    background: #2980b9;
}

/* Estilos para el modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 10px;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

.modal-content h2 {
    color: #009688;
    margin-bottom: 20px;
    padding-right: 30px;
    font-size: 20px;
    text-transform: uppercase;
    font-weight: 400;
}

.detalles-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
    border: none;
}

.detalles-table tr {
    border-bottom: 1px solid #ecf0f1;
}

.detalles-table td {
    padding: .5em 1em;
    vertical-align: top;
}

.detalles-table td:first-child {
    width: 162px;
    font-weight: 600;
    color: #5e5e5e;
}

.detalles-table ul {
    margin: 0;
    padding-left: 20px;
}

.detalles-table li {
    margin-bottom: 5px;
}

/* Estilos para documentos y links */
.doc-link {
    color: #e74c3c;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 4px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.doc-link:hover {
    background-color: #e74c3c;
    color: white;
    text-decoration: none;
}

.doc-link i {
    font-size: 0.9em;
}

.docs-list {
    max-height: 200px;
    overflow-y: auto;

}

.doc-item {
    margin-bottom: 0px;
    padding: 5px 0;
}

.doc-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.doc-pendiente {
    color: #6c757d;
    font-style: italic;
}

.doc-pendiente i {
    color: #f39c12;
}

/* Responsive para el modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }
    
    .detalles-table td:first-child {
        width: 100px;
        font-size: 0.9em;
    }
    
    .docs-list {
        max-height: 150px;
    }
    
    .doc-link {
        font-size: 0.9em;
        padding: 4px 6px;
    }
}

/* Estilos para el indicador de carga de exportación */
.export-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    z-index: 9999;
    font-size: 16px;
    text-align: center;
}

/* Estilos para los botones de exportación personalizados */
.btn-excel-all,
.btn-pdf-all,
.btn-csv-all {
    background: #27ae60 !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    margin-right: 5px !important;
    font-size: 0.9em !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

.btn-excel-all:hover,
.btn-pdf-all:hover,
.btn-csv-all:hover {
    background: #229954 !important;
}

.btn-pdf-all {
    background: #e74c3c !important;
}

.btn-pdf-all:hover {
    background: #c0392b !important;
}

.btn-csv-all {
    background: #f39c12 !important;
}

.btn-csv-all:hover {
    background: #e67e22 !important;
}