/* ===========================================================================
   admin.css — the admin page (#/admin, admin.js), and the account dialog's
   way there (signin.js openAccount).

   A working page, drawn in the gallery's own materials: the Binders page's
   stat tiles, glass cards with a hairline top light, the accent for what is
   live and the gold for what needs a look (the email limit). Danger red only
   where something is lost for good: a sign-in link, a deleted member.

   Phones get cards instead of the members table, one column throughout, and
   the tab bar stays in reach at the top as the page scrolls. Motion: cards
   rise in through motion.reveal (design.css [data-reveal]) at Full, fade at
   Reduced, nothing at Off; meters grow by transform; the spinner is the one
   thing that loops, and it stands still below Full.
   =========================================================================== */

:root {
  --adm-ok: #34d399;
}
:root[data-theme="light"] {
  --adm-ok: #047857;
}

.view-admin {
  height: calc(100vh - 52px - var(--pfbar-h, 0px));
  height: calc(100dvh - 52px - var(--pfbar-h, 0px));
  overflow-y: auto; overflow-x: hidden;
  background:
    radial-gradient(1000px 340px at 16% -170px, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%),
    radial-gradient(760px 300px at 92% -140px, color-mix(in srgb, var(--accent-2) 7%, transparent), transparent 72%),
    var(--bg);
}
/* Phones: the bottom bar covers the end of the page otherwise. */
body.has-bottomnav .view-admin { padding-bottom: var(--bottomnav-h, 0px); scroll-padding-bottom: var(--bottomnav-h, 0px); }

.adm {
  --gut: clamp(16px, 4vw, 40px);
  max-width: 1180px; margin: 0 auto;
  padding: 26px var(--gut) 72px;
  display: flex; flex-direction: column; gap: 18px;
}
.adm-dim { color: var(--ink-3); }

/* ------------------------------------------------------------------- head */
.adm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; }
.adm-head-copy { min-width: 0; max-width: 700px; }
.adm-head-copy .view-lede { max-width: 640px; }
.adm-head-meta { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.adm-you { font-size: 12.5px; color: var(--ink-3); overflow-wrap: anywhere; }
.adm-you b { color: var(--ink-2); font-weight: 600; }
.adm-refresh .ico { color: var(--ink-3); }

/* ------------------------------------------------------------------- tabs */
/* A segmented bar that stays at the top of the page as it scrolls. */
.adm-tabs {
  position: sticky; top: 8px; z-index: 5;
  display: inline-flex; align-self: flex-start; gap: 2px; max-width: 100%;
  padding: 3px; border-radius: var(--radius-pill);
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  border: 1px solid var(--line); box-shadow: var(--glass-edge), var(--shadow-1);
  overflow-x: auto; scrollbar-width: none;
}
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tab {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  height: 32px; padding: 0 15px;
  border: 0; border-radius: var(--radius-pill); background: transparent;
  color: var(--ink-2); font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: color var(--t-1) var(--ease-out), background var(--t-1) var(--ease-out), box-shadow var(--t-1) var(--ease-out);
}
.adm-tab:hover { color: var(--ink); background: var(--bg-3); }
.adm-tab[aria-selected="true"] {
  color: var(--accent-ink); background: var(--accent-fill);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 24%, transparent);
}
.adm-tab-count {
  display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--accent-text); background: color-mix(in srgb, var(--accent) 18%, transparent);
}
.adm-tab[aria-selected="true"] .adm-tab-count { color: inherit; background: color-mix(in srgb, var(--accent-ink) 16%, transparent); }

.adm-panel { display: flex; flex-direction: column; gap: 18px; outline: none; min-width: 0; }

