/* ==================== */
/* GENERAL STYLES       */
/* ==================== */
.hidden {
    display: none !important;
}

/* ==================== */
/* TOP BAR              */
/* ==================== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 13px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin: 0 0 20px 0;
    gap: 10px;
    flex-wrap: wrap;
}

.tabs-section {
    display: flex;
    gap: 35px;
    align-items: center;
}

.actions-section {
    display: flex;
    gap: 10px;
    align-items: center;
}

.tab {
    background: none;
    border: none;
    padding: 10px 15px;
    font-weight: bold;
    color: #5A108F;
    cursor: pointer;
}

.tab.active {
    background: #5A108F;
    color: white;
    border-radius: 5px;
}

/* Tab status variants */
.tab-repetidas {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.tab-repetidas.active {
    color: #fff;
    background-color: #ffc107;
    border-color: #ffc107;
}

.tab-noCargadas {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.tab-noCargadas.active {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

/* ==================== */
/* BUTTONS              */
/* ==================== */
.upload-btn,
.btn-primary {
    background: #000;
    color: #fff;
    padding: 12px 53px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 900;
    transition: all 0.3s ease;
}

.upload-btn:hover,
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(90, 16, 143, 0.4);
    background: linear-gradient(135deg, #6843b2 0%, #5A108F 100%);
    color: white;
}

.upload-btn:disabled {
    background-color: #aaa;
    color: #eee;
    cursor: not-allowed;
    pointer-events: none;
}

#undoFilterBtn {
    background-color: #333;
    color: #f5f5f5;
    border: 1px solid #555;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-left: 15px;
}

#undoFilterBtn:hover {
    background-color: #444;
}

/* Retry button */
.reintentar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #5A108F;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 8px 14px;
    min-width: 140px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(90, 16, 143, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.reintentar-btn:hover {
    background-color: #6c1ab8;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(90, 16, 143, 0.3);
}

.reintentar-btn i {
    font-size: 16px;
    line-height: 0;
}

.reintentar-btn:hover i {
    animation: girar 1s ease;
}

.reintentar-btn:disabled {
    background-color: #aaa;
    color: #eee;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Action buttons for non-loaded items */
.retry-btn {
    background-color: #5A108F;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background-color: #7b1bc0;
    transform: translateY(-2px);
}

.delete-btn-no-cargado {
    background-color: transparent;
    color: #e74c3c;
    border: 1px solid #e74c3c;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-btn-no-cargado:hover {
    background-color: #e74c3c;
    color: white;
}

.actions-container {
    display: flex;
    gap: 8px;
}

/* Centrar grupo de botones dentro de la celda */
.btn-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* ==================== */
/* MODALS               */
/* ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

/* Base modal content */
.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    width: 800px;
    position: relative;
    height: 468px;
}

/* Upload modal */
.modal-content-upload {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 30px;
    width: 90%;
    max-width: 800px;
    margin: 5% auto;
    position: relative;
    animation: modalFadeIn 0.4s ease-out;
    border: 2px solid rgba(90, 16, 143, 0.2);
    text-align: center;
    height: auto;
    min-height: 468px;
}

.modal-content-upload h2 {
    color: #5A108F;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(90, 16, 143, 0.2);
}

/* ==================== */
/* MODAL CARGA MANUAL MEJORADO */
/* ==================== */
.modal-content-manual {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 0;
    border-radius: 20px;
    width: 1350px;
    position: relative;
    max-height: 94vh;
    overflow: hidden;
    margin: 25px auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    border: 2px solid #6843b2;
    color: #f5f5f5;
    animation: modalSlideIn 0.4s ease-out;
}

.modal-content-manual h2 {
    background: linear-gradient(135deg, #6843b2 0%, #5A108F 100%);
    color: white;
    font-size: 1.8rem;
    text-align: center;
    margin: 0;
    padding: 25px 30px;
    font-weight: 600;
    position: relative;
    border-radius: 20px 20px 0 0;
}

.modal-content-manual h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.modal-content-manual form {
    padding: 30px;
    max-height: calc(94vh - 120px);
    overflow-y: auto;
}

.modal-content-manual .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.modal-content-manual .form-group {
    position: relative;
}

.modal-content-manual .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #e9ecef;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-content-manual .form-group input,
.modal-content-manual .form-group select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #404040;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #2a2a2a;
    color: #f5f5f5;
    box-sizing: border-box;
}

.modal-content-manual .form-group input:focus,
.modal-content-manual .form-group select:focus {
    outline: none;
    border-color: #6843b2;
    box-shadow: 0 0 0 3px rgba(104, 67, 178, 0.2);
    background: #333333;
    transform: translateY(-2px);
}

/* Indicador visual para campos requeridos */
.modal-content-manual .form-group label[for*="required"]::after,
.modal-content-manual .form-group label:has(+ input[required])::after {
    content: ' *';
    color: #dc3545;
    font-weight: bold;
}

.modal-content-manual .form-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #404040;
}

.modal-content-manual .form-actions button {
    padding: 15px 40px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 180px;
}

/* Dark modal content */
.modal-contentt {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    width: 800px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(90, 16, 143, 0.4);
    border: 2px solid #6843b2;
    color: #f5f5f5;
    animation: fadeIn 0.3s ease-out;
}

.modal-contentt h2 {
    color: #fff;
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #6843b2;
}

/* Close buttons */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    color: #aaa;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #fff;
}

