/* ════════════════════════════════════════════════════════════════════════════
   Einheitlicher Seitenrahmen (21.10.2026) – «alle Seiten wie aus einem Guss»
   Wird ZULETZT geladen und gibt jeder Seite dieselbe Breite, denselben Kopf, dieselbe Filterleiste
   und dieselben Kennzahl-Kacheln. Neue Seiten: TecSeite.kopf(...) / class="tec-seite-kopf", "tec-filter", "tec-kpis".
   Bestehende Seiten werden schrittweise umgestellt; ihre alten Klassen bleiben, hier nur vereinheitlicht.
   ════════════════════════════════════════════════════════════════════════════ */
:root {
    --seite-pad-x: 20px;
    --seite-pad-y: 14px;
    --seite-titel: 20px;
    --seite-sub: 13px;
    --feld-hoehe: 34px;
    --feld-schrift: 13px;
    --label-schrift: 12px;
    --seite-marke: var(--blue-900, #0f2f57);
    --seite-grau: var(--muted, #64748b);
    --seite-linie: var(--border, #e2e8f0);
    --seite-flaeche: #f8fafc;
}

/* ── 1. Breite: alle Seiten volle Breite mit gleichem Innenabstand (vorher 980 px bei einigen, 100 % bei anderen) ── */
section.view:not(#viewLogin) { max-width: none; width: 100%; }

/* ── 2. KW neben dem Datum (statt darunter – sonst springen Filterzeilen auf verschiedene Höhen) ── */
.kw-wrap { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; vertical-align: middle; }
.kw-wrap > input[type="date"] { flex: 1 1 auto; min-width: 0; }
.kw-badge { flex: none; font-size: 11px; color: var(--seite-grau); white-space: nowrap; line-height: 1; }
.kw-badge:empty { display: none; }

/* ── 3. Seitenkopf: Titel links (20 px), Untertitel grau, Aktionen rechts ── */
.tec-seite { padding: var(--seite-pad-y) var(--seite-pad-x) 24px; min-width: 0; }
.tec-seite-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 0 0 12px; padding: 0; }
.tec-seite-kopf > .tec-titelblock { min-width: 0; }
.tec-seite-kopf h1, .tec-seite-kopf h2 { font-size: var(--seite-titel) !important; font-weight: 700; line-height: 1.25; margin: 0 !important; color: var(--seite-marke) !important; }
.tec-seite-kopf small, .tec-seite-kopf .eyebrow { display: none; }   /* Ober-Zeilen («VERKAUF · …») einheitlich weg */
.tec-seite-kopf p, .tec-seite-kopf .tec-sub { font-size: var(--seite-sub); color: var(--seite-grau); margin: 2px 0 0; }
.tec-seite-aktionen, .tec-seite-kopf .hl-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }

/* ── 4. Filterleiste: eine Zeile, Felder unten bündig, gleiche Höhe, Beschriftung darüber ── */
.tec-filter { display: flex !important; flex-wrap: wrap; align-items: flex-end !important; gap: 10px !important; margin: 0 0 12px !important;
    padding: 10px 12px !important; background: var(--seite-flaeche) !important; border: 1px solid var(--seite-linie) !important; border-radius: 10px !important; }
.tec-filter > label { display: flex; flex-direction: column; gap: 3px; margin: 0; font-size: var(--label-schrift); color: var(--seite-grau); font-weight: 500; min-width: 140px; }
.tec-filter > label.hl-inline, .tec-filter > label.tec-check { flex-direction: row; align-items: center; gap: 6px; min-width: 0; height: var(--feld-hoehe); color: #334155; }
.tec-filter input:not([type="checkbox"]):not([type="radio"]), .tec-filter select {
    height: var(--feld-hoehe) !important; min-height: var(--feld-hoehe) !important; padding: 0 10px !important; font-size: var(--feld-schrift) !important;
    border: 1px solid var(--seite-linie); border-radius: 8px; background: #fff; max-width: none !important; box-sizing: border-box; }
.tec-filter select { padding-right: 26px !important; }
.tec-filter > label > .kw-wrap { width: 100%; }
.tec-filter .tec-suche, .tec-filter > label.hl-search, .tec-filter > label:has(input[type="search"]) { flex: 1 1 240px; }
.tec-filter > .btn, .tec-filter > button, .tec-filter > label.btn { height: var(--feld-hoehe); display: inline-flex; align-items: center; white-space: nowrap; }
.tec-filter .tec-filter-rechts { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ── 5. Kennzahl-Kacheln: gleiche Grösse überall ── */
.tec-kpis { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important; gap: 8px !important; margin: 0 0 12px !important; }
.tec-kpis > * { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 12px !important; min-height: 58px;
    background: #fff; border: 1px solid var(--seite-linie); border-radius: 10px; text-align: left; font-size: 12px; color: var(--seite-grau); }
.tec-kpis > * > strong, .tec-kpis > * > b { font-size: 20px !important; line-height: 1.1; color: var(--seite-marke); }

/* ── 6. Zähler/Seitenwechsel über Tabellen ── */
.tec-liste-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 8px; font-size: 13px; }
.tec-liste-kopf .tec-zaehler { font-weight: 700; color: var(--seite-marke); }
.tec-liste-kopf .tec-rechts { margin-left: auto; display: flex; gap: 6px; align-items: center; }

/* ── 7. Altlasten der drei Anfrage-Seiten ── */
#viewOlmero > .dashboard-header { display: none !important; }          /* leere weisse Leiste (Navigation sitzt im Menü) */
#viewOlmero .olm-wrap, #viewHoermannLeads .hl-page, #enquiryListHost { padding: var(--seite-pad-y) var(--seite-pad-x) 24px !important; }
#viewOlmero .olm-quick-tabs { margin: 0 0 10px !important; }

/* ── 8. Übrige Seiten mit eigener Kopf-Klasse auf denselben Kopf abbilden (Lieferungen, Kampagnen) ── */
.delivery-heading, .campaign-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 0 0 12px !important; padding: 0 !important; }
.delivery-heading h1, .delivery-heading h2, .campaign-head h1, .campaign-head h2 { font-size: var(--seite-titel) !important; font-weight: 700; line-height: 1.25; margin: 0 !important; color: var(--seite-marke) !important; }
.delivery-heading small, .campaign-head .eyebrow, .tec-seite-kopf .sp-explorer-eyebrow { display: none !important; }
.delivery-heading p, .campaign-head p:not(.eyebrow) { font-size: var(--seite-sub); color: var(--seite-grau); margin: 2px 0 0; }

/* ── 9. Alte, leere Kopfleisten (nur die ausgeblendete Navigation darin) nicht mehr als weisse Leiste zeigen ── */
.dashboard-header:not(:has(> :not(.view-toggle-compact))) { display: none !important; }

/* ── 10. Gleiche Feldhöhe in allen Werkzeug-/Filterleisten ── */
:is(.rk-toolbar, .rk-sales-filter, .zp-toolbar, .delivery-toolbar, .my-outlook-toolbar, .reference-toolbar, .sv-prospect-filters,
    .template-filters, .quick-filters, .filter-row, .auftraege-controls, .md-steuer, .bc-actions)
    :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select) {
    height: var(--feld-hoehe); min-height: var(--feld-hoehe); font-size: var(--feld-schrift); box-sizing: border-box; }

/* ── 11. Aufträge: Auswahlfelder nebeneinander statt je eine volle Zeile (globale select{width:100%} + flex-wrap) ── */
.auftraege-controls { flex-wrap: wrap; align-items: center; gap: 8px; }
.auftraege-controls > select { width: auto !important; flex: 0 1 200px; min-width: 150px; }
.auftraege-controls > input[type="search"] { flex: 1 1 240px; min-width: 200px; height: var(--feld-hoehe); }
.auftraege-controls > button, .auftraege-controls > .btn { height: var(--feld-hoehe); }

/* ── 12. Tabellen-Werkzeugleiste kompakt (alle Tabellen): «Spalten einfrieren» in EINER Zeile ── */
.tt-freeze-control { display: inline-flex !important; align-items: center; gap: 6px; flex-wrap: nowrap !important; white-space: nowrap; }
.tt-freeze-control select { width: auto !important; min-width: 0; max-width: 220px; height: 28px; min-height: 28px !important; padding: 0 6px !important; font-size: 12px !important; }
.tt-bar { padding: 4px 0 !important; gap: 6px; row-gap: 4px; }
.tt-bar button { padding: 3px 9px !important; line-height: 1.4; }
.tt-column-filter { margin-top: 4px !important; padding: 2px 6px !important; height: 26px; min-height: 26px !important; }

/* ── 13. Filter kompakt: Beschriftung LINKS neben dem Feld statt darüber → eine Feldhöhe pro Filterzeile ── */
:root { --feld-hoehe: 32px; }
.tec-filter { padding: 6px 10px !important; gap: 6px 12px !important; align-items: center !important; }
.tec-filter > label { flex-direction: row !important; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
.tec-filter > label > input:not([type="checkbox"]):not([type="radio"]), .tec-filter > label > select, .tec-filter > label > .kw-wrap { width: auto; min-width: 120px; }
.tec-filter > label.tec-suche > input, .tec-filter > label.hl-search > input, .tec-filter > label:has(input[type="search"]) > input { flex: 1 1 auto; min-width: 200px; }
.tec-seite-kopf { margin-bottom: 8px; }
.tec-kpis { margin-bottom: 8px !important; }
.tec-kpis > * { min-height: 48px; padding: 6px 10px !important; }
.tec-kpis > * > strong, .tec-kpis > * > b { font-size: 18px !important; }

/* ── 14. Tabellen-Werkzeugleiste in EINER Zeile: Zähler + Hinweis links, Einfrieren + Knöpfe rechts.
         Der Hinweis «gesamter gefilterter Bestand» stand als eigene volle Zeile da (flex-basis 100 %);
         echte Filter-Chips behalten ihre eigene Zeile. ── */
.tt-bar > .tt-count { order: 0; margin-right: 0; white-space: nowrap; }
.tt-bar > .tt-chips:has(> .tt-scope:only-child) { order: 1; flex: 1 1 200px; flex-basis: 200px; min-width: 0; }
.tt-bar > .tt-chips > .tt-scope:only-child { flex-basis: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #94a3b8; }
.tt-bar > .tt-freeze-control { order: 2; }
.tt-bar > button { order: 3; }
.tt-bar > .tt-chips:not(:has(> .tt-scope:only-child)) { order: 4; }

/* ── 15. Fakturierung: Filterzeile, Kacheln und Kalender-Warnungen niedriger ── */
.fakt-filterzeile label[for="faktSearch"], .fakt-filterzeile label[for="faktVerkaeuferFilter"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fakt-filterzeile input:not([type="checkbox"]), .fakt-filterzeile select { height: var(--feld-hoehe); }
#faktHauptPanel { padding: 10px 14px !important; }
#faktStatusTiles { margin: 8px 0 6px !important; gap: 6px !important; }
#faktBereichSummary { margin-bottom: 6px !important; }
#faktSummary { margin-bottom: 6px !important; }
#faktKalenderBox { margin-bottom: 8px !important; }
.fakt-kalender-warnungen { display: flex; flex-wrap: wrap; gap: 2px 28px; align-items: baseline; }
.fakt-kalender-warnungen > details { margin-top: 2px !important; }
.fakt-kalender-warnungen > details[open] { flex: 1 1 100%; }

/* ── 16. Formulare kompakt (Anfrage, Angebot, Auftrag, Dialoge): niedrigere Felder, engere Abstände.
         Nur am Bildschirm mit Maus – auf Touch-Geräten bleiben die grossen Tippflächen. ── */
@media (hover: hover) and (min-width: 761px) {
    input[type="text"], input[type="password"], input[type="number"], input[type="email"], input[type="tel"],
    input[type="date"], input[type="search"], input[type="url"], input[type="time"], input:not([type]), select, .form-control, .form-input {
        padding: 4px 8px; font-size: 13px; line-height: 1.35; min-height: 0; }
    textarea { padding: 5px 8px; font-size: 13px; line-height: 1.4; }
    .field, .form-group { margin-bottom: 5px; }
    .field > span, .form-group > label, .form-label { margin-bottom: 1px; font-size: 11px; }
    .form-row { margin-bottom: 5px; }
    .form-row.two-col, .form-row.three-col { gap: 6px 10px; }
    .form-section { margin-bottom: 10px; }
    .form-section h3 { margin-bottom: 6px; padding-bottom: 3px; }
    .form-actions { margin-top: 10px; padding-top: 8px; }
    .invoice-form-group { margin-bottom: 6px; }
    .invoice-form-group label { margin-bottom: 1px; font-size: 11px; }
    .invoice-form-group input, .invoice-form-group select, .invoice-form-group textarea { padding: 4px 8px; font-size: 13px; }
    .wizard-form-grid { gap: 6px 10px !important; }
    .enquiry-grid { gap: 8px; margin-bottom: 8px; }
    .enquiry-card { padding: 8px 10px; }
    .enquiry-card h3 { margin-bottom: 5px; padding-bottom: 3px; }
    .enquiry-field-grid { gap: 3px; }
    .enquiry-field { gap: 6px; align-items: center; }
    .enquiry-field-label { flex-basis: 105px; }
    .order-info-card { padding: 7px 10px; }
    .order-info-row { padding: 1px 0; gap: 4px; }
    .modal-body .form-group, #modalActivity .modal-body .form-group { margin-bottom: 5px; }
}

/* ── 17. Listen: weniger Kopf über der Tabelle, keine Spalten-Mindestbreite durch die Spaltenfilter,
         kein zweiter Scrollbalken um die Tabelle (die Höhe setzt tec-seite.js) ── */
.tt-column-filter { width: 100% !important; min-width: 0 !important; box-sizing: border-box; }
/* Feste Mindestbreiten aus dem Seitencode (1060–1520 px) erzwangen Querscrollen, auch wenn die Spalten passen –
   die Tabelle ist nur so breit wie ihr Inhalt es verlangt */
.tt-viewport > table, #svContractsTable, .sv-prospects #svProspectTable, .vz-tab { min-width: 0 !important; }
#viewFakturierung .tt-viewport > table.fakt-main-table { min-width: 0 !important; }   /* pipeline-ui.css setzte 1280 px !important */
/* Spaltenköpfe dürfen umbrechen, Adresszeilen in Zellen ebenso (Seitencode setzte nowrap) – sonst bestimmt der längste Text die Breite */
.tt-viewport thead th { white-space: normal !important; vertical-align: bottom; }
.tt-viewport td span[style*="nowrap"], .tt-viewport td div[style*="nowrap"] { white-space: normal !important; }
.tt-viewport th, .tt-viewport td { padding-left: 7px !important; padding-right: 7px !important; }
.tt-viewport th input[type="date"], .tt-viewport th .kw-wrap { max-width: 104px !important; }
/* Hinweisbanner «Du hast N offene Aufgaben» oben: eine schmale Zeile im Seitenrand */
.todo-banner { margin: 6px var(--rand-x, 16px) 0 !important; padding: 3px 10px !important; min-height: 0 !important; font-size: 12.5px !important;
    border-radius: 6px !important; box-shadow: none !important; }
.todo-banner .btn, .todo-banner button { min-height: 22px !important; padding: 1px 10px !important; font-size: 12px !important; }
.tt-records table { min-width: 0 !important; }
#enquiriesTable { min-width: 0 !important; }
#angTableContainer { overflow: visible !important; padding: 0 16px 8px !important; }
#angKpiBar { padding: 4px 16px 0 !important; }
.tt-bar { padding: 2px 0 !important; min-height: 0; font-size: 12px; }
.tt-bar button { padding: 2px 8px !important; font-size: 12px; line-height: 1.4; }
/* «Kartenansicht» in die Zeile der Tabellen-Werkzeugleiste statt eigene Zeile */
:has(> .tt-view-toggle + .tt-records) { position: relative; }
.tt-view-toggle:has(+ .tt-records) { position: absolute; right: 0; top: 2px; z-index: 2; margin: 0 !important; }
.tt-view-toggle + .tt-records > .tt-bar { padding-right: 110px !important; }
.tt-view-toggle { width: auto !important; margin: 0 0 4px auto !important; padding: 2px 10px !important; font-size: 12px !important; }
#orderOpenStepsToggle, #btnDataCopilot { background: #fff !important; color: #374151 !important; border: 1px solid #d1d5db !important; font-weight: 500 !important; }
.tec-liste-kopf { margin-bottom: 4px; font-size: 12px; }
.tec-liste-kopf .btn-sm { padding: 2px 8px; font-size: 12px; }
.auftraege-controls > select { flex: 0 1 165px !important; min-width: 120px !important; }
.dashboard-header { padding-top: 6px !important; padding-bottom: 6px !important; margin-bottom: 0 !important; }
.abschnitt-reiter { margin-bottom: 6px !important; }
.tec-seite { padding-top: 8px !important; }
/* Seiten mit Reiterleiste: der Reiter nennt die Seite schon – Titel + Untertitel nicht nochmals als eigene Zeile */
section.view:has(.abschnitt-reiter) .tec-seite-kopf > .tec-titelblock { display: none; }
section.view:has(.abschnitt-reiter) .tec-seite-kopf:not(:has(> :not(.tec-titelblock))) { display: none; }
#enquiryListHost { padding-top: 0 !important; }
/* Kennzahlen über Listen als eine flache Zeile: Bezeichnung + Wert nebeneinander */
.order-kpi-bar { display: flex !important; flex-wrap: wrap; gap: 6px !important; margin: 4px 0 6px !important; }
.order-kpi-bar > .kpi-tile, .order-kpi-bar > div { display: flex !important; flex-direction: row-reverse !important; justify-content: flex-end; align-items: baseline !important; gap: 6px;
    background: #fff !important; border: 1px solid var(--tec-linie, #e5e7eb) !important;
    padding: 3px 10px !important; min-height: 0 !important; min-width: 0 !important; border-radius: 6px !important; }
.order-kpi-bar .kpi-value, .order-kpi-bar > div > span:first-child { font-size: 13px !important; font-weight: 700 !important; color: var(--tec-text, #1f2937) !important; }
.order-kpi-bar .kpi-label, .order-kpi-bar > div > span:last-child { font-size: 12px !important; margin: 0 !important; }
.order-kpi-bar .kpi-sub { display: none !important; }

/* ── 17b. Datumsfelder: KW-Knopf klein und auf gleicher Höhe neben dem Feld; Datum im Spaltenfilter schmal ── */
.tec-kw-btn { flex: none; white-space: nowrap; margin: 0 0 0 4px !important; padding: 0 6px !important; height: var(--feld-hoehe); line-height: 1;
    font-size: 11px !important; border-radius: 5px !important; vertical-align: middle; }
.kw-wrap { flex-wrap: nowrap; }
.tt-viewport th input[type="date"] { width: 100% !important; min-width: 0 !important; max-width: 128px !important; padding-right: 2px !important; }
.tt-viewport th .kw-wrap { display: flex; width: 100%; max-width: 128px; }
.tt-viewport th .kw-badge { display: none; }
/* Fakturierung: Tabelle ohne feste Mindestbreite, Aktionen dürfen umbrechen, Datumsfelder ohne feste Breite */
#faktTableContainer table { min-width: 0 !important; }
#faktTableContainer td:last-child { white-space: normal !important; }
#faktTableContainer td:last-child .btn { white-space: normal; text-align: left; }
.fakt-datum > div { width: auto !important; }
.fakt-datum input[type="date"] { width: 128px !important; }
.fakt-filterzeile > div:first-child { flex: 1 1 180px !important; min-width: 160px !important; }
.fakt-filterzeile > div:has(> #faktVerkaeuferFilter) { flex: 0 0 180px !important; }
.fakt-filterzeile > div:last-child .btn { padding: 0 10px !important; height: var(--feld-hoehe); font-size: 12px !important; }
#faktStatusTiles > button { flex: 1 1 108px !important; min-width: 108px !important; padding: 3px 7px !important; }
#faktStatusTiles > button > div:first-child { font-size: 10.5px !important; }
#faktTableContainer td:nth-child(3), #faktTableContainer td:nth-child(4) { min-width: 110px; }
#faktStatusTiles > button > div:last-child { font-size: 12.5px !important; }
#faktStatusTiles > button > div:last-child > span { display: none; }   /* Zusatz («143 Aufträge») als Tooltip, Betrag bleibt lesbar */
.tt-bar > .tt-chips:has(> .tt-scope:only-child) { flex: 1 1 0 !important; }

/* ── 19. Werkzeug-/Filterleisten ALLER übrigen Seiten wie Aufträge: Felder nebeneinander statt je eine volle Zeile
         (globales select{width:100%} liess Pipeline, Rapporte, Rechnungskontrolle, Lieferungen … stapeln) ── */
:is(.dashboard-actions, .rk-toolbar, .delivery-toolbar, .zp-toolbar, .mg-toolbar, .olm-toolbar, .rk-filter-group, .my-outlook-toolbar,
    .reference-toolbar, .sv-prospect-filters, .bc-actions, .md-steuer, .campaign-head-actions, .hl-actions) {
    display: flex !important; flex-wrap: wrap; align-items: center !important; gap: 6px 8px !important; }
:is(.dashboard-actions, .rk-toolbar, .delivery-toolbar, .zp-toolbar, .mg-toolbar, .olm-toolbar, .rk-filter-group, .my-outlook-toolbar,
    .reference-toolbar, .sv-prospect-filters, #zpAreaFilters) > select,
:is(.dashboard-actions, .rk-toolbar, .delivery-toolbar, .zp-toolbar, .mg-toolbar, .olm-toolbar, .rk-filter-group, #zpAreaFilters) > label > select {
    width: auto !important; flex: 0 1 180px; min-width: 120px; max-width: 240px; height: var(--feld-hoehe); }
:is(.dashboard-actions, .rk-toolbar, .delivery-toolbar, .zp-toolbar, .mg-toolbar, .rk-filter-group) > input:is([type="search"], [type="text"]) {
    width: auto !important; flex: 1 1 220px; min-width: 180px; height: var(--feld-hoehe); }
:is(.dashboard-actions, .rk-toolbar, .delivery-toolbar, .zp-toolbar, .mg-toolbar, .olm-toolbar, .rk-filter-group, .campaign-head-actions, .delivery-heading, .mg-heading) :is(button, .btn) {
    height: var(--feld-hoehe); min-height: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; display: inline-flex; align-items: center; white-space: nowrap; }
/* Suchfeld mit Lupe (Rapporte, Rechnungskontrolle, Zonenplan …): eine Feldhöhe statt 57 px */
.global-search-box { flex: 1 1 240px !important; width: auto !important; max-width: 520px; min-width: 200px; margin: 0 !important; height: var(--feld-hoehe) !important; min-height: 0 !important; padding: 0 10px !important;
    gap: 6px; align-items: center; border-radius: 6px !important; box-shadow: none !important; }
.global-search-box svg { width: 14px; height: 14px; flex: none; }
.global-search-box input { height: 100% !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; background: transparent; font-size: 13px !important; }
/* Suchkästen mit Rahmen aussen und randlosem Feld innen (22.10.2026): die allgemeine Feldregel aus tec-ui.css (Mindesthöhe 34 px,
   weisser Hintergrund, Rahmen, sehr hohe Spezifität) machte das innere Feld höher als den Kasten – es lag über dem Rahmen. */
:is(.global-search-box, .addpos-search-wrap, .zp-plz-search, .feld-search) input:not([type="checkbox"]):not([type="radio"]) {
    min-height: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; outline: none; }
:is(.addpos-search-wrap, .zp-plz-search, .feld-search) input:not([type="checkbox"]):not([type="radio"]) { padding: 0 !important; height: auto !important; }
.rk-filter-tabs { margin: 0 !important; }
.rk-filter-tabs button, .rk-filter-tabs .rk-filter-tab { padding: 4px 10px !important; font-size: 12px !important; }
/* Kennzahl-Kacheln der übrigen Seiten (Kampagnen, Serviceverträge, Mahnwesen) flach wie überall */
.campaign-kpis { gap: 6px !important; margin-bottom: 8px !important; }
.campaign-kpis > * { padding: 6px 10px !important; min-height: 0 !important; border-radius: 6px !important; box-shadow: none !important; }
#svStatsBar > * { padding: 4px 10px !important; min-height: 0 !important; border-radius: 6px !important; }
#mwWrap > .tec-seite-kopf + div > div { padding: 6px 10px !important; min-height: 0 !important; border-radius: 6px !important; }
/* Seitenköpfe mit eigener Klasse (Sitzungen, Lieferungen, Kampagnen) gleich hoch wie der Rahmen */
.mg-heading, .delivery-heading, .campaign-head { margin-bottom: 8px !important; }
.mg-heading .mg-title, .mg-heading h1, .mg-heading h2 { font-size: var(--seite-titel) !important; margin: 0 !important; }
.delivery-note { margin: 4px 0 8px !important; font-size: 12px; }
#zpAreaFilters { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; padding: 4px 0 !important; }

/* ── 20. Gleicher Seitenanfang auf jeder Seite: Titelzeile (mit oder ohne Reiter) 8 px unter der Kopfleiste,
         16 px Seitenrand, erste Filterzeile 6 px darunter. tec-seite.js setzt auf Seiten ohne Reiter die Titelzeile. ── */
:root { --rand-x: 16px; }
section.view > .abschnitt-reiter { margin: 8px var(--rand-x) 6px !important; padding: 6px 10px !important; min-height: 43px; border-radius: 8px !important; }
section.view > .abschnitt-reiter .ar-titel { font-size: 15px !important; font-weight: 600 !important; color: var(--seite-marke) !important; margin-right: 10px !important; }
section.view > .abschnitt-reiter .ar-reiter { border-radius: 6px !important; padding: 4px 11px !important; font-size: 12.5px !important; }
.dashboard-header { padding: 6px var(--rand-x) !important; }
#enquiryListHost, .tec-seite, #mwWrap, .olm-wrap, .delivery-page, .md-root, #nkUebersichtInhalt, .my-outlook, #businessCockpitPage, #pendContainer > div:first-child {
    padding: 6px var(--rand-x) 12px !important; }
#enquiryListHost { padding-top: 0 !important; }
#pendContainer { margin: 0 !important; }
#faktHauptPanel { margin: 0 var(--rand-x) !important; padding: 6px 0 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
/* Doppelte Seitentitel (stehen jetzt in der Titelzeile) */
.md-kopf .md-kopf-text, .delivery-heading > div:first-child, .sp-explorer-header > div:first-child, .bc-head-main { display: none !important; }
.md-kopf { min-height: 0 !important; justify-content: flex-end; }
.olm-head { margin: 0 0 6px !important; }
#viewKampagnen, #viewSitzungen { padding: 0 !important; }
:is(#viewKampagnen, #viewSitzungen) > :not(.abschnitt-reiter) { margin-left: var(--rand-x) !important; margin-right: var(--rand-x) !important; }
#viewSitzungen > .mg-heading { display: none !important; }     /* Titel steht jetzt in der Titelzeile */
#campaignHost > .campaign-head > div:first-child { display: none; }
#campaignHost { padding-top: 6px !important; }

/* ── 22. Belegkontext (Anfrage, Angebot, Auftrag): Nummer · Kunde · Objektadresse – in der Titelzeile grau,
         im klebenden Belegkopf als erste Zeile, sobald gescrollt wird (tec-seite.js) ── */
.tec-seitentitel .tec-kontext-titel { margin-left: 4px; font-size: 13px; color: var(--tec-text-2, #4b5563); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 auto; }
.tec-seitentitel .tec-kontext-titel::before { content: '·'; margin-right: 8px; color: #9ca3af; }
.tec-seitentitel { flex-wrap: nowrap !important; }
.beleg-sticky-head > .tec-kontext, .order-sticky-head > .tec-kontext { display: none; }
.beleg-sticky-head.is-stuck > .tec-kontext, .order-sticky-head.is-stuck > .tec-kontext {
    display: flex; gap: 8px; align-items: baseline; padding: 4px 2px 5px; margin-bottom: 4px; border-bottom: 1px solid var(--tec-linie, #e5e7eb);
    font-size: 13px; color: var(--tec-text-2, #4b5563); white-space: nowrap; overflow: hidden; }
.tec-kontext > strong { color: var(--seite-marke); font-weight: 600; flex: none; }
.tec-kontext > span { overflow: hidden; text-overflow: ellipsis; }

/* ── 23. Einheitlicher Verlauf (verlauf.js) – Anfrage, Angebot, Auftrag ── */
.tv-leiste { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.tv-leiste h3 { margin: 0 !important; font-size: 14px !important; }
.tv-anzahl { font-size: 12px; color: var(--tec-text-2, #4b5563); }
.tv-neu { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.tv-form { display: flex; flex-direction: column; gap: 6px; padding: 10px; margin: 0 0 10px; background: #f8fafc; border: 1px solid var(--tec-linie, #e5e7eb); border-radius: 6px; }
.tv-form-zeile { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tv-form input, .tv-form textarea { width: auto; }
.tv-form > input[name="titel"], .tv-form > textarea { width: 100%; }
.tv-form-aktionen { justify-content: flex-end; }
.tv-segment { display: inline-flex; }
.tv-segment > button { border: 1px solid #d1d5db; background: #fff; color: #374151; padding: 3px 10px; font-size: 12.5px; cursor: pointer; margin-left: -1px; }
.tv-segment > button:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.tv-segment > button:last-child { border-radius: 0 6px 6px 0; }
.tv-segment > button.aktiv { background: var(--seite-marke); border-color: var(--seite-marke); color: #fff; position: relative; }
.tv-liste { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--tec-linie, #e5e7eb); margin-left: 10px; }
.tv-eintrag { display: flex; gap: 10px; padding: 6px 0 8px 0; position: relative; }
.tv-icon { flex: none; width: 22px; height: 22px; margin-left: -12px; border-radius: 50%; background: #fff; border: 1px solid var(--tec-linie, #e5e7eb);
    display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.tv-inhalt { min-width: 0; flex: 1 1 auto; }
.tv-kopf { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; font-size: 12.5px; color: var(--tec-text-2, #4b5563); }
.tv-kopf > strong { color: var(--tec-text, #1f2937); font-weight: 600; }
.tv-richtung { color: #0f766e; }
.tv-herkunft { background: #f1f5f9; color: #475569; border-radius: 4px; padding: 0 6px; font-size: 11.5px; }
.tv-wer { margin-left: auto; font-size: 11.5px; }
.tv-loeschen { border: 0; background: none; color: #9ca3af; cursor: pointer; padding: 0 2px; }
.tv-loeschen:hover { color: #b91c1c; }
.tv-titel { font-size: 13px; font-weight: 500; color: var(--tec-text, #1f2937); margin-top: 1px; }
.tv-text { font-size: 13px; color: #374151; white-space: pre-wrap; margin-top: 2px; }
.tv-kontakt { font-size: 12px; color: var(--tec-text-2, #4b5563); margin-top: 2px; }
.tv-leer { font-size: 13px; color: var(--tec-text-2, #4b5563); padding: 4px 0; }
/* Angebot: alte Einzelknöpfe «Anruf/Notiz/Besuch erfassen» ersetzt durch «＋» im Verlauf */
#tabTimeline .timeline-actions > button[onclick^="showAddActivityModal"] { display: none !important; }

/* ── 24. «Heute zu tun» (heute.js) und Kurzmenü je Rolle ── */
.heute { padding: 6px var(--rand-x, 16px) 16px; display: flex; flex-direction: column; gap: 10px; }
.heute-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.heute-sub { font-size: 13px; color: var(--tec-text-2, #4b5563); }
.heute-profil { margin-left: auto; }
.heute-zaehler { display: flex; gap: 6px; flex-wrap: wrap; }
.heute-zaehler > button { display: inline-flex; align-items: baseline; gap: 8px; padding: 5px 12px; background: #fff; border: 1px solid var(--tec-linie, #e5e7eb);
    border-radius: 6px; font-size: 12.5px; color: var(--tec-text-2, #4b5563); cursor: pointer; }
.heute-zaehler > button strong { font-size: 15px; color: var(--tec-text, #1f2937); }
.heute-zaehler > button.aktiv { border-color: var(--seite-marke); box-shadow: inset 0 0 0 1px var(--seite-marke); color: var(--seite-marke); }
.heute-liste { background: #fff; border: 1px solid var(--tec-linie, #e5e7eb); border-radius: 6px; }
.heute-zeile { display: grid; grid-template-columns: 120px minmax(0, 2fr) minmax(0, 3fr) 110px 190px; gap: 12px; align-items: center; padding: 9px 14px; border-bottom: 1px solid #f1f3f5; }
.heute-zeile:last-child { border-bottom: 0; }
.heute-zeile:hover { background: #f8fafc; }
.heute-art { font-size: 12px; color: var(--tec-text-2, #4b5563); white-space: nowrap; }
.heute-wer { min-width: 0; display: flex; flex-direction: column; }
.heute-wer strong { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heute-wer small { font-size: 12px; color: var(--tec-text-2, #4b5563); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heute-info { font-size: 13px; color: #374151; min-width: 0; }
.heute-betrag { font-size: 13px; font-weight: 600; text-align: right; white-space: nowrap; }
.heute-zeile > .btn { justify-self: end; white-space: nowrap; }
.heute-leer { padding: 18px; font-size: 13px; color: var(--tec-text-2, #4b5563); background: #fff; border: 1px solid var(--tec-linie, #e5e7eb); border-radius: 6px; }
@media (max-width: 900px) {
    .heute-zeile { grid-template-columns: minmax(0, 1fr) auto; }
    .heute-art, .heute-betrag { display: none; }
    .heute-info { grid-column: 1 / -1; order: 3; }
}
/* Hauptauftrag ↔ Subaufträge im Auftragskopf (26.10.2026) */
.auftrag-familie { display: inline-flex; gap: 4px; flex-wrap: wrap; }
div:has(> #orderDetailFamilie) { flex-wrap: wrap; row-gap: 4px; }   /* schmales Fenster: Abzeichen auf die nächste Zeile statt über den Rand */
.auftrag-familie-knopf { font-size: 11px; font-weight: 600; background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0;
    padding: 2px 9px; border-radius: 11px; white-space: nowrap; cursor: pointer; line-height: 1.4; }
.auftrag-familie-knopf:hover { background: #d1fae5; }

/* Positionen verschieben (Auftrag ↔ Subauftrag, 26.10.2026) */
#moveLinesModal .mv-liste { max-height: 46vh; overflow-y: auto; border: 1px solid var(--tec-linie, #e5e7eb); border-radius: 6px; }
#moveLinesModal .mv-gruppe + .mv-gruppe { border-top: 1px solid var(--tec-linie, #e5e7eb); }
#moveLinesModal .mv-titel { display: flex; align-items: center; gap: 8px; padding: 7px 10px; font-size: 13px; font-weight: 600; background: var(--tec-kopf, #f8fafc); }
#moveLinesModal .mv-zeile { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 28px; font-size: 13px; cursor: pointer; }
#moveLinesModal .mv-zeile:hover { background: #f8fafc; }
#moveLinesModal .mv-text { flex: 1; min-width: 0; }
#moveLinesModal .mv-betrag { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--tec-text-2, #4b5563); }
#moveLinesModal .mv-vorschau { margin-top: 10px; font-size: 13px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 6px; padding: 8px 12px; color: #1e3a8a; }
#moveLinesModal .mv-sperre { color: #b91c1c; font-weight: 600; margin-bottom: 4px; }
#moveLinesModal .mv-hinweis { color: #1e3a8a; margin-bottom: 4px; }

/* Kurzmenü: nur die Einträge der Rolle (data-kurz), Gruppentitel weg, leere Gruppen weg; «Mehr …» klappt alles auf */
body.tec-kurzmenue #topNav .toggle-btn:not([data-kurz]) { display: none !important; }
body.tec-kurzmenue #topNav .ui-nav-group > h2 { display: none !important; }
body.tec-kurzmenue #topNav .ui-nav-group:not(:has(.toggle-btn[data-kurz])) { display: none !important; }
#topNav .heute-mehr { color: var(--tec-text-2, #4b5563) !important; font-size: 12.5px !important; }

/* ── 25. «Finanzen» – eingebettetes ERP (erp-embed.js): Rahmen randlos, volle Breite, Höhe bis zum Bildschirmrand ── */
#viewErp .erp-frame { display: block; width: calc(100% - 2 * var(--rand-x, 16px)); margin: 0 var(--rand-x, 16px); border: 0; background: #f4f6f9; }
#viewErp .erp-hinweis { margin: 6px var(--rand-x, 16px); padding: 10px 12px; font-size: 13px; background: #fff; border: 1px solid var(--tec-linie, #e5e7eb); border-radius: 6px; }
#viewErp .ar-reiter.aktiv { background: var(--seite-marke) !important; border-color: var(--seite-marke) !important; color: #fff !important; font-weight: 600; }
#viewErp .erp-neu-tab { margin-left: auto; }

/* ── 18. Ruhiges, sachliches Erscheinungsbild: eine Schrift, wenige Grössen, keine Versal-Sperrschrift,
         neutrale Zahlen, dünne Linien, kleine Rundungen ── */
:root { --tec-text: #1f2937; --tec-text-2: #4b5563; --tec-linie: #e5e7eb; --tec-kopf: #f8fafc; }
body { font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif; color: var(--tec-text); }
:is(.kpi-label, .tec-kpis span, .field > span, .form-group > label, .form-label, .enquiry-field-label, .order-info-row .label,
    .order-info-card h4, .tec-filter > label, #faktStatusTiles div, .settings-tab span) {
    text-transform: none !important; letter-spacing: normal !important; }
.order-info-card h4, .enquiry-card h3, .form-section h3 { font-size: 13px !important; font-weight: 600 !important; color: var(--tec-text) !important;
    border-bottom: 1px solid var(--tec-linie) !important; }
.kpi-value, .tec-kpis > * > strong, .tec-kpis > * > b { color: var(--tec-text) !important; }
.kpi-highlight .kpi-value { color: var(--seite-marke) !important; }
.kpi-tile, .tec-kpis > *, .enquiry-card, .order-info-card, #faktStatusTiles > button { border-radius: 6px !important; box-shadow: none !important; }
.btn { border-radius: 6px; }
input, select, textarea { border-radius: 5px; }
.tt-viewport { border-color: var(--tec-linie) !important; border-radius: 4px !important; }
.tt-viewport th { font-size: 12px !important; font-weight: 600 !important; color: var(--tec-text-2) !important; text-transform: none !important;
    letter-spacing: normal !important; background: var(--tec-kopf) !important; }
.tt-viewport .tt-sticky-heading { box-shadow: 0 1px var(--tec-linie) !important; }
.tt-viewport td { font-size: 13px; border-bottom: 1px solid #f1f3f5; }
.tt-viewport th, .tt-viewport td { padding-top: 5px !important; padding-bottom: 5px !important; }

/* ══ 21. Design-Schicht «sachlich & kompakt» (21.10.2026) – gilt für ALLE Seiten und Ansichten.
         Eine Knopfgrösse, neutrale Nebenknöpfe (nur EIN farbiger Hauptknopf), keine Farbbalken und Verläufe,
         keine Versal-Sperrschrift, kleinere Überschriften. Nur am Bildschirm mit Maus; Touch behält grosse Flächen. ══ */
@media (hover: hover) and (min-width: 761px) {
    /* Knöpfe: 30 px (klein 26 px), Schrift 13 px, mittleres Gewicht */
    .btn { min-height: 30px; padding: 5px 12px; font-size: 13px; font-weight: 500; line-height: 18px; border-radius: 6px; box-shadow: none !important; transform: none !important; }
    .btn.btn-sm, .btn-sm { min-height: 26px; padding: 3px 10px; font-size: 12.5px; line-height: 18px; }
    .btn-lg { min-height: 34px; padding: 7px 16px; font-size: 14px; }
    /* Nebenknöpfe einheitlich neutral (vorher gelb, violett, orange …) */
    .btn:is(.btn-outline, .btn-secondary, .secondary, .btn-accent, .btn-email, .btn-light, .btn-ghost):not(.btn-primary):not(.btn-danger) {
        background: #fff !important; color: #1f2937 !important; border: 1px solid #d1d5db !important; }
    .btn:is(.btn-outline, .btn-secondary, .secondary, .btn-accent, .btn-email, .btn-light):not(.btn-primary):hover { background: #f3f4f6 !important; }
    .btn-primary { background: var(--seite-marke) !important; border: 1px solid var(--seite-marke) !important; color: #fff !important; font-weight: 600; }
    .btn-danger { background: #fff !important; color: #b91c1c !important; border: 1px solid #fca5a5 !important; }

    /* Überschriften kleiner und ruhig */
    section.view h1 { font-size: 18px !important; font-weight: 600 !important; }
    section.view h2 { font-size: 16px !important; font-weight: 600 !important; }
    section.view h3 { font-size: 14px !important; font-weight: 600 !important; }
    section.view h4 { font-size: 13px !important; font-weight: 600 !important; }
    /* Kleine Versal-Beschriftungen («KUNDE», «LETZTER KONTAKT» …) in normaler Schreibweise */
    section.view :is([class*="label"], [class*="eyebrow"], [class*="kicker"], [class*="-titel"], [class*="caption"], small) {
        text-transform: none !important; letter-spacing: normal !important; }

    /* Karten: weiss, dünner Rand, keine farbigen Ränder oben/links, kein Schatten */
    section.view :is([class$="-card"], [class*="-card "], .card, .enquiry-card, .order-info-card, .ko-card, .md-karte, .md-kachel, .campaign-card) {
        border: 1px solid var(--tec-linie) !important; border-radius: 6px !important; box-shadow: none !important; }

    /* Belegkopf (Anfrage/Angebot): Status-Balken neutral statt orangem Verlauf, Prozessleiste und Aktionen niedriger */
    .enquiry-status-bar, .quotation-status-bar, .beleg-status-bar { background: #f8fafc !important; color: var(--tec-text) !important;
        border: 1px solid var(--tec-linie) !important; border-radius: 6px !important; padding: 5px 12px !important; min-height: 0 !important; box-shadow: none !important; }
    .enquiry-status-bar .enquiry-status-label { background: #e5e7eb !important; color: #374151 !important; font-size: 12px !important; padding: 2px 8px !important; border-radius: 4px !important; }
    .enquiry-status-bar .enquiry-amount { font-size: 15px !important; color: var(--tec-text) !important; }
    .beleg-sticky-head { padding: 6px 12px !important; box-shadow: 0 1px 0 var(--tec-linie) !important; }
    .beleg-prozess-wrap { margin: 0 0 4px !important; }
    .enquiry-actions { padding: 6px 0 !important; gap: 6px !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }

    /* Kunden/Objekt: Suchspalte kompakt – Umschalter als schmale Segmente, Aktionen als Zeile */
    .ko-list-search { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px !important; }
    .ko-list-search > .global-search-box { flex: 1 1 100% !important; max-width: none; }
    .ko-list-search > .ko-result-count { flex: 1 1 100%; font-size: 11.5px; color: var(--tec-text-2); }
    #koScopeToggle { display: flex; flex: 1 1 100%; gap: 0 !important; }
    #koScopeToggle > .btn { flex: 1 1 0; border-radius: 0 !important; min-height: 26px; padding: 3px 8px; }
    #koScopeToggle > .btn:first-child { border-radius: 6px 0 0 6px !important; }
    #koScopeToggle > .btn:last-child { border-radius: 0 6px 6px 0 !important; }
    #koScopeToggle > .btn + .btn { margin-left: -1px; }
    .ko-list-search > .btn { flex: 1 1 auto; width: auto !important; }
    .ko-detail-panel h1, .ko-detail-panel h2 { font-size: 18px !important; }
    .ko-detail-panel [class*="action"] .btn, .ko-detail-panel .btn-block { width: auto !important; display: inline-flex !important; }

    /* Auftrag geöffnet: Filterzeile und Listen-Kennzahlen der Auftragsliste ausblenden (Platz für den Beleg) */
    #viewAuftraege:has(#orderDetailContainer:not([style*="none"])) .auftraege-container > .dashboard-header,
    #viewAuftraege:has(#orderDetailContainer:not([style*="none"])) #orderSearchHint { display: none !important; }

    /* Pipeline-Board: Spaltenköpfe hell mit schmaler Farblinie statt vollflächiger Verläufe; «Mein Tag» hell statt dunkelblau */
    .pipeline-column-header { background: #fff !important; background-image: none !important; color: var(--tec-text) !important;
        border: 1px solid var(--tec-linie) !important; border-top: 3px solid var(--stufe, #94a3b8) !important; border-radius: 6px 6px 0 0 !important;
        padding: 6px 10px !important; font-size: 13px !important; font-weight: 600 !important; box-shadow: none !important; text-shadow: none !important; }
    .pipeline-column-header * { color: inherit !important; text-shadow: none !important; }
    .pipeline-column-header .column-count { background: #f1f5f9 !important; color: #374151 !important; }
    .stage-neue-anfragen { --stufe: #f59e0b; } .stage-bearbeitete-anfragen { --stufe: #3b82f6; } .stage-neue-angebote { --stufe: #8b5cf6; }
    .stage-verschickte-angebote { --stufe: #06b6d4; } .stage-nachfassen { --stufe: #ef4444; } .stage-auftrag-neu { --stufe: #66bb6a; }
    .stage-planung-freigegeben { --stufe: #42a5f5; } .stage-gewonnen { --stufe: #22c55e; }
    .mein-tag { background: #fff !important; background-image: none !important; color: var(--tec-text) !important; border: 1px solid var(--tec-linie) !important;
        border-radius: 6px !important; box-shadow: none !important; }
    .mein-tag * { color: inherit; }
    .mein-tag .mein-tag-title { color: var(--seite-marke) !important; }
    #meinTag .mein-tag-kpi-strip .kpi-card, #meinTag .kpi-card { background: #f8fafc !important; background-image: none !important; border: 1px solid var(--tec-linie) !important; color: var(--tec-text) !important; }
    #meinTag .kpi-card .kpi-value { color: var(--tec-text) !important; }
    .mein-tag .kpi-card .kpi-label { color: var(--tec-text-2) !important; }
    .mein-tag .mt-card { background: #f8fafc !important; border: 1px solid var(--tec-linie) !important; }
    .mein-tag .mt-card:hover { background: #eef2f7 !important; }
    .mein-tag .mt-card .mt-value { color: var(--tec-text) !important; }
    .mein-tag .mt-card .mt-label { color: var(--tec-text-2) !important; }
    .mein-tag .mt-card.mt-alert { background: #fee2e2 !important; border-color: #fca5a5 !important; }
    .mein-tag .mt-card.mt-alert .mt-value, .mein-tag .mt-card.mt-alert .mt-label { color: #b91c1c !important; }
    .mein-tag .mt-card.mt-warn { background: #fef3c7 !important; border-color: #fcd34d !important; }
    .mein-tag .mt-card.mt-warn .mt-value, .mein-tag .mt-card.mt-warn .mt-label { color: #92400e !important; }
    .mein-tag .mt-card.mt-active { background: #e0e7ff !important; border-color: var(--seite-marke) !important; box-shadow: 0 0 0 1px var(--seite-marke) !important; }
    .mein-tag .mt-card.mt-active .mt-value { color: var(--seite-marke) !important; }
    .mein-tag .funnel-strip { background: #f8fafc !important; border: 1px solid var(--tec-linie) !important; }
    .mein-tag .funnel-step-value { color: var(--tec-text) !important; }
    .mein-tag .funnel-step-label, .mein-tag .funnel-arrow { color: var(--tec-text-2) !important; }
    .mein-tag .funnel-rate { color: #15803d !important; }

    /* Navigation links: ruhiger, etwas niedriger */
    .ui-nav-item.toggle-btn, .ui-nav-item > .toggle-btn { padding-top: 6px !important; padding-bottom: 6px !important; font-size: 13px !important; }
}

@media (max-width: 760px) {
    :root { --seite-pad-x: 12px; }
    .tec-filter > label { flex: 1 1 100%; justify-content: space-between; }
    .tec-filter > label > input, .tec-filter > label > select, .tec-filter > label > .kw-wrap { flex: 1 1 auto; }
}

/* ── 26) Rechnungskontrolle: Prüf-Panel und lernender Vorschlag (22.10.2026) ─────────────────── */
.rk-pruef { border: 1px solid var(--tec-linie, #e5e7eb); border-radius: 6px; padding: 8px 10px; background: #fff; font-size: 12.5px; }
.rk-pruef-titel { font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--tec-text-2, #64748b); margin-bottom: 4px; }
.rk-pruef-zeile { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.rk-pruef-zeile > span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.rk-pruef-zeile small { font-weight: 500; color: var(--tec-text-2, #64748b); }
.rk-pruef .ok { color: #15803d; } .rk-pruef .warn { color: #b45309; }
.rk-pruef-trenn { margin: 6px 0 2px; padding-top: 6px; border-top: 1px solid var(--tec-linie, #e5e7eb); font-weight: 600; color: var(--tec-text, #1f2937); }
.rk-pruef-liste { margin: 0 0 2px 14px; padding: 0; color: var(--tec-text-2, #64748b); }
.rk-pruef-hinweise { margin: 6px 0 0; padding: 6px 8px 6px 22px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 4px; color: #92400e; }
.rk-pruef-ok { margin-top: 6px; color: #15803d; }
.rk-pruef-laden { color: var(--tec-text-2, #64748b); }
.rk-vorschlag { border: 1px solid #bfdbfe; background: #eff6ff; border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; font-size: 12.5px; display: flex; flex-direction: column; gap: 4px; }
.rk-vorschlag-grund { color: #1e40af; }
.rk-vorschlag .btn { align-self: flex-start; }
.rk-order-tag.learned { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.rk-pruef-hinweise.rk-pruef-rot { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* ── 27) Werkstattbedarf bestellen (22.10.2026) ─────────────────────────────────────────────── */
.wb-ov { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 10060; display: flex; align-items: center; justify-content: center; padding: 16px; }
.wb-box { background: #fff; border-radius: 8px; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; padding: 16px 18px; box-shadow: 0 20px 50px rgba(0,0,0,.25); font-size: 13px; }
.wb-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.wb-kopf h3 { margin: 0; font-size: 16px; color: var(--seite-marke, #07376c); }
.wb-x { border: 0; background: none; font-size: 20px; cursor: pointer; color: #64748b; }
.wb-info { color: var(--tec-text-2, #64748b); margin: 4px 0 10px; }
.wb-l { display: block; font-weight: 600; font-size: 12px; color: #334155; margin: 8px 0 0; flex: 1; }
.wb-l input { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; height: 30px; padding: 4px 8px; border: 1px solid var(--tec-linie, #cbd5e1); border-radius: 4px; font: inherit; font-weight: 400; }
.wb-opt { font-weight: 400; color: #94a3b8; }
.wb-reihe { display: flex; gap: 10px; flex-wrap: wrap; }
.wb-liste { border: 1px solid var(--tec-linie, #e5e7eb); border-radius: 4px; margin-top: 2px; max-height: 200px; overflow: auto; }
.wb-liste button { display: block; width: 100%; text-align: left; border: 0; background: #fff; padding: 6px 8px; cursor: pointer; font: inherit; }
.wb-liste button:hover { background: #eff6ff; }
.wb-liste span, .wb-leer { color: #94a3b8; }
.wb-leer { padding: 6px 8px; }
.wb-hinweis { margin-top: 8px; padding: 6px 8px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 4px; color: #92400e; }
.wb-fehler { color: #b91c1c; min-height: 16px; margin-top: 6px; }
.wb-fuss { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* ── 28) Browser-Meldungen bei Neuem (22.10.2026) ───────────────────────────────────────────── */
.meldungen-frage { position: fixed; right: 16px; bottom: 90px; z-index: 10050; max-width: 360px; background: #fff; border: 1px solid var(--tec-linie, #cbd5e1);
    border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 12px 14px; font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.meldungen-frage span { color: var(--tec-text-2, #64748b); }
.meldungen-knoepfe { display: flex; gap: 6px; justify-content: flex-end; }
.meldungen-schalter { display: flex; align-items: center; gap: 6px; padding: 8px 12px; font-size: 12px; color: var(--tec-text, #1f2937); border-bottom: 1px solid var(--tec-linie, #e5e7eb); cursor: pointer; }
.meldungen-schalter small { color: #b45309; }

/* ── 29) Handy: Formulare einspaltig (Label über dem Feld), nichts ragt seitlich hinaus (22.10.2026) ── */
@media (max-width: 760px) {
    .enquiry-field:not(.enquiry-field-full) { flex-direction: column; align-items: stretch !important; gap: 3px !important; }
    .enquiry-field-label { flex: none !important; font-size: 12px; }
    .enquiry-field-label:empty { display: none; }
    .enquiry-field > *, .enquiry-card, .enquiry-grid > * { min-width: 0; max-width: 100%; }
    .enquiry-input, .order-edit-input { font-size: 16px !important; min-height: 40px; box-sizing: border-box; }   /* 16px: iPhone zoomt beim Tippen nicht */
    #enquiryDetailContent { overflow-x: hidden; overflow-wrap: anywhere; }
}

/* ── 30) Geführte Massaufnahme vor Ort (23.10.2026) ─────────────────────────────────────────── */
.feld-assistent-start { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; margin: 0 0 12px; padding: 14px 12px;
    border: 0; border-radius: 10px; background: var(--seite-marke, #07376c); color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.feld-assistent-start span { font-size: 12px; font-weight: 400; opacity: .85; }
body.fa-aktiv { padding-bottom: 170px; }
.fa-leiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10040; background: #fff; border-top: 1px solid var(--tec-linie, #e5e7eb);
    box-shadow: 0 -6px 20px rgba(0,0,0,.12); padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); font-size: 13px; }
.fa-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fa-punkte { display: flex; gap: 6px; }
.fa-punkt { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--tec-linie, #cbd5e1); background: #fff; color: #64748b; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; padding: 0; }
.fa-punkt.fertig { background: #dcfce7; border-color: #86efac; color: #15803d; }
.fa-punkt.jetzt { background: var(--seite-marke, #07376c); border-color: var(--seite-marke, #07376c); color: #fff; }
.fa-x { border: 0; background: none; font-size: 22px; line-height: 1; color: #64748b; cursor: pointer; padding: 4px 6px; }
.fa-titel { margin: 6px 0 2px; } .fa-titel span { color: var(--tec-text-2, #64748b); }
.fa-hinweis { margin: 4px 0; padding: 4px 8px; border-radius: 4px; }
.fa-hinweis.warn { background: #fffbeb; color: #92400e; } .fa-hinweis.ok { background: #f0fdf4; color: #15803d; }
.fa-foto { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.fa-foto .btn { min-height: 40px; padding: 6px 10px; }
.fa-foto-ziel { font-size: 12px; color: var(--tec-text-2, #64748b); flex: 1 1 120px; min-width: 0; }
/* Leiste liegt über den Dialogen (Mess-Fenster): Dialog darüber enden lassen, damit Speichern erreichbar bleibt */
body.fa-aktiv .modal.active { padding-bottom: 215px; }
body.fa-aktiv .modal.active .modal-content { max-height: calc(100vh - 235px); }
body.fa-aktiv { padding-bottom: 215px; }
.fa-knoepfe { display: flex; gap: 8px; margin-top: 6px; }
.fa-knoepfe .btn { min-height: 42px; }
.fa-knoepfe .btn-primary { flex: 1; }
.fa-pruefen { position: fixed; inset: 0; z-index: 10030; background: rgba(248,250,252,.98); overflow: auto; padding: 16px 12px 190px; }
.fa-pruefen-inhalt { max-width: 640px; margin: 0 auto; background: #fff; border: 1px solid var(--tec-linie, #e5e7eb); border-radius: 8px; padding: 12px 14px; }
.fa-pruefen h3 { margin: 0 0 8px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.fa-offen { font-size: 12px; background: #fef3c7; color: #92400e; border-radius: 10px; padding: 2px 8px; }
.fa-alles { font-size: 12px; background: #dcfce7; color: #15803d; border-radius: 10px; padding: 2px 8px; }
.fa-pruefen ul { list-style: none; margin: 0 0 10px; padding: 0; }
.fa-pruefen li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.fa-pruefen li > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fa-pruefen li.warn { color: #92400e; } .fa-pruefen li.kann { color: #64748b; }
.fa-leer { color: #94a3b8; }
