/* Gemeinsamer App-Look für alle Ansichtsmuster. Jede Demo setzt nur ihre Akzentfarbe (--a) um. */
.app {
  --a: #0E3B43;          /* Akzent (Hauptknopf, aktive Auswahl) */
  --a-ink: #ffffff;      /* Text auf Akzent */
  --a-soft: #E6EEF0;     /* helle Akzentfläche */
  --bg: #F4F4F6;
  --card: #ffffff;
  --ink: #17191C;
  --muted: #6B7076;
  --line: #E3E4E8;
  --ok: #1E8A5A;
  --warn: #C4512D;
  --r: 14px;
  height: 100%; display: flex; flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.4; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
.app *, .app *::before, .app *::after { box-sizing: border-box; }
.app button, .app input, .app select, .app textarea { font: inherit; color: inherit; }
.app button { cursor: pointer; }

/* Status-Zeile wie auf dem Handy */
.status { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px 0; font-size: 14px; font-weight: 600; background: var(--card); }
.status__icons { display: flex; gap: 6px; align-items: center; }
.status__icons span { display: inline-block; width: 16px; height: 10px; border: 1.5px solid currentColor; border-radius: 3px; position: relative; }
.status__icons span::after { content: ""; position: absolute; inset: 2px; right: 4px; background: currentColor; border-radius: 1px; }

/* Kopfleiste */
.bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px 12px; background: var(--card); border-bottom: 1px solid var(--line); }
.bar__zurueck { width: 40px; height: 40px; border: 0; background: transparent; border-radius: 50%; display: grid; place-items: center; }
.bar__zurueck:hover { background: var(--bg); }
.bar__zurueck[hidden] { display: none; }
.bar__platz { width: 40px; }
.bar__titel { flex: 1; text-align: center; font-weight: 700; font-size: 17px; }
.bar__schritt { font-size: 12px; color: var(--muted); font-weight: 500; display: block; }

