.stats-page {
  background: transparent;
  touch-action: manipulation;
}

.stats-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  gap: 20px;
}

.stats-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.stats-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-state {
  font-size: 12px;
  color: var(--muted);
  align-self: center;
}

.stats-grid {
  display: grid;
  gap: 16px;
}

.stats-card h2 {
  margin: 0 0 12px 0;
  font-size: 18px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.metric {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.metric .label {
  font-size: 12px;
  color: var(--muted);
}

.metric .value {
  font-size: 20px;
  font-weight: bold;
}

.chart-card {
  display: grid;
  gap: 10px;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.chart-note {
  font-size: 12px;
  color: var(--muted);
}

.chart {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  min-height: 220px;
  display: grid;
  place-items: center;
}

.chart svg {
  width: 100%;
  height: 100%;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.stats-table th,
.stats-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: right;
}

.stats-table th:first-child,
.stats-table td:first-child {
  text-align: left;
}

.stats-table thead th {
  color: var(--muted);
  font-weight: 600;
}

.hidden {
  display: none;
}

@media (max-width: 700px) {
  .stats-actions {
    width: 100%;
  }
}
