/* g0diQ Admin – DARK-MODE (dauerhaft) – Design angelehnt an die ICQ-Clients 2004–2006 (passend zum Programm) */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Platz für die Bildlaufleiste immer reservieren: alle Seiten gleich breit, nichts verspringt */
html { overflow-y: scroll; scrollbar-gutter: stable; }
body { background: #1a1c1f; font: 12px Tahoma, Verdana, "Segoe UI", sans-serif; color: #e6e8eb; padding: 16px; }

/* Fenster mit schiefergrauer Titelleiste */
.window { width: 100%; max-width: 1100px; margin: 0 auto; background: #2b2e33; border: 1px solid #141a22; box-shadow: 0 4px 16px rgba(0,0,0,.45); }
.titlebar { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; color: #fff; font-weight: bold; font-size: 12px;
  background: linear-gradient(#5b6a7e, #3f4d60 45%, #303c4d 55%, #283344); text-shadow: 1px 1px #0b0f14; }
.titlebar img { width: 16px; height: 16px; }

.menubar { display: flex; flex-wrap: wrap; gap: 1px; align-items: center; padding: 2px 3px; border-bottom: 1px solid #444b54;
  background: linear-gradient(#3a3e45, #2e3238); }
.menubar a, .linkbtn { color: #e6e8eb; text-decoration: none; padding: 2px 8px; border: 1px solid transparent; border-radius: 2px;
  background: none; font: inherit; cursor: pointer; min-width: 0; box-shadow: none; }
.menubar a:hover, .linkbtn:hover { background: #374863; border-color: #56709a; box-shadow: none; }
.menubar .spacer { flex: 1; }
.menubar .who { color: #7fd35a; font-weight: bold; padding: 0 8px; }
/* Abmelden als richtiger Knopf erkennbar */
.menubar .logout { min-width: 0; padding: 2px 12px; margin: 1px 0; }
.inline { display: inline; margin: 0; }

.content { padding: 12px 10px; min-height: 300px; }
.statusbar { padding: 3px 8px; color: #b8c2cd; font-size: 11px; border-top: 1px solid #444b54; background: linear-gradient(#3a3e45, #2e3238); }

h1 { font-size: 15px; margin: 0 0 10px; color: #9db4ff; }
h2 { font-size: 12px; margin: 16px 0 6px; color: #b8c2cd; }

fieldset { border: 1px solid #444b54; border-radius: 4px; padding: 8px 10px; margin: 0 0 12px; background: #2f3338; }
legend { color: #c9d1db; font-weight: bold; padding: 0 4px; }

/* Tabellen: weiß wie die Kontaktliste */
table { border-collapse: collapse; width: 100%; background: #1f2226; border: 1px solid #4a525c; }
th, td { text-align: left; padding: 4px 7px; border-bottom: 1px solid #353a41; vertical-align: top; }
th { background: linear-gradient(#3a3e45, #2e3238); border-bottom: 1px solid #444b54; font-weight: normal; color: #b8c2cd; }
tr:hover td { background: #343a44; }

input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
  font: inherit; padding: 3px 5px; background: #1f2226; color: #e6e8eb; border: 1px solid #4a525c; border-radius: 2px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #6e8fb8; }
input[type=file] { font: inherit; }
textarea { width: 100%; min-height: 70px; }

/* Abgerundete, silberne Knöpfe */
button, .btn { font: inherit; padding: 3px 12px; min-width: 75px; cursor: pointer; color: #e6e8eb; text-decoration: none; display: inline-block;
  background: linear-gradient(#4a4f57, #3e4249 50%, #34383e); border: 1px solid #4a525c; border-radius: 3px; }
button:hover, .btn:hover { background: linear-gradient(#536070, #475468 50%, #3c485a); border-color: #6e8fb8; }
button:active, .btn:active { background: linear-gradient(#2a2e33, #30343a 40%, #363b41); }
button:focus-visible, .btn:focus-visible { outline: 1px dotted #b8c2cd; outline-offset: 1px; }
button.danger { color: #e07a86; }
button.primary { font-weight: bold; border-color: #7a98c4; }

.msg { padding: 6px 10px; margin-bottom: 10px; border: 1px solid; border-radius: 3px; }
.msg.ok { background: #24361b; border-color: #4e9a26; }
.msg.err { background: #40222a; border-color: #e07a86; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.tile { background: #1f2226; padding: 8px 10px 7px; border: 1px solid #4a525c; border-radius: 4px;
  display: flex; flex-direction: column; justify-content: space-between; min-height: 68px; min-width: 0; }
.tile .v { font-size: 20px; color: #9db4ff; line-height: 1.1; }
/* Beschriftung unten in der Kachel, immer einzeilig */
.tile .l { color: #b8c2cd; font-size: 11px; margin-top: auto; padding-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile a { color: #9db4ff; }

.badge { padding: 0 6px; color: #fff; font-size: 11px; border-radius: 8px; }
.b-Pending { background: #b8761a; } .b-Active { background: #4e9a26; } .b-Rejected { background: #4a525c; }
.b-Locked { background: #e07a86; } .b-Deactivated { background: #9aa4af; } .b-DeletionRequested { background: #8e62b8; }

.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0; }
.muted { color: #9aa4af; }
.login { max-width: 360px; margin: 30px auto; }
.login label { display: block; margin-top: 8px; }
.login input { width: 100%; }
.mono { font-family: Consolas, "Courier New", monospace; }
.qr { background: #fff; padding: 8px; border: 1px solid #4a525c; border-radius: 4px; display: inline-block; }
a { color: #8fb0ff; }
.logo-center { text-align: center; margin: 0 0 8px; }

/* Dark-Mode: Formular-Elemente und Datei-Auswahl lesbar halten */
:root { color-scheme: dark; }
input::placeholder, textarea::placeholder { color: #7f8994; }
input[type=file]::file-selector-button { font: inherit; color: #e6e8eb; background: linear-gradient(#4a4f57, #34383e); border: 1px solid #4a525c; border-radius: 3px; padding: 2px 10px; }

/* Schlüssel-Wert-Tabellen (Dashboard: Server / System): einheitliche, feste Spaltenbreite,
   damit die Trennlinie in allen Tabellen exakt untereinander liegt. */
table:has(> tbody > tr > th + td), table.kv { table-layout: fixed; }
tr > th:first-child:has(+ td), table.kv th { width: 400px; }

/* Statistik-Seite */
.range { margin: 0 0 6px; }
.range .spacer { flex: 1; }
.range .btn { min-width: 0; padding: 2px 10px; }
.range .btn.active { border-color: #7a98c4; background: linear-gradient(#536070, #3c485a); font-weight: bold; }
.chartbox { background: #1f2226; border: 1px solid #4a525c; border-radius: 4px; padding: 8px 10px 6px; margin: 0 0 10px; }
.charttitle { color: #c9d1db; font-weight: bold; margin: 0 0 4px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 10px; }
.grid2 .chartbox { margin: 0 0 10px; }
.chart { display: block; overflow: visible; }
.chart .mk:hover path, .chart .mk:hover rect:not(.hit) { opacity: .78; }
.chart .mk:hover .hit { fill: rgba(255,255,255,.04); }
.chart .pt circle, .chart .pt .cross { opacity: 0; }
.chart .pt:hover circle, .chart .pt:hover .cross { opacity: 1; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 22px; color: #b8c2cd; margin: 4px 0 2px; }
.facts b { color: #e6e8eb; }
.legend { display: flex; align-items: center; gap: 6px; color: #b8c2cd; font-size: 11px; margin: 4px 0 0 54px; }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 10px; }
.legend .sw:first-child { margin-left: 0; }
.legend .sw-a { background: #6b8fe8; }
.legend .sw-b { background: #bd7f35; }
details { margin: 4px 0 2px; color: #b8c2cd; }
details summary { cursor: pointer; color: #8fb0ff; }
table.small { margin-top: 6px; max-width: 520px; }
table.small tr > th:first-child { width: 160px; }
h2 .muted { font-weight: normal; }

/* Benutzerliste: Verbindungsstatus als farbiger Punkt */
.dot { font-size: 14px; line-height: 1; }
.dot.on { color: #4ec12a; }
.dot.off { color: #e0505e; }
/* Diagramme/Kacheln dürfen das Fenster nie verbreitern */
.content { min-width: 0; overflow-x: hidden; }
.grid2 > * { min-width: 0; }
