/* S&L Hub – Styles */
:root {
  --primary: #4f6bed;
  --primary-d: #3d56d1;
  --primary-soft: #eef1fd;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --border: #e3e6eb;
  --text: #1f2430;
  --muted: #6b7385;
  --danger: #e2445c;
  --ok: #00c875;
  --warn: #fdab3d;
  --side-bg: #1c2130;
  --side-text: #c9cede;
  --side-active: #2c3347;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, .18);
  --radius: 10px;
  /* Diagramme (validierte Paletten, siehe Datenschutz-/Design-Doku) */
  --chart-1: #257de0; --chart-2: #f47230;
  --prio-1: #84b9f3; --prio-2: #338ced; --prio-3: #1b64be; --prio-4: #0e3d7e;
  --chart-grid: #e7e7e7; --chart-axis: #c2c2c2; --chart-ink: #191919; --chart-ink-2: #666666;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171f; --surface: #1c202b; --surface-2: #232836; --border: #2e3442;
    --text: #e6e8ee; --muted: #9098aa; --primary-soft: #262d4a;
    --side-bg: #10131a; --side-active: #222838; color-scheme: dark;
    --chart-1: #338ced; --chart-2: #e76624;
    --prio-1: #9dc8f7; --prio-2: #519ced; --prio-3: #2370cd; --prio-4: #1757ac;
    --chart-grid: #303030; --chart-axis: #474747; --chart-ink: #efefef; --chart-ink-2: #9c9c9c;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; color: var(--text); background: var(--bg); line-height: 1.45;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
h2 { font-size: 16px; margin: 0; }
h3 { font-size: 14px; margin: 0 0 10px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--primary); }
input[type=color] { padding: 2px; height: 38px; }
textarea { resize: vertical; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; justify-content: center; }
.grow { flex: 1; min-width: 0; }
.pad { padding: 16px; }
.pad-x { padding: 0 16px 12px; margin: 0; }
.mt { margin-top: 18px; }
.row-gap { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.overdue { color: var(--danger) !important; font-weight: 600; }
.loading { padding: 40px; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 500; white-space: nowrap; color: var(--text);
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.icon-btn { border: 0; background: transparent; cursor: pointer; padding: 4px 8px; border-radius: 6px; color: var(--muted); font-size: 15px; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.tiny { font-size: 11px; padding: 0 4px; }

/* Login */
.login-page { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #1c2130 0%, #2f3b6b 60%, #4f6bed 100%); padding: 16px; }
.login-card { background: var(--surface); padding: 36px; border-radius: 16px; width: 100%; max-width: 380px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 12px; }
.login-card h1 { justify-content: center; }
.login-card p { text-align: center; margin: 0 0 10px; }
.login-card label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; }
.login-error { color: var(--danger); min-height: 18px; font-size: 13px; }
.brand-logo { width: 38px; height: 38px; border-radius: 10px; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.brand-logo.big { width: 60px; height: 60px; font-size: 20px; border-radius: 14px; margin: 0 auto; }

/* Shell */
.shell { display: flex; height: 100vh; }
.sidebar { width: 232px; background: var(--side-bg); color: var(--side-text); display: flex; flex-direction: column; flex-shrink: 0; }
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px; }
.brand-name { color: #fff; font-weight: 700; font-size: 16px; }
.brand-sub { font-size: 11px; opacity: .7; }
.nav { display: flex; flex-direction: column; padding: 8px; gap: 2px; flex: 1; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--side-text); font-weight: 500; }
.nav a:hover { background: var(--side-active); text-decoration: none; color: #fff; }
.nav a.active { background: var(--primary); color: #fff; }
.nav-icon { width: 20px; text-align: center; }
.nav .badge { margin-left: auto; }
.badge { background: var(--danger); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11px; font-weight: 700; line-height: 18px; min-width: 18px; text-align: center; }
.sidebar-foot { padding: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.me-btn { display: flex; align-items: center; gap: 10px; width: 100%; background: transparent; border: 0; color: var(--side-text); cursor: pointer; padding: 6px; border-radius: 8px; text-align: left; }
.me-btn:hover { background: var(--side-active); }
.me-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.me-text b { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text small { opacity: .7; font-size: 11px; }
.content { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 56px; display: flex; align-items: center; gap: 16px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.menu-toggle { display: none; font-size: 20px; }
.search { position: relative; flex: 1; max-width: 560px; }
.search input { padding-left: 34px; background: var(--surface-2); }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: .6; }
.search-results { position: absolute; top: 44px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 50; max-height: 420px; overflow: auto; }
.search-results a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; color: var(--text); }
.search-results a:hover, .search-results a.sel { background: var(--primary-soft); text-decoration: none; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.online-avatars { display: flex; }
.online-avatars .avatar { margin-left: -6px; border: 2px solid var(--surface); }
.online-avatars .more { margin-left: 4px; font-size: 12px; color: var(--muted); }
.online-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
main { flex: 1; overflow: auto; position: relative; }
.nav-overlay { display: none; }

/* Avatare */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; flex-shrink: 0; position: relative; vertical-align: middle; }
.avatar-empty { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--border); }
.presence { position: absolute; right: -1px; bottom: -1px; width: 30%; height: 30%; min-width: 8px; min-height: 8px; border-radius: 50%; background: #9aa1b1; border: 2px solid var(--surface); }
.presence.on { background: var(--ok); }

/* Seiten */
.page { padding: 24px 28px; max-width: 1200px; margin: 0 auto; }
.page-wide { max-width: none; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.card-head a { font-size: 13px; }
.card-head-in { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.card-head-in h3 { margin: 0; }
.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-state.small { padding: 24px; }
.empty-state h2 { color: var(--text); margin-bottom: 12px; }
.notice { background: #fff6e5; border: 1px solid #fdd28a; color: #7a4d00; padding: 8px 12px; border-radius: 8px; margin-bottom: 10px; }
.crumbs { font-size: 13px; margin-bottom: 6px; }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.pill { display: inline-block; color: #fff; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 12px; white-space: nowrap; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* Dashboard */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; color: var(--muted); box-shadow: var(--shadow); }
.stat:hover { text-decoration: none; border-color: var(--primary); }
.stat-num { font-size: 28px; font-weight: 700; color: var(--text); }
.stat-warn .stat-num { color: var(--danger); }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.list { list-style: none; margin: 0; padding: 4px 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 9px 16px; color: var(--text); }
.list-row:hover { background: var(--surface-2); text-decoration: none; }
.list-row small { display: block; }
.date { font-size: 12px; color: var(--muted); white-space: nowrap; }
.date-box { width: 42px; text-align: center; background: var(--primary-soft); border-radius: 8px; padding: 3px 0; line-height: 1.1; color: var(--primary); }
.date-box b { display: block; font-size: 16px; }
.date-box small { font-size: 11px; }
.pipeline-bars { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.pbar { display: grid; grid-template-columns: 150px 1fr 90px; gap: 10px; align-items: center; font-size: 13px; }
.pbar-track { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.pbar-track span { display: block; height: 100%; border-radius: 5px; min-width: 2px; }
.pbar-val { text-align: right; font-weight: 600; }
.team-mini { padding: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.team-mini-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; color: var(--text); }
.team-mini-row:hover { background: var(--surface-2); text-decoration: none; }
.team-mini-row span { display: flex; flex-direction: column; min-width: 0; }
.team-mini-row small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Toolbar / Segmente / Chips */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.input-sm { width: auto; min-width: 180px; padding: 6px 10px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 6px 12px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 16px; padding: 4px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.chip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.chip-radio input { display: none; }
.chip-radio span { border: 1px solid var(--border); border-radius: 16px; padding: 3px 10px; cursor: pointer; font-size: 13px; display: inline-block; }
.chip-radio input:checked + span { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 500; white-space: nowrap; }
.tabs a.on { color: var(--primary); border-color: var(--primary); }
.tabs a:hover { text-decoration: none; color: var(--text); }

/* Boards Übersicht */
.board-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.board-card { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; color: var(--text); box-shadow: var(--shadow); }
.board-card:hover { border-color: var(--primary); text-decoration: none; }
.board-card h3 { margin: 0 0 2px; }
.board-card p { margin: 0 0 10px; font-size: 13px; }
.board-card-icon { font-size: 28px; }
.progress { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.progress span { display: block; height: 100%; background: var(--ok); }

/* Board Tabelle */
.group { margin-bottom: 26px; }
.group-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.group-head .icon-btn { color: var(--gc); }
.group-name { border: 1px solid transparent; background: transparent; color: var(--gc); font-weight: 700; font-size: 16px; width: auto; min-width: 120px; padding: 4px 6px; }
.group-name:hover { border-color: var(--border); }
.table-scroll { overflow-x: auto; }
.btable { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border-left: 5px solid var(--gc); border-radius: 6px; min-width: 860px; }
.btable th { font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); text-align: center; background: var(--surface); }
.btable th.col-name { text-align: left; }
.btable td { border-bottom: 1px solid var(--border); padding: 0; height: 40px; border-right: 1px solid var(--border); }
.btable td:last-child { border-right: 0; width: 40px; text-align: center; }
.btable tr:hover td { background: var(--surface-2); }
.btable .col-name { width: 38%; position: relative; }
.name-cell { display: flex; align-items: center; height: 40px; }
.name-cell .cell-input { flex: 1; min-width: 0; }
.drag { cursor: grab; color: var(--muted); opacity: 0; padding: 0 4px; font-size: 11px; letter-spacing: -2px; }
tr:hover .drag { opacity: .6; }
.cell-input { border: 1px solid transparent; background: transparent; border-radius: 4px; padding: 6px 8px; height: 34px; }
.cell-input:hover { border-color: var(--border); }
.date-input { font-size: 13px; color: var(--muted); }
.open-item { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 4px 8px; font-size: 12px; opacity: .3; white-space: nowrap; }
tr:hover .open-item { opacity: 1; }
.open-item:hover { color: var(--primary); }
.cell-color { color: #fff; font-weight: 600; text-align: center; cursor: pointer; font-size: 13px; width: 130px; transition: filter .1s; }
.cell-color:hover { filter: brightness(1.08); }
.btable tr:hover td.cell-color { background: inherit; }
.cell-btn { border: 0; background: transparent; cursor: pointer; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.cell-company { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.add-row td { border-right: 0 !important; }
.add-row .cell-input { width: 100%; color: var(--muted); }
.group-summary { display: flex; align-items: center; gap: 10px; padding: 6px 0 0 5px; }
.status-bar { display: flex; height: 8px; width: 200px; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
tr.dragging, .kcard.dragging { opacity: .4; }
.drop-hover { outline: 2px dashed var(--primary); outline-offset: -2px; }

/* Popover */
.popover { position: fixed; z-index: 200; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; display: flex; flex-direction: column; gap: 2px; max-height: 340px; overflow: auto; min-width: 160px; }
.pop-opt { border: 0; background: transparent; text-align: left; padding: 6px 10px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.pop-opt:hover { background: var(--surface-2); }
.pop-opt .pill { width: 100%; text-align: center; }

/* Kanban */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.kcol { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); width: 280px; flex-shrink: 0; display: flex; flex-direction: column; max-height: calc(100vh - 240px); }
.kcol-head { padding: 10px 12px; font-weight: 600; display: flex; align-items: center; gap: 8px; border-top: 4px solid; border-radius: var(--radius) var(--radius) 0 0; }
.kcol-head small { margin-left: auto; font-weight: 400; }
.kcol-body { padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 60px; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px; cursor: pointer; box-shadow: var(--shadow); }
.kcard:hover { border-color: var(--primary); }
.kcard-title { font-weight: 600; margin-bottom: 6px; }
.kcard-meta { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.kcard-foot { display: flex; align-items: center; gap: 8px; }
.kadd { border: 1px dashed var(--border); background: transparent; border-radius: 8px; padding: 8px; color: var(--muted); cursor: pointer; }
.kadd:hover { color: var(--primary); border-color: var(--primary); }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 20, 30, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 100; overflow-y: auto; animation: fade .12s; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 520px; box-shadow: var(--shadow-lg); animation: pop .15s; }
.modal-wide { max-width: 780px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); gap: 10px; }
.modal-head h2 { font-size: 17px; overflow: hidden; text-overflow: ellipsis; }
.modal-body { padding: 18px 20px 20px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 500; color: var(--muted); }
.form label.check { flex-direction: row; color: var(--text); }
.check-inline { align-self: end; padding-bottom: 9px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 4px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-icon { display: grid; grid-template-columns: 80px 1fr; gap: 12px; }
.grid-zip { display: grid; grid-template-columns: 120px 1fr; gap: 12px; }
fieldset.attendees { border: 1px solid var(--border); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 12px; margin: 0; }
fieldset.attendees legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.att { font-weight: 400 !important; }

/* Kommentare */
.item-detail { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
.comments { border-left: 1px solid var(--border); padding-left: 20px; }
.c-form { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; align-items: flex-end; }
.c-list { display: flex; flex-direction: column; gap: 12px; max-height: 380px; overflow-y: auto; }
.comment { display: flex; gap: 10px; }
.comment .md { margin-top: 2px; }

/* Toasts */
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 300; }
.toast { background: #1f2430; color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow-lg); max-width: 380px; transition: opacity .3s, transform .3s; }
.toast-err { background: var(--danger); }
.toast-info { background: var(--primary); }
.toast.out { opacity: 0; transform: translateY(10px); }

/* Split-Layout (Wiki, Chat, Kalender) */
.split { display: flex; height: 100%; }
.split-side { width: 260px; border-right: 1px solid var(--border); background: var(--surface); overflow-y: auto; padding: 12px; flex-shrink: 0; }
.split-main { flex: 1; overflow-y: auto; min-width: 0; }
.side-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px; margin-top: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* Wiki */
.tree-row { display: flex; align-items: center; border-radius: 6px; }
.tree-row:hover { background: var(--surface-2); }
.tree-row.active { background: var(--primary-soft); }
.tree-row.active .tree-link { color: var(--primary); font-weight: 600; }
.tree-toggle { border: 0; background: transparent; width: 20px; cursor: pointer; color: var(--muted); padding: 0; }
.tree-link { flex: 1; padding: 6px 4px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree-link:hover { text-decoration: none; }
.tree-add { border: 0; background: transparent; cursor: pointer; color: var(--muted); opacity: 0; padding: 2px 8px; font-size: 16px; }
.tree-row:hover .tree-add { opacity: 1; }
.doc { background: var(--surface); }
.doc-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 24px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 5; gap: 12px; flex-wrap: wrap; }
.doc-top .crumbs { margin: 0; }
.doc-actions { display: flex; align-items: center; gap: 10px; }
.doc-inner { max-width: 820px; margin: 0 auto; padding: 30px 40px 80px; }
.doc-title-row { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.doc-icon { width: 60px; font-size: 32px; text-align: center; border: 0; background: transparent; padding: 0; }
.doc-title { font-size: 32px; font-weight: 700; border: 0; background: transparent; padding: 4px 0; }
.doc-icon:focus, .doc-title:focus { outline: none; }
.md-toolbar { display: flex; gap: 2px; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 8px 8px 0 0; padding: 4px; background: var(--surface-2); position: sticky; top: 52px; z-index: 4; }
.md-toolbar button { border: 0; background: transparent; padding: 5px 9px; border-radius: 5px; cursor: pointer; font-size: 13px; }
.md-toolbar button:hover { background: var(--surface); }
.doc-editor { border-radius: 0 0 8px 8px; border-top: 0; min-height: 400px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 14px; line-height: 1.6; padding: 16px; resize: none; overflow: hidden; }
.doc-view { font-size: 15px; line-height: 1.7; }
.subpages { margin-top: 30px; border-top: 1px solid var(--border); padding-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.subpage { padding: 6px 8px; border-radius: 6px; color: var(--text); }
.subpage:hover { background: var(--surface-2); text-decoration: none; }

/* Markdown */
.md p { margin: 0 0 .6em; }
.md p:last-child { margin-bottom: 0; }
.md h1 { font-size: 26px; margin: 1em 0 .4em; }
.md h2 { font-size: 20px; margin: 1em 0 .4em; }
.md h3 { font-size: 16px; margin: 1em 0 .4em; }
.md h1:first-child, .md h2:first-child { margin-top: 0; }
.md ul, .md ol { margin: 0 0 .6em; padding-left: 1.4em; }
.md ul.todo { list-style: none; padding-left: .2em; }
.md ul.todo li.done span { text-decoration: line-through; color: var(--muted); }
.md blockquote { margin: .6em 0; padding: 8px 14px; border-left: 4px solid var(--primary); background: var(--primary-soft); border-radius: 0 6px 6px 0; }
.md code { background: var(--surface-2); border: 1px solid var(--border); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.md pre { background: var(--surface-2); border: 1px solid var(--border); padding: 12px; border-radius: 8px; overflow-x: auto; }
.md pre code { border: 0; padding: 0; background: none; }
.mention { background: var(--primary-soft); color: var(--primary); border-radius: 4px; padding: 0 3px; font-weight: 600; }

/* Chat */
.chat-main { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); }
.chan { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; color: var(--text); }
.chan:hover { background: var(--surface-2); text-decoration: none; }
.chan.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.chan.unread { font-weight: 700; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.chat-head div { display: flex; flex-direction: column; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px 20px 8px; }
.load-more { text-align: center; margin-bottom: 10px; }
.day-sep { text-align: center; margin: 16px 0 8px; position: relative; }
.day-sep::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--border); }
.day-sep span { position: relative; background: var(--surface); padding: 2px 12px; border: 1px solid var(--border); border-radius: 12px; font-size: 12px; font-weight: 600; color: var(--muted); }
.msg { display: flex; gap: 10px; padding: 6px 8px; border-radius: 8px; position: relative; margin-top: 4px; }
.msg.compact { padding-top: 1px; padding-bottom: 1px; margin-top: 0; }
.msg:hover { background: var(--surface-2); }
.msg-av { width: 36px; flex-shrink: 0; text-align: center; }
.msg-time-hover { opacity: 0; font-size: 10px; color: var(--muted); line-height: 22px; }
.msg:hover .msg-time-hover { opacity: 1; }
.msg-body { flex: 1; min-width: 0; }
.msg-meta { display: flex; gap: 8px; align-items: baseline; }
.msg-text { word-wrap: break-word; overflow-wrap: anywhere; }
.msg-tools { position: absolute; right: 8px; top: -10px; display: none; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
.msg:hover .msg-tools { display: flex; }
.typing { height: 20px; padding: 0 22px; font-size: 12px; color: var(--muted); font-style: italic; }
.composer { display: flex; gap: 8px; padding: 0 20px 16px; align-items: flex-end; }
.composer textarea { resize: none; max-height: 200px; min-height: 42px; }
.composer .btn { height: 42px; width: 48px; }

/* Kalender */
.cal-main { padding: 16px 20px; display: flex; flex-direction: column; }
.cal-title { margin: 0 8px; font-size: 18px; }
.cal-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cal-people { display: flex; flex-direction: column; gap: 6px; padding: 4px; }
.person-check { font-size: 13px; }
.cat-legend { padding: 4px; display: flex; flex-direction: column; gap: 3px; }
.mini-cal { margin: 14px 0 6px; }
.mini-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; gap: 1px; }
.mini-grid button { border: 0; background: transparent; cursor: pointer; padding: 4px 0; border-radius: 50%; aspect-ratio: 1; }
.mini-grid button:hover { background: var(--surface-2); }
.mini-grid .other { color: var(--muted); opacity: .5; }
.mini-grid .today { color: var(--primary); font-weight: 700; }
.mini-grid .sel { background: var(--primary) !important; color: #fff; }
.month { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: minmax(110px, 1fr); border-left: 1px solid var(--border); border-top: 1px solid var(--border); background: var(--surface); border-radius: 8px; overflow: hidden; flex: 1; }
.month-wd { padding: 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); min-height: auto; }
.month { grid-template-rows: auto; }
.month-day { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 4px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; min-width: 0; overflow: hidden; }
.month-day:hover { background: var(--surface-2); }
.month-day.other { background: var(--surface-2); }
.month-day.other .month-num { opacity: .4; }
.month-day.weekend { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.month-num { font-size: 12px; font-weight: 600; padding: 2px 4px; align-self: flex-start; border-radius: 10px; }
.month-day.today .month-num { background: var(--primary); color: #fff; }
.ev-chip { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--ec); background: color-mix(in srgb, var(--ec) 14%, var(--surface)); border-radius: 4px; padding: 2px 6px; font-size: 12px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.ev-chip.ev-allday { background: var(--ec); color: #fff; border-left-color: rgba(0,0,0,.15); }
.ev-chip:hover { filter: brightness(.95); }
.more-link { border: 0; background: transparent; color: var(--muted); font-size: 11px; text-align: left; cursor: pointer; padding: 0 6px; }
.week { display: flex; flex-direction: column; flex: 1; min-height: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.week-head, .week-allday { display: flex; border-bottom: 1px solid var(--border); padding-right: 12px; }
.week-gutter { width: 56px; flex-shrink: 0; text-align: right; padding-right: 8px; }
.week-dayhead { flex: 1; text-align: center; padding: 6px; display: flex; flex-direction: column; }
.week-dayhead b { font-size: 20px; font-weight: 600; }
.week-dayhead.today { color: var(--primary); }
.week-dayhead.today b { background: var(--primary); color: #fff; border-radius: 50%; width: 34px; height: 34px; line-height: 34px; margin: 0 auto; font-size: 16px; }
.week-allday .week-gutter { padding-top: 6px; }
.week-allday-cell { flex: 1; min-height: 30px; padding: 3px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.week-scroll { flex: 1; overflow-y: scroll; min-height: 300px; }
.week-grid { display: flex; position: relative; }
.hour-label { font-size: 11px; color: var(--muted); transform: translateY(-7px); }
.hour-label:first-child { visibility: hidden; }
.week-col { flex: 1; border-left: 1px solid var(--border); position: relative; min-width: 0; }
.week-col.weekend { background: var(--surface-2); }
.hour-slot { border-bottom: 1px solid var(--border); cursor: pointer; }
.hour-slot:hover { background: var(--primary-soft); }
.ev-block { position: absolute; border: 0; border-left: 4px solid var(--ec); background: color-mix(in srgb, var(--ec) 20%, var(--surface)); border-radius: 6px; padding: 3px 6px; text-align: left; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; gap: 1px; font-size: 12px; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ev-block:hover { z-index: 2; box-shadow: var(--shadow-lg); }
.ev-block b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-block small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-people { display: flex; gap: 2px; margin-top: 2px; }
.now-line { position: absolute; left: 0; right: 0; border-top: 2px solid var(--danger); z-index: 3; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; background: var(--danger); border-radius: 50%; }
.team-cal { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.team-cal table { width: 100%; border-collapse: collapse; min-width: 900px; table-layout: fixed; }
.team-cal th { font-size: 12px; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); }
.team-cal th.today { color: var(--primary); }
.team-cal td { border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); vertical-align: top; padding: 4px; height: 64px; }
.team-cal-name { width: 200px; text-align: left !important; }
td.team-cal-name { display: flex; align-items: center; gap: 8px; height: auto; min-height: 64px; border-left: 0 !important; }
td.team-cal-name span { display: flex; flex-direction: column; min-width: 0; }
.team-cell { cursor: pointer; }
.team-cell:hover { background: var(--surface-2); }
.team-cell > * + * { margin-top: 2px; }
.team-cell.weekend { background: var(--surface-2); }
.away-urlaub { background: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(0, 200, 117, .08) 6px, rgba(0, 200, 117, .08) 12px); }
.away-krank { background: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(226, 68, 92, .08) 6px, rgba(226, 68, 92, .08) 12px); }

/* CRM */
.dtable { width: 100%; border-collapse: collapse; }
.dtable th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.dtable td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.dtable tbody tr { cursor: pointer; }
.dtable tbody tr:hover { background: var(--surface-2); }
.dtable tbody tr:last-child td { border-bottom: 0; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.detail-left { display: flex; flex-direction: column; gap: 16px; }
.kv { display: grid; grid-template-columns: 100px 1fr; gap: 6px 12px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.notes { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.contact-row, .deal-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 6px; color: var(--text); }
.deal-row { cursor: pointer; }
.deal-row:hover { background: var(--surface-2); text-decoration: none; }
.contact-row + .contact-row, .deal-row + .deal-row { border-top: 1px solid var(--border); }
.activity-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.tl-icon { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; flex-shrink: 0; }
.tl-system { opacity: .75; font-size: 13px; }
.deals-kanban .kcol { width: 250px; }

/* Team */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 14px; }
.person-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: var(--shadow); }
.person-card h3 { margin: 6px 0 0; }
.person-card p { margin: 0; }
.person-card.inactive { opacity: .55; }

/* Responsive */
@media (max-width: 1000px) {
  .detail-grid, .item-detail { grid-template-columns: 1fr; }
  .comments { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split-side { width: 220px; }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 90; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .nav-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 80; }
  .menu-toggle { display: block; }
  .topbar { padding: 0 12px; gap: 8px; }
  .online-label, .online-avatars { display: none; }
  .page { padding: 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .split { flex-direction: column; height: auto; min-height: 100%; }
  .split-side { width: 100%; border-right: 0; border-bottom: 1px solid var(--border); max-height: 220px; }
  .chat .split-side { max-height: 160px; }
  .chat.split { height: 100%; }
  .chat-main { min-height: 0; flex: 1; }
  .cal .split-side { max-height: none; }
  .cal .mini-cal, .cat-legend { display: none; }
  .doc-inner { padding: 20px 16px 60px; }
  .doc-title { font-size: 24px; }
  .pbar { grid-template-columns: 110px 1fr 70px; }
  .month { grid-auto-rows: minmax(70px, 1fr); }
  .ev-chip { font-size: 10px; padding: 1px 3px; }
  .dash-grid { grid-template-columns: 1fr; }
  .team-mini { grid-template-columns: 1fr; }
}
.team-cell .ev-chip { white-space: normal; line-height: 1.3; }

/* ---------- Erweiterungen: Anhänge, Profil, Einstellungen, Login ---------- */
.page-narrow { max-width: 860px; }
.page-narrow .card { margin-bottom: 16px; }
.page-narrow h2 { margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.mb { margin-bottom: 16px; }
.sec-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; flex-wrap: wrap; }
.sec-row + .sec-row { border-top: 1px solid var(--border); }
.sec-row p { margin: 4px 0 0; }
.copy-row { display: flex; gap: 8px; margin: 4px 0 10px; }
.copy-row input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; background: var(--surface-2); }
.howto summary { cursor: pointer; color: var(--primary); font-weight: 500; margin: 6px 0; }
.howto li { margin-bottom: 4px; }
.steps { padding-left: 20px; display: flex; flex-direction: column; gap: 10px; margin: 0 0 12px; }
.qr { margin: 10px 0; }
.qr img { border: 1px solid var(--border); border-radius: 8px; background: #fff; padding: 6px; }
.secret { user-select: all; word-break: break-all; }
.code-input { font-size: 22px; letter-spacing: 6px; text-align: center; font-family: ui-monospace, Menlo, monospace; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-ok { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 40%, var(--border)); padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 8px; }
.login-card .center { text-align: center; display: block; }
.attach .card-head-in { margin-bottom: 6px; }
.dropzone { border: 1px dashed var(--border); border-radius: 8px; padding: 8px; min-height: 48px; }
.dropzone p { margin: 6px; }
.upload-progress { height: 4px; background: var(--surface-2); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.upload-progress span { display: block; height: 100%; width: 0; background: var(--primary); transition: width .2s; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.thumb { position: relative; }
.thumb img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); display: block; }
.thumb .icon-btn { position: absolute; top: 2px; right: 2px; background: var(--surface); }
.file-row { display: flex; align-items: center; gap: 8px; padding: 6px 4px; font-size: 13px; flex-wrap: wrap; }
.file-row + .file-row { border-top: 1px solid var(--border); }
.file-row a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-files { margin-top: 30px; }
.msg-files { margin-top: 4px; max-width: 520px; }
.msg-files .thumb img { width: auto; height: auto; max-width: 260px; max-height: 200px; }
.msg-files .file-row { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; margin-top: 4px; }
.pending-files { padding: 0 20px; display: flex; gap: 6px; flex-wrap: wrap; }
.pending-chip { background: var(--primary-soft); color: var(--primary); border-radius: 14px; padding: 2px 4px 2px 10px; font-size: 12px; margin-bottom: 6px; display: inline-flex; align-items: center; gap: 2px; }
.attach-btn { height: 42px; width: 44px; padding: 0; font-size: 18px; flex-shrink: 0; }
.chat-main.drop-hover { outline-offset: -6px; }
.chan[role=button] { cursor: pointer; }
.lex-stats { display: flex; gap: 24px; margin-bottom: 10px; }
.lex-stats div { display: flex; flex-direction: column; }
.lex-stats b { font-size: 18px; }
.dtable tbody tr.no-click { cursor: default; }

/* ---------- Datenschutz ---------- */
.checklist { display: flex; flex-direction: column; }
.checklist > div { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); }
.checklist > div:first-child { border-top: 0; }
.checklist .grow { display: flex; flex-direction: column; gap: 2px; }
.chk { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; color: #fff; font-size: 13px; }
.chk.ok { background: var(--ok); }
.chk.todo { background: var(--warn); }
.todo-list li { margin-bottom: 6px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; }
.preview-box { border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-top: 12px; }
.unit-input { display: flex; align-items: center; gap: 8px; }
.unit-input input { width: 100px; }
.unit-input span { color: var(--muted); font-weight: 400; }
.form label small { font-weight: 400; }
.nowrap { white-space: nowrap; }
.warn-row td { background: color-mix(in srgb, var(--danger) 6%, transparent); }
.danger-zone { border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--border)); border-radius: 8px; padding: 10px 12px; }
.danger-zone summary { cursor: pointer; color: var(--danger); font-weight: 600; font-size: 13px; }
.danger-zone[open] { display: flex; flex-direction: column; gap: 10px; }
.privacy-modal { max-height: 60vh; overflow-y: auto; font-size: 14px; padding-right: 6px; }

/* ---------- Status, Ziele, Mitarbeiter-Profil ---------- */
.presence.st-online, .sdot.st-online { background: #00c875; }
.presence.st-meeting, .sdot.st-meeting { background: #e2445c; }
.presence.st-pause, .sdot.st-pause { background: #fdab3d; }
.presence.st-away, .sdot.st-away { background: #f2c200; }
.presence.st-offline, .sdot.st-offline { background: #9aa1b1; }
.sdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.member-status { margin: 4px 0; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.member-status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #9aa1b1; }
.st-text-online::before { background: #00c875; } .st-text-meeting::before { background: #e2445c; }
.st-text-pause::before { background: #fdab3d; } .st-text-away::before { background: #f2c200; }
.person-link { color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.person-link:hover { text-decoration: none; }
.person-link:hover h3 { color: var(--primary); }
.person-status { color: var(--muted); }
.plain-link { color: inherit; }
.goals-card { margin-bottom: 18px; }
.goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 20px; padding: 10px 16px 14px; }
.goal { padding: 10px 6px; border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.goal:hover, .goal:focus { background: var(--surface-2); outline: none; }
.goal-top { display: flex; gap: 8px; align-items: flex-start; }
.health { font-size: 11px; font-weight: 700; color: var(--hc); border: 1px solid var(--hc); border-radius: 10px; padding: 0 7px; white-space: nowrap; }
.goal-bar { position: relative; height: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; }
.goal-bar span { display: block; height: 100%; background: var(--primary); border-radius: 5px; }
.goal-bar i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .45; }
.goal-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.goal-pct { color: var(--text); font-size: 13px; font-variant-numeric: tabular-nums; }
.goal-meta span { display: inline-flex; align-items: center; gap: 4px; }
.prio-chip { font-size: 11px; font-weight: 700; color: var(--pc); border: 1px solid var(--pc); border-radius: 10px; padding: 0 7px; white-space: nowrap; }
.todo-row { gap: 10px; }
.todo-check { width: 18px; height: 18px; cursor: pointer; flex-shrink: 0; }
.todo-link { color: var(--text); display: flex; flex-direction: column; }
.todo-link:hover { text-decoration: none; }
.todo-done { opacity: .45; }
.todo-done b { text-decoration: line-through; }
.team-now { padding: 6px 8px; display: flex; flex-direction: column; }
.team-now-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; color: var(--text); }
.team-now-row:hover { background: var(--surface-2); text-decoration: none; }
.team-now-row .grow { display: flex; flex-direction: column; min-width: 0; }
.team-now-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-head { display: flex; gap: 20px; align-items: center; padding: 20px; margin-bottom: 16px; flex-wrap: wrap; }
.member-head p { margin: 2px 0; }
.member-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.member-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.member-side { display: flex; flex-direction: column; gap: 16px; }
.member-side .goals { grid-template-columns: 1fr; }
.prio-group + .prio-group { border-top: 1px solid var(--border); }
.prio-head { padding: 10px 16px 0; font-weight: 700; color: var(--pc); display: flex; align-items: center; gap: 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 1000px) { .member-grid { grid-template-columns: 1fr; } }

/* ---------- Zeiterfassung ---------- */
.timer-chip { display: flex; align-items: center; gap: 8px; background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--border)); border-radius: 18px; padding: 3px 4px 3px 12px; font-size: 13px; max-width: 320px; }
.timer-label { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.timer-time { font-variant-numeric: tabular-nums; }
.rec { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); flex-shrink: 0; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .rec { animation: none; } }
.timer-card { margin-bottom: 16px; }
.timer-form { display: flex; gap: 8px; flex-wrap: wrap; }
.timer-form input { flex: 2; min-width: 200px; }
.timer-form select { flex: 1; min-width: 150px; width: auto; }
.timer-running { display: flex; align-items: center; gap: 12px; }
.timer-running .grow { display: flex; flex-direction: column; }
.time-day { border-bottom: 1px solid var(--border); padding: 8px 16px; }
.time-day.today { background: color-mix(in srgb, var(--primary) 5%, transparent); }
.time-day-head { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.time-row { display: flex; gap: 12px; align-items: center; padding: 6px 4px; border-radius: 6px; cursor: pointer; }
.time-row:hover { background: var(--surface-2); }
.time-row .grow { display: flex; flex-direction: column; min-width: 0; }
.time-range { font-size: 12px; width: 92px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.time-dur { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Aufgaben: Unteraufgaben, Zeit, Badges ---------- */
.mini-badge { font-size: 11px; color: var(--muted); border: 1px solid var(--border); border-radius: 8px; padding: 0 5px; white-space: nowrap; flex-shrink: 0; }
.mini-badge.done { color: var(--ok); border-color: var(--ok); }
.item-detail { grid-template-columns: 1.3fr 1fr; }
.item-extra { grid-column: 1; display: flex; flex-direction: column; gap: 16px; }
.checklist-box h3, .time-box h3 { margin-bottom: 6px; }
.cl-progress { height: 5px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.cl-progress span { display: block; height: 100%; background: var(--ok); transition: width .2s; }
.cl-list { list-style: none; margin: 0 0 6px; padding: 0; }
.cl-list li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.cl-list li.done .cl-text { text-decoration: line-through; color: var(--muted); }
.cl-text { border: 1px solid transparent; background: transparent; padding: 4px 6px; }
.cl-text:hover { border-color: var(--border); }
.cl-add { display: flex; gap: 6px; }
.cl-add input { flex: 1; }
.cl-add select { width: 110px; }
.time-box { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.time-box p { margin: 0; }
.guest-ro select:disabled, .guest-ro input:disabled { opacity: .7; }
.recur-hint { margin: 0; }
.sub-head { padding: 8px 16px 0; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Zeitleiste (Gantt) ---------- */
.timeline { display: flex; flex-direction: column; gap: 10px; }
.tl-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.tl-grid { display: grid; grid-template-columns: 240px calc(var(--dw) * var(--days)); min-width: max-content; }
.tl-head { position: sticky; top: 0; background: var(--surface); z-index: 2; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.tl-names { padding: 8px 10px; position: sticky; left: 0; z-index: 3; display: flex; align-items: flex-end; font-weight: 600; }
.tl-days { display: flex; }
.tl-day { width: var(--dw); text-align: center; display: flex; flex-direction: column; justify-content: flex-end; padding: 4px 0; border-left: 1px solid var(--border); }
.tl-day b { font-size: 10px; color: var(--text); }
.tl-day.we { background: var(--surface-2); }
.tl-day.today span { background: var(--primary); color: #fff; border-radius: 10px; margin: 0 3px; }
.tl-group { grid-column: 1; position: sticky; left: 0; background: var(--surface); z-index: 1; padding: 8px 10px 4px; font-weight: 700; color: var(--gc); font-size: 13px; border-top: 1px solid var(--border); }
.tl-group-fill { border-top: 1px solid var(--border); }
.tl-name { grid-column: 1; position: sticky; left: 0; z-index: 1; background: var(--surface); border: 0; text-align: left; display: flex; align-items: center; gap: 6px; padding: 0 10px; height: 36px; cursor: pointer; font-size: 13px; color: var(--text); border-top: 1px solid var(--border); }
.tl-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-name:hover { color: var(--primary); }
.tl-row { position: relative; height: 36px; display: flex; border-top: 1px solid var(--border); }
.tl-row > i { width: var(--dw); flex-shrink: 0; border-left: 1px solid var(--border); }
.tl-row > i.we { background: var(--surface-2); }
.tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger); opacity: .6; pointer-events: none; }
.tl-bar { position: absolute; top: 6px; height: 24px; border-radius: 6px; color: #fff; font-size: 12px; font-weight: 600; display: flex; align-items: center; padding: 0 8px; cursor: grab; overflow: hidden; touch-action: none; box-shadow: 0 1px 2px rgba(0,0,0,.15); user-select: none; }
.tl-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.tl-bar.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.tl-bar.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tl-bar:active { cursor: grabbing; }
.tl-handle { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; background: rgba(255,255,255,.25); }
.tl-undated { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ---------- Wiki: Anwesenheit & Versionen ---------- */
.viewers { display: flex; gap: 2px; }
.viewer { position: relative; }
.viewer.editing .avatar { box-shadow: 0 0 0 2px var(--warn); }
.viewer i { position: absolute; right: -4px; bottom: -4px; font-size: 10px; font-style: normal; }
.versions { display: grid; grid-template-columns: 260px 1fr; gap: 16px; min-height: 360px; }
.version-list { max-height: 60vh; overflow-y: auto; border-right: 1px solid var(--border); padding-right: 8px; }
.ver { width: 100%; border: 0; background: transparent; text-align: left; border-radius: 6px; cursor: pointer; }
.ver.on { background: var(--primary-soft); }
.ver .grow { display: flex; flex-direction: column; }
.version-preview { max-height: 60vh; overflow-y: auto; }
@media (max-width: 760px) { .versions { grid-template-columns: 1fr; } .version-list { border-right: 0; max-height: 200px; } }

/* ---------- Rollen ---------- */
.tag-owner { color: #b7791f; border-color: #e6b450; }
.tag-guest { color: var(--primary); border-color: var(--primary); }
.owner-box { display: flex; flex-direction: column; gap: 6px; }
.grid-divider { grid-column: 1 / -1; margin: 12px 0 0; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.member-pick { display: flex; flex-wrap: wrap; gap: 6px 14px; width: 100%; padding: 6px 0; }
.app-pw { font-size: 18px; letter-spacing: 1px; }
.item-detail .comments { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 1000px) { .item-detail .comments, .item-extra { grid-column: auto; grid-row: auto; } }

/* ================= Ausbau: Glocke, Chat-Threads, Wiki-Editor, Werkzeuge, Berichte ================= */
.link-btn { border: 0; background: none; color: var(--primary); cursor: pointer; padding: 0; font-size: inherit; }
.link-btn:hover { text-decoration: underline; }
.btn.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 10px; }
.warn-box { background: color-mix(in srgb, var(--warn) 14%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 50%, transparent); border-radius: 8px; padding: 8px 10px; }
.check-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; }
.member-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Topbar-Knöpfe & Glocke */
.topbar-btn { font-size: 18px; position: relative; padding: 6px 8px; }
.bell-wrap { position: relative; }
.bell-badge { position: absolute; top: -2px; right: -4px; }
.bell-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(380px, calc(100vw - 24px)); max-height: 70vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 60; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.bell-list { overflow-y: auto; }
.bell-item { display: flex; gap: 10px; padding: 10px 14px; color: var(--text); border-bottom: 1px solid var(--border); align-items: flex-start; }
.bell-item:hover { background: var(--surface-2); text-decoration: none; }
.bell-item.unread { background: var(--primary-soft); }
.bell-item .grow { display: flex; flex-direction: column; gap: 2px; }
.bell-title { font-weight: 600; font-size: 13px; }
.bell-body { color: var(--text); opacity: .85; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bell-emoji { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); font-size: 15px; }
.bell-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex-shrink: 0; }

/* @-Auswahl */
.mention-box { position: fixed; z-index: 400; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 4px; min-width: 220px; }
.mention-box button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 6px 8px; border-radius: 6px; cursor: pointer; text-align: left; }
.mention-box button.sel, .mention-box button:hover { background: var(--primary-soft); }

/* Chat: Reaktionen & Threads */
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.reaction { border: 1px solid var(--border); background: var(--surface-2); border-radius: 12px; padding: 1px 8px; cursor: pointer; font-size: 13px; }
.reaction b { font-size: 11px; font-weight: 600; color: var(--muted); }
.reaction.mine { border-color: var(--primary); background: var(--primary-soft); }
.react-pop { position: fixed; z-index: 300; display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 4px 6px; }
.react-pop button { border: 0; background: none; font-size: 20px; cursor: pointer; border-radius: 8px; padding: 2px 4px; }
.react-pop button:hover { background: var(--surface-2); transform: scale(1.15); }
.thread-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; border: 1px solid transparent; background: none; border-radius: 8px; padding: 3px 6px; cursor: pointer; color: var(--primary); }
.thread-link:hover { border-color: var(--border); background: var(--surface); }
.thread-avs { display: inline-flex; }
.thread-avs .avatar { margin-right: -4px; border: 2px solid var(--surface); }
.thread-panel { width: 360px; flex-shrink: 0; border-left: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
.thread-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.thread-msgs { flex: 1; overflow-y: auto; padding: 10px; }
.thread-sep { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; margin: 8px 0; }
.thread-sep::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.thread-composer { border-top: 1px solid var(--border); }
.msg.flash { animation: flash 2.5s ease-out; }
@keyframes flash { 0%, 40% { background: color-mix(in srgb, var(--warn) 30%, transparent); } 100% { background: transparent; } }
@media (max-width: 1000px) {
  .chat.with-thread .chat-main { display: none; }
  .thread-panel { width: auto; flex: 1; }
}

/* Wiki: visueller Editor & Kommentare */
.rich-toolbar { position: sticky; top: 0; z-index: 2; background: var(--surface); }
.rich-editor { min-height: 400px; outline: none; padding: 12px 2px; border-radius: 8px; }
.rich-editor:focus { box-shadow: 0 0 0 2px var(--primary-soft); }
.rich-editor:empty::before { content: attr(data-placeholder); color: var(--muted); }
.rich-editor ul.todo li input { pointer-events: auto; }
.doc-comments { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 16px; }
.doc-comments .comment.resolved { opacity: .65; }
.c-quote { margin: 4px 0; padding: 2px 8px; border-left: 3px solid var(--warn); color: var(--muted); font-size: 12px; }
.c-actions { display: flex; gap: 12px; font-size: 12px; margin-top: 2px; }
.c-done summary { cursor: pointer; margin: 8px 0; }

/* Boards: Abhängigkeiten, Vorlagen */
.mini-badge.warn { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.deps-box h3 { margin-top: 4px; }
.dep-list { list-style: none; margin: 0 0 8px; padding: 0; }
.dep-list li { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 13px; }
.dep-list li.done a { text-decoration: line-through; color: var(--muted); }
.tl-grid { position: relative; }
.tl-arrows { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.tl-arrows path { fill: none; stroke: var(--muted); stroke-width: 1.5; pointer-events: stroke; }
.tl-arrows path.conflict { stroke: var(--danger); stroke-dasharray: 4 3; }
.tl-arrows .arr-head { fill: var(--muted); stroke: none; }
.tl-arrows .arr-head.conflict { fill: var(--danger); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.tpl-card { position: relative; display: flex; flex-direction: column; gap: 4px; text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 14px; cursor: pointer; }
.tpl-card:not(.static):hover { border-color: var(--primary); box-shadow: var(--shadow); }
.tpl-card.static { cursor: default; }
.tpl-icon { font-size: 26px; }
.tpl-del { position: absolute; top: 6px; right: 6px; }

/* CRM: Angebot/Rechnung */
.voucher-form .seg label { padding: 6px 12px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.vhead { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; }
.vrow { display: grid; grid-template-columns: 1fr 70px 80px 100px 72px 28px; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.vrow .vdesc { grid-column: 1 / -1; font-size: 12px; }
.vsum { text-align: right; padding: 6px 0; }
@media (max-width: 760px) { .vrow { grid-template-columns: 1fr 1fr 1fr; } .vrow input[name=name] { grid-column: 1 / -1; } }

/* KI */
.ai-loading { padding: 24px 0; color: var(--muted); }
.ai-result { max-height: 60vh; overflow-y: auto; }
.ai-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 12px; }
.ai-card { display: flex; flex-direction: column; gap: 4px; text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 14px; cursor: pointer; }
.ai-card:hover { border-color: var(--primary); }

/* Werkzeuge */
.switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--border); border-radius: 11px; cursor: pointer; transition: background .15s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.auto-form fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.auto-form legend { font-weight: 600; padding: 0 4px; }
.code-box { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.file-btn { display: inline-flex; width: fit-content; cursor: pointer; }
.form-card { margin-bottom: 10px; }

/* Berichte */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi small { color: var(--muted); }
.kpi b { font-size: 26px; font-weight: 700; color: var(--chart-ink); font-variant-numeric: tabular-nums; }
.kpi b.overdue { color: var(--danger); }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 16px; }
.chart-card { min-width: 0; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.chart-head h3 { margin: 0; color: var(--chart-ink); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--chart-ink-2); margin-bottom: 6px; align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.legend.ramp { gap: 2px; }
.legend.ramp i { width: 18px; border-radius: 2px; }
.legend.ramp span { margin: 0 6px; }
.line-chart { width: 100%; height: auto; display: block; overflow: visible; }
.line-chart .grid { stroke: var(--chart-grid); stroke-width: 1; }
.line-chart .axis { stroke: var(--chart-axis); stroke-width: 1; }
.line-chart .axis-t { fill: var(--chart-ink-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.line-chart .end-label { fill: var(--chart-ink); font-size: 12px; font-weight: 600; }
.line-chart .ring { stroke: var(--surface); stroke-width: 2; }
.line-chart .xhair { stroke: var(--chart-axis); stroke-width: 1; stroke-dasharray: 3 3; }
.hbars { display: flex; flex-direction: column; gap: 2px; }
.hbar-row { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; gap: 10px; align-items: center; padding: 4px 2px; border-radius: 6px; cursor: default; }
.hbar-row:hover { background: var(--surface-2); }
.hbar-label { font-size: 13px; color: var(--chart-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 14px; position: relative; }
.hbar-fill { position: absolute; left: 0; top: 0; bottom: 0; min-width: 2px; border-radius: 0 4px 4px 0; }
.hbar-val { font-size: 13px; font-weight: 600; color: var(--chart-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-tip { position: fixed; z-index: 500; pointer-events: none; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 8px 10px; font-size: 12px; line-height: 1.5; }
.tip-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
@media (max-width: 760px) { .hbar-row { grid-template-columns: 1fr auto; } .hbar-track { grid-column: 1 / -1; grid-row: 2; } }

/* Mindmaps */
.mm-page { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.mm-top { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.mm-title { border: 1px solid transparent; background: none; font-size: 18px; font-weight: 700; width: auto; min-width: 140px; max-width: 420px; padding: 4px 8px; }
.mm-title:hover { border-color: var(--border); }
.mm-tools { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--border); background: var(--surface); overflow-x: auto; }
.mm-tools .btn { white-space: nowrap; }
.mm-canvas { position: relative; flex: 1; min-height: 420px; overflow: hidden; background: var(--bg); background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 22px 22px; outline: none; touch-action: none; }
.mm-canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--primary-soft); }
.mm-canvas svg { width: 100%; height: 100%; display: block; cursor: grab; user-select: none; }
.mm-canvas svg.dragging { cursor: grabbing; }
.mm-node { cursor: pointer; }
.mm-node.drop rect:last-of-type { stroke: var(--primary); stroke-width: 3; stroke-dasharray: 5 3; }
.mm-edit { position: absolute; z-index: 5; resize: none; border: 2px solid var(--primary); border-radius: 10px; padding: 6px 10px; text-align: center; font-family: inherit; box-shadow: var(--shadow-lg); background: var(--surface); color: var(--text); }
.mm-pal button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); font-size: 12px; }
@media (max-width: 760px) { .mm-canvas { min-height: 60vh; } .mm-title { font-size: 16px; max-width: 60vw; } }

/* Moodboards */
.mb-page { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.mb-sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; flex-shrink: 0; }
.mb-hint { white-space: nowrap; }
.mb-canvas { position: relative; flex: 1; min-height: 420px; overflow: hidden; outline: none; touch-action: none; cursor: grab; background-color: var(--bg); background-image: radial-gradient(var(--border) 1.2px, transparent 1.2px); }
.mb-canvas:active { cursor: grabbing; }
.mb-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.mb-item { position: absolute; cursor: move; user-select: none; box-sizing: border-box; }
.mb-item.sel { outline: 2px solid var(--primary); outline-offset: 3px; }
.mb-handle { position: absolute; right: -9px; bottom: -9px; width: 16px; height: 16px; background: var(--surface); border: 2px solid var(--primary); border-radius: 4px; cursor: nwse-resize; z-index: 2; }
.mb-t-image img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,.15); pointer-events: none; }
.mb-caption { position: absolute; left: 0; right: 0; top: 100%; margin-top: 6px; font-size: 13px; color: var(--muted); text-align: center; }
.mb-t-note { padding: 12px; border-radius: 4px; box-shadow: 0 3px 10px rgba(0,0,0,.12); color: #1f2430; font-size: 15px; }
.mb-t-shape { padding: 12px 14px; border-radius: 4px; color: #1f2430; }
.mb-t-shape.round { border-radius: 16px; }
.mb-shape-label { font-weight: 600; font-size: 14px; color: #4a5163; }
.mb-text { white-space: pre-wrap; word-break: break-word; width: 100%; height: 100%; overflow: hidden; outline: none; line-height: 1.25; }
.mb-text[contenteditable=true] { cursor: text; user-select: text; overflow: auto; background: rgba(255,255,255,.4); }
.mb-t-color { background: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.12); overflow: hidden; display: flex; flex-direction: column; color: #1f2430; }
.mb-swatch { flex: 1; }
.mb-color-label { padding: 6px 8px; font-size: 12px; display: flex; flex-direction: column; line-height: 1.3; }
.mb-color-label span { font-family: ui-monospace, Menlo, Consolas, monospace; color: #6b7385; }
.mb-link { position: relative; height: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 36px 12px 42px; display: flex; flex-direction: column; justify-content: center; box-shadow: var(--shadow); overflow: hidden; }
.mb-link b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-link small { color: var(--muted); }
.mb-link-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 18px; }
.mb-open { position: absolute; right: 8px; top: 8px; font-size: 16px; cursor: pointer; }
.mb-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; flex-shrink: 0; }
.mb-dot.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.mb-colorpick input { width: 0; height: 0; opacity: 0; position: absolute; }
.mb-drop-hint { display: none; position: absolute; inset: 20px; border: 3px dashed var(--primary); border-radius: 16px; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; color: var(--primary); pointer-events: none; background: color-mix(in srgb, var(--primary) 6%, transparent); }
.mb-canvas.drop-hover .mb-drop-hint, .mb-canvas.empty .mb-drop-hint { display: flex; }
.mb-canvas.empty:not(.drop-hover) .mb-drop-hint { border-color: var(--border); color: var(--muted); background: none; }
.mb-canvas.empty:not(.drop-hover) .mb-drop-hint::after { content: ' – oder oben „Notiz“, „Farbe“ … wählen'; font-weight: 400; font-size: 15px; margin-left: 6px; }
#mb-sel-tools { flex-wrap: nowrap; }
.mb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.mb-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); }
.mb-card:hover { box-shadow: var(--shadow); text-decoration: none; border-color: var(--primary); }
.mb-thumb { height: 130px; display: grid; grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); background: var(--surface-2); place-items: center; font-size: 40px; overflow: hidden; }
.mb-thumb img { width: 100%; height: 130px; object-fit: cover; }
.mb-thumb-colors { display: flex; height: 8px; }
.mb-thumb-colors i { flex: 1; }
.pad-sm { padding: 10px 12px; }
@media (max-width: 760px) { .mb-canvas { min-height: 60vh; } .mb-hint { display: none; } }

/* Meeting-Links */
.btn-join { background: #0e9f6e; border-color: #0e9f6e; color: #fff !important; font-weight: 600; white-space: nowrap; }
.btn-join:hover { background: #0b8a5f; text-decoration: none; }
.join-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, #0e9f6e 10%, transparent); overflow: hidden; }
.join-bar small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.meet-row { display: flex; align-items: center; gap: 8px; }
.meet-tag { white-space: nowrap; }
.list li:has(> .btn-join) { display: flex; align-items: center; padding-right: 12px; }
.list li:has(> .btn-join) > .list-row { flex: 1; min-width: 0; }

/* Social-Media-Kalender */
.sp-month { min-width: 150px; text-align: center; font-size: 16px; }
.sp-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.sp-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.sp-layout { display: grid; grid-template-columns: 1fr 260px; gap: 16px; align-items: start; }
.sp-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--border); gap: 1px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.sp-wd { background: var(--surface-2); padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.sp-day { background: var(--surface); min-height: 118px; padding: 4px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sp-day.other { background: var(--surface-2); }
.sp-day.other .sp-day-head span { opacity: .45; }
.sp-day.we:not(.other) { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.sp-day.today .sp-day-head span { background: var(--primary); color: #fff; border-radius: 10px; padding: 0 7px; }
.sp-day.drop-hover, .sp-ideas.drop-hover { outline: 2px dashed var(--primary); outline-offset: -3px; background: var(--primary-soft); }
.sp-day-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; padding: 0 2px; }
.sp-add { border: 0; background: none; color: var(--muted); cursor: pointer; opacity: 0; font-size: 16px; line-height: 1; padding: 0 4px; border-radius: 4px; }
.sp-day:hover .sp-add, .sp-add:focus { opacity: 1; }
.sp-add:hover { background: var(--primary-soft); color: var(--primary); }
.sp-chip { position: relative; display: flex; gap: 6px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--sc); border-radius: 6px; padding: 3px 14px 3px 5px; cursor: pointer; font-size: 12px; min-width: 0; }
.sp-chip:hover { box-shadow: var(--shadow); }
.sp-chip.dragging { opacity: .4; }
.sp-chip img { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.sp-chip-body { display: flex; flex-direction: column; min-width: 0; }
.sp-ch { font-size: 11px; white-space: nowrap; }
.sp-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-chip .sp-dot { position: absolute; right: 4px; top: 5px; width: 7px; height: 7px; }
.sp-ideas { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 6px; min-height: 200px; position: sticky; top: 12px; }
.sp-channels { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-list .dtable tr { cursor: pointer; }
@media (max-width: 1000px) { .sp-layout { grid-template-columns: 1fr; } .sp-ideas { position: static; } }
@media (max-width: 760px) {
  .sp-month-grid { grid-template-columns: 1fr; }
  .sp-wd, .sp-day.other:not(:has(.sp-chip)) { display: none; }
  .sp-day { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .sp-day:not(:has(.sp-chip)):not(.today) { display: none; }
  .sp-day-head { width: 100%; }
  .sp-add { opacity: 1; }
  .sp-legend { display: none; }
}

/* Ablage */
.ablage .tree-row small { margin-left: auto; padding-right: 6px; }
.ablage .tree-row.drop-hover { background: var(--primary-soft); outline: 2px dashed var(--primary); }
.ab-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ab-head .crumbs { font-size: 16px; font-weight: 600; }
.ab-head #ab-q { width: 220px; }
.ab-drop { position: relative; min-height: 220px; }
.ab-drop-hint { display: none; position: absolute; inset: 8px; border: 3px dashed var(--primary); border-radius: 12px; align-items: center; justify-content: center; font-weight: 600; color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.ab-drop.drop-hover .ab-drop-hint { display: flex; }
.ab-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; padding: 12px; border-bottom: 1px solid var(--border); }
.ab-folder { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); }
.ab-folder span { font-size: 24px; }
.ab-folder:hover, .ab-folder.drop-hover { border-color: var(--primary); background: var(--primary-soft); text-decoration: none; }
.ab-table tr { cursor: pointer; }
.ab-name { display: inline-flex; align-items: center; gap: 6px; }
.ab-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; }
.ab-preview { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.ab-preview img { max-width: 100%; max-height: 420px; object-fit: contain; border-radius: 8px; background: var(--surface-2); }
.ab-big-icon { font-size: 80px; text-align: center; padding: 40px 0; background: var(--surface-2); border-radius: 12px; }
.ab-decide { border: 2px solid #e0a100; border-radius: 10px; padding: 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; background: color-mix(in srgb, #e0a100 8%, transparent); }
.ab-versions { max-height: 180px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }
.ab-timeline { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.ab-appr { display: flex; gap: 8px; align-items: flex-start; }
.ab-appr.ersetzt { opacity: .55; }
.ok { color: #00a86b; }
.storage { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.storage.warn .progress span { background: var(--danger); }
.mb { margin-bottom: 16px; }
@media (max-width: 760px) { .ab-detail { grid-template-columns: 1fr; } .ab-head #ab-q { width: 100%; } }
