/* Importar fuente Roboto de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

/* Estilos Generales del Plugin */
.bl-gastos-app { 
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; 
    background-color: #ffffff;
    color: #333333;
    line-height: 1.6;
    position: relative;
}

/* Logo/Marca arriba de los botones, alineado a la izquierda */
.bl-header-logo {
    display: block;
    margin-bottom: 20px;
    text-align: left;
}

.bl-header-logo img {
    height: 80px;
    width: auto;
    opacity: 0.9;
    transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
    cursor: pointer;
}

.bl-header-logo img:hover {
    opacity: 1;
    transform: scale(1.05);
    filter: brightness(1.1);
}

.bl-header-logo img:active {
    transform: scale(0.95);
}

/* Estado de carga para el logo */
.bl-header-logo img.loading {
    animation: logoSpin 2s linear infinite;
    filter: brightness(0.7) hue-rotate(45deg);
}

@keyframes logoSpin {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(1); }
    75% { transform: rotate(270deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

/* Animación para mensajes */
@keyframes slideIn {
    0% { 
        transform: translateX(100%); 
        opacity: 0; 
    }
    100% { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

/* Responsive - ajustar logo en móviles */
@media screen and (max-width: 768px) {
    .bl-header-logo {
        text-align: center;
        margin-bottom: 15px;
    }
    
    .bl-header-logo img {
        height: 60px;
    }
}

.bl-gastos-app h3 { 
    font-size: 22px; 
    color: #8b0000; 
    border-bottom: 2px solid #eee; 
    padding-bottom: 10px; 
    margin-bottom: 20px; 
    font-weight: 600;
    letter-spacing: 0.5px;
}
.bl-gastos-app label { 
    font-weight: 600; 
    margin-bottom: 6px; 
    display: block; 
    font-size: 14px; 
    color: #444444;
}
.bl-gastos-app .button, .bl-gastos-app button { 
    border-radius: 3px !important; 
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.bl-gastos-app .button:hover, .bl-gastos-app button:hover {
    transform: translateY(-1px);
}
.bl-gastos-app .button::before, .bl-gastos-app button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
.bl-gastos-app .button:active::before, .bl-gastos-app button:active::before {
    width: 300px;
    height: 300px;
}
.bl-gastos-app .form-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 18px; 
    margin-bottom: 25px; 
    background-color: #ffffff;
    padding: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
}
.bl-gastos-app .form-grid input, .bl-gastos-app .form-grid select { 
    width: 100%; 
    padding: 10px; 
    box-sizing: border-box; 
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
}
.bl-gastos-app .form-full-width { grid-column: 1 / -1; text-align: right; }
.bl-gastos-app .button-primary { 
    background: #8b0000; 
    border-color: #700000; 
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(139, 0, 0, 0.2);
}
.bl-gastos-app .button-primary:hover { 
    background: #700000; 
    border-color: #5a0000; 
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
    transform: translateY(-2px);
}
.bl-gastos-app .button-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(139, 0, 0, 0.25);
}

/* Menú de Navegación */
.bl-modern-nav { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 10px; 
    border-bottom: 2px solid #e0e0e0; 
    padding-bottom: 15px; 
    margin-bottom: 30px; 
    background-color: #ffffff;
}
.bl-modern-nav a { 
    text-decoration: none; 
    color: #444444; 
    background-color: #ffffff; 
    padding: 12px 20px; 
    border-radius: 5px; 
    font-size: 15px; 
    font-weight: 500; 
    border: 1px solid #d3d3d3; 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}
.bl-modern-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 0, 0, 0.1), transparent);
    transition: left 0.6s ease;
}
.bl-modern-nav a:hover { 
    background-color: #f8f8f8; 
    border-color: #8b0000; 
    color: #8b0000;
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.15);
    transform: translateY(-2px);
}
.bl-modern-nav a:hover::before {
    left: 100%;
}
.bl-modern-nav a.active { 
    color: #ffffff; 
    background-color: #8b0000; 
    border-color: #700000; 
    font-weight: 600; 
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.25);
    transform: translateY(-1px);
}
.bl-modern-nav a.active::before {
    display: none;
}

/* Tablas */
.bl-gastos-app table { 
    width: 100%; 
    border-collapse: collapse; 
    font-size: 14px; 
    background-color: #ffffff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.bl-gastos-app th, .bl-gastos-app td { 
    padding: 12px; 
    border: 1px solid #e5e5e5; 
    text-align: left; 
    vertical-align: middle; 
}
.bl-gastos-app thead tr { 
    background-color: #8b0000; 
    color: #ffffff;
}
.bl-gastos-app thead th {
    font-weight: 600;
    letter-spacing: 0.3px;
    border: 1px solid #700000;
}
.bl-gastos-app tbody tr:nth-child(even) {
    background-color: #fafafa;
}
.bl-gastos-app tbody tr:hover {
    background-color: #f5f5f5;
}
.bl-gastos-app .actions-cell form { display: inline-block; margin-left: 5px; }

