/* Estilos generales pentru body */
body {
    font-family: 'Inter', sans-serif;
}

/* Estilos pentru inputs de archivos personalizados */
.file-input-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.custom-file-input-label {
    display: inline-flex;
    align-items: center;
    background-color: #f3f4f6; /* Tailwind gray-100 */
    color: #374151; /* Tailwind gray-700 */
    border: 1px solid #d1d5db; /* Tailwind gray-300 */
    border-radius: 0.375rem; /* rounded-md */
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem; /* text-sm */
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.dark .custom-file-input-label {
    background-color: #4b5563; /* Tailwind gray-600 */
    color: #e5e7eb; /* Tailwind gray-200 */
    border-color: #6b7280; /* Tailwind gray-500 */
}

.custom-file-input-label:hover {
    background-color: #e5e7eb; /* Tailwind gray-200 */
    border-color: #9ca3af; /* Tailwind gray-400 */
}

.dark .custom-file-input-label:hover {
    background-color: #525c6b;
    border-color: #9ca3af;
}

.custom-file-input-label svg {
    margin-right: 0.5rem;
    width: 2.5rem; /* w-5 */
    height: 2.5rem; /* h-5 */
}

.hidden-file-input {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.file-name-display {
    font-style: italic;
    color: #6b7280; /* Tailwind gray-500 */
    font-size: 0.875rem; /* text-sm */
}
.dark .file-name-display {
    color: #9ca3af; /* Tailwind gray-400 */
}

/* Estilos pentru mensajes de feedback */
.upload-feedback {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    display: none; /* Inicialmente oculto */
    border-width: 1px;
    position: relative; /* Para posicionar el botón de cierre */
}

.feedback-close-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: lab(69.62% 26.78 64.7 / 0.9);
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.6rem;
    color: #fff;
    opacity: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 999999;
}

/* Dark mode pentru feedback close button */
.dark .feedback-close-button {
    background: lab(69.62% 26.78 64.7 / 0.9);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
    z-index: 999999;
}

.dark .feedback-close-button:hover {
    background: lab(69.62% 26.78 64.7 / 0.9);
    border-color: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.8);
}

