/* 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; }
.ta-grid-nachlauf { height: 42vh; height: 42dvh; }
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 tbody tr td { border-bottom: 3px solid #4b5563; }
body.theme-dark .ta-grid tbody tr td { border-bottom-color: #c5c9ce; }
.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 { position: relative; min-width: 140px; }
.ta-grid td.ta-num.ta-mit-diff input { padding-right: 66px; }
.ta-versatz-diff { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); padding-left: 8px; border-left: 1px solid var(--border-color, #ced4da); font-size: 12px; font-weight: 700; white-space: nowrap; pointer-events: none; }
.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; }
.ta-grid td.ta-bockfenster-gesperrt { text-align: center; color: var(--text-secondary, #6c757d); background: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(127,127,127,.08) 6px, rgba(127,127,127,.08) 12px); cursor: not-allowed; }
.ta-bockfenster { padding: 6px 8px; border: 1px solid var(--primary-color, #003b70); border-radius: 5px; color: var(--primary-color, #003b70); background: var(--bg-card, #fff); font: inherit; font-size: 12px; cursor: pointer; }
.ta-typ .ta-bockfenster { display: block; margin: 4px auto; max-width: 100%; }
.ta-bockfenster:focus-visible { outline: 2px solid var(--primary-color, #003b70); outline-offset: 2px; }
/* 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; }

/* Plus-Dialog: ausschliesslich iframe-Modus, normale Bearbeiten-Seite unveraendert. */
body.ta-editor-open { overflow: hidden; }
#ta-modal-maske { z-index: 2020; background: rgba(18, 34, 43, .54); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); padding: 16px; }
#ta-modal-maske > .ta-modal-box { width: min(1180px, 100%); height: calc(100vh - 32px); height: calc(100dvh - 32px); max-height: none; border-radius: 20px; border: 1px solid rgba(255,255,255,.35); box-shadow: 0 24px 90px rgba(10, 28, 35, .3); }
#ta-modal-maske .ta-modal-kopf { padding: 16px 22px; gap: 12px; background: var(--background-color, #fff); border-bottom: 1px solid var(--border-color, #e2e8ec); flex-wrap: wrap; }
#ta-modal-maske #ta-maske-titel { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 180px; font: 650 17px/1.4 system-ui, -apple-system, 'Segoe UI', sans-serif; letter-spacing: -.025em; }
#ta-modal-maske #ta-maske-titel::before { content: ''; width: 22px; height: 24px; flex: 0 0 22px; border: 1.8px solid var(--primary-color, #04aa6d); border-radius: 5px; background: linear-gradient(var(--primary-color, #04aa6d),var(--primary-color, #04aa6d)) center / 1.5px 100% no-repeat, linear-gradient(var(--primary-color, #04aa6d),var(--primary-color, #04aa6d)) center / 100% 1.5px no-repeat; }
#ta-modal-maske .ta-btn { min-height: 44px; border-radius: 10px; font: 600 14px/1.3 system-ui, -apple-system, 'Segoe UI', sans-serif; padding: 10px 16px; transition: background .16s, box-shadow .16s; }
#ta-modal-maske #ta-maske-schliessen { color: var(--text-color, #334751); background: var(--background-secondary, #f3f6f8); border: 1px solid var(--border-color, #e2e8ec); box-shadow: none; }
#ta-modal-maske .ta-maske-frame { min-height: 0; background: #f3f6f8; }
#ta-modal-maske .ta-maske-hinweis { font-size: 13px; }
#ta-modal-maske .ta-maske-fuss { display: flex; justify-content: flex-end; padding: 14px 22px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border-color, #e2e8ec); background: var(--background-color, #fff); flex-shrink: 0; box-shadow: 0 -6px 22px rgba(20, 43, 52, .035); }
#ta-modal-maske #ta-maske-speichern { min-width: 208px; box-shadow: 0 3px 9px rgba(0,120,80,.16); }
#ta-modal-maske #ta-maske-speichern::before { content: '✓'; margin-right: 9px; font-size: 17px; }
#ta-modal-maske .ta-btn:focus-visible { outline: 3px solid var(--primary-color, #04aa6d); outline-offset: 3px; }
body.ta-modal-editor { --ta-editor-bg: #f3f6f8; --ta-editor-panel: #fff; --ta-editor-ink: #20373f; --ta-editor-muted: #63777f; --ta-editor-border: #dfe7eb; --ta-editor-soft: #eaf7f1; --footer-height: 0px; --app-fab-bottom: 18px; padding: 0 !important; background: var(--ta-editor-bg); color: var(--ta-editor-ink); font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 14px; line-height: 1.5; }
body.ta-modal-editor.theme-dark { --ta-editor-bg: #111c24; --ta-editor-panel: #1a2a34; --ta-editor-ink: #edf5f7; --ta-editor-muted: #a9bec7; --ta-editor-border: #344955; --ta-editor-soft: #193e36; }
body.ta-modal-editor .navbar, body.ta-modal-editor .navbar-separator, body.ta-modal-editor .footer, body.ta-modal-editor .me-legacy-actions, body.ta-modal-editor .me-empty { display: none !important; }
body.ta-modal-editor .content { margin: 0 !important; padding: 0 24px 26px !important; overflow: visible !important; min-height: 0; }
body.ta-modal-editor #messungbearbeiten { margin: 0 auto; max-width: 1080px; }
body.ta-modal-editor .mb-ajax-save-status { bottom: 12px; }
/* Bockfenster: ausschließlich Original-Maßzeilen im bestehenden Speicherformular. */
#ta-modal-maske.ta-maske-nur-masse > .ta-modal-box { width: min(900px, 100%); }
body.ta-bockfenster-masse #messungbearbeiten:not(.ta-bock-masspfad) { visibility: hidden; }
body.ta-bockfenster-masse .ta-bock-masspfad > :not(.ta-bock-masspfad):not(.ta-bock-massinhalt) { display: none !important; }
body.ta-bockfenster-masse .ta-bock-grundmass > .table-body-cell:nth-child(n+4) { display: none !important; }
body.ta-bockfenster-masse #olliDock, body.ta-bockfenster-masse #stn-fab,
body.ta-bockfenster-masse #fenster-vorschau-reopen-button, body.ta-bockfenster-masse #fenster-vorschau-popup { display: none !important; }
body.ta-modal-editor.ta-bockfenster-masse .content { padding-top: 16px !important; }
body.ta-bockfenster-masse .me-card { margin-top: 0; scroll-margin-top: 0; }
@media (max-width: 760px) {
    body.ta-modal-editor .content { padding: 0 14px 20px !important; }
    body.ta-modal-editor .material-option { min-width: 100px; }
}
@media (max-width: 640px) {
    #ta-modal-maske { padding: 0; }
    #ta-modal-maske > .ta-modal-box { width: 100%; height: 100vh; height: 100dvh; border-radius: 0; border: 0; }
    #ta-modal-maske .ta-modal-kopf { padding: 12px 14px; }
    #ta-modal-maske #ta-maske-titel { font-size: 15px; }
    #ta-modal-maske #ta-maske-status { order: 3; flex-basis: 100%; }
    #ta-modal-maske #ta-maske-status:empty { display: none; }
    #ta-modal-maske .ta-maske-fuss { padding: 12px 14px max(12px, env(safe-area-inset-bottom)); }
    #ta-modal-maske .ta-maske-fuss .ta-btn { width: 100%; }
    body.ta-modal-editor .material-option { flex-basis: calc(50% - 8px); min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
    #ta-modal-maske .ta-btn, body.ta-modal-editor .me-nav-button, body.ta-modal-editor .material-option-label, body.ta-modal-editor #messungbearbeiten input, body.ta-modal-editor #messungbearbeiten select, body.ta-modal-editor #messungbearbeiten textarea { transition: none; }
}

/* 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-eingabe { display: inline-flex; align-items: center; gap: 6px; }
.ta-fu-eingabe .button { margin: 0; }
.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-eingabe input { width: 90px; }
.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-sub { display: block; font-size: 11px; font-weight: 400; color: var(--text-muted, #868e96); max-width: 180px; line-height: 1.25; }
.ta-fu-tuer-block { border-top: 1px dashed var(--border-light, #e9ecef); padding-top: 8px; margin-bottom: 12px; }
.ta-fu-tuer-block .ta-fu-label { margin-bottom: 6px; }
.ta-fu-tuer-block .ta-fu-feld { align-items: flex-start; }
.ta-fu-formel { font-size: 11px; color: var(--text-muted, #868e96); line-height: 1.4; text-align: center; margin: 2px 0 10px; }
.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; } .ta-fu-eingabe input { width: 72px; } }

/* 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); }
/* Id-Selektor: themes.css (body[class*="theme-"] input[type="text"]) ist spezifischer als eine reine Klassen-Regel */
#ta-felder-inhalt .ta-fe-feld input.ta-fe-fehler, #ta-felder-inhalt .ta-fe-feld input.ta-fe-fehler:focus { border-color: #b3261e; box-shadow: 0 0 0 3px rgba(179, 38, 30, .15); }
.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: 2010; 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, Fugen, RV, Felder, Versatz, Sortieren, Duplizieren). Overlay-Ebene ab 2000: die Navbar liegt bis 1024px Breite und bei .navbar-overflow auf z-index 1700 (style.css), ein Dialog bei 1600 verschwand auf Tablets mit dem Kopf (Titel, Abbrechen, Uebernehmen) hinter ihr. */
.ta-modal { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.45); display: block; overflow: auto; padding: 12px; -webkit-overflow-scrolling: touch; }
.ta-modal[hidden] { display: none; }
/* Formular-Dialoge müssen die transparente Formularregel in themes.css überstimmen. */
.ta-modal-box, .ta-modal form.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: 10120; 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-standard { margin: 4px 0 12px 46px; }
.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; }
.ta-set-vorlage-flag, .ta-set-vorlage-hint { grid-column: 1 / -1; }
.ta-set-vorlage-hint { margin: 0; font-size: 13px; color: var(--text-secondary, #6c757d); }
.ta-set-vorlagen { margin: 14px 0 4px; padding: 12px 14px; border: 1px solid var(--border-light, #e9ecef); border-radius: 10px; background: var(--background-secondary, #f8f9fa); }
.ta-set-vorlagen h4 { margin: 0 0 4px; font-size: 14px; }
.ta-set-vorlage-lead { margin: 0 0 8px; font-size: 13px; color: var(--text-secondary, #6c757d); }
.ta-set-vorlage-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; flex-wrap: wrap; }
.ta-set-vorlage-name { flex: 1; font-size: 14px; }
.ta-set-vorlage-typ { font-size: 12px; color: var(--text-secondary, #6c757d); }
.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; }
/* display:flex schlägt das hidden-Attribut (Autor-Stylesheet vor User-Agent).
   Ohne diese Regel wäre „als Vorlage freigeben“ in jedem Mandanten sichtbar. */
.settings-card-content label.ta-set-chk[hidden],
.ta-set-vorlage-hint[hidden],
.ta-set-vorlagen[hidden] { display: none !important; }
.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, .ta-grid td.ta-anzeige.ta-berechnet { text-align: right; font-variant-numeric: tabular-nums; color: #1a5a1a; font-weight: 600; white-space: nowrap; }
body.theme-dark .ta-grid td.ta-anzeige.ta-berechnet { color: #7ddc9a; }
/* Kontrollmaß (10/2026): Innen − Außen − Anschläge, Soll 0. Zone nach der Versatz-Kontrolle (Klasse + Textfarbe setzt
   tabellen_aufmass.js aus den Mandanten-Farben); hier nur die Hinterlegung der Zwischen-/Kritisch-Zone. */
.ta-grid td.ta-anzeige.ta-berechnet.ta-km-ok { font-weight: 700; }
.ta-grid td.ta-anzeige.ta-berechnet.ta-km-warnung { font-weight: 700; background: rgba(249, 168, 37, 0.14); }
.ta-grid td.ta-anzeige.ta-berechnet.ta-km-kritisch { font-weight: 700; background: rgba(198, 40, 40, 0.10); }
body.theme-dark .ta-grid td.ta-anzeige.ta-berechnet.ta-km-warnung { background: rgba(249, 168, 37, 0.22); }
body.theme-dark .ta-grid td.ta-anzeige.ta-berechnet.ta-km-kritisch { background: rgba(255, 138, 128, 0.16); }

/* Versatzkreuz (Profil-Option): eine Spalte statt der einzelnen Innen/Außen-Felder */
.ta-set-versatz { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--border-light, #e9ecef); border-radius: 10px; }
.ta-set-versatz-wahl { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; }
.ta-set-versatz-hinweis { margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: var(--text-secondary, #6c757d); max-width: 78ch; }
.ta-set-chk-kreuz { opacity: .55; }
.ta-grid td.ta-kreuz { cursor: pointer; text-align: center; padding: 2px 8px; height: auto; }
.ta-grid td.ta-kreuz:hover, .ta-grid td.ta-kreuz:focus { background: var(--primary-light, #e8f5f0); outline: none; }
.ta-kreuz-grid { display: inline-grid; grid-template-columns: minmax(28px, auto) 16px minmax(28px, auto); grid-template-areas: ". oben ." "links x rechts" ". unten ."; align-items: center; justify-items: center; gap: 0 3px; color: var(--text-color, #334155); line-height: 1.05; }
.ta-kreuz-oben { grid-area: oben; }
.ta-kreuz-links { grid-area: links; }
.ta-kreuz-rechts { grid-area: rechts; }
.ta-kreuz-unten { grid-area: unten; }
.ta-kreuz-x { grid-area: x; width: 16px; height: 16px; background: linear-gradient(to top right, transparent calc(50% - 0.7px), currentColor calc(50% - 0.7px), currentColor calc(50% + 0.7px), transparent calc(50% + 0.7px)), linear-gradient(to top left, transparent calc(50% - 0.7px), currentColor calc(50% - 0.7px), currentColor calc(50% + 0.7px), transparent calc(50% + 0.7px)); }
.ta-kreuz-arm { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 1.5em; text-align: center; }
.ta-kreuz-leer { font-weight: 500; color: var(--text-secondary, #9aa0a6); }
.ta-kreuz-arm.ta-diff-plus { color: darkgreen; }
.ta-kreuz-arm.ta-diff-minus { color: darkred; }
.ta-kreuz-gross { grid-template-columns: minmax(52px, auto) 36px minmax(52px, auto); gap: 2px 10px; margin: 4px 0 8px; }
.ta-kreuz-gross .ta-kreuz-x { width: 36px; height: 36px; }
.ta-kreuz-gross .ta-kreuz-arm { font-size: 18px; min-width: 2em; }
.ta-modal-box-versatz { width: min(640px, 100%); }
.ta-versatz-hinweis { margin: 0 0 12px; font-size: 13px; line-height: 1.45; color: var(--text-secondary, #6c757d); }
.ta-versatz-layout { display: flex; flex-direction: column; align-items: center; }
.ta-versatz-tabelle { width: 100%; border-collapse: collapse; }
.ta-versatz-tabelle th, .ta-versatz-tabelle td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--border-light, #e9ecef); vertical-align: middle; }
.ta-versatz-tabelle th { font-size: 12px; font-weight: 600; color: var(--text-secondary, #6c757d); }
.ta-versatz-tabelle th[scope="row"] { font-size: 14px; color: var(--text-color, #212529); white-space: nowrap; }
.ta-versatz-tabelle input { width: 100%; min-width: 72px; box-sizing: border-box; font: inherit; font-size: 16px; padding: 8px; border-radius: 8px; border: 1px solid var(--input-border, #ced4da); background: var(--input-background, #fff); color: var(--input-text, #212529); }
.ta-versatz-kontrolle { width: 100%; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border-light, #e9ecef); }
.ta-vk-titel { font-weight: 700; margin-bottom: 6px; }
.ta-vk-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.ta-vk-label { min-width: 52px; color: var(--text-secondary, #6c757d); }
.ta-vk-track { display: inline-block; width: 160px; max-width: 40vw; height: 12px; border-radius: 6px; background: var(--input-border, #d5d5d5); overflow: hidden; flex-shrink: 0; }
.ta-vk-fill { display: block; height: 100%; border-radius: 6px; }
.ta-vk-wert { font-weight: 700; }

/* Grundrisse und Ansichten unter der Tabelle */
.ta-plaene { flex-shrink: 0; margin-top: 8px; border: 1px solid var(--border-color, #dee2e6); border-radius: 10px; background: var(--background-secondary, #f8f9fa); }
.ta-plaene-kopf { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--text-color, #212529); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.ta-plaene-kopf:hover { background: var(--background-color, #fff); }
.ta-plaene-pfeil { width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 6px solid currentColor; transition: transform .15s ease; }
.ta-plaene-kopf[aria-expanded="true"] .ta-plaene-pfeil { transform: rotate(90deg); }
.ta-plaene-zahl { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--text-secondary, #6c757d); background: var(--background-color, #fff); border: 1px solid var(--border-color, #dee2e6); border-radius: 99px; padding: 1px 8px; }
.ta-plaene-body { max-height: 240px; overflow: auto; padding: 0 10px 10px; -webkit-overflow-scrolling: touch; }
.ta-plaene-liste { border-collapse: collapse; }
.ta-plaene-liste td { vertical-align: top; padding: 0 8px 0 0; }
.ta-plaene-bild { display: block; max-width: 260px; max-height: 180px; width: auto; height: auto; border-radius: 6px; border: 1px solid var(--border-color, #dee2e6); background: var(--background-color, #fff); }
.ta-plaene .plan-ro-section { margin: 0; padding: 0; border: 0; background: transparent; }
.ta-plaene .plan-ro-section-title { display: none; }
.ta-grid tbody tr.ta-plan-treffer td { box-shadow: inset 0 0 0 2px var(--primary-color, #04AA6D); }

/* Kompakte Zeilen und gemeinsame Ortsangaben. */
table.ta-grid { height: auto; }
.ta-grid > tbody > tr { height: auto; }
.ta-grid th.ta-ort, .ta-grid td.ta-ort { min-width: 155px; max-width: 190px; padding: 5px 9px; white-space: normal; }
.ta-grid td.ta-ort { cursor: pointer; line-height: 1.25; }
.ta-grid td.ta-ort span { display: block; max-width: 172px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.ta-grid td.ta-ort span:first-child { font-weight: 600; }
.ta-grid th.ta-zusatz-h, .ta-grid td.ta-zusatz { min-width: 300px; width: 360px; max-width: 360px; white-space: nowrap; }
.ta-grid td.ta-zusatz { overflow: hidden; }
.ta-grid td.ta-zusatz .ta-tag { max-width: 170px; }
.ta-ort-form { display: grid; gap: 8px; }
.ta-ort-form label { margin-top: 6px; font-weight: 600; }
.ta-ort-form input, .ta-ort-form select { width: 100%; min-height: 44px; box-sizing: border-box; padding: 8px 10px; font: inherit; font-size: 16px; color: var(--input-text, #212529); background: var(--input-background, #fff); border: 1px solid var(--input-border, #ced4da); border-radius: 8px; }
.ta-ort-form input[hidden] { display: none; }

.ta-tags-kompakt { width: 340px; max-height: 58px; overflow: auto; white-space: normal; }

/* Inhaltsabhängige Spaltenbreiten (colgroup aus tabellen_aufmass.js). */
table.ta-grid { table-layout: fixed; }
.ta-grid thead th { font-size: 11px; letter-spacing: 0; line-height: 1.2; white-space: normal; padding: 5px 7px; overflow-wrap: anywhere; box-sizing: border-box; }
/* Auch bei langen Fertigmaß-Namen muss Breite/Höhe vollständig lesbar bleiben. */
.ta-grid .ta-th-label { display: block; }
.ta-grid thead th.ta-th-mit-unter { min-width: 0; max-width: none; }
.ta-grid th .ta-th-unter { font-size: 10px; }
.ta-grid tbody td[data-key] { min-width: 0; max-width: none; overflow: hidden; }
.ta-grid td.ta-num input, .ta-grid td.ta-txt input { min-width: 0; padding-left: 7px; padding-right: 7px; }
.ta-grid td.ta-num.ta-mit-diff input { padding-right: 66px; }
.ta-grid td.ta-sel, .ta-grid td.ta-typ, .ta-grid td.ta-anzeige { padding-left: 7px; padding-right: 7px; }
.ta-grid td.ta-sel .ta-sel-val { display: flex; min-width: 0; max-width: 100%; overflow: hidden; white-space: nowrap; }
.ta-grid td.ta-sel .ta-sel-val:after { flex-shrink: 0; }
.ta-grid td.ta-notiz .ta-notiz-text { white-space: nowrap; }
.ta-grid td.ta-ort { min-width: 0; }

.ta-ort-form input[type="checkbox"] { width: 22px; height: 22px; min-height: 22px; accent-color: var(--primary-color, #04AA6D); }
.ta-ort-freie-felder { display: grid; gap: 10px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--border-light, #e9ecef); }
.ta-ort-freie-felder:empty { display: none; }

/* Leere Ortsangaben benötigen nur Platz für den umbrechenden Spaltenkopf. */
.ta-grid th.ta-ort, .ta-grid td.ta-ort { min-width: 0; }
.ta-grid td.ta-ort span { max-width: 100%; }
/* Antippbarer Hinweis statt reinem Hover-Tooltip bei abweichender Messrichtung. */
.ta-grid td .ta-richtung-abw { left: 2px; width: 28px; height: 38px; padding: 0; border: 0; border-radius: 5px; background: #fff3d6; color: #8a5800; font: inherit; font-size: 18px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ta-grid td .ta-richtung-abw:focus-visible { outline: 2px solid var(--primary-color, #04AA6D); outline-offset: -2px; }
.ta-grid td.ta-mit-symbol input { padding-left: 33px; }
.ta-richtung-vergleich { width: 100%; border-collapse: collapse; font-size: 14px; }
.ta-richtung-vergleich th, .ta-richtung-vergleich td { padding: 12px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border-light, #e9ecef); }
.ta-richtung-vergleich th { width: 90px; }
.ta-richtung-vergleich tr.ta-richtung-aktuell th, .ta-richtung-vergleich tr.ta-richtung-aktuell td { background: #fff3d6; color: #704800; font-weight: 600; }
