/* Tripwire-Panel: Terminal-Ästhetik. Schwarz, Tripwire-Rot, Monospace, Scanlines. Einseitig dunkel (bewusst).
   Aufbau: Seitenleiste links (Navigation, Serverwahl), Inhalt rechts. */
@font-face { font-family: "Anybody"; src: url("fonts/anybody.woff2") format("woff2"); font-weight: 300 900; font-stretch: 50% 150%; font-display: swap; }
@font-face { font-family: "Martian Mono"; src: url("fonts/martian-mono.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #06070a;
  --side: #090b0f;
  --panel: #0c0e13;
  --line: #1d212b;
  --ink: #e6e8ee;
  --muted: #7a8193;
  --red: #ff3b47;
  --ok: #3ddc84;
  --warn: #ffb020;
  --cyan: #3fe0ff;
  --mono: "Martian Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --display: "Anybody", "Arial Narrow", system-ui, sans-serif;
  --ease: cubic-bezier(.16, .84, .12, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 13.5px/1.6 var(--mono); -webkit-font-smoothing: antialiased; min-height: 100vh; }
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.muted { color: var(--muted); }
.small { font-size: 11.5px; }

.scan { position: fixed; inset: 0; pointer-events: none; z-index: 80; background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px); mix-blend-mode: overlay; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255, 59, 71, .08) 1px, transparent 1.5px); background-size: 24px 24px; mask-image: radial-gradient(ellipse at 60% 0%, #000 0%, transparent 70%); }

/* Logo mit Glitch */
.logo, .logo-small { font-family: var(--display); font-weight: 860; font-stretch: 70%; letter-spacing: .02em; color: var(--ink); position: relative; display: inline-block; text-decoration: none; }
.logo { font-size: clamp(56px, 12vw, 120px); line-height: .9; margin: 0; }
.logo-small { font-size: 24px; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.glitch::before { color: var(--red); transform: translate(2px, 0); clip-path: inset(10% 0 55% 0); }
.glitch::after { color: var(--cyan); transform: translate(-2px, 0); clip-path: inset(60% 0 8% 0); }
.glitch:hover::before, .glitch:hover::after, .login .glitch::before, .login .glitch::after { opacity: .85; animation: glitch 2.6s steps(1) infinite; }
.glitch::after { animation-delay: -1.3s !important; }

/* Anmeldung */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-box { width: min(560px, 100%); display: flex; flex-direction: column; gap: 22px; }
.term { margin: 0; min-height: 120px; color: var(--muted); font: 400 13px/1.8 var(--mono); white-space: pre-wrap; }
.term .r { color: var(--red); } .term .g { color: var(--ok); } .term .w { color: var(--ink); }
.cur { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: var(--red); animation: blink 1s steps(1) infinite; }
.hint { margin: 0; color: var(--muted); font-size: 12px; }
.hint.err { color: var(--warn); }

/* Knöpfe */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; align-self: flex-start; padding: 12px 20px; border: 1px solid var(--red); background: transparent; color: var(--ink); font: 500 13px var(--mono); letter-spacing: .04em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background .2s, box-shadow .2s, transform .2s; }
.btn.primary { background: var(--red); color: #0a0b0e; }
.btn:hover { box-shadow: 0 0 0 1px var(--red), 0 0 22px rgba(255, 59, 71, .35); transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.small { padding: 5px 10px; font-size: 11px; }
.ghost { color: var(--muted); text-decoration: none; font-size: 12px; cursor: pointer; background: none; border: 0; font-family: var(--mono); }
.ghost:hover { color: var(--ink); }

/* Grundaufbau */
.app { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px; gap: 18px; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
.side-body { display: flex; flex-direction: column; gap: 18px; flex: 1; min-height: 0; }
.burger { display: none; width: 36px; height: 36px; background: none; border: 1px solid var(--line); cursor: pointer; flex-direction: column; gap: 6px; align-items: center; justify-content: center; }
.burger i { display: block; width: 16px; height: 2px; background: var(--ink); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; color: var(--muted); text-decoration: none; cursor: pointer; border-left: 2px solid transparent; transition: color .15s, background .15s, border-color .15s; }
.nav a span { width: 16px; text-align: center; color: var(--line); transition: color .15s; }
.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .02); }
.nav a.on { color: var(--ink); border-left-color: var(--red); background: linear-gradient(90deg, rgba(255, 59, 71, .12), transparent); }
.nav a.on span { color: var(--red); }
.nav-label { display: block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 10px 6px; }
.switch { position: relative; }
.switch-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); font: 400 12.5px var(--mono); cursor: pointer; text-align: left; }
.switch-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch-btn b { color: var(--red); font-weight: 400; }
.switch-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 340px; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0, 0, 0, .6); }
.switch-list a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; text-decoration: none; color: var(--muted); cursor: pointer; }
.switch-list a:hover, .switch-list a.on { color: var(--ink); background: rgba(255, 59, 71, .08); }
.switch-list img, .switch-list .noicon { width: 22px; height: 22px; border-radius: 6px; background: var(--line); display: grid; place-items: center; font-size: 10px; flex: none; }
.side-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 6px 0; border-top: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: 8px; font-size: 12px; min-width: 0; }
.me span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me img { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); }

