/* Reiter SNA-Abläufe (Skizze sna-editor.html, Präfix sa-) und Export-Vorlagen (Präfix ev-) */
.sa { position: absolute; inset: 0; display: grid; grid-template-columns: 280px minmax(0, 1fr) 560px; gap: 6px; min-height: 0; }
.sa-spalte { display: flex; flex-direction: column; gap: 6px; min-height: 0; min-width: 0; }
.sa .pn > .h .r, .ev .pn > .h .r { margin-left: auto; display: flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.sa .pn > .h .btn.klein, .ev .pn > .h .btn.klein { height: 22px; padding: 0 7px; }
.sa-klein { font-size: 12px; color: var(--mu); font-weight: 500; text-transform: none; letter-spacing: 0; white-space: nowrap; }
.sa-tag { font: 600 11px var(--mono); color: var(--link); background: var(--info-bg2); border: 1px solid #3f6fb8; border-radius: 4px; padding: 0 5px; text-transform: none; letter-spacing: 0; white-space: nowrap; }
.sa-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sa-grow { flex: 1; min-width: 0; }
.sa-umbruch { flex-wrap: wrap; gap: 6px; }
.sa-ro { display: block; line-height: 30px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mu); }
.sa-frage-id { max-width: 230px; }
.sa-fuss { margin-top: auto; padding-top: 6px; }
.sa-luecke { flex: 1; }
.sa-chip-klein { height: 20px; font-size: 12px; cursor: default; }
button.sa-chip-klein { cursor: pointer; }
.sa-seg-klein button { padding: 3px 9px; font-size: 12.5px; }
.sa-seg-klein button:focus-visible, .sa-baustein:focus-visible, .sa-mb:focus-visible { outline: 2px solid var(--ac); outline-offset: 1px; }

/* Links */
.sa-abl { flex: 0 1 auto; max-height: 30%; }
.sa-abl > .b, .sa-schr > .b { padding: 6px; gap: 6px; }
.sa-schr { flex: 1 1 0; min-height: 160px; }
.sa-einst-pn { flex: none; }
.sa-einst { gap: 7px; padding: 8px 10px; overflow: visible; }
.sa-einst .feld { gap: 2px; }
.sa-wahl { display: flex; align-items: center; justify-content: space-between; text-align: left; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--tx); }
.sa-wahl:disabled { cursor: default; opacity: .7; }
.sa-schritt .sa-griff { color: var(--mu); cursor: grab; }
.sa-schritt.sa-ziel { box-shadow: inset 0 2px 0 var(--ac); }
.sa-rea { background: var(--rea-bg); }
.sa-rea.sel { background: var(--rea-bg); border-color: var(--rea); }
.sa-lagenwahl { display: flex; flex-direction: column; gap: 4px; max-height: 420px; overflow: auto; }
.sa-probleme .sa-zeigen { height: 20px; padding: 0 6px; font-size: 12px; vertical-align: middle; }
.sa-warnzeichen { color: var(--warn); flex: none; }
.sa-probleme { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; max-height: 560px; overflow: auto; }