.feedback-success { background-color: #dcfce7; border-color: #4ade80; color: #166534; }
.dark .feedback-success { background-color: #14532d; border-color: #22c55e; color: #bbf7d0; }
.feedback-error { background-color: #ffedd5; border-color: #fb923c; color: #9a3412; } 
.dark .feedback-error { background-color: #7c2d12; border-color: #ea580c; color: #fed7aa; }
.feedback-warning { background-color: #fef3c7; border-color: #facc15; color: #78350f; }
.dark .feedback-warning { background-color: #713f12; border-color: #eab308; color: #fef9c3; }
.feedback-info { background-color: #e0f2fe; border-color: #7dd3fc; color: #075985; }
.dark .feedback-info { background-color: #0c4a6e; border-color: #38bdf8; color: #bae6fd; }

/* Estilo para la barra de progreso animada */
@keyframes progress-indeterminate {
    0% { width: 0%; }
    100% { width: 100%; }
}
.progress-bar-animated {
    animation: progress-indeterminate 1.5s ease-in-out infinite;
}

/* Estilos para los botones de acción en tabla */
.action-button {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.action-button svg {
    width: 1rem;
    height: 1rem;
}

/* Botones específicos con mejores estilos */
.delete-button { 
    color: #ef4444; 
} 
.delete-button:hover { 
    color: #b91c1c; 
    background-color: #fef2f2;
}
.dark .delete-button { 
    color: #f87171; 
}
.dark .delete-button:hover { 
    color: #ef4444; 
    background-color: rgba(239, 68, 68, 0.1);
} 

.rollback-button { 
    color: #f59e0b; 
} 
.rollback-button:hover { 
    color: #d97706; 
    background-color: #fffbeb;
} 
.dark .rollback-button { 
    color: #fbbf24; 
} 
.dark .rollback-button:hover { 
    color: #f59e0b;
    background-color: rgba(245, 158, 11, 0.1);
}

.history-button { 
    color: #3b82f6; 
    background-color: #eff6ff;
    border: 1px solid #dbeafe;
}
.history-button:hover { 
    color: #1d4ed8; 
    background-color: #dbeafe;
    border-color: #bfdbfe;
}
.dark .history-button { 
    color: #60a5fa; 
    background-color: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
}
.dark .history-button:hover { 
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}
.history-button svg {
    transition: transform 0.2s ease-in-out;
}
.history-button:hover svg {
    transform: scale(1.05);
}

.toggle-history-button { color: #3b82f6; }
.toggle-history-button:hover { color: #1d4ed8; }
.dark .toggle-history-button { color: #60a5fa; }
.dark .toggle-history-button:hover { color: #3b82f6; }
.toggle-history-button svg {
    transition: transform 0.2s ease-in-out;
}
.toggle-history-button.expanded svg.icon-plus {
    display: none;
}
.toggle-history-button.expanded svg.icon-minus {
    display: inline-block;
}
.toggle-history-button:not(.expanded) svg.icon-minus {
    display: none;
}

.remove-from-express-button { color: #6b7280; }
.remove-from-express-button:hover { color: #374151; }
.dark .remove-from-express-button { color: #9ca3af; }
.dark .remove-from-express-button:hover { color: #d1d5db; }

/* Estilos para los estados en tabla */
.status-enviada, .status-email-enviado { color: #2563eb; font-weight: 600; } 
.dark .status-enviada, .dark .status-email-enviado { color: #60a5fa; }
.status-respuesta-recibida, .status-email-respuesta-recibida { color: #a855f7; font-weight: 600; }
.dark .status-respuesta-recibida, .dark .status-email-respuesta-recibida { color: #c084fc; }
.status-conciliado, .status-conciliada { color: #16a34a; font-weight: 600; }
.dark .status-conciliado, .dark .status-conciliada { color: #4ade80; }
.status-conciliada-ambigua { color: #f59e0b; font-weight: 600; }
.dark .status-conciliada-ambigua { color: #fbbf24; }
.status-pendiente { color: #eab308; font-weight: 600; }
.dark .status-pendiente { color: #fde047; }
.status-email-na { color: #6b7280; font-style: italic; }
.dark .status-email-na { color: #9ca3af; }

/* Estilos para columna "Detalle Respuesta" */
.detalle-pendiente { color: #ef4444; font-weight: 600; }
.dark .detalle-pendiente { color: #f87171; }
.detalle-respondido { color: #22c55e; font-weight: 600; }
.dark .detalle-respondido { color: #4ade80; }
.detalle-neutro { color: #6b7280; }
.dark .detalle-neutro { color: #9ca3af; }

/* Estilo para checkbox en tabla */
.table-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    text-align: center;
}

/* Estilos pentru fila de detalles histórico y su contenedor */
.history-details-row td {
    padding: 0 !important; 
    border-top: none !important;
}
.email-history-container {
    padding: 0.5rem; /* Padding și mai redus */
    background-color: #f9fafb; 
    border-top: 1px solid #e5e7eb; 
    border-bottom: 1px solid #e5e7eb;
}
.dark .email-history-container {
    background-color: #1f2937; 
    border-top-color: #374151; 
    border-bottom-color: #374151;
}

.history-table-scroll-container {
    overflow-x: auto; 
    width: 100%; 
}
/* Titlul principal al secțiunii de istoric */
.email-history-container > h3.history-main-title { /* Clasă specifică pentru titlul mare */
    color: #1e3a8a; 
    font-size: 0.875rem; /* text-sm */
    font-weight: 600; /* Semibold */
    margin-bottom: 0.5rem; /* mb-2 */
}
.dark .email-history-container > h3.history-main-title {
    color: #93c5fd; 
}

/* Textul general din interiorul detaliilor istoricului */
.dark .email-history-container p, 
.dark .email-history-container li {
    color: #cbd5e1; 
}
.email-history-container p, 
.email-history-container li {
    color: #1f2937; /* gray-800, mai închis pentru contrast */
}


/* Estilos pentru detalles de conciliación estructurados */
.structured-details {
    font-size: 0.75rem; /* text-xs, și mai mic */
    line-height: 1.3; 
    padding: 0.3rem 0.5rem; 
    border-left-width: 3px;
    border-radius: 0.25rem; 
    background-color: transparent; 
}

.structured-details h5.history-event-title { /* Clasă specifică pentru titlurile evenimentelor */
    font-size: 0.75rem; /* text-xs */
    font-weight: 600; 
    margin-bottom: 0.15rem; 
}
/* Culoare default pentru titlurile de evenimente din istoric (cele neutre) */
.history-event-neutral .structured-details h5.history-event-title {
    color: #1f2937; 
}
.dark .history-event-neutral .structured-details h5.history-event-title {
    color: #e5e7eb; /* gray-200 */
}
.history-event-info .structured-details h5.history-event-title { 
    color: #1d4ed8; 
}
.dark .history-event-info .structured-details h5.history-event-title {
    color: #60a5fa; 
}
.history-event-success .structured-details h5.history-event-title {
    color: #15803d; 
}
.dark .history-event-success .structured-details h5.history-event-title {
    color: #4ade80; 
}
.history-event-warning .structured-details h5.history-event-title {
    color: #b45309; 
}
.dark .history-event-warning .structured-details h5.history-event-title {
    color: #fcd34d; 
}


.structured-details p {
    margin-bottom: 0.15rem; 
    font-size: 0.7rem; /* și mai mic */
}
.structured-details ul {
    list-style-type: disc;
    margin-left: 0.8rem; 
    padding-left: 0.2rem; 
    font-size: 0.7rem;
}
.structured-details li {
    margin-bottom: 0.05rem; 
}

.details-cell.celula-conciliere-exacta-highlight {
    background-color: #f0fdf4; 
}
.dark .details-cell.celula-conciliere-exacta-highlight {
    background-color: rgba(34, 197, 94, 0.05); /* și mai, mai subtil */
}
.celula-conciliere-exacta-highlight .structured-details {
    border-left-color: #22c55e; 
}
.celula-conciliere-exacta-highlight .structured-details h5.history-event-title {
    color: #15803d; 
}
.dark .celula-conciliere-exacta-highlight .structured-details h5.history-event-title {
    color: #4ade80; 
}


.details-cell.celula-conciliere-ambigua-highlight {
    background-color: #fffbeb; 
}
.dark .details-cell.celula-conciliere-ambigua-highlight {
    background-color: rgba(245, 158, 11, 0.05); 
}
.celula-conciliere-ambigua-highlight .structured-details {
    border-left-color: #f59e0b; 
}
.celula-conciliere-ambigua-highlight .structured-details h5.history-event-title {
    color: #b45309; 
}
.dark .celula-conciliere-ambigua-highlight .structured-details h5.history-event-title {
    color: #fcd34d; 
}


.details-cell.celula-conciliere-esuata { 
    background-color: #fef2f2; 
}
.dark .details-cell.celula-conciliere-esuata {
    background-color: rgba(239, 68, 68, 0.05); 
}
.celula-conciliere-esuata .structured-details {
    border-left-color: #ef4444; 
}
.celula-conciliere-esuata .structured-details h5.history-event-title {
    color: #b91c1c; 
}
.dark .celula-conciliere-esuata .structured-details h5.history-event-title {
    color: #f87171; 
}

/* Stiluri pentru textul din interiorul detaliilor structurate, pentru a asigura contrastul */
/* Culorile de bază pentru text sunt setate în .email-history-container p/li */
/* Aici ajustăm doar dacă e necesar specific pentru un anumit tip de highlight */
.dark .celula-conciliere-ambigua-highlight .structured-details p,
.dark .celula-conciliere-ambigua-highlight .structured-details li {
    color: #fde68a; 
}
.dark .celula-conciliere-esuata .structured-details p,
.dark .celula-conciliere-esuata .structured-details li {
    color: #fecaca; 
}
.dark .history-event-info .structured-details p,
.dark .history-event-info .structured-details li {
     color: #bfdbfe; 
}


/* Estilos para tabla de historial inline */
.inline-history-table th, .inline-history-table td {
    padding: 0.3rem 0.5rem; /* Padding și mai redus */
    border-bottom: 1px solid #e5e7eb; 
    font-size: 0.75rem; /* Font și mai mic */
    vertical-align: middle; 
}
.dark .inline-history-table td {
    border-bottom-color: #374151; 
    color: #e5e7eb; /* Text mai deschis pentru celule generale în dark mode */
}
.inline-history-table th {
    background-color: #f3f4f6; 
    font-weight: 600;
    text-align: left;
    color: #1f2937; /* Text mai închis pentru header în light mode */
}
.dark .inline-history-table th {
    background-color: #374151; 
    color: #f3f4f6; 
    border-bottom-color: #4b5563;
}
.inline-history-table tr:last-child td {
    border-bottom: none;
}
.email-body-cell, .details-cell { 
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap; 
}
.details-cell-email-subject {
    font-weight: 500;
    max-width: 180px; /* Și mai mic */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; 
}
.inline-history-table td.details-cell-email-subject:hover { 
    white-space: normal;
    overflow: visible;
}

.email-icon-link svg {
    width: 1.125rem; /* w-4.5, puțin mai mic decât w-5 */
    height: 1.125rem;
    transition: transform 0.2s ease-in-out, color 0.2s ease-in-out;
}
.email-icon-link:hover svg {
    transform: scale(1.1);
    /* Optional: change color on hover */
    /* color: #1d4ed8; */ /* blue-700 */
}
.dark .email-icon-link:hover svg {
    /* color: #2563eb; */ /* blue-600 */
}

/* Estilos para el modal de historial - NUEVOS */
#history-modal {
    z-index: 50;
}

#history-modal.hidden {
    display: none;
}

#history-modal .relative { 
    max-height: 90vh;
    overflow-y: auto; 
}

/* Estilos para las tarjetas de eventos en el modal de historial */
.history-event-card {
    transition: all 0.2s ease-in-out;
}

.history-event-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dark .history-event-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Estilos para los iconos de email en el modal */
.email-icon-modal {
    transition: all 0.3s ease-in-out;
}

.email-icon-modal:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.dark .email-icon-modal:hover {
    box-shadow: 0 4px 8px rgba(96, 165, 250, 0.3);
}

/* Animación para la aparición del modal */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#history-modal:not(.hidden) .relative {
    animation: modalFadeIn 0.2s ease-out;
}

/* Estilos para pantalla de autenticación */
#auth-container {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    border-radius: 0.5rem;
    background-color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    margin-top: 2rem;
}
.dark #auth-container {
    background-color: #1f2937; 
}
#auth-container svg {
    width: 4rem;
    height: 4rem;
    color: #3b82f6; 
    margin-bottom: 1.5rem;
}
.dark #auth-container svg {
    color: #60a5fa; 
}
#auth-message {
    font-size: 1.125rem; 
    color: #4b5563; 
    margin-bottom: 0.5rem;
}
.dark #auth-message {
    color: #d1d5db; 
}
#auth-sub-message {
    font-size: 0.875rem; 
    color: #6b7280; 
    margin-bottom: 1.5rem;
}
.dark #auth-sub-message {
    color: #9ca3af; 
}

#login-button svg {
    width: 1.25rem; 
    height: 1.25rem; 
    margin-right: 0.5rem;
    display: inline-block;
}

/* Estilos para controles de paginación */
.pagination-button,
.pagination-number-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.8rem;
    border: 1px solid #d1d5db; 
    border-radius: 0.375rem; 
    background-color: #ffffff;
    color: #374151; 
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.2s ease-in-out;
    cursor: pointer;
    line-height: 1.2;
}
.pagination-button svg {
    width: 1em;
    height: 1em;
}
.pagination-button span {
    margin-left: 0.25rem;
    margin-right: 0.25rem;
}

.dark .pagination-button,
.dark .pagination-number-button {
    background-color: #374151; 
    border-color: #4b5563; 
    color: #e5e7eb; 
}

.pagination-button:hover:not(:disabled),
.pagination-number-button:hover:not(:disabled) {
    background-color: #f3f4f6; 
    border-color: #9ca3af; 
    color: #1f2937; 
}

.dark .pagination-button:hover:not(:disabled),
.dark .pagination-number-button:hover:not(:disabled) {
    background-color: #4b5563; 
    border-color: #6b7280; 
    color: #ffffff;
}

.pagination-button:disabled,
.pagination-number-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pagination-number-button.active {
    background-color: #3b82f6; 
    border-color: #3b82f6; 
    color: #ffffff;
    font-weight: 700;
}
.dark .pagination-number-button.active {
    background-color: #2563eb; 
    border-color: #2563eb; 
    color: #ffffff;
}

/* Estilos para el modal de ambigüedad */
#ambiguity-modal {
    z-index: 50;
}

#ambiguity-modal.hidden {
    display: none;
}

#ambiguity-modal .relative { 
    max-height: 90vh;
    overflow-y: auto; 
}

#ambiguity-modal input[type="radio"] {
    cursor: pointer;
}

#ambiguity-modal label {
    transition: background-color 0.2s ease-in-out;
}

/* Estilos para las nuevas secciones de tablas */
#ambiguous-section {
    background-color: #fff7ed; 
    border-color: #fed7aa; 
}
.dark #ambiguous-section {
    background-color: rgba(194, 65, 12, 0.1); 
    border-color: #c2410c; 
}
#ambiguous-section table thead th {
    color: #9a3412; 
}
.dark #ambiguous-section table thead th {
    color: #fed7aa; 
}


#reconciled-section {
    background-color: #f0fdf4; 
    border-color: #bbf7d0; 
}
.dark #reconciled-section {
    background-color: rgba(22, 163, 74, 0.1); 
    border-color: #16a34a; 
}
#reconciled-section table thead th {
    color: #15803d; 
}
.dark #reconciled-section table thead th {
    color: #86efac; 
}

#express-section {
    background-color: #eff6ff; 
    border-color: #bfdbfe; 
}
.dark #express-section {
    background-color: rgba(37, 99, 235, 0.1);
    border-color: #2563eb; 
}
#express-section table thead th {
    color: #1d4ed8; 
}
.dark #express-section table thead th {
    color: #93c5fd; 
}


/* Botón de resolver ambigüedad */
.resolve-ambiguity-button {
    transition: background-color 0.2s ease-in-out;
}

/* Estilos para la sección de búsqueda */
#search-input {
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

#search-input:focus {
    border-color: #3b82f6; 
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dark #search-input:focus {
    border-color: #60a5fa; 
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

/* Animación para el spinner de carga */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Estilos para el estado de importación por lotes */
#chunked-import-60-days-progress-container {
    transition: all 0.3s ease-in-out;
}

#chunked-import-60-days-log-list {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    line-height: 1.4;
}

#chunked-import-60-days-log-list li {
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5); 
}