.main { padding: 34px clamp(16px, 4vw, 44px) 64px; max-width: 1240px; width: 100%; }
.kicker { color: var(--red); margin: 0 0 6px; font-size: 12px; display: flex; align-items: center; gap: 8px; }
.h { font-family: var(--display); font-weight: 800; font-stretch: 72%; font-size: clamp(30px, 4.5vw, 46px); line-height: 1; margin: 0 0 10px; }
.panel { background: var(--panel); border: 1px solid var(--line); padding: 20px; margin-top: 18px; position: relative; min-width: 0; }
.panel::before { content: ""; position: absolute; left: -1px; top: -1px; width: 14px; height: 14px; border-left: 2px solid var(--red); border-top: 2px solid var(--red); }
.panel h3 { margin: 0 0 16px; font: 500 12px var(--mono); color: var(--red); letter-spacing: .04em; display: flex; align-items: center; gap: 8px; }
.more { display: inline-block; margin-top: 12px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 0 18px; }
.g-title { display: flex; align-items: center; gap: 18px; }
.g-title img { width: 64px; height: 64px; border-radius: 16px; border: 1px solid var(--line); }
.g-title .kicker { margin-bottom: 4px; }
.empty { color: var(--muted); padding: 18px 0; margin: 0; }

/* Kennzahlen */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.tile { background: var(--panel); border: 1px solid var(--line); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.tile b { font-family: var(--display); font-weight: 800; font-stretch: 72%; font-size: clamp(30px, 4vw, 44px); line-height: 1; font-variant-numeric: tabular-nums; }
.tile:first-child b { color: var(--red); text-shadow: 0 0 24px rgba(255, 59, 71, .35); }
.tile span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }

/* Verlauf */
.chart { display: flex; align-items: flex-end; gap: 3px; height: 150px; border-bottom: 1px solid var(--line); }
.chart i { flex: 1; min-height: 2px; background: linear-gradient(to top, var(--red), rgba(255, 59, 71, .45)); transform-origin: bottom; animation: grow .7s var(--ease) both; }
.chart i.zero { background: var(--line); }
.chart i:hover { filter: brightness(1.4); }
.chart-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 10.5px; margin-top: 6px; }

/* Netzwerk-Karte */
.netmap { position: relative; }
#netmap { display: block; width: 100%; aspect-ratio: 16 / 10; cursor: pointer; }
.tip { position: absolute; z-index: 5; pointer-events: none; background: var(--bg); border: 1px solid var(--line); padding: 8px 11px; font-size: 12px; transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; box-shadow: 0 10px 24px rgba(0, 0, 0, .5); }
.tip b { font-weight: 500; display: block; }
.tip span { color: var(--muted); font-size: 11px; }

/* Live-Feed */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; }
.live-dot.on { background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulse 2s ease-out infinite; }
.feed { height: 300px; overflow-y: auto; font-size: 12px; line-height: 1.75; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.feed.big { height: 60vh; }
.feed .ln { display: grid; grid-template-columns: 64px 46px minmax(0, 1fr); gap: 10px; animation: lineIn .5s var(--ease); }
.feed .ln time { color: var(--muted); font-variant-numeric: tabular-nums; }
.feed .ln .k { font-weight: 500; }
.feed .ln .k.stop { color: var(--red); } .feed .ln .k.conf { color: var(--cyan); } .feed .ln .k.sys { color: var(--ok); }
.feed .ln .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed .ln .t em { font-style: normal; color: var(--muted); }
.feed .ln.new { background: linear-gradient(90deg, rgba(255, 59, 71, .16), transparent); }
.term-panel { padding: 14px 18px; }

/* Angriffsarten (Ring) */
.kinds { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.kinds svg { width: 150px; height: 150px; flex: none; }
.kinds svg circle { transition: stroke-dashoffset 1s var(--ease); }
.kinds ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 160px; }
.kinds li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 12px; }
.kinds li i { width: 10px; height: 10px; }
.kinds li b { font-weight: 500; font-variant-numeric: tabular-nums; }
.donut-total { font: 800 30px var(--display); font-stretch: 72%; fill: var(--ink); }
.donut-label { font: 400 9px var(--mono); fill: var(--muted); letter-spacing: .1em; }

