:root {
  --gold: #cfae4a;
  --gold-dim: #8f7a35;
  --bg: #0b0b0c;
  --panel: #151517;
  --panel2: #1c1c1f;
  --line: #2a2a2e;
  --text: #ecebe6;
  --muted: #9a998f;
  --ok: #4caf7a;
  --warn: #e0a030;
  --err: #e05a50;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, "Segoe UI", sans-serif; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--panel2); padding: 1px 6px; border-radius: 4px; font-size: 13px; }
h1 { font-size: 26px; margin: 0 0 14px; }
h2 { font-size: 19px; margin: 28px 0 10px; color: var(--gold); }
h3 { margin: 0 0 8px; font-size: 15px; color: var(--gold); text-transform: uppercase; letter-spacing: .05em; }
.muted { color: var(--muted); }
.err { color: var(--err); }

.top { display: flex; align-items: center; justify-content: space-between; padding: 10px 22px;
  background: #000; border-bottom: 2px solid var(--gold); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--gold); font-weight: 700; font-size: 18px; }
.brand:hover { text-decoration: none; }
.logo { width: 38px; height: 38px; }
.who { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.avatar { width: 28px; height: 28px; border-radius: 50%; }
.inline { display: inline; }
.linkbtn { background: none; border: 0; color: var(--gold); cursor: pointer; font: inherit; padding: 0; }

.layout { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 62px); }
.layout.single { grid-template-columns: 1fr; }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; }
.side h3 { padding: 0 10px 10px; }
.side a { color: var(--text); padding: 8px 10px; border-radius: 6px; }
.side a:hover { background: var(--panel2); text-decoration: none; }
.side a.active { background: var(--gold); color: #000; font-weight: 600; }
.side a.other { margin-top: 14px; color: var(--muted); }
main { padding: 26px 34px; max-width: 1100px; width: 100%; }
.single main { margin: 0 auto; }

.hero { text-align: center; padding: 60px 0; }
.hero.small { padding: 40px 0; }
.herologo { width: 150px; height: 150px; }
.hero h1 { font-size: 38px; color: var(--gold); margin: 14px 0 6px; }

.btn { display: inline-block; background: var(--gold); color: #000; border: 1px solid var(--gold); padding: 8px 18px;
  border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 14px; }
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--gold); }
.btn.danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn.warnbtn { background: var(--warn); border-color: var(--warn); }
.btn.small { padding: 4px 12px; font-size: 13px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.card p { margin: 6px 0; }
a.card.server { display: flex; gap: 14px; align-items: center; color: var(--text); }
a.card.server:hover { border-color: var(--gold); text-decoration: none; }
.gicon { width: 48px; height: 48px; border-radius: 50%; }
.gicon.ph { background: var(--gold); color: #000; display: grid; place-items: center; font-weight: 700; font-size: 20px; }

.badge { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--panel2); }
.badge.ok { background: rgba(76,175,122,.18); color: var(--ok); }
.badge.warn { background: rgba(224,160,48,.18); color: var(--warn); }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid var(--line); }
.flash.ok { background: rgba(76,175,122,.12); border-color: var(--ok); }
.flash.err { background: rgba(224,90,80,.12); border-color: var(--err); }

table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 8px; overflow: hidden; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--gold); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; background: var(--panel2); }
td.wrap { max-width: 320px; overflow-wrap: anywhere; color: var(--muted); font-size: 13px; }
td.actions { white-space: nowrap; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0; }

input, select, textarea { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 6px;
  padding: 8px 10px; font: inherit; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 1px solid var(--gold); border-color: var(--gold); }
.row input { width: auto; min-width: 240px; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; align-items: end; }
.form label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; }
.form .wide, .form h2 { grid-column: 1 / -1; }
.form label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
.form label.check input { width: auto; }
.form button { justify-self: start; }
.editor { font: 13px/1.45 ui-monospace, Consolas, monospace; white-space: pre; min-height: 480px; }
input.num { width: 100px; padding: 4px 6px; }
table.types td { padding: 4px 8px; }
.filelist { columns: 2; list-style: none; padding: 0; }
.filelist li { padding: 4px 0; }

.picker { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; min-height: 34px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--panel2); border: 1px solid var(--gold-dim);
  border-radius: 999px; padding: 3px 6px 3px 12px; }
.chip button { background: var(--bg); color: var(--gold); border: 1px solid var(--line); border-radius: 50%; width: 22px; height: 22px;
  cursor: pointer; line-height: 1; padding: 0; }
.chip b { color: var(--gold); min-width: 26px; text-align: center; }
.results { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.result { text-align: left; background: transparent; color: var(--text); border: 0; border-radius: 6px; padding: 6px 10px; cursor: pointer; font: inherit; }
.result:hover { background: var(--panel2); }
.result small { color: var(--muted); float: right; }
tr[hidden] { display: none; }

.feed { list-style: none; padding: 0; margin: 0; }
.ev { padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.ev time { color: var(--muted); font-size: 12px; margin-right: 10px; }
.ev.kill { border-left: 3px solid var(--err); }
.ev.death { border-left: 3px solid var(--warn); }
.ev.connect { border-left: 3px solid var(--ok); }
.ev.disconnect { border-left: 3px solid var(--muted); }
.board { margin: 0; padding-left: 22px; }
.board li { padding: 3px 0; }
.board li span { float: right; color: var(--gold); font-weight: 600; }
.board.plain { list-style: none; padding-left: 0; }
.big { font-size: 26px; font-weight: 700; color: var(--gold); margin: 4px 0 0; }
.small-text { font-size: 13px; margin-top: 0; }
.stat-cards { margin-bottom: 18px; }
.transcript { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px;
  white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.5 ui-monospace, Consolas, monospace; }

@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  main { padding: 18px; }
  .filelist { columns: 1; }
}
