/* GMod-Verwaltung – dunkles Panel, gleiche Farbwelt wie das Konzept. Keine externen Schriften (CSP). */
:root {
  --bg: #11171e; --flaeche: #18212b; --flaeche2: #1f2a36; --linie: #2c3946;
  --text: #e3e9ef; --leise: #98a6b4; --akzent: #6fa8ec; --akzent-weich: #1c2f45;
  --gut: #5cc48f; --gut-weich: #173327; --warn: #e7a64a; --warn-weich: #3a2c14; --schlecht: #f08079; --schlecht-weich: #3e1d1b;
  --konsole: #0b1016;
  --schrift: "Source Sans 3", "Segoe UI", "Noto Sans", "DejaVu Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", "DejaVu Sans Mono", ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--schrift); }
[hidden] { display: none !important; }
h1, h2 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.4rem; } h2 { font-size: 1.05rem; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 16px 18px; }
.leise { color: var(--leise); } .klein { font-size: .85rem; }
.marke { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .01em; }

input, select { background: var(--konsole); border: 1px solid var(--linie); border-radius: 6px; padding: 8px 10px; width: 100%; min-width: 0; }
input:focus, select:focus { border-color: var(--akzent); outline: none; }
button { background: var(--flaeche2); border: 1px solid var(--linie); border-radius: 6px; padding: 7px 14px; cursor: pointer; white-space: nowrap; }
button:hover:not(:disabled) { border-color: var(--akzent); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.haupt { background: var(--akzent); border-color: var(--akzent); color: #0b1016; font-weight: 700; }
button.gefahr { color: var(--schlecht); border-color: var(--schlecht-weich); }
button.gefahr:hover:not(:disabled) { border-color: var(--schlecht); }
button.link { background: none; border: 0; color: var(--akzent); padding: 4px 6px; }

.formular { display: grid; gap: 8px; }
.formular label { color: var(--leise); font-size: .88rem; margin-top: 4px; }
.formular button.haupt { margin-top: 8px; }
.formular.reihe { grid-template-columns: 160px 1fr 1fr auto; align-items: end; gap: 12px; }
.formular.reihe h2 { grid-column: 1 / -1; }
.meldung { margin: 12px 0 0; padding: 8px 12px; border-radius: 6px; }
.meldung.fehler { background: var(--schlecht-weich); color: var(--schlecht); }

/* Anmeldung */
.anmeldung { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.schmal { width: 100%; max-width: 400px; display: grid; gap: 18px; padding: 26px; }
.qr { background: #fff; border-radius: 8px; padding: 8px; justify-self: center; line-height: 0; }
.geheim { font-family: var(--mono); font-size: .85rem; background: var(--konsole); padding: 8px; border-radius: 6px; word-break: break-all; user-select: all; }

/* Panel */
.panel { max-width: 1280px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-left)) 40px max(16px, env(safe-area-inset-right)); display: grid; gap: 14px; }
.kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.server-wahl { display: flex; gap: 6px; flex: 1; }
.server-wahl button[aria-pressed="true"] { background: var(--akzent-weich); border-color: var(--akzent); color: var(--akzent); font-weight: 600; }
.ich { display: flex; align-items: center; gap: 10px; color: var(--leise); }

.status { display: grid; gap: 12px; }
.status-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 1.05rem; }
.punkt { width: 12px; height: 12px; border-radius: 50%; background: var(--leise); flex: none; }
.punkt.an { background: var(--gut); box-shadow: 0 0 0 4px var(--gut-weich); }
.punkt.laedt { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-weich); }
.punkt.aus { background: var(--schlecht); box-shadow: 0 0 0 4px var(--schlecht-weich); }
.knoepfe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.knoepfe.rechts { justify-content: flex-end; margin-top: 12px; }
.knoepfe .trenner { width: 1px; height: 26px; background: var(--linie); margin: 0 6px; }
.knoepfe select { width: auto; }
.aufgabe-hinweis { font-size: .9rem; }

.reiter { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--linie); }
.reiter button { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 8px 14px; color: var(--leise); }
.reiter button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--akzent); font-weight: 600; }
.seite { display: grid; gap: 10px; }