/* Heatmap */
.heat { display: grid; grid-template-columns: 26px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: 9.5px; color: var(--muted); }
.heat span { display: flex; align-items: center; }
.heat i { aspect-ratio: 1; background: var(--red); border-radius: 1px; }
.heat .hour { justify-content: center; }

/* Server-Ranking */
.rank { display: flex; flex-direction: column; }
.rank a { display: grid; grid-template-columns: 26px 32px minmax(0, 1fr) 90px 70px 64px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); text-decoration: none; cursor: pointer; transition: background .15s; }
.rank a:hover { background: rgba(255, 59, 71, .05); }
.rank a:last-child { border-bottom: 0; }
.rank .n { color: var(--muted); }
.rank img, .rank .noicon { width: 32px; height: 32px; border-radius: 8px; background: var(--line); display: grid; place-items: center; }
.rank b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank small { color: var(--muted); font-size: 11.5px; text-align: right; }
.bar { height: 4px; background: var(--line); }
.bar i { display: block; height: 100%; background: var(--red); }
.badge { font-size: 11px; text-align: center; padding: 2px 6px; border: 1px solid currentColor; }
.badge.ok { color: var(--ok); } .badge.warn { color: var(--warn); } .badge.bad { color: var(--red); }

/* Schutz-Score */
.score-panel { display: flex; flex-direction: column; }
.score { display: flex; align-items: center; gap: 20px; }
.score svg { width: 130px; height: 130px; flex: none; }
.score.big svg { width: 190px; height: 190px; }
.score .num { font: 800 34px var(--display); font-stretch: 72%; }
.score.big .num { font-size: 48px; }
.score svg circle.val { transition: stroke-dashoffset 1.2s var(--ease); }
.score p { margin: 0; color: var(--muted); font-size: 12px; }
.score strong { display: block; font-size: 15px; color: var(--ink); font-weight: 500; margin-bottom: 4px; }
.tips, .checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.tips li { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 12px; font-size: 12.5px; }
.tips li b { color: var(--ok); font-weight: 500; }
.checks li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; font-size: 12.5px; }
.checks .s { font-weight: 500; }
.checks .s.ok { color: var(--ok); } .checks .s.bad { color: var(--red); } .checks .s.warn { color: var(--warn); }
.checks small { display: block; color: var(--muted); font-size: 11.5px; }
.meter { height: 4px; background: var(--line); margin-top: 6px; }
.meter i { display: block; height: 100%; background: var(--ok); }

/* Stopps als Terminal-Log */
.log { display: flex; flex-direction: column; }
.log-row { display: grid; grid-template-columns: 104px 32px minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 6px; border-bottom: 1px dashed var(--line); font-size: 12.5px; cursor: pointer; transition: background .15s; }
.log-row:hover { background: rgba(255, 59, 71, .05); }
.log-row:last-child { border-bottom: 0; }
.log-row time { color: var(--muted); font-variant-numeric: tabular-nums; }
.log-row img, .log-row .noava, .drawer .noava { width: 32px; height: 32px; border-radius: 50%; background: var(--line); display: grid; place-items: center; }
.log-row .who b { font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-row .who small { color: var(--muted); font-size: 11px; }
.log-row .why { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border: 1px solid currentColor; white-space: nowrap; }
.tag.to { color: var(--red); } .tag.del { color: var(--warn); } .tag.off { color: var(--muted); } .tag.lift { color: var(--ok); }

/* Detail-Fenster */
.drawer-bg { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .55); backdrop-filter: blur(2px); }
.drawer { position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--side); border-left: 1px solid var(--red); padding: 24px; overflow-y: auto; animation: slideIn .35s var(--ease); display: flex; flex-direction: column; gap: 18px; }
.drawer .head { display: flex; align-items: center; gap: 14px; }
.drawer .head img, .drawer .head .noava { width: 52px; height: 52px; }
.drawer .head b { display: block; font-size: 15px; font-weight: 500; }
.drawer .head small { color: var(--muted); }
.drawer dl { margin: 0; display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 12px; font-size: 12.5px; }
.drawer dt { color: var(--muted); }
.drawer dd { margin: 0; }
.excerpt { background: var(--bg); border: 1px solid var(--line); padding: 12px; font-size: 12px; white-space: pre-wrap; word-break: break-word; filter: blur(5px); cursor: pointer; transition: filter .3s; user-select: none; }
.excerpt.show { filter: none; user-select: text; }
.drawer .close { align-self: flex-end; }

