/* TS6 World Admin – gleiche Farbwelt wie das HUD der 3D-Welt */
:root {
  --bg: #0b1630; --panel: #12295c; --panel-2: #183474; --line: #2f5bb5; --ink: #eef3ff; --muted: #9db2df;
  --accent: #3cc8f5; --ok: #5fd38d; --bad: #ff6b6b; --warn: #ffc65c;
  --ui: "Rubik", "Segoe UI", "Noto Sans", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--ui); }
a { color: var(--accent); }
.wrap { max-width: 1600px; margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
.top { background: var(--panel); border-bottom: 1px solid var(--line); }
.top-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding-block: 12px; }
.brand { font-weight: 700; letter-spacing: .08em; color: var(--ink); text-decoration: none; }
.brand b { color: var(--accent); }
.brand span { font-weight: 500; letter-spacing: 0; color: var(--muted); margin-left: 6px; }
nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
nav a { color: var(--ink); text-decoration: none; padding: 6px 10px; border-radius: 6px; }
nav a:hover, nav a.on { background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }
/* Menü in Gruppen: Dein Hochhaus · Öffentliche Liste · 3D-Stadt · Einstellungen · Ansehen – eigene Zeile unter Logo und Abmelden */
.top-in > nav { order: 3; flex-basis: 100%; }
.top-in > .logout { margin-left: auto; }
.nav-group { display: flex; flex-direction: column; gap: 2px; padding-right: 10px; margin-right: 6px; border-right: 1px solid var(--line); }
.nav-group:last-child { border-right: 0; }
.nav-label { padding: 0 10px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nav-links { display: flex; flex-wrap: wrap; gap: 2px; }
.logout { margin: 0; }
button.link { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 6px 0; }
button.link:hover { color: var(--ink); }
main.wrap { padding-block: 24px 40px; display: grid; gap: 20px; }
h1 { margin: 0; font-size: 26px; text-wrap: balance; }
h2 { margin: 0 0 12px; font-size: 17px; }
.page-head, .card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2 { margin: 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; min-width: 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: grid; gap: 2px; }
.tile .k { color: var(--muted); font-size: 13px; }
.tile .v { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile small { font-size: 16px; color: var(--muted); font-weight: 500; }
a.tile { color: var(--ink); text-decoration: none; }
a.tile:hover { border-color: var(--accent); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid rgba(47, 91, 181, .5); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.floor { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); }
td.actions { display: flex; flex-wrap: wrap; gap: 6px; }
td.actions form { display: contents; }
.muted { color: var(--muted); }
.small { font-size: 13px; margin: 12px 0 0; }
.pill { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; border: 1px solid; white-space: nowrap; }
.pill.ok { color: var(--ok); }
.pill.bad { color: var(--bad); }
.pill.warn { color: var(--warn); }
.must { color: var(--bad); font-weight: 700; }
.pill.off { color: var(--muted); }
.pill.live { color: var(--accent); margin-top: 4px; }
.small-inline { font-size: 12px; display: inline-block; margin-top: 4px; max-width: 260px; overflow-wrap: anywhere; }
.btn, button.btn { display: inline-block; font: 500 14px var(--ui); color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 14px; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.primary, button.primary { background: var(--accent); color: #06203f; border-color: var(--accent); font-weight: 700; }
.btn.danger { color: var(--bad); border-color: rgba(255, 107, 107, .6); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.flash { margin: 0; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--ok); color: var(--ok); background: rgba(95, 211, 141, .08); overflow-wrap: anywhere; }
.flash.error { border-color: var(--bad); color: var(--bad); background: rgba(255, 107, 107, .08); }
.form fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.form legend { font-weight: 700; margin-bottom: 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 18px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input, select, textarea { width: 100%; font: 15px var(--ui); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
input[type=checkbox], input[type=radio] { width: auto; }
.check { display: flex; align-items: center; gap: 8px; align-self: end; padding-bottom: 8px; }
.check label { margin: 0; color: var(--ink); font-size: 14px; }
.check.inline { padding: 6px 0 0; }
.field-error { display: block; color: var(--bad); font-size: 13px; margin-top: 4px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
code { background: var(--bg); padding: 1px 5px; border-radius: 4px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs a { color: var(--ink); text-decoration: none; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); font-size: 14px; }
.tabs a.on { border-color: var(--accent); background: var(--panel-2); }
/* Reiter oben auf langen Seiten (Erlaubnis) – etwas größer als die Filter darunter */
.page-tabs a { font-size: 15px; padding: 8px 16px; }
.page-tabs a.on { font-weight: 700; }
/* Lange Tabellen: eigene Scroll-Leiste, die Überschrift bleibt oben stehen */
.table-scroll.tall { max-height: 65vh; overflow-y: auto; }
.table-scroll.tall thead th { position: sticky; top: 0; z-index: 1; background: var(--panel); }
/* Erlaubnis: Server-Haken nur wichtig, wenn „Alle“ gewählt ist */
.server-picks { padding-left: 26px; }
.form:has(#mode-all:not(:checked)) .server-picks { opacity: .55; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; max-width: 75ch; }
.radios { display: grid; gap: 2px; margin: 0 0 14px; }
.radios .check { padding-bottom: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.todo { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 60vh; overflow-y: auto; background: var(--bg); border-radius: 8px; padding: 12px 14px; }
.todo b { color: var(--accent, var(--ink)); }
.todo-red { color: var(--bad); font-weight: 600; }
.text-block { border-top: 1px solid rgba(47, 91, 181, .5); padding: 10px 0; }
.text-block summary { cursor: pointer; font-weight: 700; padding: 4px 0 10px; }
/* Vorschau wie im Chat-Fenster des TS3-Clients (heller Hintergrund) */
.ts-preview { margin-top: 8px; background: #f3f5f9; color: #1d222b; border-radius: 6px; padding: 8px 10px; font: 13px/1.45 "Segoe UI", Arial, sans-serif; overflow-wrap: anywhere; }
.ts-preview .ts-meta { color: #5a6475; display: block; margin-bottom: 2px; }
.ts-preview .ts-meta b { color: #1f5fbf; }
.ts-preview a { color: #1f5fbf; }
button[disabled] { opacity: .5; cursor: not-allowed; }
.chart { overflow-x: auto; }
svg.bars { width: 100%; min-width: 520px; height: auto; display: block; }
svg.bars .grid { stroke: rgba(157, 178, 223, .2); }
svg.bars .axis { fill: var(--muted); font: 11px var(--ui); }
svg.bars .avg { fill: var(--accent); opacity: .75; }
svg.bars .peak { stroke: var(--warn); stroke-width: 2; }
svg.spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.6; }
svg.spark circle { fill: var(--accent); }
svg.spark .spark-hours rect { fill: var(--accent); opacity: 0; cursor: help; }
svg.spark .spark-hours rect:hover { opacity: .18; }
th.hint { cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
.legend { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; margin: 8px 0 0; }
.sw { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }
.sw.avg { background: var(--accent); opacity: .75; }
.sw.peak { height: 3px; background: var(--warn); margin-left: 12px; }
.bars-list, .log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.bars-list li { display: grid; grid-template-columns: 34px 1fr 32px; align-items: center; gap: 8px; }
.bars-list .cc { font-weight: 700; }
.bars-list .bar { background: var(--bg); border-radius: 4px; height: 10px; overflow: hidden; }
.bars-list .bar span { display: block; height: 100%; background: var(--accent); }
.log time { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 6px; }
.foot { color: var(--muted); font-size: 13px; padding-block: 0 24px; }
.login-page { min-height: 100vh; display: grid; place-items: center; }
.login-wrap { width: min(380px, 100% - 32px); }
.card.login { display: grid; gap: 6px; padding: 24px; }
.card.login .brand { font-size: 18px; margin-bottom: 10px; }
.card.login button { margin-top: 12px; padding: 10px; border: 0; border-radius: 8px; font: 700 15px var(--ui); cursor: pointer; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Admin → Status: Streifen pro Sammler (gleiche Zeitachse) und Last-Linie */
svg.strip { width: 100%; min-width: 520px; height: auto; display: block; }
svg.strip .grid, svg.load .grid { stroke: rgba(157, 178, 223, .18); }
svg.strip .limit, svg.load .limit { stroke: var(--warn); stroke-dasharray: 4 4; opacity: .7; }
svg.strip .axis { fill: var(--muted); font: 11px var(--ui); }
svg.strip rect.ok { fill: var(--accent); opacity: .8; }
svg.strip rect.slow { fill: var(--warn); }
svg.strip line.lost { stroke: var(--bad); stroke-width: 2; }
svg.strip rect:hover, svg.load rect.hit:hover { opacity: 1; stroke: var(--ink); stroke-width: 1; }
svg.load .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
svg.load rect.hit { fill: transparent; }
.strip-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; align-items: center; }
.strip-row .who { font-size: 13px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }
.status-ok { border-color: var(--ok); }
.status-warn { border-color: var(--warn); }
@media (max-width: 640px) { .strip-row { grid-template-columns: 1fr; } }
/* „Kopieren“ neben IP-Adressen (Wer ist online) */
button.copy { font: 500 11px var(--ui); color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; cursor: pointer; }
button.copy:hover { color: var(--ink); }
td.nowrap { white-space: nowrap; }

/* Wer ist online (05.11.): eine Tabelle zum Umschalten, Datum links fest, sortierbar */
a.tile-link { color: inherit; text-decoration: none; }
a.tile-link:hover, a.tile-link.on { background: var(--panel-2); box-shadow: inset 0 0 0 2px var(--line); }
.tile .k + .v + small { font-size: 13px; }
.online-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 16px 0 12px; }
.online-bar .page-tabs { margin: 0; }
.online-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 10px; }
.online-tools input[type=search] { min-width: 260px; flex: 0 1 360px; }
.online-tools select { width: auto; }
.online-table { max-height: 70vh; }
.online-table table { min-width: 900px; }
.online-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .03); }
.online-table tbody tr:hover td { background: var(--panel-2); }
.online-table th:first-child, .online-table td:first-child { position: sticky; left: 0; background: var(--panel); z-index: 1; box-shadow: 1px 0 0 var(--line); }
.online-table thead th:first-child { z-index: 2; }
.online-table tbody tr:hover td:first-child { background: var(--panel-2); }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--ink); }
th.sortable::after { content: " ↕"; opacity: .4; }
th.sorted-desc::after { content: " ▼"; opacity: 1; }
th.sorted-asc::after { content: " ▲"; opacity: 1; }
.online-help-title { font-size: 16px; color: var(--muted); margin: 28px 0 8px; }

/* Aufklapp-Menü in der Menüleiste (05.11.: „Meldungen & Pokale“) */
.nav-drop { position: relative; }
.nav-drop > summary { list-style: none; cursor: pointer; color: var(--ink); padding: 6px 10px; border-radius: 6px; }
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-drop > summary:hover, .nav-drop > summary.on, .nav-drop[open] > summary { background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }
.nav-drop-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 20; min-width: 240px; display: grid; gap: 2px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.nav-drop-menu a { display: grid; padding: 8px 10px; }
.nav-drop-menu a small { color: var(--muted); font-size: 12px; }
.todo-note { color: var(--warn); font-weight: 700; margin: 0 0 8px; }
/* Admin → Tafeln: Servergruppen zum Anhaken (05.11.) */
.group-pick { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid rgba(47, 91, 181, .5); }
.group-list { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* Server-Liste im Admin (06.11. neu): „Mehr ▾“ klappt in der Zeile auf, Knöpfe wie Menüpunkte */
.listings-table td.actions { min-width: 230px; }
.listings-table .actions > .btn, .listings-table .inline-form { display: inline-block; margin: 0 4px 6px 0; vertical-align: top; }
.row-more { display: block; }
.row-more > summary { display: inline-block; border: 1px solid var(--line); background: var(--panel-2); font-size: 13px; padding: 4px 10px; }
.row-more .nav-drop-menu { position: static; box-shadow: none; margin-top: 6px; min-width: 250px; }
.link-btn { display: grid; width: 100%; text-align: left; font: 500 14px var(--ui); color: var(--ink); background: none; border: 0; border-radius: 6px; padding: 7px 10px; cursor: pointer; }
.link-btn:hover { background: var(--panel-2); }
.link-btn small { color: var(--muted); font-size: 12px; }
.link-btn.danger { color: #ff9a9a; }
.row-more .vip-form { display: grid; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); margin-top: 4px; }
.tabs .nav-drop > summary { padding: 6px 10px; }
/* Haus einstellen (06.11.): Farben zum Anklicken */
.house-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.swatch { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c); border: 2px solid rgba(255, 255, 255, .25); cursor: pointer; }
.swatch:has(input:checked) { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.swatch input { opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }

/* Unterstützen (06.11.): Balken und Kosten-Tabelle */
.support-bar { height: 12px; max-width: 520px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.support-bar span { display: block; height: 100%; background: var(--ok); }
.support-costs input { width: 100%; min-width: 120px; }
.support-costs td:last-child input { max-width: 110px; min-width: 70px; }
.support-costs tfoot th { text-align: left; }
