/* =====================================================================
   KranTeam-Design für Programme – Stand 05.11.2026
   Vorbild: Projektkalkulation (dunkle Seitenleiste, schräge Kanten).
   Regeln dazu: „KranTeam-Design.md“ im Ordner „App bauen“.
   Einbinden:  Poppins (Google Fonts) + diese Datei, Muster: vorlage.html
   ===================================================================== */
:root {
  --bg: #f1f2f3; --panel: #fff; --ink: #050505; --ink-2: #4d4d4d; --ink-3: #85898e; --line: #dfe2e5;
  --graphite: #45474b; --graphite-dark: #303133;
  --blue: #0257af; --blue-dark: #01468e; --blue-soft: #e6eef8; --yellow: #ffff00;
  --ok: #2e8b47; --warn: #d9822b; --bad: #d12c2c; --pdf-rot: #b3261e;
  --cut: 9px;                                                                     /* Schnitt ≈ 0,23 × Höhe */
  --schraeg:        polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);   /* 40 px */
  --schraeg-rechts: polygon(0 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);            /* Menü */
  --schraeg-klein:  polygon(7.8px 0, 100% 0, calc(100% - 7.8px) 100%, 0 100%);             /* 34 px */
  --schraeg-mini:   polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);                 /* Schilder */
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Poppins, "Segoe UI", sans-serif; font-size: 14px; color: var(--ink); background: var(--bg); }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

