:root { --bg: #111418; --card: #1c2128; --line: #2d343d; --text: #e8eaed; --muted: #9aa3ad; --accent: #4f9cf9; --ok: #3fb950; --warn: #d29922; --bad: #f85149; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-text-size-adjust: 100%; }
main { max-width: 760px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 12px) 14px calc(env(safe-area-inset-bottom) + 24px); }
header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
h1 { font-size: 22px; margin: 0; } h1 small { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 6px; }
h2 { font-size: 17px; margin: 18px 0 8px; } h2:first-child { margin-top: 0; }
h3 { font-size: 14px; color: var(--muted); font-weight: 600; margin: 16px 4px 6px; text-transform: capitalize; }
.hidden { display: none !important; }
.center { text-align: center; }
.hint { color: var(--muted); font-size: 14px; }
.err { color: var(--bad); }
.pill { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); white-space: nowrap; }
.pill.on { color: var(--ok); border-color: #2a5a35; } .pill.off { color: var(--bad); border-color: #5a2a2a; } .pill.warn { color: var(--warn); border-color: #5a4a20; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 12px 0; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.row:last-of-type { border-bottom: 0; } .row span { color: var(--muted); } .row strong { font-weight: 500; text-align: right; }
button, .button { appearance: none; border: 0; border-radius: 10px; padding: 11px 16px; font: inherit; font-weight: 600; background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
button.secondary, .button.secondary { background: #2d343d; color: var(--text); }
button.danger { background: #5a2226; color: #ffb4b0; }
button.big { width: 100%; padding: 16px; font-size: 18px; }
button:disabled { opacity: .5; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; } .actions > * { flex: 1 1 auto; }
nav { display: flex; gap: 6px; background: var(--card); padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
nav button { flex: 1; background: transparent; color: var(--muted); padding: 9px 4px; font-size: 15px; }
nav button.active { background: #2d343d; color: var(--text); }
.badge { font-size: 12px; color: var(--muted); }
label { display: block; margin: 10px 0; font-size: 15px; }
label.check { display: flex; gap: 10px; align-items: center; }
input[type=number], input[type=password], select { display: block; width: 100%; margin-top: 4px; padding: 10px; border-radius: 9px; border: 1px solid var(--line); background: #0d1014; color: var(--text); font: inherit; }
input[type=range] { width: 100%; margin-top: 8px; } output { font-weight: 600; }
input[type=checkbox] { width: 22px; height: 22px; }
.alert { background: #3a2a10; color: #ffd58a; border: 1px solid #5a4a20; border-radius: 12px; padding: 10px 12px; margin: 10px 0; font-size: 15px; }
.videobox { position: relative; background: #000; border-radius: 14px; overflow: hidden; aspect-ratio: 16/9; margin-top: 12px; }
.videobox video { width: 100%; height: 100%; object-fit: contain; display: block; }
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); text-align: center; padding: 20px; }
.reclist .rec { display: flex; width: 100%; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); color: var(--text); text-align: left; padding: 8px; margin: 6px 0; font-weight: 400; }
.rec img, .rec .noimg { width: 120px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; background: #000; flex: none; }
.rec .noimg { display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); }
.rec span { display: flex; flex-direction: column; } .rec small { color: var(--muted); }
dialog { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 12px; width: min(96vw, 900px); }
dialog::backdrop { background: rgba(0,0,0,.75); }
dialog video { width: 100%; max-height: 70vh; background: #000; border-radius: 10px; }
.login { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.login form { width: min(360px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.login button { width: 100%; margin-top: 12px; }
/* Ueberwachungsseite */
.monitor #preview { width: 100%; max-height: 40vh; background: #000; border-radius: 14px; object-fit: contain; }
.meter { position: relative; height: 14px; background: #0d1014; border-radius: 7px; overflow: hidden; margin: 6px 0 10px; }
#levelBar { height: 100%; width: 0; background: var(--ok); transition: width .1s; } #levelBar.hot { background: var(--bad); }
#thrMark { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--warn); left: 58%; }
.dim { position: fixed; inset: 0; background: #000; z-index: 40; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 30px; }
#dimInfo { color: #333; font-size: 13px; }
.tap { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 45; display: flex; align-items: center; justify-content: center; padding: 30px; }
