:root { --bg:#f4f5f7; --card:#fff; --ink:#1c2430; --muted:#667085; --line:#dfe3ea; --accent:#c8102e; --ok:#1a7f4b; --warn:#b26a00; }
* { box-sizing: border-box; }
body { margin:0; font:15px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; background:var(--bg); color:var(--ink); }
header { background:var(--ink); color:#fff; display:flex; align-items:center; gap:24px; padding:0 24px; height:54px; }
header .brand { font-weight:700; letter-spacing:.3px; } header .brand span { color:#ff5a72; }
header nav { display:flex; gap:18px; flex:1; } header a { color:#d5dae3; text-decoration:none; } header a:hover { color:#fff; }
header form { margin:0; } header button { background:none; border:1px solid #556; color:#d5dae3; padding:4px 10px; }
main { max-width:1100px; margin:24px auto; padding:0 20px; }
h1 { font-size:22px; margin:0 0 16px; } h2 { font-size:17px; margin:0 0 12px; }
a { color:#0b5cad; }
.card { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:18px 20px; margin-bottom:20px; }
.row { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
table { width:100%; border-collapse:collapse; } th,td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--line); vertical-align:top; }
th { font-size:12px; text-transform:uppercase; letter-spacing:.5px; color:var(--muted); }
td.detail { font-size:13px; color:var(--muted); word-break:break-word; max-width:380px; }
label { display:block; font-weight:600; margin:12px 0 4px; } label.check { font-weight:400; display:flex; gap:8px; align-items:center; }
input[type=text],input[type=password],input[type=number],select,textarea { width:100%; padding:8px 10px; border:1px solid #c4cad4; border-radius:6px; font:inherit; background:#fff; }
textarea { min-height:90px; font-family:ui-monospace,Consolas,monospace; font-size:13px; }
.grid { display:grid; grid-template-columns:1fr 1fr; gap:0 20px; } @media (max-width:700px){ .grid{ grid-template-columns:1fr; } }
.hint { color:var(--muted); font-size:13px; margin:4px 0 0; }
button,.btn { display:inline-block; background:var(--accent); color:#fff; border:0; border-radius:6px; padding:8px 14px; font:inherit; cursor:pointer; text-decoration:none; }
.btn.light,button.light { background:#eef0f4; color:var(--ink); border:1px solid var(--line); }
button.link { background:none; color:#b42318; padding:0; } form.inline { display:inline; margin:0 0 0 8px; }
.actions { margin-top:18px; display:flex; gap:10px; align-items:center; }
.flash { padding:10px 14px; border-radius:6px; margin-bottom:16px; background:#e6f4ec; border:1px solid #b5dcc5; } .flash.err { background:#fdecea; border-color:#f3c2bd; }
.tag { display:inline-block; padding:1px 8px; border-radius:10px; font-size:12px; background:#eef0f4; }
.tag.gesendet { background:#dff3e7; color:var(--ok); } .tag.fehler { background:#fde4e1; color:#b42318; } .tag.test,.tag.veraltet { background:#fff1d6; color:var(--warn); }
code { background:#eef0f4; padding:1px 5px; border-radius:4px; font-size:13px; word-break:break-all; }
pre { background:#101828; color:#e4e7ec; padding:12px; border-radius:6px; overflow:auto; font-size:13px; }
.login { max-width:360px; margin:80px auto; }

/* Regelseite mit Live-Ansicht */
main { max-width:1280px; }
.split { display:grid; grid-template-columns:minmax(0,1fr) 400px; gap:20px; align-items:start; }
.live { position:sticky; top:16px; max-height:calc(100vh - 32px); overflow:auto; }
@media (max-width:1000px){ .split{ grid-template-columns:1fr; } .live{ position:static; max-height:none; } }
.live h3 { font-size:12px; text-transform:uppercase; letter-spacing:.5px; color:var(--muted); margin:16px 0 6px; }
.live .state { padding:8px 12px; border-radius:6px; font-weight:600; background:#fde4e1; color:#b42318; }
.live .state.ok { background:#dff3e7; color:var(--ok); }
.live ul { list-style:none; margin:0; padding:0; } .live li { padding:3px 0; font-size:14px; word-break:break-word; }
.live .yes::before { content:"\2713  "; color:var(--ok); font-weight:700; } .live .no::before { content:"\2717  "; color:#b42318; font-weight:700; }
.live .msg { border:1px solid var(--line); border-left:4px solid var(--accent); border-radius:6px; padding:10px 12px; }
.live .msg.news { border-left-color:#0b5cad; } .live .msg.off { opacity:.45; }
.live .msg .t { font-weight:700; font-size:16px; } .live .msg .a { color:var(--muted); margin:2px 0 6px; }
.live .msg .x { white-space:pre-wrap; font-size:14px; max-height:220px; overflow:auto; word-break:break-word; }
.live .count { font-size:12px; color:var(--muted); } .live .count.over { color:#b42318; font-weight:600; }
.live .warn { background:#fff1d6; color:#7a4b00; border-radius:6px; padding:6px 10px; font-size:13px; margin-top:6px; }
.live details { margin-top:12px; } .live summary { cursor:pointer; color:var(--muted); font-size:13px; }
.live pre { font-size:12px; max-height:260px; }

/* Legende und Abschnittsüberschriften der Regelseite */
h2.step { margin-top:26px; padding-top:16px; border-top:1px solid var(--line); }
.legend summary { cursor:pointer; font-weight:600; } .legend table { margin-top:12px; } .legend td { font-size:14px; }
.card .hint + label, .card .hint + .grid { margin-top:14px; }
button:disabled { opacity:.5; cursor:not-allowed; }
.picklist { border:1px solid #c4cad4; border-radius:6px; padding:6px 10px; max-height:190px; overflow:auto; background:#fff; }
.picklist label.check { margin:3px 0; } .pickfilter { margin-bottom:6px; }

/* Marke, Sponsor-Link und Fußzeile */
header a.brand { display:flex; flex-direction:column; line-height:1.15; color:#fff; text-decoration:none; font-weight:700; letter-spacing:.3px; }
header a.brand > span { display:inline; } header a.brand { display:block; }
.brand small, .loginbrand small { display:block; font-size:10.5px; font-weight:400; letter-spacing:.6px; color:#9aa4b5; margin-top:1px; }
.loginbrand span { color:var(--accent); } .loginbrand small { color:var(--muted); font-size:12px; margin-top:2px; }
a.sponsor { display:inline-flex; align-items:center; gap:6px; text-decoration:none; }
header a.sponsor { border:1px solid #556; border-radius:6px; padding:4px 10px; color:#d5dae3; font-size:14px; }
header a.sponsor:hover { border-color:#db61a2; color:#fff; }
.heart { color:#db61a2; }
footer { max-width:1280px; margin:8px auto 28px; padding:0 20px; color:var(--muted); font-size:13px; text-align:center; }
footer a { color:var(--muted); } footer a:hover { color:var(--ink); } footer a.sponsor:hover .heart { color:#bf3989; }

/* Übersicht für Administratoren */
.split2 { display:grid; grid-template-columns:1fr 1fr; gap:20px; align-items:start; } @media (max-width:1000px){ .split2{ grid-template-columns:1fr; } }
.split2 h3 { font-size:12px; text-transform:uppercase; letter-spacing:.5px; color:var(--muted); margin:18px 0 4px; }
.stats { display:flex; gap:12px; margin-bottom:12px; }
.stat { flex:1; display:flex; align-items:center; gap:12px; border:1px solid var(--line); border-radius:8px; padding:10px 14px; }
.stat strong { font-size:30px; line-height:1; } .stat span { font-size:13px; color:var(--muted); line-height:1.3; }
.stat.ok strong { color:var(--ok); } .stat.bad { border-color:#f3c2bd; background:#fdf3f2; } .stat.bad strong { color:#b42318; }
.dot { display:inline-block; width:9px; height:9px; border-radius:50%; background:#c4cad4; margin-right:8px; } .dot.on { background:#2fa863; }
.tag.ignoriert { background:#eef0f4; color:var(--muted); }

/* Hilfeseite */
.helpnav { margin:-6px 0 16px; color:var(--muted); } html { scroll-behavior:smooth; } .card[id] { scroll-margin-top:12px; }
ol.steps { margin:0; padding-left:22px; } ol.steps li { padding:5px 0; }
#felder h3, .faq h3 { font-size:12px; text-transform:uppercase; letter-spacing:.5px; color:var(--muted); margin:20px 0 6px; }
.faq details { border-top:1px solid var(--line); padding:9px 0; } .faq details:last-of-type { border-bottom:1px solid var(--line); }
.faq summary { cursor:pointer; font-weight:600; } .faq details p { margin:8px 0 2px; color:#344054; }

/* Protokoll-Reiter und Stufen des Systemprotokolls */
.tabs { display:flex; gap:6px; margin:0 0 -1px; } .tabs a { padding:8px 14px; border:1px solid var(--line); border-bottom:0; border-radius:8px 8px 0 0; background:#eef0f4; color:var(--ink); text-decoration:none; }
.tabs a.on { background:#fff; font-weight:600; } .tabs + .card { border-top-left-radius:0; }
.tag.warnung { background:#fff1d6; color:var(--warn); } .tag.info { background:#e8f0fb; color:#0b5cad; }

.tiles { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:14px; margin:6px 0 22px; }
.tile { display:block; background:#fff; border:1px solid var(--line); border-radius:10px; padding:16px 18px; text-decoration:none; color:inherit; }
.tile:hover { border-color:#8a94a6; box-shadow:0 2px 8px rgba(20,30,50,.08); }
.tile strong { display:block; font-size:16px; margin-bottom:4px; } .tile span { font-size:13px; color:var(--muted); line-height:1.35; }
.tile.alarm { border-left:4px solid #c8102e; }
header { height:auto; min-height:54px; flex-wrap:wrap; gap:6px 14px; padding:6px 18px; }
header .brand, header nav a, header button, header a.sponsor { white-space:nowrap; }
header nav { gap:4px 12px; flex-wrap:wrap; font-size:14.5px; }

/* Als App und auf dem Handy */
.hint.bad { color:#b42318; } .actions.wrap { flex-wrap:wrap; } .scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }
#push-card h3 { font-size:12px; text-transform:uppercase; letter-spacing:.5px; color:var(--muted); margin:20px 0 6px; }
[hidden] { display:none !important; }
header { padding-top:calc(6px + env(safe-area-inset-top)); padding-left:calc(18px + env(safe-area-inset-left)); padding-right:calc(18px + env(safe-area-inset-right)); }
footer { padding-bottom:env(safe-area-inset-bottom); }
@media (max-width:760px) {
  body { font-size:16px; }
  /* Kopfzeile: Marke und Abmelden oben, das Menü darunter als Leiste zum Wischen */
  header { gap:6px 10px; padding-bottom:0; }
  header .brand { flex:1; order:1; } header a.sponsor { display:none; } header form { order:2; }
  header nav { order:3; flex:0 0 100%; flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; gap:0; margin:0 -18px; padding:0 10px; }
  header nav::-webkit-scrollbar { display:none; }
  header nav a { padding:11px 9px; font-size:15px; }
  main { margin:16px auto; padding:0 12px; } .card { padding:14px; margin-bottom:14px; }
  /* Eingabefelder mit 16 Pixeln, sonst zoomt das iPhone beim Antippen hinein */
  input[type=text],input[type=password],input[type=number],input[type=file],select,textarea { font-size:16px; padding:10px; }
  button,.btn { padding:11px 16px; } header button { padding:6px 10px; font-size:14px; } button.link { padding:8px 0; }
  .actions { flex-wrap:wrap; } label.check { padding:5px 0; } label.check input { width:20px; height:20px; flex:none; }
  /* Breite Tabellen lassen sich in ihrer Karte seitlich schieben, statt die Seite zu sprengen */
  .card:has(> table), .card:has(> form > table) { overflow-x:auto; -webkit-overflow-scrolling:touch; }
  th,td { padding:8px 8px; } td.detail { max-width:240px; } td code { word-break:normal; white-space:nowrap; } td.detail code { word-break:break-all; white-space:normal; }
  .stats { flex-wrap:wrap; } .stat { flex:1 1 130px; } .tiles { grid-template-columns:1fr 1fr; gap:10px; } .tile { padding:14px; }
  .tabs { overflow-x:auto; } .tabs a { white-space:nowrap; }
  .login { margin:32px auto; }
}
@media (max-width:420px) { .tiles { grid-template-columns:1fr; } }

/* ---------- Erscheinungsbild ab dem neuen Logo: Feuerfarben, Flammen und Atemschutzträger als Seitenfuß ---------- */
:root { --bg:#f7f4f0; --ink:#16181d; --muted:#6a645d; --line:#e5ded4; --accent:#16181d; --feuer:#ee7d22; --glut:#9a3d0a; --alarm:#c8102e; }
html { background:var(--ink); }
body { min-height:100vh; min-height:100dvh; display:flex; flex-direction:column; background:var(--bg); }
main { flex:1 0 auto; width:100%; }
a { color:var(--glut); }
header { background:var(--ink); border-bottom:4px solid var(--feuer); }
header a.brand { display:flex; flex-direction:row; align-items:center; gap:10px; } header a.brand > span.name { display:block; color:#fff; }
header a.brand > span.name > span { color:#ffa54a; } header a.brand img { border-radius:7px; flex:none; }
header nav a:hover, header nav a:focus-visible { color:#ffa54a; }
header a.sponsor:hover { border-color:#ffa54a; }
button:not([class]):hover, .btn:not(.light):not(.klein):hover { background:#2b2f37; } .btn.light:hover, button.light:hover { background:#e9e4dc; } button.link:hover { text-decoration:underline; }
.btn.light, button.light { background:#f1ede7; border-color:var(--line); }
.loginbrand { text-align:center; } .loginbrand img { display:block; margin:0 auto 12px; border-radius:20px; box-shadow:0 6px 18px rgba(154,61,10,.28); }
.loginbrand span { color:var(--glut); }
.login { margin-top:56px; border-top:4px solid var(--feuer); }
.card { box-shadow:0 1px 2px rgba(22,24,29,.04); }
.tile:hover { border-color:var(--feuer); } .tile.alarm { border-left:4px solid var(--alarm); }
code { background:#f1ede7; } th { color:var(--muted); }
/* Fester Rahmen: Kopfzeile oben, Flammen und Fußzeile unten am Fensterrand, der Inhalt läuft dazwischen.
   Die Höhe der Flammen richtet sich nach der Höhe des Fensters. */
:root { --fuss-feuer:clamp(56px, 13vh, 150px); --fuss-zeile:38px; --fuss-h:calc(var(--fuss-feuer) + var(--fuss-zeile) + env(safe-area-inset-bottom)); }
body { padding-bottom:calc(var(--fuss-h) + 16px); }
main, main.breit { max-width:1400px; }
footer.fuss { position:fixed; left:0; right:0; bottom:0; z-index:15; max-width:none; width:auto; height:var(--fuss-h); margin:0; padding:0; overflow:hidden; text-align:left;
  background:url(/static/img/feuer.webp) center 7% / max(100%, 1100px) auto no-repeat, linear-gradient(to bottom, rgba(247,244,240,0), var(--bg) 26px); }
footer.fuss .fuss-figur { position:absolute; right:max(4%, calc(50% - 640px)); top:4px; bottom:auto; height:calc(var(--fuss-feuer) * 2.5); width:auto; opacity:.5; pointer-events:none; user-select:none; }
footer.fuss .fuss-zeile { position:absolute; left:0; right:0; bottom:0; height:calc(var(--fuss-zeile) + env(safe-area-inset-bottom)); padding:0 16px env(safe-area-inset-bottom);
  display:flex; align-items:center; justify-content:center; gap:.45em; white-space:nowrap; background:rgba(22,24,29,.94); color:#d9dde4; font-size:13px; }
footer.fuss .fuss-zeile a { color:#fff; } footer.fuss .fuss-zeile a:hover { color:#ffa54a; }
@media (min-width:1200px) {
  header { position:sticky; top:0; z-index:20; } html { scroll-padding-top:76px; } .card[id] { scroll-margin-top:76px; }
  .live { top:76px; max-height:calc(100vh - 76px - var(--fuss-h) - 16px); }
}
@media (max-width:760px) {
  :root { --fuss-feuer:clamp(40px, 8vh, 72px); --fuss-zeile:34px; }
  footer.fuss .fuss-figur { right:-6px; } footer.fuss .fuss-zeile { font-size:12px; } footer.fuss .fz-von { display:none; }
  header a.brand img { width:26px; height:26px; }
}
/* Sehr niedrige Fenster (Handy quer): nichts festhalten, der Fuß steht wieder am Ende der Seite */
@media (max-height:520px) {
  :root { --fuss-feuer:56px; } body { padding-bottom:0; } header { position:static; }
  footer.fuss { position:relative; flex:none; margin-top:24px; }
}
@media print { footer.fuss { display:none; } header { position:static; } body { display:block; background:#fff; padding-bottom:0; } }
.live .msg { border-left-color:var(--alarm); } .live .msg.news { border-left-color:#0b5cad; }
.tabs a { background:#f1ede7; } .tabs a.on { background:#fff; border-top:3px solid var(--feuer); }
.stat.ok strong { color:var(--ok); }
