/*==============================
    REPORTE GENERAL - ESTILOS CSS
================================*/

/* Animaciones para cards */
.animate-card {
    animation: slideInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

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

/* Estilos para small-box */
.small-box {
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
}

.small-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Colores para montos */
.monto-positivo {
    color: #28a745 !important;
    font-weight: bold;
}

.monto-negativo {
    color: #dc3545 !important;
    font-weight: bold;
}

/* Estilos para las secciones del reporte */
.seccion-reporte {
    margin-bottom: 2rem;
}

.seccion-reporte h4 {
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Estilos para tablas */
.table-reporte {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table-reporte th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

.table-reporte td {
    vertical-align: middle;
}

/* Estilos para alertas */
.alert-reporte {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Estilos para el formulario */
.form-reporte {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-reporte .card-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 8px 8px 0 0;
}

/* Estilos para iconos */
.icono-reporte {
    font-size: 1.2em;
    margin-right: 0.5rem;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

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

/* Responsive design */
@media (max-width: 768px) {
    .small-box {
        margin-bottom: 1rem;
    }

    .small-box .inner h3 {
        font-size: 1.5rem;
    }

    .seccion-reporte h4 {
        font-size: 1.2rem;
    }
}

/* Estilos para impresión */
@media print {
    .no-print {
        display: none !important;
    }

    .small-box {
        break-inside: avoid;
        margin-bottom: 20px;
        border: 1px solid #ddd;
        padding: 15px;
        box-shadow: none;
    }

    .card {
        break-inside: avoid;
        border: 1px solid #ddd;
        margin-bottom: 20px;
        box-shadow: none;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        color: #000 !important;
    }

    .text-white {
        color: #000 !important;
    }

    .bg-success,
    .bg-warning,
    .bg-primary,
    .bg-info,
    .bg-secondary,
    .bg-danger {
        background-color: #f8f9fa !important;
        color: #000 !important;
    }

    .content-wrapper {
        margin: 0;
        padding: 0;
    }

    .breadcrumb {
        display: none;
    }
}

/* Tema oscuro */
[data-bs-theme="dark"] .small-box {
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .table-reporte {
    background: #343a40;
    color: #fff;
}

[data-bs-theme="dark"] .table-reporte th {
    background-color: #495057;
    color: #fff;
}

[data-bs-theme="dark"] .form-reporte {
    background: #343a40;
    color: #fff;
}

/* Animaciones adicionales */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

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

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

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

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

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

/* Estilos para tooltips personalizados */
.tooltip-reporte {
    position: relative;
    cursor: help;
}

.tooltip-reporte:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

/* Estilos para badges */
.badge-reporte {
    font-size: 0.8em;
    padding: 0.4em 0.8em;
    border-radius: 20px;
}

.badge-positivo {
    background-color: #28a745;
    color: white;
}

.badge-negativo {
    background-color: #dc3545;
    color: white;
}

.badge-neutro {
    background-color: #6c757d;
    color: white;
}

/* Estilos para tabla de movimientos */
#tablaMovimientos {
    font-size: 0.9em;
}

#tablaMovimientos thead th {
    background-color: #343a40;
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8em;
    letter-spacing: 0.5px;
}

#tablaMovimientos tbody tr {
    transition: all 0.2s ease;
}

#tablaMovimientos tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.1);
    transform: scale(1.01);
}

.table-success-light {
    background-color: rgba(40, 167, 69, 0.1);
}

.table-danger-light {
    background-color: rgba(220, 53, 69, 0.1);
}

#tablaMovimientos tfoot {
    background-color: #f8f9fa;
    font-weight: bold;
}

/* Estilos para info-boxes de movimientos */
.info-box {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.info-box:hover {
    transform: translateY(-2px);
}

.info-box-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
}

/* Responsive para tabla de movimientos */
@media (max-width: 768px) {
    #tablaMovimientos {
        font-size: 0.8em;
    }

    #tablaMovimientos th,
    #tablaMovimientos td {
        padding: 0.5rem 0.3rem;
    }

    .info-box {
        margin-bottom: 1rem;
    }
}

/* Estilos para descripción truncada */
.descripcion-truncada {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: help;
}

/* Animación para filas de la tabla */
@keyframes highlightRow {
    0% {
        background-color: rgba(0, 123, 255, 0.3);
    }

    100% {
        background-color: transparent;
    }
}

.highlight-row {
    animation: highlightRow 1s ease-out;
}

/* Animación para filas de la tabla */
@keyframes highlightRow {
    0% { background-color: rgba(0, 123, 255, 0.3); }
    100% { background-color: transparent; }
}

.highlight-row {
    animation: highlightRow 1s ease-out;
}

/* Estilos para gráficos */
.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}

#categoriasMovimientosChart,
#ingresosEgresosChart {
    max-height: 300px;
}

.card .card-body canvas {
    border-radius: 8px;
}

/* Responsive para gráficos */
@media (max-width: 768px) {
    .chart-container {
        height: 250px;
    }
    
    #categoriasMovimientosChart,
    #ingresosEgresosChart {
        max-height: 250px;
    }
}

