/* ZyronMC Anti-Cheat – Webpanel. Dark Security-Dashboard. */

:root {
  --bg: #0b0a0f;
  --bg-2: #100f15;
  --surface: #15131c;
  --surface-2: #1b1924;
  --surface-3: #23202e;
  --border: #2a2634;
  --border-strong: #3a3546;
  --text: #ece9f3;
  --text-2: #b9b3c6;
  --muted: #847d93;
  --accent: #9d63ff;
  --accent-2: #b98aff;
  --accent-soft: rgba(157, 99, 255, .14);
  --ok: #34d399;
  --low: #e8c547;
  --warn: #f59e42;
  --high: #f2545b;
  --crit: #ff2d6f;
  --blue: #5aa9ff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px -12px rgba(0, 0, 0, .6);
  --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", "Consolas", ui-monospace, monospace;
  --sidebar: 248px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 85% -10%, rgba(157, 99, 255, .08), transparent 60%), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 15px; }
h3 { font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
p { margin: 0 0 8px; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-3); padding: 1px 6px; border-radius: 5px; }
code.muted { background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
::selection { background: rgba(157, 99, 255, .35); }

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12px; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 16px; }
.text-good { color: var(--ok); }
.text-warn { color: var(--warn); }
.text-bad { color: var(--high); }
.noscript { padding: 40px; text-align: center; }

/* ---------------------------------------------------------------- Boot / Spinner */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 18px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--border-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
.spinner.sm { width: 14px; height: 14px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-page { display: grid; place-content: center; min-height: 50vh; }

/* ---------------------------------------------------------------- Layout */
#shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #111017, #0d0c12); border-right: 1px solid var(--border); padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 20px; }
.brand strong { display: block; font-size: 15px; letter-spacing: .02em; }
.brand span { display: block; font-size: 11px; color: var(--accent-2); text-transform: uppercase; letter-spacing: .16em; font-weight: 600; }
#nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); padding: 16px 12px 6px; font-weight: 600; }
#nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: var(--text-2);
  font-weight: 500; transition: background .15s, color .15s; position: relative;
}
#nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
#nav a.active { background: var(--accent-soft); color: #fff; }
#nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
#nav a.active .icon { color: var(--accent-2); }
.nav-count { margin-left: auto; background: var(--high); color: #fff; font-size: 11px; font-weight: 700; padding: 0 7px; border-radius: 10px; line-height: 18px; }
.sidebar-foot { border-top: 1px solid var(--border); padding: 14px 10px 0; }
.srv { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--text-2); }
.srv .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.srv[data-online="1"] .dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, .18); }
.srv[data-online="0"] .dot { background: var(--high); }

