/* Admin stats: stat tiles, the period table, feature usage bars (shared
   .bar-container/.bar-fill from insights.css) and the daily table. */

.admin-stats-section + .admin-stats-section {
  margin-top: 36px;
}

.admin-stats-section h2 {
  margin-bottom: 14px;
  font-size: 1.2rem;
  font-weight: 700;
}

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

.stat-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.stat-value {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat-note {
  color: var(--faint);
  font-size: 0.8rem;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.admin-table th,
.admin-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: right;
  white-space: nowrap;
}

.admin-table thead th {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.admin-table tbody th {
  color: var(--ink-soft);
  font-weight: 600;
  text-align: left;
}

.admin-table tbody tr:last-child > * {
  border-bottom: none;
}

.admin-note {
  margin-top: 12px;
  color: var(--body);
  font-size: 0.9rem;
}

.usage-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 12px;
}

.usage-row + .usage-row {
  margin-top: 12px;
}

.usage-label {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
}

.usage-count {
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.admin-daily td:nth-child(2) {
  width: 40%;
}

.daily-active {
  display: flex;
  align-items: center;
  gap: 8px;
}

.daily-track {
  flex: 1;
  min-width: 40px;
}

.daily-bar {
  display: block;
  height: 8px;
  min-width: 2px;
  border-radius: 999px;
  background: var(--gradient-bar);
}

@media (max-width: 480px) {
  .admin-table th,
  .admin-table td {
    padding: 7px 6px;
    font-size: 0.82rem;
  }
}