/* ------------------------------------------------------------------ tiles */
.adm-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.adm-tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adm-tile {
  position: relative; min-width: 0; padding: 13px 15px 14px;
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-2) 80%, transparent);
  box-shadow: var(--glass-edge);
}
.adm-tile-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; }
.adm-tile-value {
  margin-top: 5px; font-size: 24px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15;
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-tile-sub { margin-top: 4px; font-size: 11.5px; line-height: 1.4; color: var(--ink-3); }
.adm-tile.is-accent .adm-tile-value { color: var(--accent-text); }
.adm-tile.is-warn .adm-tile-value { color: var(--gold-text); }
.adm-tile.is-bad .adm-tile-value { color: var(--danger); }
.adm-tile.is-bad { border-color: color-mix(in srgb, var(--danger) 35%, var(--line-soft)); }

/* A share of something: the budget, a build's progress. Grows by transform. */
.adm-meter { margin-top: 9px; height: 4px; border-radius: var(--radius-pill); background: var(--bg-3); overflow: hidden; }
.adm-meter i {
  display: block; width: 100%; height: 100%; border-radius: inherit;
  transform-origin: left center; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: transform var(--t-4) var(--ease-out);
}
.adm-tile.is-warn .adm-meter i { background: var(--gold); }
.adm-tile.is-bad .adm-meter i { background: var(--danger); }

/* ------------------------------------------------------------------ cards */
.adm-card {
  position: relative; min-width: 0;
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px 22px 22px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-2) 94%, transparent), color-mix(in srgb, var(--bg-2) 72%, transparent));
  box-shadow: var(--glass-edge), var(--shadow-1);
}
.adm-card-head h2 { margin: 0; font-size: var(--fs-h2); }
.adm-card-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.5; max-width: 74ch; }
.adm-card-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; }
.adm-sub { margin: 2px 0 -6px; font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; }
.adm-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }

.adm-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.adm-note .ico { margin-top: 1px; }
.adm-error { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 13px; line-height: 1.45; color: var(--danger); }
.adm-error .ico { flex: none; margin-top: 1px; }
.adm-empty { margin: 0; font-size: 13px; color: var(--ink-3); }
.adm-working { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 13px; color: var(--accent-text); }

/* status pills: invite results, runs, index builds */
.adm-pill {
  display: inline-flex; align-items: center; flex: none; height: 21px; padding: 0 8px;
  border-radius: var(--radius-pill); border: 1px solid transparent;
  font-size: 11.5px; font-weight: 650; white-space: nowrap;
}
.adm-pill.is-ok { color: var(--adm-ok); background: color-mix(in srgb, var(--adm-ok) 12%, transparent); border-color: color-mix(in srgb, var(--adm-ok) 30%, transparent); }
.adm-pill.is-accent { color: var(--accent-text); background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: color-mix(in srgb, var(--accent) 32%, transparent); }
.adm-pill.is-warn { color: var(--gold-text); background: color-mix(in srgb, var(--gold) 12%, transparent); border-color: color-mix(in srgb, var(--gold) 36%, transparent); }
.adm-pill.is-bad { color: var(--danger); background: color-mix(in srgb, var(--danger) 11%, transparent); border-color: color-mix(in srgb, var(--danger) 34%, transparent); }
.adm-pill.is-muted { color: var(--ink-2); background: var(--bg-3); border-color: var(--line); }

/* the one thing that turns: something is under way */
.adm-spin {
  flex: none; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, currentColor 28%, transparent); border-top-color: currentColor;
  animation: adm-spin .8s linear infinite;
}
@keyframes adm-spin { to { transform: rotate(360deg); } }
:root[data-motion="reduced"] .adm-spin,
:root[data-motion="off"] .adm-spin { animation: none; border-color: color-mix(in srgb, currentColor 55%, transparent); }

/* ----------------------------------------------------------------- people */
/* The built-in sender's limits: said plainly, before the form, in gold. */
.adm-limit {
  display: flex; gap: 12px; padding: 13px 15px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  background: color-mix(in srgb, var(--gold) 10%, transparent);
}
.adm-limit-ico { flex: none; margin-top: 1px; color: var(--gold-text); line-height: 0; }
.adm-limit p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.adm-limit .adm-limit-title { margin-bottom: 3px; font-size: 13.5px; font-weight: 700; color: var(--gold-text); }
.adm-limit b { color: var(--ink); }

.adm-invite-form { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px 22px; }
.adm-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.adm-label { font-size: 12.5px; font-weight: 650; color: var(--ink); }
.adm-emails { min-height: 96px; font-family: var(--mono); font-size: 12.5px; }
.adm-count.is-warn { color: var(--gold-text); }
.adm-invite-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.adm-invite-side .sf-row-switch .form-help { padding-left: 45px; }
.adm-invite-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.adm-invite-actions .btn .ico { line-height: 0; }
.adm-lands { margin-left: auto; }
.adm-lands b { color: var(--ink-2); font-weight: 600; }

.adm-results:empty { display: none; }
.adm-result-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.adm-result { padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--line-soft); background: color-mix(in srgb, var(--bg) 55%, transparent); }
.adm-result-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.adm-result-email { font-weight: 650; overflow-wrap: anywhere; }
.adm-result-msg { font-size: 12.5px; color: var(--ink-3); }

