/* admin screens (platform staff) — in the system of design/canvas/Console-Keys and Console-Account (design/STYLE.md).
   Shared components are in /app.css. */
.adm { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.adm .hint, .adm p { margin: 0; }
.adm > .hint { max-width: 880px; }

/* stat tiles */
.adm-sec { display: flex; flex-direction: column; gap: 12px; }
.adm-sec > h2 { margin: 0; font-size: 16px; color: var(--text-2); }
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.adm-tile { background: var(--panel); border: 1px solid var(--line-card); border-radius: var(--r-card); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.adm-tile .k { font-size: 13px; color: var(--muted); }
.adm-tile .v { font: 600 26px/1.2 var(--display); letter-spacing: -0.01em; color: var(--text); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.adm-tile .s { font-size: 13px; color: var(--body); }

/* status split */
.adm-status .card-head { margin-bottom: 14px; }
.adm-seg { display: flex; gap: 2px; height: 8px; border-radius: 999px; overflow: hidden; background: var(--panel); }
.adm-seg > span { flex-basis: 0; min-width: 4px; border-radius: 999px; }
.adm-legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.adm-legend button { gap: 10px; padding: 0 10px 0 4px; }
.adm-legend b { font: 500 13px var(--mono); }
.adm-legend .muted { font-size: 12px; }

/* toolbar */
.adm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.adm-search { position: relative; flex: 1 1 280px; max-width: 520px; display: block; }
.adm-search > svg { position: absolute; left: 12px; top: 12px; color: var(--muted); pointer-events: none; }
.adm-search input { width: 100%; padding-left: 36px; }
.adm-sel { display: block; flex: 0 1 220px; min-width: 160px; }
.adm-sel select { width: 100%; }
.adm-count { margin-left: auto; }

/* tables */
.adm-list { min-width: 0; }
.adm-list .table-wrap { position: relative; } /* keeps the sr-only "Actions" header inside the scroller */
.adm-table { min-width: 860px; }
.adm-table th:first-child, .adm-table td:first-child { padding-left: 24px; }
.adm-table th:last-child, .adm-table td:last-child { padding-right: 24px; }
.adm-table td { height: 56px; }
.adm-name { font-weight: 600; }
.adm-strong { font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
.adm-id { display: block; font: 12px var(--mono); color: var(--muted); margin-top: 2px; }
.adm-sub { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.adm-linked { margin-left: 6px; padding: 1px 8px; font-size: 12px; vertical-align: 1px; }
.adm-dim { color: var(--body); white-space: nowrap; }
.adm-mono { font: 13px var(--mono); white-space: nowrap; }
.adm-bad, td.adm-bad { color: var(--bad); }
.adm-acts { text-align: right; white-space: nowrap; }
.adm-acts > * + * { margin-left: 6px; }
.adm-table td .badge { vertical-align: middle; }
.adm-table td .tm-you { margin-left: 8px; }
.adm-off .adm-strong { color: var(--body); }
.adm-staff { color: var(--accent-text); border-color: var(--warn-line); }
.adm-kind { font-size: 11px; padding: 1px 8px; margin-left: 4px; color: var(--muted); vertical-align: 1px; }
td.num { white-space: nowrap; }

/* credit dialog */
.adm-dlg .adm-dlg-f { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.adm-dlg input { width: 100%; }
.adm-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-dlg .body { margin: 0; }

/* promo codes */
.adm-pcode { display: inline-flex; align-items: center; gap: 8px; }
.adm-pcode .adm-strong { letter-spacing: 0.02em; }
.adm-pc-code { font-family: var(--mono); text-transform: uppercase; }
.adm-pc-code::placeholder { font-family: var(--sans); text-transform: none; }
.adm-pc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .adm-pc-two { grid-template-columns: 1fr; } }

@media (max-width: 860px) {
  .adm-count { margin-left: 0; flex-basis: 100%; }
  .adm-sel { flex: 1 1 160px; }
  .adm-search { max-width: none; }
  .adm-search > svg { top: 14px; }
  .adm-search input, .adm-sel select { min-height: 44px; }
  .adm-acts button, .adm-legend button, .adm-presets button, #adm-pnew { min-height: 44px; }
  .adm-table th:first-child, .adm-table td:first-child { padding-left: 16px; }
  .adm-table th:last-child, .adm-table td:last-child { padding-right: 16px; }
  .adm-tile .v { font-size: 22px; }
  /* the tables scroll sideways here: keep names, ids and emails readable instead of squeezing them */
  .adm-table td:first-child, .adm-table td:nth-child(2) { min-width: 200px; }
  .adm-id { overflow-wrap: anywhere; }
  .adm-tiles { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
