:root {
  --bg: #0e1726; --panel: #13203a; --line: #25324f; --text: #e8eef7; --muted: #9fb3d9;
  --navy: #1F3864; --blue: #2E75B6; --red: #C00000; --orange: #C55A11; --green: #0a8f3c; --yellow: #d4a017;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
.screen { display: flex; flex-direction: column; min-height: 100vh; }
.screen[hidden] { display: none !important; }
.muted { color: var(--muted); font-size: 12px; }
.warn { background: #3a1414; border: 1px solid var(--red); padding: 6px 10px; border-radius: 4px; }
.err { color: #ff9b9b; min-height: 1.4em; }
#login { max-width: 380px; margin: 8vh auto; padding: 20px; background: var(--panel); border-radius: 8px; }
#login label { display: block; margin: 8px 0; }
#login input, #login select { width: 100%; padding: 8px; background: #0c1628; color: var(--text); border: 1px solid var(--line); border-radius: 4px; font-size: 14px; }
#login button { width: 100%; margin-top: 12px; padding: 10px; background: var(--blue); color: #fff; border: 0; border-radius: 4px; font-size: 15px; cursor: pointer; }
header { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 12px; align-items: center; padding: 8px 14px; background: var(--navy); border-bottom: 2px solid var(--blue); }
.brand { font-weight: bold; font-size: 16px; }
.stage { padding: 4px 10px; border-radius: 4px; font-weight: bold; font-size: 14px; }
.stage-grey { background: #555; }
.stage-yellow { background: #d4a017; color: #000; }
.stage-orange { background: var(--orange); }
.stage-red { background: var(--red); }
.stage-darkred { background: #5a0000; }
#clock { font-variant-numeric: tabular-nums; }
#conn.ok { color: #7be3a0; }
#conn.warn { color: #ffc98a; }
#conn.err { color: #ff9b9b; }
nav#tabs { display: flex; overflow-x: auto; gap: 2px; background: #0a1322; border-bottom: 1px solid var(--line); }
nav#tabs button { padding: 8px 14px; background: transparent; border: 0; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; font-size: 13px; }
nav#tabs button.active { color: var(--text); border-bottom-color: var(--blue); background: var(--panel); }
main { flex: 1; min-height: 0; overflow: auto; padding: 14px; }
footer { padding: 6px 14px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); background: #0a1322; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
th { background: var(--navy); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ampel { font-weight: bold; text-align: center; padding: 4px 6px; border-radius: 4px; }
.ampel.g { background: rgba(10,143,60,0.2); color: #7be3a0; }
.ampel.y { background: rgba(212,160,23,0.2); color: #ffd57a; }
.ampel.r { background: rgba(192,0,0,0.2); color: #ff9b9b; }
button.btn { padding: 6px 10px; background: var(--blue); color: #fff; border: 0; border-radius: 4px; cursor: pointer; font-size: 13px; }
button.btn.sec { background: #2a3a5c; }
button.btn.danger { background: var(--red); }
input, select, textarea { background: #0c1628; color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 6px; font-size: 13px; }
label { display: block; margin: 6px 0 4px; color: var(--muted); font-size: 12px; }
.card { background: var(--panel); border-radius: 6px; padding: 12px; margin-bottom: 12px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 240px; }
.pri-SOFORT { color: #ff5555; font-weight: bold; }
.pri-HOCH { color: #ff9b9b; font-weight: bold; }
.pri-NORMAL { color: var(--muted); }
.pri-NIEDRIG { color: #7c8a9b; }
.kritisch { background: rgba(192,0,0,0.25); border-left: 4px solid var(--red); padding-left: 8px; }
