/* Pure black / white, Apple-style — matches the app. */
:root {
  color-scheme: light dark;
  --bg: #ffffff; --fg: #000000; --surface: #f2f2f7; --line: #d1d1d6; --muted: #6e6e73; --danger: #d70015;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000000; --fg: #ffffff; --surface: #1c1c1e; --line: #38383a; --muted: #98989d; --danger: #ff6961; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg);
       font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; }
.topbar { position: sticky; top: 0; z-index: 2; display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
          padding: 12px 24px; background: var(--bg); border-bottom: 1px solid var(--line); }
nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
nav button { background: none; color: var(--muted); padding: 6px 12px; }
nav button.active { background: var(--surface); color: var(--fg); }
main { max-width: 1100px; margin: 0 auto; padding: 24px; }
h1 { font-size: 28px; margin: 8px 0 12px; }
.muted { color: var(--muted); }
.tab { display: none; } .tab.active { display: block; }
button { font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 9px 16px; cursor: pointer;
         background: var(--fg); color: var(--bg); }
button.secondary { background: var(--surface); color: var(--fg); }
button.danger { background: none; color: var(--danger); padding-inline: 8px; }
button:disabled { opacity: .4; cursor: default; }
input, select, textarea { font: inherit; color: var(--fg); background: var(--surface); border: 1px solid transparent;
                          border-radius: 10px; padding: 9px 12px; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--fg); outline-offset: 1px; }
textarea { width: 100%; min-height: 80px; resize: vertical; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.row > input { flex: 1 1 200px; }
.card { background: var(--surface); border-radius: 16px; padding: 16px; margin: 12px 0; }
.card input, .card select, .card textarea { background: var(--bg); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.grid label input, .grid label select { color: var(--fg); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border-radius: 16px; padding: 16px; }
.stat b { display: block; font-size: 30px; }
table { width: 100%; border-collapse: collapse; margin: 12px 0; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
td.wrap { max-width: 360px; white-space: pre-wrap; word-break: break-word; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface); }
.pill.banned { color: var(--danger); }
dialog { border: 0; border-radius: 20px; padding: 24px; max-width: 760px; max-height: 88vh; overflow: auto; width: calc(100% - 32px);
         background: var(--bg); color: var(--fg); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(0,0,0,.4); }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--fg); color: var(--bg);
         padding: 10px 18px; border-radius: 12px; opacity: 0; transition: opacity .2s; pointer-events: none; }
#toast.show { opacity: 1; }
#toast.error { background: var(--danger); color: #fff; }
.devbar { padding: 8px 24px; background: var(--surface); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; }
@media (max-width: 640px) { main, .topbar { padding-inline: 16px; } table { font-size: 13px; } }
.auth { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: grid; place-items: center; padding: 16px; }
.auth[hidden] { display: none; }
.auth-card { width: 100%; max-width: 380px; display: grid; gap: 14px; }
.auth-card h1 { margin: 0; font-size: 28px; }
.auth-card p { margin: 0; }
.auth-card label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.auth-card input { color: var(--fg); }
.auth-error { color: var(--danger); min-height: 1em; font-size: 14px; }
button.link { background: none; color: var(--fg); text-decoration: underline; padding: 4px; }
