.admin { width: min(1180px, 100%); }

/* Tabs and filters: one segmented control style. */
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--panel);
}
.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text-2);
  font: inherit;
  font-weight: 540;
  cursor: pointer;
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-selected="true"], .segmented button[aria-checked="true"] { background: var(--invert); color: var(--on-invert); }
.segmented button[aria-selected="true"] .badge { background: var(--on-invert); color: var(--invert); }
.segmented .badge { margin-left: 0; }
.segmented-sm button { min-height: 28px; padding: 0 10px; font-size: 13px; }

.section-title { margin: 36px 0 12px; font-size: 15px; font-weight: 650; }
.filters-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filters-row input { flex: 1; min-width: 220px; max-width: 420px; }
.empty-line { color: var(--text-2); }

/* Overview: stat tiles. Label, then the number. */
.tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.tile {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--panel);
}
.tile-label { color: var(--text-2); font-size: 13px; }
.tile-value { font-size: 30px; font-weight: 650; line-height: 1.1; }
.tile-note { color: var(--text-2); font-size: 12px; }
.tile.needs { border-color: var(--text); }
.tile.needs .tile-note { color: var(--text); font-weight: 600; }

.rows-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows-list li { display: flex; align-items: baseline; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.rows-list .when { margin-left: auto; color: var(--text-2); font-size: 13px; white-space: nowrap; }
.rows-list .muted { color: var(--text-2); }
.link-btn { padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Reports and sessions: cards. */
.reports { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.report {
  padding: 16px 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--panel);
}
.report-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.report-top .reason { font-weight: 650; }
.report-top .when { margin-left: auto; color: var(--text-2); font-size: 13px; }
.report-who { margin: 6px 0 0; color: var(--text-2); font-size: 14px; }
.report-details { margin: 10px 0 0; white-space: pre-wrap; }
.evidence { margin: 12px 0 0; padding: 0; list-style: none; border-left: 2px solid var(--line); }
.evidence li { padding: 4px 0 4px 12px; font-size: 13px; }
.evidence .at { color: var(--text-2); font: 12px var(--mono); margin-right: 8px; }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.report-actions input { flex: 1; min-width: 200px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 12px; }
.pill.strong { background: var(--invert); color: var(--on-invert); box-shadow: none; }

/* Accounts table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { position: sticky; top: 0; padding: 10px 14px; background: var(--panel); color: var(--text-2); font-size: 12px; font-weight: 600; text-align: left; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: var(--hover); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.acct { display: flex; align-items: center; gap: 10px; }
.acct .who { display: grid; }
.acct .handle { color: var(--text-2); font-size: 12px; }
#moreUsers { margin-top: 14px; }

/* Account dialog */
.ud-head { display: flex; align-items: center; gap: 12px; }
.ud-head h2 { margin: 0; }
.ud-head form { margin-left: auto; }
.ud-id { margin: 2px 0 0; font: 12px var(--mono); color: var(--text-2); word-break: break-all; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 18px 0 0; }
.facts div { padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line); }
.facts dt { color: var(--text-2); font-size: 12px; }
.facts dd { margin: 2px 0 0; font-size: 18px; font-weight: 650; }
.ud-actions { display: grid; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.ud-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ud-row input { flex: 1; min-width: 200px; }
.ud-row p { margin: 0; flex: 1; min-width: 200px; color: var(--text-2); font-size: 13px; }
.ud-row.danger { padding-top: 10px; border-top: 1px solid var(--line); }
.btn-danger { border-color: var(--text); font-weight: 650; }
#eraseConfirm { width: 100%; margin-top: 12px; }
#udReports h3 { margin: 18px 0 6px; font-size: 13px; color: var(--text-2); font-weight: 600; }

@media (max-width: 720px) {
  .tabs { width: 100%; }
  .segmented button { min-height: 40px; }
  .tile-value { font-size: 26px; }
}

.sheet-wide { width: min(640px, calc(100vw - 32px)); }
