/* ========================================
   Stats Dashboard
   ======================================== */

.stats-dashboard-section {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 252, 0.92));
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.stat-mini-card {
    padding: 15px;
    border: 2px solid rgba(255, 142, 199, 0.1);
    border-radius: 16px;
    background: linear-gradient(135deg, #fff, #fff8fc);
}

.stat-mini-card strong {
    display: block;
    color: var(--primary-color);
    font-size: 1.55rem;
    line-height: 1.2;
}

.stat-mini-card span {
    display: block;
    margin-top: 4px;
    color: var(--text-dark);
    font-size: 0.82rem;
    font-weight: 900;
}

.stat-mini-card em {
    display: block;
    margin-top: 5px;
    color: var(--text-light);
    font-size: 0.72rem;
    font-style: normal;
    line-height: 1.45;
}

.stats-insights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.stats-insight {
    padding: 12px 14px;
    border: 1.5px solid rgba(183, 148, 246, 0.16);
    border-radius: 16px;
    background: #fdf5ff;
    color: var(--text-medium);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.6;
}

.stats-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 16px;
}

.stats-box {
    padding: 16px;
    border: 2px solid rgba(255, 142, 199, 0.1);
    border-radius: 18px;
    background: #fff;
}

.stats-box h4 {
    margin-bottom: 12px;
    color: var(--text-dark);
}

.chart-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 64px;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
    color: var(--text-light);
    font-size: 0.74rem;
}

.chart-bar {
    height: 10px;
    border-radius: 999px;
    background: #f7edf9;
    overflow: hidden;
}

.chart-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.chart-row em {
    color: var(--text-medium);
    font-style: normal;
    font-weight: 900;
    text-align: right;
}

.flower-trend {
    min-height: 132px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 7px;
}

.flower-trend-item {
    flex: 1;
    display: grid;
    justify-items: center;
    gap: 5px;
    color: var(--text-light);
    font-size: 0.7rem;
}

.flower-trend-item div {
    height: 88px;
    display: flex;
    align-items: flex-end;
}

.flower-trend-item i {
    width: 10px;
    display: block;
    border-radius: 999px;
    background: linear-gradient(180deg, #ff8ec7, #ff6b86);
}

.flower-trend-item.negative i {
    background: linear-gradient(180deg, #b794f6, #8b6e9e);
}

.flower-trend-item em {
    color: var(--text-medium);
    font-style: normal;
    font-weight: 900;
}

.stats-achievements-box {
    margin-top: 16px;
}

.achievement-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.achievement-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border: 1.5px solid transparent;
    border-radius: 16px;
    background: #fdf5ff;
    opacity: 0.72;
}

.achievement-card.unlocked {
    opacity: 1;
    border-color: rgba(255, 142, 199, 0.14);
    background: linear-gradient(135deg, #fff8fc, #fff);
    box-shadow: 0 4px 14px rgba(255, 142, 199, 0.12);
}

.achievement-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.achievement-card h4 {
    color: var(--text-dark);
    font-size: 0.88rem;
}

.achievement-card p {
    margin: 3px 0 7px;
    color: var(--text-light);
    font-size: 0.74rem;
    line-height: 1.45;
}

.achievement-progress {
    height: 6px;
    border-radius: 999px;
    background: #f0e0f6;
    overflow: hidden;
}

.achievement-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

@media (max-width: 980px) {
    .stats-grid,
    .stats-insights,
    .stats-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .stats-grid,
    .stats-insights,
    .stats-layout,
    .achievement-list {
        grid-template-columns: 1fr;
    }
}
