/* Stat rows on the admin dashboard: label and figure joined by a dotted leader
   so the eye can follow a row across the width to its number. */
.stat {
  display: flex;
  align-items: baseline;
  gap: var(--gap-small);
}

.stat dt,
.stat dd {
  white-space: nowrap;
}

.stat__leader {
  flex: 1 1 auto;
  position: relative;
  top: -0.3em;
  border-bottom: 1px dotted var(--theme-fg-muted);
}

/* Scannable account / invitation lists in the admin area. Same dotted-leader
   idiom as .stat: a label group on the left, muted meta on the right. */
.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap-medium);
}

.admin-row {
  display: flex;
  align-items: baseline;
  gap: var(--gap-small);
}

.admin-row__main {
  display: flex;
  align-items: baseline;
  gap: var(--gap-small);
  white-space: nowrap;
}

.admin-row__meta {
  white-space: nowrap;
}

/* The redeemable code and its shareable signup link. */
.invite__code {
  font-weight: bold;
  letter-spacing: 0.08em;
}

.invite__link {
  word-break: break-all;
  color: var(--theme-fg-muted);
}

.invite__status--redeemed {
  color: var(--theme-fg-muted);
}

.invite__status--expired {
  color: var(--theme-warn-color);
}

/* Scraper run oversight (/admin/scrape_runs). A per-scraper outcomes table plus
   a colour-coded history strip so a newly-broken or flapping venue stands out. */
.scrape-table-wrap {
  overflow-x: auto;
}

.scrape-table {
  border-collapse: collapse;
  width: 100%;
  font-variant-numeric: tabular-nums;
}

.scrape-table th,
.scrape-table td {
  text-align: left;
  padding: var(--gap-xsmall) var(--gap-small);
  white-space: nowrap;
}

.scrape-table th {
  font-weight: normal;
  color: var(--theme-fg-muted);
}

.scrape-table .num {
  text-align: right;
}

.scrape-table tbody tr {
  border-top: 1px solid var(--theme-bg-muted);
}

/* Status pill: ok = green, empty (ran but wrote nothing) = amber, failed = red. */
.scrape-badge {
  display: inline-block;
  padding: 0 var(--gap-xsmall);
  border-radius: 3px;
  font-size: var(--font-size-small);
  color: var(--color-white);
}

.scrape-badge--ok {
  background: var(--color-green);
}

.scrape-badge--empty {
  background: var(--color-amber);
}

.scrape-badge--failed {
  background: var(--color-red);
}

.scrape-badge--running {
  background: var(--theme-fg-muted);
}

.scrape-history {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}

.scrape-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--theme-fg-muted);
}

.scrape-dot--ok {
  background: var(--color-green);
}

.scrape-dot--empty {
  background: var(--color-amber);
}

.scrape-dot--failed {
  background: var(--color-red);
}

/* A run where this scraper produced no result at all. */
.scrape-dot--none {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--theme-fg-muted);
}

.scrape-error {
  white-space: normal;
  font-size: var(--font-size-small);
  color: var(--theme-warn-color);
}
