/*
 * Filialsteuerung – Bausteine der Seiten unter public/fs/ (alles unter .fs) und die Leiste unten am Handy.
 * Kopf, Reiter, Farben und Schrift kommen aus app.css (eine Oberfläche für die ganze App). Keine Inline-Styles (CSP).
 */
.fs { --gruen: #1f8a4c; --gelb: #d9a400; --rot: #c8102e; --linie: var(--rand); --flaeche: #eef2f7; }

/* Titelzeile der Seite */
.fs-kopf { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.fs-kopf .fs-titel { margin: 0; font-size: 1.5rem; }
.fs-zurueck { font-size: 1.6rem; line-height: 1; color: var(--blau-hell); }
.fs-zurueck:hover { text-decoration: none; }
.fs-stempel { font-size: .8rem; color: var(--dezent); }
.fs-kopf .fs-stempel { margin-left: auto; }
.fs .fs-meldung { padding: .6rem .8rem; border-radius: 7px; margin-bottom: .8rem; }

.fs .zeile { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: .8rem; }
.fs .kachel { flex: 1 1 150px; border: 1px solid var(--linie); border-radius: var(--radius); padding: .6rem .8rem; background: var(--karte); box-shadow: var(--schatten); }
.fs .kachel .l { font-size: .78rem; color: var(--dezent); }
.fs .kachel .w { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.fs .kachel .d { font-size: .78rem; color: var(--dezent); }
.fs .plus { color: var(--gruen) !important; } .fs .minus { color: var(--rot) !important; }

.fs .fs-box { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: .8rem; box-shadow: var(--schatten); }
.fs .fs-box h3 { margin: 0 0 .4rem; font-size: .95rem; color: var(--blau); }
.fs .fs-box p { margin: .3rem 0; }
.fs .melde { display: flex; gap: .5rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--linie); color: var(--text); }
.fs .melde:last-child { border-bottom: 0; }
.fs .melde > span:not(.frist):not(.ampel) { flex: 1; min-width: 0; }
.fs .melde .frist { margin-left: auto; color: var(--dezent); white-space: nowrap; }
.fs a.melde:hover { background: var(--flaeche); text-decoration: none; }

.ampel { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 50%; background: #d5dbe3; }
.ampel.g { background: #1f8a4c; } .ampel.y { background: #d9a400; } .ampel.r { background: #c8102e; }
.fs-kopf .ampel { width: 16px; height: 16px; }

/* Filter, Knöpfe */
.fs .fs-filter { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; align-items: center; }
.fs .fs-filter select, .fs .fs-filter input, .fs .fs-zeilenform input, .fs .fs-zeilenform select {
    font: inherit; font-size: .9rem; padding: .4rem .55rem; border: 1px solid var(--linie); border-radius: 7px; background: var(--karte); min-height: 2.3rem; max-width: 100%; }
.fs .fs-knopf { display: inline-block; text-align: center; background: var(--blau); color: #fff; border: 0; border-radius: 7px; padding: .55rem 1rem; font: inherit; font-weight: 600; cursor: pointer; }
.fs .fs-knopf.klein { padding: .35rem .7rem; font-size: .85rem; }
.fs .fs-knopf.sekundaer { background: var(--flaeche); color: var(--blau); }
.fs .fs-knopf:hover { text-decoration: none; background: var(--blau-hell); color: #fff; }

/* Rangliste */
.fs .fkarte { display: block; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: .6rem .8rem; margin-bottom: .5rem; color: var(--text); }
.fs .fkarte:hover { background: var(--flaeche); text-decoration: none; }
.fs .fkarte .o { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.fs .fkarte .o span { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fs .fkarte .u { display: flex; justify-content: space-between; gap: .5rem; font-size: .78rem; color: var(--dezent); margin-top: .2rem; }
.fs meter { width: 100%; height: 8px; display: block; margin-top: .3rem; }
.fs meter::-webkit-meter-bar { background: var(--linie); border: 0; border-radius: 4px; height: 8px; }
.fs meter::-webkit-meter-optimum-value { background: var(--blau-hell); border-radius: 4px; }
.fs meter::-moz-meter-bar { background: var(--blau-hell); border-radius: 4px; }

/* Reiter innerhalb einer Filialseite (Optionen der Seite, keine Hauptreiter) */
.fs .fs-reiter { display: flex; gap: .4rem; overflow-x: auto; margin-bottom: .8rem; scrollbar-width: none; }
.fs .fs-reiter a { flex: none; padding: .3rem .8rem; border-radius: 16px; background: var(--karte); border: 1px solid var(--linie); color: var(--dezent); font-size: .85rem; }
.fs .fs-reiter a.an { background: var(--blau); border-color: var(--blau); color: #fff; }
.fs .fs-reiter a:hover { text-decoration: none; }
.fs .fs-pfad { font-size: .85rem; margin-bottom: .8rem; color: var(--dezent); }

/* Tabellen */
.fs .fs-tabelle { overflow-x: auto; }
.fs table { border-collapse: collapse; width: 100%; font-size: .85rem; }
.fs th { text-align: left; font-size: .78rem; color: var(--dezent); background: var(--flaeche); padding: .45rem .5rem; font-weight: 600; white-space: nowrap; }
.fs td { padding: .45rem .5rem; border-bottom: 1px solid var(--linie); }
.fs td.z, .fs th.z { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fs td meter { min-width: 70px; margin: 0; }
.fs tr.rot td:first-child { border-left: 3px solid var(--rot); } .fs tr.gelb td:first-child { border-left: 3px solid var(--gelb); }

/* Diagramme (SVG) */
.fs-chart { width: 100%; height: auto; display: block; }
.fs-chart .saeule { fill: var(--blau-hell); }
.fs-chart .saeule.vergleich { fill: #b9c9da; }
.fs-chart .saeule.neg { fill: #c8102e; }
.fs-chart .zelle { fill: var(--blau-hell); }
.fs-chart .nulllinie { stroke: var(--rand); }
.fs-chart text { font-size: 10px; fill: var(--dezent); }

/* Verwaltung */
.fs .fs-zeilenform { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--linie); }
.fs .fs-zeilenform .fs-stempel { width: 100%; }
.fs .fs-zeilenform input[name="name"] { flex: 1 1 180px; }
.fs .fs-sicht { padding: .5rem 0; border-bottom: 1px solid var(--linie); }
.fs .fs-sicht > b { display: block; margin-bottom: .25rem; }
.fs .fs-marke { display: inline-flex; align-items: center; gap: .25rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: .1rem .25rem .1rem .6rem; margin: 0 .25rem .4rem 0; font-size: .85rem; }
.fs .fs-marke button { border: 0; background: none; color: #c8102e; font-size: 1rem; cursor: pointer; padding: 0 .25rem; }

/* Leiste unten: nur am Handy */
.fs-leiste { display: none; }
@media (max-width: 899px) {
    body.mit-leiste { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
    .fs-leiste { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--karte);
        border-top: 1px solid var(--rand); padding-bottom: env(safe-area-inset-bottom); }
    .fs-leiste a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
        min-height: 58px; font-size: 11px; color: var(--dezent); }
    .fs-leiste a.an { color: var(--blau); font-weight: 600; }
    .fs-leiste a:hover { text-decoration: none; }
    .fs-symbol { width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
    .fs-symbol-index { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E"); }
    .fs-symbol-filialen { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='13' width='4' height='8' rx='1'/%3E%3Crect x='10' y='8' width='4' height='13' rx='1'/%3E%3Crect x='17' y='3' width='4' height='18' rx='1'/%3E%3C/svg%3E"); }
    .fs-symbol-aufgaben { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6h16M4 12h16M4 18h10' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E"); }
    .fs-symbol-berichte { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h9l5 5v15H6z' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M9 13h8M9 17h8' stroke='black' stroke-width='2'/%3E%3C/svg%3E"); }
    .fs-symbol-ich { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4.5'/%3E%3Cpath d='M3 22c1-5 5-7.5 9-7.5s8 2.5 9 7.5z'/%3E%3C/svg%3E"); }
}
@media (max-width: 599px) { .fs .weg { display: none; } .fs-kopf .fs-titel { font-size: 1.2rem; } }
.fs .fs-tuev { display: flex; gap: .25rem; align-items: center; }
.fs .fs-tuev input { font: inherit; font-size: .8rem; padding: .15rem .3rem; border: 1px solid var(--linie); border-radius: 5px; }

/* Filter nebeneinander: app.css setzt select/input global auf 100 % Breite */
.fs .fs-filter select, .fs .fs-filter input:not([type="hidden"]) { width: auto; flex: 0 1 auto; }
@media (max-width: 599px) { .fs .fs-filter select { flex: 1 1 45%; } }

/* Lage (Chef-Dashboard) */
.fs .fs-gesamt { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border-radius: var(--radius); margin-bottom: .8rem;
    color: var(--text); border: 1px solid var(--linie); background: var(--karte); }
.fs .fs-gesamt:hover { text-decoration: none; }
.fs .fs-gesamt .ampel { width: 18px; height: 18px; }
.fs .fs-gesamt .frist { margin-left: auto; color: var(--dezent); }
.fs .fs-gesamt.r { background: #fdecea; border-color: #f5c6c2; }
.fs .fs-gesamt.y { background: #fff6e0; border-color: #f2d78a; }
.fs .fs-gesamt.g { background: #e7f6ec; border-color: #bfe6cd; }
.fs .melde small { color: var(--dezent); }
.fs .kachel .d + .d { margin-top: 0; }

/* Pflegetabelle (Einstellungen → Filialen & Sicht) */
.fs .fs-pflege td { padding: .3rem .4rem; vertical-align: middle; }
.fs .fs-pflege input[type="text"], .fs .fs-pflege select { width: 100%; min-width: 7rem; padding: .3rem .45rem; font-size: .85rem; border: 1px solid var(--linie); border-radius: 6px; background: #fff; }
.fs .fs-pflege td:nth-child(2) input { min-width: 11rem; }
.fs .fs-pflege tr.inaktiv td { opacity: .55; }
.fs .fs-pflege tr.geaendert td { background: #fff8e1; }
.fs .fs-pflege td.mitte { text-align: center; }
.fs .fs-speicherleiste { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: .8rem;
    background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: .5rem .8rem; margin-bottom: .8rem; box-shadow: var(--schatten); }
.fs .fs-speicherleiste .fs-knopf:disabled { opacity: .45; cursor: default; }
@media (max-width: 899px) { .fs .fs-speicherleiste { bottom: calc(60px + env(safe-area-inset-bottom)); } }
.fs .fs-mehrfach summary { cursor: pointer; }
.fs .fs-mehrfach .fs-filter { margin: .6rem 0 .2rem; }
.fs input[type="search"] { font: inherit; font-size: .9rem; padding: .4rem .55rem; border: 1px solid var(--linie); border-radius: 7px; min-height: 2.3rem; }

/* Einstellungen → Filialen & Sicht: Abgleich mit der Filialliste */
.fs .fs-abgleich { border-left: 4px solid #e0a800; }
.fs .fs-abgleich .fs-liste { list-style: none; padding: 0; margin: .4rem 0 .8rem; }
.fs .fs-abgleich .fs-liste li { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .3rem 0; border-bottom: 1px solid var(--linie); }
.fs .fs-abgleich .fs-liste li small { flex: 1 1 12rem; }

/* Prüfdaten: Erfassung durch die Filiale, Prüfung durch die Zentrale */
.fs .fs-pruef h3 { margin-bottom: .5rem; }
.fs .fs-pruef-form { display: grid; gap: .5rem; padding: .6rem 0; border-top: 1px solid var(--linie); }
.fs .fs-pruef-form label { display: grid; gap: .2rem; }
.fs .fs-pruef-form input[type="file"], .fs .fs-pruef-form input[type="date"] { width: 100%; max-width: 22rem; }
.fs .fs-haken { display: flex !important; gap: .5rem; align-items: flex-start; }
.fs .fs-haken input { width: auto; margin-top: .2rem; }
.fs .fs-pruef-form .fs-knopf { justify-self: start; }
.fs .fs-pruef-zeile { display: flex; gap: .8rem; align-items: flex-start; padding: .6rem 0; border-bottom: 1px solid var(--linie); }
.fs .fs-pruef-bild { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid var(--linie); }
.fs .fs-pruef-datei { display: inline-grid; place-items: center; width: 96px; height: 96px; border-radius: 6px; border: 1px dashed var(--linie); color: var(--dezent); font-size: .8rem; }
@media (min-width: 900px) { .fs .fs-pruef-form { grid-template-columns: 1fr 1fr 1fr auto; align-items: end; } .fs .fs-pruef-kopf { grid-column: 1 / -1; } }

/* ---- 0.996: Auftritt nach dem Oberflächenentwurf (Geocom-Blau, weiße Karten, BI-Diagramme) ---- */
.fs { --blau: #004890; --blau-hell: #2f6db5; --blau-zart: #b8cbe2; --flaeche: #eef3f9; }
.fs .fs-titel { color: #1d2329; }
.fs .fs-box h3 { color: #004890; font-size: 1rem; }
.fs .kachel { border: 1px solid #dde4ec; border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.04); padding: .75rem .9rem; }
.fs .kachel .l { text-transform: none; letter-spacing: 0; }
.fs .kachel .w { font-size: 1.55rem; color: #1d2329; }
.fs .kachel .ziel { height: 6px; background: #e4ebf3; border-radius: 3px; margin-top: .45rem; overflow: hidden; }
.fs .kachel meter.ziel { width: 100%; height: 8px; }
.fs-chart text { font-size: 11px; fill: #6b7787; }
.fs-chart .achse { font-size: 10.5px; }
.fs-chart .gitter { stroke: #e4ebf3; }
.fs-chart .reihe { fill: none; stroke: #004890; stroke-width: 2.6; stroke-linejoin: round; }
.fs-chart .reihe.vergleich { stroke: #9fb6d3; stroke-width: 2; stroke-dasharray: 6 5; }
.fs-chart .punkt { fill: #004890; }
.fs-chart text.wert { fill: #1d2329; font-weight: 700; font-size: 11.5px; }
.fs-chart .saeule { fill: #004890; }
.fs-chart .saeule.vergleich { fill: #b8cbe2; }
.fs-chart .zelle { fill: #004890; }
.fs-rang .balken { fill: #004890; }
.fs-rang .balken.schwach { fill: #c8102e; }
.fs-rang .name { fill: #1d2329; font-size: 11.5px; }
.fs-rang a .name { fill: #004890; }
.fs-rang a:hover .name { text-decoration: underline; }
.fs-rang .mittel { stroke: #e0a800; stroke-width: 1.5; stroke-dasharray: 3 3; }
.fs-rang text.mittel { fill: #8a6d00; stroke: none; font-size: 10px; }
.fs-rang .zeile { cursor: default; }
.fs-rang .zeile:hover .flaeche { fill: #eef3f9; }
.fs-anteile .f0 { fill: #004890; } .fs-anteile .f1 { fill: #2f6db5; } .fs-anteile .f2 { fill: #6e98c9; }
.fs-anteile .f3 { fill: #a9c1de; } .fs-anteile .f4 { fill: #e0a800; } .fs-anteile .f5 { fill: #7d8a99; }
.fs-legende { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .8rem; color: #6b7787; margin-top: .35rem; }
.fs-legende span { display: inline-flex; align-items: center; gap: .3rem; }
.fs-legende i, .fs-legende .l-reihe, .fs-legende .l-vergleich { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }
.fs-legende .l-reihe { height: 3px; background: #004890; } .fs-legende .l-vergleich { height: 0; border-top: 2px dashed #9fb6d3; }
.fs-legende .f0 { background: #004890; } .fs-legende .f1 { background: #2f6db5; } .fs-legende .f2 { background: #6e98c9; }
.fs-legende .f3 { background: #a9c1de; } .fs-legende .f4 { background: #e0a800; } .fs-legende .f5 { background: #7d8a99; }
.fs .fs-raster { display: grid; grid-template-columns: 1fr; gap: .8rem; margin-bottom: .8rem; }
.fs .fs-raster > .fs-box { margin-bottom: 0; }
@media (min-width: 1000px) {
    .fs .fs-raster.zwei { grid-template-columns: 3fr 2fr; }
    .fs .fs-raster.gleich { grid-template-columns: 1fr 1fr; }
}
.fs .fs-dashkopf { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .8rem; }
.fs .fs-dashkopf .fs-filter { margin: 0; flex: 1 1 auto; }
.fs .fs-dashkopf .fs-ansicht { display: inline-flex; border: 1px solid #dde4ec; border-radius: 8px; overflow: hidden; }
.fs .fs-dashkopf .fs-ansicht a { padding: .4rem .8rem; font-size: .85rem; color: #004890; background: #fff; }
.fs .fs-dashkopf .fs-ansicht a.an { background: #004890; color: #fff; }
.fs table .balkenzelle meter { width: 90px; height: 8px; vertical-align: middle; }
.fs a.fs-marke { font-size: .8rem; font-weight: 500; padding: .1rem .6rem; color: #004890; } .fs a.fs-marke.an { background: #004890; color: #fff; border-color: #004890; }

/* Geräteseite: Stammdaten als Felder, Unterlagen */
.fs .fs-felder { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem 1rem; }
.fs .fs-feld { display: flex; flex-direction: column; gap: .1rem; padding: .35rem 0; border-bottom: 1px solid var(--linie); }
.fs .fs-feld > span { font-size: .75rem; color: var(--dezent); }
.fs .fs-dok { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 6px; background: #eef3f9; color: #004890; font-size: .7rem; font-weight: 700; flex: none; }
.fs .fs-dok:hover { text-decoration: none; background: #dce7f3; }

/* ---- 0.998: Lage ---- */
.fs .fs-zutun { border-bottom: 1px solid var(--linie); }
.fs .fs-zutun summary { display: flex; align-items: center; gap: .55rem; padding: .6rem .2rem; cursor: pointer; list-style: none; }
.fs .fs-zutun summary::-webkit-details-marker { display: none; }
.fs .fs-zutun summary::after { content: "›"; margin-left: auto; color: var(--dezent); transition: transform .15s; }
.fs .fs-zutun[open] summary::after { transform: rotate(90deg); }
.fs .fs-zutun summary b { min-width: 1.8rem; text-align: right; font-variant-numeric: tabular-nums; }
.fs .fs-zutun summary small { margin-left: auto; padding-left: .5rem; text-align: right; }
.fs .fs-zutun > .melde { padding-left: 2.6rem; }
.fs .fs-zutun .fs-knopf.klein { padding: .25rem .6rem; font-size: .78rem; }
.fs .fs-zahl { display: inline-block; min-width: 1.5rem; padding: .05rem .35rem; border-radius: 10px; font-size: .78rem; font-weight: 700; text-align: center; margin-left: .2rem; }
.fs .fs-zahl.r { background: #fdecea; color: #c8102e; } .fs .fs-zahl.y { background: #fff6e0; color: #8a6d00; }
.fs .fs-sortierung { float: right; font-size: .78rem; font-weight: 400; color: var(--dezent); }
.fs .fs-sortierung a { margin-left: .4rem; padding: .1rem .5rem; border-radius: 10px; }
.fs .fs-sortierung a.an { background: #004890; color: #fff; }
.fs table.fs-lage td { vertical-align: middle; }
.fs .fs-spark { display: block; }
.fs-chart.fs-tage { max-width: 900px; }
.fs .fs-titel + .fs-stempel, .fs .fs-kopf .fs-stempel { white-space: nowrap; }
.fs-legende .l-normal { display: inline-block; width: 16px; height: 0; border-top: 2px dashed #1d2329; }
.fs-legende .l-schnitt { display: inline-block; width: 16px; height: 0; border-top: 2px dashed #e0a800; }

/* „Heute zu tun“ als Tabelle: feste Spalten Ampel · Anzahl · Was · Wo · Pfeil; aufgeklappt eine Detailtabelle */
.fs .zeile { align-items: stretch; }
.fs .fs-zt { border-top: 1px solid var(--linie); }
.fs .fs-zt-kopf, .fs .fs-zt-gruppe > summary {
    display: grid; grid-template-columns: 1.4rem 3.5rem minmax(0, 1fr) minmax(7rem, 14rem) 1rem; gap: .6rem; align-items: center; }
.fs .fs-zt-kopf { padding: .35rem .5rem; font-size: .75rem; font-weight: 600; color: var(--dezent); background: var(--flaeche); }
.fs .fs-zt-gruppe { border-bottom: 1px solid var(--linie); }
.fs .fs-zt-gruppe > summary { padding: .55rem .5rem; cursor: pointer; list-style: none; }
.fs .fs-zt-gruppe > summary::-webkit-details-marker { display: none; }
.fs .fs-zt-gruppe > summary:hover { background: var(--flaeche); }
.fs .fs-zt-gruppe > summary .z, .fs .fs-zt-kopf .z { text-align: right; font-variant-numeric: tabular-nums; }
.fs .fs-zt-gruppe > summary b.z { font-size: 1.05rem; }
.fs .fs-zt-gruppe.r > summary b.z { color: #c8102e; }
.fs .fs-zt-gruppe > summary .wo { color: var(--dezent); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs .fs-zt-gruppe > summary .pfeil { color: var(--dezent); transition: transform .15s; }
.fs .fs-zt-gruppe[open] > summary .pfeil { transform: rotate(90deg); }
.fs .fs-zt-gruppe[open] > summary { background: var(--flaeche); }

@media (max-width: 699px) {
    .fs .fs-zt-kopf, .fs .fs-zt-gruppe > summary { grid-template-columns: 1.2rem 2.4rem minmax(0, 1fr) 1rem; }
    .fs .fs-zt-kopf span:nth-child(4), .fs .fs-zt-gruppe > summary .wo { display: none; }
}


/* Diagramme mit vielen Beschriftungen: am Handy seitlich wischen statt schrumpfen (Schrift bleibt lesbar) */
.fs .fs-wisch { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 699px) { .fs .fs-wisch .fs-chart.fs-tage { min-width: 620px; } }

/* Zeilenlisten statt Tabellen (Lage): am PC Spalten, am Handy zwei Ebenen – ohne Tabellen-Umbau per CSS */
.fs .fs-zt-liste { margin: 0 0 .4rem; font-size: .88rem; }
.fs .fs-zt-z { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(8rem, 1fr) minmax(0, 2fr) 6.5rem; gap: .6rem; align-items: start;
    padding: .45rem .5rem .45rem 2.6rem; border-bottom: 1px solid var(--linie); }
.fs .fs-zt-z.kopf { font-size: .72rem; font-weight: 600; text-transform: uppercase; color: var(--dezent); background: var(--flaeche); }
.fs .fs-zt-z .k { text-align: right; }
.fs .fs-zt-z .fs-knopf.klein { padding: .2rem .55rem; font-size: .76rem; }
.fs .fs-lage { border-top: 1px solid var(--linie); }
.fs .fs-lz { display: grid; grid-template-columns: 1.3rem minmax(0, 1fr) 7rem 6.5rem 100px 5.5rem; gap: .6rem; align-items: center;
    padding: .5rem .5rem; border-bottom: 1px solid var(--linie); }
.fs .fs-lz.kopf { font-size: .72rem; font-weight: 600; text-transform: uppercase; color: var(--dezent); background: var(--flaeche); }
.fs .fs-lz .z { text-align: right; font-variant-numeric: tabular-nums; }
.fs .fs-lz .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 699px) {
    .fs .fs-zt-z.kopf, .fs .fs-lz.kopf { display: none; }
    .fs .fs-zt-z { grid-template-columns: minmax(0, 1fr) 5.5rem; grid-template-areas: "f k" "g k" "t t"; row-gap: .1rem; padding-left: 2.2rem; }
    .fs .fs-zt-z .f { grid-area: f; font-weight: 600; } .fs .fs-zt-z .g { grid-area: g; font-size: .85rem; }
    .fs .fs-zt-z .t { grid-area: t; color: var(--dezent); font-size: .85rem; } .fs .fs-zt-z .k { grid-area: k; align-self: center; }
    .fs .fs-lz { grid-template-columns: 1.3rem minmax(0, 1fr) 4.5rem 72px; grid-template-areas: "a n n c" ". g p s"; row-gap: .15rem; column-gap: .5rem; }
    .fs .fs-lz .g, .fs .fs-lz .p, .fs .fs-lz .c { white-space: nowrap; }
    .fs .fs-lz .p { text-align: right; } .fs .fs-lz .c { text-align: right; } .fs .fs-lz .s { justify-self: end; overflow: hidden; }
    .fs .fs-lz .a { grid-area: a; } .fs .fs-lz .n { grid-area: n; font-weight: 600; } .fs .fs-lz .c { grid-area: c; }
    .fs .fs-lz .g { grid-area: g; text-align: left; font-size: .85rem; } .fs .fs-lz .p { grid-area: p; font-size: .85rem; }
    .fs .fs-lz .s { grid-area: s; } .fs .fs-lz .fs-spark { width: 70px; height: 18px; }
}
.fs .fs-zt-z .k form { display: inline; margin: 0; }
.fs .fs-zt-z .k .fs-knopf, .fs .fs-lz .fs-knopf { width: auto; }

/* Prüfdaten anfordern: Tabelle Auswahl · Filiale · Geräte · TÜV · Signaturkarte · Stand · ansehen */
.fs .fs-pa { border-top: 1px solid var(--linie); margin: .6rem 0 .8rem; }
.fs .fs-pa-z { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) 5rem 5rem 7.5rem 7rem 5.5rem; gap: .6rem; align-items: center;
    padding: .45rem .5rem; border-bottom: 1px solid var(--linie); cursor: pointer; }
.fs .fs-pa-z:hover { background: var(--flaeche); }
.fs .fs-pa-z.kopf, .fs .fs-pa-z.summe { cursor: default; font-size: .72rem; font-weight: 600; text-transform: uppercase; color: var(--dezent); background: var(--flaeche); }
.fs .fs-pa-z.summe { font-size: .8rem; text-transform: none; color: var(--text); border-bottom: 0; }
.fs .fs-pa-z.laeuft { color: var(--dezent); }
.fs .fs-pa-z input { width: auto; margin: 0; }
.fs .fs-pa-z .n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs .fs-pa-z .z { text-align: right; font-variant-numeric: tabular-nums; }
.fs .fs-pa-z .an { text-align: right; font-size: .85rem; }
.fs .fs-pa-senden input[type="text"] { flex: 1 1 18rem; }
.fs .fs-pa-z .d { display: none; }
@media (max-width: 699px) {
    .fs .fs-pa-z { grid-template-columns: 1.6rem minmax(0, 1fr) auto; grid-template-areas: "c n an" ". d st"; row-gap: .1rem; }
    .fs .fs-pa-z.kopf span:not(:first-child) { display: none; }
    .fs .fs-pa-z.kopf { grid-template-areas: "c n an"; }
    .fs .fs-pa-z > span:first-child { grid-area: c; } .fs .fs-pa-z .n { grid-area: n; } .fs .fs-pa-z .an { grid-area: an; }
    .fs .fs-pa-z .st { grid-area: st; }
    .fs .fs-pa-z .g, .fs .fs-pa-z .t, .fs .fs-pa-z .s { display: none; }
    .fs .fs-pa-z .d { display: block; grid-area: d; font-size: .82rem; color: var(--dezent); }
    .fs .fs-pa-z.summe { display: none; }
}

/* Aufgaben (Liste wie im Entwurf: Nr · Art · Filiale · Titel · Zuständig · Status · Frist) */
.fs .fs-af { border-top: 1px solid var(--linie); }
.fs .fs-af-z { display: grid; grid-template-columns: 3rem 7.5rem minmax(8rem, 12rem) minmax(0, 1fr) 9rem 6.5rem 11rem; gap: .6rem; align-items: center;
    padding: .55rem .5rem; border-bottom: 1px solid var(--linie); color: var(--text); }
a.fs-af-z:hover { background: var(--flaeche); text-decoration: none; }
.fs .fs-af-z.kopf { font-size: .72rem; font-weight: 600; text-transform: uppercase; color: var(--dezent); background: var(--flaeche); }
.fs .fs-af-z.ueber { border-left: 3px solid #c8102e; }
.fs .fs-af-z.erledigt { color: var(--dezent); }
.fs .fs-af-z .nr { color: var(--dezent); font-variant-numeric: tabular-nums; }
.fs .fs-af-z .ti { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.fs .fs-art { display: inline-block; padding: .05rem .5rem; border-radius: 10px; font-size: .75rem; font-weight: 600; background: #eef3f9; color: #004890; }
.fs .fs-art.problem { background: #fdecea; color: #c8102e; } .fs .fs-art.auffaelligkeit { background: #fff6e0; color: #8a6d00; }
.fs .fs-art.wunsch, .fs .fs-art.verbesserung { background: #e7f6ec; color: #1f8a4c; }
.fs .fs-text { white-space: normal; margin-top: .6rem; }
.fs textarea { width: 100%; font: inherit; padding: .5rem; border: 1px solid var(--linie); border-radius: 7px; margin: .4rem 0; }
.fs .fs-pruef-form .fs-breit { grid-column: 1 / -1; }
@media (max-width: 699px) {
    .fs .fs-af-z { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "ti fr" "fil st" "art zu"; row-gap: .15rem; }
    .fs .fs-af-z.kopf { display: none; } .fs .fs-af-z .nr { display: none; }
    .fs .fs-af-z .ti { grid-area: ti; } .fs .fs-af-z .fr { grid-area: fr; text-align: right; font-size: .82rem; }
    .fs .fs-af-z .fil { grid-area: fil; font-size: .82rem; color: var(--dezent); } .fs .fs-af-z .st { grid-area: st; text-align: right; font-size: .82rem; }
    .fs .fs-af-z .art { grid-area: art; } .fs .fs-af-z .zu { grid-area: zu; text-align: right; font-size: .82rem; color: var(--dezent); }
}
.fs .fs-code { display: block; padding: .6rem; background: var(--flaeche); border-radius: 6px; word-break: break-all; font-size: .85rem; }
.fs .fs-ziel { display: grid; grid-template-columns: minmax(0, 1fr) 9rem auto; gap: .6rem; align-items: center; padding: .35rem .5rem; border-bottom: 1px solid var(--linie); }
.fs .fs-ziel input { width: 100%; text-align: right; }
.fs .fs-qr-inhalt { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.fs svg.qr, svg.qr { flex: none; border: 1px solid var(--linie); border-radius: 6px; background: #fff; }
/* „sortiert nach“ schwebt am PC rechts in der Überschrift; die Liste beginnt immer darunter, am Handy steht es in eigener Zeile */
.fs .fs-lage, .fs .fs-zt, .fs .fs-af, .fs .fs-pa { clear: both; }
@media (max-width: 699px) { .fs .fs-sortierung { float: none; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-top: .4rem; } }

/* Filialmeldungen (1.009): Meldeformulare, Stimmung, Fotos, Erklärpflicht, Lesestand, Melden-Knöpfe, Tablet */
.fs .fs-meldeform { display: grid; gap: .7rem; max-width: 38rem; }
.fs .fs-meldeform label { display: grid; gap: .25rem; font-weight: 600; }
.fs .fs-meldeform label small { font-weight: 400; }
.fs .fs-meldeform select, .fs .fs-meldeform input[type="text"], .fs .fs-meldeform input[type="date"], .fs .fs-meldeform input[type="datetime-local"],
.fs .fs-meldeform textarea { width: 100%; font: inherit; padding: .5rem .6rem; border: 1px solid var(--linie); border-radius: 7px; background: var(--karte); color: var(--text); }
.fs .fs-meldeform .fs-knopf { justify-self: start; }
.fs .fs-meldeform label.fs-haken, .fs label.fs-haken { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
.fs .fs-stimmung { border: 0; padding: 0; margin: 0; min-width: 0; }
.fs .fs-stimmung-wahl { display: flex; gap: .5rem; flex-wrap: wrap; }
.fs .fs-stimmung legend { font-weight: 600; margin-bottom: .3rem; padding: 0; }
.fs .fs-stimmung label { display: block; flex: 1 1 6rem; }
.fs .fs-stimmung input { position: absolute; opacity: 0; }
.fs .fs-stimmung span { display: block; text-align: center; padding: .8rem .5rem; border: 2px solid var(--linie); border-radius: 10px; cursor: pointer; font-weight: 600; }
.fs .fs-stimmung input:focus-visible + span { outline: 2px solid var(--blau); outline-offset: 2px; }
.fs .fs-stimmung .ruhig input:checked + span { background: #e8f0fb; border-color: var(--blau); }
.fs .fs-stimmung .normal input:checked + span { background: #e7f6ec; border-color: #2e9d57; }
.fs .fs-stimmung .problem input:checked + span { background: #fdecea; border-color: #c9302c; }
.fs .fs-art.stimmung-ruhig { background: #e8f0fb; } .fs .fs-art.stimmung-normal { background: #e7f6ec; } .fs .fs-art.stimmung-problem { background: #fdecea; color: #a12622; }
.fs .fs-art.stoerung { background: #fff0e0; color: #94500d; } .fs .fs-art.behoerde { background: #fdecea; color: #a12622; }
.fs .fs-fotos { display: flex; gap: .5rem; flex-wrap: wrap; margin: .5rem 0; }
.fs .fs-foto-feld { display: grid; gap: .25rem; margin: .5rem 0; }
.fs .fs-erklaer.offen { border-left: 4px solid #c9302c; }
.fs .fs-gelesen { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .6rem; }
.fs .fs-gelesen .fs-marke { padding: .2rem .55rem; border-radius: 12px; font-size: .85rem; border: 1px solid var(--linie); }
.fs .fs-gelesen .fs-marke.ja { background: #e7f6ec; border-color: #bfe6cd; } .fs .fs-gelesen .fs-marke.nein { background: #fff6e0; border-color: #f2d78a; }
.fs .fs-blass { opacity: .6; }
.fs .fs-melden { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .8rem; }
.fs .fs-melden .fs-knopf { flex: 1 1 8rem; padding: .8rem 1rem; }
.fs .fs-je-filiale td:nth-child(3), .fs .fs-je-filiale td:nth-child(4), .fs .fs-je-filiale th:nth-child(3), .fs .fs-je-filiale th:nth-child(4) { text-align: center; }
.fs .fs-je-filiale input[type="text"] { width: 7rem; }
body.tablet { background: var(--flaeche); }
.fs.fs-tablet { max-width: 44rem; margin: 0 auto; padding: 1rem; }
.fs.fs-tablet .fs-stimmung span { padding: 1.2rem .5rem; font-size: 1.15rem; }
/* 1.016: Kachel als Link (Prüfdaten stehen aus) */
.fs a.kachel { color: inherit; text-decoration: none; }
.fs a.kachel:hover { border-color: var(--blau, #004890); }
/* 1.019: Kennzeichnung von Inhalten, die nur Betreuer sehen (Funktion in der Vorschau) */
.fs-vorschau { display: inline-block; margin-left: .35rem; padding: 0 .4rem; border-radius: 999px; background: #fff3c4; color: #7a5a00;
    border: 1px solid #e0b04a; font-size: .7rem; font-weight: 600; line-height: 1.4; vertical-align: middle; text-transform: none; letter-spacing: 0; }
/* 1.020: Feiertage und Spielverbot-Tage im Verlauf */
.fs-legende .m-feiertag, .fs-legende .m-verbot { display: inline-block; width: .9rem; height: .7rem; border-radius: 2px; margin-right: .3rem; vertical-align: middle; }
.fs-legende .m-feiertag { background: #ece7f6; border: 1px solid #c9bfe3; }
.fs-legende .m-verbot { background: #fbe3e6; border: 1px solid #e9a3ad; }
.fs .fs-feiertag-hinweis { color: #6b4fa3; }
.fs-verbot-tab td input[type=text] { width: 5rem; }
.fs-verbot-tab td input.breit { width: 100%; min-width: 14rem; }

/* 1.024 Checklisten: je Punkt in Ordnung / nicht in Ordnung, Bemerkung, Foto */
.fs .fs-checkliste h3 { margin: 0; }
.fs .fs-punkt { border: 1px solid var(--linie); border-radius: 8px; padding: .6rem .7rem; margin: 0; display: grid; gap: .45rem; min-width: 0; }
.fs .fs-punkt legend { font-weight: 600; padding: 0 .3rem; }
.fs .fs-meldeform input[type="time"] { width: 100%; font: inherit; padding: .5rem .6rem; border: 1px solid var(--linie); border-radius: 7px; background: var(--karte); color: var(--text); }
.fs .fs-meldeform fieldset { min-width: 0; }
.fs .fs-art.bestellung { background: #e8f0fb; color: #004890; } .fs .fs-art.checkliste { background: #fff6d6; color: #7a5a00; }
/* in der Checkliste nur die Auswahlknöpfe verstecken, Bemerkung und Foto bleiben sichtbar */
.fs .fs-punkt input[type="text"], .fs .fs-punkt input[type="file"] { position: static; opacity: 1; width: 100%; font: inherit; }
.fs .fs-punkt input[type="text"] { padding: .5rem .6rem; border: 1px solid var(--linie); border-radius: 7px; background: var(--karte); color: var(--text); }
.fs .fs-checkmatrix td:first-child { white-space: nowrap; }

/* Filiale › Geräte: Serien- und Zulassungsnummer unter dem Platz (1.025) */
.fs .fs-geraetnr { display: block; font-size: .74rem; color: var(--dezent); white-space: nowrap; }