/* Einstellungen */
.settings { display: flex; flex-direction: column; gap: 14px; }
.settings h3 { margin: 10px 0 0; }
.settings h3:first-child { margin-top: 0; }
.set { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.set.col { flex-direction: column; align-items: stretch; }
.set small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; max-width: 60ch; }
.lbl { color: var(--ink); }
.seg { display: inline-flex; border: 1px solid var(--line); flex-wrap: wrap; }
.seg button { background: none; border: 0; border-right: 1px solid var(--line); color: var(--muted); font: 500 12px var(--mono); padding: 7px 12px; cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--red); color: #0a0b0e; }
.toggle { width: 46px; height: 24px; border: 1px solid var(--line); background: var(--bg); position: relative; cursor: pointer; padding: 0; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: var(--muted); transition: transform .2s var(--ease), background .2s; }
.toggle[aria-pressed="true"] { border-color: var(--ok); }
.toggle[aria-pressed="true"]::after { transform: translateX(22px); background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.picker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pick-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 10px; border: 1px solid var(--line); font-size: 12px; background: var(--bg); }
.pick-chip i { width: 8px; height: 8px; border-radius: 50%; }
.pick-chip button { background: none; border: 0; color: var(--muted); cursor: pointer; font: 400 14px var(--mono); padding: 0 4px; }
.pick-chip button:hover { color: var(--red); }
.picker select { background: var(--bg); color: var(--ink); border: 1px dashed var(--line); padding: 6px 8px; font: 400 12px var(--mono); max-width: 260px; }
.set-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--panel); padding-top: 8px; }

