:root {
  --bg: #f4f3ef; --card: #fff; --ink: #1d2030; --mute: #6c7084; --line: #e3e1da; --line2: #c9c6bc;
  --acc: #0f6e6e; --acc-soft: #e2f1f0; --red: #d63a3a; --ok: #2e9e6b; --grp: #f7f6f2; --sel: #d5ebe9;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
#main { height: 100%; display: flex; flex-direction: column; }
#view { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.btn { border: 1px solid var(--line2); background: var(--card); border-radius: 7px; padding: 6px 12px; white-space: nowrap; }
.btn:hover { border-color: var(--acc); }
.btn:disabled { opacity: .4; cursor: default; border-color: var(--line2); }
.btn.pri { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn.danger { color: var(--red); }
.btn.icon { padding: 5px 9px; }
.inp { border: 1px solid var(--line2); border-radius: 7px; padding: 6px 9px; background: #fff; min-width: 0; width: 100%; }
.inp:focus { outline: 2px solid var(--acc-soft); border-color: var(--acc); }
.inp[readonly] { background: #f6f5f1; color: var(--mute); }
textarea.inp { resize: vertical; }
.row { display: flex; gap: 8px; align-items: center; } .row.end { justify-content: flex-end; } .sp { flex: 1; }
.mute { color: var(--mute); } .small { font-size: 12px; }

/* Kopf */
.top { display: flex; align-items: center; gap: 6px; padding: 8px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; color: var(--acc); letter-spacing: .04em; text-decoration: none; margin-right: 14px; }
.top nav { display: flex; gap: 2px; }
.top nav a { padding: 6px 12px; border-radius: 7px; color: var(--mute); text-decoration: none; }
.top nav a.on { background: var(--acc-soft); color: var(--acc); font-weight: 600; }
.av { width: 26px; height: 26px; border-radius: 50%; background: #d9e6e5; color: #24504f; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; vertical-align: middle; }
.bar { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.bar .inp { width: 240px; }
.bar .sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; }

.pill { display: inline-block; padding: 0 8px; border-radius: 99px; font-size: 11px; line-height: 18px; border: 1px solid var(--line2); color: var(--mute); }
.pill.p1 { color: #8a5a00; border-color: #ecd79a; background: #fdf6e0; }
.pill.p2 { color: #1e5fa8; border-color: #c4d9f2; background: #edf4fd; }
.pill.p3 { color: var(--ok); border-color: #b9e0cd; background: #eef8f3; }
.empty { padding: 40px; text-align: center; color: var(--mute); }
/* Formulare */
.form label, .dlg label { display: block; font-size: 12px; color: var(--mute); margin: 10px 0 3px; }
.form .g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.form .g3 { display: grid; grid-template-columns: 1fr 2fr; gap: 0 10px; }
.form .g4 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 10px; }
.form details { border-bottom: 1px solid var(--line); padding: 6px 0 12px; }
.form details:not([open]) { padding-bottom: 6px; }
.form summary { cursor: pointer; font-weight: 600; color: var(--acc); padding: 6px 0; list-style-position: inside; }
.form .chk { display: flex; gap: 8px; align-items: center; margin-top: 12px; color: var(--ink); font-size: 14px; }
.wrap { padding: 20px; overflow: auto; flex: 1; }
.page { max-width: 1100px; margin: 0 auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
table.plain { border-collapse: collapse; width: 100%; }
.plain th, .plain td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.plain th { font-size: 12px; color: var(--mute); font-weight: 600; }
.plain tr.click { cursor: pointer; } .plain tr.click:hover td { background: #faf9f6; }
/* Dialoge */
#modal { position: fixed; inset: 0; background: rgba(20, 22, 35, .4); z-index: 30; display: flex; align-items: center; justify-content: center; padding: 16px; }
.dlg { width: 460px; max-width: 100%; max-height: 100%; overflow: auto; padding: 18px; }
.dlg h3 { margin: 0 0 6px; } .dlg > .row { margin-top: 16px; flex-wrap: wrap; } .dlg p { margin: 6px 0; }
#menu { position: fixed; z-index: 25; background: var(--card); border: 1px solid var(--line2); border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, .15); min-width: 220px; overflow: hidden; }
#menu .mi { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 14px; }
#menu .mi:hover { background: #faf9f6; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 40; max-width: 90vw; }
.login { flex: 1; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login form { width: 340px; max-width: 100%; padding: 24px; }
.login h2 { margin: 12px 0 4px; font-size: 18px; }
.login label { display: block; font-size: 12px; color: var(--mute); margin: 12px 0 4px; }
.login .btn { width: 100%; margin-top: 18px; }
#menu a.mi { display: block; padding: 9px 14px; color: inherit; text-decoration: none; }
#menu a.mi:hover { background: #faf9f6; }
.link { color: var(--acc); cursor: pointer; text-decoration: underline; }
a.btn { text-decoration: none; display: inline-block; }

/* ---------- Dokumente ---------- */
.dlg.wide { width: 640px; }
.top nav a.sub { color: var(--ink); }
.crumb { color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.crumb a { color: var(--acc); text-decoration: none; } .crumb b { color: var(--ink); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pcard { padding: 16px; cursor: pointer; display: block; color: inherit; text-decoration: none; }
.pcard:hover { border-color: var(--acc); }
.pcard b { display: block; font-size: 16px; margin: 2px 0 6px; }
.pcard .row { margin-top: 10px; }

.fx { flex: 1; min-height: 0; display: flex; }
.fx-tree { width: 290px; flex: none; overflow: auto; background: var(--card); border-right: 1px solid var(--line2); padding: 8px 0; }
.fx-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--card); position: relative; }
.fx-list { flex: 1; min-height: 0; overflow: auto; }
.fx-main.drop::after { content: 'Dateien hier ablegen'; position: absolute; inset: 8px; border: 2px dashed var(--acc); border-radius: 12px; background: rgba(226, 241, 240, .85); display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--acc); z-index: 5; pointer-events: none; }
.tn { display: flex; align-items: center; gap: 4px; padding: 5px 10px 5px 0; cursor: pointer; white-space: nowrap; color: inherit; text-decoration: none; }
.tn:hover { background: #faf9f6; }
.tn.on { background: var(--sel); font-weight: 600; }
.tn .tw { width: 18px; text-align: center; color: var(--mute); flex: none; user-select: none; }
.tn .nm { overflow: hidden; text-overflow: ellipsis; }
.tn .cnt { color: var(--mute); font-size: 11px; font-weight: 400; margin-left: auto; padding-left: 8px; }
table.fl { border-collapse: collapse; width: 100%; min-width: 860px; }
.fl th { position: sticky; top: 0; z-index: 2; background: #efede6; text-align: left; font-size: 12px; font-weight: 600; color: var(--mute); padding: 7px 10px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.fl td { padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px; }
.fl tr:hover td { background: #faf9f6; }
.fl td.nm a { color: var(--ink); text-decoration: none; font-weight: 500; }
.fl td.nm a:hover { color: var(--acc); text-decoration: underline; }
.fl .num { text-align: right; }
.fl td.mn { width: 40px; text-align: right; overflow: visible; }
.fl td.late { color: var(--red); font-weight: 600; }
.ext { display: inline-block; min-width: 34px; text-align: center; font-size: 9px; font-weight: 700; letter-spacing: .03em; line-height: 16px; border-radius: 4px; color: #fff; background: #8a8fa3; margin-right: 8px; padding: 0 4px; vertical-align: 1px; }
.ext.cad { background: #c2410c; } .ext.bim { background: #1e5fa8; } .ext.pdf { background: #d63a3a; } .ext.doc { background: #2b579a; } .ext.xls { background: #1e7145; } .ext.img { background: #7c3aed; } .ext.dir { background: #c9a227; }
.vpill { display: inline-block; border: 1px solid var(--line2); border-radius: 5px; padding: 0 6px; font-size: 11px; line-height: 17px; color: var(--mute); background: #fff; }
.pill.s-offen { color: #b45309; border-color: #f1d5a8; background: #fdf3e2; }
.pill.s-arbeit { color: #1e5fa8; border-color: #c4d9f2; background: #edf4fd; }
.pill.s-pruef { color: #6d28d9; border-color: #d9cdf5; background: #f4effd; }
.pill.s-ok { color: var(--ok); border-color: #b9e0cd; background: #eef8f3; }
.pill.s-zu { color: var(--mute); background: #f3f2ee; }
#upl { position: fixed; right: 18px; bottom: 18px; width: 340px; max-height: 50vh; overflow: auto; z-index: 28; padding: 12px 14px; box-shadow: 0 8px 30px rgba(0, 0, 0, .18); }
#upl .u { font-size: 12px; margin-top: 8px; } #upl .u span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#upl .pb { height: 4px; background: var(--line); border-radius: 2px; margin-top: 3px; overflow: hidden; } #upl .pb i { display: block; height: 100%; background: var(--acc); width: 0; }
#upl .u.err { color: var(--red); } #upl .u.err .pb i { background: var(--red); }
.cm { border-top: 1px dashed var(--line); padding: 6px 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm small { display: block; color: var(--mute); font-size: 11px; }

/* Betrachter */
.vw { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.vw-body { flex: 1; min-height: 0; display: flex; }
.vw-stage { flex: 1; min-width: 0; position: relative; background: #e9e8e3; }
#viewer { position: absolute; inset: 0; }
.vw-msg { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; text-align: center; padding: 30px; color: var(--mute); z-index: 3; background: #e9e8e3; }
.vw-msg b { color: var(--ink); font-size: 16px; }
.spin { width: 30px; height: 30px; border: 3px solid var(--line2); border-top-color: var(--acc); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.vw-side { width: 330px; flex: none; border-left: 1px solid var(--line2); background: var(--card); display: flex; flex-direction: column; }
.vw-side header { padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.vw-side .body { flex: 1; overflow: auto; }
.ti { padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ti:hover { background: #faf9f6; } .ti.on { background: var(--sel); }
.ti b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ti .row { margin-top: 4px; font-size: 12px; color: var(--mute); flex-wrap: wrap; gap: 6px; }
.rl { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px 16px; background: var(--card); border-bottom: 1px solid var(--line2); }
.rl .t { border: 1px solid transparent; background: none; border-radius: 6px; padding: 4px 8px; font-size: 13px; }
.rl .t:hover { background: #f3f2ee; } .rl .t.on { background: var(--acc-soft); border-color: var(--acc); color: var(--acc); font-weight: 600; }
.rl .sw { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line2); padding: 0; }
.rl .sw.on { box-shadow: 0 0 0 2px var(--ink); }
.rl .sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.rl select { border: 1px solid var(--line2); border-radius: 6px; padding: 3px 4px; background: #fff; }

@media (max-width: 900px) {
  .fx-tree { width: 200px; }
  .vw-side { width: 240px; }
  .bar .inp { width: 100%; }
}
#menu .mi.danger { color: var(--red); }
a.btn { color: inherit; } a.btn.pri { color: #fff; }

/* PDF-Betrachter (Stirling) */
.pv { position: absolute; inset: 0; overflow: hidden; background: #d9d8d3; cursor: grab; touch-action: none; user-select: none; }
.pv.edit { cursor: crosshair; } .pv.edit.pv-pick { cursor: default; }
.pv-in { position: absolute; left: 0; top: 0; transform-origin: 0 0; background: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, .25); }
.pv-in > * { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.pv-tools { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 4px; z-index: 5; cursor: default; }
.pv-txbar { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; gap: 10px; align-items: center; max-width: 94%; background: #fff; border: 1px solid #2563eb; border-radius: 8px; padding: 6px 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); cursor: default; font-size: 13px; }
.pv-txbar[hidden] { display: none; } .pv.pv-txt, .pv.edit.pv-txt { cursor: grab; }

/* Gemeinsame Tabelle: variable Spalten und Filterzeile */
table.dt { table-layout: fixed; min-width: 100%; }
.dt td { max-width: none; }
.dt thead th { position: sticky; z-index: 2; overflow: hidden; }
.dt tr.h th { top: 0; height: 32px; padding: 0 10px; user-select: none; }
.dt tr.h .lbl { display: block; cursor: pointer; overflow: hidden; text-overflow: ellipsis; line-height: 32px; }
.dt tr.h .lbl:hover { color: var(--ink); }
.dt tr.h th.flt .lbl { color: var(--acc); }
.dt tr.h th.flt .lbl::before { content: '● '; font-size: 9px; vertical-align: 1px; }
.dt .rz { position: absolute; top: 0; right: 0; width: 7px; height: 100%; cursor: col-resize; border-right: 2px solid transparent; }
.dt .rz:hover, .dt .rz:active { border-right-color: var(--acc); }
.dt tr.f th { top: 32px; padding: 3px 6px 5px; background: #f6f5f0; vertical-align: top; }
.dt .fi { display: block; width: 100%; min-width: 0; border: 1px solid var(--line2); border-radius: 5px; padding: 2px 5px; font-size: 12px; font-weight: 400; color: var(--ink); background: #fff; }
.dt .fi + .fi { margin-top: 2px; }
.dt .fi:focus { outline: 2px solid var(--acc-soft); border-color: var(--acc); }
.dt th.mn { text-align: right; padding: 0 6px; white-space: nowrap; overflow: visible; }
.dt th.mn .btn { padding: 1px 6px; font-size: 12px; }
.dt td.mn { width: auto; }
.dt td a.mute { color: var(--mute); }
.dt th.mn, .dt td.mn { position: sticky; right: 0; }
.dt td.mn { background: var(--card); }
.dt tr:hover td.mn { background: #faf9f6; }
.dt tr.h th.mn { z-index: 3; background: #efede6; }
.dt tr.f th:last-child { position: sticky; right: 0; z-index: 3; }

/* Schnelle IFC-Ansicht (fragview.js) */
.fv-c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; touch-action: none; }
.pv.pv-3d { background: transparent; pointer-events: none; cursor: default; }
.pv.pv-3d.edit { pointer-events: auto; cursor: crosshair; } .pv.pv-3d.edit.pv-pick { cursor: default; }
.pv-3d .pv-in { background: transparent; box-shadow: none; }
.pv-3d .pv-img, .pv-3d .pv-tools { display: none; }
.fv-tools { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 4px; z-index: 6; }
.fv-tools .btn.on { border-color: var(--acc); color: var(--acc); }
.fv-props { position: absolute; left: 12px; top: 12px; width: 330px; max-width: calc(100% - 24px); max-height: calc(100% - 24px); overflow: auto; z-index: 6;
  background: var(--card); border: 1px solid var(--line2); border-radius: 8px; padding: 10px 12px; font-size: 12px; box-shadow: 0 4px 18px rgba(0, 0, 0, .15); }
.fv-props header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } .fv-props header b { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.fv-props h4 { margin: 10px 0 3px; font-size: 12px; }
.fv-props table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.fv-props th { text-align: left; font-weight: 400; color: #6b7280; width: 45%; padding: 2px 6px 2px 0; vertical-align: top; overflow-wrap: anywhere; }
.fv-props td { padding: 2px 0; overflow-wrap: anywhere; }
.fv-clip { position: absolute; right: 12px; bottom: 52px; width: 360px; max-width: calc(100% - 24px); z-index: 6; display: flex; flex-direction: column; gap: 8px;
  background: var(--card); border: 1px solid var(--line2); border-radius: 8px; padding: 10px; box-shadow: 0 4px 18px rgba(0, 0, 0, .15); }
.fv-clip[hidden] { display: none; }
.fv-clip .row { display: flex; gap: 4px; flex-wrap: wrap; } .fv-clip .btn { padding: 4px 9px; } .fv-clip .btn.on { border-color: var(--acc); color: var(--acc); }
.fv-clip input[type=range] { width: 100%; }
.fv-label small { font-weight: 400; opacity: .9; }
.fv-label { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; background: #e11d48; color: #fff; font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 4px; white-space: nowrap; }

/* Protokolle */
.page.prot { max-width: 1280px; }
.pc { padding: 14px 18px 16px; margin-bottom: 16px; } .pc h3 { margin: 0 0 6px; }
.pinfo { padding: 12px 18px; margin-bottom: 16px; background: #eef8f3; border-color: #b9e0cd; }
.pg { display: grid; grid-template-columns: 150px 110px 1fr 1fr 170px 110px; gap: 0 10px; } .pg .w2 { grid-column: span 2; }
.pi, .pih { display: grid; grid-template-columns: 78px minmax(0, 1fr) 330px 112px; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.pih { font-size: 12px; color: var(--mute); font-weight: 600; padding: 6px 0; border-top: 0; }
.pi.done { background: #f1f7f3; margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
.pi.done .pt { text-decoration: line-through; color: var(--mute); }
.pn { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding-top: 6px; font-weight: 600; }
.pb { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pb .pt { font-weight: 600; } .pb .pnote { background: #fffdf3; }
.ph { font-size: 12px; color: var(--mute); white-space: pre-wrap; overflow-wrap: anywhere; padding: 0 2px; }
.pm { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; } .pm .late { color: var(--red); font-weight: 600; }
.px { display: flex; gap: 4px; justify-content: flex-end; }
.padd { border-top: 2px solid var(--line2); }
.pick { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 2px 12px 10px; }
.pick .chk { margin-top: 8px; align-items: flex-start; }
.prot .inp:disabled { background: #f8f7f4; color: var(--ink); opacity: 1; }
@media (max-width: 1000px) { .pi, .pih { grid-template-columns: 60px minmax(0, 1fr); } .pih span:nth-child(n+3) { display: none; } .pm, .px { grid-column: 2; } .pg { grid-template-columns: 1fr 1fr; } }
.fx-main:has(> #pwrap) { min-height: 0; overflow: hidden; }
#pwrap { min-height: 0; overflow-y: auto; }
.prot textarea.inp { resize: none; overflow: hidden; display: block; }

.acct { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; } .form .acct .chk { margin-top: 6px; }

/* GAEB-Tabellenansicht */
.gv { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--card); }
.gv-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line2); font-size: 13px; }
.gv-head .kv { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .gv-head .kv i { font-style: normal; color: var(--mute); font-size: 12px; }
.gv-head .gvf { background: var(--acc-soft); color: var(--acc); border-color: var(--acc); }
.gv .dt td { vertical-align: top; }
.gv .cl { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; line-height: 1.35; }
.gv tr.gt td { font-weight: 600; background: #f6f5f0; }
.gv tr.chg td { background: #fff6dc; }
.gv tbody tr:hover td { background: var(--sel); }

.fv-lock { position: absolute; left: 12px; bottom: 12px; z-index: 6; background: rgba(20, 22, 35, .78); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 6px; pointer-events: none; }
.fv-lock[hidden] { display: none; }

/* Schnelle IFC-Ansicht: Strukturbaum links, Eigenschaften rechts, Auswahl weiterer Modelle */
.fv-props { left: auto; right: 12px; max-height: calc(100% - 76px); }
.fv-tree { position: absolute; left: 12px; top: 12px; bottom: 12px; width: 310px; max-width: calc(100% - 24px); z-index: 6; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line2); border-radius: 8px; font-size: 12px; box-shadow: 0 4px 18px rgba(0, 0, 0, .15); }
.fv-tree[hidden], .fv-pick[hidden] { display: none; }
.fv-tree header, .fv-pick header { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line2); } .fv-tree header b { flex: 1; }
.fv-tb { flex: 1; overflow: auto; padding: 4px 0; }
.fv-tr { display: flex; align-items: center; gap: 2px; padding-right: 4px; white-space: nowrap; min-height: 22px; }
.fv-tr:hover { background: rgba(0, 0, 0, .05); } .fv-tr.on { background: #fde9c0; } .fv-tr.off .tl { opacity: .45; }
.fv-tr.model .tl, .fv-tr.group .tl { font-weight: 600; }
.fv-tr .tw, .fv-tr .te { border: 0; background: none; padding: 0; width: 18px; height: 20px; flex: none; cursor: pointer; color: #6b7280; font-size: 11px; }
.fv-tr .tl { flex: 1; overflow: hidden; text-overflow: ellipsis; cursor: pointer; padding: 2px 0; } .fv-tr .tl i { font-style: normal; font-weight: 400; color: #6b7280; margin-left: 4px; }
.fv-tr.more { color: var(--acc); cursor: pointer; }
.fv-pick { position: absolute; left: 50%; top: 40px; transform: translateX(-50%); width: 520px; max-width: calc(100% - 24px); max-height: calc(100% - 80px); z-index: 8; display: flex; flex-direction: column; gap: 8px;
  background: var(--card); border: 1px solid var(--line2); border-radius: 8px; padding: 0 12px 12px; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); font-size: 13px; }
.fv-pick header { margin: 0 -12px; padding: 10px 12px; } .fv-pick .sp { flex: 1; } .fv-pick .row { display: flex; gap: 8px; align-items: center; }
.fv-pl { overflow: auto; min-height: 60px; border: 1px solid var(--line2); border-radius: 6px; }
.fv-pl label { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; cursor: pointer; } .fv-pl label:hover { background: rgba(0, 0, 0, .05); }
.fv-pl small { display: block; color: #6b7280; } .fv-pl b { overflow-wrap: anywhere; }

/* Meldungen liegen unten in der Mitte über den Knöpfen der 3D-Ansicht: Klicks gehen durch sie hindurch */
#toast { pointer-events: none; }

/* AKS – Anlagenkennschlüssel */
.ak-list .dt td { vertical-align: top; }
.ak-list tbody tr:hover td { background: var(--sel); }
.ak-list tbody tr.ak-title td, .ak-list tbody tr.ak-title:hover td { background: var(--acc-soft); font-weight: 600; }
.ak-list tbody tr.ak-t1 td { font-weight: 700; }
.ak-list tbody tr.ak-t3 td, .ak-list tbody tr.ak-t3:hover td { background: color-mix(in srgb, var(--acc-soft) 40%, transparent); font-weight: 500; }
.ak-list td.ak-dup { color: var(--red); background: #fdecec; }
.ak-cl { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; line-height: 1.35; }
.dlg.ak-dlg { width: 1040px; }
.ak-grp { border: 1px solid var(--line); border-radius: 8px; margin: 10px 0 0; padding: 2px 12px 12px; min-width: 0; }
.ak-grp legend { font-size: 12px; font-weight: 600; color: var(--acc); padding: 0 6px; }
.ak-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 12px; }
.ak-grid > div { min-width: 0; } .ak-grid .ak-wide { grid-column: span 2; }
.ak-grid label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ak-grid label i { font-style: normal; color: var(--red); } .ak-grid label i.mute { color: var(--mute); }
.ak-grid .inp { width: 100%; } .ak-grid .inp:disabled { background: #f3f2ee; color: var(--mute); }
.ak-grid .ak-key { font-weight: 600; background: var(--acc-soft); border-color: var(--acc-soft); }
table.ak-cols { table-layout: fixed; min-width: 0; } .ak-cols td { vertical-align: top; max-width: none; } .ak-cols td.mn { width: auto; } .ak-cols .btn.icon { padding: 2px 7px; margin-left: 2px; }

/* Druckvorlage und Deckblatt (druck.js) */
.dr-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.dr-pick label { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 14px 8px 10px; border: 1px solid var(--line2); border-radius: 9px; cursor: pointer; font-size: 13px; color: var(--ink); background: #fff; }
.dr-pick label:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.dr-pick img { height: 34px; display: block; }
.dr-chk { display: flex !important; align-items: center; gap: 8px; font-size: 13px !important; color: var(--ink) !important; margin-top: 14px !important; cursor: pointer; }
.dr-cover { border: 0; padding: 0; margin: 0; min-width: 0; } .dr-cover:disabled { opacity: .45; }
.dr-tab { width: 100%; border-collapse: collapse; } .dr-tab th { text-align: left; font-size: 12px; font-weight: normal; color: var(--mute); padding: 0 6px 3px 0; }
.dr-tab td { padding: 3px 6px 3px 0; } .dr-tab td:nth-child(2) { width: 190px; } .dr-tab td:last-child { width: 1%; padding-right: 0; }
.dr-g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 10px; }
.dr-g1 > div { width: 100%; }

/* Bemusterungsblatt (muster.js) */
.page.mu-page { max-width: 1400px; }
.mu-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .mu-cols { grid-template-columns: minmax(0, 1fr); } }
.mu-form, .mu-docs { padding: 16px 18px; } .mu-form h3 { margin: 0; }
.mu-g { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; } .mu-g > div { min-width: 0; } .mu-g .mu-w { grid-column: 1 / -1; }
.mu-doc { display: flex; align-items: center; gap: 6px; padding: 7px 4px; border-top: 1px solid var(--line); }
.mu-doc[draggable="true"] { cursor: grab; } .mu-doc.mu-fix { background: var(--grp); } .mu-doc.mu-miss .mu-name b { color: var(--red); }
.mu-no { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--acc-soft); color: var(--acc); font-weight: 600; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.mu-fix .mu-no { background: none; color: var(--mute); }
.mu-name { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; } .mu-red { color: #e11d48; font-weight: 600; }
.mu-doc .btn { padding: 4px 9px; }
.mu-pick { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; }
.mu-pick label { display: flex; gap: 9px; align-items: flex-start; margin: 0; padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink); cursor: pointer; }
.mu-pick label:hover { background: var(--sel); } .mu-pick input { margin-top: 3px; } .mu-pick i { font-style: normal; }
.mu-view { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; background: var(--bg); }
.mu-view .bar .sep { align-self: center; height: 22px; } .mu-vname { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Protokoll: Anlagen an den Aufgaben */
.pa-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; }
.pa-row { flex-direction: column; align-items: stretch; } .pa-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.pa-tab { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line2); table-layout: fixed; }
.pa-tab th { text-align: left; font-weight: 600; font-size: 11.5px; color: var(--mute); padding: 3px 8px; border-bottom: 1px solid var(--line2); background: var(--bg); }
.pa-tab td { padding: 3px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; } .pa-tab tr:last-child td { border-bottom: 0; }
.pa-tab .pa-nr { width: 58px; } .pa-tab th:nth-child(3), .pa-tab .pa-rl { width: 110px; } .pa-tab th:nth-child(4), .pa-tab .pa-act { width: 150px; text-align: right; white-space: nowrap; }
.pa-tab td.pa-n { max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pa-x:disabled { opacity: .3; cursor: default; }
.pa-chip { display: inline-flex; gap: 6px; align-items: center; max-width: 100%; padding: 2px 4px 2px 8px; border: 1px solid var(--line2); border-radius: 6px; background: #fff; }
.pa-chip .pa-n { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa-red { color: #e11d48; font-weight: 600; white-space: nowrap; } .pa-miss, .pa-miss .pa-n { color: var(--red); }
.pa-x { border: 0; background: none; cursor: pointer; color: var(--mute); padding: 0 4px; font-size: 13px; } .pa-x:hover { color: var(--ink); }
.btn.pa-btn { padding: 2px 9px; font-size: 12px; }

/* Board (Zeichenfläche je Projekt) – public/board.js */
.bd-root { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; background: var(--bg); }
.bd-bar .bd-title { width: 280px; font-weight: 600; } .bd-bar .btn.icon { display: inline-flex; padding: 4px 7px; } .bd-st.err { color: var(--red); }
.bd-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; background: #faf9f6; }
.bd-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; cursor: default; }
.bd-svg[data-tool="hand"], .bd-svg.grabbable { cursor: grab; } .bd-svg.grab { cursor: grabbing; }
.bd-svg[data-tool="shape"], .bd-svg[data-tool="note"], .bd-svg[data-tool="frame"], .bd-svg[data-tool="line"], .bd-svg[data-tool="pen"] { cursor: crosshair; } .bd-svg[data-tool="text"] { cursor: text; }
.bd-svg[data-tool="select"] .bd-world [data-id] { cursor: move; }
.bd-box { fill: none; stroke: var(--acc); stroke-width: 1.5; pointer-events: none; } .bd-box.bd-all { stroke-dasharray: 4 3; }
.bd-hot { fill: rgba(15, 110, 110, .08); stroke: var(--acc); stroke-width: 2; pointer-events: none; }
.bd-marq { fill: rgba(15, 110, 110, .08); stroke: var(--acc); stroke-width: 1; pointer-events: none; }
.bd-h { fill: #fff; stroke: var(--acc); stroke-width: 1.5; }
.bd-h-nw, .bd-h-se { cursor: nwse-resize; } .bd-h-ne, .bd-h-sw { cursor: nesw-resize; } .bd-h-n, .bd-h-s { cursor: ns-resize; } .bd-h-e, .bd-h-w { cursor: ew-resize; }
.bd-end { cursor: crosshair; } .bd-dot { fill: var(--acc); stroke: #fff; opacity: .45; cursor: crosshair; } .bd-dot:hover { opacity: 1; }
.bd-tools { position: absolute; left: 12px; top: 12px; display: flex; flex-direction: column; gap: 2px; padding: 5px; background: var(--card); border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 4px 18px rgba(0, 0, 0, .08); }
.bd-tools button, .bd-ctx button, .bd-zoom button { border: 0; background: none; border-radius: 7px; min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; color: var(--ink); }
.bd-tools button:hover, .bd-ctx button:hover, .bd-zoom button:hover, .bd-pop button:hover { background: var(--grp); }
.bd-tools button.on, .bd-ctx button.on, .bd-pop button.on { background: var(--acc-soft); color: var(--acc); }
.bd-ctx { position: absolute; display: flex; align-items: center; gap: 2px; padding: 4px; background: var(--card); border: 1px solid var(--line2); border-radius: 10px; box-shadow: 0 4px 18px rgba(0, 0, 0, .1); white-space: nowrap; z-index: 3; }
.bd-ctx select { border: 0; background: none; height: 32px; border-radius: 7px; padding: 0 4px; cursor: pointer; } .bd-ctx select:hover { background: var(--grp); }
.bd-sep { width: 1px; height: 20px; background: var(--line); margin: 0 3px; }
.bd-sw { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line2); }
.bd-sw.none { background: linear-gradient(135deg, #fff 45%, var(--red) 45%, var(--red) 55%, #fff 55%); } .bd-sw.ring { background: none; border-width: 4px; }
.bd-tc { font-weight: 700; border-bottom: 3px solid; line-height: 1.1; padding: 0 2px; }
.bd-pop { position: absolute; z-index: 5; background: var(--card); border: 1px solid var(--line2); border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, .15); padding: 8px; }
.bd-pop button { border: 0; background: none; border-radius: 6px; padding: 4px 8px; }
.bd-pal { display: grid; grid-template-columns: repeat(9, 28px); gap: 2px; } .bd-pal button { padding: 4px; display: flex; }
.bd-cust { display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--mute); position: relative; } .bd-cust input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.bd-prow { display: flex; align-items: center; gap: 2px; margin-top: 6px; } .bd-prow span { width: 48px; font-size: 12px; color: var(--mute); }
.bd-kinds { display: grid; grid-template-columns: repeat(4, auto); gap: 2px; } .bd-kinds button { padding: 5px; display: flex; }
.bd-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 2px; padding: 4px; background: var(--card); border: 1px solid var(--line2); border-radius: 10px; }
.bd-zoom .bd-zl { min-width: 58px; font-size: 12px; }
.bd-edit { position: absolute; display: flex; align-items: flex-start; z-index: 2; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.25; }
.bd-edit[data-t="shape"], .bd-edit[data-t="note"] { align-items: center; } .bd-edit[data-t="line"], .bd-edit[data-t="frame"] { background: #fff; }
.bd-edit > div { flex: 1; min-width: 0; outline: none; white-space: pre-wrap; overflow-wrap: anywhere; } .bd-edit.nowrap > div { white-space: pre; }
.bd-edit[data-t="text"], .bd-edit[data-t="frame"], .bd-edit[data-t="line"] { outline: 1.5px solid var(--acc); outline-offset: 2px; }

/* Office-Editor (office.js) */
.of-view { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; background: var(--bg); }
.of-view iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.of-view form { display: none; }

/* Ordnerrechte (Präfix fr-) und Drei-Punkte-Knopf im Ordnerbaum */
.tn .tm { border: 0; background: none; color: var(--mute); cursor: pointer; padding: 0 6px; border-radius: 5px; font: inherit; line-height: 1.2; flex: none; }
.tn .tm:hover, .tn .tm:focus-visible { background: rgba(0, 0, 0, .08); color: inherit; }
.tn.fr-no .nm { color: var(--mute); font-style: italic; }
.fr-tab { width: 100%; border-collapse: collapse; margin-bottom: 6px; }
.fr-tab th, .fr-tab td { text-align: left; padding: 6px 8px 6px 0; border-bottom: 1px solid rgba(0, 0, 0, .08); vertical-align: middle; }
.fr-tab th { font-size: 12px; color: var(--mute); font-weight: 600; }
.fr-tab td:last-child { width: 58%; }

/* Textsuche im PDF-Betrachter (pdfview.js) */
.pv-find { position: absolute; top: 10px; right: 12px; z-index: 5; display: flex; gap: 4px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); cursor: default; font-size: 13px; }
.pv-find .inp { width: 190px; padding: 4px 8px; } .pv-fn { min-width: 62px; text-align: center; color: var(--mute, #6b7280); white-space: nowrap; }

/* Sync-Übersicht (Präfix sy-) */
.page.sy-page { max-width: 1280px; }
.sy-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 16px; }
.sy-tile { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; color: inherit; text-decoration: none; border-left: 5px solid var(--line2); }
.sy-tile.sy-ok { border-left-color: #2e9e6b; } .sy-tile.sy-run { border-left-color: #1e5fa8; } .sy-tile.sy-warn { border-left-color: #e08a1e; } .sy-tile.sy-fehler { border-left-color: #c0392b; }
.pill.sy-err { color: #b3261e; border-color: #f0c2bd; background: #fdecea; }
.sy-sec { padding: 14px 18px 16px; margin-bottom: 16px; overflow: auto; } .sy-sec h3 { margin: 0; }
.sy-tab th, .sy-tab td { text-align: left; padding: 8px 12px 8px 0; border-top: 1px solid var(--line); vertical-align: top; }
.sy-tab th { font-size: 12px; color: var(--mute); font-weight: 600; border-top: 0; white-space: nowrap; }
.sy-yes { color: #1f7a52; } .sy-no { color: #b3261e; }
.sy-more { padding: 1px 8px; font-size: 12px; margin-top: 4px; }
.sy-msg { white-space: pre-wrap; font: 12px/1.45 ui-monospace, monospace; background: #f6f5f1; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 6px 0 0; max-width: 560px; max-height: 240px; overflow: auto; }
/* Bauteilebene zur AKS (bauteile.js) */
.bt-chip { background: var(--acc-soft); border-radius: 12px; padding: 3px 10px; font-size: 12px; } .bt-chip a { margin-left: 6px; text-decoration: none; color: var(--mute); }
.ak-list td.bt-inh { color: var(--mute); }
.bt-inhbox { background: color-mix(in srgb, var(--acc-soft) 35%, transparent); padding-top: 6px; }
.bt-inhgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 12px; }
.bt-inhgrid > div { min-width: 0; } .bt-inhgrid span, .bt-inhgrid b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-inhgrid span { font-size: 11px; color: var(--mute); } .bt-inhgrid b { font-weight: 500; }
.bt-hide { padding: 6px 16px 14px; } .bt-hg { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 14px; margin-top: 10px; }
.bt-hn { grid-column: 1 / -1; font-size: 12px; font-weight: 600; color: var(--acc); }
.bt-hg label { display: flex; gap: 6px; align-items: center; margin: 0; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-st { margin: 12px 0 8px; max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; } .bt-st table { min-width: 0; width: 100%; } .bt-st td { vertical-align: middle; } .bt-st .inp { width: 100%; }
.bt-st tr.bt-all td { background: var(--acc-soft); }

/* Projektstammdaten (stammdaten.js) */
.page.sd-page { max-width: 1280px; }
.sd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 2px; }
.sd-grid > div { min-width: 0; } .sd-grid .sd-wide { grid-column: span 2; } .sd-grid .inp { width: 100%; }
.sd-tab { width: 100%; border-collapse: collapse; } .sd-tab th { text-align: left; font-size: 12px; font-weight: normal; color: var(--mute); padding: 0 6px 3px 0; }
.sd-tab td { padding: 3px 6px 3px 0; } .sd-tab td:nth-child(1) { width: 190px; } .sd-tab td:nth-child(3) { width: 180px; } .sd-tab td:nth-child(6), .sd-tab td:nth-child(7) { width: 86px; } .sd-tab td:last-child { width: 1%; padding-right: 0; }
.sd-tab .inp { width: 100%; }
.ak-grid .inp.ak-stamm, .mu-sv { background: var(--acc-soft); border-color: var(--acc-soft); }
.mu-sv { border-radius: 8px; padding: 7px 10px; min-height: 34px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sd-res { padding: 12px 18px; margin-bottom: 16px; border-color: var(--acc); } .sd-res ul { margin: 6px 0 0; padding-left: 20px; }

/* Content Catalog (katalog.js) */
.kt-nums { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; } .kt-nums > div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; min-width: 150px; }
.kt-nums b { display: block; font-size: 20px; } .kt-nums span { font-size: 12px; color: var(--mute); }
.kt-busy { color: var(--acc); font-weight: 600; margin: 8px 0; }
.kt-params { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.kt-params > div { display: flex; gap: 8px; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 3px 0; font-size: 12.5px; min-width: 0; }
.kt-params span { color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 55%; } .kt-params b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.kt-pick { position: relative; } .kt-cur { white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; gap: 8px; } .kt-cur b { overflow: hidden; text-overflow: ellipsis; }
.kt-res { border: 1px solid var(--line2); border-radius: 8px; margin-top: 6px; max-height: 260px; overflow: auto; background: var(--card); }
.kt-res > div { display: grid; grid-template-columns: 70px 1.2fr 1fr 1.6fr; gap: 10px; padding: 5px 10px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: 13px; } .kt-res > div:hover { background: var(--acc-soft); }
.kt-res span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Mehrfachauswahl in der Spalten-/Feldverwaltung */
.ak-selbar { position: sticky; top: 0; z-index: 5; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; padding: 8px 12px; background: var(--acc-soft); border-radius: 10px; }
.ak-selbar[hidden] { display: none; }
.ak-cols tr.ak-on td { background: var(--acc-soft); }
.ak-cols td input[type=checkbox], .ak-cols th input[type=checkbox] { margin: 2px 0 0; }

/* Stammdaten: Gruppen und Tabellen-Felder im Projektdialog */
.sd-gh { margin: 18px 0 0; font-size: 13px; color: var(--acc); } .sd-grid.sd-ingroup { margin-top: 4px; }
.sd-tb { width: 100%; border-collapse: collapse; } .sd-tb th { text-align: left; font-size: 12px; font-weight: normal; color: var(--mute); padding: 0 4px 2px 0; }
.sd-tb td { padding: 2px 4px 2px 0; } .sd-tb td:last-child { width: 1%; padding-right: 0; } .sd-tb-add { margin-top: 4px; }
/* Stammdaten: Gruppen als Reiter im Projektdialog */
.sd-tabs { display: flex; flex-wrap: wrap; gap: 2px 4px; border-bottom: 1px solid var(--line); margin: 10px 0 4px; }
.sd-tabb { border: 0; background: none; font: inherit; font-size: 13px; color: var(--mute); padding: 6px 9px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sd-tabb:hover { color: inherit; } .sd-tabb.on { color: var(--acc); border-bottom-color: var(--acc); font-weight: 600; }
.sd-pane { display: none; min-height: 300px; } .sd-pane.on { display: block; } .sd-pane > .sd-grid.sd-ingroup { border-top: 0; margin-top: 0; }
.dlg.wide:has(.sd-tabs) { width: 940px; }

/* ---------- Honorarermittlung (public/honorar.js; Blatt-Gestaltung kommt aus honorar-blatt.js) ---------- */
.hn-wrap { display: flex; flex: 1; min-height: 0; }
.hn-nav { width: 248px; flex: none; overflow: auto; border-right: 1px solid var(--line); background: var(--card); padding: 6px 8px 16px; }
.hn-nav h5 { margin: 14px 8px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--mute); } .hn-nav h5 span { color: var(--acc); }
.hn-nav a { display: block; padding: 4px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 13px; }
.hn-nav a:hover { background: var(--grp); } .hn-nav a.leer { color: var(--mute); } .hn-nav a.on { background: var(--acc-soft); color: var(--acc); font-weight: 600; }
.hn-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hn-bar { display: flex; gap: 8px; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--line); background: var(--card); flex-wrap: wrap; }
.hn-sumtag { background: var(--acc-soft); color: var(--acc); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
.hn-body { flex: 1; overflow: auto; padding: 16px; min-height: 0; }
.hn-paper { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; max-width: 1080px; margin: 0 auto; }
.hn-paper.quer { max-width: none; } .hn-title { margin: 0 0 10px; } .hn-foot { max-width: 1080px; margin: 10px auto 0; }
.hn-in { border: 1px solid #dccb86; background: #fffbe6; border-radius: 4px; padding: 2px 5px; font: inherit; width: 100%; min-width: 0; color: var(--ink); }
.hn-in:focus { outline: 2px solid var(--acc-soft); border-color: var(--acc); background: #fff; }
.hn-in.hn-n { text-align: right; } .hn-r > .hn-in { width: calc(100% - 16px); } .hn-c > .hn-in.hn-n { width: 56px; } select.hn-in { padding: 1px 2px; }
.hn-kopf .hn-in { width: 70%; margin-top: 2px; } .hn-lab + .hn-in { width: calc(100% - 160px); }
.hn-sec { margin: 0 0 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.hn-sec > summary { padding: 8px 12px; font-weight: 600; cursor: pointer; font-size: 13px; } .hn-sec > summary small { font-weight: 400; color: var(--mute); margin-left: 10px; }
.hn-sec > .hn-half { margin: 0 12px 12px; }
.hn-scroll { overflow-x: auto; padding: 0 12px 4px; }
.hn-gt { table-layout: fixed; min-width: 1480px; margin-top: 0; } .hn-g0 { width: 232px; }
.hn-gt th:first-child, .hn-gt td:first-child { position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; white-space: normal; }
.hn-gt .hn-sum td:first-child, .hn-gt .hn-zw td:first-child { background: #f3f5f8; } .hn-gt .hn-lp td:first-child { background: #f0f6fb; }
.hn-gt th { position: sticky; top: 0; } .hn-gt th small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hn-kz td { padding: 3px 4px; } .hn-kz .hn-in { display: block; margin-top: 2px; width: 100%; } .hn-na { background: #f4f3ef; }
.hn-kg { display: block; font-size: 10px; color: #5a646e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 14px; } .hn-kg .hn-in { font-size: 10px; margin: 0; }
.hn-glob { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; } .hn-glob label { display: flex; flex-direction: column; font-size: 11px; color: var(--mute); gap: 3px; } .hn-glob .hn-n { width: 110px; } .hn-glob select { width: auto; max-width: 330px; }
.hn-blr td:first-child { font-size: 11px; } .hn-blin { display: flex; gap: 3px; margin-top: 3px; } .hn-blin .hn-in { flex: 1; width: auto; font-size: 10px; padding: 1px 3px; } .hn-blin select.hn-in { flex: 1.6; }
.hn-xa { white-space: nowrap; } .hn-xa .hn-in { width: 78px; margin-left: 5px; font-size: 11px; }
.hn-blin { flex-wrap: wrap; } .hn-blin select.hn-in { flex: 1 0 100%; }
.hn-paper.quer { overflow-x: auto; }
.hn-paper .hn-blt { width: max-content !important; font-size: 11px; }
.hn-paper .hn-blt .hn-in.hn-n { width: 74px; } .hn-paper .hn-blt select.hn-in { width: 124px; }
.hn-paper .hn-blt .hn-blb { position: sticky; left: 0; z-index: 1; background: #fff; max-width: 270px; white-space: normal; } .hn-paper .hn-blt th.hn-blb { background: #e8f1f8; }
.hn-paper .hn-blt .hn-lp td, .hn-paper .hn-blt .hn-sum td { position: static; } .hn-paper .hn-blt .hn-blb .hn-in { width: 250px; }
.sd-mg td:first-child { width: 50%; } .sd-mg td { padding-top: 3px; padding-bottom: 3px; }
.hn-zbtn { float: right; font-size: 11px; font-weight: 400; padding: 1px 9px; margin: -2px 0; }
.hn-zs td { background: #f3f5f8; } .hn-gt .hn-zs td:first-child { background: #f3f5f8; }
.hn-ro { display: block; margin-top: 2px; padding: 3px 6px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; border: 1px dashed #b9bcc6; border-radius: 4px; color: #3c4250; }
.hn-sub2 { display: block; padding-left: 12px; font-size: 11px; }
.hn-phd::placeholder { color: var(--ink); opacity: 1; font-weight: 600; } .hn-sum .hn-zbtn { float: none; margin: 0; }
/* Bauteileditor (kataloged.js) */
.ke-n { background: var(--acc); color: #fff; border-radius: 99px; padding: 0 7px; font-size: 11px; margin-left: 4px; } .btn.pri .ke-n { background: #fff; color: var(--acc); }
.pill.ke-bad { color: var(--red); border-color: #f0c4c4; background: #fdf0f0; }
.ke-boxes { display: flex; flex-wrap: wrap; gap: 4px 16px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; max-height: 190px; overflow: auto; }
.ke-box { display: inline-flex !important; align-items: center; gap: 6px; margin: 0 !important; font-size: 13px !important; color: inherit !important; white-space: nowrap; }
.ke-ro { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 18px; margin-top: 10px; } .ke-ro span { display: block; font-size: 12px; color: var(--mute); } .ke-ro b { font-weight: 500; word-break: break-word; }
.ke-ptab { border: 1px solid var(--line); border-radius: 8px; max-height: 62vh; overflow: auto; }
.ke-ph, .ke-pr { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(140px, 1fr) minmax(200px, 1.3fr) 130px; gap: 10px; align-items: center; padding: 4px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.ke-ph { position: sticky; top: 0; background: var(--card); font-size: 12px; color: var(--mute); font-weight: 600; z-index: 1; padding: 7px 10px; }
.ke-pr[hidden] { display: none; } .ke-pr > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } .ke-pr .inp { padding: 3px 8px; }
.inp.ke-diff { border-color: #e0a100; background: #fff9e6; }
.ke-dlg { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0 10px; } .ke-dlg th { text-align: left; font-size: 12px; color: var(--mute); } .ke-dlg td, .ke-dlg th { padding: 4px 8px 4px 0; border-bottom: 1px solid var(--line); vertical-align: top; word-break: break-word; }
.ke-jobs > div { display: grid; grid-template-columns: 70px minmax(160px, 1.2fr) minmax(180px, 1fr) minmax(200px, 2fr); gap: 10px; align-items: center; padding: 4px 0; border-top: 1px solid var(--line); font-size: 13px; } .ke-jobs > div > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
