/* ====== DESIGN TOKENS (auf :root -> überall verfügbar; pro Theme via .app[data-theme] überschrieben) ====== */
:root{
  --paper:#EEF2F4; --surface:#FFFFFF; --surface-2:#F4F7F8;
  --line:#DCE3E7; --line-soft:#E7ECEF;
  --ink:#12242F; --muted:#5D707C; --faint:#8B9AA3;
  --shadow:0 1px 2px rgba(18,36,47,.04),0 4px 14px rgba(18,36,47,.05);
  --card-hover:0 3px 18px rgba(11,122,140,.13);
  --accent:#0B7A8C; --accent-deep:#095E6C; --accent-soft:#E1F0F1;
  --rail-bg:#FFFFFF; --rail-txt:#5D707C; --rail-active-bg:#E1F0F1; --rail-active-txt:#095E6C; --rail-border:#DCE3E7; --rail-group:#9CACB5;
  --grey:#9AAAB4; --amber:#B77A1E; --green:#2E9E6B; --red:#D64536; --info:#3B82C4; --violet:#7C5CBF; --rose:#C24E86;
  --grey-bg:#EAEFF1; --amber-bg:#FBF0DC; --green-bg:#E2F1E9; --red-bg:#F8E2DE; --info-bg:#E4EEF6; --violet-bg:#ECE6F6; --rose-bg:#F7E1EC;
  --p-service-bg:#E1F0F1; --p-service-tx:#095E6C;
  --p-neubau-bg:#E5EDF7;  --p-neubau-tx:#2F6595;
  --p-garantie-bg:#EFE4F2;--p-garantie-tx:#7A4D8A;
  --intern-bg:#EFE7D6; --intern-tx:#8A7327;
}
.app[data-theme="nacht"]{
  --paper:#1A1F24; --surface:#232A30; --surface-2:#2C333A;
  --line:#39424A; --line-soft:#2E353C;
  --ink:#E9EDF0; --muted:#A4AEB6; --faint:#727C84;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 6px 18px rgba(0,0,0,.32);
  --card-hover:0 3px 20px rgba(47,176,192,.18);
  --accent:#2FB0C0; --accent-deep:#68CDD9; --accent-soft:#173A40;
  --rail-bg:#14181C; --rail-txt:#93A0A8; --rail-active-bg:#173A40; --rail-active-txt:#7FD6E1; --rail-border:#2A333A; --rail-group:#5D6870;
  --grey:#7E8A93; --amber:#D9A24C; --green:#47B27E; --red:#E36A5B; --info:#5B9BD6; --violet:#9B82D8; --rose:#DB7AA6;
  --grey-bg:#2A323A; --amber-bg:#3A2E1A; --green-bg:#193828; --red-bg:#3B221E; --info-bg:#1D3040; --violet-bg:#2C2542; --rose-bg:#3A2130;
  --p-service-bg:#173A40; --p-service-tx:#7FD6E1;
  --p-neubau-bg:#1F3145; --p-neubau-tx:#8FB6DE;
  --p-garantie-bg:#312339;--p-garantie-tx:#C79BD6;
  --intern-bg:#35321F; --intern-tx:#DAC684;
}
/* „Seekarte": Pergament + Marine-Tinte + Messing-Akzent — Anmutung einer alten Seekarte,
   bewusst deutlich anders als White (kühles Teal-Weiß) und Dark. */
.app[data-theme="see"]{
  --paper:#ECE3CE; --surface:#FAF4E3; --surface-2:#E7DCC1;
  --line:#D6C9A9; --line-soft:#E2D6BB;
  --ink:#20303C; --muted:#665E4C; --faint:#998E74;
  --shadow:0 1px 2px rgba(43,33,15,.06),0 4px 14px rgba(43,33,15,.08);
  --card-hover:0 3px 18px rgba(165,106,43,.20);
  --accent:#A56A2B; --accent-deep:#7E4E1C; --accent-soft:#EEDFC3;
  --rail-bg:#E7DCC1; --rail-txt:#665E4C; --rail-active-bg:#EEDFC3; --rail-active-txt:#7E4E1C; --rail-border:#D6C9A9; --rail-group:#A79A7C;
  --grey:#A79A7C; --amber:#9A6B14; --green:#3C7A4E; --red:#B23A2A; --info:#2F5E8C; --violet:#6E56A8; --rose:#A85E80;
  --grey-bg:#E4D8BC; --amber-bg:#F1E3C4; --green-bg:#DEEAD6; --red-bg:#F1DDD3; --info-bg:#DEE6EF; --violet-bg:#E6DEEE; --rose-bg:#EFD9E4;
  --p-service-bg:#EEDFC3; --p-service-tx:#7E4E1C;
  --p-neubau-bg:#DEE6EF; --p-neubau-tx:#2F5E8C;
  --p-garantie-bg:#EADEE8;--p-garantie-tx:#7A4D7A;
  --intern-bg:#E7DBBF; --intern-tx:#7E6A22;
}

*{box-sizing:border-box}
html,body{margin:0}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; background:var(--paper,#EEF2F4);
  /* Ligaturen aus: manche System-Fonts verschmelzen „Nr"→„№" (Numero) — unerwünscht in Labels/Feldern.
     Bewusst nur font-variant-ligatures (nicht font-feature-settings), damit tabular-nums intakt bleibt. */
  font-variant-ligatures:none}
:root{--mono:ui-monospace,"SF Mono","SFMono-Regular","Roboto Mono",Menlo,Consolas,monospace}
.app{color:var(--ink); background:var(--paper); display:grid; grid-template-columns:216px 1fr; min-height:100vh; font-size:14px; line-height:1.45; -webkit-font-smoothing:antialiased}
b{font-weight:650}
button{font-family:inherit; color:inherit; cursor:pointer}
a{color:var(--accent-deep)}
:focus-visible{outline:2px solid var(--accent); outline-offset:2px}

/* ---------- Rail ---------- */
.rail{background:var(--rail-bg); color:var(--rail-txt); display:flex; flex-direction:column; padding:16px 12px; gap:3px; position:sticky; top:0; height:100vh; border-right:1px solid var(--rail-border); overflow-y:auto}
.brand{display:flex; align-items:center; gap:9px; padding:6px 8px 16px; color:var(--ink); font-weight:700; font-size:17px; letter-spacing:.2px}
.brand .anchor{width:26px; height:26px; display:grid; place-items:center; background:var(--accent); color:#fff; border-radius:8px; font-size:15px}
.nav-group{margin-top:14px; padding:0 8px 6px; font-family:var(--mono); font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:var(--rail-group)}
.nav-item{display:flex; align-items:center; gap:11px; padding:8px 10px; border-radius:8px; color:var(--rail-txt); font-size:13.5px; border:0; background:none; width:100%; text-align:left}
.nav-item:hover{background:var(--surface-2); color:var(--ink)}
.nav-item.active{background:var(--rail-active-bg); color:var(--rail-active-txt); font-weight:600; box-shadow:inset 3px 0 0 var(--accent)}
.nav-item .ic{width:17px; text-align:center; opacity:.9}
.rail-foot{margin-top:auto; padding-top:10px}

/* ---------- Topbar ---------- */
.main{display:flex; flex-direction:column; min-width:0}
.topbar{display:flex; align-items:center; gap:14px; padding:12px 26px; background:var(--surface); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:5}
.search{flex:1; max-width:520px; display:flex; align-items:center; gap:9px; background:var(--surface-2); border:1px solid var(--line); border-radius:10px; padding:9px 13px; color:var(--faint)}
.search .ic-svg{width:16px; height:16px; flex:none; color:var(--faint)}
.search kbd{margin-left:auto; font-family:var(--mono); font-size:11px; background:var(--surface); border:1px solid var(--line); border-bottom-width:2px; border-radius:5px; padding:1px 6px; color:var(--muted)}
/* Such-Box mit echtem Input (Boote & andere Listen) — exakt gleiche Optik wie die Projekt-Suche */
.search.bsearch{flex:1; cursor:text}
/* Boots-Suche flach wie die Projekt-Suchpille: globales Feld-Styling (weißer Kasten, Rahmen,
   Fokus-Ring) hier bewusst aus. Per ID, weil die globale Feld-Regel (.app input:not(...)) sehr
   hohe Spezifität hat und ein .search.bsearch input sonst verliert. */
#boatSearch, #boatSearch:focus, #boatSearch:hover{
  flex:1; min-width:0; width:100%; border:0; background:transparent; outline:none; box-shadow:none;
  min-height:0; height:auto; border-radius:0; padding:0; margin:0;
  font-size:13.5px; color:var(--ink)}
