  @import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&display=swap');

    .chart-card {
        font-family: 'DM Sans', sans-serif;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        padding: 20px 24px 16px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
        transition: box-shadow 0.2s;
    }

    .chart-card:hover {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    .chart-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 16px;
    }

    .chart-title-group {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .chart-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        background: #eff6ff;
        border-radius: 8px;
        color: #3b82f6;
    }

    .chart-title {
        margin: 0;
        font-size: 13px;
        font-weight: 600;
        color: #1e293b;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .chart-badge {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 11px;
        font-weight: 500;
        color: #10b981;
        background: #f0fdf4;
        border: 1px solid #bbf7d0;
        padding: 3px 10px;
        border-radius: 20px;
    }

    .badge-dot {
        width: 6px;
        height: 6px;
        background: #10b981;
        border-radius: 50%;
        animation: pulse 2s infinite;
    }

    @keyframes pulse {

        0%,
        100% {
            opacity: 1;
        }

        50% {
            opacity: 0.3;
        }
    }

    .chart-wrapper {
        height: 280px;
        position: relative;
    }

    .chart-footer {
        display: flex;
        gap: 0;
        margin-top: 16px;
        border-top: 1px solid #f1f5f9;
        padding-top: 14px;
    }

    .stat-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        border-right: 1px solid #f1f5f9;
    }

    .stat-item:last-child {
        border-right: none;
    }

    .stat-label {
        font-size: 10px;
        font-weight: 500;
        color: #94a3b8;
        text-transform: uppercase;
        letter-spacing: 0.06em;
    }

    .stat-value {
        font-size: 18px;
        font-weight: 600;
        color: #1e293b;
    }

    /* Estilos mejorados para la leyenda de Chart.js */
.chart-card :deep(.chartjs-render-monitor) {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Contenedor de la leyenda */
.chart-card :deep(ul.chartjs-legend) {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin: 20px 0 0 0 !important;
    padding: 16px !important;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
}

/* Items de leyenda */
.chart-card :deep(ul.chartjs-legend li) {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 14px !important;
    background: white !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin: 0 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #1e293b !important;
}

.chart-card :deep(ul.chartjs-legend li:hover) {
    background: #ffffff !important;
    border-color: #3b82f6 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15) !important;
}

/* Items ocultos */
.chart-card :deep(ul.chartjs-legend li.hidden) {
    opacity: 0.4 !important;
    text-decoration: line-through !important;
}

/* Punto de color */
.chart-card :deep(ul.chartjs-legend li span) {
    display: inline-block !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
    margin-right: 0 !important;
}

/* Texto de la leyenda */
.chart-card :deep(ul.chartjs-legend li span + span) {
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Responsive para leyenda */
@media (max-width: 768px) {
    .chart-card :deep(ul.chartjs-legend) {
        padding: 12px !important;
    }
    
    .chart-card :deep(ul.chartjs-legend li) {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }
}

