/* Admin dashboard (/admin, js/pages/admin.js): database usage link, who's online, totals.
   Reuses the Stats page's cards (13-stats.css). */

.ad-hero { margin-bottom: 18px; }
.ad-refresh { position: relative; align-self: flex-start; }
#adBody > .feed-empty { margin-bottom: 40px; }

.ad-note { margin: 0 0 16px; color: var(--muted); font-size: 14px; max-width: 60ch; }
.ad-usage-go { display: inline-flex; align-items: center; justify-content: center; margin-top: 16px; min-height: 44px; text-decoration: none; }

/* ---------- Online now ---------- */
.ad-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 340px; overflow-y: auto; }
.ad-people a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 8px; border-radius: 14px; color: inherit; text-decoration: none; }
.ad-people a:hover, .ad-people a:focus-visible { background: var(--surface-2); }
.ad-people .av { position: relative; }
.ad-people span:last-child { display: flex; flex-direction: column; min-width: 0; }
.ad-people b { font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-people small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Community totals ---------- */
.ad-list { margin: 0; display: flex; flex-direction: column; }
.ad-list div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--border); }
.ad-list div:last-child { border-bottom: 0; }
.ad-list dt { font-weight: 700; font-size: 14px; }
.ad-list dt small { color: var(--muted); font-weight: 500; font-size: 12.5px; margin-left: 4px; }
.ad-list dd { margin: 0; font: 700 15px/1 var(--mono); font-variant-numeric: tabular-nums; }

@media (max-width: 560px) {
  .ad-hero .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-refresh { position: absolute; top: 14px; right: 14px; height: 40px; padding: 0 12px; font-size: 13px; }
  .ad-usage-go { width: 100%; }
}