.dark #chunked-import-60-days-log-list li {
    border-bottom-color: rgba(55, 65, 81, 0.5); 
}

#chunked-import-60-days-log-list li:last-child {
    border-bottom: none;
}

/* Hover effects pentru las filas de las tablas secundarias */
#ambiguous-section tbody tr:hover {
    background-color: rgba(254, 215, 170, 0.3); 
}
.dark #ambiguous-section tbody tr:hover {
    background-color: rgba(251, 146, 60, 0.15); 
}

#reconciled-section tbody tr:hover {
    background-color: rgba(187, 247, 208, 0.3); 
}
.dark #reconciled-section tbody tr:hover {
    background-color: rgba(34, 197, 94, 0.15);
}

#express-section tbody tr:hover {
    background-color: rgba(191, 219, 254, 0.3);
}
.dark #express-section tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.15); 
}

/* Estilos responsivos adicionales */
@media (max-width: 640px) {
    .pagination-button span {
        display: none;
    }

    .pagination-button svg {
        margin: 0;
    }

    #ambiguity-modal .relative,
    #history-modal .relative {
        margin: 1rem;
        top: 10px;
    }
    .inline-history-table th, .inline-history-table td {
        padding: 0.3rem 0.4rem;
        font-size: 0.75rem;
    }
    .email-icon-link svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}

