/* Wolfmoot admin console: light and calm, Wolfmoot's navy, gold and ember; dark with the device. */
:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --border: #e6e1d6;
  --text: #1c1f2e;
  --muted: #6b6f80;
  --navy: #1b2552;
  --navy-soft: #e8ebf6;
  --gold: #e3a92b;
  --gold-soft: #fdf3dc;
  --ember: #d4552a;
  --ember-soft: #fbe7df;
  --mint: #2f8a5b;
  --mint-soft: #e2f4ea;
  --sky: #2f6fb8;
  --sky-soft: #e4effa;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 24, 40, 0.06), 0 4px 16px rgba(20, 24, 40, 0.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0e1d;
    --surface: #131833;
    --surface-2: #171d3d;
    --border: #262d55;
    --text: #eceaf4;
    --muted: #9aa0bf;
    --navy: #f2c14e;
    --navy-soft: #262d55;
    --gold: #f2c14e;
    --gold-soft: #3a3220;
    --ember: #ff9a6e;
    --ember-soft: #3a2420;
    --mint: #7ce0b8;
    --mint-soft: #1d3a31;
    --sky: #8fbfff;
    --sky-soft: #1e2d4d;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
h1 { font-size: 22px; margin: 0 0 12px; }
h2 { font-size: 20px; margin: 0; }
h3 { font-size: 15px; margin: 0 0 10px; }
p { margin: 0 0 8px; }
a { color: var(--sky); }
code { font: 13px ui-monospace, Menlo, Consolas, monospace; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; letter-spacing: 0.2px; }
.brand b { color: var(--gold); font-weight: 700; }
.brand-large { font-size: 28px; justify-content: center; margin-bottom: 8px; }
.moon { width: 18px; height: 18px; border-radius: 50%; background: var(--gold); box-shadow: inset -5px -2px 0 0 var(--surface); flex: none; }
.brand-large .moon { width: 28px; height: 28px; box-shadow: inset -8px -3px 0 0 var(--surface); }
.pill { font-size: 12px; font-weight: 600; color: var(--navy); background: var(--navy-soft); border-radius: 999px; padding: 2px 10px; }
.splash { display: grid; place-items: center; height: 100vh; }
.splash .moon { width: 32px; height: 32px; animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: 0.35; } to { opacity: 1; } }

/* ---------- buttons and fields ---------- */
.btn { appearance: none; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.busy { position: relative; color: transparent; }
.btn.busy::after { content: ''; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; border: 2px solid var(--muted); border-top-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-primary { background: var(--navy); border-color: var(--navy); color: var(--surface); }
.btn-primary:hover { border-color: var(--navy); opacity: 0.92; }
.btn-danger { background: var(--ember); border-color: var(--ember); color: #fff; }
.btn-small { padding: 6px 12px; font-size: 14px; }
.btn-wide { width: 100%; margin-top: 10px; }
.input { width: 100%; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 10px; padding: 10px 12px; font: inherit; }
.input:focus, .btn:focus-visible, .tab:focus-visible, .item:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
textarea.input { resize: vertical; }
.row { display: flex; gap: 8px; margin: 8px 0 12px; }
.row select { max-width: 140px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ---------- sign in ---------- */
.signin { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.signin-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 32px 24px; text-align: center; box-shadow: var(--shadow); }
.signin-card h1 { font-size: 20px; }

/* ---------- frame ---------- */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 20px; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.nav { display: flex; gap: 4px; flex: 1; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: var(--navy-soft); color: var(--navy); }
.badge { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--ember); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.account { display: flex; align-items: center; gap: 10px; }
.content { max-width: 1180px; margin: 0 auto; padding: 20px; }
.loading, .empty { color: var(--muted); padding: 24px 8px; text-align: center; }
.page { max-width: 760px; }
.section-title { font-size: 14px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); margin: 24px 0 10px; }

/* ---------- reports: list and detail side by side ---------- */
.split { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
.side { position: sticky; top: 76px; }
.tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.tab { flex: 1; appearance: none; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; padding: 7px 4px; border-radius: 9px; cursor: pointer; }
.tab.active { background: var(--navy-soft); color: var(--navy); }
.list { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 210px); overflow: auto; padding-bottom: 8px; }
.item { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; color: inherit; text-decoration: none; }
.item:hover { border-color: var(--muted); }
.item.selected { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.item-top, .item-bottom { display: flex; align-items: center; gap: 8px; }
.item-bottom { margin-top: 6px; justify-content: space-between; font-size: 13px; }
.item-time { margin-left: auto; font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-new { background: var(--ember); }
.dot-reviewed { background: var(--sky); }
.dot-actioned { background: var(--mint); }
.chip { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 10px; background: var(--surface-2); border: 1px solid var(--border); }
.chip-harassment, .chip-offensive { background: var(--ember-soft); border-color: transparent; color: var(--ember); }
.chip-cheating { background: var(--gold-soft); border-color: transparent; color: #8a5a00; }
.chip-name { background: var(--sky-soft); border-color: transparent; color: var(--sky); }
@media (prefers-color-scheme: dark) { .chip-cheating { color: var(--gold); } }

.detail { display: flex; flex-direction: column; gap: 14px; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.status { font-size: 13px; font-weight: 700; border-radius: 999px; padding: 4px 12px; }
.status-new { background: var(--ember-soft); color: var(--ember); }
.status-reviewed { background: var(--sky-soft); color: var(--sky); }
.status-actioned { background: var(--mint-soft); color: var(--mint); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 4px; }
.note { margin: 14px 0 0; padding: 10px 14px; border-left: 3px solid var(--gold); background: var(--surface-2); border-radius: 0 8px 8px 0; }
.messages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.messages li { display: flex; align-items: baseline; gap: 10px; }
.message-text { flex: 1; }
.message-time { font-size: 12px; }
.channel { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); min-width: 56px; }
.channel-pack { color: var(--ember); }
.channel-ghosts { color: var(--sky); }
.back { display: none; align-self: flex-start; }
.pane-empty { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }

/* ---------- bans ---------- */
.bans { display: flex; flex-direction: column; gap: 8px; }
.ban { display: flex; align-items: flex-start; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.ban-main { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ban-reason { margin: 4px 0 0; }
.ban-past { opacity: 0.7; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 20; }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; box-shadow: var(--shadow); transition: opacity 0.3s; }
.toast-error { background: var(--ember); color: #fff; }
.toast-warn { background: var(--gold); color: #1c1f2e; }
.toast.out { opacity: 0; }

/* ---------- phones: list, then the report on its own ---------- */
@media (max-width: 820px) {
  .topbar { flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px; }
  .nav { order: 3; flex-basis: 100%; }
  .account-email { display: none; }
  .content { padding: 16px; }
  .split { grid-template-columns: 1fr; }
  .side { position: static; }
  .list { max-height: none; }
  .reports.has-detail .side { display: none; }
  .reports:not(.has-detail) .pane { display: none; }
  .back { display: inline-block; }
  .row { flex-direction: column; }
  .row select { max-width: none; }
}
