/* Score statistics dashboard (/account/history) */
.stats-wrap {
    margin: 0 0 28px;
}

.stats-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 700;
    color: #111;
}

.stats-heading i {
    color: var(--accent, #e91e63);
}

/* Summary cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    position: relative;
    padding: 18px;
    border: 1px solid var(--border, #e6eaee);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--card-shadow, 0 6px 18px rgba(18, 38, 63, 0.06));
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--stat-color, #e91e63);
}

.stat-listening { --stat-color: #e91e63; }
.stat-reading   { --stat-color: #7b2ff7; }
.stat-writing   { --stat-color: #0098a6; }
.stat-speaking  { --stat-color: #ff6f61; }

.stat-card__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.stat-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--stat-color, #e91e63);
    color: #fff;
    font-size: 17px;
}

.stat-card__label {
    font-weight: 700;
    font-size: 15px;
    color: #1f2937;
}

.stat-card__avg {
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    color: var(--stat-color, #e91e63);
}

.stat-card__avg small {
    font-size: 14px;
    font-weight: 600;
    color: #9aa5b1;
    margin-left: 3px;
}

.stat-card__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 12px;
    font-size: 12.5px;
    color: #6b7785;
}

.stat-card__meta i {
    color: var(--stat-color, #e91e63);
    margin-right: 3px;
}

.stat-card__empty {
    margin-top: 8px;
    font-size: 13px;
    color: #9aa5b1;
    font-style: italic;
}

/* Charts */
.stats-charts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.stats-chart-box {
    padding: 16px 16px 8px;
    border: 1px solid var(--border, #e6eaee);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--card-shadow, 0 6px 18px rgba(18, 38, 63, 0.06));
}

.stats-chart-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
}

.stats-chart-canvas {
    position: relative;
    height: 220px;
}

/* Speaking criteria panel caption */
.score-panel__caption {
    margin-top: 8px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    color: #374151;
}

.score-panel__caption i {
    color: var(--accent, #e91e63);
}

@media (max-width: 1000px) {
    .stats-cards { grid-template-columns: repeat(2, 1fr); }
    .stats-charts { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .stats-cards { grid-template-columns: 1fr; }
    .stat-card__avg { font-size: 30px; }
}
