/* Grid general del dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
    background-color: var(--color-page);
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Título principal */
.titulo-dashboard {
    text-align: center;
    margin: 30px 0 10px;
    color: var(--color-text);
    font-family: var(--font-family-base);
    font-size: 2rem;
}

/* Tarjeta general */
.dashboard-card {
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 20px;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    animation: fadeInZoom 0.5s ease-in-out;
    transition: box-shadow 0.3s ease;
}

/* Título de cada gráfico */
.card-title {
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--color-text);
}

/* Canvas en gráfico */
.dashboard-card canvas {
    width: 100% !important;
    max-height: 260px;
    object-fit: contain;
}

/* Card tipo KPI */
.kpi-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Contenedor KPI mejor distribuido */
.kpi-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 10px 0;
}

/* KPI individual */
.kpi-card {
    flex: 1 1 130px;
    max-width: 180px;
    background-color: var(--color-page);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 15px 10px;
    text-align: center;
    color: var(--color-text);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    animation: fadeInZoom 0.6s ease-in-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Título del KPI */
.kpi-card h5 {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--color-text);
}

/* Valor del KPI */
.kpi-card p {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--color-primary-dark);
    margin: 0;
}

/* Animaciones */
@keyframes fadeInZoom {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hover efectos */
.dashboard-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.kpi-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

