[hidden] { display: none !important; }
:root {
  --bg: #15171a;
  --bg2: #1d2024;
  --bg3: #262a2f;
  --line: #33383f;
  --text: #e4e6e8;
  --muted: #8d949c;
  --accent: #e8b33a;
  --accent2: #46d36b;
  --danger: #e5534b;
  --warn: #e3a33a;
  --ok: #46d36b;
  --radius: 6px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 13px/1.4 var(--font); overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.spacer { flex: 1; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--bg3); color: var(--muted); font-size: 11px; text-align: center; font-weight: 600; }

.btn { background: var(--bg3); border: 1px solid var(--line); border-radius: var(--radius); padding: 5px 11px; cursor: pointer; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: #4a515a; background: #2d3238; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.sm { padding: 2px 8px; }
.btn.primary { background: var(--accent); color: #17140b; border-color: var(--accent); font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: #f2c457; }
.btn.danger { border-color: #6e2c29; color: #ff8d86; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.topbar { height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; letter-spacing: .2px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.logo-dot { width: 14px; height: 14px; border-radius: 3px; background: var(--accent); box-shadow: inset 0 0 0 3px #15171a, inset 0 0 0 5px var(--accent); }
#projektwahl { background: var(--bg3); border: 1px solid var(--line); border-radius: var(--radius); padding: 5px 8px; max-width: 260px; }
.toolgroup { display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-left: 8px; }
.tool { background: transparent; border: 0; border-right: 1px solid var(--line); padding: 6px 11px; cursor: pointer; color: var(--muted); }
.tool:last-child { border-right: 0; }
.tool:hover { color: var(--text); background: var(--bg3); }
.tool.active { color: #17140b; background: var(--accent); font-weight: 600; }
.tool-befund.active { background: #ff7b54; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: 36px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); min-width: 230px; z-index: 50; padding: 4px; box-shadow: 0 8px 24px #0008; }
.menu-pop a, .menu-pop button { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; background: none; color: var(--text); text-decoration: none; cursor: pointer; border-radius: 4px; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--bg3); }

.layout { position: absolute; top: 46px; bottom: 26px; left: 0; right: 0; display: grid; grid-template-columns: 250px minmax(0, 1fr) 6px var(--rechts, 420px); }
.panel { background: var(--bg2); overflow: auto; }
.panel.left { border-right: 1px solid var(--line); }
.panel.right { border-left: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.panel section { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.panel h3 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.row { display: flex; align-items: center; gap: 8px; padding: 2px 0; cursor: pointer; }
.row.sub { padding-left: 24px; color: var(--muted); }
.row input[type=range] { flex: 1; }
.liste { display: flex; flex-direction: column; gap: 4px; }
.eintrag { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; padding: 5px 6px; border-radius: 4px; cursor: pointer; border: 1px solid transparent; }
.eintrag:hover { background: var(--bg3); }
.eintrag.sel { border-color: var(--accent); }
.eintrag .nr { font-weight: 700; color: #17140b; background: #ff7b54; border-radius: 3px; padding: 0 5px; font-size: 11px; }
.eintrag .nr.m { background: #6cc7ff; }
.eintrag .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eintrag .x { opacity: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.eintrag:hover .x { opacity: 1; }
.eintrag .wert { font-family: var(--mono); font-size: 11px; color: var(--muted); grid-column: 2 / 4; }
.prio-hoch { color: #ff8d86; } .prio-mittel { color: var(--warn); } .prio-niedrig { color: var(--muted); }

.center { position: relative; overflow: hidden; background: radial-gradient(ellipse at 50% 30%, #2b3138, #121417 70%); }
#viewport { position: absolute; inset: 0; outline: none; }
#viewport canvas { display: block; }
#viewport .vp { position: absolute; inset: 0; }
#vp-cesium .cesium-widget, #vp-cesium .cesium-widget canvas { width: 100%; height: 100%; }
.typwahl { gap: 18px; margin: 4px 0 8px; }
#viewport.cursor-pick { cursor: crosshair; }
#labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.lbl { position: absolute; left: 0; top: 0; will-change: transform; background: #000b; color: #fff; padding: 1px 6px; border-radius: 3px; font: 11px var(--mono); white-space: nowrap; }
.lbl.befund { background: #ff7b54; color: #17140b; font-weight: 700; pointer-events: auto; cursor: pointer; }
.lbl.befund::after { pointer-events: none; content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -4px; border: 4px solid transparent; border-top-color: #ff7b54; border-bottom: 0; }
.lbl.mess { background: #0d3b57e0; color: #bfe7ff; }
.hinweis { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); background: #000c; padding: 6px 14px; border-radius: 16px; font-size: 12px; pointer-events: none; }
.leer { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; color: var(--muted); }
.leer h2 { color: var(--text); font-weight: 600; margin-bottom: 6px; }
.leer p { max-width: 480px; }
.lade { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); width: 360px; background: #000c; padding: 14px; border-radius: 8px; }
.bar { height: 6px; background: var(--bg3); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.bar > div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }

.fotos-kopf { padding: 10px 12px 8px; border-bottom: 1px solid var(--line); }
.fotos-steuer { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.fotos-steuer label { display: flex; align-items: center; gap: 6px; flex: 1; color: var(--muted); }
.fotos-steuer input[type=range] { flex: 1; }
.fotoraster { flex: 1; overflow: auto; padding: 8px; display: grid; gap: 6px; align-content: start; grid-auto-rows: max-content; grid-template-columns: repeat(var(--spalten, 2), 1fr); }
.kachel { position: relative; aspect-ratio: 1; align-self: start; min-height: 0; min-width: 0; background: #0d0e10; border-radius: 4px; overflow: hidden; cursor: pointer; border: 1px solid var(--line); }
.kachel:hover { border-color: var(--accent); }
.kachel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.kachel .kreuz { position: absolute; inset: 0; pointer-events: none; }
.kachel.ohne .kreuz { display: none; }
.kachel .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 5px; background: linear-gradient(transparent, #000d); font-size: 10.5px; display: flex; justify-content: space-between; gap: 4px; }
.kachel .cap .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kachel.verdeckt { opacity: .55; }
.kachel.verdeckt::before { content: "verdeckt?"; position: absolute; top: 4px; left: 4px; background: var(--danger); color: #fff; font-size: 10px; padding: 0 4px; border-radius: 3px; z-index: 1; }
.kachel .fehlt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted); font-size: 11px; padding: 8px; }

.statusbar { position: absolute; bottom: 0; left: 0; right: 0; height: 26px; background: var(--bg2); border-top: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 12px; font-size: 12px; }
#status-koord { font-family: var(--mono); }
.st-ok { color: var(--ok); } .st-warnung { color: var(--warn); } .st-fehler { color: var(--danger); font-weight: 700; }

.betrachter { position: fixed; inset: 0; background: #0b0c0dee; z-index: 40; display: flex; flex-direction: column; }
.bt-kopf { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg2); border-bottom: 1px solid var(--line); }
#bt-canvas { flex: 1; width: 100%; min-height: 0; cursor: grab; display: block; }
#bt-canvas.pick { cursor: crosshair; }
.bt-fuss { padding: 4px 12px; background: var(--bg2); }

dialog { background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; width: min(560px, 94vw); box-shadow: 0 20px 60px #000a; }
dialog::backdrop { background: #0009; }
dialog h2 { margin: 0 0 10px; font-size: 17px; }
dialog label { display: flex; flex-direction: column; gap: 3px; margin: 8px 0; color: var(--muted); font-size: 12px; }
dialog input, dialog select, dialog textarea { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 9px; color: var(--text); font-size: 13px; }
dialog textarea { resize: vertical; }
dialog menu { display: flex; gap: 8px; justify-content: flex-end; padding: 0; margin: 16px 0 0; }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fehler { background: #3a1716; border: 1px solid #6e2c29; color: #ffb3ae; padding: 8px 10px; border-radius: var(--radius); margin-top: 8px; white-space: pre-wrap; }
.befund-bilder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 6px; }
.befund-bilder img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; border: 1px solid var(--line); }
.pruef-tab { width: 100%; border-collapse: collapse; }
.pruef-tab td { border-bottom: 1px solid var(--line); padding: 5px 4px; vertical-align: top; }
.pruef-tab td:first-child { color: var(--muted); width: 38%; }

.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); background: #000e; border: 1px solid var(--line); padding: 9px 16px; border-radius: 8px; z-index: 100; max-width: 70vw; box-shadow: 0 8px 30px #000a; }
.toast.fehler-t { border-color: var(--danger); color: #ffb3ae; }

@media (max-width: 1200px) { .layout { grid-template-columns: 210px minmax(0, 1fr) 6px var(--rechts, 340px); } .toolgroup .tool { padding: 6px 7px; } }

/* Kontrollpunkte */
h3 .rechts { float: right; margin-top: -3px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.eintrag .nr.kp { background: #3ad1c9; }
.kp-aktiv { border: 1px solid #3ad1c9; border-radius: 6px; padding: 8px; margin: 6px 0; background: #3ad1c912; }
.kp-aktiv p { margin: 6px 0; }
.row.gap { gap: 6px; display: flex; align-items: center; }
.lbl.kp { background: #3ad1c9; color: #06201f; font-weight: 700; pointer-events: auto; cursor: pointer; }
.bt-kp { color: #3ad1c9; font-weight: 600; margin-right: 8px; }
.bt-kp.primary { background: #3ad1c9; border-color: #3ad1c9; color: #06201f; }
.kachel.gemessen { border-color: #3ad1c9; box-shadow: inset 0 0 0 2px #3ad1c9; }
.kachel.gemessen::after { content: "◎ gemessen"; position: absolute; top: 4px; right: 4px; background: #3ad1c9; color: #06201f; font-size: 10px; padding: 0 4px; border-radius: 3px; }
.kp-gut { color: var(--ok); } .kp-mittel { color: var(--warn); } .kp-schlecht { color: var(--danger); }
#kp-stat { margin-top: 6px; line-height: 1.5; }

/* Anmeldung */
.login-seite { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { width: min(360px, calc(100vw - 32px)); background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.login-box label { display: flex; flex-direction: column; gap: 4px; }
.login-box code { font-size: 11px; }
fieldset.zugang { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
fieldset.zugang legend { padding: 0 4px; color: var(--muted); font-size: 12px; }

/* Ordner-/Dateiauswahl */
.pfadwahl { display: flex; gap: 6px; }
.pfadwahl input { flex: 1; min-width: 0; }
.dlg-auswahl { width: min(760px, calc(100vw - 32px)); }
.aw-pfad { display: flex; gap: 6px; margin-bottom: 8px; }
.aw-pfad input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; }
.aw-zuletzt { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 8px; }
.aw-zul { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 11px; }
.aw-liste { height: min(52vh, 420px); overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: 4px; background: var(--bg); }
.aw-eintrag { display: grid; grid-template-columns: 22px 1fr auto; gap: 6px; align-items: center; padding: 4px 6px; border-radius: 4px; cursor: pointer; user-select: none; }
.aw-eintrag:hover { background: var(--bg3); }
.aw-eintrag.sel { background: #e8b33a33; outline: 1px solid var(--accent); }
.aw-eintrag .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aw-eintrag .b { font-size: 11px; color: var(--muted); }
.aw-eintrag.terra .b { color: #17140b; background: var(--accent); border-radius: 3px; padding: 0 5px; font-weight: 600; }
.terra-pruefung { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; margin: 2px 0 8px; line-height: 1.6; }
#aw-info { min-height: 2.6em; margin: 6px 0 0; overflow: hidden; text-overflow: ellipsis; } /* feste Höhe: kein Verspringen zwischen zwei Klicks */

/* Fortschritt in Prozent */
.prozent { font-variant-numeric: tabular-nums; font-weight: 700; }
#lade .prozent { text-align: center; margin-top: 6px; font-size: 18px; }
.fortschritt-zeile { display: flex; align-items: center; gap: 10px; }
.fortschritt-zeile .bar { flex: 1; margin-top: 0; height: 10px; }
.status-fortschritt { display: inline-flex; align-items: center; gap: 8px; }
.sb-bar { width: 160px; height: 8px; background: var(--bg3); border-radius: 4px; overflow: hidden; display: inline-block; }
.sb-bar > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
#sb-text { color: var(--muted); max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel.left { overflow-x: hidden; }

/* Firmenlogo (Fernerkundung Krauleidis) – erscheint, sobald static/img/logo.png vorhanden ist */
.firmenlogo { height: 34px; width: auto; max-width: 160px; object-fit: contain; background: #fff; border-radius: 5px; padding: 2px 6px; box-sizing: border-box; margin-right: 4px; }
.brand.mit-logo .logo-dot { display: none; }
.brand-text { display: inline-flex; flex-direction: column; line-height: 1.05; }
.brand-text small { font-size: 9.5px; font-weight: 500; color: var(--muted); letter-spacing: .3px; }
.login-box .firmenlogo { height: 64px; max-width: 260px; padding: 4px 10px; }

/* Verschiebbare Trennbalken zwischen den Bereichen */
.teiler { cursor: col-resize; background: var(--bg2); position: relative; z-index: 3; touch-action: none; }
.teiler::after { content: ""; position: absolute; top: 50%; left: 1.5px; width: 3px; height: 36px; margin-top: -18px; border-radius: 2px; background: var(--line); }
.teiler:hover, .teiler.aktiv { background: #e8b33a55; }
.teiler:hover::after, .teiler.aktiv::after { background: var(--accent); }
body.ziehen, body.ziehen * { cursor: col-resize !important; user-select: none !important; }
body.ziehen #viewport, body.ziehen iframe { pointer-events: none; }

/* Startbildschirm */
.start { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 35%, #2b3138ee, #0d0f12f5 70%); transition: opacity .5s; cursor: pointer; }
.start.weg { opacity: 0; pointer-events: none; }
.start-box { text-align: center; padding: 30px 48px 22px; border-radius: 14px; background: #fff; color: #1d2a36; min-width: min(560px, 90vw); box-shadow: 0 20px 60px #0009; }
.start-logo { height: 150px !important; max-width: 400px !important; margin: 0 auto 10px; display: block; padding: 0 !important; }
.start-titel { font-size: 34px; font-weight: 800; letter-spacing: .5px; color: #3070ae; }
.start-unter { font-size: 17px; margin-top: 4px; color: #1d2a36; font-weight: 600; }
.start-firma { font-size: 14px; margin-top: 2px; color: #5c7a12; font-weight: 600; }
.start-box .muted { color: #5b6672 !important; }
.start-info { margin-top: 18px; border-top: 3px solid #9dc418; padding-top: 12px; }
.start-hinweis { margin-top: 6px; opacity: .7; }

/* Kundenfreigaben */
.gast-hinweis { background: #24331a; border: 1px solid #4b6b2a; color: #cfe7b0; border-radius: 14px; padding: 3px 12px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.dlg-freigaben { width: min(720px, calc(100vw - 32px)); }
.fg-liste table { width: 100%; border-collapse: collapse; margin: 6px 0 10px; }
.fg-liste th, .fg-liste td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.fg-liste th { color: var(--muted); font-weight: 600; }
.fg-liste .aus td { color: var(--muted); text-decoration: line-through; }
.fg-neu { margin-top: 12px; padding: 10px 12px; border: 1px solid #4b6b2a; background: #1c2716; border-radius: var(--radius); }
.fg-neu .pfadwahl { display: flex; gap: 6px; margin-top: 6px; }
.fg-neu input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; }

/* ---------- Aufbau ab 0.5.0: Kopfzeile, Ebenenbaum, schwebende Werkzeugleiste (Vorbild: geteilte Ansicht von PIX4Dcloud) */
.topbar { height: 48px; }
.layout { top: 48px; grid-template-columns: 300px minmax(0, 1fr) 6px var(--rechts, 420px); }
@media (max-width: 1200px) { .layout { grid-template-columns: 240px minmax(0, 1fr) 6px var(--rechts, 340px); } }
.kopf-trenner { width: 1px; height: 22px; background: var(--line); }
#projektwahl { background: transparent; border-color: transparent; font-size: 15px; font-weight: 600; max-width: 38vw; padding: 5px 6px; cursor: pointer; }
#projektwahl:hover, #projektwahl:focus { background: var(--bg3); border-color: var(--line); }
#projektwahl option { font-weight: 400; font-size: 13px; background: var(--bg2); }
.projekt-titel { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38vw; }

/* Ebenenbaum */
.panel-kopf { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; font-size: 14px; font-weight: 600; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg2); z-index: 2; }
.pk-symbol { color: var(--muted); font-size: 15px; }
#links details > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px 0 6px; cursor: pointer; user-select: none; }
#links details > summary::-webkit-details-marker { display: none; }
#links details > summary::before { content: "▸"; width: 12px; color: var(--muted); font-size: 11px; text-align: center; flex: none; transition: transform .12s; }
#links details[open] > summary::before { transform: rotate(90deg); }
#links details > summary:hover, .ebene-zeile:hover { background: #ffffff0a; }
.gruppe { border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.gruppe > summary { font-weight: 600; }
.g-name { flex: 1; }
.gruppe > .ebene, .gruppe > .ebene-zeile { margin-left: 14px; }
.ebene-zeile { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px 0 26px; cursor: pointer; }
.e-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#links input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--accent); flex: none; margin: 0; cursor: pointer; }
.ebene > .liste, .ebene > .kp-aktiv, .ebene > #kp-stat { margin: 2px 8px 8px 26px; }
.ebene > .row.sub { padding: 2px 10px 6px 26px; }
.ebene .liste p { margin: 2px 0 4px; }
#links .btn.sm.rechts { margin-left: 4px; font-size: 11px; }

/* Werkzeugleiste über dem Modell */
.werkzeugleiste { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 5; margin: 0; padding: 4px; gap: 2px;
  background: #1d2024f2; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 22px #0009; overflow: visible; max-width: calc(100% - 24px); }
.werkzeugleiste .tool { border: 0; border-radius: 7px; padding: 7px 12px; white-space: nowrap; }
.werkzeugleiste .tool:last-child { border: 0; }
.wz-trenner { width: 1px; margin: 4px 3px; background: var(--line); flex: none; }
@media (max-width: 1200px) { .werkzeugleiste .tool { padding: 7px 8px; } }

/* Statuszeile */
.status-zugriff { color: #cfe7b0; }

/* Ebenenbaum „Ergebnisse“ (ab 0.7.0 aus den Ebenen des Projekts aufgebaut) */
#ebenen-ergebnisse .ebene-zeile, #ebenen-ergebnisse .ebene { margin-left: 14px; }
#ebenen-ergebnisse .ebenen-leer { margin: 4px 10px 6px 40px; }
.stand-kopf { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 10px 0 26px; margin-left: 14px; color: var(--muted);
  font-size: 12px; letter-spacing: .03em; border-top: 1px solid var(--line); cursor: pointer; }
.stand-kopf:first-child { border-top: 0; }
.stand-kopf .s-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stand-kopf .s-nur { flex: none; padding: 1px 8px; font-size: 12px; }
.stand-kopf.aktiv .s-nur { visibility: hidden; }
.stand-kopf.aktiv .s-name { color: var(--text, #e6e8ea); font-weight: 600; }
.ebene-zeile .e-name, .ebene > summary .e-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ebene-zeile .e-art { color: var(--muted); font-size: 11px; white-space: nowrap; }
.ebene-zeile .e-weg { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px 4px; font-size: 13px; visibility: hidden; }
.ebene-zeile:hover .e-weg, .ebene-zeile .e-weg:focus-visible { visibility: visible; }
.ebene-zeile .e-weg:hover { color: #ff7b54; }
.ebene-zeile.aus .e-name { color: var(--muted); text-decoration: line-through; }
body.gast .ebene-zeile .e-weg { display: none; }
#eb-fortschritt .bar { height: 6px; background: #ffffff14; border-radius: 3px; overflow: hidden; margin: 8px 0 4px; }
#eb-fortschritt .bar > div { height: 100%; width: 0; background: var(--accent, #e8b33a); transition: width .4s; }

/* Stufe 6: Schäden im Foto einzeichnen, Bewertung nach DIN 1076 (ab 0.14.0) */
.bt-zeichnen { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 6px 12px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.bt-zeichnen[hidden] { display: none; }
.bz-titel { color: #ffd23f; font-weight: 600; margin-right: 4px; }
.bz-trenner { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; }
.bt-zeichnen .btn.aktiv { background: #ffd23f; border-color: #ffd23f; color: #201a00; }
.befund-din { margin: 8px 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; }
.befund-din summary { cursor: pointer; font-size: 13px; }
.befund-din p { margin: 6px 0 2px; }
.befund-stufen { margin: 6px 0 2px; } .befund-stufen div { margin: 2px 0; } .befund-stufen .warnung { color: var(--warn); }
.drei { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.befund-marken { margin: 8px 0 2px; color: var(--muted); }
.befund-marken b { color: var(--text); font-weight: 600; }
.eintrag.aktiv { border-color: #ffd23f; }
.eintrag .svd { color: var(--text); }
/* Rechnerische Zustandsnote unter der Befundliste (ab 0.15.0) */
.zustandsnote { margin: 6px 0 2px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius); }
.zustandsnote .zn-kopf b { font-size: 15px; }
.zustandsnote details { margin: 3px 0; } .zustandsnote summary { cursor: pointer; }
.zustandsnote details div { margin: 2px 0 2px 12px; }
@media (max-width: 560px) { .drei { grid-template-columns: 1fr; } }

/* Hinweis des Betreibers zu Datenstandort und Schutz (Anmeldeseite, Kundenansicht) – ab 0.15.1 */
.betrieb { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 2px; }
.betrieb h2 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 8px; color: #cfe7b0; }
.betrieb svg, .schutz-knopf svg { width: 18px; height: 18px; fill: #9dc418; flex: none; }
.betrieb ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; line-height: 1.4; }
.betrieb ul li::marker { color: #9dc418; }
.betrieb p { margin: 10px 0 0; }
.betrieb a { color: #8fb9e0; }
.dlg-schutz { width: min(460px, 94vw); }
/* Volumen von Haufwerken (ab 0.16.0) */
.dlg-volumen { width: min(600px, 94vw); }
.vol-ergebnis { margin: 0 0 12px; min-height: 3em; }
.vol-ergebnis.fehler { color: var(--danger); }
.vol-wert { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.vol-ergebnis dl { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 0; font-size: 13px; }
.vol-ergebnis dt { color: var(--muted); } .vol-ergebnis dd { margin: 0; }
.vol-hinweis { color: var(--warn); margin: 6px 0 0; }
/* Zeitvergleich in 3D und Standbild (ab 0.23.0) */
.dlg-vergleich { width: min(1280px, 97vw); height: min(860px, 94vh); padding: 0; overflow: hidden; }
.dlg-vergleich[open] { display: flex; flex-direction: column; }
.vg-kopf { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.vg-kopf h2 { margin: 0; }
.vg-buehne { position: relative; flex: 1; min-height: 0; background: radial-gradient(ellipse at 50% 45%, #34404f 0%, #12171d 75%); overflow: hidden; }
#vg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.vg-linien { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.vg-linien line { stroke-width: 2; } .vg-linien .a { stroke: #dfeaff; fill: #dfeaff; } .vg-linien .b { stroke: #ffd166; fill: #ffd166; }
.vg-marke, .vg-diff { position: absolute; background: #10141ad9; border: 2px solid; border-radius: 8px; padding: 8px 12px; pointer-events: none; max-width: 46%; }
.vg-marke.a { left: 3%; top: 16%; border-color: #dfeaff; }
.vg-marke.b { right: 3%; bottom: 9%; border-color: #ffd166; }
.vg-diff { left: 50%; top: 3%; transform: translateX(-50%); text-align: center; }
.vg-diff.ab { border-color: #4aa3ff; } .vg-diff.auf { border-color: #ff9f43; }
.vg-m-datum { font-weight: 700; font-size: 15px; color: #e8edf3; }
.vg-m-wert { font-weight: 700; font-size: 24px; color: #fff; line-height: 1.25; }
.vg-d-wert { font-weight: 800; font-size: 30px; line-height: 1.2; }
.vg-diff.ab .vg-d-wert { color: #6db6ff; } .vg-diff.auf .vg-d-wert { color: #ffb469; }
.vg-m-klein { font-size: 12px; color: #aeb7c2; }
.vg-skala { position: absolute; left: 3%; bottom: 4%; display: flex; align-items: center; gap: 8px; font-size: 12px; color: #c9d1da; pointer-events: none; }
.vg-skala i { width: 160px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, #1228aa, #46aaeb 46%, #ffffff22 50%, #fad63c 54%, #d0241c); }
.vg-lade { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #c9d1da; font-size: 15px; padding: 20px; text-align: center; }
.vg-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.vg-tage { display: flex; flex-wrap: wrap; gap: 4px; }
.vg-tag.active { background: var(--accent); color: #1a1a1a; border-color: var(--accent); font-weight: 700; }
dialog label.vg-opt { flex-direction: row; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: var(--text); }
.vg-opt input { width: auto; margin: 0; } .vg-opt select { padding: 3px 6px; }
.vg-frei { flex: 1; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; color: var(--text); }
.vol-reihe { display: block; width: 100%; margin: 12px 0 4px; border-radius: 6px; background: #fff; cursor: zoom-in; }
@media (max-width: 700px) { .vg-marke, .vg-diff { padding: 5px 8px; } .vg-m-wert { font-size: 17px; } .vg-d-wert { font-size: 20px; } .vg-skala i { width: 90px; } }
/* Grenzlinie aus einer Datei (ab 0.21.0): Auswahl, wenn die Datei mehrere Flächen enthält */
.dlg-umring { width: min(520px, 94vw); }
.umring-liste { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; margin-bottom: 12px; }
.umring-liste .btn { text-align: left; white-space: normal; }
/* übernommene Haufwerke (ab 0.18.0): maßgeblicher Wert oben, eigene Nachrechnung darunter */
.vol-fremd { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.vol-fremd .klein, .vol-zwischen { color: var(--muted); font-size: 13px; }
.vol-zwischen { margin: 0 0 2px; }
.vol-wert.nach { font-size: 19px; }
/* Zeitvergleich (ab 0.17.0) */
#vol-verlauf-zeile, #vol-boden-zeile { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 8px 0; }
#vol-verlauf-zeile[hidden], #vol-boden-zeile[hidden], #vol-vorrang-zeile[hidden] { display: none; }
#vol-verlauf-zeile input, #vol-boden-zeile input { width: auto; margin: 0; flex: none; }
/* Projektübersicht (ab 0.28.0): Startseite ohne geöffnetes Projekt – Kacheln mit Vorschaubild oder Liste */
.leer.mit-uebersicht { justify-content: flex-start; align-items: stretch; text-align: left; padding: 18px 22px 28px; overflow: auto; color: var(--text); z-index: 6; background: var(--bg); }
.uebersicht[hidden], #leer-hinweis[hidden] { display: none; }
/* ohne geöffnetes Projekt gehört die ganze Breite der Übersicht – Ebenen- und Fotoleiste hätten nichts zu zeigen */
body.uebersicht-offen .layout { grid-template-columns: minmax(0, 1fr); }
body.uebersicht-offen .layout > .panel, body.uebersicht-offen .layout > .teiler { display: none; }
body.uebersicht-offen .leer.mit-uebersicht { padding: 22px max(22px, calc((100% - 1500px) / 2)) 30px; }
.ue-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.ue-kopf h2 { margin: 0 6px 0 0; font-size: 19px; }
.ue-kopf input[type="search"] { width: min(280px, 100%); padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg2); }
.ue-kopf select { padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg2); }
.ue-art { display: flex; }
.ue-art .btn { border-radius: 0; }
.ue-art .btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.ue-art .btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; margin-left: -1px; }
.ue-art .btn[aria-pressed="true"] { background: var(--accent); color: #1a1a1a; border-color: var(--accent); }
.ue-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.ue-karte { display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); cursor: pointer; overflow: hidden;
  transition: border-color .12s, transform .12s, box-shadow .12s; }
.ue-karte:hover, .ue-karte:focus-visible { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .35); outline: none; }
.ue-bild { display: block; position: relative; aspect-ratio: 3 / 2; background: #1d2024; }
.ue-bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ue-platzhalter { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 12px; text-align: center; padding: 10px; }
.ue-platzhalter b { font-size: 40px; font-weight: 400; line-height: 1; opacity: .55; }
.ue-art-marke { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 10px; background: rgba(21, 23, 26, .82); color: var(--text); font-size: 11px; }
.ue-warn { position: absolute; right: 8px; top: 8px; padding: 2px 7px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11px; }
.ue-text { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; min-width: 0; }
.ue-name { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ue-zeile { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ue-marken { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.ue-marken span { padding: 1px 7px; border-radius: 9px; background: var(--bg3); color: var(--muted); font-size: 11px; }
.ue-marken span.an { color: var(--text); }
.ue-tabelle-rahmen { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.ue-tabelle { width: 100%; border-collapse: collapse; font-size: 13px; }
.ue-tabelle th { text-align: left; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; background: var(--bg2); }
.ue-tabelle th.zahl, .ue-tabelle td.zahl { text-align: right; }
.ue-tabelle td { padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.ue-tabelle tr:last-child td { border-bottom: 0; }
.ue-tabelle tbody tr { cursor: pointer; }
.ue-tabelle tbody tr:hover, .ue-tabelle tbody tr:focus-visible { background: var(--bg3); outline: none; }
.ue-tabelle .ue-mini { width: 60px; height: 40px; border-radius: 4px; object-fit: cover; display: block; background: #1d2024; }
.ue-tabelle .ue-mini.leer-bild { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 18px; }
.ue-tabelle td.name { font-weight: 600; max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.ue-keine { color: var(--muted); padding: 30px 0; text-align: center; }

/* Zeitleiste über der 3D-Ansicht (ab 0.26.0): je Aufnahme ein Punkt mit Datum, in zeitlicher Folge */
.zeitleiste { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 6px;
  max-width: calc(100% - 130px); padding: 6px 8px; background: rgba(29, 32, 36, .93); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .35); }
.zeitleiste[hidden] { display: none; }
.zeitleiste .zl-knopf { border: 1px solid var(--line); background: var(--bg3); border-radius: 7px; min-width: 30px; height: 30px; padding: 0 8px; cursor: pointer; flex: none; }
.zeitleiste .zl-knopf:hover { border-color: var(--accent); }
.zeitleiste .zl-knopf.laeuft { background: var(--accent); color: #1a1a1a; border-color: var(--accent); }
.zeitleiste .zl-spur { position: relative; display: flex; align-items: flex-start; gap: 4px; overflow-x: auto; scrollbar-width: thin; padding: 0 4px; }
.zeitleiste .zl-spur::before { content: ""; position: absolute; left: 30px; right: 30px; top: 9px; height: 2px; background: var(--line); }
.zeitleiste .zl-tag { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 76px; padding: 2px 6px 3px; border: 0; background: none;
  cursor: pointer; color: var(--muted); font-size: 11.5px; white-space: nowrap; border-radius: 7px; }
.zeitleiste .zl-tag::before { content: ""; width: 12px; height: 12px; margin-top: 2px; border-radius: 50%; background: var(--bg2); border: 2px solid var(--muted); position: relative; z-index: 1; }
.zeitleiste .zl-tag:hover { color: var(--text); }
.zeitleiste .zl-tag:hover::before { border-color: var(--text); }
.zeitleiste .zl-tag.aktiv { color: var(--accent); font-weight: 600; }
.zeitleiste .zl-tag.aktiv::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(232, 179, 58, .22); }
.zeitleiste .zl-tag.laedt::before { animation: zl-puls 0.9s ease-in-out infinite; }
@keyframes zl-puls { 50% { transform: scale(1.45); } }
.zeitleiste .zl-abstand { font-size: 10px; color: var(--muted); font-weight: 400; }

/* Wahl „als Geländemodell einlesen“ (ab 0.26.0): Kästchen links, Erklärung daneben */
dialog label.gelaende-wahl { display: flex; flex-direction: row; align-items: flex-start; gap: 8px; margin: 10px 0; }
dialog label.gelaende-wahl input { width: auto; margin: 3px 0 0; flex: none; }
.vol-verlauf { width: 100%; border-collapse: collapse; margin: 10px 0 2px; font-size: 13px; }
.vol-verlauf caption { text-align: left; color: var(--muted); padding-bottom: 3px; }
.vol-verlauf th { text-align: left; font-weight: 400; color: var(--muted); padding: 2px 8px 2px 0; }
.vol-verlauf td { padding: 3px 8px 3px 0; border-top: 1px solid var(--line); vertical-align: top; }
.vol-verlauf tr.aktiv td:first-child { font-weight: 700; }
.vol-verlauf .balken { height: 5px; margin-top: 3px; border-radius: 2px; background: #7a9a3a; min-width: 1px; }
.vol-verlauf .plus { color: var(--ok); } .vol-verlauf .minus { color: #ff8d86; } .vol-verlauf .klein { color: var(--muted); font-size: 12px; }
@media (max-width: 560px) { .vol-ergebnis dl { grid-template-columns: 1fr; gap: 0; } .vol-ergebnis dd { margin-bottom: 5px; } }
.dlg-schutz .betrieb { border-top: 0; padding-top: 0; }
.schutz-knopf { display: inline-flex; align-items: center; gap: 6px; background: #24331a; border: 1px solid #4b6b2a; color: #cfe7b0; border-radius: 14px; padding: 3px 12px 3px 8px; font: inherit; font-size: 12px; white-space: nowrap; cursor: pointer; }
.schutz-knopf:hover { background: #2c3f1f; }
.schutz-knopf svg { width: 15px; height: 15px; }