.konsole { background: var(--konsole); border: 1px solid var(--linie); border-radius: 8px; margin: 0; padding: 10px 12px; height: min(62vh, 640px); overflow: auto;
  font: 12.5px/1.45 var(--mono); white-space: pre-wrap; word-break: break-word; }
.klein-hoch { height: min(55vh, 560px); }
.befehl-zeile { display: flex; gap: 8px; }
.befehl-zeile input { font-family: var(--mono); }
.k-fehler { color: #ff6b6b; } .k-stack { color: #b22222; } .k-join { color: #90ee90; } .k-leave { color: #c39bd3; }
.k-warn { color: #f0a050; } .k-ok { color: #3fbf6f; } .k-grau { color: #6f7b87; } .k-info { color: #5fd7d7; }
.k-vln { color: #87cefa; } .k-ich { color: #ffd700; } .k-trenner { color: var(--akzent); }

.spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.spalten.breit-rechts { grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); }
.spalten > * { min-width: 0; }
.tabelle { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tabelle th { text-align: left; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--leise); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--linie); }
.tabelle td { padding: 7px 8px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle td.mono, .mono { font-family: var(--mono); font-size: .85rem; }
.tabelle td.rechts { text-align: right; white-space: nowrap; }
.leer { color: var(--leise); padding: 10px 8px; }

.schalter-zeile { display: flex; flex-wrap: wrap; gap: 12px; }
.schalter { display: flex; align-items: center; gap: 12px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 10px 14px; }
.pill { font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.pill.an { background: var(--gut-weich); color: var(--gut); } .pill.aus { background: var(--schlecht-weich); color: var(--schlecht); }
.wl-kopf { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.aus-eintrag td:first-child { color: var(--leise); text-decoration: line-through; }

.liste { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; max-height: 60vh; overflow: auto; }
.liste button { width: 100%; text-align: left; background: none; border: 0; padding: 6px 8px; border-radius: 6px; }
.liste button:hover, .liste button[aria-pressed="true"] { background: var(--akzent-weich); }
.liste small { color: var(--leise); display: block; }

.dialog { background: var(--flaeche); color: var(--text); border: 1px solid var(--linie); border-radius: 12px; padding: 22px; width: min(440px, calc(100vw - 32px)); }
.dialog.breit { width: min(620px, calc(100vw - 32px)); }
.map-liste { list-style: none; margin: 0; padding: 4px; display: grid; align-content: start; gap: 2px; height: min(52vh, 460px); overflow: auto;
  background: var(--konsole); border: 1px solid var(--linie); border-radius: 8px; }
.map-liste li button { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; text-align: left;
  background: none; border: 1px solid transparent; border-radius: 6px; padding: 7px 10px; white-space: normal; }
.map-liste li button:hover { background: var(--flaeche2); }
.map-liste li button[aria-selected="true"] { background: var(--akzent-weich); border-color: var(--akzent); }
.map-liste .map-name { font-family: var(--mono); font-size: .9rem; }
.map-liste .map-quelle { grid-column: 1; color: var(--leise); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-liste .marken { grid-column: 2; grid-row: 1 / 3; display: flex; gap: 4px; align-self: center; }
.marke-klein { font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--flaeche2); color: var(--leise); }
.marke-klein.aktuell { background: var(--gut-weich); color: var(--gut); }
.map-info { display: inline-flex; align-items: center; gap: 6px; }
.dialog::backdrop { background: rgba(5, 8, 12, .7); }
.toast { position: fixed; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: var(--flaeche2);
  border: 1px solid var(--linie); border-radius: 8px; padding: 10px 16px; box-shadow: 0 8px 30px rgba(0,0,0,.4); max-width: calc(100vw - 32px); }
.toast.fehler { border-color: var(--schlecht); color: var(--schlecht); }
.toast.gut { border-color: var(--gut); }

@media (max-width: 700px) {
  .formular.reihe { grid-template-columns: 1fr; }
  .spalten.breit-rechts { grid-template-columns: 1fr; }
  .server-wahl { order: 3; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
