/* ACP – Admin-Control-Panel */

:root {
  --bg: #070c1a;
  --bg-2: #0b1226;
  --surface: #0f1830;
  --surface-2: #142040;
  --surface-3: #1a2850;
  --border: rgba(148, 170, 255, 0.09);
  --border-strong: rgba(148, 170, 255, 0.18);
  --text: #e6ebff;
  --text-2: #a4afd0;
  --text-3: #6c789c;
  --brand: #3b6cff;
  --brand-2: #7fd4ff;
  --brand-soft: rgba(59, 108, 255, 0.14);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, 0.13);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.13);
  --bad: #f87171;
  --bad-soft: rgba(248, 113, 113, 0.13);
  --info: #a78bfa;
  --info-soft: rgba(167, 139, 250, 0.14);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --radius: 14px;
  --radius-sm: 9px;
  --mono: "JetBrains Mono", "Cascadia Code", "Fira Code", ui-monospace, Consolas, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --console-bg: #050914;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #eef2fb;
  --bg-2: #e6ebf7;
  --surface: #ffffff;
  --surface-2: #f4f6fc;
  --surface-3: #e9eefa;
  --border: rgba(20, 35, 90, 0.08);
  --border-strong: rgba(20, 35, 90, 0.16);
  --text: #121a33;
  --text-2: #4b587c;
  --text-3: #8590ad;
  --brand-soft: rgba(59, 108, 255, 0.1);
  --ok: #059669;
  --ok-soft: rgba(5, 150, 105, 0.1);
  --warn: #b7791f;
  --warn-soft: rgba(217, 119, 6, 0.1);
  --bad: #dc2626;
  --bad-soft: rgba(220, 38, 38, 0.08);
  --info: #7c3aed;
  --info-soft: rgba(124, 58, 237, 0.1);
  --shadow: 0 10px 30px -14px rgba(20, 35, 90, 0.25);
  --console-bg: #0a1022;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(59, 108, 255, 0.16), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(127, 212, 255, 0.08), transparent 60%);
  pointer-events: none;
  z-index: -1;
}
a { color: var(--brand-2); text-decoration: none; }
:root[data-theme="light"] a { color: var(--brand); }
a:hover { text-decoration: underline; }
a:not([href]) { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: 24px; }
h2 { font-size: 17px; }
h3 { font-size: 14px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
::selection { background: rgba(59, 108, 255, 0.35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 15px; height: 15px; }
svg.i.lg { width: 22px; height: 22px; }

/* ------------------------------------------------------------ Layout */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-right: 1px solid var(--border);
  padding: 18px 14px;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 6px 18px -6px rgba(59,108,255,.6); }
.brand b { display: block; font-size: 15px; letter-spacing: .01em; }
.brand span { font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; }
.nav-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .09em; padding: 14px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px; margin: 1px 0;
  border-radius: 9px;
  color: var(--text-2);
  font-weight: 500;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--brand-soft); color: var(--text); box-shadow: inset 2px 0 0 var(--brand); }
.nav a.active svg { color: var(--brand-2); }
:root[data-theme="light"] .nav a.active svg { color: var(--brand); }
.nav .badge { margin-left: auto; }
.nav .dot { margin-left: auto; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.sidebar-foot .who { flex: 1; min-width: 0; }
.sidebar-foot .who b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .who a { font-size: 12px; color: var(--text-3); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 28px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar .search { flex: 1; max-width: 420px; position: relative; }
.topbar .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.topbar .search input { padding-left: 36px; }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; }
.content { padding: 26px 28px 60px; width: 100%; }

.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .titles { flex: 1; min-width: 220px; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------ Bausteine */
.card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, white 4%), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
}
:root[data-theme="light"] .card { background: var(--surface); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 15px 18px 0; }
.card-head h2 { flex: 1; font-size: 15px; display: flex; align-items: center; gap: 9px; }
.card-head h2 svg { color: var(--text-3); }
.card-body { padding: 15px 18px 18px; }
.card-body.flush { padding: 10px 0 4px; }

.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt { margin-top: 14px; }
.hidden { display: none !important; }