/* Módulo Crear Gasto */
.photo-thumb { 
    width: 45px; 
    height: 45px; 
    object-fit: cover; 
    margin: 0 5px; 
    border: 2px solid #d3d3d3; 
    cursor: pointer; 
    border-radius: 5px; 
    transition: all 0.3s ease;
}
.photo-thumb:hover {
    border-color: #8b0000;
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.2);
}
.action-btn { 
    padding: 8px 15px; 
    border: none; 
    border-radius: 4px; 
    color: white; 
    cursor: pointer; 
    margin-right: 8px; 
    font-weight: 500;
    transition: all 0.3s ease;
}
.approve-btn { 
    background-color: #2d5016; 
    box-shadow: 0 2px 4px rgba(45, 80, 22, 0.2);
}
.approve-btn:hover { 
    background-color: #1e3510; 
    box-shadow: 0 3px 6px rgba(45, 80, 22, 0.3);
}
.delete-btn { 
    background-color: #8b0000; 
    box-shadow: 0 2px 4px rgba(139, 0, 0, 0.2);
}
.delete-btn:hover { 
    background-color: #700000; 
    box-shadow: 0 3px 6px rgba(139, 0, 0, 0.3);
}
.status-aprobado { color: #2d5016; font-weight: bold; }
.status-pendiente { color: #b8860b; font-weight: bold; }
#passwordModal { 
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.7); 
    align-items: center; 
    justify-content: center; 
}
#passwordModal .modal-content { 
    background-color: #ffffff; 
    margin: auto; 
    padding: 30px; 
    border: 1px solid #d3d3d3; 
    width: 90%; 
    max-width: 400px; 
    border-radius: 8px; 
    text-align: center; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}
#passwordModal #modal-response { 
    margin-top: 15px; 
    font-weight: bold; 
}

/* Módulo Procesar Pago */
.fotos-cell a { display: inline-block; margin: 0 5px 5px 0; }
.fotos-cell img { 
    width: 45px; 
    height: 45px; 
    object-fit: cover; 
    border: 2px solid #d3d3d3; 
    border-radius: 5px; 
    transition: all 0.3s ease; 
}
.fotos-cell img:hover { 
    transform: scale(1.1); 
    border-color: #8b0000;
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.2);
}
.actions-cell .button-aprobar { 
    background: #2d5016; 
    border-color: #2d5016; 
    color: white !important; 
    box-shadow: 0 2px 4px rgba(45, 80, 22, 0.2);
}
.actions-cell .button-aprobar:hover { 
    background: #1e3510; 
    border-color: #1e3510; 
    box-shadow: 0 3px 6px rgba(45, 80, 22, 0.3);
}
.actions-cell .button-rechazar { 
    background: #8b0000; 
    border-color: #8b0000; 
    color: white !important; 
    box-shadow: 0 2px 4px rgba(139, 0, 0, 0.2);
}
.actions-cell .button-rechazar:hover { 
    background: #700000; 
    border-color: #700000; 
    box-shadow: 0 3px 6px rgba(139, 0, 0, 0.3);
}

