/* ═══════════════════════════════════════════════════════════════════════════
   admin.css — the admin page, rebuilt in the Season 2 language (Aug 2026).

   Every class is `adm-` prefixed. Loaded after settings.css, and deliberately
   built on the same primitives: it reuses `.st-panel`, `.st-row`, `.st-btn`,
   `.st-pill`, `.st-tog`, `.st-input`, `.st-field`, `.st-label` and `.st-empty`
   from settings.css rather than redefining them, so the two pages cannot drift.
   Only what is genuinely admin-specific lives here.

   ⚠ Never give a `.page` element a top-level `display` rule here — see the note
   at the top of profile.css. Scope to a descendant.

   This file is loaded for EVERY user even though only admins can reach the page.
   That's fine and deliberate: it is ~5 KB of CSS, where the JS it styles is
   ~30 KB and is still injected on demand by topbar.js for admins only.
   ═══════════════════════════════════════════════════════════════════════════ */

#page-admin .page-inner { max-width: 1000px; }

/* ── page head ── */
.adm-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.adm-title { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.adm-sub { font-size: 13px; color: var(--text-3); font-weight: 600; margin-top: 5px; }
.adm-sub b { color: var(--accent); }
.adm-head-acts { display: flex; gap: 8px; flex: none; }
.adm-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px;
  border-radius: 9px; font-size: 12.5px; font-weight: 700; color: var(--text-2);
  cursor: pointer; transition: .15s; background: rgba(255,255,255,.05);
  border: 1px solid var(--border); white-space: nowrap;
}
.adm-btn:hover { background: var(--surface-hover); color: var(--text); border-color: var(--border-strong); }

/* ── tab strip — the st-nav chip, with a count bubble ── */
.adm-tabs {
  position: sticky; top: var(--topbar-h); z-index: 40; display: flex; gap: 4px;
  overflow-x: auto; scrollbar-width: none; padding: 10px 0; margin-bottom: 14px;
  background: linear-gradient(180deg, var(--bg) 72%, transparent);
}
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tab {
  display: flex; align-items: center; gap: 7px; flex: none; padding: 8px 14px;
  border-radius: 9px; font-size: 13px; font-weight: 650; color: var(--text-2);
  cursor: pointer; transition: .15s; background: rgba(255,255,255,.04);
  border: 1px solid var(--border); white-space: nowrap;
}
.adm-tab:hover { background: var(--surface-hover); color: var(--text); }
.adm-tab.active { color: #fff; background: var(--accent-dim); border-color: var(--hv-a-55); }
.adm-tab-n {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 800;
  display: grid; place-items: center;
}
.adm-tab-n.hidden { display: none; }

/* ── section rhythm inside a tab ── */
.adm-sec + .adm-sec { margin-top: 34px; }

/* ── OVERVIEW: the "what needs me" tiles ── */
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.adm-tile {
  background: var(--hv-panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; transition: .15s; text-align: left; width: 100%;
}
button.adm-tile { cursor: pointer; }
button.adm-tile:hover { border-color: var(--hv-a-42); transform: translateY(-2px); }
.adm-tile-n {
  font-family: var(--font-display); font-size: 26px; font-weight: 800;
  letter-spacing: -.03em; line-height: 1; color: var(--text);
}
.adm-tile-n.acc { color: var(--accent); }
.adm-tile-n.warn { color: var(--hv-amber); }
.adm-tile-n.calm { color: var(--text-3); }
.adm-tile-l {
  font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-3); margin-top: 6px;
}
.adm-tile-d { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* ── an action row that runs something on the server ── */
.adm-act-d code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em;
  background: rgba(255,255,255,.06); padding: 1px 5px; border-radius: 4px;
}
.adm-out {
  font-size: 12px; padding: 9px 12px; border-radius: 9px; margin: 0 20px 16px;
  background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.24); color: #86efac;
}
.adm-out.bad { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.24); color: #fca5a5; }