/* Protokoll */
.audit { display: flex; flex-direction: column; }
.audit div { display: grid; grid-template-columns: 120px 160px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.audit div:last-child { border-bottom: 0; }
.audit time { color: var(--muted); }
.audit b { font-weight: 500; color: var(--cyan); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Meldung unten */
.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--panel); border: 1px solid var(--red); padding: 10px 16px; font-size: 12.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.toast.ok { border-color: var(--ok); }

@keyframes glitch { 0%, 82%, 100% { transform: translate(0); } 84% { transform: translate(3px, -1px); } 86% { transform: translate(-3px, 1px); } 88% { transform: translate(2px, 0); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes lineIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .side { position: sticky; z-index: 30; height: auto; padding: 10px max(16px, env(safe-area-inset-left, 0px)); border-right: 0; border-bottom: 1px solid var(--line); }
  .burger { display: flex; }
  .side-body { display: none; }
  .side.open .side-body { display: flex; padding-bottom: 8px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: 1fr; }
  .rank a { grid-template-columns: 22px 32px minmax(0, 1fr) 60px; }
  .rank a .bar, .rank a small:last-of-type { display: none; }
  .log-row { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .log-row time, .log-row .why { grid-column: 2 / 4; font-size: 11px; }
  .audit div { grid-template-columns: 1fr; gap: 2px; }
  .feed .ln { grid-template-columns: 54px 40px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Kommandozentrale: auf großen Bildschirmen alles auf einen Blick, ohne Scrollen */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.ov-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.ov-head .h { margin: 0; }
@media (min-width: 1100px) and (min-height: 700px) {
  .main:has(#view-overview:not([hidden])) { padding-block: 20px; max-width: none; }
  #view-overview:not([hidden]) { display: grid; grid-template-rows: auto auto minmax(0, 1fr) clamp(190px, 27vh, 250px); gap: 12px; height: calc(100vh - 40px); }
  #view-overview .ov-head .h { font-size: 30px; }
  #view-overview .tiles { margin-top: 0; gap: 12px; }
  #view-overview .tile { padding: 10px 14px; flex-direction: row; align-items: baseline; justify-content: space-between; gap: 10px; }
  #view-overview .tile b { font-size: 28px; }
  #view-overview .panel { margin-top: 0; padding: 14px 16px; display: flex; flex-direction: column; min-height: 0; }
  #view-overview .panel h3 { margin-bottom: 10px; }
  #view-overview .ov-main { min-height: 0; }
  #view-overview .netmap { flex: 1; min-height: 0; }
  #view-overview #netmap { aspect-ratio: auto; height: 100%; }
  #view-overview .feed { flex: 1; height: auto; min-height: 0; }
  #view-overview .grid3 { min-height: 0; }
  #view-overview .chart { flex: 1; height: auto; min-height: 0; }
  #view-overview .kinds { flex: 1; min-height: 0; flex-wrap: nowrap; gap: 14px; }
  #view-overview .kinds svg { width: 120px; height: 120px; }
  #view-overview .kinds ul { min-width: 0; gap: 5px; }
  #view-overview .rank { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  #view-overview .rank a { grid-template-columns: 22px 26px minmax(0, 1fr) 54px 44px; padding: 6px 0; gap: 10px; }
  #view-overview .rank img, #view-overview .rank .noicon { width: 26px; height: 26px; }
  #view-overview .rank .bar { display: none; }
}
@media (max-width: 1099px) { .grid3 { grid-template-columns: 1fr; } }

/* Bereiche in der Seitenleiste */
.nav-group { display: flex; flex-direction: column; }
.side-body { gap: 14px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }

/* Filter, Tabellen, Balken */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.filters input, .filters select { background: var(--panel); color: var(--ink); border: 1px solid var(--line); padding: 9px 11px; font: 400 12.5px var(--mono); }
.filters input { flex: 1; min-width: 220px; }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--red); }
.log.wide .log-row { grid-template-columns: 104px 32px minmax(0, 1fr) minmax(0, 140px) minmax(0, 1fr) auto; }
.log-row .srv-name { color: var(--cyan); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 400; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 0 10px 10px 0; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 10px 10px 0; border-bottom: 1px dashed var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; transition: background .15s; }
.tbl tbody tr:hover { background: rgba(255, 59, 71, .05); }
.tbl .srv-cell { display: flex; align-items: center; gap: 10px; }
.tbl .srv-cell img, .tbl .srv-cell .noicon { width: 28px; height: 28px; border-radius: 8px; background: var(--line); display: grid; place-items: center; }
.audit.wide div { grid-template-columns: 120px 170px 160px minmax(0, 1fr); }
.audit .srv-name { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bars div { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 4px 10px; font-size: 12px; }
.bars span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars b { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.bars i { grid-column: 1 / -1; height: 4px; background: var(--line); position: relative; }
.bars i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); background: var(--red); transition: width .8s var(--ease); }
.big-num { font: 800 64px/1 var(--display); font-stretch: 72%; color: var(--red); margin: 10px 0; }
.tiles.sys { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.tiles.sys b { font-size: 26px; }
.tiles.sys small { color: var(--muted); font-size: 11px; }
@media (max-width: 980px) { .log.wide .log-row { grid-template-columns: 32px minmax(0, 1fr) auto; } .log-row .srv-name { grid-column: 2 / 4; } .audit.wide div { grid-template-columns: 1fr; } }
.side .nav a { padding: 7px 10px; }

/* Rechtstexte */
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11px; }
.legal-links a { color: var(--muted); text-decoration: none; }
.legal-links a:hover, .legal-links a.on { color: var(--ink); }
.side-foot .legal-links { width: 100%; padding-top: 6px; }
.legal-page { max-width: 820px; margin: 0 auto; padding: 32px max(16px, env(safe-area-inset-right, 0px)) 64px max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 18px; }
.legal { font-family: var(--mono); font-size: 13px; line-height: 1.75; color: var(--ink); }
.legal h1 { font: 800 clamp(34px, 6vw, 52px)/1 var(--display); font-stretch: 72%; margin: 10px 0 6px; text-wrap: balance; }
.legal h2 { font: 700 20px/1.2 var(--display); font-stretch: 80%; margin: 34px 0 8px; color: var(--red); }
.legal p, .legal ul, .legal ol { margin: 0 0 12px; max-width: 72ch; }
.legal ul, .legal ol { padding-left: 20px; }
.legal a { color: var(--cyan); }
.legal-tbl { margin: 6px 0 16px; }
.legal-tbl td { white-space: normal; vertical-align: top; font-size: 12px; line-height: 1.6; }
.legal-tbl tbody tr { cursor: default; }
.side-foot { flex-wrap: wrap; }