/* Ajuste de ancho para formularios en vistas CRUD */
.bl-form-container,
.bl-search-container {
    max-width: 550px; /* Incremento ligero para mejor legibilidad */
    background-color: #ffffff;
    padding: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* --- ESTILOS RESPONSIVOS --- */

/* Ajustes para tablas en móviles */
.responsive-table {
    border: 1px solid #e5e5e5;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Media Query para pantallas pequeñas (móviles) de hasta 768px de ancho */
@media screen and (max-width: 768px) {

    /* Formularios en una sola columna */
    .form-grid {
        grid-template-columns: 1fr; /* Cambia la grilla a una sola columna */
    }

    /* Mejoras responsivas para menú principal */
    .bl-modern-nav {
        gap: 8px;
        padding-bottom: 12px;
        margin-bottom: 20px;
    }
    
    .bl-modern-nav a {
        padding: 10px 16px;
        font-size: 14px;
        flex: 1;
        text-align: center;
        min-width: 120px;
    }
    
    /* Mejoras responsivas para submenú */
    .bl-modern-subnav {
        gap: 6px;
        margin-top: -15px;
        margin-bottom: 20px;
    }
    
    .bl-modern-subnav a {
        padding: 8px 14px;
        font-size: 13px;
        flex: 1;
        text-align: center;
        min-width: 100px;
    }

    /* Transformación de la tabla */
    .responsive-table thead {
        display: none; /* Ocultamos los encabezados originales */
    }

    .responsive-table tr {
        display: block; /* Cada fila se comporta como un bloque */
        margin-bottom: 20px;
        border-bottom: 3px solid #8b0000; /* Borde inferior para separar cada "tarjeta" */
        background-color: #ffffff;
        border-radius: 5px;
        padding: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .responsive-table td {
        display: block; /* Cada celda se comporta como un bloque */
        text-align: right; /* Alineamos el dato a la derecha */
        padding-left: 50%; /* Dejamos espacio a la izquierda para la etiqueta */
        position: relative;
        border-bottom: 1px dotted #d3d3d3;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .responsive-table td:last-child {
        border-bottom: 0;
    }

    /* Excepción para la celda de acciones - mantener botones en fila */
    .responsive-table td.actions-cell {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding-left: 10px !important;
        text-align: left !important;
    }
    
    .responsive-table td.actions-cell:before {
        position: static !important;
        width: auto !important;
        margin-right: 10px !important;
        margin-bottom: 0 !important;
    }

    /* Creamos las etiquetas (labels) a partir de los atributos 'data-label' */
    .responsive-table td:before {
        content: attr(data-label); /* El contenido será el texto del atributo */
        position: absolute;
        left: 10px;
        width: calc(50% - 20px);
        padding-right: 10px;
        text-align: left;
        font-weight: 600;
        color: #8b0000;
        font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    }
}

/* Media Query para tablets (768px - 1024px) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .bl-modern-nav a {
        padding: 11px 18px;
        font-size: 14px;
    }
    
    .bl-modern-subnav a {
        padding: 9px 16px;
        font-size: 13px;
    }
    
    .form-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
}

/* Media Query para pantallas muy pequeñas (hasta 480px) */
@media screen and (max-width: 480px) {
    .bl-modern-nav {
        flex-direction: column;
        gap: 6px;
    }
    
    .bl-modern-nav a {
        width: 100%;
        text-align: center;
        padding: 12px 16px;
        margin: 0;
    }
    
    .bl-modern-subnav {
        flex-direction: column;
        gap: 4px;
    }
    
    .bl-modern-subnav a {
        width: 100%;
        text-align: center;
        padding: 10px 14px;
    }
    
    .bl-header-logo img {
        height: 50px;
    }
    
    .form-grid {
        gap: 12px;
        padding: 12px;
    }
    
    .bl-form-container,
    .bl-search-container {
        padding: 15px;
        margin: 0 5px;
    }
}

/* --- Estilos para Módulo Procesar Pago --- */
.bl-gastos-app .actions-cell .button {
    padding: 6px 12px;
    font-size: 12px;
    height: auto;
    line-height: 1.6;
    margin-top: 3px !important;
    width: 90px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
}
.bl-gastos-app .actions-cell .button:hover {
    filter: brightness(110%);
    transform: translateY(-1px);
}
.bl-gastos-app .actions-cell .button-aprobar { 
    background: #2d5016; 
    border-color: #2d5016; 
    color: white !important; 
    box-shadow: 0 2px 4px rgba(45, 80, 22, 0.2);
}
.bl-gastos-app .actions-cell .button-rechazar { 
    background: #8b0000; 
    border-color: #8b0000; 
    color: white !important; 
    box-shadow: 0 2px 4px rgba(139, 0, 0, 0.2);
}

/* NOTA: Se eliminan las clases .button-eliminar-proceso y .delete-proceso-btn */

.bl-gastos-app .fotos-cell a { display: inline-block; margin: 0 5px 5px 0; }
.bl-gastos-app .fotos-cell img { 
    width: 45px; 
    height: 45px; 
    object-fit: cover; 
    border: 2px solid #d3d3d3; 
    border-radius: 5px; 
    transition: all 0.3s ease; 
}
.bl-gastos-app .fotos-cell img:hover { 
    transform: scale(1.1); 
    border-color: #8b0000;
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.2);
}

.bl-gastos-app .filtros-busqueda { 
    display: flex; 
    gap: 12px; 
    align-items: center; 
    margin-bottom: 20px; 
    background-color: #ffffff;
    padding: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
}
.bl-gastos-app .filtros-busqueda input[type="text"] { 
    max-width: 450px; 
    width: 100%; 
    padding: 10px;
    border: 1px solid #d3d3d3;
    border-radius: 3px;
}

.bl-gastos-app .totals-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 15px;
    font-size: 16px;
    gap: 20px;
    font-weight: 600;
    flex-wrap: wrap;
    background-color: #f8f8f8;
    padding: 12px 20px;
    border-radius: 5px;
    border-left: 4px solid #8b0000;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* --- Ajustes para Formulario de Reporte --- */
.filter-group-date {
    display: flex;
    flex-direction: column;
    gap: 5px; /* Espacio entre label y campo de fecha */
}

.filter-group-date label {
    display: flex;
    align-items: center; /* Alinea el checkbox con su texto */
    gap: 5px;
}

/* --- Colores para Estados de Gasto --- */
.status-pagado {
    color: #1a4d00; /* Verde oscuro más formal para "Pagado" */
    font-weight: 600;
}
.status-aprobado {
    color: #2d5016; /* Verde oscuro más sobrio para "Aprobado" */
    font-weight: 600;
}
.status-rechazado {
    color: #8b0000; /* Rojo oscuro para "Rechazado" */
    font-weight: 600;
}
.status-pendiente {
    color: #b8860b; /* Amarillo dorado más elegante para "Pendiente" */
    font-weight: 600;
}

/* --- Estilos para Interruptor (Toggle Switch) --- */
.toggle-switch-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}
input:checked + .slider {
    background-color: #2d5016; /* Verde oscuro cuando está activo para consistencia */
}
input:checked + .slider:before {
    transform: translateX(26px);
}
.slider.round {
    border-radius: 24px;
}
.slider.round:before {
    border-radius: 50%;
}

/* --- Contenedor para los campos de fecha --- */
.date-inputs-container {
    display: flex;
    gap: 10px;
}
/* Estilo para campos de fecha deshabilitados */
.date-inputs-container input[type="date"]:disabled {
    background-color: #f8f8f8;
    cursor: not-allowed;
    opacity: 0.6;
    border-color: #d3d3d3;
}
/* --- Estilos para la Barra de Resumen del Reporte --- */
.report-summary-bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 30px; /* Aumenta el espacio entre elementos */
    padding: 15px 25px;
    margin-bottom: 25px;
    background-color: #ffffff; /* Fondo blanco limpio */
    border-left: 5px solid #8b0000; /* Borde rojo oscuro distintivo */
    border-radius: 5px;
    font-size: 16px; /* Texto ligeramente más grande */
    flex-wrap: wrap; /* Para que se adapte en pantallas pequeñas */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.report-summary-bar span {
    color: #444444;
    font-weight: 500;
}

.report-summary-bar strong {
    color: #8b0000;
    font-weight: 600;
}

/* --- Estilos para Sub-Navegación --- */
.bl-modern-subnav {
    margin-top: -20px; /* Reduce el espacio con el menú principal */
    margin-bottom: 30px;
    border-top: none; /* Quita el borde superior para que no se duplique */
    padding-top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.bl-modern-subnav a {
    font-size: 14px; /* Letra un poco más pequeña */
    background-color: #ffffff;
    padding: 10px 18px;
    border: 1px solid #e5e5e5;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    color: #666666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.bl-modern-subnav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #8b0000;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.bl-modern-subnav a:hover {
    background-color: #f8f8f8;
    border-color: #8b0000;
    color: #8b0000;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(139, 0, 0, 0.12);
}
.bl-modern-subnav a:hover::after {
    width: 80%;
}
.bl-modern-subnav a.active {
    background-color: #8b0000;
    color: #ffffff;
    border-color: #700000;
    box-shadow: 0 3px 8px rgba(139, 0, 0, 0.2);
}
.bl-modern-subnav a.active::after {
    display: none;
}

/* --- SISTEMA DE NOTAS --- */
/* Modal para Notas */
#notasModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
}

#notasModal .modal-content {
    background-color: #ffffff;
    margin: auto;
    padding: 0;
    border: 1px solid #d3d3d3;
    width: 90%;
    max-width: 700px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header del modal */
.modal-header {
    background-color: #8b0000;
    color: #ffffff;
    padding: 20px 25px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    border-bottom: none;
    padding-bottom: 0;
    letter-spacing: 0.5px;
}

.modal-header .close {
    color: #ffffff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.modal-header .close:hover {
    opacity: 1;
}

/* Info del gasto */
.gasto-info {
    background-color: #f8f8f8;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e5e5;
}

.gasto-info h4 {
    margin: 0 0 10px 0;
    color: #8b0000;
    font-size: 16px;
    font-weight: 600;
}

.gasto-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    font-size: 14px;
    color: #444444;
}

