:root{
  --bg:#F1F2F6; --surface:#FFFFFF; --ink:#20243D; --muted:#5B6178;
  --accent:#31366C; --accent-ink:#FFFFFF; --accent-2:#565D8C;
  --border:#DBDDE7; --danger:#B4231B; --ok:#2B6F5C; --radius:10px;
}
@media (prefers-color-scheme: dark){
  :root{
    --bg:#14162A; --surface:#1E2140; --ink:#E7E8F2; --muted:#9A9FC0;
    --accent:#7B82C4; --accent-ink:#12142A; --accent-2:#A0A5D6;
    --border:#33375C; --danger:#E06158; --ok:#4E9C86;
  }
}
*{box-sizing:border-box;}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  line-height:1.5;
}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;}
.wrap{max-width:1180px; margin:0 auto; padding:32px 28px 90px;}
header.top{margin-bottom:32px;}
.brand{ display:flex; align-items:center; gap:18px; }
.brand-logo{
  height:52px; width:auto; flex-shrink:0; background:#fff; padding:8px 12px;
  border-radius:8px; box-shadow:0 1px 3px rgba(0,0,0,0.08);
}
header.top h1{font-size:1.5rem; font-weight:700; margin:0 0 4px; letter-spacing:-0.01em; color:var(--accent);}
header.top p{margin:0; color:var(--muted); font-size:1rem;}

.step{ position:relative; padding-left:44px; margin-bottom:22px; }
.step::before{
  content:attr(data-n); position:absolute; left:0; top:2px; width:30px; height:30px;
  border-radius:50%; background:var(--surface); border:1.5px solid var(--border);
  color:var(--muted); font-family:ui-monospace,monospace; font-size:0.8rem;
  display:flex; align-items:center; justify-content:center; font-weight:500;
}
.step::after{
  content:""; position:absolute; left:14px; top:34px; bottom:-22px; width:1px; background:var(--border);
}
.step:last-of-type::after{ display:none; }

.card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:20px 24px; }
.card h2{ font-size:1.15rem; font-weight:600; margin:0 0 6px; }
.card .hint{ color:var(--muted); font-size:0.92rem; margin:0 0 14px; }

.tabbar{ display:flex; gap:4px; border-bottom:1px solid var(--border); }
.tab-btn{ border:none; background:transparent; border-radius:7px 7px 0 0; padding:8px 16px; color:var(--muted); font-size:0.9rem; border-bottom:2px solid transparent; margin-bottom:-1px; }
.tab-btn:hover{ color:var(--ink); border-color:transparent; }
.tab-btn.active{ color:var(--accent); border-bottom:2px solid var(--accent); font-weight:600; }

input[type=text], input[type=email], input[type=date], textarea{
  width:100%; font-family:inherit; font-size:1rem; color:var(--ink);
  background:var(--bg); border:1px solid var(--border); border-radius:7px; padding:11px 12px; outline:none;
}
input:focus, textarea:focus{ border-color:var(--accent); box-shadow:0 0 0 3px rgba(49,54,108,0.15); }
textarea{ resize:vertical; }
label.field{ display:block; font-size:0.82rem; color:var(--muted); margin:0 0 4px; }
.row{ display:flex; gap:10px; flex-wrap:wrap; }
.row > *{ flex:1; min-width:140px; }

