/* Custom Styles for Liquidaciones System */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Login Page */
.min-vh-100 {
    min-height: 100vh;
}

.card {
    border: none;
    border-radius: 10px;
}

.card-shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Navbar */
.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

/* Tables */
.table-responsive {
    border-radius: 5px;
}

#liquidacionesTable {
    font-size: 0.9rem;
}

#liquidacionesTable thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

/* Status Badges */
.badge-status {
    padding: 0.35em 0.65em;
    font-size: 0.85em;
}

/* Detail View */
.detail-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f5;
}

.info-label {
    font-weight: 600;
    color: #6c757d;
}

.info-value {
    color: #212529;
}

/* Summary Cards */
.summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.summary-card h6 {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.summary-card .amount {
    font-size: 1.75rem;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .detail-header {
        padding: 1rem;
    }
    
    .summary-card .amount {
        font-size: 1.5rem;
    }
    
    #liquidacionesTable {
        font-size: 0.8rem;
    }
}

/* Print Styles */
@media print {
    @page {
        size: auto;
        margin: 15mm;
    }
    
    body {
        margin: 0;
        padding: 0;
    }
    
    .navbar,
    .modal-header,
    .modal-footer,
    .btn,
    .modal-backdrop,
    .card,
    .container-fluid {
        display: none !important;
    }
    
    .modal {
        position: static !important;
        display: block !important;
    }
    
    .modal-dialog {
        max-width: 100% !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    .modal-content {
        border: none !important;
        box-shadow: none !important;
    }
    
    .modal-body {
        padding: 0 !important;
        display: block !important;
    }
    
    #detalleContent {
        display: block !important;
        width: 100% !important;
    }
    
    .detail-header {
        background: #f8f9fa !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .table {
        page-break-inside: auto;
    }
    
    .table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    
    .detail-section {
        page-break-inside: auto;
        margin-bottom: 1.5rem;
    }
    
    .detail-section h5 {
        page-break-after: avoid;
    }
    
    .detail-header {
        page-break-after: avoid;
    }
    
    .total-section {
        page-break-inside: avoid;
    }
    
    .table-detail thead {
        background-color: #f8f9fa !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .table-detail tfoot {
        background-color: #e9ecef !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .table-success {
        background-color: #d1e7dd !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .table-primary {
        background-color: #cfe2ff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .total-section {
        background-color: #f8f9fa !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .border-bottom-thick {
        border-bottom: 3px solid #000 !important;
    }
    
    /* Asegurar que las columnas de Bootstrap se muestren */
    .row {
        display: flex !important;
        flex-wrap: wrap !important;
    }
    
    .col-md-6 {
        width: 50% !important;
        float: left !important;
    }
    
    .col-md-8 {
        width: 66.666667% !important;
        float: left !important;
    }
    
    .col-md-4 {
        width: 33.333333% !important;
        float: left !important;
    }
    
    /* Forzar visibilidad de todas las secciones */
    .detail-section,
    .detail-header,
    .total-section {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* DataTables Custom */
.dataTables_wrapper .dataTables_length select {
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.dataTables_wrapper .dataTables_filter input {
    padding: 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
}

/* Buttons */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Modal */
.modal-xl {
    max-width: 1200px;
}

/* Tables in Detail */
.table-detail {
    font-size: 0.9rem;
}

.table-detail thead {
    background-color: #f8f9fa;
}

.table-detail tfoot {
    background-color: #e9ecef;
    font-weight: 600;
}

/* Total Section */
.total-section {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.total-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Alert Customization */
.swal2-popup {
    border-radius: 10px;
}

/* Border utilities */
.border-bottom-thick {
    border-bottom: 3px solid #000 !important;
}