/* ---------- Grundaufbau: schwarze Seitenleiste + Hauptbereich ---------- */
.app { display: flex; height: 100vh; }
.sidebar { width: 236px; flex: 0 0 236px; background: var(--graphite-dark); color: #ebebeb; display: flex; flex-direction: column; }
.brand { display: block; padding: 24px 22px 20px; text-decoration: none; border-bottom: 3px solid var(--yellow); }
.brand-logo { display: block; width: 150px; max-width: 100%; }
.brand-text { font-weight: 700; font-size: 22px; color: #fff; letter-spacing: .04em; }
.brand-sub { margin-top: 10px; color: var(--yellow); font-weight: 600; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.nav { padding: 18px 0 0 0; flex: 1; overflow: auto; }
.nav a { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; padding: 11px 22px; margin-right: 14px; }
.nav a:hover { background: var(--graphite); clip-path: var(--schraeg-rechts); }
.nav a.active { background: var(--blue); color: #fff; clip-path: var(--schraeg-rechts); }
.nav a.aus { color: #77797d; pointer-events: none; }                 /* noch nicht verfügbar */
.nav .sym { width: 18px; height: 18px; flex: 0 0 18px; }
.nav-label { color: #9a9ca0; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: 18px 22px 6px; }
.sidebar-foot { padding: 16px 22px 22px; display: flex; flex-direction: column; gap: 12px; }
.save-status { font-size: 12px; color: #a9abaf; }
.btn-quit { width: 100%; }
/* Konto unten links (nur mit Anmeldung) */
.konto { display: flex; align-items: center; gap: 10px; padding: 8px; text-decoration: none; color: #c9d0d8; }
.konto:hover, .konto.on { background: var(--graphite); color: #fff; }
.konto-av { width: 40px; height: 34px; flex: none; display: grid; place-items: center; background: var(--yellow); color: var(--ink); font-weight: 700; font-size: 13px; clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.konto-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.konto-txt b { color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.konto-txt span { font-size: 11px; color: #9aa4ae; }

.main { flex: 1; overflow: auto; padding: 28px 34px 60px; }
.eyebrow { color: var(--ink-2); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
h1 { font-size: 26px; font-weight: 600; margin: 4px 0 0; }
h2 { font-size: 16px; font-weight: 600; margin: 0; }
.kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.kopf .aktionen, .aktionen { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.leer { color: var(--ink-3); padding: 26px; text-align: center; }
.hinweis { color: var(--ink-2); font-size: 12.5px; }
.muted { color: var(--ink-3); }

/* ---------- Knöpfe (immer Parallelogramme, Text bricht nie um) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 0; clip-path: var(--schraeg);
       background: #e4e6e9; color: var(--ink); font-weight: 600; height: 40px; padding: 0 calc(16px + var(--cut)); cursor: pointer; white-space: nowrap; transition: background .15s; text-decoration: none; }
.btn:hover:not(:disabled) { background: #d3d6da; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--blue); color: #fff; }                         /* Hauptaktion */
.btn-primary:hover:not(:disabled) { background: var(--blue-dark); color: #fff; }
.btn-schwarz { background: var(--ink); color: #fff; }                          /* Speichern neben „Weiter“ */
.btn-schwarz:hover:not(:disabled) { background: #2a2a2a; }
.btn-rot { background: var(--bad); color: #fff; }                              /* Löschen, Entfernen, Beenden */
.btn-rot:hover:not(:disabled) { background: #b42222; }
.btn-klein { height: 34px; padding: 0 calc(12px + 7.8px); clip-path: var(--schraeg-klein); font-size: 13px; }
.btn .sym { width: 18px; height: 18px; }
/* PDF-Knopf: weiß, grauer Rahmen, rotes PDF-Symbol – nie rot gefüllt */
.btn.pdf { position: relative; isolation: isolate; background: #b9bec6; color: var(--ink); }
.btn.pdf::before { content: ""; position: absolute; inset: 1.5px; z-index: -1; background: #fff; clip-path: var(--schraeg); transition: background .15s; }
.btn.btn-klein.pdf::before { clip-path: var(--schraeg-klein); }
.btn.pdf:hover:not(:disabled) { background: #8f96a0; }
.btn.pdf:hover:not(:disabled)::before { background: #f4f5f7; }
.btn.pdf .pdfsym { width: 22px; height: 22px; }
/* quadratische Kästen (36 × 36) – stehen nur neben quadratischen Kästen */
.kasten { width: 36px; height: 36px; border: none; border-radius: 0; background: #e4e6e9; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.kasten:hover { background: #d3d6da; }
.kasten.weg { background: #fff; box-shadow: inset 0 0 0 1.5px var(--bad); color: var(--bad); }
.kasten.weg:hover { background: #fdeeee; }
.kasten.ok { background: var(--warn); color: #fff; }                            /* „geprüft“-Haken */
.kasten.ok:hover { background: #bf6f1f; }
.kasten.pdf { background: #fff; box-shadow: inset 0 0 0 1.5px #b9bec6; }
.kasten.pdf:hover { background: #f4f5f7; box-shadow: inset 0 0 0 1.5px #8f96a0; }
.kasten .sym { width: 18px; height: 18px; }
.kasten .pdfsym { width: 22px; height: 22px; }
.kasten.mini { width: 30px; height: 30px; }

/* ---------- Karten ---------- */
.card { background: var(--panel); border: 1px solid var(--line); margin-bottom: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2 { display: flex; align-items: center; gap: 12px; }
.card-head h2::before { content: ""; width: 7px; height: 18px; background: var(--blue); transform: skewX(-20deg); flex: 0 0 7px; }
.card-head .aktionen { display: flex; gap: 8px; flex-wrap: wrap; }
.card-body { padding: 18px 20px; }
.card-body.flach { padding: 0; }

/* ---------- Kennzahlen ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1px solid var(--line); padding: 16px 18px; position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -10px; top: 0; bottom: 0; width: 22px; background: var(--blue-soft); transform: skewX(-20deg); }
.kpi .wert { font-size: 22px; font-weight: 600; margin-top: 4px; }
.kpi .lbl { color: var(--ink-2); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Tabellen ---------- */
table.liste { width: 100%; border-collapse: collapse; }
.liste th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafbfb; line-height: 1.25; }
.liste td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.liste tr.klick { cursor: pointer; }
.liste tr.klick:hover td, .liste.edit tbody tr:hover td { background: var(--blue-soft); }
.liste .zahl, .liste th.zahl { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.liste tfoot td { font-weight: 600; background: #fafbfb; border-bottom: none; }
.liste .nr { font-weight: 600; white-space: nowrap; }
.liste td.plus { color: var(--ok); font-weight: 600; }
.liste td.minus { color: var(--bad); font-weight: 600; }
/* Tabelle zum direkten Eintragen (Felder ohne Rahmen, erst beim Drüberfahren sichtbar) */
.liste.edit { table-layout: fixed; }
.liste.edit th { padding: 10px 8px; }
.liste.edit td { padding: 5px 6px; }
.liste.edit tfoot td { padding: 10px 8px; white-space: nowrap; overflow: visible; }
.liste.edit input, .liste.edit select { width: 100%; height: 34px; border: 1px solid transparent; background: transparent; padding: 0 8px; border-radius: 0; }
.liste.edit input:hover, .liste.edit select:hover { border-color: #cfd4da; background: #fff; }
.liste.edit input:focus, .liste.edit select:focus { outline: none; border-color: var(--blue); background: #fff; }
.liste.edit input.zahl { text-align: right; }
.liste.edit input::placeholder { color: #8f949a; }
.liste.edit input[type=checkbox] { width: 18px; height: 18px; padding: 0; accent-color: var(--blue); cursor: pointer; }
/* übernommene (kopierte), noch nicht geprüfte Zeilen */
.liste.edit tr.kopiert td { background: #fdf3e8; }
.liste.edit tr.kopiert td:first-child { box-shadow: inset 4px 0 0 var(--warn); }

/* ---------- Formulare ---------- */
.feld { display: flex; flex-direction: column; gap: 6px; }
.feld > span { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.feld > span .pflicht { color: var(--bad); }
.feld input, .feld select, .feld textarea { height: 40px; border: 1px solid #cfd4da; border-radius: 0; padding: 0 12px; background: #fff; width: 100%; }
.feld textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.feld input:focus, .feld select:focus, .feld textarea:focus { outline: none; border-color: var(--blue); }
.feld.fehlt input, .feld.fehlt select { border-color: var(--bad); box-shadow: inset 3px 0 0 var(--bad); }
.feld .einheit { position: relative; }
.feld .einheit input { padding-right: 52px; }
.feld .einheit em { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--ink-3); font-size: 13px; }
.raster { display: grid; gap: 16px; }
.r2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.r3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.r4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
.span4 { grid-column: 1 / -1; }
.untertitel { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); padding-top: 6px; border-top: 1px solid var(--line); margin-top: 4px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; height: 40px; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
/* Auswahl als Karten (z. B. „leer anlegen“ / „als Kopie“) */
.wahl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.wahlkarte { border: 1px solid var(--line); padding: 12px 14px 12px 40px; cursor: pointer; position: relative; display: block; background: #fff; }
.wahlkarte input { position: absolute; left: 14px; top: 15px; accent-color: var(--blue); width: 16px; height: 16px; }
.wahlkarte b { display: block; font-weight: 600; }
.wahlkarte small { color: var(--ink-2); font-size: 12px; }
.wahlkarte:hover { border-color: #b9bec6; }
.wahlkarte:has(input:checked) { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: var(--blue-soft); }

/* ---------- Suche, Chips, Schilder ---------- */
.werkzeug { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.suche { height: 40px; border: 1px solid #cfd4da; padding: 0 12px 0 38px; width: 320px; max-width: 100%; border-radius: 0;
         background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2385898e' stroke-width='2.2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") 12px 50% no-repeat; }
.suche:focus { outline: none; border-color: var(--blue); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: none; background: #e4e6e9; height: 32px; padding: 0 16px; clip-path: var(--schraeg-mini); font-weight: 600; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.chip:hover { background: #d3d6da; }
.chip.aktiv { background: var(--blue); color: #fff; }
.schild { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 12px; clip-path: var(--schraeg-mini); font-size: 12px; font-weight: 600; white-space: nowrap; background: #eceef0; color: #55585d; }
.schild::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.schild.blau { background: var(--blue-soft); color: var(--blue); }
.schild.gruen { background: #e5f3e9; color: var(--ok); }
.schild.orange { background: #fdf0e3; color: #b8681c; }
.schild.rot { background: #fbeaea; color: var(--bad); }
.nummer { display: inline-block; background: var(--graphite-dark); color: #fff; font-size: 11.5px; font-weight: 600; padding: 3px 12px; clip-path: var(--schraeg-mini); white-space: nowrap; }
.punkt { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--warn); margin-left: 6px; vertical-align: 1px; }  /* „hier noch prüfen“ */

/* ---------- Detailseite: dunkler Kopf, Leiste, Reiter ---------- */
.seitenkopf { background: var(--graphite-dark); color: #fff; padding: 22px 26px 20px; position: relative; overflow: hidden; border-bottom: 4px solid var(--yellow); }
.seitenkopf::after { content: ""; position: absolute; right: -60px; top: 0; bottom: 0; width: 280px; background: var(--blue); transform: skewX(-20deg); }
.seitenkopf > * { position: relative; z-index: 1; }
.seitenkopf .eyebrow { color: #b8babd; }
.seitenkopf h1 { color: #fff; }
.seitenkopf .meta { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 10px; color: #d6d8db; font-size: 13px; }
.seitenkopf .meta b { color: #fff; font-weight: 600; }
.seitenkopf .oben { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.seitenkopf .aktionen { display: flex; gap: 10px; }
/* Leiste für Unterpunkte (z. B. Krananlagen eines Projekts) */
.teilleiste { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-top: none; padding: 12px 14px; }
.teilleiste .lbl { align-self: center; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-right: 6px; }
.teilleiste .btn { align-self: center; margin-left: auto; }
.teil { display: flex; flex-direction: column; justify-content: center; gap: 1px; text-decoration: none; color: var(--ink); background: #f1f2f3; padding: 6px 20px; clip-path: var(--schraeg); min-width: 120px; }
.teil:hover { background: #e4e6e9; }
.teil b { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.teil small { font-size: 11.5px; color: var(--ink-2); }
.teil .num { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 5px; background: #fff; font-size: 11px; clip-path: var(--schraeg-mini); }
.teil.aktiv { background: var(--blue); color: #fff; }
.teil.aktiv small { color: #d5e3f4; }
.teil.aktiv .num { color: var(--blue); }
/* Reiter mit Nummern */
.reiter { display: flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-top: none; padding: 0 14px; margin-bottom: 20px; overflow-x: auto; }
.reiter a { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; text-decoration: none; color: var(--ink-2); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.reiter a:hover { color: var(--ink); }
.reiter a.aktiv { color: var(--ink); border-bottom-color: var(--blue); }
.reiter .num { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px; padding: 0 7px; background: #e4e6e9; color: var(--ink); font-size: 12px; clip-path: var(--schraeg-mini); }
.reiter a.aktiv .num { background: var(--blue); color: #fff; }
.reiter-rechts { margin-left: auto; display: flex; gap: 8px; padding-left: 12px; }
/* Inhalt links, Zusammenfassung rechts (klebt beim Scrollen) */
.zweispaltig { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.seitlich { position: sticky; top: 0; }

/* ---------- Zusammenfassung / Preisband ---------- */
.preisband { background: var(--graphite-dark); color: #fff; padding: 16px 20px; position: relative; overflow: hidden; }
.preisband::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--yellow); }
.preisband .lbl { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #b8babd; font-weight: 600; }
.preisband .wert { font-size: 28px; font-weight: 700; margin-top: 2px; }
.summe { width: 100%; border-collapse: collapse; }
.summe td { padding: 7px 0; }
.summe td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.summe tr.posten td { color: var(--ink-2); font-size: 13px; }
.summe tr.trenn td { border-top: 1px solid var(--line); padding-top: 10px; font-weight: 600; }
.summe tr.gesamt td { border-top: 2px solid var(--ink); font-size: 18px; font-weight: 700; padding-top: 12px; }
.summe tr.klein td { color: var(--ink-2); font-size: 13px; }
.summe tr.gut td { color: var(--ok); font-weight: 600; font-size: 13px; }
.balken { display: flex; height: 10px; margin: 14px 0 4px; background: #eceef0; }
.balken span { display: block; height: 100%; }
.legende { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); }
.legende i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Hinweise ---------- */
.warntext { color: var(--warn); font-weight: 600; font-size: 12px; }
.warnhinweis { background: #fdf3e8; border-left: 4px solid var(--warn); padding: 10px 12px; margin: 14px 0 0; }
.pruefhinweis { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #fdf3e8; border: 1px solid #f0cfa9; border-left: 5px solid var(--warn); padding: 10px 14px; margin-bottom: 16px; }
.pruefhinweis b { font-weight: 600; }

/* ---------- Dateien / Unterlagen ---------- */
.ablage { border: 2px dashed #cfd4da; background: #fafbfb; padding: 26px; text-align: center; color: var(--ink-2); transition: border-color .15s, background .15s; }
.ablage.drueber { border-color: var(--blue); background: var(--blue-soft); }
.ablage b { color: var(--ink); }
.dateien { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-top: 18px; }
.datei { border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; }
.datei .vorschau { height: 130px; background: #f4f5f7; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; border-bottom: 1px solid var(--line); }
.datei .vorschau img { max-width: 100%; max-height: 100%; object-fit: contain; }
.datei .vorschau .typ { font-weight: 700; font-size: 20px; color: #fff; background: var(--graphite); padding: 8px 14px; clip-path: var(--schraeg-mini); }
.datei .vorschau .typ.pdf { background: var(--pdf-rot); }
.datei .vorschau .typ.cad { background: var(--blue); }
.datei .vorschau .typ.office { background: #1d6f42; }
.datei .info { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.datei .name { font-weight: 600; font-size: 13px; word-break: break-word; }
.datei .zeile { display: flex; gap: 6px; align-items: center; }

/* ---------- Eingabefenster (Modal) ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(20, 22, 26, .55); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal { background: #fff; width: 100%; max-width: 760px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; border-top: 4px solid var(--blue); }
.modal.gross { max-width: 920px; }
.modal.klein { max-width: 460px; }
.modal-head { padding: 20px 24px 14px; }
.modal-head h3 { margin: 0; font-size: 19px; font-weight: 600; }
.modal-head h3::after { content: ""; display: block; width: 54px; height: 6px; margin-top: 9px; background: var(--yellow); transform: skewX(-20deg); transform-origin: left; }
.modal-body { padding: 6px 24px 20px; overflow: auto; }
.modal-foot { padding: 14px 24px 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); }
.modal-foot .links { margin-right: auto; }

/* Vorschaufenster für Dateien (fast bildschirmgroß, im Programmfenster) */
.modal.vorschaufenster { max-width: none; width: calc(100vw - 60px); height: calc(100vh - 50px); max-height: none; }
.vf-kopf { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.vf-kopf .kasten { font-size: 22px; line-height: 1; }
.vf-kopf .kasten:disabled { opacity: .35; cursor: default; }
.vf-titel { display: flex; flex-direction: column; min-width: 0; }
.vf-titel b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vf-titel small { color: var(--ink-2); font-size: 12px; }
.vf-rechts { margin-left: auto; display: flex; gap: 8px; }
.vf-inhalt { flex: 1; min-height: 0; position: relative; background: #e9ebee; display: flex; }
.vf-inhalt iframe { border: 0; width: 100%; height: 100%; background: #fff; }
.vf-leer { margin: auto; text-align: center; color: var(--ink-2); display: flex; flex-direction: column; gap: 8px; padding: 30px; }
.vf-leer b { color: var(--ink); font-weight: 600; }
.vf-cad { flex: 1; background: #1e1f22; overflow: hidden; cursor: grab; display: flex; }   /* DWG/DXF dunkel wie im CAD */

/* ---------- Meldung unten rechts ---------- */
.toast { position: fixed; right: 26px; bottom: 26px; background: var(--graphite-dark); color: #fff; padding: 12px 22px; font-weight: 500; clip-path: var(--schraeg);
         opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s; pointer-events: none; z-index: 80; }
.toast.zeigen { opacity: 1; transform: none; }
.toast.ok { background: var(--ok); }
.toast.fehler { background: var(--bad); }

/* ---------- Anmeldeseite (nur mit Anmeldung) ---------- */
.login { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px;
         background: linear-gradient(115deg, #3a3b3e 0%, #3a3b3e 55%, var(--blue) 55.1%, var(--blue) 100%); }
.login-card { width: min(400px, 100%); background: #fff; padding: 34px 34px 26px; position: relative; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 70px rgba(0,0,0,.4); }
.login-card::before { content: ""; position: absolute; left: 34px; top: -6px; width: 90px; height: 12px; background: var(--yellow); transform: skewX(-20deg); }
.login-logo { width: 170px; filter: invert(1) brightness(.15); }
.login-card .brand-sub { color: var(--ink-3); margin-top: 0; }
.login-card h2 { font-size: 22px; }
.login-card .feld input { height: 44px; font-size: 15px; }
.login-card .btn { height: 44px; font-size: 15px; }
.login-err { min-height: 18px; color: var(--bad); font-size: 13px; font-weight: 500; }
.link-btn { background: none; border: none; color: var(--blue); cursor: pointer; padding: 0; text-decoration: underline; }
.login-code { align-self: center; font-size: 13px; }                 /* „Code per E-Mail“ */

/* ---------- Dashboard (nur Administrator) ---------- */
.dash-monate { display: flex; align-items: flex-end; gap: 6px; height: 170px; }        /* Balken je Monat */
.dash-spalte { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.dash-balken { width: 100%; background: var(--blue); min-height: 0; }
.dash-n { font-size: 12px; font-weight: 600; min-height: 16px; }
.dash-m { font-size: 11px; color: var(--ink-3); }
.dash-feed { list-style: none; margin: 0; padding: 0; }                                 /* letzte Aktivitäten */
.dash-feed li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.dash-feed li:last-child { border-bottom: 0; }
.dash-feed a { color: inherit; text-decoration: none; }
.dash-feed a:hover { color: var(--blue); }
.dash-feed .muted { white-space: nowrap; font-size: 12px; }

/* ---------- Bildschirmbreite ---------- */
@media (max-width: 1400px) { .zweispaltig { grid-template-columns: 1fr; } .seitlich { position: static; } }
@media (max-width: 1250px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