button{
  font-family:inherit; font-size:0.95rem; font-weight:600; cursor:pointer;
  border-radius:7px; padding:11px 16px; border:1px solid var(--border); background:var(--surface); color:var(--ink);
}
button:hover{ border-color:var(--accent); }
button:disabled{ opacity:0.45; cursor:not-allowed; }
button.primary{ background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
button.ghost{ background:transparent; border-color:transparent; padding:6px 8px; color:var(--muted); }
button.danger-btn{ border-color:var(--danger); color:var(--danger); background:transparent; }
button.small{ padding:5px 9px; font-size:0.78rem; }

input[type=file]{ font-size:0.85rem; max-width:100%; }
.status{ font-size:0.85rem; margin-top:8px; }
.status.ok{ color:var(--ok); }
.status.err{ color:var(--danger); }
.status.muted{ color:var(--muted); }

.tree{ margin-top:12px; max-height:min(72vh, 1000px); overflow-y:auto; border-top:1px solid var(--border); padding-top:10px; font-size:1rem; }
.node{ margin:2px 0; }
.node-row{ display:flex; align-items:flex-start; gap:8px; padding:7px 6px; border-radius:6px; cursor:pointer; }
.node-row:hover{ background:var(--bg); }
.node-row input[type=checkbox]{ margin-top:4px; width:16px; height:16px; flex-shrink:0; }
.node-label{ font-size:0.96rem; }
.node-label .rno{ color:var(--accent-2); font-family:"IBM Plex Mono", monospace; font-size:0.82rem; margin-right:6px; }
.item-meta{ color:var(--muted); font-size:0.82rem; }
.children{ margin-left:24px; border-left:1px dashed var(--border); padding-left:12px; }
.treebar{ display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; }
.count-pill{ font-family:ui-monospace,monospace; font-size:0.84rem; color:var(--muted); background:var(--bg); border:1px solid var(--border); border-radius:20px; padding:4px 12px; }

.collapse-toggle{
  border:none; background:transparent; color:var(--muted); font-size:0.85rem;
  width:20px; height:20px; padding:0; margin-top:2px; line-height:1; cursor:pointer;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.collapse-toggle:hover{ color:var(--accent); border-color:transparent; }

.assign-line{ margin:2px 0 6px 30px; }
.assign-wrap{ position:relative; display:inline-block; }
.assign-toggle{ font-size:0.74rem; padding:3px 9px; border-radius:20px; }
.assign-toggle.ghost{ color:var(--muted); border:1px dashed var(--border); background:transparent; }
.assign-toggle.set{ background:rgba(86,93,140,0.14); border-color:var(--accent-2); color:var(--accent-2); }
.assign-toggle.inherited{ color:var(--muted); border:1px dashed var(--border); background:transparent; font-style:italic; }
.item-assign-line{ margin-left:30px; }
.assign-pop{ margin-top:6px; background:var(--bg); border:1px solid var(--border); border-radius:8px; padding:8px 10px; display:flex; flex-direction:column; gap:6px; max-width:300px; min-width:220px; }
.assign-pop-list{ display:flex; flex-direction:column; gap:5px; max-height:220px; overflow-y:auto; }
.assign-pop-item{ font-size:0.82rem; display:flex; align-items:center; gap:6px; }
.assign-search{ font-size:0.82rem !important; padding:6px 8px !important; }
.assign-gewerk-filter{ font-size:0.82rem !important; padding:6px 8px !important; width:100%; }
.fav-mark{ color:#d9a017; font-size:0.9em; }
.sub-mark{ font-size:0.85em; }
.root-row{ background:var(--bg); border-radius:7px; padding:8px 10px !important; margin-bottom:4px; }
.root-row .node-label{ font-weight:600; font-size:0.85rem; }

.supplier-item{ display:flex; align-items:center; gap:10px; padding:8px 4px; border-bottom:1px solid var(--border); }
.supplier-item:last-child{ border-bottom:none; }
.supplier-info{ flex:1; min-width:0; }
.supplier-name{ font-weight:600; font-size:0.9rem; }
.supplier-sub{ color:var(--muted); font-size:0.78rem; }
.tag{ display:inline-block; background:var(--bg); border:1px solid var(--border); border-radius:20px; padding:1px 8px; font-size:0.72rem; color:var(--muted); margin-left:6px; }

.gewerk-group{ border-bottom:1px solid var(--border); }
.gewerk-group:last-child{ border-bottom:none; }
.gewerk-header{
  width:100%; display:flex; align-items:center; gap:8px; padding:9px 6px;
  background:transparent; border:none; border-radius:6px; cursor:pointer;
  font-size:0.9rem; font-weight:600; color:var(--ink); text-align:left;
}
.gewerk-header:hover{ background:var(--bg); border-color:transparent; }
.gewerk-arrow{ color:var(--muted); font-size:0.8rem; width:14px; flex-shrink:0; }
.gewerk-name{ flex:1; }
.gewerk-count{ color:var(--muted); font-weight:500; font-size:0.78rem; background:var(--bg); border:1px solid var(--border); border-radius:20px; padding:1px 9px; }
.gewerk-body{ padding-left:22px; }
#supplierList{ max-height:min(65vh, 900px); overflow-y:auto; }
.fav-star{ border:none; background:transparent; color:var(--border); font-size:1.3rem; padding:0 4px; line-height:1; cursor:pointer; flex-shrink:0; }
.fav-star.active{ color:#d9a017; }
.fav-star:hover{ color:#d9a017; border-color:transparent; }
.supplier-edit{ flex-direction:column; align-items:stretch; gap:8px; padding:10px 4px; }
.supplier-edit-fields{ display:flex; flex-direction:column; gap:6px; }
.supplier-edit-fields input{ font-size:0.88rem; padding:7px 9px; }
.supplier-edit-actions{ display:flex; gap:8px; justify-content:flex-end; }

.genlog{ margin-top:10px; font-size:0.85rem; }
.genlog div{ padding:3px 0; }
.genlog .ok{ color:var(--ok); }
.genlog .err{ color:var(--danger); }
.genlog .muted{ color:var(--muted); }

.hist-row{ display:flex; flex-wrap:wrap; gap:4px 12px; padding:8px 4px; border-bottom:1px solid var(--border); font-size:0.82rem; }
.hist-row:last-child{ border-bottom:none; }
.hist-row .hd{ color:var(--muted); }

.empty{ color:var(--muted); font-size:0.85rem; padding:6px 2px; }

/* ---- Vorschläge aus dem LV ---- */
.suggest-box{ border:1px solid var(--border); border-left:4px solid var(--accent); border-radius:8px; background:var(--bg); padding:10px 14px; margin-bottom:12px; }
.suggest-head{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.suggest-head .spacer{ flex:1; }
.sg-also{ font-size:0.82rem; color:var(--muted); display:flex; align-items:center; gap:5px; cursor:pointer; }
#suggestList{ margin-top:10px; max-height:min(45vh, 520px); overflow-y:auto; }
.sg-section{ font-size:0.78rem; text-transform:uppercase; letter-spacing:0.04em; color:var(--muted); margin:10px 0 6px; font-weight:600; }
.sg-row{ background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:9px 12px; margin-bottom:7px; }
.sg-row.done{ opacity:0.65; }
.sg-title{ font-size:0.92rem; }
.sg-ok{ color:var(--ok); font-size:0.8rem; font-weight:600; margin-left:6px; }
.sg-chips{ display:flex; flex-wrap:wrap; gap:5px; margin:6px 0; align-items:center; }
.sg-chip{ font-size:0.75rem; background:var(--bg); border:1px solid var(--border); border-radius:20px; padding:1px 9px; color:var(--muted); }
.sg-cands{ display:flex; flex-direction:column; gap:3px; margin:4px 0 6px; }
.sg-cand-item{ font-size:0.85rem; display:flex; align-items:center; gap:6px; }
.sg-actions{ display:flex; gap:8px; align-items:center; justify-content:flex-end; flex-wrap:wrap; }
.hint-brand{ display:inline-block; margin-left:8px; font-size:0.74rem; background:rgba(49,54,108,0.10); color:var(--accent); border-radius:20px; padding:1px 9px; font-weight:600; }

/* ---- Spalte "Erkannte Hersteller" im LV ---- */
.tree-head{
  position:sticky; top:-10px; z-index:5; display:flex; align-items:center; gap:8px;
  background:var(--surface); border-bottom:2px solid var(--accent);
  padding:8px 6px; margin:-10px 0 6px; font-size:0.78rem; text-transform:uppercase;
  letter-spacing:0.04em; color:var(--accent); font-weight:700;
}
.tree-head > span:first-child{ flex:1; }
.node-row .node-label{ flex:1; min-width:0; }
.col-brand{ flex:0 0 230px; width:230px; display:flex; flex-wrap:wrap; gap:4px; align-items:flex-start; justify-content:flex-start; }
.tree-head .col-brand{ align-items:center; }
.brand-chip{
  font-size:0.76rem; font-weight:600; padding:2px 10px; border-radius:20px; line-height:1.4;
  background:rgba(49,54,108,0.10); color:var(--accent); border:1px solid rgba(49,54,108,0.25); cursor:pointer;
}
.brand-chip:hover{ background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
.brand-chip.done{ background:rgba(43,111,92,0.13); color:var(--ok); border-color:rgba(43,111,92,0.35); }
.brand-chip.agg{ cursor:default; background:transparent; border-style:dashed; font-weight:500; }
.brand-chip.agg:hover{ background:transparent; color:var(--accent); border-color:rgba(49,54,108,0.25); }
@media (max-width:900px){ .col-brand{ flex-basis:150px; width:150px; } }

/* ---- Erkennungs-Plaketten in der Lieferantenliste ---- */
.gewerk-det{ font-size:0.7rem; font-weight:700; background:rgba(49,54,108,0.12); color:var(--accent); border-radius:20px; padding:1px 9px; }
.gewerk-det.soft{ background:transparent; border:1px dashed rgba(49,54,108,0.35); font-weight:500; }
.tag-det{ background:rgba(49,54,108,0.10); border-color:rgba(49,54,108,0.3); color:var(--accent); font-weight:600; cursor:help; }
#btnOnlyDetected.active{ background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
.sg-conf{ font-size:0.7rem; font-weight:700; background:rgba(43,111,92,0.13); color:var(--ok); border-radius:20px; padding:1px 8px; }
.sg-conf.mid{ background:rgba(217,160,23,0.15); color:#9a7008; }
.sg-conf.low{ background:rgba(180,35,27,0.12); color:var(--danger); }
.sg-chip.low{ border-style:dashed; opacity:0.85; }
.sg-unknown{ display:flex; flex-wrap:wrap; gap:6px; }

.sg-channel{ font-size:0.7rem; font-weight:600; border-radius:20px; padding:1px 9px; cursor:help; }
.sg-channel.wholesale{ background:rgba(217,160,23,0.15); color:#9a7008; }
.sg-channel.direct{ background:rgba(43,111,92,0.13); color:var(--ok); }

/* Webversion: Abmelden */
header.top{display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap;}
.logout-btn{background:var(--surface); border:1px solid var(--border); color:var(--muted);
  border-radius:8px; padding:7px 14px; cursor:pointer; font-size:0.9rem;}
.logout-btn:hover{color:var(--ink); border-color:var(--accent-2);}
.user-bar{display:flex; align-items:center; gap:8px; flex-wrap:wrap;}
.user-name{color:var(--muted); font-size:0.9rem; margin-right:4px;}
a.logout-btn{text-decoration:none; display:inline-block;}
.logout-form{margin:0;}

/* Einstellungen / Benutzerverwaltung */
.wrap.narrow{max-width:900px;}
.set-card{margin-bottom:18px;}
.sub-h{font-size:0.95rem; margin:20px 0 6px; color:var(--muted); font-weight:600;}
select{padding:8px 10px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--ink); font-size:0.9rem;}
input[type=password]{width:100%; padding:9px 11px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--ink); font-size:0.95rem;}
.u-row{display:flex; align-items:center; gap:12px; padding:10px 0; border-top:1px solid var(--border); flex-wrap:wrap;}
.u-row:first-child{border-top:0;}
.u-main{flex:1; min-width:200px;}
.u-name{font-weight:600;}
.u-login{font-weight:400; color:var(--muted); font-size:0.85rem; margin-left:6px;}
.u-sub{color:var(--muted); font-size:0.82rem;}
.u-actions{display:flex; gap:6px; align-items:center; flex-wrap:wrap;}
.u-inactive .u-name{opacity:0.55;}
.tag-off{border-color:var(--danger); color:var(--danger);}
.link-box{margin-top:14px; padding:14px; border:1px solid var(--accent-2); border-radius:var(--radius); background:var(--bg);}
.link-title{font-size:0.88rem; margin-bottom:8px;}
.link-row input{width:100%; font-family:ui-monospace,Consolas,monospace; font-size:0.82rem;}
.link-actions{display:flex; gap:10px; align-items:center; margin-top:10px; flex-wrap:wrap;}
.small-link{font-size:0.85rem; color:var(--accent);}
.sup-by{color:var(--muted); font-size:0.75rem; margin-left:6px;}
@media (max-width:600px){ .wrap{padding:20px 16px 60px;} .step{padding-left:0;} .step::before,.step::after{display:none;} }
@media (max-width:600px){
  .brand{flex-direction:column; align-items:flex-start; gap:10px;}
  .brand-logo{height:40px;}
  header.top h1{font-size:1.2rem;}
  header.top p{font-size:0.88rem;}
  header.top{margin-bottom:20px;}
  .card{padding:16px;}
}

.tag-kind{background:#FFF4DC; border-color:#E8C77A; color:#8a5a00;}
@media (prefers-color-scheme: dark){ .tag-kind{background:#3a2f12; border-color:#7a6230; color:#e8c77a;} }
.opt-line{display:flex; align-items:center; gap:8px; margin-top:14px; font-size:0.9rem;}
.opt-line .muted{color:var(--muted); font-size:0.82rem;}

/* ---------- Anfrage zusammenstellen (touchfreundlich) ---------- */
.picker-card{padding-bottom:0;}
.picker-tools{display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:6px 0 10px;}
.picker-tools #pickerSearch{flex:1 1 220px; min-width:0; padding:10px 12px; font-size:16px; border:1px solid var(--border); border-radius:10px; background:var(--surface); color:var(--ink);}
.picker-tools #btnAutoSuggest{padding:10px 14px; font-size:0.95rem;}
.picker-opts{display:flex; flex-wrap:wrap; gap:12px; align-items:center; width:100%; font-size:0.85rem; color:var(--muted);}
.picker-opts label{display:flex; align-items:center; gap:6px;}
.picker-info{font-size:0.86rem; color:var(--muted); margin:0 0 10px; min-height:1.2em;}
#treeWrap{display:flex; flex-direction:column; gap:8px;}
.tcard{border:1px solid var(--border); border-radius:12px; background:var(--surface); overflow:hidden;}
.tcard.all{border-color:var(--accent-2); box-shadow:inset 3px 0 0 var(--accent);}
.tcard.some{box-shadow:inset 3px 0 0 var(--accent-2);}
.tcard.skip .tname{color:var(--muted);}
.tcard .tcard{border-radius:10px; margin:0 8px 8px;}
.trow{display:flex; align-items:stretch; min-height:54px;}
.tcheck, .icheck{flex:0 0 52px; border:0; background:transparent; font-size:1.45rem; color:var(--accent); cursor:pointer; padding:0; border-radius:0;}
.tmain{flex:1; min-width:0; padding:9px 4px 9px 0; cursor:pointer;}
.tname{font-weight:600; font-size:0.98rem; line-height:1.3;}
.depth2 .tname, .depth3 .tname{font-weight:500; font-size:0.93rem;}
.rno{font-family:ui-monospace,Consolas,monospace; color:var(--accent-2); font-size:0.85em; margin-right:4px;}
.tmeta, .imeta{display:flex; flex-wrap:wrap; gap:6px; align-items:center; font-size:0.78rem; color:var(--muted); margin-top:3px;}
.skipnote{background:var(--bg); border:1px dashed var(--border); border-radius:20px; padding:0 8px;}
.texp{flex:0 0 48px; border:0; border-left:1px solid var(--border); background:transparent; font-size:1.1rem; color:var(--muted); cursor:pointer; border-radius:0;}
.bchip{background:rgba(49,54,108,0.09); color:var(--accent); border-radius:20px; padding:1px 8px; font-weight:600;}
.bchip.direct{background:rgba(43,111,92,0.13); color:var(--ok);}
.recips{display:flex; flex-wrap:wrap; gap:6px; padding:0 10px 10px 52px;}
.rchip{display:inline-flex; align-items:center; gap:6px; min-height:34px; padding:4px 12px; border-radius:20px; font-size:0.84rem; border:1px solid var(--border); background:var(--surface); color:var(--ink); cursor:pointer; line-height:1.2;}
.rchip.on{background:var(--accent); border-color:var(--accent); color:var(--accent-ink);}
.rchip.on .x{opacity:0.75; font-size:0.75rem;}
.rchip.inh{background:var(--bg); color:var(--muted); cursor:default; border-style:dotted;}
.rchip.sug{border-style:dashed; border-color:var(--accent-2); color:var(--accent);}
.rchip.more{color:var(--muted);}
.tkids{border-top:1px solid var(--border); padding-top:8px; background:color-mix(in srgb, var(--bg) 55%, var(--surface));}
.irow{display:flex; flex-wrap:wrap; align-items:stretch; min-height:50px; margin:0 8px 6px; border-radius:10px; background:var(--surface); border:1px solid var(--border);}
.irow.sel{border-color:var(--accent-2);}
.imain{flex:1; min-width:0; padding:8px 6px 8px 0; cursor:pointer;}
.iline{font-size:0.9rem; line-height:1.3;}
.ibtn{flex:0 0 auto; border:0; border-left:1px solid var(--border); background:transparent; padding:0 12px; font-size:0.9rem; color:var(--muted); cursor:pointer; border-radius:0;}
.irecips{flex-basis:100%; padding-left:52px;}
.search-head{font-size:0.85rem; color:var(--muted); margin:2px 0 4px;}
.search-head ~ .irow{margin-left:0; margin-right:0;}
.picker-bar{position:sticky; bottom:0; z-index:5; display:flex; align-items:center; gap:8px; margin:12px -24px 0; padding:10px 24px; padding-bottom:max(10px, env(safe-area-inset-bottom)); background:color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter:blur(8px); border-top:1px solid var(--border); border-radius:0 0 var(--radius) var(--radius);}
.picker-bar .count-pill{flex:1; font-size:0.9rem;}
.picker-bar .warn{color:var(--danger);}
.picker-bar button{min-height:40px;}

/* Auswahl-Panel: Bottom-Sheet auf dem Handy, Dialog auf größeren Bildschirmen */
body.sheet-open{overflow:hidden;}
.sheet{position:fixed; inset:0; z-index:50; background:rgba(10,12,30,0.45); display:flex; align-items:flex-end; justify-content:center;}
.sheet[hidden]{display:none;}
.sheet-panel{background:var(--surface); width:100%; max-width:640px; height:88vh; height:88dvh; border-radius:16px 16px 0 0; display:flex; flex-direction:column; padding:14px 16px; padding-bottom:max(14px, env(safe-area-inset-bottom)); box-shadow:0 -8px 30px rgba(0,0,0,0.2);}
.sheet-head{display:flex; align-items:flex-start; gap:12px; margin-bottom:10px;}
.sheet-head > div{flex:1; min-width:0;}
.sheet-title{font-weight:700; font-size:1.02rem; color:var(--accent);}
.sheet-sub{font-size:0.82rem; color:var(--muted); margin-top:2px;}
#sheetSearch{width:100%; padding:11px 12px; font-size:16px; border:1px solid var(--border); border-radius:10px; background:var(--bg); color:var(--ink);}
.sheet-filters{display:flex; gap:6px; overflow-x:auto; padding:10px 0; scrollbar-width:none;}
.sheet-filters::-webkit-scrollbar{display:none;}
.fchip{flex:0 0 auto; min-height:34px; padding:4px 12px; border-radius:20px; font-size:0.84rem; border:1px solid var(--border); background:var(--surface); color:var(--ink); cursor:pointer; white-space:nowrap;}
.fchip span{color:var(--muted); font-size:0.78rem;}
.fchip.on{background:var(--accent); color:var(--accent-ink); border-color:var(--accent);}
.fchip.on span{color:inherit; opacity:0.8;}
.sheet-list{flex:1; overflow-y:auto; -webkit-overflow-scrolling:touch; border-top:1px solid var(--border);}
.srow{display:flex; gap:12px; align-items:center; width:100%; text-align:left; min-height:56px; padding:8px 4px; border:0; border-bottom:1px solid var(--border); background:transparent; color:var(--ink); cursor:pointer; border-radius:0;}
.srow.on{background:rgba(49,54,108,0.06);}
.scheck{flex:0 0 28px; height:28px; border-radius:8px; border:2px solid var(--border); display:flex; align-items:center; justify-content:center; font-weight:700; color:var(--accent-ink);}
.srow.on .scheck{background:var(--accent); border-color:var(--accent);}
.sbody{display:flex; flex-direction:column; min-width:0; flex:1;}
.sname{font-weight:600; font-size:0.93rem;}
.ssub{font-size:0.78rem; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.sreason{font-size:0.76rem; color:var(--accent-2); margin-top:1px;}
.sumrow{display:flex; gap:10px; align-items:center; padding:10px 4px; border-bottom:1px solid var(--border);}
.sumn{font-weight:600; white-space:nowrap;}
#sheetReset{margin-top:8px; align-self:flex-start;}
@media (min-width:760px){
  .sheet{align-items:center;}
  .sheet-panel{height:min(80vh, 760px); border-radius:16px;}
}
@media (max-width:600px){
  .picker-bar{margin:12px -16px 0; padding-left:16px; padding-right:16px;}
  .recips{padding-left:10px;}
  .irecips{padding-left:10px;}
  .tcard .tcard{margin:0 6px 6px;}
  .irow{margin:0 6px 6px;}
  .picker-tools #btnAutoSuggest{flex:1 1 100%;}
}
@media (hover:hover){
  .tmain:hover .tname{color:var(--accent);}
  .srow:hover{background:rgba(49,54,108,0.05);}
}
.picker-tools[hidden], .picker-bar[hidden], #sheetSearchWrap[hidden]{display:none;}
#treeWrap.tree{max-height:none; overflow:visible; border-top:0; padding-top:0; margin-top:4px;}
#treeWrap > *, .tkids > *{flex-shrink:0;}
.rchip.down{background:rgba(49,54,108,0.08); color:var(--accent); cursor:default; border-color:transparent;}
.rchip.down small{opacity:0.7;}
.rchip.wide{max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:inline-block; line-height:24px;}

/* ---------- Projekte ---------- */
.file-big{display:flex; align-items:center; justify-content:center; min-height:64px; border:2px dashed var(--accent-2); border-radius:12px; color:var(--accent); font-weight:600; cursor:pointer; background:rgba(49,54,108,0.04); padding:10px; text-align:center;}
.file-big input, .file-small input{position:absolute; width:1px; height:1px; opacity:0; pointer-events:none;}
.file-big:hover{background:rgba(49,54,108,0.08);}
.project-tools{display:flex; gap:8px; margin:16px 0 8px;}
.project-tools input{flex:1; min-width:0; padding:10px 12px; font-size:16px; border:1px solid var(--border); border-radius:10px; background:var(--surface); color:var(--ink);}
#projectList{display:flex; flex-direction:column; gap:6px;}
.prow{display:flex; align-items:center; gap:10px; padding:10px 12px; min-height:56px; border:1px solid var(--border); border-radius:10px; cursor:pointer; background:var(--surface);}
.prow:hover{border-color:var(--accent-2);}
.pmain{flex:1; min-width:0;}
.pname{font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.psub{font-size:0.78rem; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.pstatus{font-size:0.75rem; border-radius:20px; padding:2px 10px; white-space:nowrap; background:var(--bg); border:1px solid var(--border);}
.pstatus.angefragt{background:rgba(49,54,108,0.1); color:var(--accent); border-color:transparent;}
.pstatus.abgeschlossen{background:rgba(43,111,92,0.13); color:var(--ok); border-color:transparent;}
.project-head{display:flex; gap:8px; align-items:center; flex-wrap:wrap;}
.project-name{flex:1 1 240px; min-width:0; font-size:1.05rem; font-weight:600; padding:9px 11px; border:1px solid var(--border); border-radius:10px; background:var(--surface); color:var(--ink);}
.save-info{font-size:0.8rem; color:var(--muted); margin:6px 0 2px;}
.save-info.err{color:var(--danger);}
.pdf-line{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:8px;}
.file-small{position:relative; display:inline-flex; align-items:center; min-height:38px; padding:6px 12px; border:1px solid var(--border); border-radius:8px; cursor:pointer; font-size:0.88rem; background:var(--surface);}
.pdf-line .status{margin-top:0;}

/* ---------- Versand ---------- */
.seg{display:flex; gap:0; border:1px solid var(--border); border-radius:10px; overflow:hidden; margin:6px 0 14px; width:fit-content; max-width:100%;}
.seg button{border:0; border-radius:0; padding:9px 14px; background:var(--surface); color:var(--muted); font-size:0.88rem;}
.seg button.on{background:var(--accent); color:var(--accent-ink);}
.send-list{display:flex; flex-direction:column; gap:8px;}
.sendrow{display:flex; gap:12px; align-items:center; flex-wrap:wrap; padding:12px; border:1px solid var(--border); border-radius:12px; background:var(--surface);}
.sendrow.sent{border-color:var(--ok); background:color-mix(in srgb, var(--ok) 6%, var(--surface));}
.sendbtns{display:flex; gap:8px; flex-wrap:wrap;}
.sendbtns button{min-height:44px; padding:8px 14px; font-size:0.92rem;}
.small-note{font-size:0.82rem; margin:2px 0;}
.toast{position:fixed; left:50%; bottom:calc(20px + env(safe-area-inset-bottom)); transform:translateX(-50%); z-index:60; max-width:min(92vw, 520px); background:var(--ink); color:var(--bg); padding:12px 16px; border-radius:12px; font-size:0.9rem; box-shadow:0 6px 24px rgba(0,0,0,0.25);}
.toast[hidden]{display:none;}
@media (max-width:600px){
  .sendbtns{width:100%;}
  .sendbtns button{flex:1;}
  .seg{width:100%;}
  .seg button{flex:1; padding:9px 6px;}
}
.file-hint{display:block; font-weight:400; font-size:0.78rem; color:var(--muted); margin-top:3px;}

/* ---------- Links & Downloads ---------- */
.link-box2{display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin:0 0 12px;}
.link-box2 .field{margin:0;}
.link-box2 input{padding:8px 10px; font-size:16px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--ink);}
.linkslot{flex-basis:100%;}
.linkstat{font-size:0.8rem; color:var(--muted); line-height:1.5;}
.linkstat.ok{color:var(--ok);}
.linkstat.warn{color:var(--danger);}
.linkacts{display:inline-flex; gap:2px; flex-wrap:wrap;}
.linkacts .ghost{padding:2px 6px; font-size:0.78rem; text-decoration:underline;}
.link-overview{margin-top:14px; border:1px solid var(--border); border-radius:10px; padding:10px 12px;}
.link-overview summary{cursor:pointer; font-weight:600; font-size:0.92rem;}
.lo-row{padding:8px 0; border-top:1px solid var(--border); font-size:0.88rem;}
.lo-row:first-child{border-top:0;}
.logrow{display:grid; grid-template-columns:auto 1fr; gap:2px 12px; padding:9px 4px; border-bottom:1px solid var(--border); font-size:0.86rem;}
.logrow.auto{opacity:0.6;}
.logrow.new{background:rgba(49,54,108,0.06);}
.logrow[data-openproj]{cursor:pointer;}
.logwhen{font-variant-numeric:tabular-nums; white-space:nowrap;}
.logip{grid-column:2; color:var(--muted); font-size:0.8rem;}
.logua{grid-column:1 / -1; color:var(--muted); font-size:0.74rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.bell{position:relative; background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:6px 10px; font-size:0.95rem; cursor:pointer;}
.bell #bellCount{position:absolute; top:-6px; right:-6px; min-width:18px; height:18px; border-radius:9px; background:var(--danger); color:#fff; font-size:0.7rem; line-height:18px; text-align:center; display:none; padding:0 4px;}
.bell.has #bellCount{display:block;}

/* ---------- OneDrive-Ablage & Projektgruppen ---------- */
.od-actions{display:flex; gap:8px; flex-wrap:wrap;}
.od-actions button{min-height:42px;}
#odTarget{margin-top:8px;}
#odTarget .ghost{padding:0 4px; text-decoration:underline; font-size:0.8rem;}
.archive-box{margin-top:14px; padding:12px; border:1px dashed var(--border); border-radius:12px;}
.archive-box button{min-height:44px;}
.pgroup{margin-bottom:8px;}
.pgroup > summary{cursor:pointer; list-style:none; display:flex; align-items:center; gap:8px; padding:6px 2px; font-weight:600;}
.pgroup > summary::-webkit-details-marker{display:none;}
.pgroup > summary::before{content:"▸"; color:var(--muted); font-size:0.85rem; width:12px;}
.pgroup[open] > summary::before{content:"▾";}
.pgroup-list{display:flex; flex-direction:column; gap:6px; margin-top:4px;}
.project-tools{flex-wrap:wrap;}
.project-tools select{padding:9px 10px; border:1px solid var(--border); border-radius:10px; background:var(--surface); color:var(--ink); font-size:0.9rem;}
@media (max-width:600px){ .project-tools input{flex-basis:100%;} .project-tools select{flex:1;} .od-actions button{flex:1 1 100%;} }
.link-box2[hidden], .archive-box[hidden], .od-actions [hidden]{display:none;}

/* ---------- Sicherheit (Admin) ---------- */
.sec-filters{display:flex; gap:6px; flex-wrap:wrap; margin-bottom:8px;}
.sec-row{display:grid; grid-template-columns:auto 1fr; gap:2px 12px; padding:8px 4px; border-bottom:1px solid var(--border); font-size:0.86rem;}
.sec-row.warn .sec-what{color:#9a6a00;}
.sec-row.bad .sec-what{color:var(--danger); font-weight:600;}
.sec-when{font-variant-numeric:tabular-nums; white-space:nowrap; color:var(--muted);}
.sec-ip{grid-column:2; color:var(--muted); font-size:0.8rem;}
.sec-detail{grid-column:2; color:var(--muted); font-size:0.78rem;}
.sec-details{margin:10px 0;}
.sec-details summary{cursor:pointer; font-size:0.88rem; color:var(--muted);}
#securityCard input[type=text]{width:100%; padding:9px 11px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--ink);}
.nomail{color:var(--danger); font-weight:600;}

/* ---------- LV-Prüfung nach VOB ---------- */
.vob-summary{cursor:pointer; display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; list-style:none;}
.vob-summary::-webkit-details-marker{display:none;}
.vob-summary h2{margin:0; display:inline;}
.vob-summary h2::before{content:"▸ "; color:var(--muted);}
#vobDetails[open] .vob-summary h2::before{content:"▾ ";}
#vobDetails[open] .vob-summary{margin-bottom:12px;}
.vob-sumstate{color:var(--muted); font-size:0.85rem;}
.vob-doc{display:flex; align-items:center; gap:8px; padding:6px 0; border-bottom:1px solid var(--border); flex-wrap:wrap;}
.vob-docname{flex:1 1 220px; min-width:0; overflow-wrap:anywhere; font-size:0.9rem;}
.vob-doc select{flex:0 1 260px; min-width:0;}
.vob-upload{display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:10px;}
.vob-upload select{flex:0 1 300px; min-width:0;}
.vob-chips{display:flex; flex-wrap:wrap; gap:6px;}
.vob-chip{display:inline-flex; align-items:center; gap:6px; min-height:34px; padding:4px 12px; border:1px solid var(--border); border-radius:20px; font-size:0.86rem; cursor:pointer; background:var(--surface);}
.vob-chip:has(input:checked){border-color:var(--accent); background:rgba(49,54,108,0.10); color:var(--accent); font-weight:600;}
.vob-actions{display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:14px;}
.vob-progress{display:flex; align-items:center; gap:10px; margin-top:14px; padding:12px 14px; border-radius:10px; background:var(--bg); font-size:0.9rem;}
.vob-progress[hidden]{display:none;}
.vob-spin{width:16px; height:16px; border-radius:50%; border:2px solid var(--border); border-top-color:var(--accent); animation:vobspin 0.9s linear infinite; flex-shrink:0;}
@keyframes vobspin{to{transform:rotate(360deg);}}
.vob-history{margin-top:16px; max-width:420px;}
.vob-history[hidden]{display:none;}
.vob-error{margin-top:14px; padding:12px 14px; border:1px solid var(--danger); border-radius:10px; color:var(--danger); font-size:0.9rem;}
.vob-head{margin-top:18px; padding:14px 16px; border-radius:10px; border:1px solid var(--border); border-left-width:6px;}
.vob-head p{margin:6px 0;}
.vob-rot{border-left-color:#C62828;} .vob-gelb{border-left-color:#E0A100;} .vob-gruen{border-left-color:#2E7D32;}
.vob-ampel{font-weight:700; display:flex; align-items:center; gap:8px;}
.vob-dot{width:14px; height:14px; border-radius:50%; background:var(--muted);}
.vob-rot .vob-dot{background:#C62828;} .vob-gelb .vob-dot{background:#E0A100;} .vob-gruen .vob-dot{background:#2E7D32;}
.vob-top{margin:6px 0 0; padding-left:20px; font-size:0.92rem;}
.vob-vd{display:grid; grid-template-columns:minmax(120px, 200px) 1fr; gap:4px 14px; margin:0; font-size:0.9rem;}
.vob-vd dt{color:var(--muted);}
.vob-vd dd{margin:0; overflow-wrap:anywhere;}
.vob-filters{margin-bottom:8px;}
.vob-ftools{margin-bottom:10px;}
.vob-f{border:1px solid var(--border); border-left-width:5px; border-radius:8px; margin-bottom:8px; background:var(--surface);}
.vob-f summary{cursor:pointer; padding:9px 12px; display:flex; flex-wrap:wrap; gap:6px 10px; align-items:center;}
.vob-ftitle{flex:1 1 260px; font-weight:600; font-size:0.92rem; min-width:0;}
.vob-ftags .tag{margin-left:0; margin-right:4px;}
.vob-badge{font-size:0.72rem; font-weight:700; text-transform:uppercase; letter-spacing:0.03em; padding:2px 8px; border-radius:20px; color:#fff; background:var(--muted);}
.vob-s-kritisch{border-left-color:#C62828;} .vob-s-kritisch .vob-badge{background:#C62828;}
.vob-s-hoch{border-left-color:#E65100;} .vob-s-hoch .vob-badge{background:#E65100;}
.vob-s-mittel{border-left-color:#E0A100;} .vob-s-mittel .vob-badge{background:#B8860B;}
.vob-s-gering{border-left-color:#5B8DB8;} .vob-s-gering .vob-badge{background:#4A78A0;}
.vob-s-hinweis{border-left-color:var(--border);}
.vob-fbody{padding:0 12px 12px; font-size:0.9rem;}
.vob-fbody blockquote{margin:8px 0; padding:6px 10px; border-left:3px solid var(--border); color:var(--muted); font-style:italic;}
.vob-fs{color:var(--muted); font-size:0.84rem; overflow-wrap:anywhere;}
.vob-sec{margin:6px 0;}
.vob-empf{padding:8px 10px; border-radius:8px; background:rgba(49,54,108,0.08);}
.vob-rg{margin:4px 0;} .vob-rg .tag{margin:0 4px 4px 0;}
.vob-fragen{padding-left:22px; font-size:0.92rem;} .vob-fragen li{margin-bottom:8px;}
.vob-table > div{display:grid; grid-template-columns:minmax(110px, 200px) 1fr; gap:4px 12px; padding:6px 0; border-bottom:1px solid var(--border); font-size:0.9rem;}
.vob-table b{overflow-wrap:anywhere;}
.vob-list{padding-left:20px; font-size:0.9rem;}
.vob-meta{margin-top:20px; padding-top:12px; border-top:1px solid var(--border); font-size:0.8rem; color:var(--muted);}
.vob-disclaimer{margin:8px 0; font-weight:600;}
@media (max-width:600px){ .vob-vd, .vob-table > div{grid-template-columns:1fr;} .vob-vd dt{margin-top:6px;} }
/* Admin */
.vob-keyinfo{margin-bottom:10px; font-size:0.9rem;}
.vob-switch{display:flex; align-items:center; gap:8px; font-weight:600;}
.vob-users{display:flex; flex-direction:column; gap:4px; margin:4px 0 6px; font-size:0.9rem;}
.vob-users[hidden]{display:none;}
.vob-usage{font-size:0.84rem;}
.vob-urow{display:grid; grid-template-columns:110px 1fr 90px 70px 80px; gap:8px; padding:5px 0; border-bottom:1px solid var(--border);}
.vob-uproj{overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.vob-ucost{text-align:right;}
@media (max-width:600px){ .vob-urow{grid-template-columns:1fr auto; } .vob-urow > span:nth-child(3), .vob-urow > span:nth-child(4){display:none;} }
.vob-export{margin-top:12px;}

.vob-qa{margin-top:10px; padding:10px 14px; border:1px solid var(--border); border-radius:10px; font-size:0.86rem;}
.vob-qa ul{margin:4px 0 0; padding-left:18px;}
.vob-qa li{margin:2px 0;}
.tag.vob-ok{border-color:var(--ok); color:var(--ok);}
.tag.vob-bad{border-color:var(--danger); color:var(--danger);}
.tag.vob-warn{border-color:#B8860B; color:#B8860B;}
.tag.vob-muted{color:var(--muted);}
.vob-qa-f{margin-top:8px; padding:6px 10px; border-radius:8px; background:var(--bg); font-size:0.84rem;}
.vob-akt{margin-top:4px;}
.vob-akt.vob-bad b, .vob-akt.vob-warn b{color:var(--danger);}
.vob-akt.vob-ok b{color:var(--ok);}
.vob-src{display:inline-block; margin-left:6px; font-size:0.8rem;}
.vob-src a, .vob-table a, .vob-list a{color:var(--accent); overflow-wrap:anywhere;}
#vobRecht, #vobDomains{width:100%;}
/* Mengenabgleich */
.to-opts{margin:6px 0;}
.to-head{display:flex; flex-wrap:wrap; gap:6px 18px; align-items:center; margin:12px 0 8px; padding:10px 12px; border:1px solid var(--border); border-radius:10px; font-size:0.88rem;}
.to-table{border:1px solid var(--border); border-radius:10px; overflow:hidden; font-size:0.86rem;}
.to-row{display:grid; grid-template-columns:24px 110px 1fr 100px 90px 130px; gap:8px; padding:7px 10px; align-items:start;}
.to-th{background:var(--bg); font-weight:600; color:var(--muted);}
.to-row-d{border-top:1px solid var(--border);}
.to-row-d > summary{cursor:pointer; list-style:none;}
.to-row-d > summary::-webkit-details-marker{display:none;}
.to-num{text-align:right; white-space:nowrap;}
.to-rot{color:#C62828; font-weight:700;} .to-gelb{color:#B8860B; font-weight:700;} .to-gruen{color:var(--ok);}
.to-detail{padding:4px 12px 10px 42px; font-size:0.84rem; display:grid; gap:3px;}
.to-h{margin:16px 0 6px; font-size:0.92rem;}
.to-steig > div, .to-merk > div{display:grid; grid-template-columns:1fr auto auto; gap:10px; align-items:center; padding:5px 0; border-bottom:1px solid var(--border); font-size:0.86rem;}
.to-merk > div{grid-template-columns:1fr auto; }
.to-merk > div .small-note{grid-column:1 / -1;}
.to-steig input{width:56px; margin-left:6px;}
.to-plan{padding:8px 0; border-bottom:1px solid var(--border);}
.to-pname{font-size:0.88rem; overflow-wrap:anywhere;}
.to-pfields{display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:4px;}
.to-pfields select, .to-pfields input{min-width:0;}
.to-sw{display:inline-block; width:14px; height:6px; border-radius:2px; margin:0 3px 1px 6px; vertical-align:middle;}
@media (max-width:700px){
  .to-row{grid-template-columns:22px 1fr auto; }
  .to-row > span:nth-child(2){grid-column:2 / 4; order:-1; color:var(--muted);}
  .to-row > span:nth-child(4), .to-row > span:nth-child(5){display:none;}
  .to-th{display:none;}
  .to-detail{padding-left:12px;}
}

/* Projektleiste (bleibt oben stehen) + Startseiten-Hinweis */
#brandHome{cursor:pointer;}
.projbar{position:sticky; top:0; z-index:40; display:flex; align-items:center; gap:10px; margin:-14px 0 16px;
  padding:8px 12px; padding-top:calc(8px + env(safe-area-inset-top)); background:var(--surface);
  border:1px solid var(--border); border-radius:12px; box-shadow:0 4px 14px rgba(0,0,0,0.08);}
.projbar[hidden]{display:none;}
.projbar-back{font-weight:600; white-space:nowrap;}
.projbar-name{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; color:var(--accent);}
.last-hint{display:flex; align-items:center; gap:6px; margin:8px 0 4px;}
.last-hint[hidden]{display:none;}
.last-open{flex:1; text-align:left; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  background:rgba(49,54,108,0.08); border-color:rgba(49,54,108,0.25); color:var(--accent); font-weight:600;}
@media (max-width:600px){ .projbar{margin:-8px -6px 12px; border-radius:10px;} .projbar .primary{padding:6px 9px;} }

/* Server & Speicher, Geräte, Änderungsprotokoll */
.sys-banner{margin:0 0 14px; padding:10px 14px; border-radius:10px; border:1px solid; font-size:0.88rem; display:flex; flex-direction:column; gap:3px;}
.sys-banner[hidden]{display:none;}
.sys-banner.warn{background:#FFF6E0; border-color:#E8C77A; color:#6b4a00;}
.sys-banner.bad{background:#FDECEA; border-color:#E3A29D; color:#8A1C14;}
.sys-banner a{align-self:flex-start; font-weight:600; color:inherit;}
.sys-pill{font-size:0.75rem; font-weight:600; padding:2px 10px; border-radius:20px; vertical-align:middle; margin-left:8px;}
.sys-pill.ok{background:rgba(43,111,92,0.12); color:var(--ok);} .sys-pill.warn{background:#FFF0C7; color:#8a5a00;} .sys-pill.bad{background:#FDE3E0; color:var(--danger);}
.sys-bar{height:12px; background:var(--bg); border:1px solid var(--border); border-radius:8px; overflow:hidden; margin:6px 0;}
.sys-fill{height:100%; background:var(--ok);} .sys-fill.warn{background:#D9A21B;} .sys-fill.bad{background:var(--danger);}
.sys-disk-txt{font-size:0.86rem; margin-bottom:10px;}
.sys-check{display:grid; grid-template-columns:24px minmax(120px,220px) 1fr; gap:8px; align-items:baseline; padding:6px 2px; border-bottom:1px solid var(--border); font-size:0.86rem;}
.sys-check:last-child{border-bottom:none;}
.sys-ico{display:inline-flex; width:20px; height:20px; border-radius:50%; align-items:center; justify-content:center; font-size:0.72rem; font-weight:700; color:#fff; background:var(--ok);}
.sys-check.warn .sys-ico{background:#D9A21B;} .sys-check.bad .sys-ico{background:var(--danger);}
.sys-check.bad .sys-txt{color:var(--danger); font-weight:600;}
.sys-name{font-weight:600;}
.sys-dirs{display:flex; flex-direction:column; gap:2px; margin-top:6px;}
.sys-dir{display:grid; grid-template-columns:1fr 110px 80px; gap:8px; align-items:center; font-size:0.82rem; padding:3px 0; border-bottom:1px dashed var(--border);}
.sys-dir b{text-align:right;}
.sys-mini{height:6px; background:var(--bg); border-radius:4px; overflow:hidden;} .sys-mini span{display:block; height:100%; background:var(--accent-2);}
.sys-sub{font-size:0.78rem; color:var(--muted); margin:10px 0 2px; font-weight:600; text-transform:uppercase; letter-spacing:.03em;}
@media (max-width:600px){ .sys-check{grid-template-columns:24px 1fr;} .sys-check .sys-txt{grid-column:2;} .sys-dir{grid-template-columns:1fr 70px;} .sys-dir .sys-mini{display:none;} }
.dev-group{border:1px solid var(--border); border-radius:10px; padding:4px 10px; margin-bottom:10px;}
.dev-head{display:flex; align-items:center; gap:8px; padding:6px 0; border-bottom:1px solid var(--border);}
.dev-head .ghost{margin-left:auto;}
.dev-row:last-child{border-bottom:none;}
.tag-ok{border-color:var(--ok); color:var(--ok);}
.audit-search{margin:8px 0;}
.audit-row{padding-left:8px;}
.audit-row.a-anfrage{border-left:3px solid var(--accent);} .audit-row.a-benutzer{border-left:3px solid var(--danger);}
.audit-row.a-projekt{border-left:3px solid var(--accent-2);} .audit-row.a-stamm{border-left:3px solid var(--ok);} .audit-row.a-lv{border-left:3px solid #D9A21B;}
/* Menüpunkt Anfragen */
.nav-badge{display:inline-block; min-width:18px; padding:0 5px; margin-left:5px; border-radius:10px; background:var(--danger); color:#fff; font-size:0.72rem; font-weight:700; text-align:center; line-height:18px;}
/* Seite Anfragen */
.anf-sum{display:flex; gap:10px; flex-wrap:wrap; margin-bottom:12px;}
.anf-kpi{flex:1 1 120px; border:1px solid var(--border); border-radius:10px; padding:10px 14px; display:flex; flex-direction:column;}
.anf-kpi b{font-size:1.6rem; line-height:1.1;} .anf-kpi span{color:var(--muted); font-size:0.82rem;}
.anf-kpi.bad{border-color:var(--danger);} .anf-kpi.bad b{color:var(--danger);}
.anf-kpi.warn{border-color:#D9A21B;} .anf-kpi.warn b{color:#a87400;}
.anf-tools{margin-bottom:10px;}
.anf-row2{align-items:center; margin-top:8px;}
.anf-opt{flex:0 1 170px !important;}
.anf-check{flex:0 0 auto; display:flex; align-items:center; gap:5px; font-size:0.85rem; white-space:nowrap;}
.anf-check input{width:auto;}
.anf-group{margin:14px 0;}
.anf-ghead{display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:6px 4px; border-bottom:2px solid var(--border);}
.anf-ghead input{width:auto;} .anf-ghead a{color:var(--accent);}
.anf-item{display:grid; grid-template-columns:26px 1fr auto; gap:10px; padding:10px 4px; border-bottom:1px solid var(--border); align-items:start;}
.anf-item.overdue{background:rgba(180,35,27,0.05); border-left:3px solid var(--danger);}
.anf-item.done{opacity:0.72;}
.anf-cb input{width:auto; margin-top:4px;}
.anf-who{font-size:0.95rem;} .anf-who .muted{font-size:0.82rem;}
.anf-meta{font-size:0.8rem; color:var(--muted); margin-top:2px;}
.anf-proj{color:var(--accent); font-weight:600;}
.anf-note{margin-top:6px; font-size:0.82rem; padding:5px 8px; min-height:0; border-style:dashed;}
.anf-side{display:flex; flex-direction:column; align-items:flex-end; gap:4px; min-width:220px;}
.anf-date{display:flex; align-items:center; gap:6px; font-size:0.8rem; color:var(--muted);}
.anf-date input{width:auto; padding:4px 6px; min-height:0;}
.anf-due{font-size:0.8rem; font-weight:600;} .anf-due.bad{color:var(--danger);} .anf-due.warn{color:#a87400;} .anf-due.ok{color:var(--ok);}
.anf-btns{display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end;}
.anf-bulk{position:sticky; bottom:10px; z-index:30; display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:10px 14px;
  background:var(--surface); border:1px solid var(--accent); border-radius:12px; box-shadow:0 6px 18px rgba(0,0,0,0.15);}
.anf-bulk[hidden]{display:none;}
.anf-bulk label{display:flex; align-items:center; gap:6px; font-size:0.85rem;}
.anf-bulk input[type=date]{width:auto; padding:4px 6px; min-height:0;}
.anf-dlg{border:1px solid var(--border); border-radius:12px; padding:18px; max-width:420px; width:calc(100% - 32px); background:var(--surface); color:var(--ink);}
.anf-mailto{display:block; padding:10px 12px; margin:6px 0; border:1px solid var(--border); border-radius:8px; color:var(--accent); font-weight:600; text-decoration:none;}
@media (max-width:700px){
  .anf-item{grid-template-columns:24px 1fr;}
  .anf-side{grid-column:2; align-items:flex-start; min-width:0;}
  .anf-btns{justify-content:flex-start;}
}
#anfQ, #auditQ{width:100%; padding:9px 11px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--ink); font:inherit;}

/* LV-Prüfung: Unterlagen je Art, Ziehen & Ablegen */
.vob-drop{display:flex; flex-direction:column; align-items:center; gap:3px; padding:16px; margin:6px 0 8px; border:2px dashed var(--border);
  border-radius:12px; text-align:center; cursor:pointer; background:var(--bg);}
.vob-drop input{display:none;}
.vob-drop span{font-size:0.8rem; color:var(--muted);}
.vob-drop:hover, .vob-drop.drag-on{border-color:var(--accent); background:rgba(49,54,108,0.06);}
.vob-type{border:1px solid var(--border); border-radius:10px; padding:4px 10px; margin:6px 0;}
.vob-type:not(.has){opacity:0.8;}
.vob-type.drag-on{border-color:var(--accent); box-shadow:0 0 0 2px rgba(49,54,108,0.25);}
.vob-thead{display:flex; align-items:center; gap:8px; padding:4px 0; flex-wrap:wrap;}
.vob-thead b{font-size:0.9rem;}
.vob-thead .muted{font-size:0.8rem;}
.vob-add{margin-left:auto;}
.vob-type .vob-doc:last-child{border-bottom:none;}
.vob-docfoot{text-align:right; margin-top:4px;}

/* LV-Prüfung: automatisch übernommene Unterlagen */
.vob-auto{border:1px solid rgba(43,111,92,0.35); background:rgba(43,111,92,0.06); border-radius:10px; padding:8px 12px; margin:6px 0 8px;}
.vob-auto-h{font-weight:600; font-size:0.85rem; margin-bottom:2px;}
.vob-auto-r{font-size:0.85rem; padding:1px 0;} .vob-auto-r.ok{color:var(--ok);} .vob-auto-r .muted{font-size:0.8rem;}
.vob-progress .small{margin-left:auto;}
/* Live-Fenster */
.vob-live{width:min(760px, calc(100% - 24px)); max-height:min(86vh, 900px); border:1px solid var(--border); border-radius:14px;
  padding:16px 18px; background:var(--surface); color:var(--ink); box-shadow:0 18px 50px rgba(0,0,0,0.25);}
.vob-live[open]{display:flex; flex-direction:column; gap:10px;}
.vob-live::backdrop{background:rgba(20,22,42,0.45);}
.vl-head{display:flex; align-items:flex-start; justify-content:space-between; gap:10px;}
.vl-head h3{margin:0; color:var(--accent);}
.vl-time{font-variant-numeric:tabular-nums; font-weight:700; font-size:1.1rem; color:var(--accent);}
.vl-steps{display:flex; gap:6px; flex-wrap:wrap; list-style:none; margin:0; padding:0; counter-reset:s;}
.vl-steps li{counter-increment:s; font-size:0.78rem; padding:4px 10px; border-radius:20px; border:1px solid var(--border); color:var(--muted);}
.vl-steps li::before{content:counter(s) ". ";}
.vl-steps li.done{background:rgba(43,111,92,0.10); border-color:var(--ok); color:var(--ok);}
.vl-steps li.done::before{content:"✓ ";}
.vl-steps li.now{background:var(--accent); border-color:var(--accent); color:var(--accent-ink); font-weight:600;}
.vl-feed{flex:1; min-height:220px; max-height:52vh; overflow-y:auto; border:1px solid var(--border); border-radius:10px;
  padding:6px 8px; background:var(--bg); font-size:0.85rem;}
.vl-ev{display:grid; grid-template-columns:22px 1fr auto; gap:6px; padding:4px 2px; border-bottom:1px dashed var(--border); align-items:baseline;}
.vl-ev:last-child{border-bottom:none;}
.vl-t{font-size:0.7rem; color:var(--muted); font-variant-numeric:tabular-nums;}
.vl-ico{text-align:center;}
.vl-ev.k-schritt .vl-msg{font-weight:700; color:var(--accent);}
.vl-ev.k-denkt .vl-msg{color:var(--muted); font-style:italic;}
.vl-ev.k-befund .vl-msg{font-weight:600;}
.vl-ev.k-ok .vl-msg{color:var(--ok); font-weight:600;}
.vl-ev.k-fehler .vl-msg{color:var(--danger); font-weight:700;}
.vl-follow{font-size:0.78rem; color:var(--muted); display:flex; align-items:center; gap:6px;}
.vl-follow input{width:auto;}
.vl-actions{display:flex; justify-content:flex-end; gap:8px; flex-wrap:wrap;}
@media (max-width:600px){ .vob-live{padding:12px;} .vl-feed{max-height:48vh;} }

/* LV-Prüfung: Wahl Schnell-/Intensivprüfung */
.vob-modes{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:6px 0 10px;}
.vob-mode{position:relative; display:flex; flex-direction:column; gap:3px; padding:12px 14px 12px 40px; border:2px solid var(--border);
  border-radius:12px; cursor:pointer; background:var(--surface);}
.vob-mode input{position:absolute; left:14px; top:15px; width:auto; accent-color:var(--accent);}
.vob-mode:has(input:checked){border-color:var(--accent); background:rgba(49,54,108,0.06);}
.vm-t{font-weight:700; color:var(--accent);}
.vm-p{font-size:0.82rem; font-weight:600; color:var(--ok);}
.vob-mode:nth-child(2) .vm-p{color:#a87400;}
.vm-d{font-size:0.8rem; color:var(--muted); line-height:1.35;}
@media (max-width:640px){ .vob-modes{grid-template-columns:1fr;} }

/* LV-Prüfung: Ergebnis zum Zusammenklappen */
.vob-foldbar{display:flex; justify-content:flex-end; gap:6px; margin:12px 0 4px;}
.vob-fold{border:1px solid var(--border); border-radius:12px; margin:8px 0; background:var(--surface);}
.vob-fold > summary{display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:10px 14px; cursor:pointer; list-style:none;}
.vob-fold > summary::-webkit-details-marker, .vob-kat > summary::-webkit-details-marker{display:none;}
.vob-fold > summary::before, .vob-kat > summary::before{content:"▸"; color:var(--accent); transition:transform .15s; display:inline-block;}
.vob-fold[open] > summary::before, .vob-kat[open] > summary::before{transform:rotate(90deg);}
.vf-t{font-weight:700; color:var(--accent); font-size:1rem;}
.vf-n{min-width:22px; padding:0 7px; border-radius:11px; background:var(--bg); border:1px solid var(--border); font-size:0.78rem; text-align:center;}
.vf-body{padding:0 14px 12px;}
.vob-kat{border-left:3px solid var(--border); margin:8px 0; padding-left:4px;}
.vob-kat > summary{display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:7px 8px; cursor:pointer; list-style:none;
  background:var(--bg); border-radius:8px;}
.vk-t{font-weight:600;}
.vk-body{padding:4px 0 2px 8px;}
.vob-fold .vob-badge, .vob-kat .vob-badge{font-size:0.72rem;}
.vob-badge.vob-s-kritisch{background:#C62828;} .vob-badge.vob-s-hoch{background:#E65100;} .vob-badge.vob-s-mittel{background:#B8860B;} .vob-badge.vob-s-gering{background:#4A78A0;} .vob-badge.vob-s-hinweis{background:#8A8FA8;}
.vob-mem{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:6px 0;}

.vob-modes{grid-template-columns:repeat(3, 1fr);}
.vob-mode:nth-child(3) .vm-p{color:var(--accent);}
@media (max-width:900px){ .vob-modes{grid-template-columns:1fr;} }
/* Feedback je Befund, Vergleich, Fristen */
.vob-fbk{display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-top:8px; padding-top:8px; border-top:1px dashed var(--border); font-size:0.8rem;}
.vob-fbk button{padding:3px 9px; min-height:0; font-size:0.78rem;}
.vob-fbk button.on{background:var(--accent); color:var(--accent-ink); border-color:var(--accent);}
.vob-fbk .vob-fbk-c{color:var(--muted); font-style:italic;}
.vob-fbk-n{font-size:0.72rem; padding:0 6px; border-radius:9px; background:var(--bg); border:1px solid var(--border);}
.vob-cmp{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:8px 0;}
.vob-cmp select{width:auto; max-width:100%;}
.vob-cmpres h4{margin:10px 0 4px; font-size:0.9rem;}
.vob-cmpres .c-new{color:var(--ok);} .vob-cmpres .c-gone{color:var(--danger);} .vob-cmpres .c-chg{color:#a87400;}
.vob-cmpres li{font-size:0.85rem; margin:2px 0;}
.vob-fristen{display:flex; gap:10px; flex-wrap:wrap; margin:10px 0;}
.vob-frist{border:1px solid var(--border); border-radius:10px; padding:6px 12px; font-size:0.85rem;}
.vob-frist b{display:block; font-size:1rem;}
.vob-frist.warn{border-color:#D9A21B;} .vob-frist.bad{border-color:var(--danger); color:var(--danger);}
.anf-fristen{border:1px solid var(--border); border-radius:12px; padding:10px 14px; margin-bottom:12px;}
.anf-fristen h3{margin:0 0 6px; font-size:0.95rem; color:var(--accent);}
.anf-frow{display:flex; gap:10px; flex-wrap:wrap; align-items:baseline; padding:4px 0; border-bottom:1px dashed var(--border); font-size:0.86rem;}
.anf-frow:last-child{border-bottom:none;}
.anf-frow a{font-weight:600; color:var(--accent);}
.hr-vors{display:flex; flex-direction:column; gap:6px; margin:6px 0 10px;}
.hr-v{border:1px solid var(--border); border-radius:8px; padding:6px 10px; font-size:0.84rem;}
.hr-v .hr-a{display:flex; gap:6px; margin-top:4px;}

/* Einklappbare Bereiche (Einstellungen): nur der erste offen */
.set-card.fold > h2{cursor:pointer; user-select:none; position:relative; padding-right:26px;}
.set-card.fold > h2::after{content:"▾"; position:absolute; right:2px; top:0; opacity:.6; transition:transform .2s;}
.set-card.fold.folded > h2::after{transform:rotate(-90deg);}
.set-card.fold.folded > :not(h2){display:none !important;}
.set-card.fold.folded > h2{margin-bottom:0;}
