/* Stile des Vollausbaus: globale Suche, Verwaltungsseiten, Rechtematrix, Kalender-Hilfen */
.suche-global { position: relative; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; margin-right: 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-muted); }
.suche-global svg { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.suche-global input { width: 260px; max-width: 40vw; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px; color: var(--text); }
.suche-global input::placeholder { color: var(--text-muted); }
.suche-global:focus-within { border-color: var(--petrol); box-shadow: 0 0 0 3px rgba(15, 106, 99, .12); }
.suche-pop { left: auto; right: 0; top: 40px; width: min(520px, 90vw); max-height: 70vh; overflow: auto; padding: 6px; } /* rechtsbündig unter dem Feld – ragt nie über den rechten Rand (Handy: Seite würde sonst herausgezoomt) */
.suche-pop .suche-gruppe { padding: 6px 8px 2px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.suche-pop button.suche-treffer { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; text-align: left; font: inherit; cursor: pointer; }
.suche-pop button.suche-treffer:hover, .suche-pop button.suche-treffer.aktiv { background: var(--hover-soft); }
.suche-pop .suche-leer { padding: 10px 8px; color: var(--text-muted); font-size: 12.5px; }
@media (max-width: 760px) {
  /* Handy: Suche als Lupe in der Kopfzeile; angetippt legt sie sich als Leiste über die Kopfzeile */
  .suche-global { width: 34px; height: 34px; padding: 0; margin-right: 2px; justify-content: center; border-color: transparent; background: transparent; cursor: pointer; }
  .suche-global svg { width: 20px; height: 20px; color: var(--text); }
  .suche-global input { width: 0; padding: 0; opacity: 0; }
  .suche-global.offen { position: fixed; left: 8px; right: 8px; top: 9px; width: auto; height: 38px; padding: 0 12px; justify-content: flex-start; background: var(--surface); border-color: var(--petrol); z-index: 60; cursor: text; }
  .suche-global.offen input { width: 100%; opacity: 1; }
  .suche-pop { position: fixed; left: 8px; right: 8px; top: 54px; width: auto; max-height: 70vh; }
  /* Ansichten-Schalter brechen um statt die Seite zu verbreitern */
  .seg { flex-wrap: wrap; max-width: 100%; }
  .toolbar .seg { flex: 1 1 100%; }
  .akte-erzeugen .btn, .akte-upload .btn { flex: 1 1 auto; }
}
.toolbar .toolbar-select { max-width: 14rem; }
.konzept-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--petrol); }
tr.muted td { color: var(--text-muted); }
tr.muted td strong { font-weight: 500; text-decoration: line-through; text-decoration-color: var(--line); }
.f-input.muted { color: var(--text-muted); }
.akte-knopf .count { margin-left: 4px; }
.kv .kv-value a.btn { margin-top: 4px; }
.aktionen-menue { display: flex; flex-wrap: wrap; gap: 6px; }
.tb-wrap textarea { width: 100%; }
.tb-leiste { display: flex; justify-content: flex-end; margin-top: 4px; }
/* Seitenmenü: der Navigationsteil rollt, Kopf und Fuß bleiben stehen (mit den neuen Gruppen ist das Menü höher als ein Handy-Bildschirm) */
.drawer-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.drawer-foot { flex: 0 0 auto; }