/* Transiciones suaves para los elementos interactivos */
button, input[type="checkbox"], input[type="radio"], a {
    transition: all 0.2s ease-in-out;
}

/* Cursors específicos para elementos interactivos */
button, .action-button, .pagination-button, .pagination-number-button {
    cursor: pointer;
}

button:disabled, .action-button:disabled {
    cursor: not-allowed;
}

/* Evitar cursor de ayuda en elementos con title */
button[title], .action-button[title] {
    cursor: pointer;
}

/* Mejora visual para los badges de conteo */
#ambiguous-count, #reconciled-count, #express-count {
    font-weight: 700;
}

/* Estilos para tooltips - cursor normal en lugar de help */
[title] {
    position: relative;
    cursor: pointer;
}

/* Ajustes finales para mejorar la legibilidad */
.text-xs {
    letter-spacing: 0.025em;
}

.uppercase {
    letter-spacing: 0.05em;
}

/* Fix para el scroll horizontal en tablas móviles */
.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
}

/* Mejoras para los estados de carga */
.loading-skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.dark .loading-skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}
/* Highlight pentru boletas recent procesate - BORDURĂ COMPLETĂ SUBȚIRE */
.boleta-recently-processed {
    background-color: #f0fdf4 !important;
    border: 1px solid #10b981 !important;
    border-radius: 4px !important;
    animation: highlightFadeIn 0.5s ease-in-out;
}

.boleta-recently-processed:hover {
    background-color: #ecfdf5 !important;
    border-color: #059669 !important;
}

/* Dark Mode */
.dark .boleta-recently-processed {
    background-color: rgba(16, 185, 129, 0.1) !important;
    border: 1px solid #34d399 !important;
}

