:root {
  --bg: #f4f5f7; --karte: #ffffff; --text: #111827; --leise: #6b7280; --linie: #e5e7eb;
  --rot: #dc2626; --gelb: #d97706; --gruen: #16a34a; --grau: #9ca3af; --akzent: #0f766e;
  --rot-bg: #fef2f2; --gelb-bg: #fffbeb; --gruen-bg: #f0fdf4;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1720; --karte: #18212c; --text: #e5e7eb; --leise: #9ca3af; --linie: #2a3442;
    --rot-bg: #3a1717; --gelb-bg: #3a2a10; --gruen-bg: #12301d; --akzent: #2dd4bf;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
#app { max-width: 640px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 12px) 16px calc(env(safe-area-inset-bottom) + 32px); }
h1 { font-size: 20px; margin: 0; font-weight: 600; }
h2 { font-size: 15px; margin: 22px 0 6px; font-weight: 600; }
.kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.kopf .rechts { display: flex; gap: 6px; }
button, .knopf { font: inherit; border: 1px solid var(--linie); background: var(--karte); color: var(--text); border-radius: 10px; padding: 9px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button:active { transform: scale(0.98); }
button.rund { width: 40px; height: 40px; padding: 0; border-radius: 50%; font-size: 18px; }
button.haupt { background: var(--gruen); border-color: var(--gruen); color: #fff; font-weight: 600; }
button.warn { color: var(--rot); }
button[disabled] { opacity: 0.6; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { background: var(--karte); border-radius: 12px; padding: 10px; text-align: center; }
.kpi b { display: block; font-size: 24px; font-weight: 600; }
.kpi span { color: var(--leise); font-size: 12px; }
.kpi.rot b { color: var(--rot); } .kpi.gelb b { color: var(--gelb); }
.liste { background: var(--karte); border-radius: 12px; overflow: hidden; }
.zeile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--linie); color: inherit; text-decoration: none; }
.zeile:last-child { border-bottom: 0; }
.zeile .z { flex: 1; min-width: 0; }
.zeile .z .leise { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.zeile .titel { overflow: hidden; text-overflow: ellipsis; }
.zeile .zahl { color: var(--leise); font-size: 13px; white-space: nowrap; }
.punkt { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.punkt.rot { background: var(--rot); } .punkt.gelb { background: var(--gelb); } .punkt.gruen { background: var(--gruen); } .punkt.grau { background: var(--grau); }
.leise { color: var(--leise); font-size: 13px; }
.mitte { text-align: center; }
.marke { display: inline-block; font-size: 12px; border-radius: 6px; padding: 1px 7px; margin-top: 3px; }
.marke.ok { background: var(--gruen-bg); color: var(--gruen); } .marke.fehler { background: var(--rot-bg); color: var(--rot); } .marke.warte { background: var(--gelb-bg); color: var(--gelb); }
.leer { background: var(--gruen-bg); color: var(--gruen); border-radius: 12px; padding: 16px; text-align: center; font-weight: 600; }
.karte { background: var(--karte); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.werte { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.werte span { background: var(--bg); border-radius: 8px; padding: 3px 9px; font-size: 13px; }
ul.kurz { margin: 6px 0 0; padding-left: 18px; } ul.kurz li { margin-bottom: 4px; }
iframe.vorschau { width: 100%; height: 60vh; border: 1px solid var(--linie); border-radius: 12px; background: #fff; }
.aktionen { display: flex; gap: 8px; margin: 12px -16px 0; padding: 10px 16px calc(env(safe-area-inset-bottom) + 10px); position: sticky; bottom: 0; background: var(--bg); }
details summary { cursor: pointer; margin: 8px 0 4px; }
.hinweis { background: var(--rot-bg); border-radius: 10px; padding: 10px; font-size: 14px; }
.sprechen textarea { min-height: 52px; }
.plus { color: var(--gruen); } .minus { color: var(--rot); }
.kpi span .plus, .kpi span .minus { font-weight: 600; }
.aktionen button { flex: 1; padding: 12px; }
textarea, input { font: inherit; width: 100%; border: 1px solid var(--linie); border-radius: 10px; padding: 10px; background: var(--karte); color: var(--text); }
textarea { min-height: 110px; resize: vertical; }
.eingabe { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; }
.eingabe textarea { flex: 1; }
.mic.an { background: var(--rot); color: #fff; border-color: var(--rot); }
.fehlertext { color: var(--rot); font-size: 13px; margin-top: 6px; }
.antwort { background: var(--bg); border-radius: 10px; padding: 10px; margin-top: 10px; white-space: pre-wrap; }
.login { max-width: 340px; margin: 18vh auto 0; }
.login input { margin-bottom: 10px; }
.login button { width: 100%; }
.fuss { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
pre.inhalt { white-space: pre-wrap; font: 13px/1.5 ui-monospace, Menlo, monospace; background: var(--bg); padding: 10px; border-radius: 10px; overflow-x: auto; }