/* ── QUEUE: request + invite cards ── */
.adm-q { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.055); display: flex; gap: 14px; }
.adm-q:first-child { border-top: none; }
.adm-q-poster {
  width: 56px; height: 84px; border-radius: 8px; object-fit: cover; flex: none;
  background: var(--bg-3); border: 1px solid var(--border);
}
.adm-q-ph {
  width: 56px; height: 84px; border-radius: 8px; flex: none; display: grid;
  place-items: center; font-size: 22px; background: var(--bg-3); border: 1px solid var(--border);
}
.adm-q-body { flex: 1; min-width: 0; }
.adm-q-t { font-size: 14.5px; font-weight: 700; color: var(--text); }
.adm-q-meta { font-size: 12px; color: var(--text-3); margin-top: 3px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.adm-q-who { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.adm-q-who b { color: var(--text-2); font-weight: 650; }
.adm-q-notes {
  font-size: 12.5px; color: var(--text-2); font-style: italic; margin-top: 7px;
  padding-left: 10px; border-left: 2px solid var(--hv-a-42);
}
.adm-q-acts { display: flex; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
.adm-q-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
@media (max-width: 560px) { .adm-q-form { grid-template-columns: 1fr; } }

/* the approve-and-tag panel */
.adm-tag { margin-top: 11px; padding: 12px; border-radius: 10px; background: rgba(0,0,0,.25); border: 1px solid var(--border); }
.adm-tag-h { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); margin-bottom: 9px; }
.adm-tag-res { max-height: 220px; overflow-y: auto; margin: 9px 0; display: flex; flex-direction: column; gap: 4px; }
.adm-tag-r {
  display: flex; align-items: center; gap: 9px; padding: 6px; border-radius: 8px;
  cursor: pointer; border: 1px solid transparent; transition: .12s;
}
.adm-tag-r:hover { background: var(--surface-hover); }
.adm-tag-r.on { background: var(--accent-dim); border-color: var(--hv-a-55); }
.adm-tag-r img { width: 30px; height: 44px; object-fit: cover; border-radius: 4px; flex: none; background: var(--bg-3); }
.adm-tag-r-n { font-size: 12.5px; font-weight: 650; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-tag-r-s { font-size: 11px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-tag-hint { font-size: 11.5px; color: var(--text-3); padding: 4px 0; }

/* ── CHANNEL: playlist cards + rotation log ── */
.adm-pls { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; padding: 18px 20px; }
.adm-pls-card { background: rgba(0,0,0,.24); border: 1px solid var(--border); border-radius: 11px; padding: 13px 15px; }
.adm-pls-card.warn { border-color: rgba(245,181,24,.4); }
.adm-pls-card.end  { border-color: rgba(248,113,113,.45); }
.adm-pls-n { font-size: 13.5px; font-weight: 700; color: var(--text); }
.adm-pls-s { font-size: 12px; color: var(--text-3); margin-top: 5px; }
.adm-pls-s b { color: var(--text-2); font-weight: 700; }
.adm-log-row {
  display: flex; align-items: baseline; gap: 12px; padding: 8px 20px;
  border-top: 1px solid rgba(255,255,255,.045); font-size: 12.5px;
}
.adm-log-f { font-weight: 650; color: var(--text-2); min-width: 130px; flex: none; }
.adm-log-d { flex: 1; min-width: 0; color: var(--text-3); }
.adm-log-d.end { color: #fca5a5; }
.adm-log-t { font-size: 11px; color: var(--text-3); flex: none; }
@media (max-width: 560px) { .adm-log-row { flex-wrap: wrap; gap: 4px 10px; } .adm-log-f { min-width: 0; } }

/* ── EVENTS: phase control ── */
.adm-ev { padding: 18px 20px; border-top: 1px solid rgba(255,255,255,.055); }
.adm-ev:first-child { border-top: none; }
.adm-ev-h { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; flex-wrap: wrap; }
.adm-ev-n { font-size: 15px; font-weight: 700; color: var(--text); }
.adm-ev-d { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.adm-phase { display: flex; gap: 0; border-radius: 9px; overflow: hidden; border: 1px solid var(--border); width: fit-content; }
.adm-phase button {
  padding: 7px 15px; font-size: 12px; font-weight: 700; color: var(--text-2);
  background: rgba(255,255,255,.03); cursor: pointer; transition: .14s;
  border: none; border-right: 1px solid var(--border);
}
.adm-phase button:last-child { border-right: none; }
.adm-phase button:hover:not(.on) { background: var(--surface-hover); color: var(--text); }
.adm-phase button.on { color: #fff; background: var(--hv-a-55); }
.adm-phase button.on[data-phase="ended"] { background: rgba(255,255,255,.18); }

/* ── COLLECTIONS ── */
.adm-coll-bar { display: flex; gap: 8px; flex-wrap: wrap; padding: 16px 20px 0; align-items: center; }
.adm-coll-pick {
  height: 34px; padding: 0 12px; border-radius: 9px; font: inherit; font-size: 13px;
  color: var(--text); background: rgba(0,0,0,.28); border: 1px solid var(--border-strong);
  min-width: 200px; flex: 1;
}
.adm-coll-items { display: flex; flex-direction: column; gap: 4px; padding: 4px 20px 18px; max-height: 460px; overflow-y: auto; }
.adm-coll-i { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 8px; background: rgba(255,255,255,.025); font-size: 12.5px; }
.adm-coll-i img { width: 28px; height: 40px; object-fit: cover; border-radius: 4px; flex: none; background: var(--bg-3); }
.adm-coll-i-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 600; }
.adm-coll-x {
  flex: none; width: 24px; height: 24px; border-radius: 6px; cursor: pointer; color: var(--text-3);
  background: rgba(255,255,255,.05); border: 1px solid var(--border); font-size: 13px; line-height: 1;
}
.adm-coll-x:hover { color: #fca5a5; border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.12); }

/* ── shared: a labelled sub-heading inside a panel ── */
.adm-sub-h {
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-2); padding: 16px 20px 0;
}
.adm-form { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.adm-textarea { min-height: 130px; padding: 10px 12px; resize: vertical; line-height: 1.5; height: auto; }

/* The season preview's badge-shimmer reward tile demos the cosmetic, so it needs
   the real effect. It had emitted `badge-shimmer-demo` with no rule behind it
   since the preview was written — the tile rendered static, which is exactly the
   wrong thing for a preview of an animation. Aliased to the live `.badge-shimmer`
   from main.css rather than duplicating the keyframes. */
.badge-shimmer-demo { position: relative; overflow: hidden; }
.badge-shimmer-demo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.42) 50%, transparent 70%);
  background-size: 250% 100%;
  animation: badge-shimmer-sweep 3s ease-in-out infinite;
  pointer-events: none;
}