.close-btn-manual {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.close-btn-manual:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Scrollbar personalizado para modales */
.modal-content-manual form::-webkit-scrollbar,
.autocomplete-suggestions::-webkit-scrollbar {
    width: 8px;
}

.modal-content-manual form::-webkit-scrollbar-track,
.autocomplete-suggestions::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.modal-content-manual form::-webkit-scrollbar-thumb,
.autocomplete-suggestions::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6843b2 0%, #5A108F 100%);
    border-radius: 4px;
}

.modal-content-manual form::-webkit-scrollbar-thumb:hover,
.autocomplete-suggestions::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5A108F 0%, #4a0080 100%);
}

/* Scrollbar personalizado para sugerencias */
.autocomplete-suggestions::-webkit-scrollbar {
    width: 8px;
}

.autocomplete-suggestions::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.autocomplete-suggestions::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6843b2 0%, #5A108F 100%);
    border-radius: 4px;
}

.autocomplete-suggestions::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5A108F 0%, #4a0080 100%);
}

/* Responsive para modales mejorados */
@media (max-width: 1400px) {
    .modal-content-manual {
        width: 95%;
        max-width: 1200px;
    }
    
    .modal-content-manual .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== */
/* DRAG & DROP ZONE     */
/* ==================== */
.drop-zone {
    border: 3px dashed #6843b2;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    margin: 20px 0;
    background-color: rgba(104, 67, 178, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    height: auto;
    min-height: 150px;
}

.drop-zone:hover,
.drop-zone.drag-over {
    background-color: rgba(104, 67, 178, 0.2);
    border-color: #9c6eff;
}

.drop-text {
    font-size: 18px;
    color: #e0aaff;
    margin-bottom: 20px;
}

.select-file-btn {
    display: inline-block;
    background: #6843b2;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.select-file-btn:hover {
    background: #5A108F;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(90, 16, 143, 0.3);
}

.upload-actions {
    margin-top: 25px;
    display: flex;
    justify-content: center;
}

#uploadButton {
    background: linear-gradient(135deg, #6843b2 0%, #5A108F 100%);
    color: white;
    padding: 14px 40px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(90, 16, 143, 0.3);
}

#uploadButton:hover {
    background: linear-gradient(135deg, #5A108F 0%, #4a0080 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(90, 16, 143, 0.4);
}

#uploadButton:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#fileCount,
#fileWarning {
    margin-top: 15px;
    font-size: 14px;
}

#fileCount {
    color: #e0aaff;
}

#fileWarning {
    color: #ff6b6b;
}

/* ==================== */
/* FORM ELEMENTS        */
/* ==================== */
/* Form grid layout */
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

/* Form sections */
.form-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(104, 67, 178, 0.3);
}

.form-section-title {
    color: #e0aaff;
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Form groups */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #e0aaff !important;
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 12px 15px;
    border: 1px solid #6843b2;
    border-radius: 8px;
    background-color: #2a2a2a;
    color: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: rgb(242, 0, 255);
    box-shadow: 0 0 10px rgba(242, 0, 255, 0.3);
    background-color: #3a3a3a;
}

