:root { --bg: #f6f3fb; --panel: #fff; --ink: #231736; --muted: #6d6380; --line: #e4ddef; --brand: #5b2ca0; --gold: #d99a1c; --red: #c83232; --green: #1d8a4b; color-scheme: light; }
@media (prefers-color-scheme: dark) { :root { --bg: #17111f; --panel: #221a2e; --ink: #f1ebfa; --muted: #a99bbd; --line: #3a2e4c; --brand: #b38cff; color-scheme: dark; } }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, 'Segoe UI', sans-serif; }
h1 { font-size: 1.15rem; margin: 0 0 16px; } h1 span { color: var(--gold); }
h2 { margin: 0 0 12px; font-size: 1.4rem; } h3 { margin: 22px 0 8px; font-size: 1.05rem; }
.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px; padding: 18px 12px; background: var(--panel); border-right: 1px solid var(--line); }
.side a { padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.side a.on, .side a:hover { background: var(--bg); color: var(--brand); font-weight: 600; }
.side #logout { margin-top: auto; }
main { padding: 24px; max-width: 1150px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat b { display: block; font-size: 1.6rem; font-variant-numeric: tabular-nums; } .stat small { color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: start; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--bg); }
input, select, textarea { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; min-width: 0; }
td input { width: 100%; } input[type=number] { width: 110px; }
textarea { width: 100%; min-height: 160px; font-family: ui-monospace, monospace; font-size: 13px; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 8px; padding: 7px 14px; background: var(--brand); color: #fff; font-weight: 600; }
button.ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
button.danger { background: var(--red); } button.small { padding: 4px 10px; font-size: 0.85rem; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.row label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--muted); }
.muted { color: var(--muted); } .pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 0.8rem; background: var(--bg); border: 1px solid var(--line); }
.pill.on { background: var(--green); color: #fff; border: 0; } .pill.bad { background: var(--red); color: #fff; border: 0; }
.changed { border-inline-start: 4px solid var(--gold); }
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { width: min(100%, 360px); display: flex; flex-direction: column; gap: 12px; }
.login label { display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; }
.err { color: var(--red); min-height: 1.2em; margin: 0; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 99px; }
details summary { cursor: pointer; color: var(--brand); margin: 8px 0; }
@media (max-width: 760px) { .app { grid-template-columns: 1fr; } .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; } .side h1 { width: 100%; } main { padding: 14px; } }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-inline-start: 4px; border-radius: 99px; background: var(--red); color: #fff; font-size: 0.75rem; font-weight: 700; }
.tabs a { padding: 6px 12px; border-radius: 99px; text-decoration: none; color: var(--brand); border: 1px solid var(--line); }
.tabs a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.msg { max-width: 80%; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); white-space: normal; }
.msg.staff { align-self: flex-end; background: color-mix(in srgb, var(--brand) 14%, var(--panel)); }
.msg .meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 4px; }
textarea.plain { font-family: inherit; font-size: 15px; min-height: 120px; }