/* Kennzahlen */
.stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.stat .label { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.stat .label svg { color: var(--text-3); }
.stat .value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.stat .value small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.stat .sub { font-size: 12px; color: var(--text-3); }
.stat .spark { position: absolute; right: 0; bottom: 0; left: 0; height: 44px; opacity: .9; pointer-events: none; }
a.stat:hover { text-decoration: none; border-color: var(--border-strong); }
a.stat { color: inherit; }

.bar { height: 7px; border-radius: 10px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .4s; }
.bar.warn > i { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.bar.bad > i { background: linear-gradient(90deg, #ef4444, #f87171); }

/* Status */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.brand { background: var(--brand-soft); color: var(--brand-2); }
:root[data-theme="light"] .pill.brand { color: var(--brand); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: pulse 2.2s infinite; }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.55); } 70% { box-shadow: 0 0 0 7px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700; }
.badge.bad { background: var(--bad); }
.tag { display: inline-flex; padding: 1px 8px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 500; }

/* Formulare */
input, select, textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input[type="checkbox"] { width: auto; accent-color: var(--brand); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
label.check { display: flex; align-items: center; gap: 8px; color: var(--text-2); cursor: pointer; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form .row > * { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 600; font-size: 13px;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s, opacity .15s;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, var(--brand), #5a85ff); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -8px rgba(59,108,255,.8); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.btn.ok:hover { background: color-mix(in srgb, var(--ok) 22%, transparent); }
.btn.danger { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 22%, transparent); }
.btn.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.icon { padding: 7px; }
.btn.sm.icon { padding: 5px; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tabs a, .tabs button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border: 0; background: none; cursor: pointer;
  color: var(--text-2); font: inherit; font-weight: 600;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs a:hover, .tabs button:hover { color: var(--text); text-decoration: none; }
.tabs .active { color: var(--text); border-bottom-color: var(--brand); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; color: var(--text-2); font: inherit; font-weight: 600; font-size: 12.5px; padding: 5px 12px; border-radius: 7px; cursor: pointer; }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.25); }

/* Tabellen */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; padding: 8px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
tr.click { cursor: pointer; }
.empty { padding: 34px 18px; text-align: center; color: var(--text-3); }
.empty svg { width: 34px; height: 34px; margin-bottom: 8px; opacity: .6; }

/* Spieler */
.avatar { width: 28px; height: 28px; border-radius: 7px; image-rendering: pixelated; background: var(--surface-3); flex: none; }
.avatar.md { width: 40px; height: 40px; border-radius: 9px; }
.avatar.lg { width: 84px; height: 84px; border-radius: 16px; box-shadow: var(--shadow); }
.player-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.player-cell b { font-weight: 600; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 18px; }
.kv dt { color: var(--text-3); font-size: 12.5px; }
.kv dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }

/* Server-Karten */
.server-card { padding: 18px; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.server-card .top { display: flex; align-items: center; gap: 12px; }
.server-card .icon-box { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-2); }
:root[data-theme="light"] .server-card .icon-box { color: var(--brand); }
.server-card .name { flex: 1; min-width: 0; }
.server-card .name b { font-size: 16px; display: block; }
.server-card .name span { font-size: 12px; color: var(--text-3); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.metric { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; }
.metric span { display: block; font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.metric b { font-size: 16px; font-weight: 700; }
.metric b small { font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.tps-good { color: var(--ok); }
.tps-mid { color: var(--warn); }
.tps-bad { color: var(--bad); }

.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); margin-bottom: 18px; font-weight: 500; }
.banner.info { background: var(--brand-soft); color: var(--text); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.banner.bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.banner .grow { color: inherit; }

/* Konsole */
.console {
  background: var(--console-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
}
.console-bar { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.02); color: #a4afd0; }
.console-bar .lights { display: flex; gap: 6px; }
.console-bar .lights i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.console-bar .lights i:nth-child(2) { background: #febc2e; }
.console-bar .lights i:nth-child(3) { background: #28c840; }
.console-bar input { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); color: #e6ebff; padding: 5px 10px; font-size: 12.5px; max-width: 220px; }
.console-bar .btn { background: rgba(255,255,255,.05); color: #c8d0ee; border-color: rgba(255,255,255,.08); }
.console-out {
  height: calc(100vh - 330px); min-height: 340px;
  overflow-y: auto; padding: 12px 14px;
  font: 12.5px/1.55 var(--mono); color: #cdd6f4;
  white-space: pre-wrap; word-break: break-word;
}
.console-out .ln { padding: 0 4px; border-radius: 3px; }
.console-out .ln:hover { background: rgba(255,255,255,.035); }
.console-out .ln.warn { color: #fbd38d; }
.console-out .ln.error { color: #fca5a5; background: rgba(248,113,113,.06); }
.console-out .ln.cmd { color: #7fd4ff; font-weight: 600; margin-top: 4px; }
.console-out .ln.reply { color: #e6ebff; border-left: 2px solid rgba(127,212,255,.4); padding-left: 10px; }
.console-out .ln.sys { color: #6c789c; font-style: italic; }
.console-out .t { color: #6c789c; }
.console-out .lvl-info { color: #7aa2ff; }
.console-out .lvl-warn { color: #fbbf24; }
.console-out .lvl-error { color: #f87171; }
.console-in { display: flex; align-items: center; gap: 8px; border-top: 1px solid rgba(255,255,255,.06); padding: 8px 12px; background: rgba(255,255,255,.02); }
.console-in .prompt { color: #34d399; font: 600 14px var(--mono); }
.console-in input { background: transparent; border: 0; box-shadow: none; color: #e6ebff; font: 13px var(--mono); padding: 6px 2px; }
.console-in input:focus { box-shadow: none; }
.viewer { height: calc(100vh - 300px); min-height: 300px; }

/* Minecraft-Farben */
.mc-0 { color: #000; } .mc-1 { color: #2a2aaa; } .mc-2 { color: #22aa22; } .mc-3 { color: #22aaaa; }
.mc-4 { color: #cc3333; } .mc-5 { color: #aa22aa; } .mc-6 { color: #ffaa00; } .mc-7 { color: #b8b8b8; }
.mc-8 { color: #6f6f6f; } .mc-9 { color: #6a7dff; } .mc-a { color: #55ff55; } .mc-b { color: #55ffff; }
.mc-c { color: #ff6b6b; } .mc-d { color: #ff77ff; } .mc-e { color: #ffff66; } .mc-f { color: #ffffff; }
.mc-l { font-weight: 700; } .mc-o { font-style: italic; } .mc-n { text-decoration: underline; } .mc-m { text-decoration: line-through; }
.chat-preview { background: #1e1e1e; border-radius: 8px; padding: 10px 12px; font: 13px var(--mono); color: #fff; min-height: 40px; }

/* Inventar */
.inv { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.inv-grid { display: grid; grid-template-columns: repeat(9, 44px); gap: 4px; }
.inv-grid.col { grid-template-columns: 44px; }
.inv-gap { height: 8px; grid-column: 1 / -1; }
.slot { width: 44px; height: 44px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border-strong); position: relative; display: grid; place-items: center; }
.slot img { width: 32px; height: 32px; image-rendering: pixelated; }
.slot .fallback { display: none; font: 700 11px var(--mono); color: var(--text-2); }
.slot.noicon .fallback { display: block; }
.slot b { position: absolute; right: 3px; bottom: 1px; font: 700 12px var(--mono); color: #fff; text-shadow: 1px 1px 0 #000; }
.slot .dura { position: absolute; left: 5px; bottom: 4px; height: 3px; border-radius: 2px; max-width: 34px; }
.slot.ench { box-shadow: inset 0 0 12px rgba(167, 139, 250, .45); border-color: rgba(167, 139, 250, .5); }
.slot.filled:hover { border-color: var(--brand); }

/* Chat */
.chat-list { font-size: 13.5px; }
.chat-line { display: flex; gap: 10px; align-items: flex-start; padding: 7px 18px; border-bottom: 1px solid var(--border); }
.chat-line:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.chat-line.focus { background: var(--brand-soft); }
.chat-line .time { color: var(--text-3); font: 12px var(--mono); white-space: nowrap; padding-top: 2px; }
.chat-line .who { font-weight: 600; white-space: nowrap; }
.chat-line .msg { flex: 1; overflow-wrap: anywhere; }

/* Karte */
.map-wrap { position: relative; height: calc(100vh - 210px); min-height: 420px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #0b1324; }
.map-wrap canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.map-wrap canvas.drag { cursor: grabbing; }
.map-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 9px; padding: 7px 10px; font-size: 12.5px; box-shadow: var(--shadow); white-space: nowrap; z-index: 2; }
.map-info { position: absolute; left: 12px; bottom: 12px; font: 12px var(--mono); color: #a4afd0; background: rgba(5,9,20,.7); padding: 4px 8px; border-radius: 6px; }
.map-tools { position: absolute; right: 12px; top: 12px; display: flex; gap: 6px; }
.map-side { position: absolute; right: 12px; top: 56px; width: 280px; z-index: 3; }

/* Bewerbungen */
.app-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.app-card .answer { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Charts */
.chart { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart text { fill: var(--text-3); font-size: 11px; font-family: var(--sans); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

/* Overlays */
.modal-back { position: fixed; inset: 0; background: rgba(3, 6, 16, .62); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .15s; }
.modal { width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 18px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); animation: pop .18s; max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 4px; }
.modal-head h2 { flex: 1; }
.modal-body { padding: 14px 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 200; max-width: min(420px, calc(100vw - 40px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); animation: pop .2s; }
.toast.ok svg { color: var(--ok); }
.toast.bad svg { color: var(--bad); }
.toast .out { margin-top: 6px; font: 12px/1.5 var(--mono); color: var(--text-2); white-space: pre-wrap; }
.menu { position: absolute; z-index: 60; min-width: 190px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; animation: pop .12s; }
.menu button { display: flex; width: 100%; align-items: center; gap: 9px; padding: 8px 10px; background: none; border: 0; color: var(--text); font: inherit; border-radius: 8px; cursor: pointer; text-align: left; }
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--bad); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 5px 2px; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login { width: 100%; max-width: 410px; padding: 34px 32px 28px; }
.login .logo { width: 64px; height: 64px; border-radius: 18px; display: block; margin: 0 auto 18px; box-shadow: 0 14px 34px -12px rgba(59,108,255,.8); }
.login h1 { text-align: center; font-size: 22px; }
.login p.lead { text-align: center; color: var(--text-2); margin: 6px 0 24px; }
.login .hint { margin-top: 20px; padding: 12px 14px; border-radius: 11px; background: var(--surface-2); color: var(--text-2); font-size: 12.5px; display: flex; gap: 10px; }
.login .error { color: var(--bad); font-size: 13px; min-height: 18px; }
.strength { display: flex; gap: 4px; }
.strength i { flex: 1; height: 4px; border-radius: 3px; background: var(--surface-3); }
.strength.s1 i:nth-child(-n+1) { background: var(--bad); }
.strength.s2 i:nth-child(-n+2) { background: var(--warn); }
.strength.s3 i:nth-child(-n+3) { background: #a3e635; }
.strength.s4 i:nth-child(-n+4) { background: var(--ok); }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--brand); animation: spin .7s linear infinite; }
.loading { display: grid; place-items: center; padding: 60px; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------------------ Responsiv */
@media (max-width: 1200px) {
  .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .g3 { grid-template-columns: 1fr; }
  .g2 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 50; width: 260px; left: 0; transform: translateX(-100%); transition: transform .2s; }
  .app.nav-open .sidebar { transform: none; box-shadow: 20px 0 50px rgba(0,0,0,.5); }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 10px 16px; }
  .content { padding: 18px 16px 50px; }
  .g6, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .console-out { height: calc(100vh - 300px); }
}
@media (max-width: 520px) {
  .g6, .g4 { grid-template-columns: 1fr; }
  .topbar .search { display: none; }
}

/* MOTD */
.mc-list { background: #0f0f0f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Crect width='8' height='8' fill='%23141414'/%3E%3Crect width='4' height='4' fill='%23101010'/%3E%3C/svg%3E"); border-radius: 10px; padding: 14px; }
.mc-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px; border: 1px solid transparent; border-radius: 4px; max-width: 620px; }
.mc-row:hover { border-color: #808080; background: rgba(255,255,255,.04); }
.mc-row img { width: 64px; height: 64px; image-rendering: pixelated; border-radius: 2px; flex: none; }
.mc-text { flex: 1; min-width: 0; }
.mc-name { color: #fff; font: 15px/1.35 var(--mono); }
.mc-motd, .mc-mini { font: 15px/1.35 var(--mono); color: #aaa; white-space: pre; overflow: hidden; text-shadow: 2px 2px 0 rgba(0,0,0,.6); }
.mc-mini { background: #101010; border-radius: 6px; padding: 8px 10px; font-size: 13px; }
/* Zentrierte MOTD: Minecraft zentriert innerhalb von ca. 45 Zeichen Breite */
.mc-motd.center { width: 45ch; max-width: 100%; text-align: center; }
.mc-mini.center { width: calc(45ch + 20px); max-width: 100%; text-align: center; }
.mc-count { font: 15px var(--mono); display: flex; align-items: center; gap: 6px; white-space: nowrap; cursor: help; }
.mc-bars { display: inline-flex; align-items: flex-end; gap: 1px; height: 14px; margin-left: 4px; }
.mc-bars i { width: 3px; background: #34d399; }
.mc-bars i:nth-child(1) { height: 3px; } .mc-bars i:nth-child(2) { height: 5px; } .mc-bars i:nth-child(3) { height: 8px; } .mc-bars i:nth-child(4) { height: 11px; } .mc-bars i:nth-child(5) { height: 14px; }
.motd-entry { border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.motd-line { display: flex; align-items: center; gap: 8px; }
.motd-line input { font-size: 12.5px; }
.motd-line span { width: 26px; text-align: right; }