.dark .boleta-recently-processed:hover {
    background-color: rgba(16, 185, 129, 0.15) !important;
    border-color: #10b981 !important;
}

/* Asigură textul să rămână vizibil */
.boleta-recently-processed td {
    color: inherit !important;
}

.dark .boleta-recently-processed td {
    color: #e5e7eb !important;
}

/* Badge "Nueva" - POZIȚIONARE ABSOLUTĂ pentru alignment perfect */
.nueva-badge {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    background-color: #059669;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.4);
    letter-spacing: 0.5px;
    min-width: 42px;
    animation: pulseBadgeFixed 1s infinite;
    z-index: 10;
}

/* Celula cu numărul trebuie să fie relative pentru absolute positioning */
.boleta-recently-processed td:nth-child(2) {
    position: relative;
    padding-right: 60px !important; /* Spațiu pentru badge */
}
.dark .nueva-badge {
    background-color: #10b981;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.5);
}

/* Animație INTENSĂ pentru primele 3 minute */
@keyframes pulseBadgeIntense {
    0% { 
        transform: scale(1);
        opacity: 1;
        background-color: #059669;
        box-shadow: 0 2px 4px rgba(5, 150, 105, 0.4);
    }
    25% {
        transform: scale(1.15);
        opacity: 0.9;
        background-color: #10b981;
        box-shadow: 0 4px 8px rgba(16, 185, 129, 0.6);
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.8;
        background-color: #34d399;
        box-shadow: 0 6px 12px rgba(52, 211, 153, 0.8);
    }
    75% {
        transform: scale(1.15);
        opacity: 0.9;
        background-color: #10b981;
        box-shadow: 0 4px 8px rgba(16, 185, 129, 0.6);
    }
    100% { 
        transform: scale(1);
        opacity: 1;
        background-color: #059669;
        box-shadow: 0 2px 4px rgba(5, 150, 105, 0.4);
    }
}

/* Animația care lipsește! */
@keyframes pulseBadgeFixed {
    0% { 
        opacity: 1;
        background-color: #059669;
        box-shadow: 0 2px 4px rgba(5, 150, 105, 0.4);
    }
    50% { 
        opacity: 0.8;
        background-color: #10b981;
        box-shadow: 0 4px 8px rgba(16, 185, 129, 0.6);
    }
    100% { 
        opacity: 1;
        background-color: #059669;
        box-shadow: 0 2px 4px rgba(5, 150, 105, 0.4);
    }
}

.dark .nueva-badge {
    background-color: #10b981;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.5);
}

/* Animație SUBTILĂ după 3 minute */
@keyframes pulseBadgeSubtle {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.85; 
        transform: scale(1.02);
    }
}
/* ===== DASHBOARD STATS STYLING ===== */
.stats-card {
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* Badge styling */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 9999px;
    min-width: 24px;
    transition: all 0.3s ease;
}