/* A sign-in link, and the warning that goes with it. */
.adm-link { display: flex; flex-direction: column; gap: 8px; margin-top: 9px; }
.adm-link-row { display: flex; gap: 8px; }
.adm-link-input { font-family: var(--mono); font-size: 12px; }
.adm-link-warn {
  display: flex; gap: 8px; margin: 0; padding: 9px 11px;
  border-radius: var(--radius-sm); font-size: 12.5px; line-height: 1.45; color: var(--ink-2);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}
.adm-link-warn .ico { flex: none; margin-top: 1px; color: var(--danger); }
.adm-link-warn b { color: var(--ink); overflow-wrap: anywhere; }
.adm-link-dlg .modal-head p b { color: var(--ink); overflow-wrap: anywhere; }
.modal.modal-adm { width: min(560px, 100%); }

/* members */
.adm-members-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.adm-search { flex: 1 1 200px; max-width: 280px; }
.adm-filter { align-self: center; }

.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th {
  padding: 0 10px 8px; text-align: left; white-space: nowrap;
  font-size: var(--fs-micro); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
  border-bottom: 1px solid var(--line);
}
.adm-table td { padding: 11px 10px; vertical-align: middle; border-bottom: 1px solid var(--line-soft); }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table tbody tr { transition: background var(--t-1) var(--ease-out); }
.adm-table tbody tr:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.adm-mwho { min-width: 230px; }
.adm-mwho-in { display: flex; align-items: center; gap: 11px; min-width: 0; }
.adm-avatar {
  display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
  font-size: 14px; font-weight: 700;
  color: hsl(var(--h, 210) 75% 84%); background: hsl(var(--h, 210) 38% 26%);
  box-shadow: inset 0 0 0 1px hsl(var(--h, 210) 40% 40% / .6);
}
:root[data-theme="light"] .adm-avatar { color: hsl(var(--h, 210) 55% 28%); background: hsl(var(--h, 210) 65% 90%); box-shadow: inset 0 0 0 1px hsl(var(--h, 210) 40% 70% / .6); }
.adm-mrow.is-pending .adm-avatar { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink-3); border: 1px dashed var(--ink-3); }
.adm-mname { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.adm-mname > b { font-weight: 650; overflow-wrap: anywhere; }
.adm-memail { font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
.adm-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.adm-badges:empty { display: none; }
.adm-badge {
  padding: 1px 7px; border-radius: var(--radius-pill); border: 1px solid transparent;
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}
.adm-badge.is-admin { color: var(--accent-text); background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.adm-badge.is-you { color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 12%, transparent); border-color: color-mix(in srgb, var(--accent-2) 30%, transparent); }
.adm-badge.is-pending { color: var(--gold-text); background: color-mix(in srgb, var(--gold) 12%, transparent); border-color: color-mix(in srgb, var(--gold) 34%, transparent); }
.adm-pending { color: var(--gold-text); white-space: nowrap; }
.adm-mkeeps { max-width: 300px; font-size: 12.5px; color: var(--ink-2); }
.adm-mact { width: 1%; }
.adm-actions { display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 6px; }

/* ----------------------------------------------------------------- health */
.adm-job {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 20px;
  padding: 14px 0; border-top: 1px solid var(--line-soft);
}
.adm-job:first-child { padding-top: 0; border-top: 0; }
.adm-job h3 { margin: 0; font-size: var(--fs-h3); }
.adm-job p { margin: 3px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); max-width: 72ch; }
.adm-job .btn { flex: none; }
.adm-job .btn .ico { line-height: 0; }
.adm-job-status { display: block; margin-top: 7px; font-size: 12.5px; color: var(--ink-3); }
.adm-job-status.is-running { display: inline-flex; align-items: center; gap: 7px; color: var(--accent-text); }
.adm-job-status.is-bad { color: var(--danger); }

.adm-run-list { list-style: none; margin: 0; padding: 0; }
.adm-run {
  display: grid; grid-template-columns: 74px minmax(0, 260px) minmax(0, 1fr); align-items: baseline; gap: 4px 12px;
  padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 12.5px;
}
.adm-run:first-child { border-top: 0; }
.adm-run .adm-pill { justify-self: start; }
.adm-run-what b { font-weight: 650; }
.adm-run-sum { color: var(--ink-2); overflow-wrap: anywhere; }

.adm-index-rows { list-style: none; margin: 0; padding: 0; }
.adm-index {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
  padding: 9px 0; border-top: 1px solid var(--line-soft);
}
.adm-index:first-child { border-top: 0; }
.adm-index-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 12.5px; }
.adm-index-copy > b { font-size: 13.5px; font-weight: 650; }
.adm-index-err { font-size: 12px; color: var(--danger); }
.adm-index-err.is-paused { color: var(--gold-text); }
.adm-index-copy .adm-meter { margin-top: 5px; }
.adm-index-add { display: flex; gap: 8px; }
.adm-index-add .input { flex: 1; min-width: 0; }

