/* ==========================================================================
   Estadísticas — Dashboard (premium-stats-panel) y boxes legacy
   ========================================================================== */

/* Cards de estadísticas (legacy) */
.stats-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-secondary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition:
        transform 220ms var(--ease-out-strong),
        box-shadow 220ms var(--ease-out-strong);
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.premium-card {
    border: 2px solid rgba(255, 193, 7, 0.5);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stats-label {
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .stats-number {
        font-size: 2rem;
    }
}

/* ==========================================================================
   Mejores Tiempos (legacy card) y stats-row de cards de actividad
   ========================================================================== */

.best-times-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-secondary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.best-time-item {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.best-time-item:last-child {
    border-bottom: none;
}

.best-time-distance {
    font-weight: 600;
    color: var(--text-primary);
}

.best-time-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Stats row alineadas en cards/listas */
@media (max-width: 768px) {
    .stats-row {
        display: flex;
        align-items: stretch;
    }

    .stats-row > div {
        display: flex;
        flex-direction: column;
    }

    .stats-box {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 75px;
        height: 100%;
        width: 100%;
    }

    .stats-box small {
        margin-bottom: 0.25rem;
        font-size: 0.75rem;
    }

    .stats-box strong {
        font-size: 0.9rem;
        word-break: break-word;
        text-align: center;
    }

    .stats-row > div[class*="col-"] {
        display: flex;
        flex-direction: column;
        padding: 0.25rem;
    }

    .stats-box {
        min-height: 85px;
        padding: 0.75rem 0.5rem !important;
    }

    .stats-row {
        min-height: 85px;
    }
}
