/* ==========================================================================
   Orga-Dokumente 2.1 – Chat, Bausteine, Mitglieder, Finanzen, Struktur, Kanban
   ========================================================================== */

/* ---------- Organisations-Kontext in der Seitenleiste -------------------- */
.ctx { position: relative; padding: 0 10px 10px; }
.ctx-btn { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .05); color: #F2F2F5; font-size: 13.5px; font-weight: 600; text-align: left; }
.ctx-btn:hover { background: rgba(255, 255, 255, .1); }
.ctx-btn .ctx-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-btn .icon { width: 14px; height: 14px; opacity: .7; }
.ctx-dot { width: 10px; height: 10px; border-radius: 99px; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .15); }
.ctx-dot.all { background: conic-gradient(#CE1127, #FFC000, #6F8D62, #18788F, #173E6A, #9B696B, #CE1127); }
.ctx-menu { position: absolute; left: 10px; right: 10px; top: calc(100% - 4px); background: #2A2A2E; border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px;
  padding: 6px; z-index: 60; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.ctx-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: #E9E9EC; font-size: 13.5px; text-align: left; }
.ctx-menu button:hover, .ctx-menu button.on { background: rgba(255, 255, 255, .1); color: #fff; }
.nav-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 99px; background: #E9E9EC; }
.shell.compact .ctx-name, .shell.compact .ctx-btn .icon { display: none; }
.shell.compact .ctx { padding: 0 12px 10px; } .shell.compact .ctx-btn { justify-content: center; padding: 9px 0; }
.shell.compact .ctx-menu { width: 220px; left: 8px; right: auto; }
.shell.compact .nav-dot { position: absolute; top: 6px; right: 12px; }
@media (max-width: 1200px) { .ctx-name, .ctx-btn .icon { display: none; } .ctx-btn { justify-content: center; } .ctx-menu { width: 220px; right: auto; } .nav-dot { position: absolute; top: 6px; right: 12px; } }

.org-switch { display: flex; gap: 6px; flex-wrap: wrap; margin: -10px 0 16px; }
.org-pill { border: 1.5px solid color-mix(in srgb, var(--c) 35%, #fff); background: #fff; color: var(--c); border-radius: 99px; padding: 5px 14px; font-size: 13px; font-weight: 650; }
.org-pill.on { background: var(--c); border-color: var(--c); color: var(--ci); }

/* ---------- Kleine Bausteine ---------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-sm); }
.tile small { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; }
.tile b { font-size: 24px; letter-spacing: -.02em; font-family: var(--font-head); }
.tile span { font-size: 12.5px; color: var(--muted); }
.tile.ok b { color: var(--ok); } .tile.warn b { color: var(--warn); }
.tbl.list tbody tr:hover td { background: color-mix(in srgb, var(--soft) 55%, transparent); }
.tbl tr.sel td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.tbl tr.sum td { border-top: 2px solid var(--line); }
.tbl td.act { text-align: right; white-space: nowrap; }
.tbl td.act .btn { margin-left: 2px; }
.tbl .pos { color: var(--ok); font-weight: 600; } .tbl .neg, .neg { color: var(--danger); }
.red { color: var(--danger); }
.link.strong { color: var(--text); text-decoration: none; font-weight: 650; font-size: 14px; text-align: left; }
.link.strong:hover { text-decoration: underline; }
.due.ok { color: var(--ok); display: inline-flex; align-items: center; gap: 4px; }
.due .icon { width: 13px; height: 13px; vertical-align: -2px; }
.prog.over i { background: var(--danger) !important; }
.btn.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 18%, transparent); } }
.tabs { align-items: center; }
.tab-sel { margin-left: auto; height: 34px !important; }
.sheet.mid { width: min(860px, 100%); }
.legend { display: inline-flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); align-items: center; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* Auswahl-Chips (Aufgabenfelder) */
.mf { display: grid; gap: 10px; }
.mf-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.pick { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 99px;
  padding: 6px 12px; font-size: 13.5px; font-weight: 500; transition: all .12s; }
.pick:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.pick.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.pick .icon { width: 13px; height: 13px; stroke-width: 2.4; }
.mf-sel { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border-radius: 10px; background: color-mix(in srgb, var(--brand) 6%, var(--surface)); border: 1px dashed color-mix(in srgb, var(--brand) 30%, var(--line)); }
.mf-tag { display: inline-flex; align-items: center; gap: 2px; padding: 4px 4px 4px 11px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.mf-tag button { border: 0; background: none; padding: 2px; border-radius: 99px; color: var(--muted); display: grid; }
.mf-tag button:hover { background: var(--soft); color: var(--danger); }
.mf-tag .icon { width: 13px; height: 13px; }
.mf-add .inp { max-width: 380px; }
.mf-prev { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }
.mf-prev .icon { width: 14px; height: 14px; margin-top: 2px; }
.tarif { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; }
.tarif select:disabled { opacity: .5; }

/* ---------- Bausteine je Organisation --------------------------------------- */
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.mod-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; background: #fff; transition: all .15s; position: relative; }
.mod-card input { position: absolute; opacity: 0; pointer-events: none; }
.mod-card.on { border-color: var(--text); box-shadow: var(--shadow-sm); }
.mod-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--soft); flex: none; }
.mod-card.on .mod-ic { background: #1D1D1F; color: #fff; }
.mod-t { flex: 1; } .mod-t b { display: block; font-size: 15px; } .mod-t small { color: var(--muted); font-size: 13px; line-height: 1.45; display: block; margin-top: 2px; }
.switch { width: 38px; height: 22px; border-radius: 99px; background: #D8D6CF; position: relative; flex: none; transition: background .15s; margin-top: 2px; }
.switch i { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 99px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.mod-card.on .switch { background: var(--ok); } .mod-card.on .switch i { transform: translateX(16px); }
.mod-dots { display: flex; gap: 4px; margin-top: 6px; }
.mod-dot { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: #F1F0EC; color: #B9B6AE; }
.mod-dot .icon { width: 13px; height: 13px; }
.mod-dot.on { background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); }

/* ---------- Chat ------------------------------------------------------------- */
.chat { display: grid; grid-template-columns: 270px minmax(0, 1fr); height: 100vh; background: var(--surface); }
.chat.with-thread { grid-template-columns: 270px minmax(0, 1fr) 360px; }
.chat-side { border-right: 1px solid var(--line); background: color-mix(in srgb, var(--soft) 55%, var(--surface)); overflow: auto; padding-bottom: 20px; }
.chat-side-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 14px 8px 18px; font-size: 18px; position: sticky; top: 0;
  background: inherit; z-index: 2; }
.ch-group { padding: 6px 8px; }
.ch-group-t { display: flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 650; color: var(--muted); padding: 8px 10px 4px; text-transform: uppercase; letter-spacing: .05em; }
.ch-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 14.5px; text-align: left; }
.ch-item:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
.ch-item.on { background: var(--brand); color: var(--brand-ink); }
.ch-item.unread .ch-name { color: var(--text); font-weight: 700; }
.ch-item.on.unread .ch-name { color: var(--brand-ink); }
.ch-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-hash { display: grid; place-items: center; opacity: .7; } .ch-hash .icon { width: 15px; height: 15px; }
.ch-hash.big .icon { width: 22px; height: 22px; }
.ch-av { position: relative; width: 22px; height: 22px; border-radius: 6px; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; flex: none; }
.ch-av i { position: absolute; right: -3px; bottom: -3px; width: 9px; height: 9px; border-radius: 99px; background: #B8B5AD; border: 2px solid var(--surface); }
.ch-av i.on { background: #2BAC76; }
.ch-av.big { width: 36px; height: 36px; font-size: 13px; border-radius: 9px; }
.ch-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: #E5484D; color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.ch-count.soft { background: color-mix(in srgb, var(--text) 14%, transparent); color: var(--text); }
.ch-hint { font-size: 12.5px; color: var(--muted); padding: 2px 10px; margin: 0; }
.chat-main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); min-height: 64px; }
.ch-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ch-title strong { font-size: 17px; display: block; }
.ch-title small { color: var(--muted); font-size: 12.5px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 10px 0 16px; }
.chat-empty, .chat-welcome { text-align: center; color: var(--muted); padding: 60px 30px 20px; }
.chat-welcome .icon, .chat-empty .icon { width: 42px; height: 42px; stroke-width: 1.3; }
.chat-welcome h3 { color: var(--text); margin: 10px 0 4px; }
.day-sep { position: relative; text-align: center; margin: 14px 0 6px; }
.day-sep::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); }
.day-sep span { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 3px 12px; font-size: 12px; font-weight: 650; }
.msg { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; padding: 6px 20px; }
.msg.compact { padding-top: 1px; padding-bottom: 1px; }
.msg:hover { background: color-mix(in srgb, var(--soft) 55%, transparent); }
.msg-av { width: 38px; height: 38px; border-radius: 10px; color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; margin-top: 3px; }
.msg-time { font-size: 11px; color: transparent; text-align: right; padding-top: 3px; }
.msg.compact:hover .msg-time { color: var(--muted); }
.msg-meta { display: flex; gap: 8px; align-items: baseline; }
.msg-meta b { font-size: 14.5px; } .msg-meta time { font-size: 12px; color: var(--muted); }
.msg-text { font-size: 14.5px; line-height: 1.5; word-wrap: break-word; overflow-wrap: anywhere; }
.msg-text code { font-size: 13px; }
.msg-text a { color: var(--accent); }
.msg.deleted .msg-text { color: var(--muted); }
.edited { color: var(--muted); font-size: 11.5px; }
.mention { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.mention.me { background: #FFF1C2; color: #7A5300; }
.msg-tools { position: absolute; right: 18px; top: -14px; display: none; gap: 2px; padding: 3px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); z-index: 3; }
.msg:hover .msg-tools { display: flex; }
.msg-tools button { border: 0; background: none; border-radius: 7px; min-width: 30px; height: 28px; display: grid; place-items: center; font-size: 15px; color: var(--muted); }
.msg-tools button:hover { background: var(--soft); color: var(--text); }
.msg-tools .icon { width: 16px; height: 16px; }
.reacts { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.react { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 1px 8px; font-size: 13px; }
.react b { font-size: 12px; font-weight: 650; color: var(--muted); }
.react.on { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: color-mix(in srgb, var(--accent) 9%, #fff); }
.thread-link { border: 0; background: none; padding: 3px 6px; margin: 2px 0 0 -6px; border-radius: 7px; color: var(--accent); font-weight: 650; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.thread-link small { color: var(--muted); font-weight: 400; }
.thread-link:hover { background: var(--soft); }
.thread-link .icon { width: 15px; height: 15px; }
.msg-atts { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; max-width: 520px; }
.att { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: left; }
.att:hover { border-color: color-mix(in srgb, var(--text) 25%, var(--line)); }
.att > .icon { width: 20px; height: 20px; color: var(--muted); }
.att span { flex: 1; min-width: 0; } .att b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .att small { color: var(--muted); font-size: 12px; }
.att.ref { background: color-mix(in srgb, var(--soft) 50%, #fff); }
.msg-edit { display: grid; gap: 6px; margin-top: 4px; }
.composer { position: relative; padding: 0 20px 14px; }
.cmp-box { display: flex; align-items: flex-end; gap: 8px; border: 1.5px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 14px; background: #fff; transition: border-color .15s; }
.cmp-box:focus-within { border-color: color-mix(in srgb, var(--text) 45%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--text) 5%, transparent); }
.cmp-box textarea { flex: 1; border: 0; outline: 0; resize: none; font-size: 15px; line-height: 1.45; padding: 6px 0; max-height: 220px; background: none; }
.cmp-tools { display: flex; gap: 2px; align-items: center; }
.cmp-tools .send { height: 34px; width: 38px; padding: 0; justify-content: center; }
.cmp-hint { font-size: 11.5px; color: var(--muted); padding: 5px 4px 0; }
.cmp-hint code { font-size: 11px; }
.cmp-att { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.att-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--soft); border-radius: 8px; padding: 4px 4px 4px 10px; font-size: 13px; }
.att-chip button { border: 0; background: none; display: grid; padding: 2px; border-radius: 6px; }
.att-chip .icon { width: 14px; height: 14px; }
.mention-pop { position: absolute; left: 20px; bottom: calc(100% - 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 260px; overflow: hidden; z-index: 10; }
.mention-pop:empty { display: none; }
.mention-pop button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 12px; text-align: left; font-size: 14px; }
.mention-pop button:first-child, .mention-pop button:hover { background: var(--soft); }
.mention-pop small { margin-left: auto; color: var(--muted); }
.emoji-pop { position: fixed; z-index: 200; display: flex; gap: 2px; padding: 5px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); }
.emoji-pop button { border: 0; background: none; font-size: 20px; width: 34px; height: 34px; border-radius: 8px; }
.emoji-pop button:hover { background: var(--soft); }
.chat-thread { border-left: 1px solid var(--line); display: flex; flex-direction: column; height: 100vh; min-width: 0; }
.thread-head { display: flex; align-items: center; gap: 8px; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.thread-head small { color: var(--muted); }
.thread-msgs { flex: 1; overflow-y: auto; padding: 8px 0; }
.thread-msgs .msg { padding-left: 14px; padding-right: 14px; }
.thread-sep { margin: 6px 16px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); font-weight: 650; }
.chat-thread .composer { padding: 0 14px 14px; }
.doc-pick-list { display: grid; gap: 4px; margin: 12px 0; max-height: 420px; overflow: auto; }
.doc-pick { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; text-align: left; }
.doc-pick:hover { border-color: #999; }
.doc-pick b { display: block; font-size: 13.5px; } .doc-pick small { color: var(--muted); font-size: 12px; }
.chat-row { width: 100%; text-align: left; cursor: pointer; }
.home-cols + .home-cols { margin-top: 0; }

/* ---------- Kanban ------------------------------------------------------------ */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kb-col { background: color-mix(in srgb, var(--soft) 70%, var(--surface)); border-radius: 12px; padding: 10px; min-height: 120px; display: flex; flex-direction: column; gap: 8px; transition: background .15s; }
.kb-col.over { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); outline: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent); }
.kb-head { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 2px 4px; }
.kb-head .count { margin-left: auto; color: var(--muted); font-weight: 650; }
.kb-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; cursor: grab; box-shadow: var(--shadow-sm); display: grid; gap: 6px; }
.kb-card:hover { border-color: color-mix(in srgb, var(--text) 30%, var(--line)); }
.kb-card.prio { border-left: 4px solid var(--danger); }
.kb-card.dragging { opacity: .45; }
.kb-card b { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.kb-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kb-meta small { color: var(--muted); font-size: 12px; }
.kb-meta .due { margin-left: auto; font-size: 12px; }
.kb-who { width: 20px; height: 20px; border-radius: 99px; background: #1D1D1F; color: #fff; font-size: 9.5px; font-weight: 700; display: grid; place-items: center; }
.kb-col[data-kb-col="erledigt"] .kb-card b { text-decoration: line-through; color: var(--muted); }
.kb-add { background: #fff !important; }

/* ---------- Finanzen ------------------------------------------------------------ */
.bar-row { display: grid; grid-template-columns: minmax(120px, 34%) 1fr auto; gap: 10px; align-items: center; padding: 4px 0; font-size: 13.5px; }
.bar-row .bl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .bt { height: 10px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.bar-row .bt i { display: block; height: 100%; border-radius: 99px; }
.bar-row b { font-weight: 650; font-size: 13px; white-space: nowrap; }
i.e, .legend i.e { background: #2F855A; } i.a, .legend i.a { background: #C05621; }
.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; height: 150px; align-items: end; }
.mcol { display: flex; flex-direction: column; align-items: center; height: 100%; gap: 4px; }
.mbars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.mbars i { width: 40%; max-width: 16px; border-radius: 4px 4px 0 0; min-height: 2px; }
.mcol small { font-size: 11px; color: var(--muted); }
.proj-mini { display: grid; grid-template-columns: 1fr 140px; gap: 12px; align-items: center; width: 100%; border: 0; border-bottom: 1px solid #F0EEE9; background: none; padding: 9px 2px; text-align: left; }
.proj-mini:hover b { text-decoration: underline; }
.proj-mini b { display: block; font-size: 14px; } .proj-mini small { color: var(--muted); font-size: 12.5px; }

/* ---------- Unternehmensstruktur --------------------------------------------- */
.oc-wrap { padding: 26px; overflow: auto; margin-bottom: 12px; }
.oc { display: flex; gap: 22px; justify-content: center; align-items: flex-start; min-width: max-content; }
.oc-col { display: flex; flex-direction: column; align-items: center; position: relative; }
.oc-children { display: flex; gap: 14px; margin-top: 18px; padding-top: 18px; position: relative; align-items: flex-start; }
.oc-children::before { content: ""; position: absolute; top: 0; left: 50%; width: 2px; height: 18px; margin-top: -18px; background: #CFCBC2; }
.oc-children > .oc-col::before { content: ""; position: absolute; top: -18px; left: 50%; width: 2px; height: 18px; background: #CFCBC2; }
.oc-children > .oc-col::after { content: ""; position: absolute; top: -18px; height: 2px; background: #CFCBC2; left: -7px; right: -7px; }
.oc-children > .oc-col:first-child::after { left: 50%; } .oc-children > .oc-col:last-child::after { right: 50%; }
.oc-children > .oc-col:only-child::after { display: none; }
.oc-unit { background: #fff; border: 1px solid var(--line); border-radius: 12px; min-width: 190px; max-width: 240px; box-shadow: var(--shadow-sm); overflow: hidden; }
.oc-head { display: block; width: 100%; border: 0; border-top: 5px solid var(--f); background: color-mix(in srgb, var(--f) 6%, #fff); padding: 8px 12px 7px; text-align: left; }
.oc-head:hover { background: color-mix(in srgb, var(--f) 12%, #fff); }
.oc-head small { display: block; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; color: var(--f); }
.oc-head strong { font-size: 14px; line-height: 1.3; }
.oc-unit ul { list-style: none; margin: 0; padding: 4px 12px 2px; border-top: 1px solid #F0EEE9; }
.oc-unit li { display: flex; flex-direction: column; padding: 4px 0; font-size: 12.5px; border-bottom: 1px dashed #F0EEE9; }
.oc-unit li:last-child { border-bottom: 0; }
.oc-unit li span { color: var(--muted); font-size: 11.5px; } .oc-unit li b { font-weight: 600; }
.oc-unit li.vakant b { color: var(--warn); font-style: italic; font-weight: 500; }
.oc-add { display: none; width: 100%; border: 0; border-top: 1px solid #F0EEE9; background: none; padding: 5px; font-size: 12px; color: var(--muted); align-items: center; justify-content: center; gap: 4px; }
.oc-add .icon { width: 13px; height: 13px; }
.oc-unit:hover .oc-add { display: flex; }
.oe-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sub-title small { font-weight: 500; }
.tbl.roles td { vertical-align: top; }
.tbl.roles textarea.inp.sm { height: auto; min-height: 36px; padding: 7px 10px; line-height: 1.35; resize: vertical; }
.pmap { display: grid; gap: 12px; margin-bottom: 10px; }
.lane { border-radius: 16px; padding: 14px 16px 16px; }
.lane.fuehrung { background: #E9EEF6; } .lane.kern { background: #FFF4D1; } .lane.unterstuetzung { background: #ECEBE7; }
.lane-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.lane-head h4 { margin: 0; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
.lane-grid { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.pgrp { display: flex; flex-direction: column; gap: 6px; min-width: 170px; max-width: 240px; flex: 1; }
.pgrp h5 { margin: 0 0 2px; font-size: 12.5px; padding: 6px 10px; border-radius: 8px; background: #1D1D1F; color: #fff; }
.lane.kern .pgrp h5 { background: #7A5B00; } .lane.fuehrung .pgrp h5 { background: #24456E; } .lane.unterstuetzung .pgrp h5 { background: #55524B; }
.proc { display: flex; flex-direction: column; gap: 2px; text-align: left; border: 1px solid rgba(0, 0, 0, .08); background: #fff; border-radius: 9px; padding: 7px 10px; font-size: 13px; font-weight: 600; }
.proc:hover { border-color: rgba(0, 0, 0, .3); }
.proc.leer { background: rgba(255, 255, 255, .55); font-weight: 500; color: #555; }
.proc small { font-weight: 400; color: var(--muted); font-size: 11.5px; }
.sys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.sys-card { display: flex; gap: 12px; align-items: flex-start; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow-sm); }
.sys-card:hover { border-color: #AAA; }
.sys-ic { width: 34px; height: 34px; border-radius: 9px; background: var(--soft); display: grid; place-items: center; flex: none; }
.sys-t { flex: 1; min-width: 0; } .sys-t b { display: block; font-size: 14px; } .sys-t small { color: var(--muted); font-size: 12.5px; display: block; }
.sys-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: 12px; color: var(--muted); }
.sys-meta .icon { width: 13px; height: 13px; vertical-align: -2px; }
.sys-meta .badge { height: 18px; font-size: 11px; }

.home-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.frist-row .txt { min-width: 0; } .frist-row .txt strong { overflow-wrap: anywhere; }
@media (max-width: 1100px) { .home-cols { grid-template-columns: 1fr; } }

/* 3.8: Prüfhinweise zu erzeugten Verträgen, Abgleich, Textstellen-Regeln, Erstanmeldung */
.pruef-hinweise { text-align: left; margin: 14px auto 0; max-width: 640px; border: 1px solid #F1D3A6; background: #FFF6E8; border-radius: 12px; padding: 12px 14px; color: #5C3A00; }
.pruef-hinweise strong { display: flex; gap: 8px; align-items: center; font-size: 14px; color: #7A4800; }
.pruef-hinweise strong .icon { width: 16px; height: 16px; flex: none; }
.pruef-hinweise ul { margin: 8px 0 6px; padding-left: 20px; font-size: 13.5px; line-height: 1.45; }
.pruef-hinweise li { overflow-wrap: anywhere; }
.pruef-hinweise li + li { margin-top: 4px; }
.pruef-hinweise small { color: #6B5A3E; font-size: 12px; }
.card-list .pruef-hinweise { margin: 0 0 6px; max-width: none; }
.abgleich { margin-top: 16px; }
.ab-wahl select { width: auto; min-width: 120px; }
.ab-liste { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.ab-person { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: #fff; }
.ab-kopf { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ab-kopf small { color: var(--muted); }
.ab-person ul { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.45; }
.ab-person li { overflow-wrap: anywhere; }
.ab-person li + li { margin-top: 4px; }
.ab-person li.w::marker { color: var(--warn); }
.ab-person li small { display: block; color: var(--muted); font-size: 12px; }
.ok-note { display: flex; gap: 8px; align-items: center; color: #1E6B3A; font-weight: 600; margin: 14px 0 0; }
.anp-liste { display: grid; gap: 10px; margin-top: 10px; }
.anp-zeile { display: grid; grid-template-columns: minmax(150px, 190px) 1fr 1fr auto; gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.anp-zeile .field { margin: 0; min-width: 0; grid-column: auto !important; }
.anp-zeile textarea { resize: vertical; min-height: 44px; }
@media (max-width: 760px) { .anp-zeile { grid-template-columns: 1fr; } .anp-zeile .icon-btn { justify-self: end; } }
.wk { max-width: 860px; }
.wk-stand { margin: -6px 0 14px; color: var(--muted); }
.wk-schritte { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.wk-schritt { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; }
.wk-nr { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; font-weight: 700; background: var(--soft); color: var(--text); }
.wk-schritt.fertig .wk-nr { background: #1E6B3A; color: #fff; }
.wk-nr .icon { width: 18px; height: 18px; }
.wk-titel { font-size: 17px; margin: 6px 0 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wk-inhalt p { margin: 0 0 10px; line-height: 1.5; }
.wk-foto { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.wk-foto > div { flex: 1; min-width: 200px; }
.wk-dienst { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 0 0 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); line-height: 1.5; }
.wk-dienst > .icon { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.wk-dienst .row-start { margin-top: 8px; }
.wk-server { margin-top: 8px; }
.wk-server summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: 13.5px; }
.wk-server dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 8px 0 0; font-size: 13.5px; }
.wk-server dt { color: var(--muted); } .wk-server dd { margin: 0; overflow-wrap: anywhere; }
.wk-ende { margin-top: 20px; }
@media (max-width: 600px) { .wk-schritt { grid-template-columns: minmax(0, 1fr); } .wk .btn { white-space: normal; text-align: left; height: auto; min-height: 40px; } .wk-server dl { grid-template-columns: 1fr; } .wk-server dd { margin-bottom: 6px; } }
@media (prefers-reduced-motion: no-preference) { .wk-schritt { animation: wk-ein .35s ease both; } .wk-schritt:nth-child(2) { animation-delay: .05s; } .wk-schritt:nth-child(3) { animation-delay: .1s; } .wk-schritt:nth-child(4) { animation-delay: .15s; } }
@keyframes wk-ein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.seg.wrap { flex-wrap: wrap; width: max-content; max-width: 100%; overflow: visible; }
.anp-gruppe { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.anp-gruppe h5 { margin: 0 0 8px; font-size: 13.5px; overflow-wrap: anywhere; }
.anp-gruppe > .btn { margin-top: 10px; }
.card-list button.doc-row { width: 100%; text-align: left; cursor: pointer; }
@media (max-width: 600px) { .pers-row > .muted-note { display: none; } }
.anp-zeile > .icon-btn { align-self: center; }

/* 3.9: Versand von Projektunterlagen */
.pe-kopf { margin: 16px 0 8px; font-size: 13.5px; }
.pe-zeile { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: var(--bg); }
.pe-zeile > .btn { margin-top: 6px; }
.lbl-klein { font-size: 13px; font-weight: 600; }
.chips-wahl { display: flex; flex-wrap: wrap; gap: 6px; }
.versand-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.versand-log li { border-left: 3px solid var(--line); padding: 4px 0 4px 10px; font-size: 13.5px; overflow-wrap: anywhere; }
.versand-log small { display: block; color: var(--muted); }
.pv-set { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 10px; margin: 0 0 12px; }
.pv-set legend { font-weight: 650; font-size: 13.5px; padding: 0 4px; }
.pv-set .check-row small { display: inline; }
.nl-vorschau { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.5; }
.nl-vorschau.klein { font-size: 12.5px; color: var(--muted); }
.nl-tbl td { vertical-align: top; overflow-wrap: break-word; }
.nl-tbl .nowrap { white-space: nowrap; }
@media (max-width: 600px) {
  .nl-tbl thead { display: none; }
  .nl-tbl, .nl-tbl tbody, .nl-tbl tr, .nl-tbl td { display: block; width: auto; }
  .nl-tbl tr { border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .nl-tbl td { padding: 2px 0 !important; border: 0 !important; text-align: left !important; }
  .nl-tbl td:first-child { font-weight: 600; overflow-wrap: anywhere; }
  .section-head:has(> .muted-note) { flex-direction: column; align-items: stretch; gap: 10px; }
}
.such-aus { display: block; color: var(--text) !important; font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; white-space: normal !important; } .such-aus mark { background: #FFE9A8; color: inherit; border-radius: 3px; padding: 0 2px; }

/* 4.0: Darstellung – Skins, Bewegung, Oft genutzt */
.skin-wahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.skin-k { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 10px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font-weight: 600; text-align: left; }
.skin-k.on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.skin-vorschau { display: grid; gap: 4px; width: 100%; height: 54px; padding: 8px; border-radius: 8px; background: var(--sb); border: 1px solid rgba(0, 0, 0, .08); }
.skin-vorschau i { display: block; border-radius: 4px; background: var(--ss); }
.skin-vorschau i:first-child { box-shadow: inset 0 0 0 100px transparent; border-left: 18px solid var(--st); }
.skin-vorschau i:last-child { border-left: 30px solid var(--sm); }
.oft-leiste { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.oft-leiste .chip .icon { width: 15px; height: 15px; vertical-align: -3px; }
[data-skin="kontrast"] :focus-visible { outline: 3px solid #000 !important; outline-offset: 2px; }
[data-skin="kontrast"] .inp, [data-skin="kontrast"] .btn:not(.primary), [data-skin="kontrast"] .card { border-color: #6B6B6B; }
/* sanfte Bewegungen */
.card, .doc-row, .btn, .chip, .skin-k { transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease), background-color .15s var(--ease); }
button.doc-row:hover, .org-mini:hover, .skin-k:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: scale(.98); }
.sheet { animation: blatt-ein .22s var(--ease) both; }
@keyframes blatt-ein { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
.card-list > * { animation: rise .28s var(--ease) both; }
.card-list > *:nth-child(2) { animation-delay: .03s; } .card-list > *:nth-child(3) { animation-delay: .06s; } .card-list > *:nth-child(4) { animation-delay: .09s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
[data-bewegung="reduziert"] *, [data-bewegung="reduziert"] *::before, [data-bewegung="reduziert"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
.ki-such .inp { flex: 1; min-width: 200px; }
.ki-antwort { margin-top: 16px; }
.ki-vorschau { max-height: 50vh; overflow: auto; }
.section-head.umbrechen { flex-wrap: wrap; gap: 8px; }
@media (max-width: 640px) {      /* Handy: Knöpfe unter den Text, damit Namen lesbar bleiben */
  .doc-row.umbrechen { flex-wrap: wrap; row-gap: 8px; }
  .doc-row.umbrechen > .txt { flex: 1 1 calc(100% - 60px); min-width: 0; }
  .doc-row.umbrechen > .txt + .btn { margin-left: auto; }
}

/* 4.1: Hintergrundaufgaben – am Handy als Liste statt Tabelle */
@media (max-width: 640px) {
  section.card > table.tbl.hg { display: block; overflow: visible; }
  .tbl.hg thead { display: none; }
  .tbl.hg tbody, .tbl.hg tr, .tbl.hg td { display: block; width: auto; }
  .tbl.hg tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .tbl.hg td { border: 0; padding: 2px 0; text-align: left; }
  .tbl.hg td[data-label]:not(:first-child)::before { content: attr(data-label) ": "; color: var(--muted); font-size: 13px; }
}
@media (max-width: 640px) {      /* 4.1: lange Knopf-Beschriftungen umbrechen statt über den Rand zu laufen */
  .row-start > .btn, .row-end > .btn { max-width: 100%; white-space: normal; text-align: left; }
}
