/* public/graficos.css */
.grafico-contenedor {
    position: relative;
    width: 100%;
}

.grafico-leyenda {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.filtro-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background-color: #e0f2fe;
    color: #0369a1;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.filtro-badge i {
    margin-right: 6px;
}

.grafico-toolbar {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.grafico-toolbar button {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.grafico-toolbar button:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.grafico-estadisticas {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f3f4f6;
}

.estadistica-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
}

.estadistica-valor {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.estadistica-label {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Animaciones para el gráfico */
@keyframes graficoEntrada {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grafico-animado {
    animation: graficoEntrada 0.5s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .grafico-estadisticas {
        flex-wrap: wrap;
        gap: 10px;
    }

    .estadistica-item {
        flex: 1;
        min-width: 120px;
    }

    .grafico-toolbar {
        position: static;
        margin-bottom: 15px;
        display: flex;
        justify-content: flex-end;
        gap: 10px;
    }
}

.tag-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}
.tag-income {
    background-color: #d1fae5;
    color: #065f46;
}
.tag-expense {
    background-color: #fee2e2;
    color: #991b1b;
}
.fade-in {
    animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}