/* ── Admin dashboard ─────────────────────────────────────────────────────────
   Composes tokens.css only — same flat surfaces, one hairline, one accent as the
   rest of the app. It is a back-office screen, so it leans denser than the game
   UI, but it does not invent a second visual language to do that.

   Everything sits inside .scroll, which already supplies the side gutter, so
   nothing here adds horizontal padding — the same rule the arena screens follow. */

.adm { padding: var(--space-6) 0 var(--space-9); max-width: var(--wrap); margin-inline: auto; }

.adm-sec { margin-bottom: var(--space-10); }
.adm-h {
  font-family: var(--font-mono); font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--mute); font-weight: 400;
  margin: 0 0 var(--space-5);
  display: flex; align-items: center; gap: var(--space-4);
}
.adm-h::after { content: ''; flex: 1; height: var(--hairline); background: var(--line); }
.adm-sub {
  font-size: var(--text-base); font-weight: 500; color: var(--text);
  margin: var(--space-8) 0 var(--space-4);
}
.adm-note {
  font-size: var(--text-sm); color: var(--dim); line-height: var(--leading-body);
  margin: 0 0 var(--space-6);
}
.adm-empty { font-size: var(--text-sm); color: var(--mute); margin: 0; }

/* ── the number row ─────────────────────────────────────────────────────── */
.adm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--space-3); }
.adm-stat {
  display: flex; flex-direction: column; gap: var(--space-1);
  padding: var(--space-5);
  background: var(--surface); border: var(--hairline) solid var(--line);
  border-radius: var(--radius);
}
.adm-stat strong { font-family: var(--font-mono); font-size: var(--text-2xl); color: var(--text); }
.adm-stat span {
  font-family: var(--font-mono); font-size: var(--text-2xs);
  letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--mute);
}
.adm-stat small { font-size: var(--text-xs); color: var(--dim); }

/* ── survey bars ────────────────────────────────────────────────────────── */
.adm-bars { display: flex; flex-direction: column; gap: var(--space-3); }
.adm-bar { display: flex; align-items: center; gap: var(--space-4); font-size: var(--text-sm); }
.adm-bar-l { flex: 0 0 40%; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-bar-track { flex: 1; height: 8px; background: var(--surface-2); border-radius: var(--radius-sm); overflow: hidden; }
.adm-bar-fill { display: block; height: 100%; background: var(--accent); }
.adm-bar-n { flex: none; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--mute); min-width: 3ch; text-align: right; }

/* ── switches ───────────────────────────────────────────────────────────── */
.adm-toggle {
  display: flex; align-items: flex-start; gap: var(--space-5);
  padding: var(--space-5);
  background: var(--surface); border: var(--hairline) solid var(--line);
  border-radius: var(--radius); cursor: pointer;
}
.adm-toggle + .adm-toggle { margin-top: var(--space-3); }
.adm-toggle input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.adm-toggle span { display: flex; flex-direction: column; gap: var(--space-1); }
.adm-toggle strong { font-size: var(--text-base); font-weight: 500; color: var(--text); }
.adm-toggle small { font-size: var(--text-xs); color: var(--mute); }

/* ── admin list ─────────────────────────────────────────────────────────── */
.adm-list { list-style: none; margin: 0 0 var(--space-5); padding: 0; }
.adm-list li {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border: var(--hairline) solid var(--line); border-radius: var(--radius);
  font-size: var(--text-sm); color: var(--text);
}
.adm-list li + li { margin-top: var(--space-2); }
.adm-list li span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.adm-x {
  flex: none; background: none; border: 0; cursor: pointer; color: var(--mute);
  display: grid; place-items: center; padding: var(--space-2);
}
.adm-x:hover { color: var(--danger-text); }
.adm-x svg {
  width: var(--icon-sm); height: var(--icon-sm);
  fill: none; stroke: currentColor; stroke-width: var(--stroke);
  stroke-linecap: round; stroke-linejoin: round;
}
.adm-x:disabled { opacity: 0.4; cursor: default; }

.adm-add { display: flex; gap: var(--space-3); }
.adm-add input {
  flex: 1; padding: var(--space-4) var(--space-5);
  background: var(--surface); border: var(--hairline) solid var(--line-2);
  border-radius: var(--radius); color: var(--text); font: inherit; font-size: var(--text-sm);
}
.adm-add input:focus { outline: none; border-color: var(--accent); }

/* ── players table ──────────────────────────────────────────────────────── */
/* The table is the one thing here that can outgrow a phone, so it scrolls
   inside its own box rather than pushing the page sideways. */
.adm-table-wrap { overflow-x: auto; border: var(--hairline) solid var(--line); border-radius: var(--radius); }
.adm-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.adm-table th, .adm-table td {
  text-align: left; padding: var(--space-4) var(--space-5);
  border-bottom: var(--hairline) solid var(--line); white-space: nowrap;
}
.adm-table th {
  font-family: var(--font-mono); font-size: var(--text-2xs);
  letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--mute); font-weight: 400;
}
.adm-table tr:last-child td { border-bottom: 0; }
.adm-table td strong { display: block; font-weight: 500; color: var(--text); }
.adm-table td small { display: block; font-size: var(--text-xs); color: var(--mute); }

.adm-denied { padding: var(--space-10) 0; text-align: center; }
.adm-denied h2 { font-size: var(--text-xl); margin: 0 0 var(--space-4); }
.adm-denied p { color: var(--dim); line-height: var(--leading-body); margin: 0; }