/* Mitte: Raster */
.sa-mitte-pn > .b { padding: 8px; }
.sa-rasterbox { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.sa-flaeche { flex: 1; min-height: 0; display: flex; align-items: flex-start; justify-content: center; overflow: hidden; }
.sa-canvas { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(12, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 6px; background: var(--inp); border: 1px dashed var(--ln2); }
.sa-zelle { background: #ffffff07; border-radius: 3px; pointer-events: none; }
.sa-mb { position: relative; z-index: 1; min-width: 0; min-height: 0; overflow: hidden; border: 1px solid #3f6fb8; background: var(--info-bg2); border-radius: 5px; padding: 4px 7px; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; cursor: grab; user-select: none; touch-action: none; }
.sa-mb > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; }
.sa-mb b { font-size: 13.5px; }
.sa-mb .sa-tag { align-self: flex-start; }
.sa-mb.sel { border: 2px solid #fff; background: var(--info-bg); padding: 3px 6px; }
.sa-mb.zieht { cursor: grabbing; opacity: .9; z-index: 3; box-shadow: 0 6px 20px #000a; }
.sa-mb.blockiert { outline: 2px dashed var(--err); }
.sa-mb .sa-bed { font-size: 11.5px; color: #f3c76b; }
.sa-mb.bedingt { border-style: dashed; }
.sa-mb.problem { border-color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.sa-mb.problem.sel { border-color: #fff; }
.sa-mb .sa-prob { font-size: 11.5px; font-weight: 600; color: var(--warn-tx); }
.sa-mb .sa-gr { position: absolute; right: 1px; bottom: 1px; width: 14px; height: 14px; border-right: 3px solid var(--link); border-bottom: 3px solid var(--link); cursor: nwse-resize; overflow: visible; }
.sa-geist { z-index: 2; border: 2px dashed var(--err); background: #d9423a22; border-radius: 5px; pointer-events: none; }
.sa-geist.ok { border-color: var(--ok); background: #2fb36d22; }

/* Mitte: REA */
.sa-mitte .sa-reaedit { display: flex; flex-direction: column; gap: 8px; min-height: 0; flex: 1; }
.sa-zahl { width: 110px; }
.sa-anleitung { display: flex; flex-direction: column; gap: 6px; overflow: auto; min-height: 0; flex: 1; }
.sa-anl { display: grid; grid-template-columns: 64px minmax(0, 1fr) 150px; gap: 8px; align-items: start; flex: none; }
.sa-anl textarea { min-height: 52px; }
.sa-anl-akt { display: flex; flex-direction: column; gap: 4px; }
.sa-nr { text-align: center; }

/* Rechts: Eigenschaften */
.sa-eig-pn { flex: 1 1 0; }
.sa-eig { gap: 8px; }
.sa-eig .feld { gap: 3px; }
.sa-eig .zeile > .feld { min-width: 0; }
.sa-eig select.inp { max-width: 220px; }
.sa-modprobleme { flex: none; border: 1px solid var(--warn); background: var(--warn-bg); color: var(--warn-tx); border-radius: 5px; padding: 5px 8px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.sa-modprobleme[hidden] { display: none; }
.sa-modprobleme ul { margin: 0; padding-left: 16px; }
.sa-tabbox { flex: none; }
.sa-felder { table-layout: fixed; }
.sa-felder th, .sa-felder td { padding: 2px 4px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.sa-felder th { font-size: 10.5px; letter-spacing: 0; }
.sa-felder th:nth-child(1) { width: 106px; } .sa-felder th:nth-child(2) { width: 150px; }
.sa-felder th:nth-child(3) { width: 66px; } .sa-felder th:nth-child(4) { width: 58px; } .sa-felder th:nth-child(5) { width: 54px; }
.sa-felder td.mono { font-size: 11.5px; }
.sa-felder .sa-klein-inp { width: 100%; }
.sa-felder input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--ac); margin: 0; }
.sa-klein-inp { height: 24px; width: 120px; font-size: 13px; padding: 0 6px; }
.sa-bedingung { border: 1px dashed var(--ln2); border-radius: 5px; padding: 6px; margin-top: 4px; }
.sa-gruppe { display: flex; flex-direction: column; gap: 4px; }
.sa-gruppe.sa-unter { margin-left: 14px; padding-left: 8px; border-left: 2px solid var(--ln2); }
.sa-gruppe .chip { height: 22px; cursor: pointer; }
.sa-gruppe .btn.klein { height: 22px; padding: 0 7px; font-size: 12.5px; }
.sa-bed-zeile { display: grid; grid-template-columns: minmax(0, 1.4fr) 92px minmax(0, 1fr) auto; gap: 4px; align-items: center; padding-left: 14px; }
.sa-bed-zeile .inp { height: 26px; font-size: 13px; padding: 0 6px; }
.sa-bed-zeile .sa-wertname { grid-column: 3 / 5; font-size: 12px; }
.sa-bed-zeile .sa-wertname:empty { display: none; }
.sa-warn { color: var(--warn); }
.sa-stw { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.sa-stw .chip { height: 22px; }
.sa-x { background: none; border: none; color: inherit; cursor: pointer; padding: 0 0 0 4px; font-size: 11px; }
.sa-x:focus-visible { outline: 2px solid var(--ac); }
.sa-schnell { display: flex; flex-direction: column; gap: 3px; }
.sa-sw-zeile { display: grid; grid-template-columns: 20px 140px minmax(0, 1fr) auto; gap: 4px; align-items: center; }
.sa-sw-stw { gap: 4px; min-width: 0; }
.sa-eig .sa-sw-stw select.inp { flex: 1; min-width: 0; max-width: none; }
.sa-sw-stw input.inp { flex: 1; min-width: 0; }
.sa-sw-zeile .inp { height: 26px; font-size: 13px; padding: 0 6px; max-width: none; }
.sa-sw-zeile .btn.klein { height: 24px; padding: 0 6px; }
.sa-vorlagen { display: flex; flex-direction: column; gap: 3px; }
.sa-modliste { flex: none; max-height: 320px; }

/* Rechts: Bausteine */
.sa-pal-pn { flex: none; }
.sa-pal-pn > .b { padding: 6px 8px; }
.sa-pal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
.sa-baustein { font-size: 12.5px; padding: 3px 6px; border-radius: 4px; background: var(--p2); border: 1px dashed var(--ln2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; cursor: grab; color: var(--tx); }
.sa-baustein:hover:not(:disabled) { background: var(--p3); border-color: var(--ac); }
.sa-baustein:disabled { opacity: .45; cursor: default; }

/* Vorschau (Dialog) */
.sa-vorschau-raster { width: 1160px; height: 689px; flex: none; }
.sa-vorschau-raster .sa-ausgeblendet { border: 1px dashed var(--ln2); border-radius: 6px; display: flex; align-items: center; justify-content: center; background: transparent; }

/* ---------- Export-Vorlagen (ev-) ---------- */
.ev { position: absolute; inset: 0; display: grid; grid-template-columns: 320px minmax(0, 1fr) minmax(0, 1fr); gap: 6px; min-height: 0; }
.ev-liste > .b { padding: 6px; }
.ev-gruppe { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--mu); padding: 6px 4px 2px; flex: none; }
.ev-gruppe .btn.klein { margin-left: auto; height: 20px; padding: 0 6px; font-size: 12px; text-transform: none; }
.ev-editor > .b { gap: 8px; }
.ev-inhalt { flex: 1; min-height: 160px; font-family: var(--mono); font-size: 13.5px; line-height: 1.45; }
.ev-hilfe { flex: none; max-height: 300px; overflow: auto; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--ln); border-radius: 5px; padding: 6px 8px; background: var(--p2); }
.ev-hilfe .ev-hg { font-size: 11.5px; color: var(--mu); text-transform: uppercase; letter-spacing: .4px; margin-top: 4px; }
.ev-hilfe .ev-chips { display: flex; flex-wrap: wrap; gap: 3px; }
.ev-ph { font: 12px var(--mono); padding: 1px 6px; border-radius: 4px; background: var(--p3); border: 1px solid var(--ln2); cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tx); }
.ev-ph:hover { border-color: var(--ac); }
.ev-ph:focus-visible { outline: 2px solid var(--ac); }
.ev-abschnitte { display: flex; flex-direction: column; gap: 3px; flex: none; }
.ev-abschnitt { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 6px; align-items: center; padding: 2px 6px; border: 1px solid var(--ln); border-radius: 4px; background: var(--p2); }
.ev-abschnitt.aus { opacity: .55; }
.ev-abschnitt .btn.klein { height: 22px; padding: 0 6px; }
.ev-vorschau > .b { gap: 8px; }
.ev-text { flex: 1; min-height: 0; overflow: auto; white-space: pre-wrap; word-break: break-word; font: 13.5px/1.5 var(--mono); background: var(--inp); border: 1px solid var(--ln2); border-radius: 5px; padding: 8px 10px; }
.ev-text h4 { margin: 8px 0 2px; font: 700 13px var(--mono); color: var(--tx); }
.ev-text h4:first-child { margin-top: 0; }
.ev-text .leer { color: var(--mu2); }
.ev-fuss { display: flex; gap: 8px; align-items: center; flex: none; flex-wrap: wrap; }