.badge-pending {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-ambiguous {
    background-color: #fed7aa;
    color: #9a3412;
}

.badge-reconciled {
    background-color: #dcfce7;
    color: #166534;
}

.badge-manual {
    background-color: #e9d5ff;
    color: #6b21a8;
}

/* Dark mode badges */
.dark .badge-pending {
    background-color: #1e3a8a;
    color: #93c5fd;
}

.dark .badge-ambiguous {
    background-color: #9a3412;
    color: #fed7aa;
}

.dark .badge-reconciled {
    background-color: #14532d;
    color: #86efac;
}

.dark .badge-manual {
    background-color: #581c87;
    color: #d8b4fe;
}

/* Animație pulsare pentru badge-uri cu probleme */
.badge-pulse {
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Animație pentru actualizare numere */
.stats-update {
    animation: stats-bounce 0.5s ease;
}

@keyframes stats-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
    
}
.badge {
    display: none !important;
}
/* Gradient backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-mesh {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

/* Glass effect pentru card-ul principal */
.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Animații îmbunătățite */
.floating-animation {
    animation: floating 4s ease-in-out infinite;
}

.floating-animation-delayed {
    animation: floating 4s ease-in-out infinite;
    animation-delay: 2s;
}

@keyframes floating {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    50% { 
        transform: translateY(-15px) rotate(2deg); 
    }
}

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

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInLeft {
    from { 
        opacity: 0; 
        transform: translateX(-50px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

@keyframes slideInRight {
    from { 
        opacity: 0; 
        transform: translateX(50px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

/* Efecte hover îmbunătățite */
.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.feature-icon {
    transition: all 0.3s ease;
}

.feature-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Buton îmbunătățit */
.login-button {
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-button:hover {
    background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.4);
}

.login-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.login-button:hover::before {
    left: 100%;
}

/* Badge styles îmbunătățite pentru light și dark mode */
.tech-badge-fixed {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.dark .tech-badge-fixed {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tech-badge-fixed:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dark .tech-badge-fixed:hover {
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* Security indicators */
.security-item {
    transition: all 0.3s ease;
}

.security-item:hover {
    transform: translateX(5px);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .gradient-mesh {
        background: linear-gradient(180deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    }
    
    .glass-effect {
        margin: 1rem;
        border-radius: 1.5rem;
    }
    
    .feature-card {
        padding: 1rem;
    }
    
    .login-button {
        font-size: 1rem;
        padding: 1rem 2rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .floating-animation,
    .floating-animation-delayed,
    .fade-in,
    .slide-in-left,
    .slide-in-right {
        animation: none;
    }
    
    .feature-card,
    .feature-icon,
    .login-button,
    .tech-badge-fixed,
    .security-item {
        transition: none;
    }
}
/* ================================================================
   MODAL PARA RESULTADOS DE EXTRACTO
   ================================================================ */

#extracto-result-modal-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#extracto-result-modal-overlay .bg-white {
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

/* Animaciones para estadísticas */
#extracto-result-modal-overlay .text-2xl {
    animation: countUp 0.8s ease-out;
}

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

/* Hover effects para botones del modal */
#extracto-result-modal-overlay button {
    transition: all 0.2s ease;
}

#extracto-result-modal-overlay button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Progress bar animation */
#extracto-result-modal-overlay .bg-gradient-to-r {
    animation: progressFill 1s ease-out 0.5s both;
    width: 0 !important;
}

@keyframes progressFill {
    to {
        width: var(--progress-width, 0%) !important;
    }
}

/* Iconos con pulso suave */
#extracto-result-modal-overlay .bg-white.bg-opacity-20 {
    animation: gentlePulse 2s ease-in-out infinite;
}

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Dark mode específico para el modal */
.dark #extracto-result-modal-overlay .bg-blue-50 {
    background-color: rgba(59, 130, 246, 0.1);
}

.dark #extracto-result-modal-overlay .bg-green-50 {
    background-color: rgba(34, 197, 94, 0.1);
}
/* ================================================================
   PROGRESS CARDS - STYLING PENTRU CHUNK CARDS MODERNE
   ================================================================ */

/* Container pentru cards */
.progress-cards-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
}

.progress-cards-container::-webkit-scrollbar {
    width: 6px;
}

.progress-cards-container::-webkit-scrollbar-track {
    background: transparent;
}

.progress-cards-container::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.5);
    border-radius: 3px;
}

/* Card individual pentru fiecare chunk */
.chunk-progress-card {
    background-color: #ffffff;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(10px);
    opacity: 0;
    animation: slideInCard 0.4s ease-out forwards;
}

.dark .chunk-progress-card {
    background-color: #1f2937;
    border-color: #374151;
}

/* Animația pentru apariția card-urilor */
@keyframes slideInCard {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Hover effect pentru cards */
.chunk-progress-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.dark .chunk-progress-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: #60a5fa;
}

/* Status indicators pentru cards */
.chunk-card-success {
    border-color: #86efac;
    background-color: #f0fdf4;
}

.dark .chunk-card-success {
    border-color: #15803d;
    background-color: rgba(34, 197, 94, 0.2);
}

.chunk-card-error {
    border-color: #fca5a5;
    background-color: #fef2f2;
}

.dark .chunk-card-error {
    border-color: #dc2626;
    background-color: rgba(239, 68, 68, 0.2);
}

.chunk-card-processing {
    border-color: #93c5fd;
    background-color: #eff6ff;
    animation: pulseGlow 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    transform: scale(1.02);
}

.dark .chunk-card-processing {
    border-color: #2563eb;
    background-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.4);
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
        transform: scale(1.02);
    }
    50% {
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.8);
        transform: scale(1.05);
    }
}

.chunk-card-pending {
    border-color: #d1d5db;
    background-color: #f9fafb;
}

.dark .chunk-card-pending {
    border-color: #4b5563;
    background-color: rgba(31, 41, 55, 0.5);
}

/* Animația pentru card-ul care se procesează */
@keyframes pulseCard {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
    }
}

/* Header-ul card-ului */
.chunk-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.chunk-card-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1f2937;
}

.dark .chunk-card-title {
    color: #e5e7eb;
}

.chunk-card-date {
    font-size: 0.75rem;
    color: #6b7280;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.dark .chunk-card-date {
    color: #9ca3af;
}

/* Status icon în card */
.chunk-card-icon {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.chunk-card-icon.success {
    background-color: #10b981;
    color: #ffffff;
}

.chunk-card-icon.error {
    background-color: #ef4444;
    color: #ffffff;
}

.chunk-card-icon.processing {
    background-color: #3b82f6;
    color: #ffffff;
    animation: spin 1s linear infinite;
}

.chunk-card-icon.pending {
    background-color: #9ca3af;
    color: #ffffff;
}

/* Stats în card */
.chunk-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

.chunk-card-stat {
    background-color: #f3f4f6;
    border-radius: 0.25rem;
    padding: 0.5rem;
    text-align: center;
}

.dark .chunk-card-stat {
    background-color: #374151;
}

.chunk-card-stat-value {
    font-weight: 700;
    color: #1f2937;
}

.dark .chunk-card-stat-value {
    color: #e5e7eb;
}

.chunk-card-stat-label {
    color: #6b7280;
    font-size: 0.75rem;
}

.dark .chunk-card-stat-label {
    color: #9ca3af;
}

/* Stare pentru success stats */
.chunk-card-success .chunk-card-stat {
    background-color: #dcfce7;
}

.dark .chunk-card-success .chunk-card-stat {
    background-color: rgba(34, 197, 94, 0.3);
}

.chunk-card-success .chunk-card-stat-value {
    color: #15803d;
}

.dark .chunk-card-success .chunk-card-stat-value {
    color: #4ade80;
}

/* Stare pentru error stats */
.chunk-card-error .chunk-card-stat {
    background-color: #fecaca;
}

.dark .chunk-card-error .chunk-card-stat {
    background-color: rgba(239, 68, 68, 0.3);
}

.chunk-card-error .chunk-card-stat-value {
    color: #b91c1c;
}

.dark .chunk-card-error .chunk-card-stat-value {
    color: #f87171;
}

/* Progress indicator în card (pentru processing) */
.chunk-card-progress {
    margin-top: 0.5rem;
    width: 100%;
    background-color: #e5e7eb;
    border-radius: 9999px;
    height: 0.375rem;
    overflow: hidden;
}

.dark .chunk-card-progress {
    background-color: #374151;
}

.chunk-card-progress-bar {
    height: 0.375rem;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: 9999px;
    transition: all 0.3s ease;
    animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.8);
    }
}
/* ================================================================
   ENHANCED PROGRESS BARS & STATISTICS
   ================================================================ */

