/* Tabellen-Aufmaß (excel-artige Fenster-Erfassung, Tablet quer)
   Gemeinsame Regeln für Online-App (index.php) und Offline-App (offline/index.php).
   Bis 15.09.2026 standen sie am Ende von include/style.css. CSS-Variablen haben Fallbacks,
   damit die Tabelle auch in der Offline-Shell (ohne themes.css) sauber aussieht. */

/* ---- Tabellen-Aufmaß (excel-artige Fenster-Erfassung, Tablet quer) ---------- */
/* Seite darf hier nicht mit-scrollen: sonst wandert der sticky Spaltenkopf mit
   (iPad/Tastatur). .content hat sonst overflow-x:auto → computed overflow-y:auto. */
body.modul-tabellen_aufmass .content { overflow: hidden; }
.ta-page { padding: 10px 12px 8px; display: flex; flex-direction: column; box-sizing: border-box; min-height: 0; }
.ta-inline { display: inline; margin: 0; }
.ta-kopf, .ta-toolbar, .ta-legende { flex-shrink: 0; }
.ta-kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ta-kopf-titel { font-size: 17px; font-weight: 600; color: var(--text-color, #212529); }
.ta-kopf-sub { font-size: 13px; color: var(--text-secondary, #6c757d); }
.ta-kopf-status { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: var(--background-secondary, #f8f9fa); color: var(--text-secondary, #6c757d); white-space: nowrap; }
.ta-kopf-status.ta-status-ok { background: var(--primary-light, #e8f5f0); color: var(--primary-hover, #038a5a); }
.ta-kopf-status.ta-status-warn { background: #fff3d6; color: #9a6a0e; }
.ta-kopf-status.ta-status-err { background: #fde7e5; color: #b3261e; }
.ta-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0 10px; }
.ta-toolbar-label { font-size: 13px; color: var(--text-secondary, #6c757d); }
.ta-toolbar-sp { flex: 1; }
.ta-toolbar-hinweis { font-size: 12.5px; color: var(--text-secondary, #6c757d); }
.ta-select { font-size: 14px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--input-border, #ced4da); background: var(--input-background, #fff); color: var(--input-text, #495057); }
.button.ta-btn { padding: 7px 12px; font-size: 13.5px; border-radius: 8px; }
.button.ta-btn-leise { background: var(--background-color, #fff); color: var(--text-color, #212529); border-color: var(--border-color, #dee2e6); }
.button.ta-btn-leise:hover { border-color: var(--primary-color, #04AA6D); background: var(--background-color, #fff); color: var(--text-color, #212529); }
.button.ta-btn-primary { background: var(--primary-color, #04AA6D); color: #fff; }
.button.ta-btn-klein { padding: 4px 9px; font-size: 12.5px; }
.button.ta-btn:disabled { opacity: .45; cursor: default; }

.ta-gridwrap { position: relative; overflow: auto; flex: 1 1 auto; max-height: calc(100vh - var(--navbar-h, 40px) - 210px); max-height: calc(100dvh - var(--navbar-h, 40px) - 210px); min-height: 220px; border: 1px solid var(--border-color, #dee2e6); border-radius: 10px; background: var(--background-color, #fff); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scroll-padding-top: 52px; }
table.ta-grid { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 13.5px; }
.ta-grid th, .ta-grid td { border-bottom: 1px solid var(--border-light, #e9ecef); border-right: 1px solid var(--border-light, #e9ecef); padding: 0; white-space: nowrap; vertical-align: middle; height: 44px; }
.ta-grid thead th { position: -webkit-sticky; position: sticky; top: 0; z-index: 3; background: var(--table-header-bg, #f8f9fa); background-clip: padding-box; font-weight: 600; font-size: 12px; letter-spacing: .03em; color: var(--text-secondary, #6c757d); padding: 0 10px; text-align: left; box-shadow: 0 1px 0 var(--border-color, #dee2e6); }
.ta-grid thead th .ta-unit { font-weight: 400; margin-left: 4px; }
.ta-grid th.ta-pos, .ta-grid td.ta-pos { position: -webkit-sticky; position: sticky; left: 0; z-index: 2; background: var(--background-color, #fff); width: 52px; min-width: 52px; text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text-secondary, #6c757d); border-right: 2px solid var(--border-color, #dee2e6); }
/* Drag-Griff zum Umsortieren (Wohnungswirtschaft Stufe 2): Griff-Optik aus style.css (.messung-drag-handle), hier nur Platz + Groesse */
.ta-grid td.ta-pos .ta-drag { width: 26px; height: 26px; min-width: 26px; min-height: 26px; padding: 0; margin: 0 2px; vertical-align: middle; display: inline-flex; align-items: center; justify-content: center; }
.ta-grid td.ta-pos .ta-drag .messung-drag-handle-icon { width: 16px; height: 16px; }
.ta-grid tr.messung-drag-insert-marker td { height: 0; padding: 0; border: 0; position: relative; }
.ta-grid tr.messung-row-dragging td { opacity: .45; }
.ta-grid thead th.ta-pos { z-index: 4; background: var(--table-header-bg, #f8f9fa); }
.ta-pos-neu { font-style: italic; font-size: 12px; }
.ta-grid td.ta-num { min-width: 84px; }
.ta-grid td.ta-num.ta-fuge { min-width: 66px; }
.ta-grid td.ta-num input, .ta-grid td.ta-txt input { width: 100%; height: 44px; border: 0; margin: 0; background: transparent; font: inherit; font-size: 14px; padding: 0 10px; color: var(--text-color, #212529); box-sizing: border-box; border-radius: 0; }
.ta-grid td.ta-num input { text-align: right; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.ta-grid td.ta-num.ta-mit-diff { display: flex; align-items: center; }
.ta-grid td.ta-num.ta-mit-diff input { flex: 1 1 auto; width: auto; min-width: 48px; }
.ta-versatz-diff { flex: 0 0 auto; margin-right: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ta-versatz-diff.ta-diff-plus { color: darkgreen; }
.ta-versatz-diff.ta-diff-minus { color: darkred; }
.ta-grid td.ta-txt { min-width: 140px; }
.ta-grid td input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--primary-color, #04AA6D); background: var(--primary-light, #e8f5f0); }
.ta-grid td.ta-sel, .ta-grid td.ta-typ, .ta-grid td.ta-notiz { padding: 0 10px; cursor: pointer; min-width: 120px; }
.ta-grid td.ta-sel { min-width: 130px; }
.ta-grid td[role="button"]:focus { outline: none; box-shadow: inset 0 0 0 2px var(--primary-color, #04AA6D); }
.ta-grid td.ta-sel .ta-sel-val { display: inline-flex; align-items: center; gap: 6px; }
.ta-grid td.ta-sel .ta-sel-val:after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--text-muted, #adb5bd); border-bottom: 1.5px solid var(--text-muted, #adb5bd); transform: rotate(45deg); margin: -3px 0 0 4px; }
.ta-grid td.ta-empty, .ta-grid td.ta-empty span { color: var(--text-muted, #adb5bd); }
.ta-grid td.ta-typ { padding: 4px 10px; min-width: 0; }
.ta-grid td.ta-typ img { width: 34px; height: 34px; object-fit: contain; vertical-align: middle; background: #fff; border-radius: 4px; }
.ta-grid td.ta-notiz { max-width: 260px; overflow: hidden; text-overflow: ellipsis; min-width: 160px; }
/* ProLogic System-/Schalen-Variante: nur Anzeige (kommt aus dem Fenstertyp), daher gedämpft und ohne Klick-Ziel */
.ta-grid td.ta-anzeige { padding: 0 10px; min-width: 110px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; color: var(--text-secondary, #6c757d); cursor: default; }
.ta-notiz-icon { display: inline-block; width: 12px; height: 12px; border: 1.5px solid var(--text-muted, #adb5bd); border-radius: 6px 6px 3px 3px; vertical-align: -1px; margin-right: 6px; }
.ta-grid td.ta-stat { padding: 0 10px; min-width: 118px; }
.ta-grid td.ta-act { padding: 0 8px; min-width: 110px; }
.ta-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 99px; }
.ta-pill:before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ta-pill-ok { background: var(--primary-light, #e8f5f0); color: var(--primary-hover, #038a5a); }
.ta-pill-warn { background: #fff3d6; color: #9a6a0e; }
.ta-pill-err { background: #fde7e5; color: #b3261e; }
.ta-pill-new { background: transparent; color: var(--text-secondary, #6c757d); border: 1px dashed var(--border-color, #dee2e6); }
.ta-grid td.ta-cell-warn input { box-shadow: inset 0 0 0 2px #c98a00; background: #fff3d6; }
/* Rettungsweg-Hinweis (Wohnungswirtschaft Stufe 2): auch Fenstertyp-/Auswahlzellen markieren */
.ta-grid td.ta-cell-warn.ta-typ, .ta-grid td.ta-cell-warn.ta-sel { box-shadow: inset 0 0 0 2px #c98a00; background: #fff3d6; }
/* Sortier-Dialog (include/ww_sortieren_modal.inc.php, Positionsliste + Tabellen-Aufmass) */
.ww-sort-box { max-width: 900px; }
.ww-sort-body .ww-sort-warnung { background: #fff3d6; color: #9a6a0e; border-left: 4px solid #c98a00; padding: 8px 10px; border-radius: 6px; margin: 0 0 10px; }
.ww-sort-body .ww-sort-fuss { color: var(--text-secondary, #6c757d); font-size: 12.5px; margin: 10px 0 0; }
.ww-sort-tabelle-wrap { max-height: 50vh; overflow: auto; border: 1px solid var(--border-color, #dee2e6); border-radius: 8px; }
.ww-sort-tabelle { border-collapse: collapse; width: 100%; font-size: 13px; }
.ww-sort-tabelle th, .ww-sort-tabelle td { padding: 4px 8px; border-bottom: 1px solid var(--border-light, #e9ecef); text-align: left; white-space: nowrap; }
.ww-sort-tabelle thead th { position: sticky; top: 0; background: var(--table-header-bg, #f8f9fa); z-index: 1; }
.ww-sort-tabelle td.ww-sort-num { text-align: right; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ww-sort-tabelle tr.ww-sort-geaendert td.ww-sort-num strong { color: var(--primary-hover, #038a5a); }
.ww-sort-tabelle tr.ww-sort-gruppe-start td { border-top: 2px solid var(--border-color, #dee2e6); }
.ww-sort-aktionen { margin-top: 10px; }
.ta-grid tr.ta-dirty td.ta-pos { box-shadow: inset 3px 0 0 #c98a00; }
.ta-grid tr.ta-err td.ta-pos { box-shadow: inset 3px 0 0 #b3261e; }
.ta-grid tr.ta-new td.ta-pos { font-style: italic; }
.ta-grid tr.ta-aktiv td.ta-pos { background: var(--primary-light, #e8f5f0); color: var(--primary-hover, #038a5a); font-weight: 600; }

/* Wechselnde Zeilenfarbe analog Messungsübersicht (#ffffff / #f4f7fc).
   Hintergrund an td (nicht nur tr), damit die sticky Positionsspalte deckt. */
.ta-grid tbody tr:nth-child(odd) td { background-color: var(--background-color, #ffffff); }
.ta-grid tbody tr:nth-child(even) td { background-color: #f4f7fc; }
.ta-grid tbody tr.ta-aktiv td.ta-pos { background-color: var(--primary-light, #e8f5f0); }
body.theme-dark .ta-grid tbody tr:nth-child(odd) td { background-color: var(--background-color, #1a1a1a); }
body.theme-dark .ta-grid tbody tr:nth-child(even) td { background-color: #252525; }
@media (hover: hover) {
	.ta-grid tbody tr:hover td { background-color: var(--table-row-hover, #eef6ff); }
	.ta-grid tbody tr:hover.ta-aktiv td.ta-pos { background-color: var(--primary-light, #e8f5f0); }
	body.theme-dark .ta-grid tbody tr:hover td { background-color: var(--table-row-hover, #3a3a3a); }
}
.ta-remove { border: 0; background: transparent; color: var(--text-muted, #adb5bd); font-size: 18px; line-height: 1; cursor: pointer; padding: 4px 6px; }
.ta-remove:hover { color: #b3261e; }
.ta-legende { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12.5px; color: var(--text-secondary, #6c757d); margin-top: 8px; }
.ta-legende span { display: inline-flex; align-items: center; gap: 6px; }
.ta-leg { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.ta-leg-ok { background: var(--primary-color, #04AA6D); }
.ta-leg-dirty { background: #c98a00; }
.ta-leg-new { border: 1px dashed var(--border-color, #dee2e6); }
.ta-leg-warn { background: #fff3d6; border: 1px solid #c98a00; }

/* Stufe 3: Foto je Zeile + Laser-Chip */
.ta-grid td.ta-act { min-width: 190px; }
.ta-grid td.ta-act .button + .button { margin-left: 6px; }
.ta-foto-ico { display: inline-block; width: 13px; height: 10px; border: 1.5px solid currentColor; border-radius: 2px; position: relative; margin-right: 5px; vertical-align: -1px; }
.ta-foto-ico:after { content: ""; position: absolute; left: 3.5px; top: 1.5px; width: 4px; height: 4px; border: 1.5px solid currentColor; border-radius: 50%; }
.ta-foto-anz { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: var(--primary-color, #04AA6D); color: #fff; font-size: 11px; font-weight: 600; }
.ta-laser { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-secondary, #6c757d); padding: 4px 10px; border-radius: 99px; border: 1px dashed var(--border-color, #dee2e6); }
.ta-laser-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted, #adb5bd); }
.ta-laser.ta-laser-on { border-style: solid; color: var(--primary-hover, #038a5a); }
.ta-laser.ta-laser-on .ta-laser-dot { background: var(--primary-color, #04AA6D); }
.ta-grid td input.ble-value { background: var(--primary-light, #e8f5f0); }
#ta-fotos-inhalt img { max-width: 100%; height: auto; }

/* Stufe 4a: Spalte "Weitere Angaben" (Tags) + Bearbeiten-Maske im Modal */
.ta-grid th.ta-zusatz-h, .ta-grid td.ta-zusatz { min-width: 220px; max-width: 420px; white-space: normal; }
.ta-grid td.ta-zusatz { padding: 4px 8px; }
.ta-tag { display: inline-flex; align-items: center; font: inherit; font-size: 12px; font-weight: 500; padding: 3px 8px; margin: 2px 4px 2px 0; border-radius: 99px; border: 1px solid var(--border-color, #dee2e6); background: var(--background-secondary, #f8f9fa); color: var(--text-color, #212529); cursor: pointer; white-space: nowrap; max-width: 420px; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.ta-grid th.ta-zusatz-h, .ta-grid td.ta-zusatz { max-width: 560px; }
.ta-tag:hover { border-color: var(--primary-color, #04AA6D); }
.ta-tag-plus { min-width: 26px; justify-content: center; border-style: dashed; color: var(--text-secondary, #6c757d); font-weight: 600; }
.ta-tag:disabled { opacity: .4; cursor: default; }
.ta-modal-box-maske { width: min(1400px, 100%); height: calc(100vh - 24px); height: calc(100dvh - 24px); }
.ta-maske-frame { flex: 1; width: 100%; border: 0; background: #fff; min-height: 300px; }
.ta-maske-hinweis { font-size: 13px; color: var(--primary-hover, #038a5a); }
/* Block-Modus der Bearbeiten-Maske im iframe */
body.ta-block-modus .navbar { display: none !important; }
body.ta-block-modus .content { margin-top: 0 !important; }
body.ta-block-modus .ta-block-highlight { outline: 3px solid var(--primary-color, #04AA6D); outline-offset: 4px; border-radius: 8px; scroll-margin-top: 12px; }

/* Stufe 4b: Fugen-Popup */
.ta-modal-box-fugen { width: min(760px, 100%); }
.ta-fu-zeile { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ta-fu-label { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-secondary, #6c757d); min-width: 90px; }
.ta-fu-tiles { display: flex; gap: 6px; flex-wrap: wrap; }
.ta-fu-grid { display: grid; grid-template-columns: 1fr minmax(200px, 260px) 1fr; grid-template-rows: auto auto auto; align-items: center; justify-items: center; gap: 8px; margin: 12px 0; }
.ta-fu-bild { width: 100%; aspect-ratio: 1 / 1; max-height: 260px; display: flex; align-items: center; justify-content: center; border: 3px solid var(--primary-color, #04AA6D); border-radius: 14px; padding: 8px; background: #fff; box-sizing: border-box; }
.ta-fu-bild img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ta-fu-nobild { color: var(--text-muted, #adb5bd); }
.ta-fu-c { display: flex; justify-content: center; }
.ta-fu-feld { display: inline-flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-secondary, #6c757d); }
.ta-fu-feld input, .ta-fu-feld select { font: inherit; font-size: 16px; width: 110px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--input-border, #ced4da); text-align: right; font-variant-numeric: tabular-nums; }
.ta-fu-feld select { width: 150px; text-align: left; }
.ta-fu-feld input:focus { outline: none; border-color: var(--primary-color, #04AA6D); box-shadow: 0 0 0 3px var(--primary-light, #e8f5f0); }
.ta-fu-unit { display: none; }
.ta-fu-tuer { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 4px 0 12px; }
.ta-fu-pb { border-top: 1px solid var(--border-light, #e9ecef); padding-top: 10px; }
.ta-fu-pb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 8px; }
@media (max-width: 600px) { .ta-fu-grid { grid-template-columns: 1fr minmax(140px, 180px) 1fr; } .ta-fu-feld input { width: 84px; } }

/* Fotos/Dateien */
.ta-pop-tiles-1 { grid-template-columns: 1fr; min-width: 200px; }
.ta-dateien { margin-top: 14px; }
.ta-dateien-kopf { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-secondary, #6c757d); margin-bottom: 6px; }
.ta-dateien-liste { list-style: none; margin: 0; padding: 0; }
.ta-dateien-liste li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px dashed var(--border-light, #e9ecef); }
.ta-datei-name { font-weight: 500; }
.ta-datei-meta { flex: 1; font-size: 12px; color: var(--text-secondary, #6c757d); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Stufe 4f: Höhenbezug / Messreihen-Popup */
.ta-ex-hinweis { font-size: 13px; color: var(--text-secondary, #6c757d); margin: 0 0 10px; }
.ta-ex-grid { display: grid; grid-template-columns: minmax(140px, 200px) 130px 130px; gap: 8px 14px; align-items: end; }
.ta-ex-zeile-label { font-size: 14px; padding-bottom: 10px; }
.ta-ex-grid .ta-fu-feld > span { display: none; }
.ta-ex-grid .ta-fu-label { align-self: end; padding-bottom: 10px; min-width: 0; }

/* Stufe 4d: Freie Felder-Popup */
.ta-modal-box-felder { width: min(720px, 100%); }
.ta-fe-slot { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-secondary, #6c757d); margin: 14px 0 6px; padding-top: 8px; border-top: 1px solid var(--border-light, #e9ecef); }
.ta-fe-feld { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 8px 14px; align-items: center; padding: 6px 0; }
.ta-fe-label { font-size: 14px; color: var(--text-color, #212529); }
.ta-fe-vorgabe { display: inline-block; font-size: 10.5px; padding: 1px 6px; border-radius: 4px; background: var(--primary-light, #e8f5f0); color: var(--primary-hover, #038a5a); font-weight: 600; margin-left: 6px; }
.ta-fe-feld input, .ta-fe-feld select { font: inherit; font-size: 15px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--input-border, #ced4da); width: 100%; box-sizing: border-box; }
.ta-fe-feld input:focus, .ta-fe-feld select:focus { outline: none; border-color: var(--primary-color, #04AA6D); box-shadow: 0 0 0 3px var(--primary-light, #e8f5f0); }
.ta-fe-anderes { grid-column: 2; margin-top: -2px; }
.ta-fe-multi { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ta-fe-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.ta-fe-chk input { width: 16px; height: 16px; accent-color: var(--primary-color, #04AA6D); }
.ta-tag-leer { border-style: dashed; color: var(--text-secondary, #6c757d); background: transparent; }
.ta-set-gruppe-themen { grid-column: 1 / -1; border-top: 1px solid var(--border-light, #e9ecef); padding-top: 10px; }
.settings-card-content .ta-set-gruppe-themen label.ta-set-chk { display: inline-flex; margin-right: 18px; }
@media (max-width: 600px) { .ta-fe-feld { grid-template-columns: 1fr; } .ta-fe-anderes { grid-column: 1; } }

/* Stufe 4c: Rahmenverbreiterungen-Popup */
.ta-modal-box-rv { width: min(900px, 100%); }
.ta-rv-seite { border: 1px solid var(--border-light, #e9ecef); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.ta-rv-seite-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.ta-rv-zeile { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding: 6px 0; border-top: 1px dashed var(--border-light, #e9ecef); }
.ta-rv-zeile:first-child { border-top: 0; }
.ta-rv-zeile .ta-fu-feld input { text-align: left; width: 100px; }
.ta-rv-zeile .ta-fu-feld select { width: 180px; }
.ta-rv-remove { margin-bottom: 4px; }

/* Popover für Auswahlzellen */
.ta-popover { position: fixed; z-index: 1650; display: none; min-width: 220px; max-width: 460px; background: var(--background-color, #fff); border: 1px solid var(--border-color, #dee2e6); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.16); padding: 6px; }
.ta-popover.ta-open { display: block; }
.ta-pop-tiles { display: grid; grid-template-columns: repeat(2, minmax(100px, 1fr)); gap: 6px; margin-bottom: 6px; max-height: min(60vh, 420px); overflow: auto; }
.ta-pop-gruppe { grid-column: 1 / -1; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary, #6c757d); padding: 4px 4px 0; }
.ta-tile { font: inherit; font-size: 13.5px; padding: 10px 10px; border-radius: 8px; border: 1px solid var(--border-light, #e9ecef); background: var(--background-color, #fff); color: var(--text-color, #212529); text-align: left; cursor: pointer; white-space: normal; }
.ta-tile:hover { border-color: var(--primary-color, #04AA6D); }
.ta-tile:focus { outline: 2px solid var(--primary-color, #04AA6D); outline-offset: 1px; }
.ta-tile-on { border-color: var(--primary-color, #04AA6D); background: var(--primary-light, #e8f5f0); color: var(--primary-hover, #038a5a); font-weight: 500; }
.ta-pop-anderes { grid-column: 1 / -1; font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--input-border, #ced4da); }
.ta-pop-row { display: flex; gap: 6px; border-top: 1px solid var(--border-light, #e9ecef); padding-top: 6px; }
.ta-pop-row .button { flex: 1; justify-content: center; }

/* Modals (Fenstertyp, Notiz) */
.ta-modal { position: fixed; inset: 0; z-index: 1600; background: rgba(0,0,0,.45); display: block; overflow: auto; padding: 12px; -webkit-overflow-scrolling: touch; }
.ta-modal[hidden] { display: none; }
.ta-modal-box { background: var(--background-color, #fff); border-radius: 12px; width: min(1100px, 100%); margin: 0 auto; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.3); box-sizing: border-box; }
.ta-modal-kopf { flex: none; }
.ta-modal-box-klein { width: min(640px, 100%); }
.ta-modal-kopf { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border-light, #e9ecef); }
.ta-modal-kopf strong { flex: 1; }
.ta-suche { font: inherit; font-size: 14px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--input-border, #ced4da); min-width: 180px; }
/* Prologic: Systemvariante / Schalen-Variante als Filter über der Fenstertyp-Auswahl */
.ta-fenster-filter { flex: none; display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 10px 14px; border-bottom: 1px solid var(--border-light, #e9ecef); }
.ta-fenster-filter[hidden], .ta-fenster-filter-feld[hidden] { display: none; }
.ta-fenster-filter-feld { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-secondary, #6c757d); }
.ta-fenster-filter-feld .ta-select { min-width: 200px; max-width: 100%; }
.ta-modal-body { padding: 12px 14px; overflow: auto; }
.ta-modal-body textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; padding: 10px; border-radius: 8px; border: 1px solid var(--input-border, #ced4da); }
.ta-notiz-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ta-laden { padding: 30px; text-align: center; color: var(--text-secondary, #6c757d); }
#ta-fenster-inhalt .fenster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
#ta-fenster-inhalt .fenster-option { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border: 1px solid var(--border-light, #e9ecef); border-radius: 8px; cursor: pointer; font-size: 12px; text-align: center; position: relative; }
#ta-fenster-inhalt .fenster-option:hover { border-color: var(--primary-color, #04AA6D); }
#ta-fenster-inhalt .fenster-option img { max-width: 100%; height: 70px; object-fit: contain; }
#ta-fenster-inhalt .fenster-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
/* ProLogic-Variantengruppe (style.css): nur die Knöpfe sind klickbar */
#ta-fenster-inhalt .fenster-option.fenster-variantengruppe { cursor: default; }
#ta-fenster-inhalt details > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }

.ta-toast { position: fixed; left: 50%; bottom: calc(var(--footer-height, 80px) + 16px); transform: translateX(-50%); z-index: 1700; background: #212529; color: #fff; padding: 10px 16px; border-radius: 99px; font-size: 13.5px; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: 90vw; }
.ta-toast-err { background: #b3261e; }

/* Einstellungen: Tab Tabellen-Aufmaß */
.ta-set-layout { display: grid; grid-template-columns: 260px 1fr; gap: 18px; margin-top: 14px; }
.ta-set-plist { display: grid; gap: 4px; margin: 6px 0 10px; }
.ta-set-pitem { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; border: 1px solid transparent; font-size: 14px; cursor: pointer; }
.ta-set-pitem:hover { background: var(--background-secondary, #f8f9fa); }
.ta-set-pitem-on { border-color: var(--primary-color, #04AA6D); background: var(--primary-light, #e8f5f0); }
.ta-set-std { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--primary-hover, #038a5a); }
.ta-set-editor-kopf { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.settings-card-content label.ta-set-feld { display: grid; gap: 4px; font-weight: 400; }
.ta-set-feld input, .ta-set-feld select { font: inherit; font-size: 14px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--input-border, #ced4da); width: 100%; box-sizing: border-box; }
.ta-set-gruppen { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 22px; margin: 6px 0 14px; }
.ta-set-gruppe h4 { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-secondary, #6c757d); }
.settings-card-content label.ta-set-chk { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 4px 0; font-weight: 400; margin: 0; }
.ta-set-chk input { width: 16px; height: 16px; accent-color: var(--primary-color, #04AA6D); margin: 0; }
.ta-set-chk-fix { color: var(--text-secondary, #6c757d); }
.ta-set-tag { font-size: 10.5px; padding: 1px 6px; border-radius: 4px; background: var(--primary-light, #e8f5f0); color: var(--primary-hover, #038a5a); font-weight: 600; }
.ta-set-aktionen { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--border-light, #e9ecef); padding-top: 12px; }
.ta-set-sp { flex: 1; }
.ta-set-status { font-size: 13px; }
.ta-set-ok { color: var(--primary-hover, #038a5a); }
.ta-set-err { color: #b3261e; }
@media (max-width: 760px) {
	.ta-set-layout { grid-template-columns: 1fr; }
	.ta-set-editor-kopf { grid-template-columns: 1fr; }
}

/* Tab Tabellen-Aufmaß: Karte über die volle Breite (das Settings-Grid ist sonst mehrspaltig, minmax 320px) */
#tab-tabellen_aufmass .settings-grid { grid-template-columns: 1fr; }
.ta-settings-card { grid-column: 1 / -1; width: 100%; }
.ta-settings-card .settings-card-content { overflow-x: auto; }

/* Fenstertyp-Modal: Fragment aus query_fensterauswahl im Modal einpassen */
#ta-fenster-inhalt > * { max-width: 100%; box-sizing: border-box; }
#ta-fenster-inhalt .fenster-grid { padding: 8px 0; gap: 8px; }
#ta-fenster-inhalt details { margin-bottom: 8px; }
body[class*="theme-"] #ta-fenster-inhalt summary { padding: 8px 12px; font-size: 14px; }
body[class*="theme-"] #ta-fenster-inhalt details > :not(summary) { padding: 6px 0; animation: none; }

/* Fünf-Maß-Methode (15.09.2026): Messrichtung laut Standard unter dem Spaltennamen, Symbol bei abweichender Richtung */
.ta-grid thead th.ta-th-mit-unter { white-space: normal; min-width: 120px; max-width: 170px; line-height: 1.25; padding-top: 4px; padding-bottom: 4px; }
.ta-grid thead th .ta-th-unter { display: block; font-weight: 400; font-size: 10.5px; letter-spacing: 0; color: var(--primary-hover, #038a5a); margin-top: 2px; }
.ta-grid thead th .ta-th-unter[hidden] { display: none; }
.ta-grid td.ta-mit-symbol { position: relative; }
.ta-grid td .ta-richtung-abw { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); font-size: 14px; line-height: 1; color: #9a6a0e; cursor: help; z-index: 1; }
.ta-grid td.ta-num input:disabled { color: var(--text-secondary, #6c757d); background: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(0,0,0,.035) 6px, rgba(0,0,0,.035) 12px); cursor: not-allowed; }

/* Mehrfach-Duplizieren (15.09.2026): Auswahl-Häkchen in der Positionsspalte, Dialog, frisch kopierte Zeilen */
.ta-grid th.ta-pos, .ta-grid td.ta-pos { width: 78px; min-width: 78px; white-space: nowrap; }
.ta-grid .ta-sel-cb { width: 18px; height: 18px; margin: 0 6px 0 0; vertical-align: middle; accent-color: var(--primary-color, #04AA6D); cursor: pointer; }
.ta-grid .ta-sel-cb:disabled { cursor: default; opacity: .35; }
.ta-grid td.ta-pos .ta-pos-nr { vertical-align: middle; }
.ta-grid tr.ta-neu-dup td { animation: ta-dup-neu 3s ease-out 1; }
@keyframes ta-dup-neu { 0%, 40% { background-color: var(--primary-light, #e8f5f0); } 100% { background-color: transparent; } }
.ta-dup-body { display: grid; gap: 12px; }
.ta-dup-body .ta-dup-info { margin: 0; font-weight: 600; }
.ta-dup-body .ta-dup-gruppe { border: 1px solid var(--border-light, #e9ecef); border-radius: 8px; padding: 8px 12px; margin: 0; display: grid; gap: 6px; }
.ta-dup-body .ta-dup-gruppe legend { font-size: 12px; font-weight: 600; color: var(--text-secondary, #6c757d); padding: 0 4px; }
.ta-dup-body label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ta-dup-body .ta-dup-anzahl input { width: 80px; font: inherit; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--input-border, #ced4da); }
.ta-dup-body .ta-dup-hinweis { margin: 0; font-size: 13px; color: #856404; background: #fff3cd; border-radius: 6px; padding: 8px 10px; }

/* Stufe 4b (25.09.2026): Verbreiterungs-Vorschlag im Fugen-Popup + berechnete Anzeige-Spalten */
.ta-fu-rvv .ta-fu-feld { min-width: 0; }
.ta-fu-rvv .ta-fu-feld select { width: 100%; max-width: 260px; }
.ta-fu-rvv-info { display: block; font-size: 11px; color: #2c5aa0; margin-top: 2px; }
.ta-fu-rvv-info.warn { color: #b45309; }
.ta-fu-rvv-aktion { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.ta-fu-rvv-hinweis { font-size: 12px; color: var(--text-secondary, #6c757d); }
td.ta-berechnet { text-align: right; font-variant-numeric: tabular-nums; color: #1a5a1a; font-weight: 600; white-space: nowrap; }
