/* ==========================================================================
   Expenses → Statistici sub-page
   ========================================================================== */

.exp-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}
@media (max-width: 900px) {
  .exp-stats-grid {
    grid-template-columns: 1fr;
  }
}

.exp-stats-card .card-body {
  min-height: 220px;
}

/* Donut legend */
.exp-stats-legend-row {
  display: grid;
  grid-template-columns: 14px 1fr auto auto;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
}
.exp-stats-legend-row:last-child { border-bottom: 0; }
.exp-stats-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.exp-stats-legend-name { color: var(--color-text); font-weight: 500; }
.exp-stats-legend-value { color: var(--color-text); font-weight: 600; }
.exp-stats-legend-pct {
  color: var(--color-text-muted);
  font-size: 12px;
  min-width: 44px;
  text-align: right;
}

#exp-stats-cat-body { display: flex; flex-direction: column; gap: var(--spacing-md); }
#exp-stats-cat-body canvas { max-height: 200px; }

/* Top-N lists */
.exp-stats-list {
  display: flex;
  flex-direction: column;
}
.exp-stats-list-row {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  align-items: center;
  gap: var(--spacing-md);
  padding: 12px var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
}
.exp-stats-list-row:last-child { border-bottom: 0; }
.exp-stats-list-row:hover { background: rgba(40,200,107,0.04); }

.exp-stats-rank {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(40,200,107,0.12);
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.exp-stats-list-label { color: var(--color-text); font-weight: 500; }
.exp-stats-list-count {
  color: var(--color-text-muted);
  font-size: 11px;
  white-space: nowrap;
}
.exp-stats-list-value {
  color: var(--color-text);
  font-weight: 700;
  white-space: nowrap;
}