.gasto-detail-item {
    display: flex;
    flex-direction: column;
}

.gasto-detail-label {
    font-weight: 600;
    color: #8b0000;
    margin-bottom: 2px;
}

.gasto-detail-value {
    color: #444444;
}

/* Cuerpo del modal */
.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
}

/* Lista de notas */
.notas-lista {
    margin-bottom: 25px;
}

.notas-lista h4 {
    color: #8b0000;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
}

.nota-item {
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.nota-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.nota-usuario {
    font-weight: 600;
    color: #8b0000;
    font-size: 14px;
}

.nota-fecha {
    font-size: 12px;
    color: #666666;
    font-style: italic;
}

.nota-contenido {
    color: #444444;
    line-height: 1.6;
    font-size: 14px;
    white-space: pre-wrap;
}

/* Formulario nueva nota */
.nueva-nota-form {
    border-top: 2px solid #e5e5e5;
    padding-top: 20px;
}

.nueva-nota-form h4 {
    color: #8b0000;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.nueva-nota-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #d3d3d3;
    border-radius: 5px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
}

.nueva-nota-form textarea:focus {
    outline: none;
    border-color: #8b0000;
    box-shadow: 0 0 5px rgba(139, 0, 0, 0.2);
}

.nueva-nota-actions {
    margin-top: 15px;
    text-align: right;
}

.btn-guardar-nota {
    background-color: #8b0000;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.btn-guardar-nota:hover {
    background-color: #700000;
    box-shadow: 0 3px 6px rgba(139, 0, 0, 0.3);
}

.btn-guardar-nota:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Botón de notas */
.btn-notas {
    background-color: #b8860b; /* Amarillo oscuro (dark goldenrod) */
    color: #ffffff !important;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-right: 5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 4px rgba(184, 134, 11, 0.2);
}

.btn-notas:hover {
    background-color: #9a7209; /* Amarillo más oscuro en hover */
    box-shadow: 0 2px 4px rgba(184, 134, 11, 0.4);
    transform: translateY(-1px);
}

.btn-notas svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Botón de notas cuando tiene mensajes (verde) */
.btn-notas.con-notas {
    background-color: #28a745; /* Verde */
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.btn-notas.con-notas:hover {
    background-color: #218838; /* Verde más oscuro en hover */
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.4);
    transform: translateY(-1px);
}

/* Contenedor del botón de notas con contador */
.btn-notas-container {
    position: relative;
    display: inline-block;
}

/* Badge contador de notas */
.notas-counter {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545; /* Rojo para destacar */
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    z-index: 1;
}

/* Ocultar contador cuando es 0 */
.notas-counter.hidden {
    display: none;
}

/* Ajustes responsivos para el contador */
@media screen and (max-width: 768px) {
    .notas-counter {
        top: -6px;
        right: -6px;
        width: 16px;
        height: 16px;
        font-size: 9px;
    }
}

/* ==========================================================================
   MÓDULO NOTAS - ESTILOS ESPECÍFICOS
   ========================================================================== */

.notas-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.notas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}