/* Animaciones para gráficos */
.chart-fade-in {
    animation: chartFadeIn 0.8s ease-in-out;
}

@keyframes chartFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}/
* Color morado para ganancia histórica */
.bg-purple {
    background-color: #6f42c1 !important;
    background-image: linear-gradient(180deg, #7952b3, #6f42c1) !important;
}

.bg-purple .inner h3,
.bg-purple .inner p {
    color: white !important;
}

/* Ajustes para el nuevo gráfico de líneas */
#ventasMovimientosChart {
    max-height: 300px;
}

/* Estilos para movimientos (solo egresos) */
.table-danger-light {
    background-color: rgba(220, 53, 69, 0.1);
}

.table-danger-light:hover {
    background-color: rgba(220, 53, 69, 0.2);
}/*====
==========================
    MEJORAS ESPECÍFICAS SOLICITADAS
================================*/

/* Badges de tipo de movimiento mejorados */
.badge-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: white !important;
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.badge-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important;
    color: white !important;
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

/* Iconos de categorías con colores específicos */
.fas.fa-shipping-fast { 
    color: #17a2b8 !important; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.fas.fa-truck { 
    color: #ffc107 !important; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.fas.fa-user-tie { 
    color: #28a745 !important; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.fas.fa-home { 
    color: #007bff !important; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.fas.fa-cogs { 
    color: #6c757d !important; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.fas.fa-gas-pump { 
    color: #dc3545 !important; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.fas.fa-utensils { 
    color: #fd7e14 !important; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.fas.fa-tools { 
    color: #343a40 !important; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Alerta morada personalizada */
.alert-purple {
    background: linear-gradient(135deg, #6f42c1 0%, #5a2d91 100%) !important;
    border-color: #5a2d91 !important;
    color: white !important;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(111, 66, 193, 0.3);
    border: none;
}

.alert-purple strong {
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Mejoras para tabla de movimientos sin columna Estado */
#tablaMovimientosReporte tbody tr {
    border-left: 4px solid #dc3545;
    transition: all 0.3s ease;
}

#tablaMovimientosReporte tbody tr:hover {
    background-color: rgba(220, 53, 69, 0.15) !important;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

/* Efectos para badges en la tabla */
#tablaMovimientosReporte .badge {
    transition: all 0.3s ease;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

#tablaMovimientosReporte .badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Iconos de categorías con efectos hover */
#tablaMovimientosReporte td i {
    transition: all 0.3s ease;
}

#tablaMovimientosReporte tr:hover td i {
    transform: scale(1.1);
}

/* Responsive para la nueva estructura */
@media (max-width: 768px) {
    #tablaMovimientosReporte .badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    #tablaMovimientosReporte td {
        padding: 0.5rem 0.3rem;
    }
}/*========
======================
    NUEVAS MEJORAS - CARD NOTA Y CENTRADO
================================*/

/* Estilos para el card de nota importante */
.alert-warning.nota-importante {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
    border-color: #e0a800 !important;
    color: #212529 !important;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    border-radius: 10px;
    border: none;
}

.alert-warning.nota-importante .alert-heading {
    color: #856404 !important;
    font-weight: 700;
}

.alert-warning.nota-importante p {
    color: #212529 !important;
    line-height: 1.6;
}

.alert-warning.nota-importante i.fa-exclamation-triangle {
    color: #856404 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Título de movimientos centrado */
.titulo-movimientos {
    border-bottom: 3px solid #dc3545 !important;
    display: inline-block !important;
    padding-bottom: 10px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.titulo-movimientos i {
    color: #dc3545 !important;
}

/* Tabla centrada y mejorada */
.tabla-movimientos-centrada {
    margin: 0 auto;
    max-width: 100%;
}

.tabla-movimientos-centrada .table {
    margin: 0 auto;
}

.tabla-movimientos-centrada .table-responsive {
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Mejoras para el tfoot sin columna Estado */
#tablaMovimientosReporte tfoot td {
    background-color: #f8f9fa;
    border-top: 2px solid #dee2e6;
    font-weight: 600;
}

#tablaMovimientosReporte tfoot .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

/* Animaciones para los nuevos elementos */
.nota-importante {
    animation: slideInDown 0.6s ease-out;
}

.titulo-movimientos {
    animation: fadeInUp 0.8s ease-out;
}

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

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

/* Responsive para la nueva estructura */
@media (max-width: 768px) {
    .titulo-movimientos {
        font-size: 1.2rem;
        padding-bottom: 8px;
    }
    
    .alert-warning.nota-importante {
        padding: 1rem;
    }
    
    .alert-warning.nota-importante .d-flex {
        flex-direction: column;
        text-align: center;
    }
    
    .alert-warning.nota-importante i.fa-exclamation-triangle {
        margin-bottom: 1rem;
        margin-right: 0 !important;
    }
}

/* Efectos hover para la tabla centrada */
.tabla-movimientos-centrada:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

.tabla-movimientos-centrada .table-responsive:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transition: box-shadow 0.3s ease;
}