#boatSearch::placeholder{color:var(--faint)}
.spacer{flex:1}
.icon-btn{width:36px; height:36px; border-radius:9px; border:1px solid var(--line); background:var(--surface); color:var(--muted); display:grid; place-items:center; font-size:15px}
.icon-btn:hover{border-color:var(--accent); color:var(--accent-deep)}
.avatar{width:34px; height:34px; border-radius:50%; background:var(--accent); color:#fff; display:flex; align-items:center; justify-content:center; line-height:1; padding:0; font-weight:650; font-size:13px; border:0; box-sizing:border-box}

/* Überschriften: Pfeil-Cursor statt Text-I-Beam. (Der bewegliche Caret „überall im Text" ist die
   Browser-Caret-Navigation/F7 — Browser-Setting, kein App-Verhalten; wird nicht per CSS erzwungen.) */
h1, h2, h3, h4, h5, h6 { cursor: default }
.view{padding:22px 26px 60px}
.page-head{display:flex; align-items:center; gap:14px}
.page-head h1{font-size:22px; margin:0; letter-spacing:-.01em}
/* Einstellungen: Auto-Save-Status statt Speichern-Button */
.set-autosave{margin-left:auto; align-self:center; font-family:var(--mono); font-size:12px; letter-spacing:.02em; color:var(--faint); white-space:nowrap; transition:color .2s ease}
.set-autosave[data-kind="saving"]{color:var(--muted)}
.set-autosave[data-kind="ok"]{color:var(--green)}
.set-autosave[data-kind="err"]{color:var(--red)}
.btn{border:1px solid var(--line); background:var(--surface); border-radius:9px; padding:8px 13px; font-size:13px; font-weight:550; display:inline-flex; align-items:center; justify-content:center; gap:7px; color:var(--ink)}
.btn:hover{border-color:var(--accent); color:var(--accent-deep)}
.btn.primary{background:var(--accent); border-color:var(--accent); color:#fff}
.btn.primary:hover{background:var(--accent-deep)}
.btn.ghost{background:none}
.btn.danger:hover{border-color:var(--red); color:var(--red)}
.toolbar2{display:flex; align-items:center; gap:14px; margin:16px 0 12px; flex-wrap:wrap}
.selwrap{display:flex; align-items:center; gap:7px; font-size:12.5px; color:var(--muted)}
.sel{border:1px solid var(--line); background:var(--surface); border-radius:8px; padding:6px 10px; font-size:12.5px; color:var(--ink)}
.summary{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:6px}
.s-chip{font-size:12px; padding:4px 10px; border-radius:20px; font-weight:600}
.summary .muted{color:var(--faint); font-size:12.5px; margin-left:4px}
.legend{font-size:12px; color:var(--muted); margin:0 0 14px; display:flex; align-items:center; gap:7px}
.legend .sp{font-family:var(--mono); color:var(--accent-deep); background:var(--accent-soft); border-radius:6px; padding:1px 6px}
.empty{color:var(--faint); text-align:center; padding:40px; font-size:13.5px}

/* ---------- Board ---------- */
/* Höhe wird per JS (fitBoardScroll) auf die Resthöhe bis zum Bildschirmrand gesetzt -> die horizontale
   Scrollbar liegt am unteren Viewport-Rand; das Board scrollt intern (vertikal + horizontal). */
.board-scroll{overflow:auto; padding-bottom:10px; margin:0 -26px; padding-left:26px; padding-right:26px; overscroll-behavior:contain}
.board{display:flex; gap:16px; align-items:flex-start; min-width:min-content}
.col{width:288px; flex:0 0 288px; display:flex; flex-direction:column; gap:11px}
.col-head{display:flex; align-items:center; gap:9px; padding:2px 4px 0}
.col-head .badge{width:8px; height:8px; border-radius:50%}
.col-head h3{margin:0; font-size:13px; font-weight:650}
.col-head .cnt{font-family:var(--mono); font-size:11.5px; color:var(--faint)}
.col-empty{border:1.5px dashed var(--line); border-radius:12px; padding:18px; text-align:center; color:var(--faint); font-size:12.5px}
.archmore{margin-top:4px; width:100%; justify-content:center}

/* ---------- Kachel ---------- */
.pcard{position:relative; text-align:left; width:100%; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:14px; display:flex; flex-direction:column; gap:12px; box-shadow:var(--shadow); transition:border-color .14s, transform .05s, box-shadow .14s}
.pcard:hover{border-color:var(--accent); box-shadow:var(--card-hover)}
.pcard:active{transform:translateY(1px)}
.pcard.near{border-color:var(--amber); box-shadow:0 0 0 2px var(--amber-bg), var(--shadow)}
.pcard.over{border:2px solid var(--red); background:linear-gradient(180deg,var(--red-bg),var(--surface) 30px); box-shadow:0 0 0 1px var(--red), var(--shadow)}
/* NEW-1: Hover-Feedback auch auf Kacheln mit Deadline-Rahmen (farbiger Ring bleibt, Karte hebt sich) */
.pcard.near:hover{box-shadow:0 0 0 2px var(--amber), var(--card-hover)}
.pcard.over:hover{box-shadow:0 0 0 1px var(--red), var(--card-hover)}
.pcard-news{position:absolute; top:12px; right:13px; width:9px; height:9px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 3px var(--accent-soft)}
.split-tag{position:absolute; top:0; right:0; font-family:var(--mono); font-size:9.5px; letter-spacing:.06em; background:var(--accent-soft); color:var(--accent-deep); padding:3px 8px; border-bottom-left-radius:8px; border-top-right-radius:12px; border-left:1px solid var(--line); border-bottom:1px solid var(--line); cursor:help}
.pcard-top{display:flex; align-items:flex-start; gap:13px}
.ring{--p:0; --c:var(--grey); position:relative; width:52px; height:52px; flex:0 0 52px; border-radius:50%; display:grid; place-items:center; background:conic-gradient(var(--c) calc(var(--p)*1%), var(--grey-bg) 0)}
.ring::before{content:""; position:absolute; width:40px; height:40px; border-radius:50%; background:var(--surface)}
.ring span{position:relative; font-family:var(--mono); font-size:12px; font-weight:600; letter-spacing:-.02em}
.pcard-head{min-width:0; flex:1; padding-right:16px}
.pcard-title{font-weight:680; font-size:14.5px; letter-spacing:-.01em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.pcard-name{font-size:13px; color:var(--ink); margin-top:1px}
.pcard-sub{font-family:var(--mono); font-size:10.5px; letter-spacing:.03em; text-transform:uppercase; color:var(--faint); margin-top:3px}
.pcard-lead{font-size:12px; color:var(--muted); margin-top:5px}
.pcard-lead .vt{color:var(--faint)}
.pcard-abnahme{display:inline-flex; align-items:center; gap:4px; margin-top:7px; font-size:11.5px; font-weight:650; color:var(--amber); background:var(--amber-bg); border:1px solid var(--amber); border-radius:7px; padding:3px 8px; width:fit-content}
.pcard-mid{display:flex; flex-wrap:wrap; gap:6px; align-items:center}
.chip{font-size:11.5px; color:var(--muted); background:var(--surface-2); border:1px solid var(--line-soft); border-radius:7px; padding:3px 8px; display:inline-flex; align-items:center; justify-content:center; gap:5px}
.chip b{color:var(--ink); font-variant-numeric:tabular-nums}
.chip.warn b{color:var(--red)}
.chip.intern{background:var(--intern-bg); border-color:var(--intern-bg); color:var(--intern-tx); font-weight:600}
.pill{font-size:11px; font-weight:650; letter-spacing:.02em; padding:3px 9px; border-radius:7px; display:inline-flex; align-items:center; justify-content:center; gap:4px; text-align:center}
.pill-service{background:var(--p-service-bg); color:var(--p-service-tx)}
.pill-neubau{background:var(--p-neubau-bg); color:var(--p-neubau-tx)}
.pill-garantie{background:var(--p-garantie-bg); color:var(--p-garantie-tx)}
.pcard-tasks{display:flex; flex-direction:column; gap:5px; padding-top:2px}
.pcard-tasksep{display:flex; align-items:center; gap:10px; font-size:10px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--faint); margin:2px 0 5px}
.pcard-tasksep .l{flex:1; height:1px; background:var(--line-soft)}
.pcard-tasksep b{color:var(--muted); font-variant-numeric:tabular-nums}
.ptask{display:flex; align-items:center; gap:9px; font-size:12.5px}
.ptask .dot{width:9px; height:9px; border-radius:50%; flex:0 0 9px}
.d-grey{background:var(--grey)} .d-amber{background:var(--amber)} .d-green{background:var(--green)} .d-red{background:var(--red)}
.ptask .tt{white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.ptask .tt.done{text-decoration:line-through; color:var(--faint)}
.ptask.more{color:var(--faint); font-size:11.5px; padding-left:18px}
.pcard-pause{display:flex; align-items:center; gap:6px; font-size:11.5px; color:var(--muted); background:var(--surface-2); border:1px dashed var(--line); border-radius:7px; padding:4px 9px; width:fit-content}
.pcard-pause.due{color:var(--amber); border-color:var(--amber); background:var(--amber-bg); font-weight:600; border-style:solid}

/* ---------- Detail ---------- */
.backlink{border:0; background:none; color:var(--accent-deep); font-weight:600; font-size:13px; padding:0; margin-bottom:14px}
.detail-head{display:flex; align-items:flex-start; gap:16px; flex-wrap:wrap}
.detail-head h1{font-size:22px; margin:0 0 3px}
.detail-sub{color:var(--muted); font-size:13px}
.detail-sub a{font-weight:600; text-decoration:none; cursor:pointer}
.detail-actions{display:flex; gap:8px; flex-wrap:wrap}
/* Flow-Kachel: oben die Stufen, darunter die Fortschritts-Bar — alles in einer Kachel */
.flowbar{display:flex; flex-direction:column; gap:11px; margin:20px 0; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:14px 16px; box-shadow:var(--shadow)}
.flow{display:flex; align-items:center; gap:6px; margin:0; padding:0; width:100%; background:none; border:0; border-radius:0; overflow-x:auto}
.flow-split{flex:0 0 auto; font-size:11px; font-weight:650; color:var(--accent-deep); background:var(--accent-soft); border:1px solid #D3E9EC; border-radius:8px; padding:4px 10px; white-space:nowrap; cursor:help}
.flow-progbar{display:flex; align-items:center; gap:12px}
.fp-lbl{font-size:10px; letter-spacing:.08em; text-transform:uppercase; color:var(--faint); font-weight:700; white-space:nowrap}
.flow-progbar .bar{flex:1}
.fp-val{font-size:12.5px; color:var(--muted); font-weight:600; white-space:nowrap; font-variant-numeric:tabular-nums}
.fp-val .warn{color:var(--amber); font-weight:650}
.flow-progbar.is-done .bar>span{background:var(--green)}
.flow-progbar.is-done .fp-val{color:var(--green)}
.flow .nav-btn{flex:0 0 auto; width:30px; height:30px; border-radius:8px; border:1px solid var(--line); background:var(--surface); display:grid; place-items:center; color:var(--muted); font-size:15px}
.flow .nav-btn:hover{border-color:var(--accent); color:var(--accent-deep)}
.flow-track{display:flex; align-items:center; justify-content:center; gap:5px; flex:1; min-width:min-content}
.stage{font-size:11.5px; padding:6px 11px; border-radius:20px; white-space:nowrap; color:var(--faint); background:var(--surface-2); border:1px solid var(--line-soft); font-weight:550; display:inline-flex; align-items:center; justify-content:center}
.stage.done{color:var(--muted); background:var(--surface)}
.stage.cur{color:#fff; background:var(--accent); border-color:var(--accent); font-weight:650}
.stage-arrow{color:var(--faint); font-size:11px}
/* dünner Rahmen um die aktive Stufen-Spanne (mehrere aktive Kategorien) */
/* Rahmen um die „geteilten" Stufen: rundum gleicher Abstand zu den Pillen. Padding rundum gleich +
   voll gerundeter Rahmen -> der Abstand ist überall (auch an den runden Enden) konzentrisch identisch. */
.flow-frame{display:inline-flex; align-items:center; gap:5px; border:1px solid var(--accent); border-radius:999px; padding:4px; background:color-mix(in srgb, var(--accent) 6%, transparent)}
.nextstep{font-size:14px; font-weight:650; padding:11px 26px; border-radius:11px; box-shadow:0 2px 10px var(--accent-soft)}
.nextstep .ns-arrow{font-weight:700; margin-left:2px}
.flow .flow-next{flex:0 0 auto; white-space:nowrap; padding:8px 15px; margin-left:4px; font-weight:650}
.flow .flow-next .ns-arrow{font-weight:700; margin-left:2px}
.nextstep-done{font-size:12.5px; color:var(--green, #3a9d5d); font-weight:600}
/* Kalkulations-/Popup-Zeilen */
.calc-list{display:flex; flex-direction:column; gap:7px; margin:4px 0 10px}
.calc-row{display:flex; align-items:center; gap:8px}
.calc-row .calc-t{flex:1; font-size:13px; color:var(--ink); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.calc-row .calc-h{width:90px; flex:0 0 auto}
.calc-del{flex:0 0 auto; width:28px; height:28px; border-radius:7px; border:1px solid var(--line); background:var(--surface); color:var(--faint); cursor:pointer}
.calc-del:hover{border-color:var(--red, #d05); color:var(--red, #d05)}
.calc-add{display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:4px}
.calc-add input{flex:1; min-width:120px}
.calc-add .btn{flex:0 0 auto}
.calc-sum{margin-top:12px; text-align:right; font-size:13px; color:var(--muted)}
.calc-sum b{color:var(--ink); font-size:15px}
/* Kalkulieren: Aufgabenblock mit Unteraufgaben + Material */
.calc-task{border:1px solid var(--line); border-radius:9px; padding:8px 9px; background:var(--surface)}
.calc-exp{flex:0 0 auto; width:24px; height:24px; border:none; background:transparent; color:var(--muted); cursor:pointer; font-size:12px; line-height:1}
.calc-detail{margin-top:9px; padding-top:9px; border-top:1px dashed var(--line); display:flex; flex-direction:column; gap:12px}
.calc-sec{display:flex; flex-direction:column; gap:6px}
.calc-seclabel{font-size:11px; font-weight:600; letter-spacing:.03em; text-transform:uppercase; color:var(--muted)}
.calc-sub,.calc-mat{display:flex; align-items:center; gap:8px}
.calc-sub-t,.calc-mat-t{flex:1; font-size:13px; color:var(--ink); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.calc-sub-t.done{text-decoration:line-through; color:var(--faint)}
.calc-chk{flex:0 0 auto; width:22px; height:22px; border-radius:6px; border:1px solid var(--line); background:var(--surface); color:#fff; cursor:pointer; font-size:12px; line-height:1}
.calc-chk.on{background:var(--green); border-color:var(--green)}
.calc-subadd{display:flex; gap:8px; align-items:center; flex-wrap:wrap}
.calc-subadd input{flex:1; min-width:110px}
.calc-subadd .btn{flex:0 0 auto; min-width:34px}
/* Beauftragen-Liste */
.colist{display:flex; flex-direction:column; gap:8px}
.rowline{display:flex; align-items:center; gap:10px}
.chkinline{display:flex; align-items:center; gap:8px; font-size:13px; cursor:pointer}
.chkinline.grow{flex:1; min-width:0}
.rowline .cono{width:140px; flex:0 0 auto}
.prog-wrap{background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:16px 18px; margin-bottom:14px}
.prog-top{display:flex; align-items:baseline; justify-content:space-between; margin-bottom:8px}
.prog-top .lbl{font-family:var(--mono); font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted)}
.prog-top .pct{font-size:24px; font-weight:700; font-variant-numeric:tabular-nums; letter-spacing:-.02em}
.bar{height:9px; border-radius:6px; background:var(--grey-bg); overflow:hidden}
.bar>span{display:block; height:100%; border-radius:6px; background:var(--accent)}
.prog-wrap.is-done .bar>span{background:var(--green)}
.prog-wrap.is-done .pct{color:var(--green)}
.prog-note{margin-top:9px; font-size:12.5px; color:var(--muted)}
.prog-note .warn{color:var(--amber); font-weight:600}
.stats{display:flex; gap:22px; flex-wrap:wrap; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:15px 18px; margin-bottom:14px; align-items:center}
.stat .k{font-family:var(--mono); font-size:10.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--faint)}
.stat .v{font-size:15px; font-weight:600; margin-top:2px; font-variant-numeric:tabular-nums}
.stat .v.small{font-size:13.5px; font-weight:550}
.stat-div{width:1px; align-self:stretch; background:var(--line)}
.notes-field{margin-bottom:18px}
.notes-field label{display:block; margin-bottom:6px; font-size:12.5px; font-weight:600; color:var(--muted)}
.notes-field textarea{width:100%; min-height:84px; resize:vertical}
.tabs{display:flex; gap:2px; border-bottom:1px solid var(--line); margin-bottom:14px; flex-wrap:wrap}
.tab{padding:10px 15px; font-size:13.5px; font-weight:600; color:var(--muted); border:0; background:none; border-bottom:2px solid transparent; margin-bottom:-1px; display:flex; align-items:center; gap:7px}
.tab .n{font-family:var(--mono); font-size:11px; color:var(--faint); background:var(--surface-2); border-radius:10px; padding:0 7px; display:inline-flex; align-items:center; justify-content:center; min-width:18px; min-height:18px}
.tab.active{color:var(--ink); border-bottom-color:var(--accent)}
.tab.active .n{color:var(--accent-deep); background:var(--accent-soft)}
.split-note{display:flex; align-items:flex-start; gap:9px; font-size:12.5px; color:var(--muted); background:var(--accent-soft); border:1px solid var(--line); border-radius:9px; padding:9px 12px; margin-bottom:14px}
.split-note b{color:var(--accent-deep)}
.tasklist{display:flex; flex-direction:column; gap:10px}
/* Split-Detailseite: gemeinsamer Kopf + Spalten je stage-Gruppe */
.split-cols{display:grid; grid-template-columns:repeat(auto-fit,minmax(290px,1fr)); gap:14px; align-items:start}
.split-col{background:var(--surface); border:1px solid var(--line); border-top:3px solid var(--cat,var(--line)); border-radius:12px; padding:13px 13px 15px; display:flex; flex-direction:column; gap:11px}
.split-col .sc-head{display:flex; align-items:center; gap:8px}
.split-col .sc-head .badge{width:9px; height:9px; border-radius:50%; flex:0 0 auto}
.split-col .sc-head h4{margin:0; font-size:13.5px; font-weight:650}
.split-col .sc-cnt{margin-left:auto; font-family:var(--mono); font-size:11px; color:var(--faint); background:var(--surface-2); border:1px solid var(--line-soft); border-radius:20px; padding:1px 8px}
.split-col .sc-next{width:100%; justify-content:center; font-size:12.5px; padding:9px 14px}
.split-col .sc-done{text-align:center; font-size:11.5px}
.split-col .sc-tasks{gap:8px}
@media(max-width:640px){.split-cols{grid-template-columns:1fr}}
.trow{background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:13px 15px; box-shadow:var(--shadow)}
.trow-main{display:flex; align-items:flex-start; gap:13px}
.chk{width:19px; height:19px; flex:0 0 19px; margin-top:2px; border:1.5px solid var(--line); border-radius:6px; background:var(--surface); display:grid; place-items:center; color:#fff; font-size:12px}
.chk.on{background:var(--green); border-color:var(--green)}
.trow-body{flex:1; min-width:0}
.trow-head{cursor:pointer}
.trow-head:hover .trow-title{color:var(--accent-deep)}
.trow-title{font-weight:640; font-size:14px}
.trow-title.done{text-decoration:line-through; color:var(--faint)}
.trow-meta{font-size:12px; color:var(--faint); margin-top:2px}
.assignees{display:flex; gap:5px; flex-wrap:wrap; margin-top:8px}
.who{font-size:11.5px; color:var(--muted); background:var(--surface-2); border:1px solid var(--line-soft); border-radius:20px; padding:2px 9px}
.tbars{margin-top:11px; display:flex; flex-direction:column; gap:7px; max-width:520px}
.tbar{display:flex; align-items:center; gap:10px}
.tbar .tag{font-family:var(--mono); font-size:9.5px; letter-spacing:.06em; text-transform:uppercase; color:var(--faint); width:78px; flex:0 0 78px}
.tbar .bar{flex:1; height:7px}
.tbar .val{font-size:11.5px; color:var(--muted); font-variant-numeric:tabular-nums; width:60px; text-align:right; flex:0 0 60px}
.hbar>span{background:var(--green)}
.hbar.over>span{background:var(--red)}
.tstate{margin-left:auto; align-self:flex-start; font-size:11px; font-weight:650; padding:3px 10px; border-radius:20px}
.st-arbeit{background:var(--info-bg); color:var(--info)}
.st-offen{background:var(--grey-bg); color:var(--muted)}
.st-fertig{background:var(--green-bg); color:var(--green)}
.st-stuck{background:var(--red-bg); color:var(--red)}
.plan-btn{font-size:11.5px; padding:5px 11px; border-radius:8px; border:1px solid var(--line); background:var(--surface); color:var(--muted); align-self:flex-start}
.trow-right{display:flex; align-items:center; gap:9px; margin-left:9px}
.expand{color:var(--faint); background:none; border:0; font-size:14px}
.ticon{color:var(--faint); background:none; border:0; font-size:14px; line-height:1; padding:2px 3px; border-radius:6px; cursor:pointer}
.ticon:hover{color:var(--ink); background:var(--grey-bg)}
.ticon.ok{color:var(--green)}
.texp{margin-top:13px; padding-top:13px; border-top:1px dashed var(--line); display:flex; flex-direction:column; gap:12px}
.subhead{font-family:var(--mono); font-size:10px; letter-spacing:.1em; text-transform:uppercase; color:var(--faint)}
.subrow{display:flex; align-items:center; gap:9px; font-size:12.5px; padding:3px 0}
.subrow .box{width:15px; height:15px; border:1.4px solid var(--line); border-radius:4px; background:var(--surface); flex:0 0 15px; display:grid; place-items:center; color:#fff; font-size:10px; padding:0; line-height:1; box-sizing:border-box}
.subrow .box.on{background:var(--green); border-color:var(--green)}
.subrow .done{text-decoration:line-through; color:var(--faint)}
.gwk-chip{display:inline-block; font-size:10.5px; font-weight:650; letter-spacing:.02em; padding:1px 7px; border-radius:6px; background:var(--info-bg); color:var(--info); vertical-align:middle}
.gwk-set{display:flex; flex-direction:column; gap:5px}
.gwk-set .sel{max-width:220px}
.sub-block{display:flex; flex-direction:column; gap:6px}
.sub-list{display:flex; flex-direction:column; gap:1px}
.sub-empty{font-size:12px; color:var(--faint); padding:1px 0}
.subrow .sub-del{margin-left:auto; opacity:0}
.subrow:hover .sub-del{opacity:.7}
.sub-add{display:flex; gap:7px; align-items:center}
.sub-add input{flex:1; border:1px solid var(--line); background:var(--surface-2); border-radius:8px; padding:6px 10px; font:inherit; font-size:12.5px; color:var(--ink)}
.sub-add input:focus{outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); background:var(--surface)}
/* Material-Rückfragen-Chat (MAT-2) */
.mat-cmt-list{display:flex; flex-direction:column; gap:10px; max-height:46vh; overflow:auto; margin-bottom:12px}
.mat-cmt{background:var(--surface-2); border:1px solid var(--line-soft); border-radius:10px; padding:9px 12px}
.mat-cmt-h{display:flex; align-items:center; gap:8px; font-size:12.5px; margin-bottom:4px}
.mat-cmt-h b{font-weight:650}
.mat-cmt-at{margin-left:auto; color:var(--faint); font-size:11.5px}
.mat-cmt-txt{font-size:13.5px; white-space:pre-wrap; line-height:1.45}
.mat-cmt-add{display:flex; gap:8px}
.mat-cmt-add input{flex:1; border:1px solid var(--line); background:var(--surface-2); border-radius:9px; padding:9px 12px; font:inherit; font-size:13.5px; color:var(--ink)}
.mat-cmt-add input:focus{outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); background:var(--surface)}

/* ---------- Einstellungen ---------- */
.set-layout{display:grid; grid-template-columns:200px 1fr; gap:24px; margin-top:18px; align-items:start}
.set-nav{display:flex; flex-direction:column; gap:2px; position:sticky; top:78px}
.set-nav button{text-align:left; border:0; background:none; padding:9px 12px; border-radius:8px; font-size:13.5px; color:var(--muted); font-weight:550}
.set-nav button:hover{background:var(--surface-2); color:var(--ink)}
.set-nav button.on{background:var(--accent-soft); color:var(--accent-deep); font-weight:650}
.set-panel{display:none}
.set-panel.on{display:block}
.set-group{background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:20px 22px; margin-bottom:16px; box-shadow:var(--shadow)}
.set-group h3{margin:0 0 3px; font-size:15px}
.set-group .desc{margin:0 0 16px; font-size:12.5px; color:var(--muted)}
.field{display:flex; flex-direction:column; gap:6px; margin-bottom:16px; max-width:440px}
.field:last-child{margin-bottom:0}
.field label{font-size:12.5px; font-weight:600; color:var(--ink)}
.field .hint{font-size:11.5px; color:var(--faint)}
.field input, .field select, .field textarea{border:1px solid var(--line); border-radius:9px; padding:9px 12px; font-size:13px; font-family:inherit; background:var(--surface); color:var(--ink)}
.field textarea{resize:vertical; min-height:120px; line-height:1.5}
.theme-cards{display:flex; gap:12px; flex-wrap:wrap}
.theme-card{border:1.5px solid var(--line); border-radius:12px; padding:12px; background:var(--surface); width:150px; text-align:left; display:flex; flex-direction:column; gap:9px}
.theme-card:hover{border-color:var(--accent)}
.theme-card.on{border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft)}
.theme-swatch{height:44px; border-radius:8px; display:flex; overflow:hidden; border:1px solid rgba(0,0,0,.08)}
.theme-swatch span{flex:1}
.theme-card .tc-name{display:flex; align-items:center; justify-content:space-between; font-size:13px; font-weight:650}
.theme-card .tc-check{color:var(--accent); font-weight:700}
.saved-hint{font-size:12px; color:var(--green); margin-left:10px}

/* ---------- Platzhalter ---------- */
.placeholder{max-width:560px; margin:40px auto; text-align:center; background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:40px 32px; box-shadow:var(--shadow)}
.placeholder .ph-ic{width:52px; height:52px; margin:0 auto 16px; border-radius:13px; background:var(--accent-soft); color:var(--accent-deep); display:grid; place-items:center; font-size:23px}
.placeholder h2{margin:0 0 8px; font-size:19px}
.placeholder p{margin:0 auto; font-size:13.5px; color:var(--muted); max-width:420px; line-height:1.6}
.placeholder .ph-tag{display:inline-block; margin-top:16px; font-family:var(--mono); font-size:10.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--accent-deep); background:var(--accent-soft); border-radius:7px; padding:5px 11px}

/* ---------- Login ---------- */
.login-wrap{min-height:100vh; display:grid; place-items:center; background:var(--paper); padding:24px}
.login-card{width:100%; max-width:380px; background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:32px 30px; box-shadow:var(--shadow)}
.login-brand{display:flex; align-items:center; gap:10px; font-weight:700; font-size:20px; margin-bottom:4px}
.login-brand .anchor{width:30px; height:30px; display:grid; place-items:center; background:var(--accent); color:#fff; border-radius:9px; font-size:17px}
.login-brand .anchor .logo-svg{width:18px; height:18px}
.login-sub{color:var(--muted); font-size:13px; margin-bottom:22px}
.login-card .field{max-width:none}
.login-err{color:var(--red); font-size:12.5px; margin-top:-6px; margin-bottom:12px; min-height:16px}
.login-card .btn.primary{width:100%; justify-content:center; padding:11px}

/* ====== Landing / Login (zweispaltig: Anmeldung + Werbestreifen) ====== */
.landing{min-height:100vh; display:grid; grid-template-columns:1.05fr .95fr; background:var(--paper)}
.landing-left{display:flex; flex-direction:column; justify-content:center; align-items:center; padding:40px 32px; position:relative}
.landing-login{width:100%; max-width:360px}
.landing-foot{position:absolute; bottom:22px; left:0; right:0; text-align:center; font-size:11.5px; color:var(--faint)}
.login-form{display:flex; flex-direction:column; gap:11px; margin-top:18px}
.login-form .field{display:flex; flex-direction:column; gap:5px; max-width:none}
.login-form label{font-size:12.5px; color:var(--muted); font-weight:600}
.login-form input{border:1px solid var(--line); background:var(--surface); border-radius:9px; padding:10px 12px; font-size:14px; color:var(--ink); width:100%; box-sizing:border-box}
.login-form input:focus{outline:2px solid var(--accent); outline-offset:1px; border-color:var(--accent)}
.login-form .lbtn{width:100%; justify-content:center; padding:11px; font-size:14px; margin-top:2px}
.login-form .login-err{margin:0; min-height:0}
.login-form .login-err:empty{display:none}
.login-hint{font-size:12px; color:var(--muted); margin:18px 0 0; line-height:1.5; display:flex; gap:8px; align-items:flex-start}
.login-hint .ic-svg{width:14px; height:14px; flex:none; margin-top:2px; color:var(--faint)}
.landing-right{background:linear-gradient(155deg, var(--accent-deep), var(--accent)); color:#fff; display:flex; align-items:center; padding:52px 48px; position:relative; overflow:hidden}
.landing-right::after{content:""; position:absolute; right:-120px; top:-120px; width:340px; height:340px; border-radius:50%; background:rgba(255,255,255,.07)}
.lr-inner{max-width:440px; position:relative; z-index:1}
.lr-eyebrow{font-size:12px; text-transform:uppercase; letter-spacing:.12em; opacity:.82; font-weight:600}
.lr-head{font-size:31px; font-weight:750; line-height:1.14; margin:12px 0 14px; letter-spacing:-.02em; text-wrap:balance}
.lr-lead{font-size:15px; line-height:1.55; opacity:.92; margin:0 0 28px}
.lr-features{display:flex; flex-direction:column; gap:16px}
.lr-feat{display:flex; gap:14px; align-items:flex-start}
.lr-feat-ic{width:38px; height:38px; flex:none; border-radius:11px; background:rgba(255,255,255,.16); display:grid; place-items:center}
.lr-feat-ic .ic-svg{width:20px; height:20px; color:#fff}
.lr-feat-t{font-weight:650; font-size:14.5px}
.lr-feat-d{font-size:12.5px; opacity:.86; line-height:1.45; margin-top:2px}

/* --- Registrierung (neue Werft anlegen) --- */
.landing-left{overflow-y:auto}
.reg-lead{font-size:12.5px; color:var(--muted); margin:6px 0 16px; line-height:1.5}
.opt{color:var(--faint); font-weight:500; font-size:11px}
.field-err{color:var(--red); font-size:11.5px; margin-top:3px; line-height:1.4}
.field-err:empty{display:none}
.login-form input.bad{border-color:var(--red)}
.pw-wrap{position:relative; display:flex; align-items:center}
.pw-wrap input{flex:1; padding-right:82px}
.pw-toggle{position:absolute; right:6px; background:none; border:0; color:var(--accent-deep); font-size:12px; font-weight:600; cursor:pointer; padding:5px 7px}
.pwrules{list-style:none; margin:9px 0 0; padding:0; display:flex; flex-direction:column; gap:5px}
.pwrule{display:flex; align-items:center; gap:8px; font-size:11.5px; color:var(--faint)}
.pwrule-ic{width:15px; height:15px; flex:none; border:1.5px solid var(--line); border-radius:50%; display:grid; place-items:center; color:transparent}
.pwrule-ic .ic-svg{width:10px; height:10px}
.pwrule.ok{color:var(--green)}
.pwrule.ok .pwrule-ic{border-color:var(--green); background:var(--green); color:#fff}
.reg-help{font-size:11.5px; color:var(--muted); margin-top:8px; min-height:14px}
.reg-legal{font-size:11px; color:var(--faint); line-height:1.5; margin:16px 0 0; display:flex; gap:8px; align-items:flex-start}
.reg-legal .ic-svg{width:13px; height:13px; flex:none; margin-top:2px; color:var(--faint)}
.auth-switch{font-size:12.5px; color:var(--muted); margin-top:16px; text-align:center}
.auth-link{background:none; border:0; color:var(--accent-deep); font-weight:600; cursor:pointer; font-size:inherit; padding:0; text-decoration:underline}
.auth-link:hover{color:var(--accent)}

/* --- 2FA-Einrichtung (QR + Schlüssel) --- */
.tf-setup{display:flex; gap:16px; align-items:center; flex-wrap:wrap; margin-top:4px}
.tf-qr{border:1px solid var(--line); border-radius:10px; background:#fff; padding:6px; flex:none; image-rendering:pixelated}
.tf-key{flex:1; min-width:170px}
.tf-key label{display:block; font-size:12px; color:var(--muted); font-weight:600; margin-bottom:5px}
.tf-secret{display:inline-block; font-family:var(--mono); font-size:15px; letter-spacing:.06em; background:var(--surface-2); border:1px solid var(--line); border-radius:8px; padding:8px 11px; color:var(--ink); user-select:all; word-break:break-word}

/* Angebot erstellen: Aufschlüsselung nach Aufgabe (Stunden + Material) */
.of-list{display:flex; flex-direction:column; gap:8px; max-height:46vh; overflow-y:auto; margin-bottom:10px}
.of-task{border:1px solid var(--line); border-radius:10px; padding:9px 11px; background:var(--surface)}
.of-task.of-off{opacity:.5}
.of-task.of-general{background:var(--surface-2)}
.of-head{display:flex; align-items:center; gap:9px; cursor:pointer; font-weight:600; font-size:13.5px}
.of-head input{width:auto; flex:0 0 auto; margin:0}
.of-head .of-t{flex:1; min-width:0}
.of-head .of-h{flex:0 0 auto; font-variant-numeric:tabular-nums; color:var(--accent-deep); font-weight:700}
.of-mat{margin:7px 0 0 26px; display:flex; flex-direction:column; gap:3px}
.of-mat-i{display:flex; justify-content:space-between; gap:10px; font-size:12px; color:var(--muted)}
.of-mat-i .of-mat-q{flex:0 0 auto; font-variant-numeric:tabular-nums; color:var(--faint)}
.of-mat-none{margin:5px 0 0 26px; font-size:11.5px; color:var(--faint); font-style:italic}
.of-sum{padding:9px 12px; background:var(--accent-soft); border:1px solid var(--line); border-radius:9px; font-size:13px; color:var(--ink)}
.of-sum b{font-variant-numeric:tabular-nums}

/* Bausteine für die automatische Projektnummer */
.pnum-toks{display:flex; flex-wrap:wrap; gap:6px; margin:8px 0}
.pnum-tok{font-family:var(--mono); font-size:11.5px; padding:4px 9px; border:1px solid var(--line); border-radius:7px; background:var(--surface-2); color:var(--accent-deep); cursor:pointer}
.pnum-tok:hover{border-color:var(--accent); background:var(--accent-soft)}

/* --- Onboarding-Assistent (Overlay) --- */
.ob-ov{position:fixed; inset:0; background:rgba(10,20,26,.55); display:grid; place-items:center; z-index:60; padding:20px; animation:fade .14s ease}
.ob-card{width:100%; max-width:640px; max-height:calc(100vh - 40px); overflow-y:auto; background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:18px; box-shadow:0 24px 70px rgba(8,18,24,.32); padding:26px 28px; position:relative}
.ob-x{position:absolute; top:14px; right:16px; background:none; border:0; color:var(--faint); font-size:15px; cursor:pointer; line-height:1; padding:5px}
.ob-x:hover{color:var(--ink)}
.ob-progress{display:flex; align-items:center; gap:12px; margin:2px 30px 18px 0}
.ob-step-count{font-size:11.5px; color:var(--muted); font-weight:600; white-space:nowrap}
.ob-segs{display:flex; gap:6px; flex:1}
.ob-seg{flex:1; height:6px; border-radius:99px; background:var(--surface-2); color:transparent; font-size:9px}
.ob-seg.cur{background:var(--accent)}
.ob-seg.done{background:var(--green)}
.ob-body{min-height:110px}
.ob-foot{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:22px; padding-top:16px; border-top:1px solid var(--line-soft)}
.ob-foot-l{display:flex; gap:8px; flex-wrap:wrap}
.ob-hero{text-align:center; padding:8px 0}
.ob-hero-ic{width:52px; height:52px; border-radius:15px; background:var(--accent-soft); color:var(--accent-deep); display:inline-grid; place-items:center; margin-bottom:12px}
.ob-hero-ic .ic-svg{width:26px; height:26px}
.ob-hero-ic.ok{background:var(--green-bg); color:var(--green)}
.ob-hero h2{font-size:22px; margin:0 0 8px; letter-spacing:-.01em}
.ob-hero p{color:var(--muted); font-size:13.5px; line-height:1.55; margin:0 auto; max-width:46ch}
.ob-preview{display:flex; flex-direction:column; gap:10px; margin:20px auto 0; max-width:380px; text-align:left}
.ob-prev{display:flex; gap:12px; align-items:center; padding:10px 12px; border:1px solid var(--line-soft); border-radius:11px; background:var(--surface-2)}
.ob-prev>span{width:34px; height:34px; flex:none; border-radius:9px; background:var(--surface); display:grid; place-items:center; color:var(--accent-deep)}
.ob-prev .ic-svg{width:18px; height:18px}
.ob-prev-t{font-weight:600; font-size:13.5px}
.ob-prev-d{font-size:12px; color:var(--faint); margin-top:1px}
.ob-lead h3{font-size:17px; margin:0 0 4px}
.ob-lead p{color:var(--muted); font-size:13px; margin:0 0 16px; line-height:1.5}
.ob-modcards{display:flex; flex-direction:column; gap:10px}
.ob-modcard{display:flex; align-items:center; gap:12px; padding:13px 14px; border:1px solid var(--line); border-radius:12px; background:var(--surface); cursor:pointer}
.ob-modcard:hover{border-color:var(--accent)}
.ob-mod-ic{width:34px; height:34px; flex:none; border-radius:9px; background:var(--accent-soft); color:var(--accent-deep); display:grid; place-items:center}
.ob-mod-ic .ic-svg{width:18px; height:18px}
.ob-mod-txt{flex:1; min-width:0}
.ob-mod-t{font-weight:600; font-size:13.5px; display:block}
.ob-mod-h{font-size:11.5px; color:var(--faint); display:block; margin-top:1px}
.ob-modcard input{width:auto; flex:none; margin:0}
.ob-modsub{margin-left:26px}
.ob-modcard.is-disabled{opacity:.5; cursor:default}
.ob-modcard.is-disabled:hover{border-color:var(--line)}
.ob-block{margin-bottom:18px}
.ob-block-h{font-weight:650; font-size:13.5px; display:flex; align-items:center; gap:7px}
.ob-block-h .ic-svg{width:16px; height:16px; color:var(--accent-deep)}
.ob-block-d{font-size:12px; color:var(--faint); margin:3px 0 10px}
.ob-chips{display:flex; flex-wrap:wrap; gap:8px}
.ob-chip{display:inline-flex; align-items:center; gap:6px; padding:7px 13px; border:1px solid var(--line); border-radius:99px; background:var(--surface); color:var(--muted); font-size:12.5px; font-weight:600; cursor:pointer}
.ob-chip:hover{border-color:var(--accent)}
.ob-chip.on{background:var(--accent); border-color:var(--accent); color:#fff}
.ob-chip-ck{font-size:11px}
.ob-add{display:flex; gap:8px; margin-top:10px}
.ob-add input{flex:1; min-width:0; border:1px solid var(--line); border-radius:9px; padding:8px 11px; font-size:13px; background:var(--surface); color:var(--ink)}
.ob-warn{color:var(--amber); font-size:12px; margin-top:9px}
.ob-form{display:flex; flex-direction:column; gap:12px}
.ob-form .field{margin:0; max-width:none; gap:5px}
.ob-row2{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.ob-ro{display:flex; justify-content:space-between; font-size:12.5px; color:var(--muted); padding:6px 0 10px; border-bottom:1px solid var(--line-soft)}
.ob-sum{display:flex; flex-direction:column; gap:8px; max-width:340px; margin:16px auto 0; text-align:left}
.ob-sum-row{display:flex; align-items:center; gap:9px; font-size:13px; color:var(--ink)}
.ob-sum-row>span{color:var(--accent-deep); display:inline-grid; place-items:center}
.ob-sum-row .ic-svg{width:16px; height:16px}
.ob-next{display:flex; flex-direction:column; gap:8px; max-width:340px; margin:18px auto 0}
.ob-nextbtn{justify-content:flex-start; gap:9px}
.ob-nextbtn .ic-svg{width:16px; height:16px}
.ob-err{color:var(--red); font-size:12.5px; margin-top:12px}
@media (prefers-reduced-motion: reduce){.ob-ov{animation:none}}
@media (max-width:560px){.ob-row2{grid-template-columns:1fr} .ob-card{padding:20px 16px}}
@media (max-width:900px){ .landing{grid-template-columns:1fr} .landing-right{display:none} }

/* ---------- Loading ---------- */
.loading{display:grid; place-items:center; min-height:60vh; color:var(--faint)}
.spinner{width:26px; height:26px; border:3px solid var(--line); border-top-color:var(--accent); border-radius:50%; animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){ .spinner{animation:none} }

/* ---------- Generische Komponenten (alle Seiten) ---------- */
.toolbar{display:flex; align-items:center; gap:12px; margin-bottom:14px; flex-wrap:wrap; min-height:34px}
.toolbar h2{margin:0; font-size:20px; letter-spacing:-.01em}
.card{background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow)}
.list{display:flex; flex-direction:column; gap:8px}
.lrow{display:flex; align-items:center; gap:13px; background:var(--surface); border:1px solid var(--line); border-radius:11px; padding:12px 15px; box-shadow:var(--shadow); text-align:left; width:100%}
.lrow.clickable{cursor:pointer; transition:border-color .14s, box-shadow .14s}
.lrow.clickable:hover{border-color:var(--accent); box-shadow:var(--card-hover)}
.lrow .lr-main{flex:1; min-width:0}
.lrow .lr-title{font-weight:640; font-size:14px}
.lrow .lr-sub{font-size:12px; color:var(--muted); margin-top:2px}
.lrow .lr-trail{display:flex; align-items:center; gap:8px; color:var(--muted); font-size:12.5px; margin-left:auto}
.lr-trail .tstate{align-self:center; margin-left:0}
.avatar-sm{width:34px; height:34px; border-radius:9px; background:var(--accent-soft); color:var(--accent-deep); display:grid; place-items:center; font-weight:650; font-size:14px; flex:0 0 34px}
.group-head{display:flex; align-items:center; justify-content:space-between; margin:18px 0 8px; font-weight:650; font-size:13px}
.group-head .cnt{font-family:var(--mono); font-size:11.5px; color:var(--faint); font-weight:400}
.kv{display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:12px 22px; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:16px 18px; box-shadow:var(--shadow); margin-bottom:14px}
.kv>div{display:flex; flex-direction:column; gap:2px; min-width:0}
.kv span{font-family:var(--mono); font-size:9.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--faint)}
.kv b{font-size:13.5px; font-weight:600; overflow:hidden; text-overflow:ellipsis}
.table-wrap{overflow-x:auto; border:1px solid var(--line); border-radius:12px; background:var(--surface); box-shadow:var(--shadow)}
.data-table{width:100%; border-collapse:collapse; font-size:13px}
.data-table th{font-family:var(--mono); font-size:10px; letter-spacing:.05em; text-transform:uppercase; color:var(--faint); text-align:left; padding:11px 13px; border-bottom:1px solid var(--line); white-space:nowrap; background:var(--surface)}
.data-table td{padding:10px 13px; border-bottom:1px solid var(--line-soft); white-space:nowrap; font-variant-numeric:tabular-nums}
.data-table tr:last-child td{border-bottom:0}
.data-table .sticky-col{position:sticky; left:0; background:var(--surface); font-weight:600; z-index:1}
.data-table td.cell-on{background:var(--green-bg)} .data-table td.cell-off{background:var(--surface-2)}
.stat-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:14px}
.stat-tile{background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:16px 18px; box-shadow:var(--shadow)}
.stat-tile .st-k{font-family:var(--mono); font-size:10px; letter-spacing:.08em; text-transform:uppercase; color:var(--faint)}
.stat-tile .st-v{font-size:26px; font-weight:700; margin-top:6px; letter-spacing:-.02em; font-variant-numeric:tabular-nums}
.stat-tile .st-sub{font-size:12px; color:var(--muted); margin-top:3px}
.cal-grid{display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:6px}
.cal-dow{font-family:var(--mono); font-size:10px; text-transform:uppercase; letter-spacing:.05em; color:var(--faint); text-align:center; padding:4px; min-width:0}
.cal-cell{height:108px; min-width:0; overflow:hidden; background:var(--surface); border:1px solid var(--line); border-radius:9px; padding:7px 8px; font-size:12px; display:flex; flex-direction:column; gap:3px}
.cal-cell.out{background:var(--surface-2); color:var(--faint)}
.cal-cell.today{border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent)}
.cal-cell .cal-d{font-weight:650; font-size:12px; font-variant-numeric:tabular-nums}
.cal-ev{font-size:10.5px; padding:1px 5px; border-radius:5px; background:var(--accent-soft); color:var(--accent-deep); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.badge2{font-size:11px; font-weight:600; padding:2px 8px; border-radius:20px; background:var(--surface-2); color:var(--muted); border:1px solid var(--line-soft); display:inline-flex; align-items:center; justify-content:center; gap:5px}
.filterbar{display:flex; gap:12px; flex-wrap:wrap; align-items:center; margin-bottom:14px}
.subtabs{display:flex; gap:6px; margin-bottom:14px; flex-wrap:wrap}
.subtab{font-size:12.5px; font-weight:600; color:var(--muted); background:var(--surface-2); border:1px solid var(--line); border-radius:20px; padding:6px 13px 4px; line-height:1.15}
.subtab.on{background:var(--accent); border-color:var(--accent); color:#fff}
.row-between{display:flex; align-items:flex-start; justify-content:space-between; gap:12px}
.cl-items{margin:11px 0 0; padding-left:20px; display:flex; flex-direction:column; gap:3px; font-size:13px; color:var(--ink)}
.cl-items li{padding:1px 0}
.cl-empty-note{font-size:12px; color:var(--faint); margin-top:8px}

/* ======================= SHELL v2 (Icons/Topbar/Suche/User-Menü) ======================= */
/* Brand */
.brand{display:flex; align-items:center; gap:9px; padding:4px 8px 16px; border:0; background:none; width:100%; text-align:left; color:var(--ink); font-weight:700; font-size:17px; letter-spacing:.2px}
.brand .brand-logo{width:28px; height:28px; display:grid; place-items:center; color:var(--accent)}
.brand .logo-svg{width:24px; height:24px}
.brand .brand-name{font-weight:700}
.brand:hover{color:var(--accent-deep)}
/* Inline-SVG-Icons: sinnvolle Default-Größe; kontextspezifische Regeln (unten) überschreiben */
.ic-svg{width:1em; height:1em; display:inline-block; vertical-align:-.12em}
.chip .ic-svg,.badge2 .ic-svg{width:13px; height:13px; vertical-align:-.1em}
.btn .ic-svg{width:1.05em; height:1.05em; vertical-align:-.16em; margin-top:-1px}
.avatar-sm .ic-svg{width:17px; height:17px}
/* Sidebar-Icons kräftiger + Labels bolder */
.nav-item{font-weight:560; gap:12px; padding:9px 11px}
.nav-item .ic{width:20px; height:20px; display:grid; place-items:center; opacity:1}
.nav-item .ic .ic-svg{width:19px; height:19px; display:block}
.nav-item .lbl{font-size:13.5px}
.nav-item:hover .ic{color:var(--ink)}
.nav-item.active{font-weight:650}
.nav-item.active .ic .ic-svg{stroke-width:2.4; color:var(--accent)}
.nav-group{font-weight:600}

/* Topbar: Suche zentriert, rechts nur Glocke + Avatar */
.topbar{position:relative; display:flex; align-items:center; justify-content:flex-end; gap:10px; padding:11px 22px}
.topsearch{position:absolute; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:9px; width:min(46vw,480px); background:var(--surface-2); border:1px solid var(--line); border-radius:11px; padding:9px 13px; color:var(--faint); font-size:13px; cursor:pointer}
.topsearch:hover{border-color:var(--accent)}
.topsearch .ic-svg{width:16px; height:16px; flex:none; color:var(--muted)}
.topsearch span{flex:1; text-align:left; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.topsearch kbd{font-family:var(--mono); font-size:10.5px; background:var(--surface); border:1px solid var(--line); border-bottom-width:2px; border-radius:4px; padding:0 5px; margin:0 1px; color:var(--muted); vertical-align:baseline}
.topbar-right{display:flex; align-items:center; gap:10px}
.topbar-actions{display:flex; align-items:center; gap:8px; margin-right:6px}
.topbar-actions .btn.sm{gap:6px}
.topbar-actions .ta-lbl{position:relative; top:2px}   /* Font-Metrik: Label sitzt sonst optisch ~2px zu hoch */
@media (max-width:760px){ .topbar-actions .ta-lbl{display:none} .topbar-actions .btn.sm{padding:6px 8px} }
/* Mobile-Navigation (Off-Canvas): Hamburger links, Scrim schließt. Auf Desktop ausgeblendet. */
.nav-toggle{display:none; margin-right:auto; align-items:center; justify-content:center; width:38px; height:38px; flex:none; border:1px solid var(--line); border-radius:9px; background:var(--surface); color:var(--ink); cursor:pointer}
.nav-toggle .ic-svg{width:20px; height:20px}
.nav-toggle:hover{border-color:var(--accent); color:var(--accent-deep)}
.nav-scrim{display:none}
.icon-btn .ic-svg{width:18px; height:18px}
.avatar{cursor:pointer; border:0}

/* Popover (User-Dropdown + Notif-Panel) */
.notifwrap, .usermenuwrap{position:relative}
.popover{position:absolute; top:calc(100% + 9px); right:0; min-width:236px; background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:0 12px 34px rgba(10,20,26,.22); padding:6px; display:none; z-index:30}
.popover.open{display:block; animation:pop .12s ease}
@keyframes pop{from{opacity:0; transform:translateY(-4px)}to{opacity:1; transform:none}}
@media (prefers-reduced-motion:reduce){ .popover.open{animation:none} }
.um-head{padding:8px 10px 10px; border-bottom:1px solid var(--line); margin-bottom:4px}
.um-name{display:block; font-weight:650; font-size:13.5px}
.um-role{font-size:11.5px; color:var(--muted)}
.um-group{font-family:var(--mono); font-size:9.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--faint); padding:9px 10px 3px}
.um-item{display:flex; align-items:center; gap:10px; width:100%; text-align:left; border:0; background:none; padding:8px 10px; border-radius:8px; font-size:13px; color:var(--ink)}
.um-item:hover{background:var(--surface-2)}
.um-item .ic-svg{width:16px; height:16px; color:var(--muted)}
.um-sep{height:1px; background:var(--line); margin:5px 4px}

/* Benachrichtigungen */
.bellbtn{position:relative}
.bell-badge{position:absolute; top:-3px; right:-3px; min-width:16px; height:16px; padding:0 4px; border-radius:9px; background:var(--red); color:#fff; font-size:10px; font-weight:700; display:grid; place-items:center; line-height:1}
.notifpanel{min-width:330px; padding:0; overflow:hidden}
.np-head{display:flex; align-items:center; justify-content:space-between; padding:11px 14px; border-bottom:1px solid var(--line)}
.np-title{font-weight:650; font-size:13.5px}
.np-readall{border:0; background:none; color:var(--accent-deep); font-size:12px; font-weight:600; cursor:pointer}
.np-empty{padding:24px; text-align:center; color:var(--faint); font-size:13px}
.np-list{max-height:min(60vh,420px); overflow:auto}
.np-item{display:flex; gap:8px; align-items:flex-start; padding:10px 14px; border-bottom:1px solid var(--line-soft)}
.np-item.unread{background:var(--accent-soft)}
.np-item[role="button"]{cursor:pointer}
.np-body{flex:1; min-width:0; display:flex; justify-content:space-between; gap:10px}
.np-ititle{font-weight:600; font-size:13px; display:block}
.np-isub{font-size:12px; color:var(--muted); display:block; margin-top:1px}
.np-time{font-size:11px; color:var(--faint); white-space:nowrap; flex:0 0 auto}
.np-x{border:0; background:none; color:var(--faint); font-size:17px; width:22px; height:22px; border-radius:6px; flex:0 0 auto}
.np-x:hover{background:var(--surface-2); color:var(--ink)}
/* Benachrichtigungs-Toast (schrumpft in die Glocke) */
.notif-toasts{position:fixed; top:64px; right:18px; z-index:45; display:flex; flex-direction:column; gap:10px; pointer-events:none; max-width:min(340px,calc(100vw - 32px))}
.notif-toast{pointer-events:auto; display:flex; gap:10px; align-items:flex-start; background:var(--surface); border:1px solid var(--line); border-left:3px solid var(--accent); border-radius:12px; box-shadow:0 12px 34px rgba(10,20,26,.24); padding:11px 12px; cursor:pointer; transform-origin:top right; animation:nt-in .28s cubic-bezier(.2,.9,.3,1.2) both}
.notif-toast:hover{border-color:var(--accent)}
.nt-ic{flex:0 0 auto; width:28px; height:28px; border-radius:8px; background:var(--accent-soft); color:var(--accent-deep); display:grid; place-items:center}
.nt-ic .ic-svg{width:16px; height:16px}
.nt-body{flex:1; min-width:0; display:flex; flex-direction:column}
.nt-title{font-weight:650; font-size:13px; color:var(--ink)}
.nt-sub{font-size:12px; color:var(--muted); margin-top:1px; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical}
.nt-x{flex:0 0 auto; border:0; background:none; color:var(--faint); font-size:16px; width:20px; height:20px; border-radius:6px; line-height:1}
.nt-x:hover{background:var(--surface-2); color:var(--ink)}
@keyframes nt-in{from{opacity:0; transform:translateX(24px) scale(.96)}to{opacity:1; transform:none}}
.notif-toast.leaving{opacity:0; transform:translateX(24px) scale(.96); transition:opacity .22s ease, transform .22s ease}
.notif-toast.shrink{transform:translate(var(--tx,0),var(--ty,0)) scale(.06); opacity:0; transition:transform .56s cubic-bezier(.5,0,.75,0), opacity .56s ease .06s; pointer-events:none}
.bellbtn.bell-bump{animation:bell-bump .42s ease}
@keyframes bell-bump{0%,100%{transform:none}30%{transform:scale(1.22) rotate(-8deg)}60%{transform:scale(1.1) rotate(6deg)}}
@media (prefers-reduced-motion:reduce){ .notif-toast{animation:none} .notif-toast.shrink{transition:opacity .2s ease; transform:none} .bellbtn.bell-bump{animation:none} }

/* Globale Suche (Command-Palette-Overlay) */
.gsearch-ov{position:fixed; inset:0; background:rgba(10,20,26,.5); z-index:60; padding:11vh 14px 0; display:flex; justify-content:center; align-items:flex-start}
.gsearch-ov[hidden]{display:none}
.gsearch-box{width:100%; max-width:560px; background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:14px; box-shadow:0 20px 60px rgba(10,20,26,.4); overflow:hidden}
.gsearch-inwrap{display:flex; align-items:center; gap:11px; padding:14px 16px; border-bottom:1px solid var(--line)}
.gsearch-mag{color:var(--faint); font-size:18px; display:inline-flex}
.gsearch-mag .ic-svg{width:18px; height:18px; flex:none}
.gsearch-in{flex:1; border:0; outline:none; background:none; font-size:15px; color:var(--ink); font-family:inherit; min-height:auto; padding:0}
.gsearch-res{max-height:54vh; overflow:auto; padding:6px}
.gsearch-h{font-family:var(--mono); font-size:10px; text-transform:uppercase; letter-spacing:.08em; color:var(--faint); padding:9px 10px 4px}
.gsearch-item{display:block; width:100%; text-align:left; border:0; background:none; padding:9px 11px; border-radius:8px; font-size:13.5px; color:var(--ink); cursor:pointer}
.gsearch-item:hover, .gsearch-item.gs-sel{background:var(--accent-soft)}
.gsearch-item .muted{color:var(--muted)}
.gsearch-hint{padding:14px; color:var(--faint); font-size:13px}
.lrow.dim{opacity:.6}

/* ---------- Projekt-Board: 2 Ansichten + Sprung ---------- */
.summary .s-chip.jump{display:inline-flex; align-items:center; gap:6px; background:var(--surface-2); color:var(--muted); border:1px solid var(--line); cursor:pointer}
.summary .s-chip.jump:hover{border-color:var(--accent); color:var(--ink)}
.summary .jdot{width:8px; height:8px; border-radius:50%}
.proj-stack{display:flex; flex-direction:column; gap:4px}
.psection-head{width:100%; text-align:left; background:var(--paper); border:0; border-bottom:1px solid var(--line); cursor:pointer; padding:10px 4px; display:flex; align-items:center; gap:9px; font-size:14px; font-weight:650; position:sticky; top:56px; z-index:4}
.psection-head:hover{color:var(--accent-deep)}
.psection-head .ps-arrow{color:var(--faint); width:13px; font-size:11px}
.psection-head .badge{width:8px; height:8px; border-radius:50%; flex:0 0 8px}
.psection-head .ps-name{color:var(--ink)}
.psection-head .ps-cnt{font-family:var(--mono); font-size:11.5px; color:var(--faint); font-weight:400}
.psection-body{padding:12px 0 10px 22px; position:relative}
.psection-body::before{content:""; position:absolute; left:6px; top:12px; bottom:10px; width:3px; border-radius:2px; background:var(--cat, var(--line)); opacity:.7}
.pgrid{display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:12px}
.col[data-projcol]{border-radius:12px; transition:box-shadow .2s, background .2s}
.col.col-jump{background:var(--surface-2); box-shadow:0 0 0 2px var(--accent)}
.psection.sec-jump>.psection-head{box-shadow:inset 0 0 0 2px var(--accent); border-radius:8px}
.archmore{margin-top:8px; width:100%; justify-content:center}

/* ---------- Modal ---------- */
.modal-ov{position:fixed; inset:0; background:rgba(10,20,26,.5); display:grid; place-items:center; z-index:50; padding:20px; animation:fade .12s ease}
@keyframes fade{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){ .modal-ov{animation:none} }
.modal{width:100%; max-width:480px; max-height:88vh; overflow:auto; background:var(--surface); border:1px solid var(--line); border-radius:14px; box-shadow:0 18px 50px rgba(10,20,26,.35)}
.modal.modal-wide{max-width:860px}
/* Interne Tab-Leiste (Personal-Popup) */
.ptab-bar{display:flex; gap:2px; border-bottom:1px solid var(--line); margin:-2px 0 14px}
.ptab-bar button{border:0; background:none; padding:8px 14px; border-radius:8px 8px 0 0; font-size:13.5px; color:var(--muted); font-weight:550; cursor:pointer}
.ptab-bar button.on{background:var(--accent-soft); color:var(--accent-deep); font-weight:650}
.modal-h{display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid var(--line)}
.modal-h h3{margin:0; font-size:16px}
.modal-x{border:0; background:none; color:var(--faint); font-size:16px; width:30px; height:30px; border-radius:8px}
.modal-x:hover{background:var(--surface-2); color:var(--ink)}
.modal-b{padding:18px 20px; display:flex; flex-direction:column; gap:14px}
.modal-b label{font-size:12.5px; font-weight:600; color:var(--ink); display:block; margin-bottom:5px}
.modal-b input, .modal-b select, .modal-b textarea{width:100%; border:1px solid var(--line); border-radius:9px; padding:9px 12px; font-size:13px; font-family:inherit; background:var(--surface); color:var(--ink)}
.modal-b textarea{resize:vertical; min-height:72px; line-height:1.5}
.modal-b .row2{display:flex; gap:12px}
.modal-b .row2>*{flex:1}
.modal-b .chkline{display:flex; align-items:center; gap:8px; font-size:13px}
.modal-b .chkline input{width:auto}
.modal-b .mhint{font-size:11.5px; color:var(--faint); margin:0}
.modal-f{display:flex; justify-content:flex-end; gap:10px; padding:14px 20px; border-top:1px solid var(--line)}

.hidden{display:none}

/* ---- Projektkachel: Seitenfenster-Icon ---- */
.pcard-side{position:absolute; top:8px; right:8px; width:26px; height:26px; border-radius:7px; display:grid; place-items:center; color:var(--faint); background:var(--surface); border:1px solid transparent; opacity:0; transition:opacity .12s, color .12s, border-color .12s; z-index:2}
.pcard:hover .pcard-side{opacity:1}
.pcard-side:hover{color:var(--accent-deep); border-color:var(--line)}
.pcard-side .ic-svg{width:15px; height:15px}

/* ---- Rechtes Info-Seitenpanel (Peek-Drawer) ---- */
:root{--rdrawer-w:420px}
.rdrawer{position:fixed; top:0; right:0; height:100vh; width:min(var(--rdrawer-w),92vw); background:var(--paper); border-left:1px solid var(--line); box-shadow:-12px 0 34px rgba(0,0,0,.16); transform:translateX(100%); transition:transform .22s cubic-bezier(.4,0,.2,1); z-index:120; display:flex; flex-direction:column}
.rdrawer.open{transform:translateX(0)}
/* Desktop: Drawer schiebt die Hauptseite nach links (Split), statt sie zu überdecken */
@media (min-width:821px){
  .app{transition:padding-right .22s cubic-bezier(.4,0,.2,1)}
  body.rdrawer-on .app{padding-right:var(--rdrawer-w)}
  body.rdrawer-on .rdrawer{box-shadow:-1px 0 0 var(--line)}
}
.rdrawer-p{display:flex; flex-direction:column; height:100%; min-height:0}
.rdrawer-h{flex:0 0 auto; display:flex; align-items:center; gap:10px; padding:16px 18px; border-bottom:1px solid var(--line)}
.rdrawer-h b{flex:1; font-size:16px; font-weight:700; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.rdrawer-h .iconbtn{flex:0 0 auto; width:30px; height:30px; border-radius:8px; border:1px solid var(--line); background:var(--surface); color:var(--muted); cursor:pointer}
.rdrawer-h .iconbtn:hover{border-color:var(--accent); color:var(--accent-deep)}
.rdrawer-b{flex:1; min-height:0; overflow-y:auto; padding:16px 18px; display:flex; flex-direction:column; gap:14px}
.rd-full{width:100%; justify-content:center; display:inline-flex; align-items:center; gap:8px}
.rd-full-ic .ic-svg{width:16px; height:16px}
.rd-sub{font-size:12.5px; color:var(--muted); line-height:1.5}
.rd-chips{display:flex; flex-wrap:wrap; gap:6px}
.rd-chips .chip{font-size:11.5px; padding:4px 10px; border-radius:20px; background:var(--surface); border:1px solid var(--line); color:var(--muted)}
.rd-chips .chip.warn{border-color:var(--amber); color:var(--amber)}
.rd-prog{background:var(--surface); border:1px solid var(--line); border-radius:11px; padding:12px 14px}
.rd-prog-top{display:flex; justify-content:space-between; font-size:12px; color:var(--muted); margin-bottom:7px}
.rd-prog-top b{color:var(--ink); font-size:15px}
.rd-prog .bar{height:7px; background:var(--surface-2); border-radius:6px; overflow:hidden}
.rd-prog .bar span{display:block; height:100%; background:var(--accent); border-radius:6px}
.rd-prog-note{font-size:11.5px; color:var(--faint); margin-top:7px}
.rd-stats{display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px}
.rd-stat{background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:9px 10px}
.rd-stat .k{font-size:10px; text-transform:uppercase; letter-spacing:.5px; color:var(--faint)}
.rd-stat .v{font-size:13px; font-weight:600; color:var(--ink); margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.rd-notes .k{font-size:11px; text-transform:uppercase; letter-spacing:.5px; color:var(--faint); margin-bottom:4px}
.rd-notes p{margin:0; font-size:12.5px; color:var(--muted); line-height:1.55; white-space:pre-wrap}
.rd-tasks-h{font-size:12.5px; font-weight:650; color:var(--ink); display:flex; align-items:center; gap:8px; margin-top:2px}
.rd-tasks{display:flex; flex-direction:column; gap:2px}
.rd-task{display:flex; align-items:center; gap:9px; padding:7px 2px; border-bottom:1px solid var(--line-soft)}
.rd-task .dot{flex:0 0 auto; width:8px; height:8px; border-radius:50%}
.rd-tt{flex:1; font-size:12.5px; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.rd-tt.done{color:var(--faint); text-decoration:line-through}
.rd-tp{flex:0 0 auto; font-size:11px; color:var(--faint); font-variant-numeric:tabular-nums}

/* ---- Dashboard ---- */
.dash-head{display:flex; align-items:flex-end; gap:14px; margin-bottom:18px}
.dash-head h1{font-size:22px; margin:0; letter-spacing:-.01em}
.dash-sub{font-size:12.5px; color:var(--muted); margin-top:3px}
.kpi-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:16px}
.kpi{display:flex; align-items:center; gap:12px; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:14px; box-shadow:var(--shadow)}
.kpi-ic{flex:0 0 auto; width:38px; height:38px; border-radius:10px; display:grid; place-items:center}
.kpi-ic .ic-svg{width:18px; height:18px}
.kpi-main{min-width:0; flex:1 1 auto}
.kpi-v{flex:0 0 auto; margin-left:12px; font-size:26px; font-weight:750; line-height:1; color:var(--ink); text-align:right}
.kpi-k{font-size:13px; color:var(--ink); font-weight:600}
.kpi-sub{font-size:11px; color:var(--muted); margin-top:3px}
.dash-cols{display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px}
.dash-card{background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:16px 18px; box-shadow:var(--shadow)}
.dash-card.wide{grid-column:auto}
.dash-cols:first-of-type{grid-template-columns:1.4fr 1fr}
.dash-card-h{display:flex; align-items:center; gap:9px; margin-bottom:14px}
.dash-card-h h3{margin:0; font-size:14px; font-weight:650}
.dash-bars{display:flex; flex-direction:column; gap:9px}
.dash-bar{display:flex; align-items:center; gap:11px; background:none; border:0; padding:2px 0; width:100%; text-align:left}
.db-label{flex:0 0 92px; font-size:12px; color:var(--muted)}
.db-track{flex:1; height:9px; background:var(--surface-2); border-radius:6px; overflow:hidden}
.db-fill{display:block; height:100%; border-radius:6px; min-width:4px; transition:width .3s}
.db-val{flex:0 0 auto; font-size:12px; font-weight:650; color:var(--ink); font-variant-numeric:tabular-nums; min-width:20px; text-align:right}
.dash-bar:hover .db-label{color:var(--accent-deep)}
.donut-wrap{display:flex; align-items:center; gap:20px}
.donut{flex:0 0 auto; width:120px; height:120px; border-radius:50%; display:grid; place-items:center}
.donut-hole{width:76px; height:76px; border-radius:50%; background:var(--surface); display:grid; place-items:center; text-align:center}
.donut-hole b{font-size:22px; font-weight:700; color:var(--ink); line-height:1}
.donut-hole span{font-size:10px; color:var(--faint)}
.donut-legend{display:flex; flex-direction:column; gap:8px}
.dleg{display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--muted)}
.dleg b{color:var(--ink); margin-left:2px}
.dleg-dot{width:10px; height:10px; border-radius:3px}
.dash-list{display:flex; flex-direction:column}
.dash-row{display:flex; align-items:center; gap:12px; padding:10px 4px; border-bottom:1px solid var(--line-soft); background:none; border-left:0; border-right:0; border-top:0; width:100%; text-align:left}
.dash-row:last-child{border-bottom:0}
.dash-row:hover{background:var(--surface-2)}
.dr-main{flex:1; min-width:0}
.dr-title{font-size:13px; font-weight:600; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.dr-sub{font-size:11.5px; color:var(--faint); margin-top:2px}
.dr-badge{flex:0 0 auto; font-size:11px; padding:3px 9px; border-radius:20px; background:var(--surface-2); color:var(--muted); font-weight:600; white-space:nowrap}
.dr-badge.near{background:var(--amber-bg); color:var(--amber)}
.dr-badge.over{background:var(--red-bg); color:var(--red)}

/* ===== Fullscreen-Dashboard: 6-Spalten-Raster, Boxen spannen 1–6 Spalten, füllt den Viewport ===== */
.dash{box-sizing:border-box; display:flex; flex-direction:column; gap:12px; padding:16px 22px 14px; overflow:hidden}
.dash .dash-head{margin:0}
.dash .kpi-grid{margin:0; grid-template-columns:repeat(4,1fr)}
.dash-body{flex:1 1 auto; min-height:0; display:grid; gap:12px; grid-template-columns:repeat(6,1fr); grid-template-rows:1fr 1fr}
.dash-body .dash-card{min-height:0; margin:0; padding:13px 16px; display:flex; flex-direction:column; overflow:hidden}
.dash-body .dash-card-h{margin:0 0 8px; flex:0 0 auto}
.dash-list.scroll{flex:1 1 auto; min-height:0; overflow-y:auto; margin:0 -6px; padding:0 6px}
.dash-body .dash-row{padding:8px 4px}
.dash-body .empty{color:var(--faint); font-size:13px; padding:14px 2px; text-align:center}
/* Box-Breiten im 6er-Raster */
.dc-board{grid-column:span 4}
.dc-recent,.dc-comments,.dc-deadlines,.dc-material{grid-column:span 2}
/* Board-Überblick: horizontale Phasen-Pipeline + Kennzahlen */
.board-ov{flex:1 1 auto; min-height:0; display:flex; flex-direction:column; gap:13px}
.pipe{display:grid; grid-template-columns:repeat(9,1fr); gap:7px; flex:0 0 auto}
.pipe-col{display:flex; flex-direction:column; align-items:center; gap:6px; padding:9px 4px 8px; border:1px solid var(--line); border-radius:10px; background:var(--surface); cursor:pointer; text-align:center}
.pipe-col:hover{border-color:var(--accent)}
.pipe-col.has{background:var(--surface-2)}
.pipe-bar{width:100%; height:4px; border-radius:3px; opacity:.3}
.pipe-col.has .pipe-bar{opacity:1}
.pipe-n{font-size:19px; font-weight:750; line-height:1; color:var(--ink)}
.pipe-col:not(.has) .pipe-n{color:var(--faint)}
.pipe-l{font-size:10px; color:var(--muted); line-height:1.15}
.board-ov-lower{flex:1 1 auto; min-height:0; display:grid; grid-template-columns:1fr 1fr; gap:22px; align-items:center}
.board-ov-tasks{min-height:0; display:flex}
.board-ov-tasks .donut-wrap{flex:1 1 auto; display:flex; align-items:center; justify-content:flex-start; gap:22px; padding-left:4px}
.dash-body .donut{width:120px; height:120px; flex:0 0 auto}
.ov-stats{display:grid; grid-template-columns:1fr 1fr; gap:10px}
.ov-stat{background:var(--surface-2); border:1px solid var(--line-soft); border-radius:11px; padding:11px 13px}
.ov-stat b{display:block; font-size:22px; font-weight:750; line-height:1; color:var(--ink)}
.ov-stat span{display:block; font-size:11.5px; color:var(--muted); margin-top:5px}
.ov-stat.warn b{color:var(--red)}
.ov-sub{font-size:10.5px; text-transform:uppercase; letter-spacing:.06em; color:var(--faint); font-weight:700; margin-bottom:2px}

@media (max-width:1100px){
  .dash{height:auto !important; overflow:visible; display:block; padding:22px 26px 60px}
  .dash .dash-head{margin-bottom:18px}
  .dash-body{grid-template-columns:repeat(2,1fr); grid-template-rows:none}
  .dc-board,.dc-recent,.dc-comments,.dc-deadlines,.dc-material{grid-column:span 2}
  .dash-body .dash-card{overflow:visible}
  .dash-list.scroll{max-height:300px}
  .board-ov-lower{grid-template-columns:1fr; gap:14px}
  .board-ov-tasks .donut-wrap{min-height:150px}
}
@media (max-width:760px){ .dash .kpi-grid{grid-template-columns:repeat(2,1fr)} .dash-body,.dc-board,.dc-recent,.dc-comments,.dc-deadlines,.dc-material{grid-column:auto; grid-template-columns:1fr} .board-ov{grid-template-columns:1fr} }
@media (max-width:900px){ .set-layout{grid-template-columns:1fr} .set-nav{position:static; flex-direction:row; flex-wrap:wrap} .dash-cols,.dash-cols:first-of-type{grid-template-columns:1fr} }
@media (max-width:820px){
  .app{grid-template-columns:1fr}
  .nav-toggle{display:inline-flex}
  .rail{position:fixed; left:0; top:0; height:100vh; width:250px; transform:translateX(-100%); transition:transform .2s ease; z-index:130; box-shadow:2px 0 22px rgba(0,0,0,.22)}
  .app.nav-open .rail{transform:translateX(0)}
  .nav-scrim{position:fixed; inset:0; background:rgba(10,20,26,.45); z-index:125; opacity:0; pointer-events:none; transition:opacity .2s ease}
  .app.nav-open .nav-scrim{display:block; opacity:1; pointer-events:auto}
}
@media (prefers-reduced-motion:reduce){ .rail{transition:none} .nav-scrim{transition:none} }

/* --- Checklisten-Vorlagen-Editor --- */
.cle-meta{display:flex; flex-direction:column; gap:14px}
.cle-meta>div{width:100%}
.cle-items{display:flex; flex-direction:column; gap:6px}
.cle-item{border:1px solid var(--line); border-radius:10px; padding:6px 10px; background:var(--surface)}
.cle-item-head{display:flex; align-items:center; gap:8px}
/* Kompakter Default-Punkt: visuelle Checkbox + „⋯"-Optionen-Umschalter */
.cle-checkbox{flex:0 0 auto; width:16px; height:16px; border:1.6px solid var(--faint); border-radius:4px; background:var(--surface-2)}
.cle-optbtn{flex:0 0 auto; border:1px solid transparent; background:transparent; color:var(--faint); cursor:pointer; font-size:15px; line-height:1; padding:2px 7px; border-radius:7px; letter-spacing:1px}
.cle-optbtn:hover{color:var(--accent-deep); background:var(--surface-2)}
.cle-optbtn.on{color:var(--accent-deep); background:var(--accent-soft)}
.cle-opts{margin-top:7px; padding-top:8px; border-top:1px dashed var(--line)}
.cle-addfield{padding:4px 10px; font-size:12px}
.cle-addrow{display:flex; flex-wrap:wrap; gap:6px}
.cle-added-el{display:flex; align-items:center; gap:8px; margin-bottom:8px; font-size:12.5px; color:var(--muted); background:var(--surface-2); border:1px solid var(--line); border-radius:8px; padding:5px 10px}
.cle-added-lbl{flex:1; display:inline-flex; align-items:center; gap:6px}
.cle-added-lbl svg{width:14px; height:14px; color:var(--faint)}
.cle-grip{color:var(--faint); cursor:grab; flex:0 0 auto; user-select:none; padding:2px 4px}
.cle-grip:active{cursor:grabbing}
.cle-item.cle-dragging{opacity:.45}
.cle-item.cle-drop-before{box-shadow:inset 0 3px 0 var(--accent)}
.cle-item.cle-drop-after{box-shadow:inset 0 -3px 0 var(--accent)}
/* Neue Elemente aus der Toolbar ziehen (Palette) */
.cle-pal{cursor:grab}
.cle-pal:active{cursor:grabbing}
.cle-pal.cle-pal-dragging{opacity:.5}
/* Ziel-Highlight beim Ziehen in eine Spalte */
.cle-col.cle-col-drop{outline:2px dashed var(--accent); outline-offset:3px; border-radius:8px; background:color-mix(in srgb, var(--accent) 8%, transparent)}
/* Checklisten-Übersicht: Kacheln */
.cl-cards{display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:14px}
.cl-card{padding:16px 18px; cursor:pointer; display:flex; flex-direction:column; gap:12px; transition:border-color .14s, box-shadow .14s}
.cl-card:hover{border-color:var(--accent); box-shadow:var(--card-hover)}
.cl-card-title{font-weight:650; font-size:15px; color:var(--ink); line-height:1.3}
.cl-card-desc{font-size:12.5px; color:var(--muted); line-height:1.45}
.cl-card-foot{display:flex; align-items:center; justify-content:space-between; margin-top:auto}
.cle-label{flex:1; min-width:0; font-weight:600}
.cle-item-actions{display:flex; gap:4px; flex:0 0 auto}
.cle-item-actions .btn{padding:4px 9px; font-size:12px}
.cle-note-hint{font-size:11.5px; color:var(--faint); margin:6px 0 8px}
.cle-fields{display:flex; flex-direction:column; gap:7px; margin-bottom:8px}
.cle-field{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.cle-field .cle-flabel{flex:1; min-width:160px}
.cle-field .cle-ftype{width:120px; flex:0 0 auto}
.cle-field .cle-fopts{flex:1; min-width:160px}
.cle-field .cle-funit{width:150px; flex:0 0 auto}
.cle-item-sep{padding:8px 14px; background:transparent; border-style:dashed}
.cle-sep-label{flex:1; color:var(--faint); font-size:12.5px; letter-spacing:.04em; text-align:center}
.cle-item-heading{background:var(--surface-2)}
.cle-hlabel{font-weight:700; font-size:15px}
.cle-collapse{padding:2px 7px}
.cle-noteoff{display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--muted); margin:0 0 8px; cursor:pointer}
.cle-noteoff input{width:auto; flex:0 0 auto; margin:0}
.cle-item-image{background:var(--surface-2)}
.cle-image-hint{font-size:11.5px; color:var(--muted); margin:7px 0 2px; display:flex; align-items:center; gap:6px}
.cle-image-hint svg{width:15px; height:15px; opacity:.7}
.cle-group-collapsed-wrap{gap:0}
.cle-group-collapsed{font-size:12px; color:var(--faint); padding:8px 4px 2px; font-style:italic}
/* Spalten-Container (Editor): mehrere Spalten nebeneinander (senkrechter Trennstrich),
   in jede Spalte lassen sich beliebige Elemente legen. */
.cle-item-columns{background:var(--surface-2)}
.cle-cols-label{flex:1; min-width:0; font-weight:600; color:var(--muted)}
.cle-cols-edit{display:flex; align-items:stretch; flex-wrap:wrap; gap:0; margin:10px 0 8px}
.cle-col{flex:1 1 220px; min-width:200px; padding:0 12px; border-left:2px solid var(--line)}
.cle-col:first-child{border-left:0; padding-left:2px}
.cle-col-tools{display:flex; align-items:center; gap:8px; margin-bottom:8px}
.cle-col-name{font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--faint); font-weight:700; flex:1}
.cle-col-items{display:flex; flex-direction:column; gap:10px}
.cle-col-items .cle-item{background:var(--surface)}
.cle-col-empty{font-size:12px; color:var(--faint); font-style:italic; padding:6px 2px}
.cle-col-add{display:flex; flex-wrap:wrap; gap:6px; margin-top:8px}
.cle-col-add .btn{padding:4px 9px; font-size:11.5px}
.cle-cols-max{display:inline-block; font-size:11.5px; color:var(--faint); font-style:italic}

/* --- Checklisten-Instanz auf der Projektseite --- */
.cli-list{display:flex; flex-direction:column; gap:14px}
.cli-card{border:1px solid var(--line); border-radius:14px; padding:14px 16px; background:var(--surface)}
.cli-head{display:flex; align-items:center; justify-content:space-between; gap:12px}
.cli-meta{display:flex; flex-wrap:wrap; gap:8px 18px; margin:10px 0 12px; padding:10px 12px; border-radius:10px; background:var(--surface-2)}
.cli-metacell{display:flex; flex-direction:column; min-width:120px}
.cli-metacell .k{font-family:var(--mono); font-size:10px; letter-spacing:.08em; text-transform:uppercase; color:var(--faint)}
.cli-metacell .v{font-size:13px; color:var(--ink); font-weight:600}
.cli-body{display:flex; flex-direction:column; gap:10px}
.cli-item{border-top:1px solid var(--line-soft); padding-top:10px}
.cli-item:first-child{border-top:0; padding-top:0}
.cli-check{display:flex; align-items:flex-start; gap:9px; font-size:14px; cursor:pointer}
.cli-check input{margin-top:2px; width:auto; flex:0 0 auto}
.cli-check span.done{text-decoration:line-through; color:var(--muted)}
.cli-note{width:100%; margin:6px 0 0; min-height:34px; resize:vertical}
.cli-fields{display:flex; flex-wrap:wrap; gap:8px 14px; margin-top:8px}
.cli-field{display:flex; flex-direction:column; gap:3px; min-width:150px}
.cli-field>span{font-size:11.5px; color:var(--muted)}
.cli-inp-unit{display:flex; align-items:center; gap:6px}
.cli-inp-unit input{flex:1; min-width:0}
.cli-unit{font-size:12.5px; color:var(--muted); white-space:nowrap; font-weight:600}
.cli-item-image .cli-image-cap{display:flex; align-items:center; gap:6px; font-weight:600; font-size:13.5px; color:var(--muted)}
.cli-item-image .cli-image-cap svg{width:15px; height:15px; opacity:.75}
.cli-image-tag{font-size:11px; font-weight:650; color:var(--violet); background:var(--violet-bg); border-radius:6px; padding:1px 7px; letter-spacing:.02em}
/* Modus 1: Referenzbild aus der Vorlage (Arbeitsanweisung) */
.cli-refimg{display:block; max-width:100%; max-height:240px; border:1px solid var(--line); border-radius:9px; margin:8px 0 0; background:var(--surface-2); cursor:zoom-in}
.cli-refimg-small{max-height:110px; width:auto}
.cli-refimg-medium{max-height:240px}
/* Bild-Lightbox (Vollbild beim Antippen des Referenzbildes) */
.lightbox-ov{position:fixed; inset:0; z-index:2000; background:rgba(10,18,24,.86); display:flex; align-items:center; justify-content:center; padding:20px; cursor:zoom-out; animation:lbfade .12s ease}
.lightbox-ov img{max-width:100%; max-height:100%; object-fit:contain; border-radius:8px; box-shadow:0 10px 50px rgba(0,0,0,.5)}
@keyframes lbfade{from{opacity:0}to{opacity:1}}
/* Modus 2: Doku-Foto beim Abarbeiten einfügen */
.cli-imgup{display:flex; align-items:flex-start; gap:12px; margin-top:8px; flex-wrap:wrap}
.cli-docimg{max-width:220px; max-height:220px; border:1px solid var(--line); border-radius:9px; background:var(--surface-2); object-fit:cover}
.cli-docimg.is-empty{display:none}
.cli-imgbtn{cursor:pointer; align-self:center}
.cli-imgbtn.is-busy{opacity:.55; pointer-events:none}
.cli-imgbtn svg{width:15px; height:15px}
/* Vorlagen-Editor: Referenzbild anhängen/vorschau */
.cle-item-image .cle-image-modes,.cle-item-image .cle-refimg{margin-top:8px}
.cle-refimg{display:flex; gap:12px; align-items:flex-start; flex-wrap:wrap}
.cle-refimg-thumb{max-width:200px; max-height:170px; border:1px solid var(--line); border-radius:9px; background:var(--surface-2); object-fit:cover}
.cle-refimg-side{display:flex; flex-direction:column; gap:8px; align-items:flex-start}
.cle-refimg-tag{display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:650; color:var(--violet); background:var(--violet-bg); border-radius:7px; padding:3px 9px}
.cle-refimg-tag svg{width:14px; height:14px}
/* Größen-Umschalter (Klein/Mittel) + Vorschaugröße je Modus */
.cle-refimg-small .cle-refimg-thumb{max-width:110px; max-height:90px}
.cle-imgsize{display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--muted)}
.cle-imgsize-lbl{font-size:11px; letter-spacing:.04em; text-transform:uppercase; color:var(--faint); font-weight:700}
.cle-szbtn{padding:3px 11px; font-size:12px}
.cle-szbtn.on{background:var(--accent-soft); color:var(--accent-deep); border-color:var(--accent)}
.cle-imgattach{cursor:pointer; margin-top:8px; display:inline-flex; align-items:center; gap:6px}
.cle-imgattach svg{width:15px; height:15px}
/* Spalten-Container (Instanz): Spalten nebeneinander (senkrechter Trennstrich), Items gestapelt */
.cli-item-columns .cli-cols{display:flex; align-items:stretch; flex-wrap:wrap}
.cli-col{flex:1 1 220px; min-width:200px; padding:0 14px; border-left:2px solid var(--line-soft); display:flex; flex-direction:column; gap:10px}
.cli-col:first-child{border-left:0; padding-left:0}
.cli-col>.cli-item:first-child{border-top:0; padding-top:0}
.cli-heading{font-weight:700; font-size:14.5px; color:var(--ink); border-bottom:2px solid var(--line); padding:4px 0 5px; margin-top:4px}
.cli-item + .cli-heading, .cli-heading:not(:first-child){margin-top:6px}
.cli-sep{border-top:1px solid var(--line-soft); margin:2px 0}
.cli-header-fields{display:flex; flex-wrap:wrap; gap:8px 14px; margin:0 0 12px; padding:10px 12px; border-radius:10px; background:var(--accent-soft)}
.cli-header-fields .cli-field{min-width:150px}

/* ============ Batch 5: Checklist-Boxen, Fortschritt, Planung, Datenbank ============ */

/* -- Checklisten: Punkte je Überschrift in einer dezenten Box (Designer + Abarbeiten) -- */
.cle-group{border:1px solid var(--line); border-radius:12px; background:var(--surface-2); padding:8px; display:flex; flex-direction:column; gap:6px}
.cle-group-nohead{background:var(--surface); border-style:dashed}
.cle-group-body{display:flex; flex-direction:column; gap:6px}
.cle-group>.cle-item-heading{background:transparent; margin:0}
.cli-body{gap:12px}
.cli-group{border:1px solid var(--line); border-radius:12px; background:var(--surface-2); padding:2px 14px 12px}
.cli-group-nohead{padding-top:12px}
.cli-group-body{display:flex; flex-direction:column; gap:10px; margin-top:10px}
.cli-group-nohead>.cli-group-body{margin-top:0}
.cli-group>.cli-heading{margin-top:0; border-bottom:1px solid var(--line)}
/* Titel/Beschreibung im Editor sauber gestylt (statt „nackter" Inputs) */
.cle-meta{gap:14px}
.cle-meta label{display:block; font-size:12.5px; color:var(--muted); font-weight:600; margin-bottom:5px}
.cle-meta input,.cle-meta textarea{width:100%; box-sizing:border-box; border:1px solid var(--line); background:var(--surface); border-radius:9px; padding:9px 12px; font-size:14px; color:var(--ink); font-family:inherit}
.cle-meta-title input{font-size:17px; font-weight:600}
.cle-meta textarea{resize:vertical; min-height:82px; line-height:1.5}
.cle-meta input:focus,.cle-meta textarea:focus{outline:2px solid var(--accent); outline-offset:1px; border-color:var(--accent)}
/* Verschachtelte Überschriften: Unterüberschriften + ihre Punkte eingerückt */
.cle-group[data-level="2"]{margin-left:26px; border-left:3px solid var(--accent-soft)}
.cle-item-sub .cle-hlabel{font-size:13.5px}
.cle-group-body{padding-left:10px}
.cli-group[data-level="2"]{margin-left:22px; border-left:3px solid var(--accent-soft)}
.cli-heading.cli-sub{font-size:13px; font-weight:650; border-bottom-style:dashed}
.cli-group-body{padding-left:10px}
.cli-card.cli-flash{animation:cliflash 1.6s ease}
@keyframes cliflash{0%,100%{box-shadow:none}30%{box-shadow:0 0 0 3px var(--accent-soft)}}

/* -- Aufgaben-Ausklapp: segmentierter Fortschritt + Board-Kategorie + Endabnahme + Checklisten -- */
.prog-set{display:flex; flex-direction:column; gap:7px}
.prog-set .subhead{margin:0}
.prog-seg{display:flex; max-width:520px; background:var(--surface-2); border:1px solid var(--line); border-radius:9px; overflow:hidden}
.pbtn{flex:1 1 0; min-width:0; border:0; border-right:1px solid var(--line-soft); background:transparent; color:var(--muted); font-size:12.5px; font-weight:600; font-variant-numeric:tabular-nums; padding:8px 6px; line-height:1.1; text-align:center; cursor:pointer; transition:background .12s ease,color .12s ease}
.pbtn:last-child{border-right:0}
.pbtn:hover{background:var(--surface); color:var(--ink)}
.pbtn.fill{background:var(--accent-soft); color:var(--accent-deep)}
.pbtn.fill:hover{background:var(--accent-soft)}
.pbtn.on{background:var(--accent); color:#fff}
.pbtn.on:hover{background:var(--accent-deep)}
.pbtn:focus-visible{outline:2px solid var(--accent); outline-offset:1px}
.prog-hint{font-size:11.5px; color:var(--faint); line-height:1.35}
/* Segment-Umschalter (z. B. Planung: Projekt einplanen | ToDo zuweisen) */
.segtoggle{display:flex; background:var(--surface-2); border:1px solid var(--line); border-radius:9px; overflow:hidden}
.segtoggle-btn{flex:1 1 0; min-width:0; border:0; border-right:1px solid var(--line-soft); background:transparent; color:var(--muted); font-size:12.5px; font-weight:600; padding:9px 8px; line-height:1.1; text-align:center; cursor:pointer; transition:background .12s ease,color .12s ease}
.segtoggle-btn:last-child{border-right:0}
.segtoggle-btn:hover{background:var(--surface); color:var(--ink)}
.segtoggle-btn.on{background:var(--accent); color:#fff}
.segtoggle-btn.on:hover{background:var(--accent-deep)}
.segtoggle-btn:focus-visible{outline:2px solid var(--accent); outline-offset:1px}
.btn.sm{padding:5px 11px; font-size:12px; border-radius:8px; gap:5px}
.stage-ctl{display:flex; flex-direction:column; gap:7px}
.stage-ctl-row{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap}
.stage-cur{font-size:13px; font-weight:600; color:var(--ink)}
.stage-ctl-acts{display:flex; gap:6px; flex-wrap:wrap}
.abn-block{display:flex; flex-direction:column; gap:6px}
.abn-sub{font-size:12px; color:var(--muted); line-height:1.4; margin:-1px 0 2px}
.subhead .ic-svg{width:1em; height:1em; vertical-align:-.14em}
.cltask-block{display:flex; flex-direction:column; gap:7px}
.cltask-list{display:flex; flex-direction:column; gap:6px}
.cltask-row{display:flex; align-items:center; gap:8px; background:var(--surface); border:1px solid var(--line); border-radius:9px; padding:7px 11px}
.cltask-name{flex:1; min-width:0; font-size:13px; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.cltask-empty{font-size:12px; color:var(--faint)}

/* -- Personalplanung: leere planbare Zelle + Wochenende + Arbeitszeit-Chip -- */
.data-table td.cell-plan{cursor:pointer}
.data-table td.cell-plan.weekend, .data-table td.cell-free.weekend, .data-table th.weekend{background:var(--surface-2)}
.data-table td.cell-plan:hover, .data-table td.cell-free:hover, .data-table td.cell-absent:hover{box-shadow:inset 0 0 0 2px var(--accent-soft)}
.pl-hours{font-size:10.5px; line-height:1.3; font-variant-numeric:tabular-nums}
/* arbeitsfrei (kein Regeltag) – Aufgaben trotzdem zuweisbar */
.data-table td.cell-free .pl-free{font-size:11px; font-style:italic; color:var(--faint)}
/* abwesend (Urlaub/Krank) – keine Zuweisung */
.data-table td.cell-absent{background:var(--red-bg)}
.data-table td.cell-absent .pl-absent{font-size:10.5px; font-weight:600; color:var(--red)}
.pl-flex{margin-top:14px; border-top:1px solid var(--line); padding-top:12px}
.pl-flex .subhead{color:var(--muted)}

/* -- Abwesenheits-Monatskalender -- */
.data-table td.abs-cell{width:34px; padding:0; height:34px; text-align:center; cursor:pointer; font-size:10.5px; font-weight:700; font-variant-numeric:tabular-nums; color:var(--faint)}
.data-table td.abs-cell:hover{box-shadow:inset 0 0 0 2px var(--accent-soft)}
.data-table.abs-cal td.abs-cell.weekend{background:var(--surface-2)}
.data-table.abs-cal .sticky-col{width:170px}

/* -- Arbeitszeiten-Editor (Team) -- */
.wh-days{display:flex; flex-direction:column; gap:6px; margin-top:12px}
.wh-day{display:flex; align-items:center; gap:8px}
.wh-day .wh-toggle{flex:1; display:flex; align-items:center; gap:8px; font-size:13px; color:var(--ink); cursor:pointer}
.wh-day input[type=time]{width:110px}

/* -- Datenbank: Bild-Galerie -- */
.db-thumbs{display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:14px}
/* Schnellfilter-Chips (Boote nach Typ) */
.qf-bar{display:flex; flex-wrap:wrap; gap:7px; margin:0 0 14px}
.qf-chip{display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:6px 13px; line-height:1; border:1px solid var(--line); border-radius:99px;
  background:var(--surface); color:var(--muted); font-size:12.5px; font-weight:600; cursor:pointer; transition:border-color .14s, color .14s, background .14s}
.qf-chip:hover{border-color:var(--accent); color:var(--ink)}
.qf-chip.on{background:var(--accent); border-color:var(--accent); color:#fff}
.qf-chip b{font-weight:700; font-variant-numeric:tabular-nums; color:var(--faint)}
.qf-chip.on b{color:rgba(255,255,255,.82)}

/* SET-5: Nutzer-Kacheln + konsolidiertes Verwalten-Popup */
.tm-cards{display:grid; grid-template-columns:repeat(auto-fill,minmax(290px,1fr)); gap:12px}
.tm-card{display:flex; align-items:flex-start; gap:12px; text-align:left; width:100%; padding:14px 15px; border:1px solid var(--line); border-radius:14px; background:var(--surface); box-shadow:var(--shadow); cursor:default; transition:border-color .14s, box-shadow .14s}
button.tm-card{cursor:pointer}
button.tm-card:hover{border-color:var(--accent); box-shadow:var(--card-hover)}
.tm-card.dim{opacity:.6}
.tm-card-body{flex:1; min-width:0}
.tm-card-name{font-weight:650; font-size:14.5px; color:var(--ink); display:flex; align-items:center; gap:6px}
.tm-card-sub{font-size:12.5px; color:var(--muted); margin:2px 0 8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.tm-card-meta{display:flex; flex-wrap:wrap; gap:6px}
.pill-role{background:var(--surface-2); color:var(--muted)}
.tm-card-go{flex:0 0 auto; color:var(--faint)}
.tm-card-go .ic-svg{width:17px; height:17px}
button.tm-card:hover .tm-card-go{color:var(--accent)}
.um-head{display:flex; align-items:center; gap:12px; margin-bottom:14px}
.um-name{font-weight:700; font-size:16px}
.um-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px}
.um-toggles{display:flex; gap:20px; flex-wrap:wrap; margin-top:12px}
.um-actions{display:flex; gap:8px; flex-wrap:wrap; margin-top:16px; padding-top:14px; border-top:1px solid var(--line)}

.db-folders{display:flex; flex-direction:column; gap:10px}
.db-folder{border:1px solid var(--line-soft); border-radius:12px; padding:10px 13px; background:var(--surface-2)}
.db-folder>summary{display:flex; align-items:center; gap:8px; cursor:pointer; font-weight:650; font-size:13.5px; color:var(--ink); padding:2px 0; user-select:none}
.db-folder>summary .ic-svg{width:17px; height:17px; color:var(--accent); flex:0 0 auto}
.db-folder>summary span{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.db-folder>summary b{color:var(--faint); font-weight:600; font-variant-numeric:tabular-nums; margin-left:auto}
.db-folder[open]>summary{margin-bottom:11px}
.db-folder.is-empty{opacity:.62}
.db-folder.is-empty>summary .ic-svg{color:var(--faint)}
.db-folder-empty{font-size:12.5px; color:var(--faint); font-style:italic; padding:2px 0 4px}
.db-folder-body{display:flex; flex-direction:column; gap:11px}
.db-subfolder{border:1px dashed var(--line); border-radius:10px; padding:8px 11px; background:var(--surface)}
.db-subfolder>summary{display:flex; align-items:center; gap:7px; cursor:pointer; font-weight:600; font-size:12.5px; color:var(--muted); user-select:none}
.db-subfolder>summary .ic-svg{width:15px; height:15px; color:var(--muted); flex:0 0 auto}
.db-subfolder>summary span{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.db-subfolder>summary b{color:var(--faint); font-weight:600; font-variant-numeric:tabular-nums; margin-left:auto}
.db-subfolder[open]>summary{margin-bottom:9px}
.db-thumb{background:var(--surface); border:1px solid var(--line); border-radius:12px; overflow:hidden; box-shadow:var(--shadow); cursor:pointer; transition:border-color .14s, box-shadow .14s}
.db-thumb:hover{border-color:var(--accent); box-shadow:var(--card-hover)}
.db-thumb img{display:block; width:100%; aspect-ratio:4/3; object-fit:cover; background:var(--surface-2)}
.db-thumb-ph{display:grid; place-items:center; aspect-ratio:4/3; background:var(--surface-2); color:var(--faint)}
.db-thumb-ph .ic-svg{width:34px; height:34px}
.db-thumb figcaption{padding:8px 10px; font-size:12px; color:var(--ink)}
.db-thumb figcaption .cap-sub{color:var(--muted); font-size:11px; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.db-lightbox{margin-bottom:12px}
.db-lightbox img{max-width:100%; max-height:70vh; object-fit:contain; border-radius:10px; background:var(--surface-2); display:block; margin:0 auto}
.db-acts{white-space:nowrap; text-align:right}
.db-acts .btn{padding:5px 9px}

/* --- Feld-Abhängigkeiten: Mehrfachauswahl-Dropdown (Checkboxen) --- */
.fr-multi{position:relative;flex:1;min-width:150px}
.fr-multi>summary{list-style:none;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fr-multi>summary::-webkit-details-marker{display:none}
.fr-multi>summary::after{content:'▾';float:right;color:var(--muted);margin-left:8px}
.fr-multi[open]>summary{border-color:var(--accent)}
.fr-multi-pop{position:absolute;z-index:40;top:calc(100% + 4px);left:0;min-width:190px;max-height:240px;overflow:auto;background:var(--paper);border:1px solid var(--line);border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.14);padding:6px}
.fr-opt{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:7px;cursor:pointer;font-size:13px;color:var(--ink)}
.fr-opt:hover{background:var(--surface-2)}
.fr-opt input{margin:0}

/* --- Trennstrich mit Label (z. B. abgerechnete Projekte) --- */
.section-sep{display:flex;align-items:center;gap:12px;margin:20px 0 10px;color:var(--muted);font-size:11.5px;text-transform:uppercase;letter-spacing:.06em}
.section-sep::before,.section-sep::after{content:'';flex:1;height:1px;background:var(--line)}

/* --- Typeahead (Ausstattungs-Katalog) --- */
.typeahead{position:relative}
.ta-list{position:absolute;z-index:40;top:calc(100% + 4px);left:0;right:0;max-height:260px;overflow:auto;background:var(--paper);border:1px solid var(--line);border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.14);padding:6px}
.ta-item{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;text-align:left;padding:8px 10px;border:0;background:none;border-radius:7px;cursor:pointer;font-size:13px;color:var(--ink)}
.ta-item:hover{background:var(--surface-2)}
.ta-item.assigned{color:var(--muted)}
.ta-lbl{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ta-flag{font-size:11px;color:var(--red);background:var(--red-bg);padding:2px 7px;border-radius:999px;white-space:nowrap}

/* --- Boot-Detail: Bilder-Tab (Galerie) --- */
.boat-imgs{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.boat-img{position:relative;display:block;border-radius:12px;overflow:hidden;border:1px solid var(--line);background:var(--surface-2);aspect-ratio:4/3}
.boat-img img{width:100%;height:100%;object-fit:cover;display:block}
.boat-img-cap{position:absolute;left:0;right:0;bottom:0;font-size:11px;color:#fff;background:linear-gradient(transparent,rgba(0,0,0,.62));padding:14px 8px 6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Nutzerverwaltung: App-Zugang-Schalter je Zeile */
.tm-acc{display:inline-flex;align-items:center;gap:5px;font-size:12.5px;color:var(--muted);white-space:nowrap;cursor:pointer}
.tm-acc input{width:auto;margin:0}

/* ===== Aufgabenlisten (Task-Seite) ===== */
.tk-toolbar{display:flex;gap:12px;align-items:center;margin-bottom:14px;flex-wrap:wrap}
.tk-list{display:flex;flex-direction:column;gap:12px}
.tk-card{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:14px 16px}
.tk-card-head{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.tk-card-head b{font-size:14.5px}
.tk-items{display:flex;flex-direction:column;gap:2px}
.tk-item{display:flex;align-items:center;gap:10px;padding:7px 4px;border-top:1px solid var(--line-soft)}
.tk-item:first-child{border-top:0}
.tk-check{display:flex;align-items:center;gap:9px;flex:1;min-width:0;cursor:pointer;margin:0}
.tk-check input{width:auto;flex:0 0 auto;margin:0}
.tk-text{font-size:13.5px}
.tk-item.done .tk-text{text-decoration:line-through;color:var(--muted)}
.tk-item-trail{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.tk-due-lbl{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;color:var(--muted);background:var(--surface-2);border:1px solid var(--line);border-radius:6px;padding:2px 7px;white-space:nowrap}
.tk-due-lbl svg{width:12px;height:12px}
.tk-due-lbl.overdue{color:var(--red);background:var(--red-bg);border-color:var(--red-bg);font-weight:600}
.tk-due{border:1px solid var(--line);background:var(--surface);border-radius:7px;padding:4px 7px;font-size:12px;color:var(--ink);width:auto}

/* Adress-Autocomplete (Termin-Ort) + Navi-Link */
.addr-ac{position:absolute;left:0;right:0;top:100%;margin-top:4px;z-index:20;background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:0 12px 32px -10px rgba(12,30,39,.32);max-height:230px;overflow-y:auto;padding:4px}
.addr-ac-item{display:block;width:100%;text-align:left;border:0;background:transparent;padding:8px 10px;border-radius:7px;font:inherit;font-size:13px;color:var(--ink);cursor:pointer;white-space:normal;line-height:1.35}
.addr-ac-item:hover{background:var(--surface-2)}
.addr-ac-attr{padding:6px 10px 3px;font-size:10.5px;color:var(--faint)}
.navi-link{color:var(--accent-deep);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}
.navi-link:hover{color:var(--accent)}
.termin-actions{display:flex;gap:8px;margin-top:14px;flex-wrap:wrap}

/* Aufgabenlisten: EINE Liste je Person, Spalten nebeneinander (Board) */
.tk2-board{display:flex;gap:14px;align-items:flex-start;overflow-x:auto;padding-bottom:12px}
.tk2-col{flex:0 0 290px;max-width:290px;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:12px;display:flex;flex-direction:column;gap:10px;min-height:120px}
.tk2-col-head{display:flex;align-items:center;gap:9px}
.tk2-col-who{flex:1;min-width:0}
.tk2-col-who b{font-size:14.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.tk2-items{display:flex;flex-direction:column;gap:6px;min-height:6px}
.tk2-empty{color:var(--faint);font-size:12.5px;padding:2px 2px 4px}
.tk2-item{display:flex;align-items:flex-start;gap:8px;padding:7px 9px;border:1px solid var(--line-soft);border-radius:9px;background:var(--surface-2)}
.tk2-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.tk2-check{min-width:0;display:flex;align-items:flex-start;gap:8px;cursor:pointer;margin:0}
.tk2-check input{flex:none;margin-top:2px}
.tk2-text{font-size:13.5px;line-height:1.35;word-break:break-word}
.tk2-item.done .tk2-text{text-decoration:line-through;color:var(--faint)}
.tk2-note-inp{display:block;width:100%;font:inherit;font-family:inherit;font-size:11.5px;line-height:1.4;color:var(--muted)!important;border:0!important;background:transparent!important;outline:none;box-shadow:none!important;min-height:0!important;padding:0 0 0 25px!important;border-radius:0!important;resize:none!important;overflow:hidden;white-space:pre-wrap;word-break:break-word}
.tk2-note-inp::placeholder{color:var(--faint)}
.tk2-trail{display:flex;align-items:center;gap:5px;flex:0 0 auto;padding-top:1px}
.tk2-trail .tk-due-lbl{font-size:10.5px;padding:1px 5px}
.tk2-due{width:24px!important;min-height:26px!important;height:26px!important;padding:0 2px!important;border:1px solid var(--line)!important;border-radius:7px!important;background:var(--surface)!important;color:transparent;overflow:hidden;cursor:pointer}
.tk2-due::-webkit-calendar-picker-indicator{margin:0;opacity:.6;cursor:pointer}
.tk2-del{border:0;background:transparent;color:var(--faint);cursor:pointer;padding:2px;display:grid;place-items:center;border-radius:6px}
.tk2-del:hover{color:var(--red);background:var(--red-bg)}
.tk2-del .ic-svg{width:15px;height:15px}
.tk2-add{display:flex;gap:6px;margin-top:auto;padding-top:2px}
.tk2-add input{flex:1;min-width:0}
.tk2-add .btn.sm{flex:none;padding:6px 9px}
@media (max-width:680px){ .tk2-col{flex-basis:82vw;max-width:82vw} }

/* ===== Software-Verwaltung (/admin) ===== */
.adm-tblwrap{overflow-x:auto;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.adm-tbl{width:100%;border-collapse:collapse;font-size:13.5px;min-width:640px}
.adm-tbl th{text-align:left;font-size:11px;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);font-weight:700;padding:11px 14px;border-bottom:1px solid var(--line);white-space:nowrap}
.adm-tbl td{padding:11px 14px;border-bottom:1px solid var(--line-soft);vertical-align:middle}
.adm-tbl tr:last-child td{border-bottom:0}
.adm-tbl .num{text-align:right;font-variant-numeric:tabular-nums}
.adm-tbl tbody tr:hover{background:var(--surface-2)}

/* ===== Service-Pakete ===== */
.sp-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.sp-card{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:14px 16px;box-shadow:var(--shadow)}
.sp-card-head{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.sp-card-head b{font-size:14.5px}
.sp-desc{font-size:12.5px;color:var(--muted);margin-bottom:8px}
.sp-types-line{font-size:12px;color:var(--muted);margin-bottom:8px}
/* Bootstyp-Auswahl (Chips mit Checkbox) */
.sp-types{display:flex;flex-wrap:wrap;gap:6px;margin-top:5px}
.chip-check{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:var(--ink);background:var(--surface-2);border:1px solid var(--line);border-radius:8px;padding:4px 10px;cursor:pointer;user-select:none}
.chip-check input{width:auto;margin:0;flex:0 0 auto}
.chip-check:has(input:checked){background:var(--accent-soft);border-color:var(--accent);color:var(--accent-deep);font-weight:600}
.sp-tasks{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-direction:column;gap:4px}
.sp-tasks li{font-size:13px;padding:5px 0;border-top:1px solid var(--line-soft)}
.sp-tasks li:first-child{border-top:0}
/* Paket-Auswahl in der Projektanlage */
.np-pkg-box{background:var(--surface-2);border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin:2px 0 4px}
.np-pkg-box .subhead{font-size:11.5px;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);font-weight:700;margin-bottom:6px}
.np-notes{border:1px solid var(--line);border-radius:9px;padding:2px 10px;background:var(--surface-2)}
.np-notes summary{cursor:pointer;font-size:12.5px;font-weight:600;color:var(--muted);padding:7px 0}
.np-notes[open] summary{margin-bottom:6px}
.np-notes textarea{margin-bottom:8px}

/* Rechte-Panel (Nutzerverwaltung): Fähigkeiten-Schalter + Seiten-Zugriff-Matrix */
.perm-wrap{margin-top:14px; border-top:1px solid var(--line); padding-top:12px}
.perm-panel{display:flex; flex-direction:column; gap:16px}
.perm-h{font-family:var(--mono); font-size:10px; letter-spacing:.06em; text-transform:uppercase; color:var(--faint); margin-bottom:6px}
.perm-caps{display:flex; flex-direction:column; gap:2px}
.perm-cap{display:flex; align-items:flex-start; gap:10px; padding:8px 10px; border:1px solid var(--line-soft); border-radius:10px; cursor:pointer}
.perm-cap:hover{background:var(--surface-2)}
.perm-cap input{width:auto; margin-top:2px; flex:0 0 auto}
.perm-cap-txt{display:flex; flex-direction:column; gap:1px; font-size:13px}
.perm-cap-txt b{font-weight:600; color:var(--ink)}
.perm-cap-txt .mhint{margin:0; font-size:11.5px}
.perm-pages .data-table td{white-space:normal}
.perm-pages .data-table td:first-child{font-weight:500}
.perm-pages select{min-width:120px}
.perm-cap input:disabled, .perm-pages select:disabled{opacity:.6; cursor:not-allowed}

/* Rechte-Panel kompakt: 3-Stufen-Schalter + gruppierte Seiten + einzeilige Sonderrechte */
.pggroup{border:1px solid var(--line-soft); border-radius:10px; margin-bottom:8px; overflow:hidden; background:var(--surface)}
.pggroup-h, .pggroup>summary{font-family:var(--mono); font-size:10px; letter-spacing:.06em; text-transform:uppercase; color:var(--faint); padding:7px 11px; background:var(--surface-2)}
.pggroup>summary{cursor:pointer; list-style:none; user-select:none}
.pggroup>summary::-webkit-details-marker{display:none}
.pggroup>summary::before{content:'▸ '; color:var(--muted)}
.pggroup[open]>summary::before{content:'▾ '}
.pgrow{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:6px 11px; border-top:1px solid var(--line-soft)}
.pggroup>.pgrow:first-of-type, .pggroup-h + .pgrow{border-top:0}
.pglabel{font-size:13px; color:var(--ink)}
.seg{display:inline-flex; flex:0 0 auto; border:1px solid var(--line); border-radius:8px; overflow:hidden; background:var(--surface)}
.seg button{border:0; background:transparent; color:var(--muted); font-size:12px; line-height:1; padding:6px 11px; cursor:pointer; border-left:1px solid var(--line-soft); white-space:nowrap}
.seg button:first-child{border-left:0}
.seg button.on{background:var(--accent); color:#fff; font-weight:600}
.seg button:disabled{cursor:not-allowed; opacity:.55}
.varsel{min-width:180px}
.perm-caps2{display:flex; flex-direction:column; gap:3px}
.perm-cap2{display:flex; align-items:center; gap:9px; padding:7px 11px; border:1px solid var(--line-soft); border-radius:9px; cursor:pointer}
.perm-cap2:hover{background:var(--surface-2)}
.perm-cap2 input{width:auto; flex:0 0 auto; margin:0}
.pc-lbl{font-size:13px}
.pc-lbl b{font-weight:600; color:var(--ink)}
.pc-lbl .mhint{margin:0; font-size:11.5px}
.perm-cap2 input:disabled ~ .pc-lbl{opacity:.6}