.notas-stats {
    color: #666;
    font-size: 14px;
}

.search-container {
    margin-bottom: 25px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 300px;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.search-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #005a87;
}

.clear-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
}

.clear-btn:hover {
    background: #545b62;
    color: white;
}

/* Tabla de notas compacta */
.notas-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.notas-table th {
    background: #f8f9fa;
    font-weight: 600;
    padding: 12px 8px;
    border-bottom: 2px solid #dee2e6;
    font-size: 13px;
}

.sort-link {
    color: #333;
    text-decoration: none;
    display: block;
    width: 100%;
    font-weight: 600;
    transition: color 0.3s ease;
}

.sort-link:hover {
    color: #007cba;
    text-decoration: none;
}

.sort-link:focus {
    color: #007cba;
    text-decoration: none;
    outline: none;
}

.notas-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
    font-size: 13px;
}

.notas-table tr:hover {
    background-color: #f8f9fa;
}

/* Columnas específicas */
.id-column {
    width: 80px;
    text-align: center;
}

.fecha-column {
    width: 90px;
}

.usuario-column {
    width: 120px;
}

.nota-column {
    width: 250px;
    max-width: 250px;
}

.gasto-column {
    width: 200px;
    max-width: 200px;
}

.monto-column {
    width: 100px;
    text-align: right;
}

.proyecto-column {
    width: 150px;
    max-width: 150px;
}

.colaborador-column {
    width: 120px;
}

.acciones-column {
    width: 60px;
    text-align: center;
}

/* Estilos para elementos específicos de la tabla */
.gasto-id-badge {
    background: #007cba;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.fecha-completa {
    display: block;
    font-weight: 500;
    color: #333;
}

.hora-completa {
    display: block;
    font-size: 11px;
    color: #666;
}

