/* m4.css — Bausteine der Mitarbeiter-App unter /app (audit/309, M4).
   Ergänzt app.css, ersetzt sie nicht: die Team-V2-Klassen (tv2-*) bleiben gültig, damit die
   alten Bereiche weiter aussehen wie bisher. Alles hier ist für einen Daumen gebaut —
   Ziel-Gerät ist iPhone/iPad mit Safari 17+ (Stefans Vorgabe 2). */

.m4-liste { display: flex; flex-direction: column; gap: 10px; }

.m4-karte {
  display: block; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--tv2-rand, #d7e3da); border-left: 4px solid #14532d;
  border-radius: 14px; padding: 13px 14px; font: inherit; color: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.m4-karte:active { background: #f4f8f5; }
.m4-karte-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.m4-karte-titel { font-weight: 700; font-size: 16px; line-height: 1.3; }
.m4-chip {
  flex: none; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: #ecfdf5; color: #065f46; white-space: nowrap;
}
.m4-zeile { margin-top: 4px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.m4-grau { color: #5f7168; font-size: 13px; }
.m4-nav {
  display: inline-block; margin-top: 9px; font-size: 14px; font-weight: 700; color: #14532d;
  border: 1px solid #cfe0d4; border-radius: 10px; padding: 7px 12px; background: #f2f7f3;
}

.m4-tagblock { margin-bottom: 20px; }
.m4-tagkopf {
  font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .5px;
  color: #14532d; margin: 0 0 8px; display: flex; gap: 8px; align-items: baseline;
}

.m4-leer { text-align: center; padding: 44px 18px; color: #5f7168; }
.m4-leer-sym { font-size: 38px; margin-bottom: 8px; }
.m4-laedt { padding: 26px; text-align: center; color: #5f7168; }
/* Ein Fehler sieht anders aus als ein leerer Tag. Genau diese Verwechslung hat in audit/306
   den toten Zeiten-Reiter so lange unentdeckt gelassen. */
.m4-fehler {
  margin: 16px 0; padding: 14px; border-radius: 12px;
  background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; font-size: 14px;
}

/* Objektkarte als Blatt von unten */
.m4-blatt { position: fixed; inset: 0; background: rgba(15,32,25,.45); z-index: 900; display: flex; align-items: flex-end; }
.m4-blatt-innen {
  background: #f2f7f3; width: 100%; max-height: 92vh; overflow-y: auto;
  border-radius: 18px 18px 0 0; padding: 16px 16px calc(env(safe-area-inset-bottom) + 22px);
}
.m4-blatt-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.m4-blatt-titel { font-size: 18px; font-weight: 800; }
.m4-x { border: none; background: none; font-size: 20px; color: #5f7168; padding: 6px 10px; }
.m4-foto { width: 100%; border-radius: 12px; margin-bottom: 12px; }

.m4-feld { background: #fff; border: 1px solid #d7e3da; border-radius: 13px; padding: 12px 13px; margin-bottom: 10px; }
.m4-feld-titel { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: #5f7168; margin-bottom: 5px; }
.m4-feld-wert { font-size: 15px; line-height: 1.45; }
.m4-liste-klein { margin: 0; padding-left: 18px; }
.m4-liste-klein li { margin-bottom: 3px; }

.m4-btn {
  display: inline-block; margin: 8px 8px 0 0; padding: 11px 15px; border-radius: 11px;
  border: 1px solid #cfe0d4; background: #f2f7f3; color: #14532d; font: 600 15px/1 inherit;
  text-decoration: none; cursor: pointer;
}
.m4-btn[disabled] { opacity: .45; }
/* audit/318: der gesetzte Status ist am Knopf abzulesen, nicht nur am Balken. */
.m4-btn-an { background: #14532d; color: #fff; border-color: #14532d; }
.m4-primaer { background: #14532d; color: #fff; border-color: #14532d; }
.m4-tipp-hinweis { font-size: 12px; color: #5f7168; margin-bottom: 2px; }
.m4-geheim { margin-top: 11px; padding: 11px 12px; border-radius: 10px; background: #fffbeb; border: 1px solid #fde68a; font-size: 15px; }

.m4-status { padding: 10px 12px; border-radius: 10px; background: #f2f7f3; border: 1px solid #d7e3da; font-size: 14px; margin-bottom: 9px; }
.m4-ja { background: #ecfdf5; border-color: #bbf7d0; color: #065f46; }
.m4-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.m4-details { margin: 9px 0; font-size: 14px; }
.m4-details summary { cursor: pointer; font-weight: 700; color: #14532d; padding: 6px 0; }
.m4-abs { margin: 10px 0; }
.m4-abs p { margin: 3px 0 0; }

.m4-kennzahlen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: #14532d; border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.m4-kz { background: #14532d; color: #fff; text-align: center; padding: 11px 3px; }
.m4-kz-wert { font-size: 17px; font-weight: 800; }
.m4-kz-label { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; opacity: .82; margin-top: 2px; }
.m4-monat { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.m4-monat-name { flex: 1; text-align: center; font-weight: 800; }
.m4-monat .m4-btn { margin: 0; padding: 9px 14px; }
.m4-blau { border-left-color: #2563eb; }
.m4-fuss { margin-top: 12px; text-align: center; font-size: 12px; color: #94a3b8; }

/* Stempelkachel (Phase 6) — steht ueber dem Tag, weil sie das Erste ist, was morgens passiert. */
.m4-stempel {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #14532d; color: #fff; border-radius: 14px; padding: 14px 15px; margin-bottom: 14px;
}
.m4-stempel .m4-grau { color: rgba(255,255,255,.8); }
.m4-stempel .m4-kz-wert { font-size: 24px; }
.m4-stempel-rechts { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.m4-stempel .m4-btn { margin: 0; background: #fff; color: #14532d; border-color: #fff; font-weight: 800; }
.m4-pause { font-size: 12px; color: rgba(255,255,255,.85); display: flex; align-items: center; gap: 5px; }
.m4-pause input { width: 58px; padding: 5px 7px; border-radius: 8px; border: none; font: inherit; text-align: right; }

/* ── Nachweis (M5, audit/310) ──────────────────────────────────────────────────────────────── */
.m5-zaehler { font-weight: 800; font-size: 15px; color: #92400e; background: #fffbeb;
  border: 1px solid #fde68a; border-radius: 10px; padding: 8px 11px; margin-bottom: 10px; }
.m5-zaehler.m5-ok { color: #065f46; background: #ecfdf5; border-color: #bbf7d0; }
.m5-punkt { border: 1px solid #d7e3da; border-radius: 12px; padding: 10px 11px; margin-bottom: 9px; background: #fbfdfc; }
.m5-punkt-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
/* Referenzbild NEBEN dem Auslöser — ein Overlay IM Sucher ist mit capture nicht möglich. */
.m5-referenz { width: 86px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid #cfe0d4; }
.m5-punkt-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; }
.m5-erfuellt { background: #ecfdf5; border-color: #bbf7d0; color: #065f46; }
.m5-galerie { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.m5-mini { width: 62px; height: 62px; object-fit: cover; border-radius: 8px; border: 1px solid #d7e3da; }
.m5-check { margin-top: 14px; }
.m5-check-zeile { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; font-size: 14px; }
.m5-bemerkung { width: 100%; margin-top: 8px; padding: 8px; border: 1px solid #d7e3da; border-radius: 9px; font: inherit; }
.m5-erledigt { width: 100%; margin-top: 14px; padding: 14px; font-size: 16px; }
.m5-nm { margin-top: 10px; padding: 11px; border: 1px solid #fde68a; border-radius: 10px; background: #fffbeb; }
.m5-nm select, .m5-nm textarea { width: 100%; padding: 8px; border: 1px solid #d7e3da; border-radius: 9px; font: inherit; margin-bottom: 7px; }
.m5-ws { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; border-radius: 11px;
  padding: 9px 12px; margin-bottom: 12px; font-size: 14px; }
.m5-ws-fehler { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.m5-ws .m4-btn { margin: 0; padding: 7px 11px; font-size: 13px; }

/* ── Melden (audit/311, M6) ───────────────────────────────────────────────────────────────── */
.m6-melden-start{width:100%;margin:0 0 10px;font-weight:700;background:#fff7ed;border-color:#fdba74;color:#9a3412}
.m6-schritte{display:flex;gap:6px;font-size:11px;color:#6b7f74;margin:0 0 12px}
.m6-schritte span{flex:1;padding:6px 4px;border-radius:8px;background:#eef4f0;text-align:center}
.m6-schritte span.aktiv{background:#14532d;color:#fff}
.m6-kategorien{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.m6-kat{text-align:left;font-size:15px;padding:14px 12px}
.m6-gewaehlt{background:#14532d;color:#fff;border-color:#14532d}
.m6-pflicht{opacity:.85}
.m6-objekt{width:100%;padding:11px;border:1px solid #d7e3da;border-radius:9px;font-size:15px;background:#fff}
.m6-galerie{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0}
.m6-fuss{display:flex;gap:8px;margin-top:16px}
.m6-fuss .m4-btn{flex:1}
.m6-liste{display:flex;flex-direction:column;gap:10px}
.m6-eintrag{background:#fff;border:1px solid #d7e3da;border-radius:11px;padding:11px}
.m6-eintrag.m6-neu{border-color:#f59e0b;box-shadow:0 0 0 2px #fef3c7}
.m6-zeile1{display:flex;justify-content:space-between;align-items:center;gap:8px}
.m6-status{font-size:11px;padding:3px 8px;border-radius:999px;background:#eef4f0;color:#3f5a4a;white-space:nowrap}
.m6-status.m6-erledigt{background:#dcfce7;color:#166534}
.m6-status.m6-in_bearbeitung{background:#fef3c7;color:#92400e}
.m6-text{font-size:14px;margin-top:5px}
.m6-antwort{margin-top:9px;padding-top:9px;border-top:1px solid #e6ede8}

/* ── audit/318 Block 1 ─────────────────────────────────────────────────────────────────────
 * Befunde 11 und 15: Trefferflächen unter 44 px sind mit Handschuhen auf dem Dach nicht
 * sicher zu treffen. Gemessen wurden „Navigation" 99×36, „✕" 36×39, „Melden" 366×39 und
 * acht Kategorieknöpfe mit 47 px — einer unter der Grenze. Die Höhe wird jetzt erzwungen,
 * nicht empfohlen. */
.m4-btn, .m4-blatt-zu, .m6-kat, .tv2-nav button, .tv2-btn {
  min-height: 44px;
}
.m4-blatt-zu { min-width: 44px; }

/* Befund 25: das Objektfoto hatte keine festen Maße — beim Nachladen sprang der ganze Block.
 * Der Platz wird jetzt vorher freigehalten. */
.m4-objektfoto, .m4-blatt img[data-objektfoto] {
  aspect-ratio: 4 / 3; width: 100%; object-fit: cover; background: #eef2ef; border-radius: 10px;
}

/* Befunde 7, 10, 16, 17: Frische, Auffrischen und App-Stand in der Kopfzeile. */
.tv2-frische {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 6px; font-size: 13px; color: #dcece1;
}
.tv2-frische-btn {
  min-height: 44px; padding: 6px 12px; border-radius: 10px; border: 1px solid #ffffff55;
  background: #ffffff1a; color: #fff; font: 600 13px/1 inherit; cursor: pointer;
}
.tv2-frische-btn[disabled] { opacity: .5; }
.tv2-frische-version { margin-left: auto; opacity: .75; font-size: 12px; }

/* ── audit/321 M8: Nachrichten und Planänderung ─────────────────────────────────────────── */
.tv2-punkt {
  position: absolute; top: 4px; right: calc(50% - 22px); min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 9px; background: #b91c1c; color: #fff;
  font: 700 11px/18px inherit; text-align: center;
}
.tv2-nav button { position: relative; }
.m4-chip-neu { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.m4-nachricht-neu > summary { font-weight: 700; }
.m4-neu {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 8px;
  background: #b91c1c; color: #fff; font: 700 11px/1.5 inherit;
}

/* ── Aufgabenliste je Einsatz (audit/330, M7) ─────────────────────────────────────────────── */
.m7-aufgabe { border: 1px solid #d7e3da; border-left-width: 5px; border-radius: 12px; padding: 9px 11px; margin-bottom: 8px; background: #fbfdfc; }
.m7-aufgabe.m7-rot { border-left-color: #dc2626; background: #fff5f5; }
.m7-aufgabe.m7-gelb { border-left-color: #d97706; background: #fffbeb; }
.m7-aufgabe.m7-woche { border-left-color: #14532d; }
.m7-aufgabe.m7-grau { border-left-color: #94a3b8; background: #f8fafc; color: #64748b; }
.m7-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.m7-haken { display: flex; align-items: flex-start; gap: 9px; font-size: 15px; font-weight: 600; flex: 1; }
.m7-haken input { width: 22px; height: 22px; margin-top: 1px; flex: none; }
.m7-etikett { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; padding: 3px 7px; border-radius: 999px; background: #e2e8f0; color: #334155; }
.m7-rot .m7-etikett { background: #fecaca; color: #991b1b; }
.m7-gelb .m7-etikett { background: #fde68a; color: #92400e; }
.m7-unter { font-size: 12px; margin: 3px 0 0 31px; }
.m7-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.m7-knoepfe .m4-btn { margin: 0; padding: 7px 10px; font-size: 13px; }
.m7-spaeter { background: #fffbeb; border-color: #fde68a; color: #92400e; font-weight: 700; }
.m7-gehtnicht { color: #64748b; }
.m7-licht { margin: 6px 0 0 31px; font-size: 14px; }
.m7-radio { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.m7-licht-felder { display: grid; grid-template-columns: 90px 1fr; gap: 6px; margin-top: 4px; }
.m7-licht-felder input { padding: 8px; border: 1px solid #d7e3da; border-radius: 9px; font: inherit; }
.m7-licht-felder .m4-grau { grid-column: 1 / -1; font-size: 12px; }
.m7-garten { width: 100%; margin-top: 10px; background: #f0fdf4; border-color: #86efac; color: #14532d; font-weight: 700; }
.m5-punkt.m7-aussen { background: #f0fdf4; border-color: #bbf7d0; }
.m7-aussen-link { color: #14532d; font-size: 13px; }
.m7-aussen-tag { margin-bottom: 8px; }
/* audit/330 Befund im Sichtnachweis: der Toast (z-index 30) lag UNTER dem Objektblatt (z-index 900) —
 * „Foto gemerkt", „Abschluss gemerkt", „Noch offen: …" waren aus der Objektkarte heraus nie zu sehen.
 * Seit audit/310 so; aufgefallen erst, als das Bild 07 byteidentisch zu 06 war. */
.tv2-toast { z-index: 1000; }

/* ── Reinigung II: die Woche als Einheit (audit/331) ─────────────────────────────────────── */
.m8-serie-zeile { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.m8-serie-zeile .m4-btn { margin: 0; padding: 6px 10px; font-size: 13px; }
.m4-chip.m8-chip-kunde { background: #fee2e2; color: #991b1b; }
.m4-chip.m8-chip-reiniger { background: #dcfce7; color: #14532d; }
.m4-chip.m8-chip-verteilung { background: #e0f2fe; color: #075985; }
.m4-chip.m8-chip-buero_einmalig { background: #fef3c7; color: #92400e; }
.m8-tagchips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 12px 0; }
.m8-tagchip { margin: 0; padding: 8px 2px; font-size: 14px; line-height: 1.15; }
.m8-tagchip small { font-size: 11px; color: #6b7f74; }
.m8-dauer { display: flex; gap: 8px; } .m8-dauer .m4-btn { flex: 1; margin: 0; }
.m8-versaeumt { border: 1px solid #fecaca; border-left: 5px solid #dc2626; background: #fff5f5; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.m8-versaeumt-zeile { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; }
.m8-versaeumt-zeile + .m8-versaeumt-zeile { border-top: 1px solid #fecaca; }
.m8-versaeumt .m4-btn { margin: 0; padding: 8px 10px; font-size: 13px; }
.m8-meine-zeile { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid #e3ece6; }
.m8-meine-zeile:first-child { border-top: none; }
.m8-meine-zeile .m4-chip { min-width: 34px; text-align: center; font-weight: 800; }
