@font-face { font-family: "Open Sans"; src: url(opensans-latin.woff2) format("woff2"); font-weight: 300 800; unicode-range: U+0000-00FF, U+2000-206F, U+20AC; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url(opensans-latin-ext.woff2) format("woff2"); font-weight: 300 800; unicode-range: U+0100-024F, U+1E00-1EFF; font-display: swap; }
:root {
  --bg: #121417; --panel: #1b1e23; --panel2: #262a31; --line: #3a3f49;
  --fg: #f5f3ef; --mut: #aeb2ba; --acc: #ff8a2b; --acc-ink: #1d1206; --ci: #d90a2c;
  --rot: #ff6b5f; --gelb: #ffc04d; --orange: #ff9a3c; --gruen: #46c98b; --grau: #8a8f98; --blau: #6aa5ff;
  --body: "Open Sans", "Segoe UI", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 400 16px/1.45 var(--body); padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
[hidden] { display: none !important; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; background: var(--panel); border-bottom: 1px solid var(--line);
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; }
.logo { height: 28px; width: auto; border-radius: 4px; background: #fff; padding: 2px; }
.titel { font-weight: 700; font-size: 18px; flex: 1; }
.leise { background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; color: var(--mut); cursor: pointer; }

main { max-width: 760px; margin: 0 auto; padding: 16px; }
h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); margin: 26px 0 10px; }
h2:first-child { margin-top: 4px; }
p.mut, .mut { color: var(--mut); }
.klein { font-size: 13px; }

.notruf { display: flex; align-items: center; justify-content: center; gap: 12px; background: var(--ci); color: #fff; text-decoration: none; border-radius: 14px;
  padding: 18px; font-size: 22px; font-weight: 800; box-shadow: 0 0 24px rgba(217, 10, 44, .35); }
.notruf small { display: block; font-size: 13px; font-weight: 400; opacity: .9; }
.reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.knopf { display: block; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-decoration: none; font-weight: 700; cursor: pointer; text-align: left; width: 100%; }
.knopf small { display: block; font-weight: 400; color: var(--mut); font-size: 13px; margin-top: 2px; }
.knopf.acc { border-color: var(--acc); box-shadow: 0 0 18px rgba(255, 138, 43, .18); }

.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.eintrag { display: flex; gap: 12px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.eintrag a { text-decoration: none; }
.punkt { flex: none; width: 12px; height: 12px; border-radius: 50%; margin-top: 6px; background: var(--grau); }
.eintrag .haupt { flex: 1; min-width: 0; }
.eintrag .thema { font-weight: 600; overflow-wrap: anywhere; }
.eintrag .zusatz { color: var(--mut); font-size: 13px; }
.chip { flex: none; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 9px; white-space: nowrap; background: var(--panel2); }

.s-ueberfaellig .punkt, .chip.s-ueberfaellig { background: var(--rot); color: #1a0503; }
.s-bald .punkt, .chip.s-bald { background: var(--gelb); color: #201500; }
.s-fehlt .punkt, .chip.s-fehlt { background: var(--orange); color: #1d0e00; }
.s-ok .punkt, .chip.s-ok { background: var(--gruen); color: #06170f; }
.s-erledigt .punkt, .chip.s-erledigt { background: var(--grau); color: #111; }
.s-bedarf .punkt, .chip.s-bedarf { background: var(--blau); color: #04101f; }

.zahlen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.zahl { border-radius: 12px; padding: 10px; background: var(--panel); border: 1px solid var(--line); }
.zahl b { display: block; font-size: 28px; line-height: 1.1; }
.zahl span { font-size: 12px; color: var(--mut); }
.zahl.s-ueberfaellig b { color: var(--rot); } .zahl.s-bald b { color: var(--gelb); } .zahl.s-fehlt b { color: var(--orange); } .zahl.s-ok b { color: var(--gruen); }

.filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.filter button { background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 14px; }
.filter button.an { border-color: var(--acc); color: var(--acc); }

.tabelle { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { background: var(--panel2); font-weight: 700; position: sticky; top: 0; }
th.spalte { white-space: normal; min-width: 84px; font-size: 12px; }
td.name { position: sticky; left: 0; background: var(--panel); font-weight: 700; }
td.zelle { text-align: center; }
td.zelle span { display: inline-block; border-radius: 6px; padding: 2px 6px; }

.monat { margin-top: 14px; }
.monat h3 { font-size: 15px; margin: 0 0 6px; }

.nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; display: flex; background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.nav a { flex: 1; text-align: center; padding: 12px 4px; text-decoration: none; color: var(--mut); font-size: 14px; font-weight: 600; }
.nav a.an { color: var(--acc); box-shadow: inset 0 3px 0 var(--acc); }

.karte { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; max-width: 420px; margin: 24px auto; }
.karte label { display: block; font-size: 14px; color: var(--mut); margin: 12px 0 4px; }
.karte input { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.karte button[type=submit] { margin-top: 16px; width: 100%; background: var(--acc); color: var(--acc-ink); border: 0; border-radius: 10px; padding: 13px; font-weight: 800; cursor: pointer; }
.hinweis { background: var(--panel2); border-left: 4px solid var(--acc); border-radius: 8px; padding: 10px 12px; margin: 10px 0; font-size: 14px; }
.fehler { color: var(--rot); margin-top: 10px; min-height: 1.4em; }
#toast { position: fixed; left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; z-index: 9; }

@media (max-width: 420px) {
  .zahlen { grid-template-columns: repeat(2, 1fr); }
  .notruf { font-size: 20px; }
}