.usuario-nombre {
    font-weight: 500;
    color: #007cba;
}

.nota-contenido-compacto {
    line-height: 1.4;
    color: #333;
    max-width: 100%;
    overflow: hidden;
    word-wrap: break-word;
}

.gasto-descripcion-compacta,
.proyecto-nombre,
.colaborador-nombre {
    max-width: 100%;
    overflow: hidden;
    word-wrap: break-word;
}

.monto-valor {
    font-weight: 600;
    color: #28a745;
}

.btn-ver-gasto {
    display: inline-block;
    padding: 6px 8px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.3s ease;
}

.btn-ver-gasto:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

/* Responsive para tabla de notas */
@media (max-width: 1200px) {
    .nota-column {
        width: 200px;
        max-width: 200px;
    }
    
    .gasto-column {
        width: 150px;
        max-width: 150px;
    }
    
    .proyecto-column {
        width: 120px;
        max-width: 120px;
    }
}

@media (max-width: 992px) {
    .notas-table,
    .notas-table thead,
    .notas-table tbody,
    .notas-table th,
    .notas-table td,
    .notas-table tr {
        display: block;
    }
    
    .notas-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .notas-table tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        padding: 10px;
        border-radius: 8px;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .notas-table td {
        border: none !important;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 30% !important;
        padding-top: 8px;
        padding-bottom: 8px;
    }
    
    .notas-table td:before {
        position: absolute;
        top: 8px;
        left: 6px;
        width: 25%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        color: #666;
        font-size: 11px;
    }
    
    .notas-table .id-column:before { content: "ID Gasto:"; }
    .notas-table .fecha-column:before { content: "Fecha:"; }
    .notas-table .usuario-column:before { content: "Usuario:"; }
    .notas-table .nota-column:before { content: "Nota:"; }
    .notas-table .gasto-column:before { content: "Gasto:"; }
    .notas-table .monto-column:before { content: "Monto:"; }
    .notas-table .proyecto-column:before { content: "Proyecto:"; }
    .notas-table .colaborador-column:before { content: "Colaborador:"; }
    .notas-table .acciones-column:before { content: "Acciones:"; }
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.highlight {
    background-color: #fff3cd;
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: bold;
}

/* Responsive para módulo notas */
@media (max-width: 768px) {
    .notas-container {
        padding: 10px;
    }
    
    .notas-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        min-width: auto;
    }
    
    /* Las reglas responsive de tabla ya están arriba */
}

/* Estado "sin notas" */
.sin-notas {
    text-align: center;
    color: #666666;
}

/* Botón de archivos adjuntos */
.btn-archivos {
    background-color: #6f42c1; /* Púrpura */
    color: #ffffff !important;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-right: 5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 4px rgba(111, 66, 193, 0.2);
}

.btn-archivos:hover {
    background-color: #5a359a; /* Púrpura más oscuro en hover */
    box-shadow: 0 2px 4px rgba(111, 66, 193, 0.4);
    transform: translateY(-1px);
}

