/* Aufmaß – Oberfläche (Designvorschlag 27.10.2026) */
:root {
  --grund: #F4F5F7;
  --flaeche: #FFFFFF;
  --flaeche-2: #F8F9FB;
  --linie: #E1E4EA;
  --linie-stark: #D5DAE2;
  --text: #14171C;
  --text-2: #3B4350;
  --text-3: #5A6270;
  --akzent: #1E56C8;
  --akzent-dunkel: #163F94;
  --akzent-hell: #E8EEFB;
  --rail: #14171C;
  --rail-hover: #232833;
  --rail-aktiv: #2B3342;
  --rail-text: #A9B1BE;
  --ok-bg: #E7F5EC; --ok-fg: #14532D; --ok-punkt: #15803D;
  --info-bg: #E8EEFB; --info-fg: #163F94; --info-punkt: #1E56C8;
  --warn-bg: #FDF1E3; --warn-fg: #7A3A00; --warn-punkt: #B45309;
  --fehler-bg: #FDECEC; --fehler-fg: #8A1C1C;
  --radius: 12px;
  --schrift: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--schrift); color: var(--text); background: var(--grund); font-size: 15px; line-height: 1.45; }
a { color: var(--akzent); }
a:hover { color: var(--akzent-dunkel); }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
.unsichtbar { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Grundlayout ---------- */
.app { display: flex; flex-wrap: wrap; min-height: 100vh; }
.rail { flex: 1 1 92px; background: var(--rail); padding: 16px 12px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.rail-gruppe { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.logo { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 10px; background: #fff; margin-bottom: 18px; }
.logo img { display: block; }
.logo-gross { width: 64px; height: 64px; border: 1px solid var(--linie); }
.rail-punkt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 68px; min-height: 58px; border-radius: 10px; color: var(--rail-text); text-decoration: none; font-size: 11px; font-weight: 500; text-align: center; }
.rail-punkt:hover { background: var(--rail-hover); color: #fff; }
.rail-punkt.aktiv { background: var(--rail-aktiv); color: #fff; }
.rail-version { font-size: 11px; color: var(--rail-text); }
.inhalt { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }

.kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 32px; background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.marke { display: flex; align-items: baseline; gap: 10px; }
.marke b { font-size: 17px; letter-spacing: -0.01em; }
.marke span { font-size: 13px; color: var(--text-3); }
.kopf-rechts { display: flex; align-items: center; gap: 8px; position: relative; }
.brotkrumen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.brotkrumen a { color: var(--text-3); text-decoration: none; }
.brotkrumen a:hover { color: var(--text); }
.brotkrumen .trenner { color: #9AA3B1; }
.brotkrumen b { font-weight: 600; }

.avatar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--akzent-hell); color: var(--akzent); font-weight: 600; font-size: 14px; cursor: pointer; }
.menue { position: absolute; right: 0; top: 48px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; box-shadow: 0 10px 30px rgba(20,23,28,.12); min-width: 220px; padding: 6px; z-index: 50; }
.menue .menue-name { padding: 8px 12px 10px; border-bottom: 1px solid var(--linie); margin-bottom: 6px; font-size: 13px; color: var(--text-3); }
.menue .menue-name b { display: block; color: var(--text); font-size: 14px; }
.menue button, .menue a { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; background: none; border-radius: 6px; color: var(--text); text-decoration: none; cursor: pointer; font-size: 14px; }
.menue button:hover, .menue a:hover { background: var(--grund); }

.seite { padding: 32px; max-width: 1400px; width: 100%; display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 720px) {
  .rail-gruppe { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .logo { margin-bottom: 0; }
  .kopf, .seite, .projektkopf { padding-left: 16px !important; padding-right: 16px !important; }
}

/* ---------- Bausteine ---------- */
h1 { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
h2 { margin: 0; font-size: 20px; font-weight: 600; }
.unterzeile { margin: 6px 0 0; color: var(--text-3); }
.zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.zeile.zwischen { justify-content: space-between; }
/* Einleitungstext links, Hauptknopf rechts – auf allen Seiten gleich (ab 0.13.1) */
.zeile.zwischen > p.unterzeile { flex: 1 1 420px; max-width: 900px; }
.zeile.zwischen > .knopf { flex: none; }
.zeile.unten { align-items: flex-end; }

.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--linie-stark); background: var(--flaeche); color: var(--text); font-weight: 500; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.knopf:hover { background: #F0F2F5; color: var(--text); }
.knopf.primaer { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.knopf.primaer:hover { background: var(--akzent-dunkel); color: #fff; }
.knopf.gefahr { color: #A11D1D; }
.knopf.klein { height: 32px; padding: 0 10px; font-size: 13px; }
.knopf:disabled { opacity: .55; cursor: not-allowed; }
.symbolknopf { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.symbolknopf:hover { background: #E9ECF1; }
.symbolknopf.klein { width: 32px; height: 32px; }

.chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--linie-stark); background: var(--flaeche); color: var(--text-2); font-weight: 500; font-size: 14px; cursor: pointer; }
.chip:hover { border-color: #9AA3B1; }
.chip.an { background: var(--text); border-color: var(--text); color: #fff; }
.chip small { font-size: 12px; opacity: .75; }

.suche { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--linie-stark); border-radius: 8px; background: var(--flaeche); color: var(--text-3); width: 280px; max-width: 100%; }
.suche input { border: 0; outline: none; background: transparent; flex: 1; min-width: 0; color: var(--text); font-size: 14px; }

.etikett { display: inline-block; padding: 3px 8px; border-radius: 6px; background: #F0F2F5; color: var(--text-2); font-size: 12px; }
.mono { font-family: var(--mono); }
.nummer { font-family: var(--mono); font-size: 13px; padding: 4px 8px; border-radius: 6px; background: #F0F2F5; color: var(--text-2); }
.beta { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: #EDE7FB; color: #5B34B8; }
.zaehler { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: #FDEBD3; color: #8A3D00; }

.status { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; padding: 8px 10px; border-radius: 8px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: currentColor; }
.status.ok { background: var(--ok-bg); color: var(--ok-fg); }
.status.info { background: var(--info-bg); color: var(--info-fg); }
.status.warn { background: var(--warn-bg); color: var(--warn-fg); }
.status.neutral { background: #F0F2F5; color: var(--text-2); }

.hinweis { padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.hinweis.fehler { background: var(--fehler-bg); color: var(--fehler-fg); }
.hinweis.info { background: var(--info-bg); color: var(--info-fg); }
.leer { padding: 48px 24px; text-align: center; color: var(--text-3); background: var(--flaeche); border: 1px dashed var(--linie-stark); border-radius: var(--radius); }

/* ---------- Formulare ---------- */
.feld { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--text-3); }
.feld input, .feld select, .feld textarea { height: 40px; border: 1px solid var(--linie-stark); border-radius: 8px; padding: 0 10px; font-size: 14px; color: var(--text); background: #fff; width: 100%; font-weight: 400; }
.feld textarea { height: auto; padding: 10px; resize: vertical; }
.feld input::placeholder, .feld textarea::placeholder { color: #7A828F; }
.raster2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .raster2 { grid-template-columns: 1fr; } }
.haken { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.haken input { width: 18px; height: 18px; margin: 0; accent-color: var(--akzent); }

/* ---------- Dialog ---------- */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(20,23,28,.25); color: var(--text); }
dialog::backdrop { background: rgba(20,23,28,.4); }
dialog form { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
dialog h2 { font-size: 20px; }
dialog .aktionen { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* ---------- Projektkacheln ---------- */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.kachel { text-decoration: none; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; text-align: left; padding: 0; font: inherit; }
.kachel:hover { border-color: #9DB4E6; box-shadow: 0 6px 20px rgba(20,23,28,.08); color: var(--text); }
.kachel-bild { position: relative; height: 156px; background: #EEF1F5; border-bottom: 1px solid var(--linie); overflow: hidden; }
.kachel-bild img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.kachel-bild svg { width: 100%; height: 100%; }
.kachel-ordner { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.95); border: 1px solid var(--linie); font-size: 12px; font-weight: 500; color: var(--text-2); max-width: calc(100% - 64px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kachel-stern { position: absolute; right: 12px; top: 12px; display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.95); border: 0; color: #9AA3B1; cursor: pointer; }
.kachel-stern.an { color: #B45309; }
.kachel-schloss { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(244,245,247,.6); }
.kachel-schloss span { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 50%; background: #fff; border: 1px solid var(--linie-stark); color: var(--text-2); }
.kachel-text { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.kachel-text h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.35; }
.daten { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.daten dt { color: var(--text-3); }
.daten dd { margin: 0; }
.fortschritt { height: 6px; border-radius: 3px; background: #E9ECF1; overflow: hidden; }
.fortschritt div { height: 6px; background: var(--akzent); }
.kachel-fuss { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.kachel-fuss .zeile { justify-content: space-between; font-size: 12.5px; color: var(--text-2); }

/* ---------- Projektkopf + Reiter ---------- */
.projektkopf { background: var(--flaeche); border-bottom: 1px solid var(--linie); padding: 22px 32px 0; }
.projektkopf h1 { font-size: 26px; }
.reiter { display: flex; overflow-x: auto; margin-top: 14px; }
.reiter a, .reiter span { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 4px; margin-right: 22px; color: var(--text-3); text-decoration: none; font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.reiter a:hover { color: var(--text); }
.reiter a.aktiv { color: var(--text); border-bottom-color: var(--akzent); }
.reiter span { color: #9AA3B1; cursor: default; }

/* ---------- Pläne ---------- */
.zweispaltig { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.seitenleiste { flex: 1 1 240px; max-width: 100%; display: flex; flex-direction: column; gap: 4px; }
.seitenleiste-titel { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 6px; }
.seitenleiste-titel h2, .klein-titel { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.ordner { text-decoration: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 42px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font-weight: 500; font-size: 14px; text-align: left; cursor: pointer; }
.ordner:hover { background: #E9ECF1; }
.ordner.an { background: var(--akzent-hell); color: var(--akzent-dunkel); }
.ordner span:first-child { display: flex; align-items: center; gap: 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ordner small { font-size: 12px; color: var(--text-3); }
.hauptspalte { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.box { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }

.planraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.plan { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.plan:hover { border-color: #9DB4E6; box-shadow: 0 6px 20px rgba(20,23,28,.08); }
.plan-kopf { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; }
.plan-kopf b { font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-bild { display: block; height: 150px; background: var(--flaeche-2); border-top: 1px solid #EEF0F3; border-bottom: 1px solid #EEF0F3; }
.plan-bild img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.plan-bild svg { width: 100%; height: 100%; }
.plan-bild .format { display: flex; height: 100%; align-items: center; justify-content: center; font-family: var(--mono); color: var(--text-3); }
.plan-text { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.plan-zahlen { display: flex; gap: 16px; font-size: 13px; color: var(--text-2); }
.plan-zahlen span { display: inline-flex; align-items: center; gap: 6px; }
.ablage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 300px; padding: 24px; border: 2px dashed #B9C6E4; border-radius: var(--radius); background: #F8FAFE; text-decoration: none; color: var(--akzent); text-align: center; }
.ablage:hover { background: #F0F4FD; }
.ablage b { font-size: 15px; }
.ablage small { font-size: 13px; color: var(--text-3); }

/* ---------- Upload ---------- */
.ablagezone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 32px 24px; border: 2px dashed #B9C6E4; border-radius: 14px; background: #F8FAFE; text-align: center; }
.ablagezone.drueber { background: var(--akzent-hell); border-color: var(--akzent); }
.ablagezone .kreis { display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 50%; background: var(--akzent-hell); color: var(--akzent); }
.warteschlange { display: flex; flex-direction: column; gap: 12px; }
.datei { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.datei.fehler { border-color: #F1C9A0; }
.datei.fertig { border-color: #A7D7B5; }
.datei-kopf { display: flex; gap: 12px; align-items: center; }
.datei-typ { display: inline-flex; width: 64px; height: 44px; align-items: center; justify-content: center; border-radius: 6px; background: #F0F2F5; color: var(--text-3); font: 500 12px var(--mono); flex: none; }
.datei-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.datei-name b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.datei-name small { font-size: 12.5px; color: var(--text-3); }
.datei-meldung { font-size: 12.5px; }
.datei-meldung.ok { color: var(--ok-fg); }
.datei-meldung.warn { color: var(--warn-fg); }

/* ---------- Tabellen ---------- */
.tabelle-box { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 10px 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 600; }
td { padding: 10px 14px; border-top: 1px solid #EEF0F3; vertical-align: middle; }
td select { height: 34px; border: 1px solid var(--linie-stark); border-radius: 6px; padding: 0 6px; background: #fff; }

/* ---------- Login ---------- */
.login-seite { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-karte { width: 100%; max-width: 420px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.login-karte .logo { margin: 0; }

/* Kachel als Ganzes klickbar, ohne verschachtelte Links/Knöpfe */
.kachel { position: relative; }
.kachel-text h3 a, .kachel-text h3 button { color: inherit; text-decoration: none; background: none; border: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; }
.strecken::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.kachel-stern { z-index: 2; }

/* Vorschaubild in der Upload-Warteschlange */
.datei-vorschau { width: 112px; height: 58px; object-fit: contain; border: 1px solid var(--linie); border-radius: 6px; background: #fff; flex: none; }

/* ---------- Plan öffnen: Viewer + Aufmaß (Schritt 2) ---------- */
.planseite { display: flex; flex-direction: column; height: calc(100vh - 69px); min-height: 520px; }
.planleiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px; background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.planleiste-name { font-size: 15px; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planleiste .abstand { flex: 1; }
.planleiste .symbolknopf { font-size: 20px; font-weight: 500; border: 1px solid var(--linie-stark); background: var(--flaeche); }
.klein-auswahl { height: 32px; border: 1px solid var(--linie-stark); border-radius: 6px; padding: 0 6px; background: #fff; font-size: 13px; }
.planbereich { flex: 1; min-height: 0; display: flex; }
.viewer { position: relative; flex: 1 1 auto; min-width: 0; overflow: hidden; background: #E9ECF1; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.viewer.zieht { cursor: grabbing; }
.viewer canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.v-grund { box-shadow: 0 2px 12px rgba(20,23,28,.15); image-rendering: auto; }
.v-overlay { pointer-events: none; }
.v-laden { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 14px; }

.aufmass { flex: 0 0 420px; max-width: 100%; display: flex; flex-direction: column; background: var(--flaeche); border-left: 1px solid var(--linie); min-height: 0; }
.aufmass-kopf { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--linie); }
.aufmass h2 { font-size: 18px; }
.speicherstand { font-size: 12.5px; color: var(--ok-fg); }
.speicherstand.offen { color: var(--warn-fg); font-weight: 600; }
.zusammenfassung { font-size: 13.5px; color: var(--text-2); }
.text-ok { color: var(--ok-fg); }
.text-warn { color: var(--warn-fg); }
.chip.klein { height: 30px; padding: 0 10px; font-size: 13px; }
.positionen { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 0 12px; }
.block-titel { margin: 12px 16px 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.position { padding: 8px 16px 10px; border-top: 1px solid #F0F2F5; }
.position.gewaehlt { background: #FFF6EE; box-shadow: inset 3px 0 0 #D9480F; }
.position-haupt { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; color: var(--text); font: inherit; }
.kuerzel { flex: none; min-width: 46px; padding: 2px 6px; border-radius: 6px; background: var(--akzent-hell); color: var(--akzent-dunkel); font: 600 12.5px var(--mono); text-align: center; }
.position.gewaehlt .kuerzel { background: #D9480F; color: #fff; }
.position-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.position-text b { font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; }
.position-text small { font-size: 12px; color: var(--text-3); overflow-wrap: anywhere; }
.position-zahlen { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 6px 0 0 56px; font-size: 12.5px; color: var(--text-2); }
.status.klein { padding: 2px 8px; font-size: 12px; border-radius: 999px; }
.status.klein::before { width: 6px; height: 6px; }
.erklaerung { font-size: 12.5px; }
.erklaerung summary { cursor: pointer; color: var(--blau, #1F5FD1); font-weight: 600; width: fit-content; }
.erklaerung dl { display: grid; grid-template-columns: minmax(80px, 38%) 1fr; gap: 6px 10px; margin: 8px 0 4px; padding: 10px; background: var(--flaeche-2, #F5F7FA); border-radius: 8px; }
.erklaerung dt { font-weight: 600; justify-self: start; }
.erklaerung dd { margin: 0; color: var(--text-2, #3D4450); }
.erweitert { border-top: 1px solid var(--linie); padding: 10px 16px 14px; font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.erweitert summary { cursor: pointer; color: var(--text-3); }
.erweitert[open] { gap: 10px; }
.erweitert .feld { margin: 8px 0; }
.klein-hinweis { margin: 0; font-size: 12px; color: var(--text-3); }

@media (max-width: 900px) {
  .planseite { height: auto; }
  .planbereich { flex-direction: column; }
  .viewer { flex: none; height: 62vh; }
  .aufmass { flex: none; border-left: 0; border-top: 1px solid var(--linie); }
  .positionen { overflow: visible; }
}
.position-zahlen .symbolknopf { margin-left: auto; }

/* ---------- Symbolerkennung (Version 0.3.0) ---------- */
.symbolstatus { font-size: 13px; color: var(--info-fg); background: var(--info-bg); border-radius: 8px; padding: 8px 10px; }
.viewer.waehlt { cursor: crosshair; }
.kuerzel.symbol { display: inline-flex; align-items: center; gap: 5px; font-family: var(--schrift); font-size: 12px; }
.farbpunkt { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(20,23,28,.35); flex: none; }
dialog:has(form.breit) { width: min(760px, calc(100vw - 32px)); }
.vorschlaege { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; padding-right: 4px; }
.vorschlag { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--linie); border-radius: 10px; }
.vorschlag > input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--akzent); flex: none; }
.vorschlag-bild { flex: none; width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--linie); border-radius: 8px; cursor: pointer; font-size: 11px; color: var(--text-3); }
.vorschlag-bild img { max-width: 76px; max-height: 76px; }
.vorschlag-felder { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.vorschlag-felder small { color: var(--text-3); }
.vorschlag-felder input:not([type=checkbox]) { height: 34px; border: 1px solid var(--linie-stark); border-radius: 6px; padding: 0 8px; font-size: 13px; width: 100%; }
.symbol-vorschau { width: 96px; height: 96px; object-fit: contain; border: 1px solid var(--linie); border-radius: 8px; background: #fff; }
.legende-bild { display: block; cursor: pointer; }
.legende-bild img { max-width: 100%; height: auto; max-height: 120px; border: 1px solid var(--linie); border-radius: 6px; background: #fff; }
.ohne-treffer { border-top: 1px dashed var(--linie-stark); padding-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.ohne-treffer summary { cursor: pointer; font-size: 13px; color: var(--text-3); padding: 4px 0; }
.ohne-treffer[open] { gap: 8px; }

/* ---------- Verschiebbare Dialoge, Bezeichnung in der Liste (Version 0.4.1) ---------- */
.dialog-griff { cursor: move; user-select: none; -webkit-user-select: none; touch-action: none; padding-right: 8px; }
.dialog-griff::after { content: "⠿"; float: right; color: var(--text-3); font-size: 16px; }
dialog.frei { position: fixed; top: 90px; left: 110px; right: auto; bottom: auto; margin: 0; max-height: calc(100vh - 110px); overflow: auto; z-index: 100; box-shadow: 0 16px 48px rgba(20,23,28,.3); border: 1px solid var(--linie-stark); }
dialog.frei .vorschlaege { max-height: calc(100vh - 380px); min-height: 160px; }
.position-haupt { display: flex; gap: 10px; align-items: flex-start; }
.position-marke { background: none; border: 0; padding: 0; cursor: pointer; flex: none; }
.bez-eingabe { width: 100%; border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 2px 6px; margin-left: -6px; font: 500 13.5px var(--schrift); color: var(--text); }
.bez-eingabe:hover { border-color: var(--linie-stark); background: #fff; }
.bez-eingabe:focus { border-color: var(--akzent); background: #fff; outline: none; box-shadow: 0 0 0 2px var(--akzent-hell); }
.bez-eingabe::placeholder { color: var(--warn-fg); }

/* ---------- Von Hand zählen (Version 0.5.0) ---------- */
.planbereich { position: relative; }
.viewer.zaehlt { cursor: crosshair; }
.zaehlleiste { position: absolute; left: 12px; top: 12px; z-index: 5; max-width: calc(100% - 24px); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  padding: 8px 10px; background: #fff; border: 1px solid #D9480F; border-radius: 10px; box-shadow: 0 6px 20px rgba(20,23,28,.18); font-size: 13px; }
.zaehlleiste #zaehltext { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; min-width: 0; }
.zaehlleiste small { flex-basis: 100%; color: var(--text-3); font-size: 12px; }
.hand-info { margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: #FFF0E6; color: #B23C0B; font-size: 11.5px; font-weight: 600; }

/* ---------- Farbe ignorieren (Version 0.5.1) ---------- */
.farbpunkt.alle-farben { background: conic-gradient(#e03131, #f59f00, #2fb344, #15aabf, #1c7ed6, #ae3ec9, #e03131); }
.klein-haken { font-size: 13px; gap: 8px; }
.klein-haken small, .haken small { color: var(--text-3); font-size: 12px; }

/* ---------- Bedienung in der Aufmaß-Liste (Version 0.5.2) ---------- */
.position-zahlen .bearbeiten-knopf { margin-left: auto; }
.farbe-schalter { cursor: pointer; white-space: nowrap; }
.farbe-schalter input { width: 16px; height: 16px; }

/* ---------- Längen messen (Version 0.6.0) ---------- */
.knopf.warnung { border-color: var(--warn-fg); color: var(--warn-fg); }
.zaehlleiste #zaehltext span { color: var(--text-2); font-size: 12.5px; }
/* Leiste nur über dem Plan, nicht über der Aufmaß-Spalte (420 px) */
@media (min-width: 901px) { .zaehlleiste { max-width: calc(100% - 420px - 24px); } }

/* ---------- Aufgaben und Mängel (Version 0.7.0) ---------- */
.seitenreiter { display: flex; border-bottom: 1px solid var(--linie); background: var(--flaeche); flex: none; }
.seitenreiter button { flex: 1; height: 44px; border: 0; background: none; font: 600 14px var(--schrift); color: var(--text-3); cursor: pointer; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seitenreiter button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--akzent); }
.aufmass:not([data-reiter="aufmass"]) .nur-aufmass { display: none !important; }
.aufmass:not([data-reiter="aufgaben"]) .nur-aufgaben { display: none !important; }
.aufmass:not([data-reiter="raeume"]) .nur-raeume { display: none !important; }
.aufgaben-seite { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.aufgaben-seite .aufgaben-liste { flex: 1; min-height: 0; overflow-y: auto; }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; }
.aufgabe-zeile { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px; border: 0; border-top: 1px solid #F0F2F5; background: none; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.aufgabe-zeile:first-child { border-top: 0; }
.aufgabe-zeile:hover { background: #F7F8FA; }
.aufgabe-zeile.fertig .aufgabe-text b { color: var(--text-3); text-decoration: line-through; }
.aufgabe-bild { display: block; flex: none; width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: #F0F2F5; border: 1px solid var(--linie); }
.aufgabe-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.aufgabe-text b { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.aufgabe-text small { font-size: 12px; color: var(--text-3); }
.art-marke { flex: none; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; color: #fff; background: var(--art); }
.text-fehler { color: var(--fehler-fg); font-weight: 600; }
.etikett.warnung { background: var(--fehler-bg); color: var(--fehler-fg); }
.filterleiste { gap: 8px; }
.aufgaben-gruppe { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.aufgaben-gruppe h2 { font-size: 16px; }
dialog:has(form.aufgabe-dialog) { width: min(560px, calc(100vw - 32px)); }
.segment { display: inline-flex; border: 1px solid var(--linie-stark); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.segment button { height: 36px; padding: 0 14px; border: 0; border-left: 1px solid var(--linie-stark); background: #fff; font: 500 13.5px var(--schrift); color: var(--text-2); cursor: pointer; }
.segment button:first-child { border-left: 0; }
.segment button:disabled { cursor: not-allowed; opacity: .5; }
.segment button.an { font-weight: 600; }
.segment button.an.warn { background: var(--warn-bg); color: var(--warn-fg); }
.segment button.an.info { background: var(--info-bg); color: var(--info-fg); }
.segment button.an.ok { background: var(--ok-bg); color: var(--ok-fg); }
.segment button.an.neutral { background: #E9ECF1; color: var(--text); }
.foto-raster { display: flex; flex-wrap: wrap; gap: 8px; }
.foto { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; border: 1px solid var(--linie); background: #F0F2F5; }
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto.neu { display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--akzent); border-style: dashed; border-color: var(--akzent); background: #fff; cursor: pointer; }
.foto-weg { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(20,23,28,.65); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.verlauf { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; font-size: 13px; }
.verlauf li { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: 6px; background: #F7F8FA; }
.verlauf small { font-size: 11.5px; color: var(--text-3); }
.kommentar-zeile { display: flex; gap: 8px; margin-top: 8px; }
.kommentar-zeile input { flex: 1; height: 32px; border: 1px solid var(--linie-stark); border-radius: 8px; padding: 0 10px; font-size: 14px; }
.viewer.zaehlt.pinmodus { cursor: crosshair; }
.viewer.grenze, .viewer.grenze.zieht { cursor: crosshair; }   /* Raumgrenzen: Fadenkreuz statt Hand (ab 0.14.3) */

/* ---------- 0.8.0: DWG-Import ---------- */
.dwg-marke {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 4px;
  border-radius: 4px;
  background: #1E56C8;
  color: #fff;
  line-height: 1.3;
}
.plan-text [data-dwg-umwandeln] { align-self: flex-start; }

/* ---------- 0.9.0: Ablauf, Ablage, Fahrplan ---------- */
.phase-marke { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--akzent-hell); color: var(--akzent-dunkel); font-size: 13px; font-weight: 600; text-decoration: none; }
.ablauf-schritte { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ablauf-schritte li { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: var(--radius); background: var(--flaeche); border: 1px solid var(--linie); }
.ablauf-schritte li > span:last-child { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ablauf-schritte li small { color: var(--text-3); font-size: 12.5px; }
.ablauf-schritte li .knopf { align-self: flex-start; height: 30px; font-size: 12.5px; padding: 0 10px; }
.ablauf-schritte li.aktuell { border-color: var(--akzent); box-shadow: 0 0 0 1px var(--akzent); }
.ablauf-schritte li.erledigt { background: var(--flaeche-2); }
.schritt-nr { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #E9ECF1; color: var(--text-2); font-weight: 700; font-size: 13px; }
.aktuell .schritt-nr { background: var(--akzent); color: #fff; }
.erledigt .schritt-nr { background: var(--ok-punkt); color: #fff; }
.schritt-nr.klein { width: 22px; height: 22px; font-size: 12px; margin-right: 8px; vertical-align: 2px; }
.ablauf-raster { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.ablauf-spalte { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--radius); background: #EDEFF3; }
.ablauf-spalte.aktuell { background: var(--akzent-hell); }
.ablauf-spalte h2 { font-size: 15px; display: flex; align-items: center; }
.modul-zeile { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.modul-karte { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px; background: var(--flaeche); border: 1px solid var(--linie); color: var(--text); text-decoration: none; }
.modul-karte:hover { border-color: var(--akzent); color: var(--text); }
.modul-karte.stand-geplant, .modul-karte.stand-klaeren, .modul-karte.stand-fremd { border-style: dashed; }
.modul-karte b { font-size: 14.5px; }
.modul-kurz { font-size: 13px; color: var(--text-2); }
.modul-karte small { font-size: 12px; color: var(--text-3); }
.modul-karte .modul-stimmen { color: var(--akzent-dunkel); font-weight: 500; }
.modul-seite { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; overflow: visible; }
.modul-raster { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }
.ablauf-liste { margin: 8px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.etikett.vorschlag { background: var(--warn-bg); color: var(--warn-fg); }
.rm-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rm-liste li { padding: 10px 12px; border-radius: 8px; background: var(--flaeche-2); border: 1px solid var(--linie); }
.rm-liste small { color: var(--text-3); }
.modul-seite textarea { width: 100%; border: 1px solid var(--linie-stark); border-radius: 8px; padding: 8px 10px; font: inherit; resize: vertical; }
.ablage-baum { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ablage-baum > li { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 10px; background: var(--flaeche); border: 1px solid var(--linie); }
.ablage-baum > li.aktiv { border-color: var(--akzent); }
.ablage-baum small { color: var(--text-3); font-size: 12.5px; }
.ablage-kopf { display: flex; align-items: center; gap: 8px; }
.ablage-unter { list-style: none; margin: 6px 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ablage-unter li { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.ablage-unter li.vorlage { color: var(--text-3); }
.reihenfolge { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.reihenfolge li > * { vertical-align: middle; }
.reihenfolge li { padding: 4px 0; }
.reihenfolge li { display: list-item; }
.reihenfolge li > span:first-child { margin-right: 10px; }
.reihenfolge li.erledigt > span:first-child { color: var(--text-3); }
.reihenfolge li > span.zeile { display: inline-flex; }
@media (max-width: 1100px) {
  .ablauf-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ablauf-schritte { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .ablauf-raster, .ablauf-schritte, .modul-raster { grid-template-columns: 1fr; }
}
.etikett.ruht { background: #F0F2F5; color: var(--text-3); text-decoration: line-through; text-decoration-color: rgba(90,98,112,.5); }

/* ---------- 0.10.0: Rollen, Rechte, Firmendaten ---------- */
.rollen-gruppe { border: 1px solid var(--linie); border-radius: 10px; padding: 8px 12px 10px; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 12px; }
.rollen-gruppe legend { font-size: 12.5px; font-weight: 600; color: var(--text-3); padding: 0 4px; }
.etikett.extern { background: var(--warn-bg); color: var(--warn-fg); }
.rechte-tabelle th { vertical-align: bottom; text-transform: none; letter-spacing: 0; font-size: 12px; }
.rechte-tabelle th.gruppe { text-align: center; border-bottom: 1px solid var(--linie); text-transform: uppercase; letter-spacing: .04em; }
.rechte-tabelle th span { display: inline-block; max-width: 110px; white-space: normal; line-height: 1.25; }
.rechte-tabelle td.mitte, .rechte-tabelle th:not(:first-child) { text-align: center; }
.rechte-tabelle input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--akzent); }
.rechte-tabelle tr.zwischenzeile td { background: var(--flaeche-2); font-weight: 600; font-size: 13px; color: var(--text-2); }
.rechte-tabelle td small { color: var(--text-3); }
.firmen-logo { height: 30px; width: auto; max-width: 140px; object-fit: contain; margin-right: 10px; vertical-align: middle; }
.logo-vorschau { width: 240px; height: 110px; border: 1px dashed var(--linie-stark); border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #fff; color: var(--text-3); }
.logo-vorschau img { max-width: 220px; max-height: 96px; object-fit: contain; }
.marke:has(img) { align-items: center; }

/* ---------- 0.10.1: Produktname LOTWERK by G3-CAD ---------- */
.produkt { letter-spacing: .04em; }
.hersteller { font-size: 12px; color: var(--text-3); font-weight: 500; }
.marke .kunde { display: inline-flex; align-items: center; gap: 8px; margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--linie-stark); font-size: 13px; color: var(--text-2); }
.marke .kunde .firmen-logo { margin-right: 0; }

/* ---------- LOTWERK-Logo (Variante 2, 28.10.2026) ---------- */
.wortmarke { height: 20px; width: auto; display: block; }
.marke:has(.wortmarke) { align-items: center; }
.marke-zeile { display: flex; align-items: center; gap: 10px; }

/* ---------- Roadmap auf "Meine Projekte" (vorübergehend, 28.10.2026) ---------- */
.roadmap { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; overflow: visible; }
.roadmap > summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.roadmap > summary::-webkit-details-marker { display: none; }
.roadmap > summary::before { content: "▸"; color: var(--text-3); margin-right: -4px; }
.roadmap[open] > summary::before { content: "▾"; }
.roadmap-titel { font-size: 20px; font-weight: 600; flex: 1; }
.roadmap-phase { display: flex; flex-direction: column; gap: 10px; }
.roadmap-phase h2 { font-size: 16px; }
.roadmap .reihenfolge li.jetzt { background: #F6E7E7; border-radius: 8px; font-weight: 600; }
.status.arbeit, .etikett.roadmap-arbeit { background: #8B0000; color: #fff; }
.modul-karte.stand-arbeit { border: 2px solid #8B0000; }

/* ---------- PDF-Bericht (ab 0.11.0) ---------- */
.bericht-inhalt { border: 1px solid var(--linie); border-radius: 10px; padding: 8px 14px 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.bericht-inhalt legend { font-size: 13px; font-weight: 600; color: var(--text-2); padding: 0 6px; }
.bericht-unter { margin-left: 30px; max-width: 240px; }

/* ---------- Beteiligte Firmen & Mängelanzeige (ab 0.12.0) ---------- */
.firmen-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.firma-karte { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.firma-karte h2 { font-size: 17px; }
.firma-karte small { color: var(--text-3); }
.firma-karte.inaktiv, tr.inaktiv { opacity: .6; }
.firma-daten { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: 13.5px; }
.firma-daten dt { color: var(--text-3); }
.firma-daten dd { margin: 0; overflow-wrap: anywhere; }
.anzeige-eintrag { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--linie); }
.anzeige-eintrag:last-child { border-bottom: 0; }
.anzeige-eintrag small { display: block; color: var(--text-3); }
code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: var(--grund); border-radius: 4px; padding: 1px 5px; }
.segment button.an:not(.warn):not(.info):not(.ok) { background: var(--akzent-hell); color: var(--akzent); }
.hinweis.ok { background: var(--ok-bg); color: var(--ok-fg); }
/* Anschrift in Einzelfeldern (ab 0.12.1): Straße breit, Hausnummer schmal; PLZ schmal, Ort breit */
.anschrift-raster { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.anschrift-raster > :nth-child(1), .anschrift-raster > :nth-child(4) { grid-column: span 3; }
.anschrift-raster > :nth-child(2), .anschrift-raster > :nth-child(3) { grid-column: span 1; }
/* Aufklappbare Erklärung in Dialogen (ab 0.12.1) */
.erklaerung { font-size: 13px; color: var(--text-2); border: 1px solid var(--linie); border-radius: 8px; padding: 8px 12px; margin-top: -6px; }
.erklaerung summary { cursor: pointer; font-weight: 600; color: var(--akzent); }
.erklaerung p { margin: 8px 0 0; }

/* ---------- Leistungsverzeichnis (ab 0.13.0) ---------- */
.lv-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.lv-karte { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lv-karte h2 { font-size: 17px; }
.lv-karte h2 a { color: var(--text); text-decoration: none; }
.lv-tabelle td { vertical-align: top; }
.lv-tabelle .rechts, .tabelle .rechts { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lv-tabelle tr.lv-pos { cursor: pointer; }
.lv-tabelle tr.lv-pos:hover, .lv-tabelle tr.lv-pos:focus { background: var(--grund); outline: none; }
.lv-tabelle tr.lv-titel td { background: #EEF0F3; font-weight: 600; }
.lv-tabelle tr.lv-titel.ebene1 td { background: #DDE1E7; }
.lv-tabelle small { color: var(--text-3); }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; white-space: nowrap; }
.lv-text { white-space: pre-wrap; font-size: 13.5px; }
.lv-langtext { max-height: 260px; overflow: auto; border: 1px solid var(--linie); border-radius: 8px; padding: 10px 12px; background: var(--grund); }
.status.fehler { background: var(--fehler-bg); color: var(--fehler-fg); }
.vorschlag-liste { display: flex; flex-direction: column; gap: 10px; max-height: 55vh; overflow: auto; }
.vorschlag-zeile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; align-items: center; border-bottom: 1px dashed var(--linie); padding-bottom: 8px; }
@media (max-width: 720px) { .vorschlag-zeile { grid-template-columns: 1fr; } }

/* DWG-Bauteile: Legende aus dem Papierbereich, Löschen (ab Version 0.13.2) */
.dwg-legende { display: flex; gap: 8px; align-items: flex-start; }
.dwg-legende .status { flex: none; padding: 3px 8px; font-size: 12px; }
.dwg-legende small { line-height: 1.4; }
.dwg-legende-liste { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.dwg-legende-liste small { display: block; color: var(--text-3); }
.dwg-laenge { justify-content: space-between; flex-wrap: nowrap; align-items: flex-start; }
.dwg-laenge .haken { flex: 1; min-width: 0; align-items: flex-start; }
.dwg-laenge .knopf { flex: none; }
.dwg-geloescht { padding: 4px 0; border-bottom: 1px solid var(--linie); font-size: 13px; }

/* Räume und Raumbuch (ab Version 0.14.0) */
.raeume-seite { display: flex; flex-direction: column; min-height: 0; }
.raeume-liste { display: flex; flex-direction: column; padding: 4px 8px 16px; overflow: auto; }
.raum { border-bottom: 1px solid var(--linie); }
.raum.offen { background: var(--flaeche-2, #F5F7FA); border-radius: 8px; }
.raum-kopf { display: flex; align-items: baseline; gap: 8px; width: 100%; padding: 8px; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.raum-kopf:hover { background: var(--flaeche-2, #F5F7FA); }
.raum-nr { font-weight: 700; min-width: 64px; font-variant-numeric: tabular-nums; }
.raum-farbe { flex: none; width: 10px; height: 10px; border-radius: 3px; align-self: center; background: var(--raumfarbe); border: 2px solid var(--raumfarbe); }
.raum-grenze { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--linie, #E2E6EC); }
.raum-grenze small { color: var(--text-3); font-weight: 400; }
.raum-farbe.ohne { background: transparent; border-style: dashed; opacity: 0.7; }
.raum-name { flex: 1; min-width: 0; }
.raum-kopf small { color: var(--text-3); white-space: nowrap; }
.raum-inhalt { padding: 0 8px 10px 80px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.raum-inhalt ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.raum-inhalt li { display: flex; justify-content: space-between; gap: 12px; }
.ohne-raum .raum-name { color: var(--text-3); font-style: italic; }
.raum-vorschlaege { display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow: auto; }
.raum-vorschlag { gap: 6px; flex-wrap: nowrap; }
.raum-vorschlag input:not([type=checkbox]) { height: 32px; border: 1px solid var(--linie-stark); border-radius: 6px; padding: 0 8px; font-size: 13px; }
.raum-vorschlag input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--akzent); }
.raumbuch-plan { display: flex; flex-direction: column; gap: 8px; }
.raumbuch-plan > h2 { margin: 8px 0 0; font-size: 17px; }
.raumbuch-karte { padding: 0; }
.raumbuch-karte > summary { display: flex; align-items: baseline; gap: 10px; padding: 12px 16px; cursor: pointer; list-style: none; }
.raumbuch-karte > summary::-webkit-details-marker { display: none; }
.raumbuch-karte > summary .raum-nr { min-width: 80px; }
.raumbuch-karte > summary small { color: var(--text-3); }
.raumbuch-inhalt { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; padding: 0 16px 16px; font-size: 13px; }
.raumbuch-inhalt h3 { margin: 0 0 6px; font-size: 13px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.raumbuch-inhalt table { width: 100%; border-collapse: collapse; }
.raumbuch-inhalt td { padding: 3px 0; border-bottom: 1px solid var(--linie); vertical-align: top; }
.raumbuch-inhalt td.zahl { text-align: right; white-space: nowrap; padding-left: 12px; font-variant-numeric: tabular-nums; }
.raumbuch-filter { gap: 8px; }

/* Räume aus anderem Plan übernehmen (ab 0.14.5) */
.raum-vorschlag-box { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.raum-quellen { display: flex; flex-direction: column; gap: 6px; }
.uebernahme { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px; font-size: 13px; }
.uebernahme h3 { margin: 0; font-size: 14px; }
.pruefliste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pruefliste li { display: flex; gap: 6px; align-items: baseline; }
.pruefliste li > span { width: 16px; font-weight: 700; flex: none; }
.pruefliste li.ok > span { color: var(--ok, #1E7B45); }
.pruefliste li.warn > span { color: var(--warn, #B23C0B); }
.pruefliste li.offen > span { color: var(--text-3); }
.ue-liste { display: flex; flex-direction: column; max-height: 340px; overflow: auto; border: 1px solid var(--linie, #E2E6EC); border-radius: 8px; }
.ue-raum { display: flex; align-items: baseline; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--linie, #E2E6EC); cursor: pointer; }
.ue-raum:hover { background: var(--flaeche-2, #F5F7FA); }
.ue-raum small { color: var(--text-3); white-space: nowrap; }
.ue-raum.gedimmt { opacity: 0.6; }

/* Schreibvorlagen und Dokumentverlauf (ab 0.14.6) */
.vorlagen-liste { display: flex; flex-direction: column; gap: 14px; }
.vorlagen-gruppe h3 { margin: 0 0 6px; font-size: 14px; }
.vorlage-zeile { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--linie, #E2E6EC); border-radius: 8px; margin-bottom: 6px; }
.vorlage-zeile small { color: var(--text-3); }
.vorlage-info { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.tabelle.dokumente td { vertical-align: top; }
.tabelle.dokumente td:nth-child(3) { min-width: 260px; }
.tabelle.dokumente td:nth-child(2) { min-width: 120px; }
.dok-aktionen { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; min-width: 150px; max-width: 230px; }
.tabelle.dokumente small { color: var(--text-3); }

/* Bautagebuch (ab 0.15.0) */
.raster3 { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 12px; }
@media (max-width: 640px) { .raster3 { grid-template-columns: 1fr 1fr; } .raster3 > :last-child { grid-column: 1 / -1; } }
.wetter-wahl { gap: 6px; flex-wrap: wrap; }
.chip-haken { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--linie, #E2E6EC); border-radius: 999px; cursor: pointer; font-size: 13px; background: var(--flaeche, #fff); }
.chip-haken:has(input:checked) { border-color: var(--blau, #1F5FD1); background: #EAF1FD; color: #123E8F; }
.chip-haken input { margin: 0; }
.tabelle.personal input { width: 100%; min-width: 60px; }
.tabelle.personal td:first-child { width: 60%; }
.tabelle.personal tfoot td { font-weight: 600; }
.bautagebuch-form textarea { resize: vertical; }
.bautagebuch-fotos figure { margin: 0; width: 180px; display: flex; flex-direction: column; gap: 4px; position: relative; }
.bautagebuch-fotos img { width: 180px; height: 135px; object-fit: cover; border-radius: 6px; border: 1px solid var(--linie, #E2E6EC); }
.bautagebuch-fotos input { width: 100%; font-size: 12px; }
.bautagebuch-fotos [data-fotoweg] { position: absolute; top: 4px; right: 4px; }
.bautagebuch-fotos figcaption { font-size: 12px; color: var(--text-3); }
.tabelle.bautagebuch td { vertical-align: top; }
.tabelle.bautagebuch td:nth-child(6) { min-width: 260px; }

/* Mitarbeiter ohne Zugang, eigenes Personal im Bautagebuch (ab 0.15.1) */
.tabelle.personal.eigene td:first-child { width: 36px; }
.tabelle.personal.eigene td:nth-child(2) { width: auto; }
.tabelle.personal.eigene td:last-child { width: 110px; }
.gedimmt-zeile td { color: var(--text-3); }

/* ab Version 0.15.2: Suche in Plänen und Dokumenten */
.kopf-suche input { height: 36px; width: 220px; max-width: 40vw; padding: 0 12px; border: 1px solid var(--linie-stark); border-radius: 8px; background: var(--flaeche); color: var(--text); font-size: 14px; }
.such-zeile { margin-bottom: 8px; }
.suche.gross { width: 560px; height: 44px; }
.suche.gross input { font-size: 15px; }
.such-gruppe { margin-top: 16px; }
.such-gruppe h3 { font-size: 16px; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.such-gruppe h3 small { font-weight: 400; color: var(--text-2); }
.such-treffer { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.such-karte { display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); color: var(--text); text-decoration: none; }
.such-karte:hover { border-color: var(--akzent); box-shadow: 0 2px 8px rgba(0,0,0,.08); color: var(--text); }
.such-karte canvas { width: 100%; height: auto; max-width: 360px; border: 1px solid var(--linie); border-radius: 4px; background: #fff; }
.such-karte small { color: var(--text-2); font-size: 12px; }
.such-text { font-size: 13px; word-break: break-word; }
.such-text mark, mark { background: #FFE8CC; color: inherit; padding: 0 2px; border-radius: 2px; }

/* ab Version 0.15.3: Rückmeldungen (Pilotphase) */
.meldung-knopf { margin-right: 10px; }
.meldungen-liste { display: flex; flex-direction: column; gap: 12px; }
.meldung-karte { display: flex; flex-direction: column; gap: 8px; }
.meldung-text { margin: 0; white-space: pre-wrap; word-break: break-word; }
.meldung-bild { max-width: 360px; max-height: 220px; border: 1px solid var(--linie); border-radius: 6px; }
.meldung-danke { position: fixed; right: 20px; bottom: 20px; z-index: 1000; max-width: 380px; box-shadow: 0 4px 16px rgba(0,0,0,.15); }

/* ab Version 0.15.5: Symbolbild in der Positionsliste und in der Projektlegende */
.pos-bild { flex: 0 0 auto; width: 48px; height: 40px; object-fit: contain; background: #fff; border: 1px solid var(--linie); border-radius: 6px; }
.pos-bild.leer { display: inline-block; background: repeating-linear-gradient(45deg, #fff, #fff 4px, #f1f3f5 4px, #f1f3f5 8px); }
.legende-symbol { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 96px; height: 56px; cursor: pointer;
  background: #fff; border: 1px solid var(--linie); border-radius: 6px; overflow: hidden; }
.legende-symbol img { max-width: 94px; max-height: 54px; object-fit: contain; }