.adm-storage { display: flex; flex-direction: column; gap: 14px; }
.adm-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.adm-bars li { display: grid; grid-template-columns: 136px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 12.5px; }
.adm-bar-label { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-bar-track { height: 6px; border-radius: var(--radius-pill); background: var(--bg-3); overflow: hidden; }
.adm-bar-track i {
  display: block; width: 100%; height: 100%; border-radius: inherit;
  transform-origin: left center; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: transform var(--t-4) var(--ease-out);
}
.adm-bar-value { font-variant-numeric: tabular-nums; white-space: nowrap; }

.adm-cache {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 16px;
  padding-top: 14px; border-top: 1px solid var(--line-soft);
}
.adm-cache h3 { margin: 0; font-size: var(--fs-h3); }
.adm-cache p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.adm-cache .btn { flex: none; }

/* --------------------------------------------------------------- activity */
.adm-activity { list-style: none; margin: 0; padding: 0; }
.adm-act {
  display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: baseline; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 13px; line-height: 1.5;
}
.adm-act:first-child { border-top: 0; }
.adm-act-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transform: translateY(-1px); }
.adm-act.is-failed .adm-act-dot { background: var(--danger); }
.adm-act-text { overflow-wrap: anywhere; }
.adm-act-text b { font-weight: 650; }
.adm-act-text .adm-pill { margin-left: 8px; vertical-align: 1px; }
.adm-act-when { font-size: 12px; color: var(--ink-3); white-space: nowrap; }

/* --------------------------------------------------- not an admin / local */
.adm-forbidden {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  max-width: 470px; margin: 12vh auto 0; padding: 0 20px 48px; text-align: center;
}
.adm-forbidden h1 { margin: 6px 0 0; font-size: var(--fs-h1); }
.adm-forbidden p { margin: 0 0 6px; color: var(--ink-2); line-height: 1.55; }
.adm-forbidden-mark, .adm-local-mark {
  display: grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 20px;
  color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  box-shadow: var(--glass-edge), 0 10px 30px color-mix(in srgb, var(--accent) 14%, transparent);
}
.adm-forbidden-mark.is-warn { color: var(--gold-text); background: color-mix(in srgb, var(--gold) 12%, transparent); border-color: color-mix(in srgb, var(--gold) 34%, transparent); box-shadow: var(--glass-edge); }
.adm-local { flex-direction: row; align-items: flex-start; gap: 18px; }
.adm-local-mark { width: 48px; height: 48px; border-radius: 15px; }
.adm-local-mark svg { width: 22px; height: 22px; }
.adm-local h2 { margin: 0; font-size: var(--fs-h2); }
.adm-local p { margin: 6px 0 14px; color: var(--ink-2); line-height: 1.55; max-width: 64ch; }

/* --------------------------------------------------------- delete dialog */
.adm-delete .modal-body { gap: 14px; }
.adm-del-files { align-items: flex-start; line-height: 1.45; }
.adm-del-files input { flex: none; margin-top: 3px; }

/* ------------------------------------------------- the way in from outside */
/* An admin reaches this page from the Admin tile in the menu and the top nav's
   More (bottomnav.js); #nav-admin only says the tile is wanted. */

