/* Stegvis Pro – Darstellung der Pro-Funktionen. Nur in der Pro-Fassung vorhanden; wird nach app.css eingebunden. */

/* ---------- fallakte: Ablauf in Runden (Spalten je Beteiligten, Zeit nach unten) ---------- */
.ab-now { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--accent-soft); margin-bottom: 12px; }
.ab-now.ab-closed { background: var(--ok-soft); }
.ab-now-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.ab-tools { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 8px; }
/* Eigener Scrollbereich in beide Richtungen: So bleiben die Spaltenköpfe (sticky) auch bei langen Abläufen sichtbar */
.ab-scroll { overflow: auto; max-height: 75vh; padding-bottom: 6px; border-top: 1px solid var(--line-soft); }
.ab-grid { display: grid; gap: 4px 14px; align-items: start; min-width: min-content; }
.ab-lane { position: sticky; top: 0; z-index: 2; background: var(--surface); box-shadow: 7px 0 0 var(--surface), -7px 0 0 var(--surface);   /* deckt die Spaltenlücken */
  font-weight: 600; font-size: .85rem; color: var(--ink-2); padding: 8px 2px 6px; border-bottom: 2px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-lane.ab-ext { border-bottom-color: var(--signal); }
.ab-round { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-top: 10px; padding: 6px 4px;
  border-top: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.ab-round:hover { background: var(--surface-2); }
.ab-round b { font-size: .92rem; }
.ab-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 10px; font-size: .86rem; }
.ab-card.ab-ext { border-left: 3px solid var(--signal); }
.ab-card.ab-active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.ab-step + .ab-step { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.ab-step-head { display: flex; gap: 6px; align-items: baseline; }
.ab-step-head b { font-weight: 600; }
.ab-files { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ab-files .file-chip { background: var(--surface);  font-size: .8rem; padding: 1px 8px; }
.ab-reset { color: var(--danger); font-size: .8rem; margin-top: 3px; }
.ab-arrow { position: relative; display: flex; align-items: center; min-height: 24px; margin: 0 10px; }
.ab-arrow.ab-right { justify-content: flex-start; padding-left: 14px; }   /* Text am Ausgangspunkt des Pfeils */
.ab-arrow.ab-left { justify-content: flex-end; padding-right: 14px; }
.ab-card-lane { font-size: .74rem; font-weight: 600; color: var(--muted); text-transform: none; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-arrow::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid var(--muted); }
.ab-arrow::after { content: ''; position: absolute; top: calc(50% - 5px); border: 5px solid transparent; }
.ab-arrow.ab-right::after { right: -6px; border-left: 8px solid var(--muted); }
.ab-arrow.ab-left::after { left: -6px; border-right: 8px solid var(--muted); }
.ab-arrow-label { position: relative; background: var(--surface); padding: 0 8px; font-size: .78rem; color: var(--ink-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ab-head .ab-seg { margin-bottom: 0; }
/* Vollbild: eigene Ebene, der Ablauf füllt den Rest; die Spaltenköpfe bleiben im Scrollbereich oben stehen */
.ab-full { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; background: var(--surface); }
.ab-full-title { min-width: 0; padding-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-full-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); }
.ab-full-body > * { flex-shrink: 0; }
.ab-full-body > .ab-scroll { flex: 1 1 auto; min-height: 0; max-height: none; }
body.ab-noscroll { overflow: hidden; }
/* Werte eines Schritts */
.ab-vals-btn { background: none; border: 0; padding: 0; margin-top: 4px; font: inherit; font-size: .78rem; color: var(--accent-ink); cursor: pointer; }
.ab-vals-btn:hover { text-decoration: underline; }
.ab-val-list { display: grid; gap: 2px; margin-top: 3px; font-size: .8rem; overflow-wrap: anywhere; }
.ab-val-k { color: var(--muted); }
.ab-val-old { color: var(--muted); text-decoration: line-through; }
.ab-summary { grid-column: 1 / -1; font-size: .82rem; color: var(--muted); padding: 0 4px 4px; }

/* ---------- fallakte: Dokumente je Runde ---------- */
.ab-seg { display: inline-flex; margin-bottom: 10px; }
/* Kompakt statt volle Breite: Namen stehen nah an ihren Versionen; Rundenspalten gleich breit, mit feinen Trennlinien */
.ab-matrix { width: auto; }
.ab-matrix th, .ab-matrix td { white-space: nowrap; }
.ab-matrix .ab-doc { max-width: 300px; min-width: 160px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.ab-matrix .ab-doc.ab-in { padding-left: 24px; }
/* Beim waagerechten Scrollen bleibt die Dokumentspalte stehen */
.ab-matrix .ab-doc { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.ab-matrix .ab-cell { text-align: center; min-width: 72px; border-left: 1px solid var(--line-soft); }
.ab-matrix th { vertical-align: bottom; }
.ab-matrix th.ab-cell { padding: 6px 4px; }
.ab-matrix .ab-now-col { border-left: 2px solid var(--line); background: var(--surface-2); }
.ab-rh { display: flex; align-items: center; justify-content: center; gap: 2px; color: var(--ink); }
.ab-rd { font-size: .74rem; font-weight: 400; color: var(--muted); }
.ab-zip { width: 22px; height: 22px; font-size: 13px; }
.ab-docrow:hover td { background: var(--accent-soft, var(--surface-2)); }
.ab-folder td { font-weight: 600; background: var(--surface-2); padding-top: 8px; }
.ab-matrix-note { margin-top: 8px; }
.ab-folder-name { position: sticky; left: 8px; }
@media (max-width: 600px) { .ab-matrix .ab-doc { min-width: 110px; max-width: 150px; } .ab-matrix .ab-cell { min-width: 64px; } }
.ab-v { display: inline-block; margin: 1px 2px; padding: 0 7px; border-radius: 99px; font-size: .8rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); }
.ab-v:hover { border-color: var(--accent); text-decoration: none; }
.ab-v.ab-ext { background: var(--signal-soft); border-color: var(--signal); }

/* ---------- fallakte: Akte (Notizen, Suche, Ablegen, Vorschau) ---------- */
.akte-note { color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; max-width: 60ch; margin-top: 2px; }
.akte-hit > td { background: var(--accent-soft); }
.akte-ext { margin-left: 4px; }
.akte-folder { border-radius: var(--radius-s); }
.akte-drop, tr.akte-drop > td { outline: 2px dashed var(--accent); outline-offset: -2px; background: var(--accent-soft); }
.akte-search input[type=search] { max-width: 480px; }
.akte-pv { user-select: text; -webkit-user-select: text; touch-action: auto; }
.akte-pv-versions { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.akte-pv-v { border: 0; border-radius: 999px; padding: 2px 9px; background: rgba(255, 255, 255, .12); color: #fff; font: inherit; font-size: .85rem; cursor: pointer; }
.akte-pv-v:hover { background: rgba(255, 255, 255, .24); }
.akte-pv-v.active { background: #fff; color: #10151c; }
.akte-pv-note { flex: none; padding: 0 14px 8px; white-space: pre-line; opacity: .85; max-height: 5.5em; overflow-y: auto; }
.akte-pv-stage { position: relative; flex: 1; min-height: 0; display: flex; padding: 0 68px 20px; }
.akte-pv-content { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; }
.akte-pv-content iframe { width: 100%; height: 100%; border: 0; border-radius: 4px; background: #fff; }
.akte-pv-content img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.akte-pv-none { text-align: center; }
.akte-pv-sha code { word-break: break-all; user-select: all; }
@media (max-width: 640px) { .akte-pv-stage { padding: 0 4px 12px; } }
.akte-meta { color: var(--muted, #667); margin-top: 2px; }
.meta-defs { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.meta-def { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto 1.4fr auto; gap: 6px; align-items: center; }
.meta-def .hidden { display: none; }