/* Progress Bar Container Modern */
.modern-progress-container {
    position: relative;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-radius: 9999px;
    padding: 2px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark .modern-progress-container {
    background: linear-gradient(135deg, #374151, #4b5563);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Progress Bar cu Gradient Animat - Import 90 zile */
#chunked-import-60-days-progress-bar {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8, #10b981, #059669);
    background-size: 300% 100%;
    animation: gradientShift 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

/* Progress Bar cu Gradient Animat - Monitor 7 zile */
#chunked-monitor-recent-progress-bar {
    background: linear-gradient(90deg, #14b8a6, #0d9488, #10b981, #059669);
    background-size: 300% 100%;
    animation: gradientShift 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

/* Animația pentru gradient */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Efect shimmer peste progress bar */
.progress-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Hover effects pentru badges */
.stats-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Timer Display Modern */
.timer-display {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.1));
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.dark .timer-display {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.1));
    border-color: rgba(255, 255, 255, 0.1);
}

/* Header Icon Modern */
.progress-header-icon {
    background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.progress-header-icon:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Animație pentru progress percentage */
.progress-percentage {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Toggle button styling */
.toggle-old-list-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.2s ease;
}

.toggle-old-list-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateX(4px);
}

.dark .toggle-old-list-btn {
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.2);
}

.dark .toggle-old-list-btn:hover {
    background: rgba(96, 165, 250, 0.2);
}

/* Section Headers Modern */
.progress-section-header {
    display: flex;
    align-items: center;
    font-size: 1.125rem;
    font-weight: 600;
    background: linear-gradient(135deg, #374151, #4b5563);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dark .progress-section-header {
    background: linear-gradient(135deg, #e5e7eb, #f3f4f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive Grid pentru Cards */
@media (max-width: 768px) {
    .progress-cards-container {
        grid-template-columns: 1fr;
    }
    
    .chunk-card-stats {
        grid-template-columns: 1fr;
    }
    
    .stats-badge {
        font-size: 0.75rem;
        padding: 0.5rem 0.25rem;
    }
}

@media (min-width: 1024px) {
    .progress-cards-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Loading State pentru Cards Container */
.cards-container-loading {
    position: relative;
    min-height: 120px;
}

.cards-container-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(243, 244, 246, 0) 0%, 
        rgba(243, 244, 246, 0.8) 50%, 
        rgba(243, 244, 246, 0) 100%);
    animation: loadingWave 1.5s infinite;
}

.dark .cards-container-loading::before {
    background: linear-gradient(90deg, 
        rgba(55, 65, 81, 0) 0%, 
        rgba(55, 65, 81, 0.8) 50%, 
        rgba(55, 65, 81, 0) 100%);
}

@keyframes loadingWave {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
/* SIMPLU ȘI FUNCȚIONAL - bazat pe roșul care mergea */
.chunk-card-processing {
    background-color: #dbfef2 !important;  /* albastru deschis */
    border: 0px solid #3bf6dd !important;  /* bordură albastră */
    transform: scale(1.0) !important;      /* puțin mai mare */
    animation: simplePulse 1s infinite !important;
    box-shadow: 0 0 5px rgba(59, 246, 206, 0.5) !important;
}

@keyframes simplePulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}
/* ================================================================
   MODERN TOOLTIP PENTRU DEUDOR NAMES
   ================================================================ */

/* Container pentru tooltip */
.deudor-tooltip-container {
    position: relative;
    cursor: default;
}

/* Tooltip-ul propriu-zis - mai mic și mai suav */
.deudor-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: linear-gradient(135deg, #64748b 0%, #475569 50%, #334155 100%);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 1000;
    
    /* Animații */
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-2px) scale(0.95);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Săgeata tooltip-ului - mai mică */
.deudor-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #64748b;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.05));
}

/* Efect glow mai subtil */
.deudor-tooltip::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, #94a3b8, #cbd5e1, #e2e8f0);
    border-radius: 9px;
    opacity: 0.2;
    z-index: -1;
    filter: blur(4px);
}

/* Hover effect - afișează tooltip-ul */
.deudor-tooltip-container:hover .deudor-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-6px) scale(1);
}

/* ORANGE mai suav pentru tabelul Ambigua */
#ambiguous-section .deudor-tooltip {
    background: linear-gradient(135deg, #fb923c 0%, #fdba74 50%, #fed7aa 100%);
}

#ambiguous-section .deudor-tooltip::after {
    border-top-color: #fb923c;
}

/* MOV mai suav pentru tabelul Manual */
#manual-section .deudor-tooltip {
    background: linear-gradient(135deg, #a855f7 0%, #c084fc 50%, #d8b4fe 100%);
}

#manual-section .deudor-tooltip::after {
    border-top-color: #a855f7;
}

/* VERDE mai suav pentru tabelul Conciliadas */
#reconciled-section .deudor-tooltip {
    background: linear-gradient(135deg, #34d399 0%, #6ee7b7 50%, #a7f3d0 100%);
}

#reconciled-section .deudor-tooltip::after {
    border-top-color: #34d399;
}