.btn-archivos svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Botones de iconos para aprobar y rechazar */
.btn-icon-aprobar, .btn-icon-rechazar {
    background: none;
    border: none;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.btn-icon-aprobar {
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

.btn-icon-aprobar:hover {
    background-color: #28a745;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.btn-icon-rechazar {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.btn-icon-rechazar:hover {
    background-color: #dc3545;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.btn-icon-aprobar svg, .btn-icon-rechazar svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Mejorar la alineación de botones en las acciones */
.actions-cell {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* Asegurar que los botones se mantengan en fila en procesar pagos */
.actions-cell .btn-notas,
.actions-cell .btn-archivos,
.actions-cell .btn-icon-aprobar,
.actions-cell .btn-icon-rechazar {
    flex-shrink: 0;
}

/* Forzar comportamiento en fila para pantallas grandes */
@media screen and (min-width: 769px) {
    .actions-cell {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }
    
    .responsive-table .actions-cell {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 4px !important;
    }
    
    .responsive-table .actions-cell > * {
        display: inline-flex !important;
        margin-right: 4px !important;
    }
}

/* CSS específico para vista procesar pagos - forzar botones en fila */
.wp-list-table.widefat.fixed.striped.responsive-table .actions-cell {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px !important;
}

.wp-list-table.widefat.fixed.striped.responsive-table .actions-cell button {
    display: inline-flex !important;
    margin: 0 2px !important;
}

/* Responsive */
@media screen and (max-width: 768px) {
    #notasModal .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .gasto-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    /* Responsive para botones de iconos */
    .actions-cell {
        justify-content: flex-start !important;
    }
    
    .btn-icon-aprobar, .btn-icon-rechazar {
        width: 32px;
        height: 32px;
        margin: 2px;
        flex-shrink: 0 !important;
    }
    
    .btn-icon-aprobar svg, .btn-icon-rechazar svg {
        width: 16px;
        height: 16px;
    }
    
    .btn-notas, .btn-archivos {
        flex-shrink: 0 !important;
    }
    
    .modal-body {
        padding: 20px;
    }
}

/* --- ESTILOS ESPECÍFICOS PARA EL LOG --- */
/* Estilos para badges y estados en el log */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: white;
    text-transform: uppercase;
}

.status-crear-gasto { background-color: #2d5016; }
.status-procesar-pago { background-color: #8b0000; }
.status-reporte { background-color: #b8860b; }
.status-colaboradores { background-color: #4a90e2; }
.status-encargados { background-color: #6f42c1; }
.status-centros-costo { background-color: #fd7e14; }
.status-plantillas-ot { background-color: #20c997; }
.status-orden-trabajo { background-color: #e83e8c; }
.status-log { background-color: #6c757d; }
.status-sistema { background-color: #17a2b8; }

.action-badge {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    color: white;
    text-transform: uppercase;
}

.action-crear { background-color: #28a745; }
.action-editar { background-color: #ffc107; color: #000; }
.action-eliminar { background-color: #dc3545; }
.action-aprobar { background-color: #28a745; }
.action-rechazar { background-color: #dc3545; }
.action-acceso { background-color: #6c757d; }
.action-consultar_notas { background-color: #17a2b8; }
.action-crear_nota { background-color: #20c997; }
.action-limpiar_cache { background-color: #fd7e14; }

/* Estilos específicos para las nuevas columnas del log */
.log-location-info, .log-device-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
}

.log-location-info div, .log-device-info div {
    display: flex;
    align-items: center;
    gap: 4px;
}

.log-ip-cell code {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 3px;
    padding: 2px 4px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #495057;
}

/* Mejoras responsivas para las nuevas columnas */
@media screen and (max-width: 768px) {
    .responsive-table td[data-label="Ubicación"],
    .responsive-table td[data-label="Dispositivo"] {
        padding-top: 12px;
        padding-bottom: 12px;
    }
    
    .responsive-table td[data-label="Ubicación"] div,
    .responsive-table td[data-label="Dispositivo"] div {
        margin-bottom: 3px;
    }
}

/* Paginación del log */
.tablenav {
    margin: 20px 0;
    text-align: center;
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 5px;
}

.tablenav-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tablenav-pages .button {
    margin: 0;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #d3d3d3;
    background-color: #ffffff;
    color: #444444;
    transition: all 0.3s ease;
}

.tablenav-pages .button:hover {
    background-color: #8b0000;
    color: #ffffff;
    border-color: #8b0000;
    transform: translateY(-1px);
}

.paging-input {
    margin: 0 10px;
    font-weight: 600;
    color: #8b0000;
    background-color: #ffffff;
    padding: 8px 15px;
    border-radius: 4px;
    border: 2px solid #8b0000;
}

/* Modal de detalles del log */
#logDetallesModal .modal-content {
    background-color: #ffffff;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
}

#logDetallesModal .modal-header {
    background-color: #8b0000;
    color: #ffffff;
    border-radius: 8px 8px 0 0;
}

#logDetallesModal pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 12px;
    font-size: 12px;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Estilos para el formulario de autenticación del log */
.bl-log-auth-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.bl-log-auth-container h3 {
    text-align: center;
    color: #8b0000 !important;
    border-bottom: 2px solid #8b0000 !important;
    margin-bottom: 25px !important;
}

.bl-log-auth-container input[type="password"] {
    background-color: #ffffff;
    border: 2px solid #dee2e6;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.bl-log-auth-container input[type="password"]:focus {
    border-color: #8b0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
    outline: none;
}

.bl-log-security-notice {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #fdcb6e;
    border-radius: 4px;
    padding: 12px;
    margin-top: 20px;
    font-size: 12px;
    color: #856404;
    text-align: center;
}

.bl-log-logout-btn {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.bl-log-logout-btn:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* Responsive para el log */
@media screen and (max-width: 768px) {
    .tablenav-pages {
        flex-direction: column;
        gap: 5px;
    }
    
    .tablenav-pages .button {
        width: 100%;
        max-width: 200px;
    }
    
    .paging-input {
        margin: 10px 0;
        text-align: center;
    }
}

/* --- SISTEMA DE ARCHIVOS ADJUNTOS --- */
/* Modal para Archivos */
#archivosModal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
}

#archivosModal .modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Lista de archivos */
.archivos-lista {
    margin-bottom: 25px;
}

.archivos-lista h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.archivo-item {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.archivo-item:hover {
    background-color: #e9ecef;
    border-color: #6f42c1;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.1);
}

.archivo-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.archivo-nombre {
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.archivo-meta {
    font-size: 12px;
    color: #6c757d;
}

.archivo-acciones {
    display: flex;
    gap: 8px;
}

.btn-descargar, .btn-eliminar-archivo {
    padding: 4px 8px;
    font-size: 11px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-descargar {
    background-color: #28a745;
    color: white;
}

.btn-descargar:hover {
    background-color: #218838;
}

.btn-eliminar-archivo {
    background-color: #dc3545;
    color: white;
}

.btn-eliminar-archivo:hover {
    background-color: #c82333;
}

/* Formulario de subida de archivos */
.nuevo-archivo-form {
    border-top: 2px solid #6f42c1;
    padding-top: 20px;
}

.nuevo-archivo-form h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-upload-area {
    border: 2px dashed #6f42c1;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background-color: #f8f9fa;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    background-color: #e9ecef;
    border-color: #5a359a;
}

.file-upload-area input[type="file"] {
    display: none;
}

.file-upload-area label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #6f42c1;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.file-upload-area label:hover {
    background-color: #5a359a;
    transform: translateY(-1px);
}

#archivo-seleccionado {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: #6c757d;
}

.nuevo-archivo-actions {
    text-align: center;
}

.btn-subir-archivo {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-subir-archivo:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

.btn-subir-archivo:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* Responsive para archivos */
@media screen and (max-width: 768px) {
    #archivosModal .modal-content {
        width: 95%;
        margin: 2% auto;
        max-height: 90vh;
    }
    
    .archivo-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .archivo-acciones {
        align-self: stretch;
        justify-content: space-between;
    }
}

/* ===== ESTILOS PARA ELIMINAR GASTOS DESDE LOG ===== */
.eliminar-gastos-toolbar {
    margin-bottom: 20px;
}

.eliminar-gastos-toolbar h4 {
    margin: 0;
    color: #dc3545;
    font-weight: 600;
}

.gastos-grid-container {
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#tabla-gastos {
    margin: 0;
    width: 100%;
}

#tabla-gastos th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 10;
    border-bottom: 2px solid #dee2e6;
}

.descripcion-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.estado-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.estado-pendiente {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.estado-aprobado {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.estado-pagado {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.estado-rechazado {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.estado-otro {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.btn-eliminar-gasto-individual {
    transition: all 0.2s ease;
    font-size: 11px !important;
    padding: 4px 8px !important;
}

.btn-eliminar-gasto-individual:hover {
    background-color: #c82333 !important;
    transform: scale(1.05);
}

.btn-eliminar-gasto-individual:active {
    transform: scale(0.95);
}

/* Responsive para eliminar gastos */
@media screen and (max-width: 768px) {
    #eliminarGastosModal .modal-content {
        width: 98%;
        max-height: 95vh;
    }
    
    .eliminar-gastos-toolbar div {
        flex-direction: column;
        gap: 15px;
        align-items: stretch !important;
    }
    
    #buscar-gastos {
        width: 100% !important;
    }
    
    .gastos-grid-container {
        max-height: 50vh;
    }
    
    #tabla-gastos {
        font-size: 12px;
    }
    
    .descripcion-cell {
        max-width: 120px;
    }
}

/* ===== ESTILOS ESPECÍFICOS PARA ESTADÍSTICAS ===== */
.bl-estadistica-container {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Mejoras para las métricas */
.bl-metric-card {
    position: relative;
    overflow: hidden;
}

.bl-metric-card::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;
}

.bl-metric-card:hover::before {
    left: 100%;
}

/* Animaciones para las tablas */
.bl-stats-table tbody tr {
    transition: all 0.3s ease;
}

.bl-stats-table tbody tr:hover {
    background: linear-gradient(90deg, #f8f9fa, #e9ecef);
    transform: scale(1.02);
}

/* Efectos para los insights */
.insight-card {
    border-left-width: 4px;
    border-left-style: solid;
    border-image: linear-gradient(45deg, #007cba, #00a0d2) 1;
    transition: all 0.3s ease;
}

.insight-card:hover {
    box-shadow: 0 5px 15px rgba(0, 124, 186, 0.2);
    transform: translateY(-2px);
}

/* Responsividad mejorada */
@media (max-width: 480px) {
    .bl-metric-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .metric-icon {
        font-size: 2em;
    }
    
    .metric-value {
        font-size: 1.5em;
    }
}