/* Numeric fields */
.form-group input[type="number"] {
    text-align: right;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* Amounts section */
.importes-section {
    background-color: rgba(104, 67, 178, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

/* Form actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(104, 67, 178, 0.3);
}

#calcularTotalBtn {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

#calcularTotalBtn:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(23, 162, 184, 0.4);
}

#guardarComprobanteBtn {
    background: linear-gradient(135deg, #6843b2 0%, #5A108F 100%);
    color: white;
}

#guardarComprobanteBtn:hover {
    background: linear-gradient(135deg, #5A108F 0%, #4a0080 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(90, 16, 143, 0.4);
}

#guardarComprobanteBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(104, 67, 178, 0.3);
}

/* Total field */
.total-field {
    grid-column: span 3;
    background-color: rgba(104, 67, 178, 0.2);
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.total-field label {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.total-field input {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background-color: rgba(90, 16, 143, 0.3);
    border: 2px solid #6843b2;
}

/* ==================== */
/* CHECKBOXES           */
/* ==================== */
.tipo-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: none;
    padding: 0;
    margin: 0 0 20px 0;
    color: #f5f5f5;
}

.tipo-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px 10px;
    border-radius: 6px;
}

.tipo-option:hover {
    background-color: rgba(104, 67, 178, 0.2);
}

.tipo-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #5a108f;
    cursor: pointer;
}

.select-all {
    border-bottom: 1px solid #6843b2;
    padding-bottom: 12px;
    margin-bottom: 8px;
}

.tipos-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    padding: 8px 10px;
    border-radius: 6px;
}

.checkbox-wrapper:hover {
    background-color: rgba(104, 67, 178, 0.2);
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #5a108f;
    cursor: pointer;
}

.checkbox-wrapper label {
    font-size: 14px;
    color: #f5f5f5;
    margin: 0;
    cursor: pointer;
}

/* ==================== */
/* LOADING OVERLAY      */
/* ==================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-content {
    text-align: center;
    color: white;
    background: rgba(90, 16, 143, 0.2);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(90, 16, 143, 0.3);
    animation: pulse 2s infinite;
}

.spinner {
    width: 70px;
    height: 70px;
    border: 4px solid transparent;
    border-top: 4px solid #5A108F;
    border-right: 4px solid #5A108F;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
    position: relative;
}

.spinner::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 4px solid rgba(90, 16, 143, 0.1);
    border-radius: 50%;
}

#loadingText {
    font-size: 20px;
    color: #ffffff;
    margin-top: 20px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.loading-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    text-align: center;
    min-width: 300px;
}

/* ==================== */
/* NOTIFICATIONS        */
/* ==================== */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

.processing-notification {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid #5A108F;
}

.processing-notification.success {
    border-left-color: #28a745;
}

.processing-notification.error {
    border-left-color: #dc3545;
}

.processing-notification h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
}

.processing-notification p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* ==================== */
/* STATUS INDICATORS    */
/* ==================== */
.status-processed {
    background-color: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.status-duplicate {
    background-color: #ff9800;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.status-error {
    background-color: #f44336;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}


.status-rejected {
    background-color: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

/* ==================== */
/* TABLES               */
/* ==================== */

/* Header de la tabla: título + botón en una sola línea */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

/* Table container */
.table-container {
    margin: 20px 0;
    width: 100%;
    overflow-x: auto;
}

.tabla {
    min-width: 100%;
}

/* Result container */
.result-box {
    background-color: #fff;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Table styles */
.table th {
    background-color: #6a1b9a;
    color: white;
    font-weight: 500;
}

.table td {
    vertical-align: middle;
}

/* Non-loaded items table */
#tablaNoCargadas table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

#tablaNoCargadas th,
#tablaNoCargadas td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
}

/* Alineación horizontal de columnas de acciones */
#tablaNoCargadas th:nth-child(4),
#tablaNoCargadas td:nth-child(4),
#tablaNoCargadas th:nth-child(5),
#tablaNoCargadas td:nth-child(5) {
    text-align: center;
}

#tablaNoCargadas th {
    background-color: #5A108F;
    color: white;
    font-weight: 500;
}

#tablaNoCargadas tr:hover {
    background-color: rgba(90, 16, 143, 0.05);
}

#tablaNoCargadas .file-name {
    font-weight: 500;
    color: #333;
}

#tablaNoCargadas .error-message {
    font-size: 12px;
    color: #f44336;
    margin-top: 4px;
    display: block;
}

#tablaNoCargadas .apoc-message {
    font-size: 12px;
    color: #9c27b0;
    margin-top: 4px;
    display: block;
}

/* Non-loaded row styles */
.no-cargada-row {
    transition: background-color 0.2s;
}

.no-cargada-row:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.no-cargada-row.apocrifo {
    background-color: rgba(156, 39, 176, 0.08); /* violeta claro */
}


/* File name and error message */
.archivo-nombre {
    font-weight: bold;
    display: flex;
    align-items: center;
}

.error-mensaje {
    margin-top: 5px;
    font-size: 12px;
    color: #721c24;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.error-mensaje:hover {
    white-space: normal;
    overflow: visible;
}

.error-mensaje.apocrifo {
    color: #9c27b0;
    font-weight: 500;
}

