/* ——— Статистика (личный кабинет ученика и сводная аналитика учителя) ——— */
.stats-panel {
  margin-top: 8px;
}

.stats-section {
  margin: 20px 0 10px;
  font-size: 1rem;
  font-weight: 800;
  color: #173B7B;
}

.stats-table-wrap {
  overflow-x: auto;
  margin: 0 0 10px;
  background: #FFFFFF;
  border: 1px solid #D5E0F0;
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  min-width: 480px;
  font-variant-numeric: tabular-nums;
}

.stats-table th,
.stats-table td {
  padding: 9px 11px;
  border-bottom: 1px solid #E8EEF6;
  text-align: center;
  white-space: nowrap;
}

.stats-table th {
  background: #EEF4FF;
  color: #173B7B;
  font-weight: 700;
  font-size: 0.78rem;
}

.stats-table tbody tr:hover td {
  background: #F8FBFF;
}

.stats-table tbody tr:last-child td {
  border-bottom: none;
}

.stats-table .stats-td-title {
  text-align: left;
  white-space: normal;
  min-width: 120px;
  max-width: 240px;
  font-weight: 600;
  color: #1E293B;
}

.stats-table .stats-th-pts,
.stats-table .stats-td-pts {
  min-width: 2.2em;
  padding-left: 4px;
  padding-right: 4px;
}

.stats-table--topics {
  min-width: 280px;
}

.stats-rank {
  margin: 0;
  padding-left: 1.35rem;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.stats-rank li {
  margin: 6px 0;
}

.stats-rank-name {
  font-weight: 700;
  color: #173B7B;
}

.stats-rank-meta {
  color: #475569;
  font-size: 0.85rem;
}

.stats-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-height: 144px;
  padding: 10px 6px 2px;
  overflow-x: auto;
}

.stats-chart-col {
  flex: 1 0 38px;
  max-width: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.stats-chart-val {
  font-size: 0.76rem;
  font-weight: 700;
  color: #173B7B;
  font-variant-numeric: tabular-nums;
}

.stats-chart-bar-wrap {
  width: 100%;
  height: 100px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: #EEF4FC;
  border-radius: 8px 8px 4px 4px;
  padding: 0 4px;
}

.stats-chart-bar {
  width: 74%;
  min-height: 3px;
  background: #1564D9;
  border-radius: 5px 5px 2px 2px;
}

.stats-chart-lbl {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  font-variant-numeric: tabular-nums;
}

.stats-bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 1.4fr) minmax(60px, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  margin: 7px 0;
  font-size: 0.9rem;
}

.stats-bar-row > div:last-child {
  white-space: nowrap;
  min-width: 3.5em;
  text-align: right;
  font-weight: 700;
  color: #173B7B;
  font-variant-numeric: tabular-nums;
}

.stats-bar-track {
  height: 10px;
  border-radius: 999px;
  background: #E2ECF9;
  overflow: hidden;
  min-width: 40px;
}

.stats-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: #1564D9;
}