/* Hauptnavigation in der Kopfzeile (Rückmeldung 07.10.2026) – ab 1024 px sichtbar, darunter bleibt das Hamburger-Menü */
.hauptnav { display: none; align-items: center; gap: 2px; margin-left: 10px; min-width: 0; }
.hauptnav a { display: inline-flex; align-items: center; height: 34px; padding: 0 11px; border-radius: 8px; color: #3a4644; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.hauptnav a:hover { background: var(--hover-soft); color: var(--petrol-text); }
.hauptnav a.current { background: var(--cream); color: var(--petrol-deep); box-shadow: inset 0 -2px 0 var(--petrol); }
.hauptnav a[hidden] { display: none; }
@media (min-width: 1024px) { .hauptnav { display: flex; } }
@media (min-width: 1024px) and (max-width: 1320px) { .hauptnav a { padding: 0 8px; font-size: 12.5px; } .suche-global input { width: 170px; } }
/* Berichte: Unterreiter in Creme, damit sie sich von den Reitern der Auswertungen unterscheiden */
.seg.sub { background: var(--cream); }
.seg.sub button.on { color: var(--petrol-deep); }
/* Mehrfachauswahl (weitere Themen, Dienstleistungen eines Projekts) */
.mehrfach { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 10px; max-height: 11rem; overflow: auto; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.mehrfach .f-check { min-height: 28px; }
/* Auftrag: nicht beauftragte Positionen (Option) bleiben grau */
.pos-table tr.option td { color: var(--text-muted); }
.pos-table td.check { text-align: center; }

/* Fenster mit Ansichten (Reiter im Inhalt, z. B. Akte): feste Höhe, damit der Wechsel der Ansicht nichts springen lässt (Rückmeldung 08.10.2026) */
.dlg.mit-ansichten:not(.dlg-login) { height: min(calc(100dvh - 48px), 820px); }
@media (max-width: 720px) { .dlg.mit-ansichten:not(.dlg-login) { height: 100dvh; } }

/* Zeit erfassen am Handy: Tagesansicht mit großen Flächen für den Finger (Rückmeldung 08.10.2026) */
.zm { display: flex; flex-direction: column; gap: 10px; padding-bottom: 84px; }
.zm-werkzeuge .btn { min-height: 40px; }
.zm-kopf { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: stretch; gap: 8px; }
.zm-pfeil { width: 48px; height: auto; min-height: 56px; }
.zm-tag { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 56px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.zm-tag b { font-size: 16px; }
.zm-tag .zm-datum { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; } /* natives Datumsfeld über der Anzeige – ein Tipp öffnet den Kalender des Geräts */
.zm-summen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.zm-summen > div { display: flex; flex-direction: column; align-items: center; padding: 8px 6px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface); }
.zm-summen span { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.zm-summen b { font-size: 16px; }
.zm-liste { display: flex; flex-direction: column; gap: 8px; }
.zm-card { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; min-height: 64px; padding: 10px 12px; border: 1px solid var(--line); border-left: 5px solid var(--petrol); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-sm); text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.zm-card.ad { border-left-color: var(--bar-olive); }
.zm-card.ho { border-left-color: var(--lime); }
.zm-card:active { background: var(--hover-soft); }
.zm-zeit { display: flex; flex-direction: column; }
.zm-zeit b { font-size: 14px; }
.zm-zeit span { font-size: 12px; color: var(--text-muted); }
.zm-text { display: flex; flex-direction: column; min-width: 0; }
.zm-text b, .zm-text span, .zm-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zm-text span { font-size: 12.5px; color: var(--text-muted); }
.zm-text small { font-size: 11.5px; color: var(--text-muted); }
.zm-tags { display: flex; gap: 4px; }
.zm-leer { padding: 24px 12px; text-align: center; color: var(--text-muted); border: 1px dashed var(--line); border-radius: 10px; }
.zm-aktionen { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(20, 40, 38, .08); }
.zm-aktionen .btn { flex: 1 1 auto; min-height: 50px; justify-content: center; font-size: 15px; }
.zm-aktionen .btn.primary { flex: 2 1 auto; }
@media (min-width: 761px) { .zm { max-width: 640px; } .zm-aktionen { position: sticky; border-radius: 10px; border: 1px solid var(--line); } }
.zm-schnell { display: flex; flex-direction: column; gap: 6px; }
.zm-schnell-titel { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.zm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.zm-chip { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; min-height: 44px; max-width: 100%; padding: 6px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--cream); font: inherit; color: var(--text); cursor: pointer; }
.zm-chip b { font-size: 13px; }
.zm-chip span { max-width: 60vw; font-size: 11.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zm-chip:active { background: #fbeccf; }
.zf-handy .f-input, .zf-handy .combo .combo-input { min-height: 48px; font-size: 16px; }
.zf-handy .zf-times { flex-wrap: wrap; }
.zf-handy .zf-times input { flex: 1 1 40%; min-width: 7rem; }
.zf-handy .f-check { min-height: 46px; }

/* Rechnung je Leistung (08.10.2026): Zeilen mit kumuliertem Prozentsatz oder Betrag, weitere Zeilen, Abzüge */
.rp-in { width: 7rem; text-align: right; }
.rp-tabelle th, .rp-tabelle td { vertical-align: middle; }
.rp-tabelle tr.ueber td, .rp-summe .ueber { color: #b3261e; }
.rp-tabelle .bar-cell { min-width: 7rem; }
.rp-zusatz { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 7.5rem auto; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.rp-zusatz input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--petrol); }
.rp-h4 { margin: 6px 0 0; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.rp-summe b { font-size: 14px; }
@media (max-width: 720px) { .rp-zusatz { grid-template-columns: auto minmax(0, 1fr) auto; } .rp-zusatz .rp-in { grid-column: 2; } }

/* Combobox gesperrt (disabled) */
.combo.disabled .combo-input { background: #f3f5f4; color: var(--text-muted); cursor: not-allowed; }
.combo.disabled .combo-caret { opacity: .5; }