/* Demo-Umschalter (nur in der Schadensmeldung) */
.rolle { display: flex; gap: 4px; padding: 8px 12px; background: var(--bg); border-bottom: 1px solid var(--line); font-size: 13px; align-items: center; }
.rolle__label { color: var(--muted); margin-right: 4px; }
.rolle button { flex: 1; border: 1px solid var(--line); background: var(--card); padding: 6px 8px; border-radius: 9999px; font-weight: 600; }
.rolle button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Inhalt */
.body { flex: 1; overflow-y: auto; padding: 16px 16px 24px; display: flex; flex-direction: column; gap: 16px; -webkit-overflow-scrolling: touch; }
.body > * { flex: 0 0 auto; }
.screen { display: none; }
.screen--aktiv { display: contents; }
.h { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.2; }
.h--klein { font-size: 15px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.p { margin: 0; color: var(--muted); font-size: 15px; }
.p--ink { color: var(--ink); }
.karte { background: var(--card); border-radius: var(--r); padding: 16px; border: 1px solid var(--line); display: grid; gap: 10px; }
.karte--akzent { background: var(--a-soft); border-color: transparent; }
.gruppe { display: grid; gap: 8px; }

/* Auswahlkarten */
.wahl { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; text-align: left; width: 100%; background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.wahl:hover { border-color: #c9ccd2; }
.wahl[aria-pressed="true"] { border-color: var(--a); background: var(--a-soft); }
.wahl__name { grid-column: 1; font-weight: 600; }
.wahl__info { font-size: 14px; color: var(--muted); grid-column: 1; }
.wahl__preis { font-weight: 700; grid-column: 2; grid-row: 1 / span 2; }
.wahl__icon { grid-column: 1; grid-row: 1 / span 2; width: 36px; height: 36px; border-radius: 10px; background: var(--bg); display: grid; place-items: center; font-size: 18px; }
.wahl--mit-icon { grid-template-columns: auto 1fr; }
.wahl--mit-icon .wahl__info { grid-column: 2; }
.wahl--mit-icon .wahl__name { grid-column: 2; }

/* Tage und Zeiten */
.tage { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: none; }
.tage::-webkit-scrollbar { display: none; }
.tag { flex: 0 0 60px; display: block; text-align: center; padding: 10px 4px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); line-height: 1.2; }
.tag span { display: block; }
.tag__wt { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.tag__nr { font-size: 20px; font-weight: 700; }
.tag__mo { font-size: 11px; color: var(--muted); }
.tag[aria-pressed="true"] { border-color: var(--a); background: var(--a); color: var(--a-ink); }
.tag[aria-pressed="true"] .tag__wt, .tag[aria-pressed="true"] .tag__mo { color: inherit; opacity: 0.8; }
.tag:disabled { opacity: 0.4; cursor: not-allowed; }
.zeiten { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.zeit { padding: 12px 4px; border-radius: 10px; border: 2px solid var(--line); background: var(--card); font-weight: 600; font-variant-numeric: tabular-nums; }
.zeit:disabled { color: var(--muted); background: transparent; border-style: dashed; text-decoration: line-through; cursor: not-allowed; }
.zeit[aria-pressed="true"] { border-color: var(--a); background: var(--a); color: var(--a-ink); }

/* Formulare */
.feld { display: grid; gap: 6px; }
.feld > span { font-size: 14px; font-weight: 600; }
.feld input, .feld select, .feld textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); min-height: 46px; }
.feld input:focus, .feld select:focus, .feld textarea:focus { outline: 2px solid var(--a); outline-offset: 1px; border-color: var(--a); }
.feld textarea { resize: vertical; min-height: 96px; }
.feld--fehler input { border-color: var(--warn); }
.feld__fehler { font-size: 13px; color: var(--warn); }
.schalter { display: flex; align-items: center; gap: 12px; justify-content: space-between; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; }
.schalter input { width: 44px; height: 26px; appearance: none; background: #cfd2d8; border-radius: 9999px; position: relative; flex: 0 0 auto; }
.schalter input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 150ms; }
.schalter input:checked { background: var(--ok); }
.schalter input:checked::after { transform: translateX(18px); }
.schalter__text { display: grid; }
.schalter__text small { color: var(--muted); font-size: 13px; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); font-size: 20px; line-height: 1; }
.stepper output { min-width: 90px; text-align: center; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.stepper output small { font-weight: 500; color: var(--muted); font-size: 13px; }
.segment { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--line); padding: 4px; border-radius: 12px; }
.segment button { border: 0; background: transparent; padding: 8px 4px; border-radius: 9px; font-weight: 600; font-size: 14px; }
.segment button[aria-pressed="true"] { background: var(--card); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }

/* Zusammenfassung und Zeilen */
.zeilen { display: grid; }
.zeile { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.zeile:last-child { border-bottom: 0; }
.zeile span:first-child { color: var(--muted); }
.zeile strong { text-align: right; font-weight: 600; }
.zeile--summe { border-top: 2px solid var(--ink); border-bottom: 0; margin-top: 4px; padding-top: 12px; font-size: 17px; }
.zeile--summe span:first-child { color: var(--ink); font-weight: 700; }
.zeile--summe strong { font-size: 22px; font-weight: 800; }

/* Erfolg */
.erfolg { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 24px 8px 8px; }
.erfolg__kreis { width: 72px; height: 72px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; }
.erfolg__kreis svg { width: 36px; height: 36px; }
.nummer { font-family: ui-monospace, Menlo, monospace; font-size: 14px; color: var(--muted); }

/* Listen */
.liste { display: grid; gap: 8px; }
.eintrag { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; text-align: left; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.eintrag__titel { font-weight: 600; }
.eintrag__info { grid-column: 1; font-size: 13px; color: var(--muted); }
.eintrag .pille { grid-column: 2; grid-row: 1 / span 2; }
.pille { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 9999px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.pille--offen { background: #FDECD9; color: #9A4A14; }
.pille--laeuft { background: var(--a-soft); color: var(--a); }
.pille--fertig { background: #DDF3E7; color: #166B44; }
.pille--notfall { background: #FBE1DA; color: #9A2E14; }

/* Verlauf (Zeitstrahl) */
.verlauf { display: grid; gap: 0; }
.schritt { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding-bottom: 16px; position: relative; }
.schritt::before { content: ""; position: absolute; left: 11px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.schritt:last-child::before { display: none; }
.schritt__punkt { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); display: grid; place-items: center; font-size: 12px; }
.schritt--erledigt .schritt__punkt { background: var(--ok); border-color: var(--ok); color: #fff; }
.schritt--aktiv .schritt__punkt { border-color: var(--a); background: var(--a); color: var(--a-ink); }
.schritt__text { display: grid; gap: 2px; }
.schritt__text strong { font-size: 15px; }
.schritt__text small { color: var(--muted); font-size: 13px; }
.schritt--offen .schritt__text { color: var(--muted); }

/* Fotos (nur angedeutet) */
.fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.foto { aspect-ratio: 1; border-radius: 10px; border: 1.5px dashed #c9ccd2; background: var(--card); display: grid; place-items: center; gap: 4px; font-size: 12px; color: var(--muted); text-align: center; padding: 6px; }
.foto--voll { border-style: solid; background: #E9EDF2; color: var(--ink); }
.foto svg { width: 26px; height: 26px; }

/* Nachricht an den Mieter / Mail-Vorschau */
.nachricht { background: var(--card); border-left: 4px solid var(--a); border-radius: 10px; padding: 12px 14px; display: grid; gap: 4px; font-size: 15px; }
.nachricht small { color: var(--muted); font-size: 13px; }
.mail { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); font-size: 14px; }
.mail__kopf { padding: 10px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 2px; color: var(--muted); }
.mail__kopf strong { color: var(--ink); }
.mail__text { padding: 12px 14px; white-space: pre-line; line-height: 1.5; }

/* Fuß mit Hauptknopf */
.fuss { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); display: grid; gap: 8px; }
.knopf { width: 100%; border: 0; border-radius: 12px; padding: 15px 16px; font-weight: 700; font-size: 16px; background: var(--a); color: var(--a-ink); }
.knopf:disabled { opacity: 0.45; cursor: not-allowed; }
.knopf--leise { background: transparent; color: var(--a); border: 2px solid var(--a); padding: 13px 16px; }
.knopf--klein { padding: 10px 14px; font-size: 14px; width: auto; }
.fuss__info { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.home { height: 5px; width: 120px; border-radius: 9999px; background: var(--ink); opacity: 0.25; margin: 0 auto; }
.leer { text-align: center; color: var(--muted); padding: 24px 8px; font-size: 15px; }
.hinweisbox { font-size: 13px; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 10px 12px; border: 1px dashed #c9ccd2; }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- Bausteine für die Büro- und Baustellen-Demos (08.11.2026) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: var(--card); border-radius: 9999px; padding: 8px 12px; font-size: 14px; font-weight: 600; text-align: left; }
.chip[aria-pressed="true"] { background: var(--a); color: var(--a-ink); border-color: var(--a); }
.text { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; white-space: pre-line; line-height: 1.5; font-size: 15px; min-height: 120px; }
.text--tippt::after { content: "▍"; color: var(--a); animation: blink 0.9s steps(2) infinite; }
@keyframes blink { to { opacity: 0; } }
.toast { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 9999px; font-size: 14px; font-weight: 600; opacity: 0; transition: opacity 200ms; pointer-events: none; z-index: 9; white-space: nowrap; }
.toast--an { opacity: 1; }
.app { position: relative; }
.suche { display: flex; gap: 8px; }
.suche input { flex: 1; min-width: 0; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); }
.suche button { width: 48px; border: 0; border-radius: 12px; background: var(--a); color: var(--a-ink); font-size: 18px; }
.quelle { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 6px; font-size: 14px; }
.quelle__titel { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.quelle__auszug { color: var(--muted); border-left: 3px solid var(--line); padding-left: 10px; }
.quelle mark { background: #FFE9A8; color: inherit; padding: 0 2px; border-radius: 3px; }
.dok { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.dok__icon { width: 40px; height: 40px; border-radius: 10px; background: var(--a-soft); display: grid; place-items: center; font-size: 18px; }
.dok__name { font-weight: 600; }
.dok__info { display: block; color: var(--muted); font-size: 13px; }
.unterschrift { display: block; width: 100%; height: 180px; background: var(--card); border: 1.5px dashed #c9ccd2; border-radius: var(--r); touch-action: none; cursor: crosshair; }
.unterschrift--voll { border-style: solid; border-color: var(--a); }
.timer { font-size: 46px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: center; letter-spacing: -0.02em; line-height: 1; }
.timer--laeuft { color: var(--a); }
.check { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; text-align: left; width: 100%; }
.check__box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); display: grid; place-items: center; font-size: 14px; color: #fff; grid-row: 1 / span 2; }
.check--ok .check__box { background: var(--ok); border-color: var(--ok); }
.check--mangel .check__box { background: var(--warn); border-color: var(--warn); }
.check__text { font-weight: 600; font-size: 15px; }
.check__sub { grid-column: 2; font-size: 13px; color: var(--muted); }
.check--mangel .check__sub { color: var(--warn); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi strong { font-size: 24px; line-height: 1.1; }
.raum { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.raum strong { font-size: 15px; }
.raum__mass { color: var(--muted); grid-column: 1; }
.raum__flaeche { grid-row: 1 / span 2; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.drei { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.drei .feld input { padding: 10px 8px; text-align: center; }
.fortschritt { height: 8px; background: var(--line); border-radius: 9999px; overflow: hidden; }
.fortschritt span { display: block; height: 100%; background: var(--a); border-radius: 9999px; transition: width 300ms; }
.sig-bild { max-width: 180px; height: auto; }