/* The account dialog's entry, for admins. */
.acct-admin {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  border-radius: var(--radius); text-decoration: none; color: var(--ink);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-3));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  box-shadow: var(--glass-edge);
  transition: border-color var(--t-1) var(--ease-out), background var(--t-1) var(--ease-out);
}
.acct-admin:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--bg-3)); }
.acct-admin-ico {
  display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px;
  color: var(--accent-text); background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.acct-admin-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.acct-admin-text b { font-size: 14px; }
.acct-admin-text span { font-size: 12.5px; color: var(--ink-2); }
.acct-admin-go { font-size: 22px; line-height: 1; color: var(--ink-3); }

/* -------------------------------------------------------------- narrower */
@media (max-width: 1080px) {
  .adm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .adm-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .adm-run { grid-template-columns: 74px minmax(0, 1fr); }
  .adm-run-sum { grid-column: 2; }
}

@media (max-width: 860px) {
  .adm-invite-form { grid-template-columns: minmax(0, 1fr); }

  /* The members table becomes a card per person: who, then a line per detail, then the buttons. */
  .adm-table thead { display: none; }
  .adm-table, .adm-table tbody, .adm-table tr, .adm-table td { display: block; width: 100%; }
  .adm-table tbody { display: flex; flex-direction: column; gap: 10px; }
  .adm-table tbody tr {
    padding: 12px 13px; border: 1px solid var(--line-soft); border-radius: var(--radius);
    background: color-mix(in srgb, var(--bg) 50%, transparent);
  }
  .adm-table tbody tr:hover { background: color-mix(in srgb, var(--bg) 50%, transparent); }
  .adm-table td { padding: 3px 0; border: 0; }
  .adm-table td[data-label] { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; font-size: 12.5px; text-align: right; }
  .adm-table td[data-label]::before { content: attr(data-label); flex: none; text-align: left; font-weight: 600; color: var(--ink-3); }
  .adm-mwho { min-width: 0; padding-bottom: 9px !important; }
  .adm-mkeeps { max-width: none; }
  .adm-mact { width: auto; padding-top: 10px !important; }
  .adm-actions { justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .adm { padding-top: 16px; padding-bottom: 40px; gap: 14px; }
  .adm-head { align-items: flex-start; }
  .adm-tabs { align-self: stretch; }
  .adm-tab { flex: 1 0 auto; justify-content: center; padding: 0 12px; }
  .adm-card { padding: 16px 14px 18px; border-radius: var(--radius); gap: 14px; }
  .adm-tiles, .adm-tiles-3 { gap: 8px; }
  .adm-tile { padding: 10px 11px 11px; }
  .adm-tile-value { font-size: 20px; }
  .adm-tile-label { letter-spacing: .05em; }
  .adm-limit { padding: 11px 12px; gap: 10px; }
  .adm-invite-actions .btn { flex: 1 1 auto; }
  .adm-lands { margin-left: 0; flex-basis: 100%; }
  .adm-search { max-width: none; flex-basis: 100%; }
  .adm-filter { align-self: flex-start; }
  .adm-actions .btn { flex: 1 1 auto; }
  .adm-job { flex-direction: column; align-items: stretch; }
  .adm-job .btn { align-self: flex-start; }
  .adm-bars li { grid-template-columns: minmax(0, 1fr) auto; }
  .adm-bar-track { grid-column: 1 / -1; grid-row: 2; }
  .adm-cache { flex-direction: column; align-items: stretch; }
  .adm-cache .btn { align-self: flex-start; }
  .adm-index { grid-template-columns: minmax(0, 1fr) auto; }
  .adm-index > .btn { grid-column: 2; }
  .adm-index > .adm-pill { grid-column: 2; grid-row: 1; justify-self: end; }
  .adm-local { flex-direction: column; }
  .adm-link-row { flex-direction: column; }
  .adm-link-row .btn { align-self: flex-start; }
}

@media (max-width: 400px) {
  .adm-tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .adm-tiles-3 .adm-tile-sub { display: none; }
}

/* ---- Feedback: what the board needs of the team (admin.js buildFeedback) */
.adm-fb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.adm-fb-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: inherit; text-decoration: none; background: var(--bg); border: 1px solid var(--line-soft, var(--line));
}
@media (hover: hover) { .adm-fb-row:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); } }
.adm-fb-num { flex: none; min-width: 38px; font-size: 12px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.adm-fb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.adm-fb-text b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-fb-text span { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-fb-go { flex: none; color: var(--ink-3); font-size: 18px; }
.adm-tab-count.is-bad { color: #fff; background: var(--danger); }

/* ------------------------------------------------------------ card backs (admin-backs.js) */
.adk { display: flex; flex-direction: column; gap: 14px; }
.adk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.adk-tile {
  display: flex; flex-direction: column; gap: 10px; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--radius-lg, 16px); background: var(--surface-2, rgba(255, 255, 255, .03));
}
.adk-frame { display: grid; place-items: center; padding: 6px 0; }
.adk-pic {
  width: min(120px, 70%); aspect-ratio: var(--card-ratio, .716); object-fit: cover; display: block;
  border-radius: 4.6% / 3.3%; background: var(--pocket); box-shadow: 0 14px 26px -14px rgba(0, 0, 0, .7);
}
.adk-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.adk-body b { font-size: 13.5px; overflow-wrap: anywhere; }
.adk-src { font-size: 12px; color: var(--ink-3); }
.adk-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