.content { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 28px;
  background: rgba(11, 10, 15, .78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.topbar-title { flex: 1; font-weight: 600; color: var(--text-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-btn { display: none; }
.conn { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); padding: 4px 10px; border: 1px solid var(--border); border-radius: 20px; }
.conn i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.conn[data-state="live"] { color: var(--ok); border-color: rgba(52, 211, 153, .3); }
.conn[data-state="live"] i { background: var(--ok); animation: pulse 2s infinite; }
.conn[data-state="connecting"] i { background: var(--warn); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .5); } 70% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.user { display: flex; align-items: center; gap: 9px; color: var(--text); padding: 4px 6px; border-radius: 9px; }
.user:hover { background: var(--surface-2); text-decoration: none; }
.user-name { font-weight: 600; }
#main { padding: 28px; outline: none; }
.scrim { display: none; }

.page { max-width: 1480px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { color: var(--muted); font-size: 13px; margin-top: -8px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

/* ---------------------------------------------------------------- Cards */
.card {
  background: linear-gradient(180deg, var(--surface), #131119); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); min-width: 0;
}
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { display: flex; align-items: center; gap: 9px; }
.link { font-size: 12.5px; }

.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.stat {
  display: flex; gap: 13px; align-items: flex-start; background: linear-gradient(180deg, var(--surface), #131119);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0;
}
.stat-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); flex: none; }
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat-value { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.good .stat-ico { background: rgba(52, 211, 153, .12); color: var(--ok); }
.stat.good .stat-value { color: var(--ok); }
.stat.mid .stat-ico { background: rgba(245, 158, 66, .12); color: var(--warn); }
.stat.bad .stat-ico { background: rgba(242, 84, 91, .12); color: var(--high); }
.stat.bad .stat-value { color: var(--high); }

/* ---------------------------------------------------------------- Buttons & Formulare */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: 600 13px var(--font); cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; text-decoration: none !important;
}
.btn:hover { background: var(--surface-3); border-color: #4a4458; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .icon { width: 16px; height: 16px; }
.btn.primary { background: linear-gradient(180deg, #a56dff, #8549f0); border-color: #9a5cff; color: #fff; }
.btn.primary:hover { background: linear-gradient(180deg, #b07dff, #8f55f5); }
.btn.danger { background: rgba(242, 84, 91, .12); border-color: rgba(242, 84, 91, .45); color: #ff8b90; }
.btn.danger:hover { background: rgba(242, 84, 91, .2); }
.btn.ghost { background: transparent; border-color: var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; }
.btn.block { width: 100%; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid transparent; background: transparent;
  color: var(--text-2); cursor: pointer; transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.danger:hover { color: var(--high); background: rgba(242, 84, 91, .1); }
.expander .icon { transition: transform .15s; }
.expander.open .icon { transform: rotate(90deg); color: var(--accent-2); }

input, select, textarea {
  font: 13.5px var(--font); color: var(--text); background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: 9px;
  padding: 0 12px; height: 38px; width: 100%; transition: border-color .15s, box-shadow .15s; min-width: 0;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; }
select { cursor: pointer; padding-right: 30px; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 16px, calc(100% - 11px) 16px; background-size: 5px 5px; background-repeat: no-repeat; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[readonly] { color: var(--text-2); }
input.invalid { border-color: var(--high); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); padding: 0; margin: 0; flex: none; }
.search { width: 220px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.form-error { color: #ff8b90; background: rgba(242, 84, 91, .1); border: 1px solid rgba(242, 84, 91, .3); padding: 9px 12px; border-radius: 8px; margin: 0; }
.hint { font-size: 12px; color: var(--muted); margin: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.check.disabled { opacity: .45; cursor: not-allowed; }
.input-group { display: flex; gap: 8px; align-items: center; }
.input-group .addon { color: var(--muted); font-size: 12.5px; }
.inline-form { display: flex; gap: 8px; }
.quick { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; cursor: pointer; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; z-index: 1; }
.switch .slider { position: absolute; inset: 0; border-radius: 22px; background: var(--surface-3); border: 1px solid var(--border-strong); transition: background .2s, border-color .2s; }
.switch .slider::after { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; border-radius: 50%; background: #9e97ad; transition: transform .2s, background .2s; }
.switch input:checked + .slider { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .slider::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + .slider { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.switch input:disabled + .slider { opacity: .5; }
.switch input:disabled { cursor: not-allowed; }

/* ---------------------------------------------------------------- Toolbar, Pager */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar select { width: auto; }
.toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; }
.live-summary { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.ok { background: var(--ok); } .dot.low { background: var(--low); } .dot.warn { background: var(--warn); } .dot.high { background: var(--high); } .dot.crit { background: var(--crit); }

/* ---------------------------------------------------------------- Tabellen */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600;
  padding: 12px 14px; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, .015); white-space: nowrap;
}
.table td { padding: 10px 14px; border-bottom: 1px solid rgba(42, 38, 52, .7); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255, 255, 255, .018); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.empty { text-align: center; color: var(--muted); padding: 34px 14px; }
.table td.reason { color: var(--text-2); max-width: 360px; }
.table td.meta { color: var(--text-2); max-width: 380px; word-break: break-word; }
.table td.actions { white-space: nowrap; text-align: right; }
.table td.name-cell { white-space: nowrap; }
.table tr.clickable { cursor: pointer; }
.table tr.row-hot td { background: rgba(242, 84, 91, .04); }
.table tr.detail-row > td { background: var(--bg-2); padding: 18px 20px; }
.table tr.detail-row:hover > td { background: var(--bg-2); }
.table td:first-child { width: 1%; }
tr[class*="risk-edge-"] > td:first-child { box-shadow: inset 3px 0 0 transparent; }
tr.risk-edge-low > td:first-child { box-shadow: inset 3px 0 0 var(--low); }
tr.risk-edge-warning > td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
tr.risk-edge-high > td:first-child { box-shadow: inset 3px 0 0 var(--high); }
tr.risk-edge-critical > td:first-child { box-shadow: inset 3px 0 0 var(--crit); }

.player-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; vertical-align: middle; }
.player-link:hover span { color: var(--accent-2); }
.head { border-radius: 5px; image-rendering: pixelated; background: var(--surface-3); flex: none; }
.status { font-size: 12px; color: var(--muted); }
.status.on { color: var(--ok); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.status.on::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

/* ---------------------------------------------------------------- Badges, Risiko */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 6px; font-size: 11.5px; font-weight: 600;
  background: var(--surface-3); color: var(--text-2); border: 1px solid transparent; white-space: nowrap; margin-left: 6px; vertical-align: middle;
}
td > .badge:first-child, .risk-meta .badge, .verdict .badge, .check-card .badge { margin-left: 0; }
.badge.ghost { background: transparent; border-color: var(--border-strong); color: var(--muted); }
.badge.risk-ok { background: rgba(52, 211, 153, .12); color: var(--ok); }
.badge.risk-low { background: rgba(232, 197, 71, .12); color: var(--low); }
.badge.risk-warn { background: rgba(245, 158, 66, .13); color: var(--warn); }
.badge.risk-high { background: rgba(242, 84, 91, .14); color: #ff7a80; }
.badge.risk-crit { background: rgba(255, 45, 111, .18); color: #ff5c8d; border-color: rgba(255, 45, 111, .35); }
.badge.role { background: var(--accent-soft); color: var(--accent-2); margin-left: 0; }
.badge.role-owner { background: rgba(255, 196, 0, .12); color: #ffd25e; }
.badge.role-management { background: rgba(157, 99, 255, .18); color: #c9a6ff; }
.badge.role-admin { background: rgba(242, 84, 91, .13); color: #ff8b90; }
.badge.role-moderator { background: rgba(90, 169, 255, .13); color: #8ec4ff; }
.badge.role-viewer { background: var(--surface-3); color: var(--text-2); }
.badge.cmd-pending, .badge.cmd-sent { background: rgba(245, 158, 66, .13); color: var(--warn); }
.badge.cmd-done { background: rgba(52, 211, 153, .12); color: var(--ok); }
.badge.cmd-failed { background: rgba(242, 84, 91, .14); color: #ff7a80; }
.risk-cell { white-space: nowrap; }
.riskbar { display: inline-block; width: 70px; height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; vertical-align: middle; margin-right: 6px; }
.riskbar-fill { display: block; height: 100%; border-radius: 4px; }
.riskbar-fill.risk-ok { background: var(--ok); } .riskbar-fill.risk-low { background: var(--low); } .riskbar-fill.risk-warn { background: var(--warn); }
.riskbar-fill.risk-high { background: var(--high); } .riskbar-fill.risk-crit { background: var(--crit); }

.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); font-size: 12px; color: var(--text-2); }
.chip b { color: var(--text); font-variant-numeric: tabular-nums; }
.chip-hot { background: rgba(242, 84, 91, .13); color: #ff9da1; }

.risk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.risk-list li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.risk-list li:last-child { border-bottom: 0; }
.risk-list .player-link { flex: 1; min-width: 0; }
.risk-list .riskbar { width: 90px; }
.empty { color: var(--muted); text-align: center; padding: 18px 0; margin: 0; }

/* ---------------------------------------------------------------- Feed */
.feed { list-style: none; margin: 0; padding: 0; max-height: 470px; overflow-y: auto; }
.feed-item { display: grid; grid-template-columns: 62px 1fr auto; gap: 12px; align-items: start; padding: 10px 10px 10px 12px; border-left: 3px solid var(--border); border-radius: 4px; margin-bottom: 4px; }
.feed-item:hover { background: rgba(255, 255, 255, .02); }
.feed-item.enter { animation: slidein .4s ease; }
@keyframes slidein { from { background: var(--accent-soft); transform: translateX(-6px); opacity: 0; } to { opacity: 1; } }
.risk-edge-low { border-left-color: var(--low); } .risk-edge-warning { border-left-color: var(--warn); }
.risk-edge-high { border-left-color: var(--high); } .risk-edge-critical { border-left-color: var(--crit); }
.feed-punish { border-left-color: var(--crit); background: rgba(255, 45, 111, .05); }
.feed-time { font-family: var(--mono); font-size: 11.5px; color: var(--muted); padding-top: 2px; }
.feed-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feed-check { font-weight: 650; color: var(--accent-2); }
.feed-reason { color: var(--text-2); font-size: 12.5px; margin-top: 2px; }
.feed-meta { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; font-variant-numeric: tabular-nums; }
.feed-meta .vl { font-weight: 650; }
.feed-meta .conf { color: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--high); animation: pulse-red 1.6s infinite; }
@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(242, 84, 91, .55); } 70% { box-shadow: 0 0 0 7px rgba(242, 84, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(242, 84, 91, 0); } }

/* ---------------------------------------------------------------- Key/Value */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 18px; margin: 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv.compact { gap: 3px 12px; font-size: 12px; }
.kv.inline { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 10px; }
.kv.inline dt::after { content: ":"; }
.kv.inline dd { margin-right: 14px; white-space: nowrap; }
.kv.mono-vals dd { font-family: var(--mono); font-size: 12px; }

.explain { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; color: var(--text-2); }
.explain li::marker { color: var(--accent-2); font-weight: 700; }
.detail-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 24px; }
.normal-share { display: flex; flex-direction: column; gap: 7px; }
.ns { display: grid; grid-template-columns: 92px 1fr 48px; gap: 10px; align-items: center; font-size: 12.5px; }
.ns b { text-align: right; font-variant-numeric: tabular-nums; }
.ns-track { height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.ns-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), #6ee7b7); border-radius: 4px; }

.verdict { display: grid; grid-template-columns: minmax(260px, 1fr) 1.4fr; gap: 28px; }
.verdict h3 { margin-top: 4px; }
.verdict p { color: var(--text-2); }

/* ---------------------------------------------------------------- Diagramme */
.chart-wrap { width: 100%; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 4; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .bar { transition: opacity .15s; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .hit:hover + .bar, .chart .bar:hover { opacity: .8; }
.chart .line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .cursor { stroke: var(--border-strong); stroke-width: 1; opacity: 0; }
.chart .cursor.show { opacity: 1; }
.chart .dot { stroke: var(--surface); stroke-width: 2; opacity: 0; }
.chart .dot.show { opacity: 1; }
.c-accent { fill: var(--accent); stroke: var(--accent); }
.c-red { fill: var(--high); stroke: var(--high); }
.c-blue { fill: var(--blue); stroke: var(--blue); }
.c-green { fill: var(--ok); stroke: var(--ok); }
.c-orange { fill: var(--warn); stroke: var(--warn); }
polyline.line { fill: none !important; }
.stop-accent { stop-color: var(--accent); stop-opacity: .35; }
.stop-red { stop-color: var(--high); stop-opacity: .3; }
.stop-blue { stop-color: var(--blue); stop-opacity: .3; }
.stop-green { stop-color: var(--ok); stop-opacity: .25; }
.stop-end { stop-opacity: 0; }
.legend { display: flex; gap: 16px; justify-content: center; font-size: 12px; color: var(--text-2); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend .sw.c-accent { background: var(--accent); } .legend .sw.c-red { background: var(--high); } .legend .sw.c-blue { background: var(--blue); } .legend .sw.c-green { background: var(--ok); }
.chart-tip {
  position: fixed; z-index: 100; pointer-events: none; opacity: 0; transition: opacity .1s; background: #1f1c29; border: 1px solid var(--border-strong);
  border-radius: 8px; padding: 7px 10px; font-size: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); color: var(--text-2);
}
.chart-tip.show { opacity: 1; }
.chart-tip strong { color: var(--text); display: block; }
.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.hbars li { display: grid; grid-template-columns: 110px 1fr 46px; gap: 10px; align-items: center; font-size: 12.5px; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.hbar-track { height: 8px; background: var(--surface-3); border-radius: 5px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #7c4ddb, var(--accent-2)); }
.hbar-val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.gauge-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.gauge-bg { fill: none; stroke: var(--surface-3); stroke-width: 9; }
.gauge-fg { fill: none !important; stroke-width: 9; stroke-linecap: round; transition: stroke-dasharray .5s; }
.gauge-val { fill: var(--text); font: 700 19px var(--font); }

/* ---------------------------------------------------------------- Profil */
.profile-head { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.profile-head > .head { width: 72px; height: 72px; border-radius: 12px; box-shadow: 0 0 0 1px var(--border-strong); }
.profile-head.small > .head { width: 56px; height: 56px; }
.profile-id { flex: 1; min-width: 240px; }
.profile-name { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.profile-name h2 { font-size: 22px; }
.uuid { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px 0; }
.uuid:hover { color: var(--text); }
.uuid .icon { width: 14px; height: 14px; }
.profile-risk { display: flex; gap: 18px; align-items: center; }
.risk-meta { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; font-size: 12px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: -4px -4px 16px; overflow-x: auto; }
.tab {
  background: none; border: 0; color: var(--muted); font: 600 13px var(--font); padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent;
  display: inline-flex; gap: 8px; align-items: center; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tab-count { background: var(--surface-3); border-radius: 10px; padding: 0 7px; font-size: 11px; color: var(--text-2); }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 13px; max-height: 520px; overflow-y: auto; }
.timeline li { display: grid; grid-template-columns: 140px 100px 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.tl-time { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.tl-type { color: var(--accent-2); font-weight: 600; font-size: 12px; }
.tl-warn .tl-type { color: var(--warn); }
.notes { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 10px; }
.notes li { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.notes p { margin: 6px 0 0; white-space: pre-wrap; color: var(--text-2); }
.note-head { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.note-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }

/* ---------------------------------------------------------------- Konsole */
.page-console { height: calc(100vh - 116px); }
.console {
  flex: 1; min-height: 320px; overflow-y: auto; background: #08070b; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 0; font: 12.5px/1.6 var(--mono);
}
.cl { display: flex; gap: 12px; padding: 1px 16px; align-items: baseline; }
.cl:hover { background: rgba(255, 255, 255, .03); }
.cl-time { color: #5d5768; flex: none; }
.cl-type { color: var(--muted); width: 88px; flex: none; text-transform: uppercase; font-size: 11px; letter-spacing: .04em; }
.cl-name { color: var(--accent-2); flex: none; }
.cl-text { color: #cfcad9; word-break: break-word; }
.cl-warn .cl-text { color: #ffb37a; }
.ct-violation .cl-type { color: var(--warn); }
.ct-punishment .cl-type, .ct-punishment .cl-text { color: #ff6b8f; }
.ct-join .cl-type { color: var(--ok); }
.ct-quit .cl-type { color: #6b6578; }
.ct-alert .cl-type, .ct-observe .cl-type { color: var(--high); }
.ct-settings .cl-type, .ct-system .cl-type, .ct-backup .cl-type { color: var(--blue); }
.cl-empty { color: var(--muted); justify-content: center; padding: 20px; }

/* ---------------------------------------------------------------- Checks */
.check-cat { display: flex; flex-direction: column; gap: 12px; margin-bottom: 10px; }
.cat-title { display: flex; align-items: baseline; gap: 10px; font-size: 16px; }
.cat-title .muted { font-size: 12px; font-weight: 500; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.check-card { background: linear-gradient(180deg, var(--surface), #131119); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: border-color .2s; }
.check-card:hover { border-color: var(--border-strong); }
.check-card.off { opacity: .72; border-style: dashed; }
.check-card header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.check-card h3 { color: var(--text); font-size: 14.5px; margin-bottom: 6px; }
.check-card p { margin: 0; }
.check-card footer { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }

/* ---------------------------------------------------------------- Einstellungen */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 18px; margin-bottom: 18px; }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.setting:last-child { border-bottom: 0; }
.setting.changed { box-shadow: inset 3px 0 0 var(--accent); padding-left: 12px; margin-left: -12px; }
.setting-label { display: flex; flex-direction: column; min-width: 0; }
.setting-label code { font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.setting-input { display: flex; align-items: center; gap: 10px; flex: none; }
.num-input { width: 110px; text-align: right; }
.range { color: var(--muted); font-size: 11px; width: 80px; }
.savebar {
  position: sticky; bottom: 18px; z-index: 15; display: flex; align-items: center; gap: 12px; justify-content: flex-end;
  background: rgba(27, 25, 36, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 12px 16px; box-shadow: 0 12px 34px rgba(0, 0, 0, .55);
}
.savebar > span { margin-right: auto; font-weight: 600; }
.action-list { display: flex; flex-direction: column; }
.action { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.action:last-child { border-bottom: 0; }
.action p { margin: 2px 0 0; }

/* ---------------------------------------------------------------- Staff */
.perm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; padding: 12px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; }
.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 12px; }
.role-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.role-card p { margin: 8px 0 0; color: var(--text-2); }
.role-help { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12px; margin: 0; color: var(--muted); }
.role-help dt { color: var(--text-2); font-weight: 600; }
.role-help dd { margin: 0; }
.lookup { display: flex; gap: 14px; align-items: center; padding: 12px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; }
.lookup .head { width: 48px; height: 48px; }
.lookup > div { display: flex; flex-direction: column; gap: 2px; }
.steps { display: flex; gap: 8px; padding: 0; margin: 0; list-style: none; counter-reset: s; flex-wrap: wrap; }
.steps li { counter-increment: s; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.steps li::before { content: counter(s); width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; font-weight: 700; font-size: 11px; }
.steps li:not(:last-child)::after { content: "›"; margin-left: 4px; }
.linkbox { display: flex; flex-direction: column; gap: 10px; }
.linkbox input { font-size: 12px; }
.cmd-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.cmd-list li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Hinweise, leere Zustände */
.notice { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 10px; font-size: 13px; border: 1px solid; }
.notice.warn { background: rgba(245, 158, 66, .08); border-color: rgba(245, 158, 66, .3); color: #ffc58a; }
.notice.bad { background: rgba(242, 84, 91, .08); border-color: rgba(242, 84, 91, .3); color: #ff9da1; }
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 60px 20px; color: var(--muted); }
.empty-state .icon { width: 40px; height: 40px; color: var(--accent-2); }
.empty-state h2 { color: var(--text); font-size: 18px; }

/* ---------------------------------------------------------------- Dialoge */
.modal {
  border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); color: var(--text); padding: 0;
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
}
.modal.wide { width: min(680px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(5, 4, 8, .72); backdrop-filter: blur(3px); }
.modal[open] { animation: pop .18s ease; display: flex; flex-direction: column; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 0 22px; }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 16px 22px; overflow-y: auto; }
.modal-body > p { color: var(--text-2); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 18px; border-top: 1px solid var(--border); }

/* ---------------------------------------------------------------- Toasts */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 40px)); }
.toast {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: #1f1c29; border: 1px solid var(--border-strong);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .55); font-size: 13px; animation: toastin .25s ease; transition: opacity .4s, transform .4s;
}
.toast.out { opacity: 0; transform: translateX(20px); }
.toast-ok .icon { color: var(--ok); } .toast-error .icon { color: var(--high); } .toast-info .icon { color: var(--blue); }
.toast-error { border-color: rgba(242, 84, 91, .4); }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- Login */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; gap: 18px; }
.auth-card {
  width: min(400px, 100%); background: linear-gradient(180deg, var(--surface), #121018); border: 1px solid var(--border); border-radius: 16px;
  padding: 30px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(157, 99, 255, .06); display: flex; flex-direction: column; gap: 16px;
}
.auth-card .brand { padding: 0 0 6px; }
.auth-card h1 { font-size: 20px; }
.auth-foot { color: var(--muted); font-size: 12px; text-align: center; max-width: 380px; }

/* ---------------------------------------------------------------- Responsiv */
@media (max-width: 1400px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1200px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .hide-md { display: none; }
}
@media (max-width: 960px) {
  #shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; width: var(--sidebar); transform: translateX(-100%); transition: transform .22s ease; }
  #shell.nav-open .sidebar { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .6); }
  #shell.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .55); }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 16px; }
  #main { padding: 20px 16px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .verdict { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px; gap: 10px; }
  .stat-ico { display: none; }
  .stat-value { font-size: 20px; }
  .hide-sm { display: none; }
  .user-name, .user .badge, .conn span { display: none; }
  .conn { padding: 6px; }
  .search { width: 100%; }
  .toolbar > * { flex: 1 1 140px; }
  .toolbar-right { margin-left: 0; width: 100%; }
  .detail-grid { grid-template-columns: 1fr; }
  .profile-risk { width: 100%; justify-content: space-around; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .perm-grid { grid-template-columns: 1fr; }
  .setting { flex-direction: column; align-items: flex-start; gap: 8px; }
  .page-console { height: calc(100vh - 100px); }
  .cl { flex-wrap: wrap; gap: 4px 10px; }
  .cl-type { width: auto; }
  .feed-item { grid-template-columns: 1fr auto; }
  .feed-time { grid-column: 1 / -1; padding: 0; }
  .hbars li { grid-template-columns: 90px 1fr 40px; }
  .chart .axis { font-size: 19px; }
  .risk-cell .badge { display: none; }
  .table td, .table th { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
