:root {
    --bg:        #0b0e13;
    --bg-2:      #0e1218;
    --card:      #161b22;
    --card-2:    #1b212b;
    --border:    #232b36;
    --border-2:  #2d3746;
    --text:      #e6edf3;
    --muted:     #8b949e;
    --muted-2:   #6b7482;
    --accent:    #3fb950;
    --accent-dim:#2ea043;
    --blue:      #58a6ff;
    --purple:    #bc8cff;
    --orange:    #f0883e;
    --red:       #f85149;
    --yellow:    #d29922;
    --shadow:    0 8px 24px rgba(0,0,0,.35);
    --radius:    14px;
    font-synthesis: none;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    background: radial-gradient(1200px 600px at 20% -10%, #12202a 0%, var(--bg) 55%) fixed;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.mono { font-family: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace; }

/* ── Top bar ─────────────────────────────────────────── */
.topbar {
    display: flex; align-items: center; gap: 18px;
    padding: 14px 22px;
    background: rgba(13,17,23,.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo {
    width: 38px; height: 38px; border-radius: 10px;
    background: linear-gradient(145deg, var(--accent), var(--accent-dim));
    display: grid; place-items: center; font-size: 20px;
    box-shadow: 0 0 0 1px rgba(63,185,80,.3), 0 6px 16px rgba(46,160,67,.25);
}
.brand .titles h1 { font-size: 15px; font-weight: 600; letter-spacing: .2px; }
.brand .titles span { font-size: 12px; color: var(--muted); }

.status-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px; border-radius: 999px;
    background: var(--card); border: 1px solid var(--border);
    font-size: 12.5px; font-weight: 500;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.dot.online { background: var(--accent); box-shadow: 0 0 0 4px rgba(63,185,80,.15); animation: pulse 2s infinite; }
.dot.offline { background: var(--red); box-shadow: 0 0 0 4px rgba(248,81,73,.15); }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(63,185,80,.4);} 70%{box-shadow:0 0 0 6px rgba(63,185,80,0);} 100%{box-shadow:0 0 0 0 rgba(63,185,80,0);} }

.spacer { flex: 1; }
.top-meta { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 12.5px; }
.top-meta b { color: var(--text); font-weight: 600; }

.btn {
    border: 1px solid var(--border-2); background: var(--card);
    color: var(--text); padding: 7px 13px; border-radius: 9px;
    font-size: 12.5px; cursor: pointer; transition: .15s;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { background: var(--card-2); border-color: #3a4656; }
.btn.accent { background: var(--accent-dim); border-color: var(--accent); color: #04140a; font-weight: 600; }
.btn.accent:hover { background: var(--accent); }
.btn.danger:hover { background: rgba(248,81,73,.15); border-color: var(--red); color: var(--red); }
.btn.small { padding: 4px 9px; font-size: 11.5px; border-radius: 7px; }

/* ── Layout ──────────────────────────────────────────── */
.wrap { max-width: 1400px; margin: 0 auto; padding: 22px; }
.grid {
    display: grid; gap: 18px;
    grid-template-columns: repeat(12, 1fr);
}
.card {
    background: linear-gradient(180deg, var(--card), var(--bg-2));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    grid-column: span 12;
    min-width: 0;
}
.card > .card-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
}
.card-head h2 { font-size: 13px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.card-head .head-right { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }

@media (min-width: 900px) {
    .col-8 { grid-column: span 8; }
    .col-6 { grid-column: span 6; }
    .col-4 { grid-column: span 4; }
    .col-5 { grid-column: span 5; }
    .col-7 { grid-column: span 7; }
}

/* ── Stat tiles ──────────────────────────────────────── */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 620px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile {
    background: var(--card-2); border: 1px solid var(--border);
    border-radius: 12px; padding: 14px;
}
.tile .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.tile .value { font-size: 26px; font-weight: 700; margin-top: 4px; letter-spacing: -.5px; }
.tile .value small { font-size: 13px; font-weight: 500; color: var(--muted); }
.tile .sub { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.bar { height: 6px; border-radius: 4px; background: #0c1017; overflow: hidden; margin-top: 8px; }
.bar > span { display: block; height: 100%; border-radius: 4px; background: var(--accent); transition: width .4s ease; }

.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .charts { grid-template-columns: 1fr; } }
.chart-box { background: var(--card-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.chart-box .chart-title { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.chart-box .chart-title b { color: var(--text); font-size: 13px; }
canvas { width: 100%; display: block; }

/* ── Players ─────────────────────────────────────────── */
.player-list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; }
.player {
    display: flex; align-items: center; gap: 12px;
    padding: 10px; border-radius: 11px; background: var(--card-2);
    border: 1px solid var(--border);
}
.player .avatar { width: 38px; height: 38px; border-radius: 8px; image-rendering: pixelated; background: #0c1017; flex-shrink: 0; }
.player .avatar.fallback { display: grid; place-items: center; font-weight: 700; color: #04140a; font-size: 15px; }
.player .pinfo { min-width: 0; flex: 1; }
.player .pname { font-weight: 600; font-size: 14px; }
.player .pmeta { font-size: 11.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.player .pmeta .gm { color: var(--blue); }
.hp-bar { height: 5px; width: 90px; border-radius: 3px; background: #0c1017; overflow: hidden; margin-top: 5px; }
.hp-bar > span { display: block; height: 100%; background: linear-gradient(90deg,#f85149,#f0883e); }
.player .pactions { display: flex; gap: 5px; }
.ping-badge { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: #0c1017; border: 1px solid var(--border); }
.ping-good { color: var(--accent); } .ping-mid { color: var(--yellow); } .ping-bad { color: var(--red); }

.empty { color: var(--muted-2); font-size: 13px; text-align: center; padding: 26px 0; }

/* ── Worlds ──────────────────────────────────────────── */
.world { padding: 12px; border-radius: 11px; background: var(--card-2); border: 1px solid var(--border); margin-bottom: 10px; }
.world:last-child { margin-bottom: 0; }
.world .wtop { display: flex; align-items: center; justify-content: space-between; }
.world .wname { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.world .env-badge { font-size: 10.5px; padding: 2px 7px; border-radius: 6px; background: #0c1017; color: var(--muted); border: 1px solid var(--border); }
.world .wstats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.world .wstats b { color: var(--text); }

/* ── Console ─────────────────────────────────────────── */
.console {
    background: #05070a; border: 1px solid var(--border); border-radius: 11px;
    height: 340px; overflow-y: auto; padding: 10px 12px;
    font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
    font-size: 12px; line-height: 1.55;
}
.console .ln { white-space: pre-wrap; word-break: break-word; }
.console .ln .t { color: var(--muted-2); }
.console .ln.INFO .lv { color: var(--accent); }
.console .ln.WARN { color: var(--yellow); }
.console .ln.ERROR, .console .ln.FATAL { color: var(--red); }
.cmd-row { display: flex; gap: 8px; margin-top: 12px; }
.cmd-row input {
    flex: 1; background: #05070a; border: 1px solid var(--border-2); color: var(--text);
    padding: 9px 12px; border-radius: 9px; font-family: "JetBrains Mono", monospace; font-size: 12.5px;
}
.cmd-row input:focus { outline: none; border-color: var(--accent); }

/* ── Activity feed ───────────────────────────────────── */
.feed { display: flex; flex-direction: column; gap: 2px; max-height: 380px; overflow-y: auto; }
.feed .fitem { display: flex; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--border); font-size: 13px; }
.feed .fitem:last-child { border-bottom: none; }
.feed .ficon { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: 13px; flex-shrink: 0; background: #0c1017; }
.feed .join .ficon { color: var(--accent); } .feed .quit .ficon { color: var(--muted); }
.feed .death .ficon { color: var(--red); } .feed .advancement .ficon { color: var(--yellow); }
.feed .ftext { flex: 1; }
.feed .ftime { color: var(--muted-2); font-size: 11px; white-space: nowrap; }

/* ── Management ──────────────────────────────────────── */
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tab { padding: 6px 12px; border-radius: 8px; font-size: 12.5px; cursor: pointer; color: var(--muted); border: 1px solid transparent; }
.tab.active { background: var(--card-2); color: var(--text); border-color: var(--border); }
.list-add { display: flex; gap: 8px; margin-bottom: 12px; }
.list-add input { flex: 1; background: #05070a; border: 1px solid var(--border-2); color: var(--text); padding: 8px 11px; border-radius: 9px; font-size: 12.5px; }
.list-add input:focus { outline: none; border-color: var(--accent); }
.name-list { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; }
.name-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 11px; background: var(--card-2); border: 1px solid var(--border); border-radius: 9px; font-size: 13px; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 8px; margin-top: 6px; }
.quick .qgroup { background: var(--card-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.quick .qgroup .qlabel { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 7px; }
.quick .qbtns { display: flex; flex-wrap: wrap; gap: 5px; }

/* ── Toast ───────────────────────────────────────────── */
#toast { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast {
    background: var(--card); border: 1px solid var(--border-2); border-left: 3px solid var(--accent);
    padding: 11px 15px; border-radius: 10px; box-shadow: var(--shadow); font-size: 13px;
    animation: slidein .25s ease; max-width: 320px;
}
.toast.err { border-left-color: var(--red); }
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* scrollbars */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* ── Systeem ─────────────────────────────────────────── */
.sys-list { display: flex; flex-direction: column; gap: 2px; }
.sys-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--border); font-size: 13px; }
.sys-row:last-child { border-bottom: none; }
.sys-row .sk { color: var(--muted); }
.sys-row .sv { font-weight: 600; text-align: right; }
.sys-row .minibar { width: 90px; height: 5px; border-radius: 3px; background: #0c1017; overflow: hidden; margin-left: 10px; }
.sys-row .minibar > span { display: block; height: 100%; background: var(--blue); }

/* clickable player rows */
.player { cursor: pointer; transition: .15s; }
.player:hover { border-color: var(--border-2); background: #1d242f; }
.player .pactions .btn { cursor: pointer; }

/* ── Modal ───────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(3,5,8,.72); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; animation: fadein .15s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal {
    width: 100%; max-width: 460px; max-height: 88vh; overflow-y: auto;
    background: linear-gradient(180deg, var(--card), var(--bg-2));
    border: 1px solid var(--border-2); border-radius: 16px; padding: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.modal-head .avatar { width: 46px; height: 46px; border-radius: 9px; image-rendering: pixelated; }
.modal-head .avatar.fallback { display: grid; place-items: center; font-weight: 700; color: #04140a; font-size: 18px; }
.modal-head .mh-name { font-size: 18px; font-weight: 700; }
.modal-head .mh-sub { font-size: 12px; color: var(--muted); }
.modal-head .close { margin-left: auto; cursor: pointer; color: var(--muted); font-size: 22px; line-height: 1; background: none; border: none; padding: 4px 8px; }
.modal-head .close:hover { color: var(--text); }
.mgroup { margin-top: 14px; }
.mgroup .glabel { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 7px; }
.mbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.tp-row { display: flex; gap: 6px; margin-top: 6px; }
.tp-row input { width: 60px; background: #05070a; border: 1px solid var(--border-2); color: var(--text); padding: 7px 9px; border-radius: 8px; font-size: 12.5px; }
.tp-row select, .msg-row input { flex: 1; background: #05070a; border: 1px solid var(--border-2); color: var(--text); padding: 7px 9px; border-radius: 8px; font-size: 12.5px; }
.msg-row { display: flex; gap: 6px; margin-top: 6px; }
.msg-row input { flex: 1; }

/* ── Leaderboard ─────────────────────────────────────── */
.mini-search { background: #05070a; border: 1px solid var(--border-2); color: var(--text); padding: 6px 10px; border-radius: 8px; font-size: 12px; width: 150px; }
.mini-search:focus { outline: none; border-color: var(--accent); }
.lb-list { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; }
.lb-row { display: flex; align-items: center; gap: 11px; padding: 8px 10px; background: var(--card-2); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; transition: .15s; }
.lb-row:hover { border-color: var(--border-2); background: #1d242f; }
.lb-rank { width: 22px; text-align: center; font-weight: 700; color: var(--muted); font-size: 13px; }
.lb-row.top1 .lb-rank { color: #f5c518; } .lb-row.top2 .lb-rank { color: #c0c8d0; } .lb-row.top3 .lb-rank { color: #cd7f32; }
.lb-row .avatar { width: 30px; height: 30px; border-radius: 7px; image-rendering: pixelated; }
.lb-row .avatar.fallback { display: grid; place-items: center; font-weight: 700; color: #04140a; font-size: 13px; }
.lb-info { flex: 1; min-width: 0; }
.lb-info .n { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 7px; }
.lb-info .s { font-size: 11.5px; color: var(--muted); }
.lb-time { font-weight: 700; font-size: 13px; text-align: right; }
.lb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.lb-dot.on { background: var(--accent); box-shadow: 0 0 0 3px rgba(63,185,80,.15); }

/* ── Audit ───────────────────────────────────────────── */
.audit-list { display: flex; flex-direction: column; gap: 1px; max-height: 360px; overflow-y: auto; font-size: 12.5px; }
.audit-row { display: flex; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--border); }
.audit-row:last-child { border-bottom: none; }
.audit-row .a-act { color: var(--blue); font-weight: 600; min-width: 92px; }
.audit-row .a-tgt { flex: 1; color: var(--text); word-break: break-word; }
.audit-row .a-meta { color: var(--muted-2); font-size: 11px; white-space: nowrap; text-align: right; }

/* ── Backups & planner ───────────────────────────────── */
.split2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 800px) { .split2 { grid-template-columns: 1fr; } }
.split2 .glabel { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.backup-list, .sched-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.backup-row, .sched-row { display: flex; align-items: center; gap: 8px; padding: 8px 11px; background: var(--card-2); border: 1px solid var(--border); border-radius: 9px; font-size: 12.5px; }
.backup-row .b-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, monospace; font-size: 12px; }
.backup-row .b-size { color: var(--muted); white-space: nowrap; }
.sched-row .sc-info { flex: 1; min-width: 0; }
.sched-row .sc-info .sc-t { font-weight: 600; }
.sched-row .sc-info .sc-s { font-size: 11px; color: var(--muted); }
.sched-row.off { opacity: .5; }
.sched-form { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sched-form select, .sched-form input { background: #05070a; border: 1px solid var(--border-2); color: var(--text); padding: 7px 9px; border-radius: 8px; font-size: 12px; }
.sched-form input#schedPayload { flex: 1; min-width: 110px; }
.sched-form select:focus, .sched-form input:focus { outline: none; border-color: var(--accent); }

/* modal moderation extras */
.mod-reason { width: 100%; background: #05070a; border: 1px solid var(--border-2); color: var(--text); padding: 9px 11px; border-radius: 8px; font-size: 12.5px; margin-bottom: 10px; }
.mod-reason:focus { outline: none; border-color: var(--accent); }
.mod-row { display: flex; gap: 6px; margin-top: 6px; align-items: center; }
.mod-row select, .mod-row input { background: #05070a; border: 1px solid var(--border-2); color: var(--text); padding: 7px 9px; border-radius: 8px; font-size: 12.5px; }
.mod-row input { flex: 1; }
.mod-lbl { font-size: 11.5px; color: var(--muted); min-width: 58px; }

/* ── Light thema ─────────────────────────────────────── */
:root[data-theme="light"] {
    --bg: #eef1f5; --bg-2: #ffffff; --card: #ffffff; --card-2: #f4f6f9;
    --border: #e0e4ea; --border-2: #cdd3dc; --text: #1a2029; --muted: #5c6673; --muted-2: #8a93a0;
    --shadow: 0 6px 18px rgba(30,40,60,.08);
}
:root[data-theme="light"] body {
    background: radial-gradient(1200px 600px at 20% -10%, #e3ecf5 0%, var(--bg) 55%) fixed;
}
:root[data-theme="light"] .console, :root[data-theme="light"] .cmd-row input,
:root[data-theme="light"] .mini-search, :root[data-theme="light"] .list-add input,
:root[data-theme="light"] .mod-reason, :root[data-theme="light"] .cfg-area,
:root[data-theme="light"] .ann-area, :root[data-theme="light"] .sched-form select,
:root[data-theme="light"] .sched-form input, :root[data-theme="light"] .mini-select {
    background: #f7f9fb;
}
:root[data-theme="light"] .console { background: #f7f9fb; color: #1a2029; }

/* ── Alert banner ────────────────────────────────────── */
.alert-banner {
    background: linear-gradient(90deg, rgba(248,81,73,.18), rgba(248,81,73,.06));
    border-bottom: 1px solid var(--red);
    color: var(--text); padding: 10px 22px; font-size: 13px; font-weight: 500;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.alert-banner .a-pill { background: rgba(248,81,73,.2); border: 1px solid var(--red); border-radius: 999px; padding: 3px 11px; font-size: 12.5px; }

/* ── Kleine selects / checks ─────────────────────────── */
.mini-select { background: #05070a; border: 1px solid var(--border-2); color: var(--text); padding: 6px 9px; border-radius: 8px; font-size: 12px; }
.mini-select:focus { outline: none; border-color: var(--accent); }
.chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); cursor: pointer; }
.chk input { accent-color: var(--accent); }
.console-tools { display: flex; align-items: center; gap: 10px; }

/* ── Stat strip ──────────────────────────────────────── */
.stat-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
@media (max-width: 620px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } }
.stat-strip .st { background: var(--card-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; }
.stat-strip .st .sk { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.stat-strip .st .sv { font-size: 13px; font-weight: 600; margin-top: 3px; }
.stat-strip .st .sv small { color: var(--muted); font-weight: 400; }

/* ── Presets ─────────────────────────────────────────── */
.preset-list { display: flex; flex-wrap: wrap; gap: 7px; }
.preset-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--card-2); border: 1px solid var(--border-2); border-radius: 9px; padding: 7px 11px; font-size: 12.5px; cursor: pointer; transition: .15s; }
.preset-chip:hover { border-color: var(--accent); }
.preset-chip .x { color: var(--muted-2); font-size: 12px; }
.preset-chip .x:hover { color: var(--red); }

/* ── Announcer ───────────────────────────────────────── */
.ann-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12.5px; color: var(--muted); }
.ann-row input[type=text], .ann-row input[type=number] { background: #05070a; border: 1px solid var(--border-2); color: var(--text); padding: 6px 9px; border-radius: 8px; font-size: 12.5px; }
.ann-area { width: 100%; min-height: 90px; resize: vertical; background: #05070a; border: 1px solid var(--border-2); color: var(--text); padding: 10px; border-radius: 9px; font-size: 12.5px; font-family: inherit; }
.ann-area:focus { outline: none; border-color: var(--accent); }

/* ── Webhook / alerts ────────────────────────────────── */
.wh-events { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 8px; }
.alert-rules { display: flex; flex-direction: column; gap: 6px; }
.alert-rule { display: flex; align-items: center; gap: 8px; background: var(--card-2); border: 1px solid var(--border); border-radius: 9px; padding: 7px 10px; font-size: 12.5px; }
.alert-rule.on { border-color: rgba(63,185,80,.4); }
.alert-rule .ar-name { flex: 1; }
.alert-rule .ar-name.active { color: var(--red); font-weight: 600; }
.alert-rule input[type=number] { width: 62px; background: #05070a; border: 1px solid var(--border-2); color: var(--text); padding: 4px 7px; border-radius: 7px; font-size: 12px; }

/* ── Beveiliging ─────────────────────────────────────── */
.sec-2fa { font-size: 13px; }
.sec-2fa .qr-secret { font-family: ui-monospace, monospace; background: var(--card-2); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; word-break: break-all; margin: 8px 0; font-size: 12px; }
.backup-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 8px 0; }
.backup-codes span { font-family: ui-monospace, monospace; background: var(--card-2); border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; font-size: 12px; text-align: center; }
.session-list { display: flex; flex-direction: column; gap: 6px; }
.session-row { display: flex; align-items: center; justify-content: space-between; background: var(--card-2); border: 1px solid var(--border); border-radius: 9px; padding: 7px 10px; font-size: 12px; }
.session-row .s-cur { color: var(--accent); font-size: 11px; }

/* ── Config editor ───────────────────────────────────── */
.cfg-area { width: 100%; min-height: 340px; resize: vertical; background: #05070a; border: 1px solid var(--border-2); color: var(--text); padding: 12px; border-radius: 10px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; line-height: 1.5; }
.cfg-area:focus { outline: none; border-color: var(--accent); }
.cfg-hint { font-size: 11.5px; color: var(--muted-2); margin-top: 8px; }

/* ── Dossier (in modal) ──────────────────────────────── */
.dossier { margin-top: 14px; }
.dossier .d-alts { font-size: 12px; color: var(--orange); margin-bottom: 8px; }
.dossier .d-line { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.dossier .d-line:last-child { border-bottom: none; }
.dossier .d-type { min-width: 74px; font-weight: 600; }
.dossier .d-type.ban, .dossier .d-type.tempban, .dossier .d-type.kick { color: var(--red); }
.dossier .d-type.warn { color: var(--yellow); }
.dossier .d-meta { color: var(--muted-2); white-space: nowrap; }
.watch-badge { background: rgba(240,136,62,.2); border: 1px solid var(--orange); color: var(--orange); border-radius: 6px; padding: 1px 7px; font-size: 11px; }

/* ── Broadcast composer ──────────────────────────────── */
.broadcast-composer { display: flex; gap: 6px; flex-wrap: wrap; }
.broadcast-composer select, .broadcast-composer input { background: #05070a; border: 1px solid var(--border-2); color: var(--text); padding: 8px 10px; border-radius: 9px; font-size: 12.5px; }
.broadcast-composer input { flex: 1; min-width: 120px; }
.bc-sub { width: 100%; margin-top: 6px; background: #05070a; border: 1px solid var(--border-2); color: var(--text); padding: 8px 11px; border-radius: 9px; font-size: 12.5px; }
:root[data-theme="light"] .broadcast-composer select, :root[data-theme="light"] .broadcast-composer input, :root[data-theme="light"] .bc-sub,
:root[data-theme="light"] .cp-form input, :root[data-theme="light"] .cp-form select { background: #f7f9fb; }

/* ── Lag-rapport ─────────────────────────────────────── */
.lag-list { display: flex; flex-direction: column; gap: 12px; max-height: 420px; overflow-y: auto; }
.lag-world { background: var(--card-2); border: 1px solid var(--border); border-radius: 11px; padding: 12px; }
.lag-world .lw-name { font-weight: 600; display: flex; justify-content: space-between; margin-bottom: 8px; }
.lag-world .lw-name .lw-count { color: var(--muted); font-size: 12px; font-weight: 400; }
.lag-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .lag-cols { grid-template-columns: 1fr; } }
.lag-cols .lc-title { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 5px; }
.lag-row { display: flex; justify-content: space-between; font-size: 12px; padding: 3px 0; }
.lag-row .lr-val { font-weight: 600; }
.lag-row.hot .lr-val { color: var(--red); }
.lag-row .mono { font-family: ui-monospace, monospace; color: var(--muted); }

/* ── CoreProtect ─────────────────────────────────────── */
.cp-form { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cp-form input, .cp-form select { background: #05070a; border: 1px solid var(--border-2); color: var(--text); padding: 7px 9px; border-radius: 8px; font-size: 12px; }
.cp-list { display: flex; flex-direction: column; gap: 3px; max-height: 300px; overflow-y: auto; font-size: 12px; }
.cp-row { display: flex; gap: 8px; padding: 5px 4px; border-bottom: 1px solid var(--border); }
.cp-row:last-child { border-bottom: none; }
.cp-row .cp-act { min-width: 74px; font-weight: 600; }
.cp-row .cp-act.verwijderd { color: var(--red); } .cp-row .cp-act.geplaatst { color: var(--accent); }
.cp-row .cp-meta { color: var(--muted-2); white-space: nowrap; margin-left: auto; }
.cp-row.rb { opacity: .5; text-decoration: line-through; }

/* ── LuckPerms (in modal) ────────────────────────────── */
.lp-box { margin-top: 6px; }
.lp-groups { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.lp-groups .lp-g { background: var(--card-2); border: 1px solid var(--border-2); border-radius: 7px; padding: 3px 9px; font-size: 12px; }
.lp-groups .lp-g.primary { border-color: var(--accent); color: var(--accent); }

/* ── Gamerules ───────────────────────────────────────── */
.gr-list { display: flex; flex-direction: column; gap: 4px; max-height: 420px; overflow-y: auto; }
.gr-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: 12.5px; }
.gr-row:hover { background: var(--card-2); }
.gr-row .gr-name { color: var(--text); font-family: ui-monospace, monospace; font-size: 12px; }
.gr-row input[type=number] { width: 70px; background: #05070a; border: 1px solid var(--border-2); color: var(--text); padding: 4px 7px; border-radius: 7px; font-size: 12px; }
.gr-toggle { width: 38px; height: 21px; border-radius: 999px; background: var(--border-2); position: relative; cursor: pointer; transition: .15s; flex-shrink: 0; }
.gr-toggle.on { background: var(--accent-dim); }
.gr-toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: .15s; }
.gr-toggle.on::after { left: 19px; }
:root[data-theme="light"] .gr-row input[type=number] { background: #f7f9fb; }

/* ── Inventory-viewer (in modal) ─────────────────────── */
.inv-section { margin-top: 12px; }
.inv-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; margin-top: 6px; }
.inv-slot { aspect-ratio: 1; background: var(--card-2); border: 1px solid var(--border); border-radius: 6px; display: grid; place-items: center; position: relative; font-size: 8px; text-align: center; overflow: hidden; padding: 2px; }
.inv-slot .cnt { position: absolute; bottom: 1px; right: 3px; font-size: 10px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; }
.inv-slot .ench { position: absolute; top: 1px; left: 2px; font-size: 8px; color: var(--purple); }
.inv-slot .mat { font-size: 7.5px; color: var(--muted); line-height: 1.1; }
.inv-grid.small { grid-template-columns: repeat(9, 1fr); }

/* ── Deaths (in modal) ───────────────────────────────── */
.death-row { background: var(--card-2); border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; margin-top: 6px; font-size: 12px; }
.death-row .dr-top { display: flex; justify-content: space-between; align-items: center; }
.death-row .dr-cause { color: var(--text); }
.death-row .dr-meta { color: var(--muted-2); font-size: 11px; }
.death-row .dr-items { color: var(--muted); font-size: 11.5px; margin-top: 4px; }

/* ── POI / locaties ──────────────────────────────────── */
.poi-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; margin-bottom: 12px; }
.poi-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--card-2); border: 1px solid var(--border); border-radius: 9px; font-size: 12.5px; }
.poi-row .p-name { font-weight: 600; }
.poi-row .p-coords { font-family: ui-monospace, monospace; color: var(--muted); cursor: pointer; }
.poi-row .p-coords:hover { color: var(--accent); }
.poi-row .p-world { color: var(--muted-2); font-size: 11px; }
.poi-form { display: flex; flex-wrap: wrap; gap: 6px; }
.poi-form input { background: #05070a; border: 1px solid var(--border-2); color: var(--text); padding: 7px 9px; border-radius: 8px; font-size: 12px; }
:root[data-theme="light"] .poi-form input { background: #f7f9fb; }

/* ── Heatmap ─────────────────────────────────────────── */
.heat-grid { display: grid; grid-template-columns: 28px repeat(24, 1fr); gap: 2px; font-size: 9px; }
.heat-grid .hh { color: var(--muted-2); text-align: center; }
.heat-grid .hd { color: var(--muted); display: flex; align-items: center; }
.heat-cell { aspect-ratio: 1; border-radius: 2px; background: var(--card-2); }

/* ── Stats (in modal + leaderboard) ──────────────────── */
.stat-line { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; font-size: 12.5px; }
.stat-line .sv { font-weight: 700; }
.stat-line .sl { color: var(--muted); }
.lb-metric { font-weight: 700; font-size: 13px; text-align: right; color: var(--accent); }

/* ── Community-pagina ────────────────────────────────── */
.community-wrap { max-width: 900px; margin: 0 auto; padding: 24px; }
.comm-head { text-align: center; margin-bottom: 24px; }
.comm-head .logo-big { margin: 0 auto 14px; }
.comm-head h1 { font-size: 26px; }
.comm-head .sub { color: var(--muted); margin-top: 6px; }
.comm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.comm-card { background: linear-gradient(180deg, var(--card), var(--bg-2)); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.comm-card h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-bottom: 12px; }
.comm-lb-row { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 13px; }
.comm-lb-row .rank { width: 20px; color: var(--muted); font-weight: 700; }
.comm-lb-row img { width: 24px; height: 24px; border-radius: 5px; image-rendering: pixelated; }
.comm-lb-row .nm { flex: 1; }
.comm-lb-row .vl { font-weight: 600; color: var(--accent); }
.comm-players { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Death-replays ───────────────────────────────────── */
.replay-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.replay-row { display: flex; align-items: center; gap: 10px; padding: 8px 11px; background: var(--card-2); border: 1px solid var(--border); border-radius: 9px; font-size: 12.5px; cursor: pointer; transition: .15s; }
.replay-row:hover { border-color: var(--accent); }
.replay-row .rr-play { color: var(--accent); font-size: 15px; }
.replay-row .rr-info { flex: 1; min-width: 0; }
.replay-row .rr-cause { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.replay-row .rr-meta { color: var(--muted-2); font-size: 11px; }
.replay-modal { max-width: 440px; }
#rpCanvas { width: 100%; max-width: 380px; margin: 6px auto 0; display: block; background: #05070a; border: 1px solid var(--border); border-radius: 10px; }
:root[data-theme="light"] #rpCanvas { background: #0e1218; }
.rp-controls { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.rp-controls input[type=range] { flex: 1; accent-color: var(--accent); }
.rp-time { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); min-width: 60px; text-align: right; }
.rp-legend { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.rp-legend .dot { width: 9px; height: 9px; }
.rp-ingame { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.rp-note { font-size: 11px; color: var(--muted-2); margin-top: 6px; }

/* ── Mobiel ──────────────────────────────────────────── */
@media (max-width: 680px) {
    .topbar { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
    .top-meta { order: 3; width: 100%; }
    .wrap { padding: 14px; }
    .card { padding: 14px; }
}

/* ── Login ───────────────────────────────────────────── */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 380px; background: linear-gradient(180deg, var(--card), var(--bg-2)); border: 1px solid var(--border); border-radius: 18px; padding: 32px; box-shadow: var(--shadow); }
.login-card .logo-big { width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(145deg, var(--accent), var(--accent-dim)); display: grid; place-items: center; font-size: 30px; margin: 0 auto 18px; box-shadow: 0 8px 20px rgba(46,160,67,.3); }
.login-card h1 { text-align: center; font-size: 20px; margin-bottom: 4px; }
.login-card p { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.login-card label { font-size: 12px; color: var(--muted); }
.login-card input { width: 100%; margin-top: 6px; margin-bottom: 16px; background: #05070a; border: 1px solid var(--border-2); color: var(--text); padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.login-card input:focus { outline: none; border-color: var(--accent); }
.login-card button { width: 100%; padding: 12px; font-size: 14px; justify-content: center; }
.login-err { color: var(--red); font-size: 13px; text-align: center; margin-top: 12px; min-height: 18px; }

/* ── Publieke statuspagina ───────────────────────────── */
.status-card { width: 100%; max-width: 440px; background: linear-gradient(180deg, var(--card), var(--bg-2)); border: 1px solid var(--border); border-radius: 18px; padding: 30px; box-shadow: var(--shadow); text-align: center; }
.status-card h1 { font-size: 22px; margin-bottom: 10px; }
.status-line { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.status-grid .sbox { background: var(--card-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.status-grid .sv { font-size: 22px; font-weight: 700; }
.status-grid .sl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 3px; }
.online-players { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.online-players .pchip { display: inline-flex; align-items: center; gap: 5px; background: var(--card-2); border: 1px solid var(--border); border-radius: 8px; padding: 4px 9px; font-size: 12.5px; }
.online-players .pchip img { width: 18px; height: 18px; border-radius: 4px; image-rendering: pixelated; }
.status-foot { margin-top: 16px; font-size: 11.5px; color: var(--muted-2); }
.comm-admin { position: fixed; top: 14px; right: 16px; font-size: 12px; color: var(--muted); text-decoration: none; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 6px 11px; }
.comm-admin:hover { color: var(--text); border-color: var(--border-2); }