/* ALBASTRU mai suav pentru Express și Principal */
#express-section .deudor-tooltip,
#main-results-table-section .deudor-tooltip {
    background: linear-gradient(135deg, #60a5fa 0%, #93c5fd 50%, #bfdbfe 100%);
}

#express-section .deudor-tooltip::after,
#main-results-table-section .deudor-tooltip::after {
    border-top-color: #60a5fa;
}

/* Dark mode tooltip - mai subtil */
.dark .deudor-tooltip {
    background: linear-gradient(135deg, #374151 0%, #4b5563 50%, #6b7280 100%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.dark .deudor-tooltip::after {
    border-top-color: #374151;
}

/* Responsive - pe mobile tooltip mai mic */
@media (max-width: 640px) {
    .deudor-tooltip {
        font-size: 10px;
        padding: 6px 10px;
        border-radius: 6px;
        max-width: 200px;
        white-space: normal;
        word-wrap: break-word;
    }
    
    .deudor-tooltip::after {
        border-width: 4px;
    }
}

/* Animație subtilă pentru hover */
.deudor-tooltip-container:hover {
    transform: translateY(-0.5px);
    transition: transform 0.15s ease;
}

/* Efect pe text când e hover - mai subtil */
.deudor-tooltip-container:hover .truncate {
    color: #6b7280;
    transition: color 0.15s ease;
}

.dark .deudor-tooltip-container:hover .truncate {
    color: #9ca3af;
}
/* ===== PROGRESS BAR SLIM ȘI ELEGANT ===== */

.upload-progress-container {
    text-align: center;
    padding: 15px;
}

.upload-header {
    margin-bottom: 12px;
    font-size: 14px;
    color: #374151;
}

.progress-bar-container {
    width: 100%;
    height: 8px; /* SUBȚIRE în loc de 25px */
    background: linear-gradient(90deg, #f1f5f9, #e2e8f0);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 
        inset 0 1px 3px rgba(0,0,0,0.1),
        0 1px 2px rgba(0,0,0,0.05);
    margin: 10px 0;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 6px;
    transition: all 0.4s ease-out;
    position: relative;
    overflow: hidden;
}

/* CULORI PENTRU PROGRES */
.progress-bar-fill.progress-red {
    background: linear-gradient(90deg, #ef4444, #dc2626);
    box-shadow: 0 1px 4px rgba(239, 68, 68, 0.3);
}

.progress-bar-fill.progress-orange {
    background: linear-gradient(90deg, #f59e0b, #d97706);
    box-shadow: 0 1px 4px rgba(245, 158, 11, 0.3);
}

.progress-bar-fill.progress-green {
    background: linear-gradient(90deg, #10b981, #059669);
    box-shadow: 0 1px 4px rgba(16, 185, 129, 0.3);
}

.progress-bar-fill.progress-complete {
    background: linear-gradient(90deg, #10b981, #059669, #047857) !important;
    animation: progress-pulse 0.6s ease-in-out;
}

/* EFECT SHIMMER SUBȚIRE */
.progress-bar-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255,255,255,0.4), 
        transparent
    );
    animation: shimmer-slim 2s infinite;
}

.progress-text {
    margin-top: 8px;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* ANIMAȚII */
@keyframes shimmer-slim {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes progress-pulse {
    0%, 100% { 
        transform: scaleY(1); 
        opacity: 1; 
    }
    50% { 
        transform: scaleY(1.2); 
        opacity: 0.9; 
    }
}

/* DARK MODE SUPPORT */
@media (prefers-color-scheme: dark) {
    .upload-header {
        color: #6593da;
    }
    
    .progress-bar-container {
        background: linear-gradient(90deg, #374151, #4b5563);
    }
    
    .progress-text {
        color: #9ca3af;
    }
}

/* RESPONSIVE PENTRU MOBILE */
@media (max-width: 640px) {
    .upload-progress-container {
        padding: 10px;
    }
    
    .progress-bar-container {
        height: 6px; /* Și mai subțire pe mobile */
    }
    
    .upload-header {
        font-size: 13px;
    }
    
    .progress-text {
        font-size: 12px;
    }
}
/* Estilos para mostrar mejor el monto en modal ambiguedad */
.ambiguity-amount-display {
    margin: 8px 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.1);
}

.ambiguity-amount-label {
    font-weight: 600;
    color: #c2410c;
    font-size: 14px;
}

.ambiguity-amount-value {
    font-weight: 800;
    color: #9a3412;
    font-size: 16px;
    font-family: 'Courier New', monospace;
    background: #ffffff;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #ea580c;
}

/* Dark mode */
.dark .ambiguity-amount-display {
    background: linear-gradient(135deg, #9a3412 0%, #c2410c 100%);
    border-color: #fb923c;
}

.dark .ambiguity-amount-label {
    color: #fed7aa;
}

.dark .ambiguity-amount-value {
    color: #9a3412;
    background: #fef2f2;
    border-color: #fb923c;
}
/* Modal de conciliare mai mare */
#reconciliation-details-modal .relative {
    max-width: 600px !important; /* în loc de lg care e ~512px */
    width: 95% !important;
}

#reconciliation-details-modal .max-h-80 {
    max-height: 24rem !important; /* mai înalt */
}

@media (max-width: 768px) {
    #reconciliation-details-modal .relative {
        max-width: 95% !important;
        margin: 1rem !important;
    }
}
/* FORȚEAZĂ AFIȘAREA DASHBOARD-ULUI */
#dashboard-stats {
    display: block !important;
    opacity: 1 !important;
}