/* ==================== */
/* PAGINATION           */
/* ==================== */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px 0;
    border-top: 1px solid rgba(90, 16, 143, 0.1);
}

.pagination-info {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    background: white;
    border: 1px solid #ddd;
    color: #5A108F;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination-btn:hover {
    background-color: rgba(90, 16, 143, 0.1);
    border-color: #5A108F;
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.page-numbers {
    display: flex;
    gap: 8px;
}

.page-number {
    background: white;
    border: 1px solid #ddd;
    color: #333;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-number:hover {
    background-color: rgba(90, 16, 143, 0.1);
    border-color: #5A108F;
}

.page-number.active {
    background: linear-gradient(135deg, #5A108F 0%, #6843b2 100%);
    color: white;
    border-color: #5A108F;
    box-shadow: 0 4px 8px rgba(90, 16, 143, 0.3);
}

/* ==================== */
/* ANIMATIONS           */
/* ==================== */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(90, 16, 143, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(90, 16, 143, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(90, 16, 143, 0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    10% {
        opacity: 1;
        transform: translateY(0);
    }

    90% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

@keyframes girar {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation utility classes */
.pulse-effect {
    animation: pulse 2s infinite;
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

/* ==================== */
/* AUTOCOMPLETADO MEJORADO */
/* ==================== */
.autocomplete-container {
    position: relative;
    width: 100%;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 2px solid #6843b2;
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-item {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(104, 67, 178, 0.2);
    transition: all 0.3s ease;
    color: #f5f5f5;
    position: relative;
    overflow: hidden;
}

.suggestion-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, rgba(104, 67, 178, 0.2), transparent);
    transition: width 0.3s ease;
}

.suggestion-item:hover {
    background: linear-gradient(135deg, rgba(104, 67, 178, 0.2) 0%, rgba(90, 16, 143, 0.1) 100%);
    color: #ffffff;
    transform: translateX(5px);
}

.suggestion-item:hover::before {
    width: 100%;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item.selected {
    background: linear-gradient(135deg, #6843b2 0%, #5A108F 100%);
    color: white;
    transform: translateX(8px);
    box-shadow: 0 6px 20px rgba(90, 16, 143, 0.3);
}

.suggestion-item.selected::before {
    background: rgba(255, 255, 255, 0.3);
    width: 100%;
}

.suggestion-main {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    color: #e9ecef;
}

.suggestion-secondary {
    font-size: 14px;
    color: #adb5bd;
    font-family: 'Courier New', monospace;
}

.suggestion-item.selected .suggestion-main {
    color: white;
}

.suggestion-item.selected .suggestion-secondary {
    color: rgba(255, 255, 255, 0.8);
}

.provider-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    color: #e9ecef;
}

.provider-cuit {
    font-size: 14px;
    color: #adb5bd;
    font-family: 'Courier New', monospace;
}

.add-provider-suggestion {
    background: linear-gradient(135deg, #117a8b 0%,#138496 100%) !important;
    color: white !important;
    font-weight: 600;
    text-align: center;
    border-radius: 0 0 12px 12px;
    position: relative;
    overflow: hidden;
}

.add-provider-suggestion:hover {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%) !important;
    transform: translateX(0) !important;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.add-provider-suggestion:hover::before {
    transform: rotate(180deg);
}

/* ==================== */
/* MODAL AGREGAR PROVEEDOR MEJORADO */
/* ==================== */
.quick-add-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

.quick-add-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    border: 2px solid #6843b2;
    color: #f5f5f5;
    animation: modalSlideIn 0.4s ease-out;
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.quick-add-content h2,
.quick-add-content h3 {
    background: linear-gradient(135deg, #6843b2 0%, #5A108F 100%);
    color: white;
    font-size: 1.6rem;
    text-align: center;
    margin: 0;
    padding: 25px 30px;
    font-weight: 600;
    position: relative;
    border-radius: 20px 20px 0 0;
}

.quick-add-content h2::after,
.quick-add-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.quick-add-close,
.quick-add-content .close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.quick-add-close:hover,
.quick-add-content .close-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

#quickAddForm,
.quick-add-content form {
    padding: 30px;
}

#quickAddForm .form-group,
.quick-add-content .form-group {
    margin-bottom: 25px;
    position: relative;
}

#quickAddForm .form-group label,
.quick-add-content .form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #e9ecef;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#quickAddForm .form-group input,
.quick-add-content .form-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #404040;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #2a2a2a;
    color: #f5f5f5;
    box-sizing: border-box;
}

#quickAddForm .form-group input:focus,
.quick-add-content .form-group input:focus {
    outline: none;
    border-color: #6843b2;
    box-shadow: 0 0 0 3px rgba(104, 67, 178, 0.2);
    background: #333333;
    transform: translateY(-2px);
}

#quickAddForm .form-group input:valid,
.quick-add-content .form-group input:valid {
    border-color: #28a745;
}

#quickAddForm .form-actions,
.quick-add-content .form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #404040;
}

#quickAddForm .form-actions button,
.quick-add-content .form-actions button {
    padding: 15px 35px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 150px;
}

#cancelQuickAdd,
.quick-add-content .btn-cancel {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
}

#cancelQuickAdd:hover,
.quick-add-content .btn-cancel:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
}

#quickAddForm .form-actions button[type="submit"],
.quick-add-content .btn-save {
    background: linear-gradient(135deg, #6843b2 0%, #5A108F 100%);
    color: white;
}

#quickAddForm .form-actions button[type="submit"]:hover,
.quick-add-content .btn-save:hover {
    background: linear-gradient(135deg, #5A108F 0%, #4a0080 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(90, 16, 143, 0.4);
}

/* ==================== */
/* FILTER STYLES        */
/* ==================== */
/* Estilos para el filtro de tipo de operación */
.filter-tipo-operacion {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-tipo-operacion label {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.filter-tipo-operacion select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.filter-tipo-operacion select:hover {
    border-color: #007bff;
}

.filter-tipo-operacion select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Estilos para el selector de tipo de operación en el modal de upload */
.form-group-upload {
    margin-bottom: 20px;
    text-align: left;
}

.form-group-upload label {
    display: block;
    color: #e0aaff;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group-upload select {
    width: 100%;
    padding: 10px 15px;
    background: linear-gradient(135deg, #6843b2, #5A108F);
    border: 1px solid #6843b2;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-group-upload select:hover {
    background: linear-gradient(135deg, #5A108F, #4a0e73);
    border-color: #5A108F;
    box-shadow: 0 2px 8px rgba(90, 16, 143, 0.3);
}

.form-group-upload select:focus {
    outline: none;
    border-color: #e0aaff;
    box-shadow: 0 0 0 2px rgba(224, 170, 255, 0.2);
}

.form-group-upload select option {
    background: #2a2a2a;
    color: white;
    padding: 10px;
}

/* ==================== */
/* APOCRIFAS STYLES     */
/* ==================== */

/* Botón discreto de administración */
.admin-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.admin-btn i {
    font-size: 16px;
}

/* Modal de apócrifas (overlay modernizado) */
#apocrifasModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

#apocrifasModal .modal-contentt {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(90, 16, 143, 0.4);
    border: 2px solid #6843b2;
    color: #f5f5f5;
    animation: fadeIn 0.3s ease-out;
}

#apocrifasModal .modal-contentt h2 {
    color: #fff;
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #6843b2;
}

#apocrifasModal .close {
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

#apocrifasModal .close:hover {
    opacity: 0.7;
}

#apocrifasModal .modal-body {
    padding: 25px;
}

.apocrifas-info-section {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(104, 67, 178, 0.1);
    border-radius: 10px;
    border-left: 4px solid #6843b2;
}

.info-description {
    color: #e0aaff;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.afip-link-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.afip-link-modern:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    color: white;
    text-decoration: none;
}

.apocrifas-dropzone-modern {
    position: relative;
    border: 3px dashed #6843b2;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    margin: 20px 0;
    background-color: rgba(104, 67, 178, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apocrifas-dropzone-modern:hover {
    background-color: rgba(104, 67, 178, 0.2);
    border-color: #9c6eff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.apocrifas-dropzone-modern.dragover {
    border-color: #007bff;
    background-color: rgba(0, 123, 255, 0.05);
    transform: scale(1.02);
}

.file-input-hidden {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.dropzone-content-modern {
    pointer-events: none;
}

.dropzone-icon {
    color: #e0aaff;
    font-size: 32px;
    margin-bottom: 15px;
    display: block;
}

.dropzone-text {
    font-size: 16px;
    color: #e0aaff;
    margin-bottom: 8px;
}

.dropzone-subtext {
    font-size: 14px;
    color: #b19cd9;
    margin: 0;
}

.file-name-display {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 15px 0;
    font-weight: 600;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.apocrifas-actions {
    margin-top: 25px;
}

#uploadApocrifasBtn {
    background: linear-gradient(135deg, #6843b2 0%, #5A108F 100%);
    color: white;
    padding: 14px 40px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(90, 16, 143, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#uploadApocrifasBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #5A108F 0%, #4a0080 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(90, 16, 143, 0.4);
}

#uploadApocrifasBtn:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

/* Animación de entrada */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    #apocrifasModal .modal-contentt {
        width: 95%;
        padding: 20px;
        margin: 10px;
    }
    
    .apocrifas-dropzone-modern {
        padding: 30px 15px;
        min-height: 100px;
    }
    
    .dropzone-icon {
        font-size: 28px;
    }
    
    .dropzone-text {
        font-size: 14px;
    }
}
/* Cabecera compacta alternativa */
.apocrifas-modern {
    position: relative;
    padding: 22px 22px 18px 22px;
}

.close-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(99, 99, 99, 0.1);
    color: #333;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    transition: all .2s ease;
}

.close-icon:hover {
    background: rgba(99, 99, 99, 0.18);
    transform: translateY(-1px);
}

.modal-header-compact {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-icon {
    font-size: 22px;
}

.modal-header-compact h2 {
    margin: 0;
    font-size: 18px;
    color: #1c1c1c;
    font-weight: 700;
}

.subtitle {
    margin: 0;
    font-size: 13px;
    color: #6c757d;
}

/* Enlace tipo fantasma para AFIP */
.afip-link-ghost {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f6f7fb;
    color: #5A108F;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all .2s ease;
}

.afip-link-ghost:hover {
    background: #edeef6;
    color: #4c0d79;
}

/* Zona de arrastre para archivos */
.apocrifas-dropzone {
    position: relative;
    border: 2px dashed #d7d9e0;
    background: #fafbff;
    border-radius: 12px;
    padding: 28px 18px;
    text-align: center;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.apocrifas-dropzone.dragover {
    border-color: #5A108F;
    background: #f5f0ff;
    transform: translateY(-1px);
}

.apocrifas-dropzone .file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.dropzone-content i {
    color: #5A108F;
    font-size: 28px;
    margin-bottom: 8px;
}

.dropzone-content p {
    margin: 2px 0;
    color: #333;
}

.dropzone-content .muted {
    color: #8a8f98;
    font-size: 12px;
}

/* Botón moderno de subida */
.btn-modern {
    margin-top: 14px;
    width: 100%;
    background: linear-gradient(135deg, #6843b2 0%, #5A108F 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 16px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s ease;
    box-shadow: 0 10px 22px rgba(90,16,143,0.25);
}

.btn-modern:hover:enabled {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(90,16,143,0.3);
}

.btn-modern:disabled {
    background: #c9c9c9;
    box-shadow: none;
    cursor: not-allowed;
}

/* Secciones informativas */
.upload-section {
    margin-bottom: 20px;
}

.upload-section h3 {
    color: #6c757d;
    margin-bottom: 15px;
}

.info-text {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #007bff;
    line-height: 1.6;
}

.info-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
}

.info-section h3 {
    color: #007bff;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.info-section h4 {
    color: #495057;
    margin: 15px 0 10px 0;
    font-size: 1.1em;
}

.download-section {
    margin-top: 15px;
}

/* Enlace clásico para AFIP (compatibilidad) */
.afip-link {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    margin: 10px 0;
    transition: all 0.3s ease;
}

.afip-link:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    color: white;
    text-decoration: none;
}

.afip-link i {
    margin-right: 8px;
}

.note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 0.9em;
}

.section-divider {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #ddd, transparent);
    margin: 25px 0;
}

.file-input-container {
    position: relative;
    margin-bottom: 15px;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-label {
    display: inline-block;
    padding: 12px 20px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.file-input-label:hover {
    background: #e9ecef;
    border-color: #007bff;
}

/* Nombre del archivo seleccionado */
.file-name {
    margin-top: 12px;
    padding: 10px 12px;
    background: #eef8f0;
    border-radius: 8px;
    color: #1f6b2d;
    font-weight: 600;
}

/* Mensajes de resultado */
.result-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.result-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.result-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ==================== */
/* RESPONSIVE STYLES    */
/* ==================== */

/* Pantallas grandes de escritorio (1200px - 1599px) */
@media (min-width: 1200px) and (max-width: 1599px) {
    .top-bar {
        padding: 15px 20px;
        margin: 0 0 25px 0;
    }
    
    .tab {
        padding: 12px 18px;
        font-size: 15px;
    }
    
    .upload-btn {
        padding: 14px 60px;
        font-size: 15px;
    }
    
    .table-container {
        padding: 25px;
    }
    
    .tabla th,
    .tabla td {
        padding: 14px 12px;
        font-size: 15px;
    }
    
    .modal-content-manual {
        width: 1200px;
        max-width: 90%;
    }
    
    .modal-content-manual .form-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    
    .pagination-container {
        padding: 20px 0;
    }
    
    .pagination-btn {
        padding: 10px 15px;
        font-size: 15px;
    }
}

/* Pantallas extra grandes (1600px - 1919px) */
@media (min-width: 1600px) and (max-width: 1919px) {
    .top-bar {
        padding: 18px 25px;
        margin: 0 0 30px 0;
    }
    
    .tab {
        padding: 14px 22px;
        font-size: 16px;
    }
    
    .upload-btn {
        padding: 16px 70px;
        font-size: 16px;
    }
    
    .table-container {
        padding: 30px;
    }
    
    .table-container h3 {
        font-size: 1.4rem;
    }
    
    .tabla th,
    .tabla td {
        padding: 16px 14px;
        font-size: 16px;
    }
    
    .modal-content-manual {
        width: 1400px;
        max-width: 90%;
    }
    
    .modal-content-manual h2 {
        font-size: 2rem;
        padding: 30px;
    }
    
    .modal-content-manual .form-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
    
    .modal-content-manual form {
        padding: 35px;
    }
    
    .pagination-container {
        padding: 25px 0;
    }
    
    .pagination-btn {
        padding: 12px 18px;
        font-size: 16px;
    }
}

/* Pantallas Full HD y superiores (1920px+) */
@media (min-width: 1920px) {
    .top-bar {
        padding: 20px 30px;
        margin: 0 0 35px 0;
        border-radius: 12px;
    }
    
    .tab {
        padding: 16px 25px;
        font-size: 17px;
        border-radius: 8px;
    }
    
    .upload-btn {
        padding: 18px 80px;
        font-size: 17px;
        border-radius: 10px;
    }
    
    .table-container {
        padding: 35px;
        border-radius: 12px;
    }
    
    .table-container h3 {
        font-size: 1.5rem;
    }
    
    .tabla {
        border-radius: 12px;
    }
    
    .tabla th,
    .tabla td {
        padding: 18px 16px;
        font-size: 17px;
    }
    
    .modal-content-manual {
        width: 1600px;
        max-width: 85%;
        border-radius: 25px;
    }
    
    .modal-content-manual h2 {
        font-size: 2.2rem;
        padding: 35px;
        border-radius: 25px 25px 0 0;
    }
    
    .modal-content-manual .form-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 35px;
    }
    
    .modal-content-manual form {
        padding: 40px;
    }
    
    .modal-content-manual .form-group input,
    .modal-content-manual .form-group select {
        padding: 18px 22px;
        font-size: 16px;
        border-radius: 15px;
    }
    
    .pagination-container {
        padding: 30px 0;
    }
    
    .pagination-btn {
        padding: 14px 20px;
        font-size: 17px;
        border-radius: 8px;
    }
    
    .page-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
        border-radius: 8px;
    }
}

/* Pantallas ultra-wide (2560px+) */
@media (min-width: 2560px) {
    .top-bar {
        padding: 25px 40px;
        margin: 0 0 40px 0;
        border-radius: 15px;
    }
    
    .tab {
        padding: 18px 30px;
        font-size: 18px;
        border-radius: 10px;
    }
    
    .upload-btn {
        padding: 20px 90px;
        font-size: 18px;
        border-radius: 12px;
    }
    
    .table-container {
        padding: 40px;
        border-radius: 15px;
    }
    
    .table-container h3 {
        font-size: 1.6rem;
    }
    
    .tabla {
        border-radius: 15px;
    }
    
    .tabla th,
    .tabla td {
        padding: 20px 18px;
        font-size: 18px;
    }
    
    .modal-content-manual {
        width: 1800px;
        max-width: 80%;
        border-radius: 30px;
    }
    
    .modal-content-manual h2 {
        font-size: 2.4rem;
        padding: 40px;
        border-radius: 30px 30px 0 0;
    }
    
    .modal-content-manual .form-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 40px;
    }
    
    .modal-content-manual form {
        padding: 45px;
    }
    
    .modal-content-manual .form-group input,
    .modal-content-manual .form-group select {
        padding: 20px 25px;
        font-size: 17px;
        border-radius: 18px;
    }
    
    .pagination-container {
        padding: 35px 0;
    }
    
    .pagination-btn {
        padding: 16px 24px;
        font-size: 18px;
        border-radius: 10px;
    }
    
    .page-number {
        width: 45px;
        height: 45px;
        font-size: 17px;
        border-radius: 10px;
    }
}

/* Pantallas 4K y superiores (3840px+) */
@media (min-width: 3840px) {
    .top-bar {
        padding: 30px 50px;
        margin: 0 0 50px 0;
        border-radius: 20px;
    }
    
    .tab {
        padding: 22px 35px;
        font-size: 20px;
        border-radius: 12px;
    }
    
    .upload-btn {
        padding: 24px 100px;
        font-size: 20px;
        border-radius: 15px;
    }
    
    .table-container {
        padding: 50px;
        border-radius: 20px;
    }
    
    .table-container h3 {
        font-size: 1.8rem;
    }
    
    .tabla {
        border-radius: 20px;
    }
    
    .tabla th,
    .tabla td {
        padding: 24px 20px;
        font-size: 20px;
    }
    
    .modal-content-manual {
        width: 2200px;
        max-width: 75%;
        border-radius: 35px;
    }
    
    .modal-content-manual h2 {
        font-size: 2.6rem;
        padding: 50px;
        border-radius: 35px 35px 0 0;
    }
    
    .modal-content-manual .form-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 50px;
    }
    
    .modal-content-manual form {
        padding: 55px;
    }
    
    .modal-content-manual .form-group input,
    .modal-content-manual .form-group select {
        padding: 24px 30px;
        font-size: 18px;
        border-radius: 20px;
    }
    
    .pagination-container {
        padding: 40px 0;
    }
    
    .pagination-btn {
        padding: 18px 28px;
        font-size: 20px;
        border-radius: 12px;
    }
    
    .page-number {
        width: 50px;
        height: 50px;
        font-size: 18px;
        border-radius: 12px;
    }
}

@media (max-width: 1024px) {
    .top-bar {
        margin-left: 0;
        margin-right: 0;
    }

    .modal-content-upload,
    .modal-content-manual {
        width: 90%;
        max-width: 700px;
        margin: 5% auto;
    }
}

@media (max-width: 992px) {
    .modal-content-manual {
        width: 95%;
        padding: 20px;
    }

    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .total-field {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .tab {
        flex: 1;
    }

    .upload-btn,
    .btn-primary {
        padding: 10px 30px;
        width: 100%;
        margin: 5px 0;
    }

    #openManualModal {
        margin-left: 0;
    }

    .modal-content-upload {
        height: auto;
        min-height: 400px;
        width: 95%;
        margin: 10% auto;
    }

    .modal-content-manual {
        width: 95%;
        margin: 10px auto;
    }

    .modal-content-manual .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .modal-content-manual .form-actions {
        flex-direction: column;
        gap: 15px;
    }

    .modal-content-manual .form-actions button {
        width: 100%;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .total-field {
        grid-column: span 1;
    }

    .form-actions {
        flex-direction: column;
    }

    #calcularTotalBtn,
    #guardarComprobanteBtn {
        width: 100%;
    }

    .drop-zone {
        height: auto;
        min-height: 150px;
    }
    
    .quick-add-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .quick-add-content h2,
    .quick-add-content h3 {
        font-size: 1.4rem;
        padding: 20px 25px;
    }
    
    .quick-add-content form,
    #quickAddForm {
        padding: 25px 20px;
    }
    
    .quick-add-content .form-actions,
    #quickAddForm .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .quick-add-content .form-actions button,
    #quickAddForm .form-actions button {
        width: 100%;
        min-width: auto;
    }
    
    .autocomplete-suggestions {
        max-height: 200px;
    }
    
    .suggestion-item {
        padding: 12px 15px;
    }
    
    /* Responsive para pantallas pequeñas */
    .filter-tipo-operacion {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .filter-tipo-operacion select {
        width: 100%;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .tab {
        padding: 8px 10px;
        font-size: 14px;
    }

    .modal-content-manual h2 {
        font-size: 1.5rem;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-group input {
        padding: 8px 10px;
    }

    .reintentar-btn {
        padding: 5px 10px;
        font-size: 13px;
    }

    .quick-add-content {
        width: 98%;
        margin: 15% auto;
        border-radius: 15px;
    }
    
    .quick-add-content h2,
    .quick-add-content h3 {
        font-size: 1.2rem;
        padding: 18px 20px;
        border-radius: 15px 15px 0 0;
    }
    
    .quick-add-content form,
    #quickAddForm {
        padding: 20px 15px;
    }
    
    .quick-add-content .form-group input,
    #quickAddForm .form-group input {
        padding: 12px 15px;
        font-size: 15px;
    }
}

/* Botón de reprocesar en lote para No Cargados */
.bulk-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}

.eliminar-todos-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #e74c3c;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 8px 14px;
    min-width: 140px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(231, 76, 60, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.eliminar-todos-btn:hover {
    background-color: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(231, 76, 60, 0.3);
}