/* GROB GM TONAWANDA · Aufgaben-Manager · v2 (monday-inspiriert) · Hell & Dunkel */
:root, [data-theme="light"] {
  --bg: #f6f7fb; --bg-elev: #ffffff; --surface: #ffffff; --surface-2: #f5f6f8; --hover: #f0f3ff;
  --border: #e6e9ef; --border-strong: #d0d4e4;
  --text: #323338; --text-2: #4b4e69; --muted: #676879;
  --accent: #0073ea; --accent-strong: #0060c2; --accent-ink: #ffffff; --accent-soft: #e5f1ff;
  --accent2: #a25ddc; --accent2-soft: rgba(162,93,220,.12);
  --ok: #00a35c; --warn: #d97f0b; --bad: #d83a52;
  --ok-soft: rgba(0,200,117,.12); --warn-soft: rgba(253,171,61,.16); --bad-soft: rgba(226,68,92,.10); --neutral-soft: rgba(103,104,121,.10);
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.18);
  --scrim: rgba(41,47,76,.38);
  --row-h: 40px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #181b34; --bg-elev: #1f2340; --surface: #292f4c; --surface-2: #232845; --hover: #30365a;
  --border: #3e4469; --border-strong: #4f5680;
  --text: #e6e8f0; --text-2: #c5c7d4; --muted: #9699a6;
  --accent: #4d9cf8; --accent-strong: #0073ea; --accent-ink: #ffffff; --accent-soft: rgba(77,156,248,.16);
  --accent2: #c18bea; --accent2-soft: rgba(193,139,234,.16);
  --ok: #33d391; --warn: #fdbc64; --bad: #f2667d;
  --ok-soft: rgba(0,200,117,.16); --warn-soft: rgba(253,171,61,.16); --bad-soft: rgba(226,68,92,.18); --neutral-soft: rgba(197,199,212,.10);
  --shadow: 0 1px 2px rgba(0,0,0,.25), 0 2px 8px rgba(0,0,0,.2);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.5);
  --scrim: rgba(8,10,24,.55);
  color-scheme: dark;
}
:root { --r: 10px; --r-sm: 6px; --font: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { display: block; }

/* Layout: Kopfzeile + Tabs + Seite */
.app { display: flex; flex-direction: column; height: 100vh; }
.topbar { height: 64px; flex: none; display: flex; align-items: center; gap: 20px; padding: 0 24px; background: var(--bg-elev); border-bottom: 1px solid var(--border); position: relative; z-index: 30; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand-text { line-height: 1.2; }
.brand-title { font-weight: 700; font-size: 15px; letter-spacing: .06em; white-space: nowrap; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.tabbar { flex: none; display: flex; align-items: flex-end; gap: 12px; padding: 0 24px; background: var(--bg-elev); border-bottom: 1px solid var(--border); position: relative; z-index: 20; }
.nav { display: flex; align-items: flex-end; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav-sep { width: 1px; height: 20px; background: var(--border); margin: 0 10px 12px; flex: none; }
.nav-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border: 0; background: none; color: var(--muted); cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; border-radius: var(--r-sm) var(--r-sm) 0 0; }
.nav-btn svg { width: 17px; height: 17px; }
.nav-btn:hover { color: var(--text); background: var(--hover); }
.nav-btn.active { color: var(--accent); }
.nav-btn.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.nav-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.sidebar-foot { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); padding: 0 0 14px; white-space: nowrap; }
.sync-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.search-wrap { position: relative; flex: 1; max-width: 440px; margin-left: auto; }
.search-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-ico svg { width: 16px; height: 16px; }
.topbar .search-wrap input[type=search] { width: 100%; height: 36px; padding: 0 12px 0 36px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface-2); outline: none; }
.topbar .search-wrap input[type=search]:focus { border-color: var(--accent); background: var(--surface); }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r-sm); border: 1px solid transparent; background: none; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.lang-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.bell-count { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.bell-wrap, .user-wrap { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 4px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.user-btn:hover { border-color: var(--border-strong); }
.user-btn .ub-name { font-weight: 600; font-size: 13px; }
.popover { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg); z-index: 50; }
.bell-panel { width: 360px; }
.user-menu { width: 240px; padding: 8px; }
.pop-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.pop-foot { padding: 8px 16px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--border); }
.bell-list { max-height: 360px; overflow-y: auto; }
.bell-item { display: flex; gap: 12px; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--border); font-size: 13px; }
.bell-item:hover { background: var(--hover); }
.bell-item .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: transparent; }
.bell-item.unread .dot { background: var(--accent); }
.bell-item:not(.unread) { color: var(--muted); }
.bell-item .when { font-size: 11px; color: var(--muted); margin-top: 2px; }
.um-head { padding: 8px 8px 12px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.um-head .muted { font-size: 12px; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; height: 36px; padding: 0 8px; border: 0; border-radius: var(--r-sm); background: none; cursor: pointer; text-align: left; }
.menu-item:hover { background: var(--hover); }
.menu-item svg { width: 16px; height: 16px; color: var(--muted); }

.page { flex: 1; overflow-y: auto; padding: 28px 32px 56px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.page-sub { margin: 2px 0 0; color: var(--muted); }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar .spacer { flex: 1; }
.groupby { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.groupby select { height: 32px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.fchip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px 0 12px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; border: 0; cursor: pointer; }
.fchip svg { width: 12px; height: 12px; }
.count-pill { min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; padding: 0 5px; }
.filter-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px 16px; padding: 16px; margin: -8px 0 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); }
.filter-panel label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }

/* Controls */
select, input:not([type=checkbox]):not([type=color]), textarea { height: 36px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); outline: none; }
textarea { height: auto; min-height: 88px; padding: 8px 12px; resize: vertical; line-height: 1.5; }
select:focus, input:focus, textarea:focus { border-color: var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent-strong); border-color: transparent; color: #fff; }
[data-theme="dark"] .btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.link { background: none; border: 0; color: var(--muted); padding: 0 8px; }
.btn.link:hover { color: var(--text); }
.btn.danger { color: var(--bad); background: transparent; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.xs { height: 28px; padding: 0 8px; font-size: 12px; }
.btn.block { width: 100%; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.field > input, .field > select, .field > textarea { font-size: 14px; font-weight: 400; color: var(--text); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.note { font-size: 12px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px; margin-top: 16px; line-height: 1.6; }
.muted { color: var(--muted); } .tiny { font-size: 12px; }
.section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 24px 0 8px; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--neutral-soft); color: var(--text-2); white-space: nowrap; }
.st-Offen { background: var(--neutral-soft); color: var(--text-2); }
.st-InArbeit { background: var(--accent-soft); color: var(--accent); }
.st-Erledigt { background: var(--ok-soft); color: var(--ok); }
.st-Blockiert { background: var(--warn-soft); color: var(--warn); }
.prio { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.prio i { width: 8px; height: 8px; border-radius: 2px; background: var(--muted); }
.prio-Kritisch i { background: var(--bad); } .prio-Hoch i { background: var(--warn); } .prio-Mittel i { background: var(--accent2); } .prio-Niedrig i { background: var(--border-strong); }
.chip.pool { background: var(--accent2-soft); color: var(--accent2); }
.team-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.team-tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--tc, var(--muted)); flex: none; }
.chip.admin { background: var(--accent2-soft); color: var(--accent2); height: 20px; font-size: 11px; }
.due-late { color: var(--bad) !important; font-weight: 600; }

/* Cards & panels */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.panel h3 { margin: 0; font-size: 14px; font-weight: 650; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); cursor: pointer; }
.kpi:hover { border-color: var(--border-strong); }
.kpi .label { font-size: 12px; font-weight: 600; color: var(--muted); }
.kpi .value { font-size: 28px; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; }
.kpi.accent .value { color: var(--accent); } .kpi.bad .value { color: var(--bad); } .kpi.ok .value { color: var(--ok); }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.team-row { display: grid; grid-template-columns: 170px minmax(80px, 1fr) 210px; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); cursor: pointer; }
.team-row:first-of-type { border-top: 0; }
.team-row:hover .tr-name { color: var(--accent); }
.tr-name { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.tr-name i { width: 10px; height: 10px; border-radius: 3px; background: var(--tc); }
.stack { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--neutral-soft); }
.stack span { display: block; height: 100%; }
.stack .s-open { background: var(--border-strong); } .stack .s-work { background: var(--accent); } .stack .s-block { background: var(--warn); } .stack .s-done { background: var(--ok); }
.tr-meta { font-size: 12px; color: var(--muted); white-space: nowrap; text-align: right; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.mini-task { display: flex; align-items: center; gap: 12px; padding: 8px; margin: 0 -8px; border-radius: var(--r-sm); cursor: pointer; }
.mini-task:hover { background: var(--hover); }
.mini-task .mt-title { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Table */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: auto; box-shadow: var(--shadow); }
table.tasks { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tasks th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.tasks td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.tasks tbody tr { cursor: pointer; }
table.tasks tbody tr:hover { background: var(--hover); }
table.tasks tbody tr:last-child td { border-bottom: 0; }
td.t-title { font-weight: 600; max-width: 360px; }
td.t-place { color: var(--muted); white-space: nowrap; }
.person { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }

/* Board */
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 16px; align-items: start; }
.col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); padding: 8px; min-height: 200px; }
.col.drag-over { border-color: var(--accent); background: var(--accent-soft); }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 8px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.col-count { color: var(--muted); font-weight: 600; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px; margin-bottom: 8px; cursor: pointer; box-shadow: var(--shadow); }
.card:hover { border-color: var(--border-strong); }
.card.dragging { opacity: .5; }
.card h4 { margin: 0 0 8px; font-size: 13px; font-weight: 600; line-height: 1.4; }
.card .c-meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.card .c-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card .c-left { display: flex; align-items: center; gap: 12px; min-width: 0; }

/* Pool */
.pool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.pool-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); cursor: pointer; }
.pool-card:hover { border-color: var(--border-strong); }
.pool-card h4 { margin: 0; font-size: 15px; }
.pool-card .desc { margin: 0; color: var(--text-2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pool-card .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pool-card .btn { margin-top: 8px; }
.readonly-note { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* Teams & people */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.tc-head { display: flex; align-items: center; gap: 12px; }
.tc-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, transparent); flex: none; }
.tc-ico svg { width: 18px; height: 18px; }
.tc-title { flex: 1; min-width: 0; } .tc-title h4 { margin: 0; font-size: 15px; } .tc-title div { font-size: 12px; color: var(--muted); }
.tc-members { display: flex; gap: 4px; flex-wrap: wrap; min-height: 24px; align-items: center; }
.tc-actions { display: flex; gap: 4px; align-items: center; border-top: 1px solid var(--border); padding-top: 12px; }
.tc-actions .spacer { flex: 1; }
.add-card { border-style: dashed; box-shadow: none; background: transparent; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; min-height: 120px; font-weight: 600; }
.add-card:hover { color: var(--accent); border-color: var(--accent); }
.people-table td .tags { display: flex; gap: 12px; flex-wrap: wrap; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.swatches, .icon-pick, .team-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; align-items: center; }
.swatch { width: 28px; height: 28px; border-radius: 50%; background: var(--tc); border: 2px solid transparent; cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--tc); }
#tm-color { width: 36px; height: 28px; border: 0; background: none; padding: 0; cursor: pointer; }
.ico-opt { width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); cursor: pointer; }
.ico-opt svg { width: 18px; height: 18px; } .ico-opt.on { color: var(--tc); border-color: var(--tc); }
.team-opt { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--border); cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-2); }
.team-opt input { display: none; } .team-opt i { width: 8px; height: 8px; border-radius: 50%; background: var(--tc); }
.team-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.check-row { display: flex; gap: 8px; align-items: center; margin-top: 16px; }

/* Settings */
.settings { display: grid; gap: 16px; max-width: 720px; }
.settings .panel h3 { margin-bottom: 16px; }
code { background: var(--surface-2); border: 1px solid var(--border); padding: 2px 6px; border-radius: 4px; font-size: 12px; }

/* Empty */
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty h4 { margin: 0 0 4px; color: var(--text); font-size: 15px; }
.empty p { margin: 0; }
.empty-ico { width: 48px; height: 48px; margin: 0 auto 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; }
.empty-ico svg { width: 22px; height: 22px; }

/* Drawer */
.modal-backdrop { position: fixed; inset: 0; background: var(--scrim); z-index: 80; }
@keyframes slideIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 16px; font-weight: 650; }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--border); }
.modal-foot .spacer { flex: 1; }
.modal-backdrop { display: grid; place-items: center; padding: 24px; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); }
.modal-body { padding: 24px; overflow-y: auto; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.detail-grid .k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.comment { padding: 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 8px; }
.c-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.c-head b { color: var(--text); }
.c-text { white-space: pre-wrap; font-size: 13px; }
.history { font-size: 12px; color: var(--muted); display: grid; gap: 8px; }
.history b { color: var(--text-2); }

/* Login */
.login-screen { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); padding: 24px; }
.login-tools { position: absolute; top: 16px; right: 16px; display: flex; gap: 8px; }
.login-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 32px; box-shadow: var(--shadow-lg); }
.login-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; margin-bottom: 24px; }
.login-title { font-size: 18px; font-weight: 700; }
#login-form { display: grid; gap: 16px; }
.login-error { color: var(--bad); background: var(--bad-soft); border-radius: var(--r-sm); padding: 8px 12px; font-size: 13px; }
.login-hint { margin: 16px 0 0; text-align: center; color: var(--muted); font-size: 12px; }

/* Toast */
.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 120; }
.toast { background: var(--text); color: var(--bg); padding: 8px 16px; border-radius: var(--r-sm); font-size: 13px; font-weight: 500; box-shadow: var(--shadow-lg); }

body:not(.is-admin) .admin-only { display: none !important; }
.only-mobile { display: none; }
@media (max-width: 960px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .board { grid-template-columns: 1fr; }
  .page { padding: 16px; }
  .user-btn .ub-name { display: none; }
}

/* Profilbilder */
.avatar { position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; background: var(--surface-2); }
.avatar.xl { width: 96px; height: 96px; font-size: 28px; }
.av-edit { display: flex; gap: 16px; align-items: center; }
.av-side { flex: 1; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.av-drop { width: 100%; display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1.5px dashed var(--border-strong); border-radius: var(--r); cursor: pointer; font-size: 13px; color: var(--text); }
.av-drop:hover, .av-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.bell-item .avatar { margin-top: 2px; }
.um-head .person { gap: 12px; }

/* GROB | GM branding */
.brand-logos { display: inline-flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
[data-theme="dark"] .brand-logos { background: rgba(255,255,255,.06); }
.brand-logos img { display: block; height: 24px; width: auto; }
.brand-logos .logo-sep { width: 1px; height: 22px; background: var(--border); }
.brand-logos.lg { padding: 10px 16px; gap: 14px; }
.brand-logos.lg img { height: 40px; } .brand-logos.lg .logo-sep { height: 32px; }
.login-title { letter-spacing: .08em; }

/* Aufgaben-Popup */
body.tp-lock { overflow: hidden; }
.tp-backdrop { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: 24px; background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tp { width: min(920px, 100%); max-height: 90vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; animation: tpIn .16s ease-out; }
.tp.narrow { width: min(640px, 100%); }
@keyframes tpIn { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px 16px 24px; border-bottom: 1px solid var(--border); }
.tp-head-l { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.tp-head h2 { margin: 0; font-size: 16px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tp-meta { display: inline-flex; gap: 6px; align-items: center; }
.tp-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); overflow: hidden; }
.tp.narrow .tp-body { grid-template-columns: minmax(0, 1fr); }
.tp-form { min-width: 0; overflow-y: auto; overflow-x: hidden; padding: 20px 24px 8px; }
.tp-sec { margin-bottom: 18px; }
.tp-sec h3 { margin: 0 0 10px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.tp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tp-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tp-grid .full { grid-column: 1 / -1; }
.tp-grid .field { min-width: 0; margin: 0; }
.tp-form .field input, .tp-form .field select, .tp-form .field textarea { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
.tp-form .field textarea { resize: vertical; min-height: 84px; }
.tp-form [disabled] { opacity: .7; cursor: not-allowed; }
.tp-side { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-left: 1px solid var(--border); background: var(--surface-2); }
.tp-tabs { display: flex; gap: 4px; padding: 10px 12px 0; border-bottom: 1px solid var(--border); }
.tp-tab { appearance: none; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; padding: 8px 10px; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tp-tab.on { color: var(--text); border-bottom-color: var(--accent); }
.tp-count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--border); font-size: 11px; text-align: center; margin-left: 2px; }
.tp-pane { flex: 1; min-height: 120px; overflow-y: auto; overflow-x: hidden; padding: 14px 16px; overflow-wrap: anywhere; }
.tp-note { padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface); }
.tp-note textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 56px; }
.tp-note-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.tp-foot { display: flex; align-items: center; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--surface); }
.tp-foot .spacer { flex: 1; }
@media (max-width: 760px) {
  .tp-backdrop { padding: 8px; }
  .tp { max-height: 94vh; }
  .tp-body { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .tp-form { overflow: visible; }
  .tp-side { border-left: 0; border-top: 1px solid var(--border); }
  .tp-pane { max-height: 260px; }
  .tp-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) { .tp-grid, .tp-grid.three { grid-template-columns: minmax(0, 1fr); } }

/* ═════ v2 Komponenten ═════ */
.btn { border-radius: 4px; }
.btn.primary { background: var(--accent-strong); color: #fff; }
[data-theme="dark"] .btn.primary { background: var(--accent-strong); color: #fff; }
.btn.primary:hover { background: var(--accent); filter: none; }
#page-action .btn.primary { height: 40px; padding: 0 18px; font-size: 14px; box-shadow: 0 2px 6px rgba(0,115,234,.25); }
select, input:not([type=checkbox]):not([type=color]), textarea { border-radius: 4px; background: var(--surface); }
.panel, .kpi, .tcard, .pool-card, .table-wrap { border-radius: var(--r); box-shadow: var(--shadow); }

/* Farbige Labels (Status/Priorität) */
.lbl { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 32px; padding: 0 8px; background: var(--lc); color: var(--lt, #fff); font-size: 13px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 2px; }
.lbl-sel { appearance: none; -webkit-appearance: none; width: 100%; height: 32px !important; padding: 0 8px !important; border: 0 !important; border-radius: 2px !important; background: var(--lc) !important; color: var(--lt, #fff) !important; font-size: 13px; font-weight: 600; text-align: center; text-align-last: center; cursor: pointer; }
.lbl-sel:hover { filter: brightness(1.06); }
.lbl-sel option { background: var(--surface); color: var(--text); }
.card .lbl { width: auto; min-height: 22px; font-size: 11.5px; padding: 0 8px; border-radius: 11px; display: inline-flex; }

/* Gruppen-Tabelle */
.groups { display: flex; flex-direction: column; gap: 28px; }
.grp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; min-height: 30px; }
.grp-toggle { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px 4px; color: var(--gc); cursor: pointer; font-size: 17px; font-weight: 700; border-radius: 4px; }
.grp-toggle:hover { background: var(--hover); }
.grp-toggle svg { width: 18px; height: 18px; transition: transform .15s; }
.grp.closed .grp-toggle svg { transform: rotate(-90deg); }
.grp-count { font-size: 13px; color: var(--muted); }
.grp-mini { width: 160px; }
.grp-body { overflow-x: auto; border-radius: 6px; }
table.mtable { width: 100%; min-width: 1100px; border-collapse: separate; border-spacing: 0; font-size: 14px; table-layout: fixed; background: var(--surface); }
.mtable th { font-size: 12.5px; font-weight: 600; color: var(--muted); text-align: center; padding: 8px 10px; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtable th.c-title { text-align: left; border-left: 6px solid var(--gc); border-top-left-radius: 6px; padding-left: 14px; }
.mtable th:last-child { border-top-right-radius: 6px; }
.mtable td { height: var(--row-h); padding: 4px 10px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); text-align: center; vertical-align: middle; overflow: hidden; }
.mtable td.c-title { text-align: left; border-left: 6px solid var(--gc); padding-left: 14px; }
.mtable td.c-status, .mtable td.c-prio { padding: 4px; }
.mtable tbody tr { cursor: pointer; }
.mtable tbody tr:hover td { background: var(--hover); }
.mtable tbody tr:hover td.c-status, .mtable tbody tr:hover td.c-prio { background: var(--surface); }
.mtable .c-title { width: auto; } .mtable .c-person { width: 190px; } .mtable .c-status { width: 140px; } .mtable .c-prio { width: 130px; }
.mtable .c-team { width: 150px; } .mtable .c-place { width: 170px; } .mtable .c-due { width: 116px; }
.mtable td.c-person .person { justify-content: flex-start; overflow: hidden; }
.mtable td.c-place { color: var(--text-2); font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.mtable td.c-due { font-size: 13px; white-space: nowrap; }
.mtable tfoot td { height: 36px; border-bottom: 0; border-right: 0; background: transparent; }
.mtable tfoot td.c-title { border-left: 0; }
.mtable tfoot td.c-status, .mtable tfoot td.c-prio { padding: 6px 4px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); border-radius: 0 0 4px 4px; background: var(--surface); }
.ttl-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ttl { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row-icons { display: inline-flex; gap: 8px; margin-left: auto; flex: none; }
.ri { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); }
.ri svg { width: 14px; height: 14px; }
.sumbar { display: flex; height: 22px; border-radius: 3px; overflow: hidden; background: var(--neutral-soft); }
.sumbar span { display: block; height: 100%; }
.person { overflow: hidden; text-overflow: ellipsis; }

/* Board */
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 16px; align-items: start; }
.col { background: var(--surface-2); border: 0; border-radius: var(--r); padding: 0; min-height: 240px; overflow: hidden; box-shadow: var(--shadow); }
[data-theme="light"] .col { background: #eef0f5; }
.col.drag-over { outline: 2px dashed var(--sc); outline-offset: -2px; background: var(--accent-soft); }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--sc); color: #fff; font-size: 14px; font-weight: 700; }
.col-count { color: #fff; background: rgba(0,0,0,.18); min-width: 24px; height: 22px; border-radius: 11px; display: grid; place-items: center; font-size: 12px; padding: 0 7px; }
.col-body { padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.col-empty { font-size: 12px; color: var(--muted); text-align: center; padding: 18px 8px; border: 1px dashed var(--border-strong); border-radius: 8px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0; margin: 0; cursor: pointer; box-shadow: var(--shadow); overflow: hidden; transition: box-shadow .12s, transform .12s; }
.card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.12); transform: translateY(-1px); border-color: var(--border); }
.c-thumb { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.c-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.c-body { padding: 12px 14px; border-left: 4px solid var(--pc); }
.card h4 { margin: 0 0 6px; font-size: 14px; font-weight: 600; line-height: 1.35; }
.card .c-meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.c-tags { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.card .c-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card .c-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.card .c-due { font-size: 12px; color: var(--muted); }
.card .row-icons { margin-left: 0; }

/* Dashboard */
.kpis { gap: 20px; margin-bottom: 24px; }
.kpi { position: relative; padding: 20px 20px 18px; border: 1px solid var(--border); overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: #7e8fa8; }
.kpi[data-kpi="1"]::before { background: #fdab3d; } .kpi[data-kpi="2"]::before { background: #e2445c; } .kpi[data-kpi="3"]::before { background: #00c875; }
.kpi .label { font-size: 13px; }
.kpi .value { font-size: 34px; color: var(--text) !important; }
.kpi:hover { box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.panel { padding: 20px; }
.panel h3 { font-size: 16px; }
.dash-grid { gap: 20px; }
.stack { height: 12px; border-radius: 6px; }
.stack .s-open { background: #7e8fa8; } .stack .s-work { background: #fdab3d; } .stack .s-block { background: #e2445c; } .stack .s-done { background: #00c875; }
.legend i[style*="--ok"] { background: #00c875 !important; } .legend i[style*="--accent"] { background: #fdab3d !important; } .legend i[style*="--warn"] { background: #e2445c !important; } .legend i[style*="--border-strong"] { background: #7e8fa8 !important; }
.team-row { padding: 14px 0; }

/* Chips an v2-Farben angleichen */
.st-Offen { background: rgba(196,196,196,.25); color: var(--text-2); }
.st-InArbeit { background: rgba(253,171,61,.18); color: #c27100; }
.st-Erledigt { background: rgba(0,200,117,.16); color: #00854d; }
.st-Blockiert { background: rgba(226,68,92,.14); color: #c4314b; }
[data-theme="dark"] .st-InArbeit { color: #fdbc64; } [data-theme="dark"] .st-Erledigt { color: #33d391; } [data-theme="dark"] .st-Blockiert { color: #f2667d; }

/* Bilder im Popup */
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.img-grid.busy { opacity: .6; pointer-events: none; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.thumb-open { all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.thumb-open img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-del { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: .85; }
.thumb-del svg { width: 14px; height: 14px; }
.thumb-del:hover { background: #e2445c; opacity: 1; }
.thumb-badge { position: absolute; left: 4px; bottom: 4px; font-size: 10px; font-weight: 700; background: var(--accent-strong); color: #fff; padding: 1px 6px; border-radius: 8px; }
.thumb.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1.5px dashed var(--border-strong); color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 600; text-align: center; padding: 6px; background: transparent; }
.thumb.add svg { width: 20px; height: 20px; }
.thumb.add:hover, .thumb.add:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.img-hint { margin-top: 8px; }
.tp.drop-over { outline: 3px dashed var(--accent); outline-offset: -6px; }
.tp-sec h3 .tp-count:empty { display: none; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 140; background: rgba(5,7,16,.9); display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; }
.lightbox figure { grid-column: 2; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; height: 100vh; padding: 24px 0; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 90px); object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox figcaption { color: #d5d8df; font-size: 13px; }
.lb-btn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; display: grid; place-items: center; justify-self: center; }
.lb-btn:hover { background: rgba(255,255,255,.24); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-close { position: absolute; top: 16px; right: 16px; }
.lb-prev { grid-column: 1; grid-row: 1; } .lb-next { grid-column: 3; grid-row: 1; }

/* Popup im v2-Look */
.tp { border-radius: 12px; }
.tp-head h2 { font-size: 18px; font-weight: 700; }
.tp-tab.on { border-bottom-color: var(--accent); }

/* Responsive */
@media (max-width: 1100px) {
  .brand-text { display: none; }
  .mtable .c-place { width: 130px; } .mtable .c-team { width: 120px; }
}
@media (max-width: 960px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar-foot { display: none; }
}
@media (max-width: 760px) {
  .topbar { height: 56px; gap: 10px; padding: 0 12px; }
  .search-wrap { max-width: none; }
  .tabbar { padding: 0 8px; }
  .nav-btn { padding: 0 10px; font-size: 13px; }
  .nav-btn svg { display: none; }
  .page { padding: 16px 12px 40px; }
  .page-head h1 { font-size: 21px; }
  .page-sub { display: none; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .grp-body { overflow: visible; }
  table.mtable, .mtable tbody, .mtable tr, .mtable td { display: block; min-width: 0; width: 100% !important; }
  table.mtable { background: transparent; }
  .mtable thead, .mtable tfoot { display: none; }
  .mtable tbody tr { background: var(--surface); border: 1px solid var(--border); border-left: 6px solid var(--gc); border-radius: 8px; margin-bottom: 10px; padding: 8px 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; box-shadow: var(--shadow); }
  .mtable td { height: auto; border: 0 !important; padding: 0 !important; text-align: left; background: none !important; }
  .mtable td.c-title { grid-column: 1 / -1; padding: 2px 0 4px !important; font-size: 15px; }
  .mtable td[data-k]::before { content: attr(data-k); display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
  .mtable td.c-place { white-space: normal; }
  .brand-logos img { height: 20px; }
}
@media (max-width: 480px) {
  .brand-logos .logo-sep, .brand-logos .logo-gm { display: none; }
  .ub-name { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 12px; }
}
@media (max-width: 760px) {
  .team-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .tr-meta { text-align: left; white-space: normal; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .legend { flex-wrap: wrap; gap: 8px 14px; }
  .mini-task { flex-wrap: wrap; }
  .toolbar { gap: 8px; }
  .page-head { flex-wrap: wrap; }
}

/* Farbige Auswahlfelder je Wert */
select.csel.painted { background-color: var(--lc) !important; color: var(--lt) !important; border-color: transparent !important; font-weight: 600; }
select.csel.painted:disabled { opacity: .85; }
select.csel option, select.lbl-sel option { background: var(--surface); font-weight: 600; }
.chip.pill { background: var(--lc); color: var(--lt); border-radius: 11px; padding: 0 10px; }
.stack .s-work { background: #fdab3d; } .stack .s-block { background: #e2445c; } .stack .s-done { background: #00c875; }
.filter-panel select.csel.painted { height: 36px; }

/* Unterpunkte & Fortschritt */
.prog { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }
.prog-bar { flex: 1; height: 8px; border-radius: 4px; background: var(--neutral-soft); overflow: hidden; min-width: 30px; }
.prog-bar span { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .2s; }
.prog.full .prog-bar span { background: #00c875; }
.prog-txt { font-size: 12px; font-weight: 600; color: var(--text-2); min-width: 34px; text-align: right; }
.prog.lg .prog-bar { height: 10px; } .prog.lg { margin-bottom: 10px; }
.prog.sm { margin: 0 0 8px; } .prog.sm .prog-bar { height: 6px; } .prog.sm .prog-txt { font-size: 11px; min-width: 28px; }
.mini-task .prog.sm { width: 90px; flex: none; margin: 0; }
.mtable .c-prog { width: 140px; } .mtable td.c-prog { padding: 4px 12px; }
.dash-col { display: flex; flex-direction: column; gap: 20px; }
.subs { display: flex; flex-direction: column; }
.sub-list { display: flex; flex-direction: column; gap: 4px; }
.sub-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) 130px auto; align-items: center; gap: 8px; padding: 2px 0; }
.sub-row.ro { grid-template-columns: 20px minmax(0, 1fr) auto auto; padding: 5px 0; border-bottom: 1px solid var(--border); }
.sub-row input.sub-title, .sub-row select.sub-who { height: 32px; min-width: 0; width: 100%; font-size: 13px; }
.sub-row.done .sub-title, .sub-row.done .sub-text { text-decoration: line-through; color: var(--muted); }
.sub-chk { width: 18px; height: 18px; accent-color: #00c875; cursor: pointer; margin: 0; }
.sub-btns { display: inline-flex; gap: 0; }
.icon-btn.sm { width: 28px; height: 28px; } .icon-btn.sm svg { width: 15px; height: 15px; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.sub-new { margin-top: 6px; width: 100%; height: 34px; border-style: dashed !important; }
.toast-act { display: flex; align-items: center; gap: 12px; }
@media (max-width: 760px) { .sub-row { grid-template-columns: 20px minmax(0, 1fr) auto; } .sub-row .sub-who { grid-column: 2; } }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.check-line input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.pn { display: inline-flex; flex-direction: column; line-height: 1.25; } .uname { font-weight: 400; }

/* ── Open Issues (OIL) ── */
.oil-id { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; margin-right: 6px; border-radius: 5px; font-size: 11px; font-weight: 700; letter-spacing: .02em; background: var(--neutral-soft); color: var(--text-2); font-variant-numeric: tabular-nums; vertical-align: middle; white-space: nowrap; flex: none; }
.card h4 .oil-id { margin-right: 6px; }
.cell-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.cell-chip { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--border-strong); background: transparent; color: var(--text-2); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.cell-chip:hover:not([disabled]) { border-color: var(--accent); color: var(--accent); }
.cell-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cell-chip[disabled] { cursor: default; opacity: .85; }
.cell-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (min-width: 761px) {
  .board { grid-template-columns: repeat(7, minmax(230px, 1fr)); overflow-x: auto; padding-bottom: 8px; }
}

/* ── Übersicht nach Mod ── */
.dash-top { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.dash-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); align-self: flex-start; }
.dtab { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font-weight: 600; font-size: 13px; cursor: pointer; }
.dtab i { width: 8px; height: 8px; border-radius: 50%; background: var(--gc); }
.dtab:hover { background: var(--neutral-soft); }
.dtab.on { background: var(--accent); color: #fff; }
.dtab.on i { box-shadow: 0 0 0 2px #fff; }
.dt-n { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: var(--neutral-soft); color: inherit; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.dtab.on .dt-n { background: rgba(255,255,255,.25); }
.dash-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.dash-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.dash-filters select { min-width: 140px; height: 34px; }
.kpis.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi.warn .value { color: #e2445c; } .kpi.violet .value { color: #a25ddc; }
.modgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.modsec { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--gc); border-radius: var(--r); padding: 14px 16px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.modsec.wide { max-width: none; }
.modsec h4 { margin: 4px 0 6px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ms-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ms-head h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--gc); }
.ms-count { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.dstack { height: 10px; }
.ms-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 6px; }
.mk { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text-2); font-size: 11px; font-weight: 600; cursor: pointer; text-align: left; }
.mk b { font-size: 18px; color: var(--text); }
.mk.bad b { color: #e2445c; } .mk.warn b { color: #e2445c; } .mk.violet b { color: #a25ddc; }
.mk:hover, .drow:hover, .zrow:hover, .pchip:hover { filter: brightness(1.08); border-color: var(--border-strong); }
.ms-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modgrid .ms-cols { grid-template-columns: 1fr; }
.drow { display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 6px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font-size: 12.5px; cursor: pointer; text-align: left; }
.drow .dl { flex: 1; } .ddot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border-radius: 6px; border: 0; background: var(--lc); color: var(--lt); font-weight: 600; font-size: 12px; cursor: pointer; }
.pchip b { background: rgba(0,0,0,.15); border-radius: 9px; padding: 0 7px; }
.zrows { display: flex; flex-direction: column; gap: 2px; }
.zrow { display: grid; grid-template-columns: 64px minmax(40px, 1fr) 62px; gap: 10px; align-items: center; padding: 5px 6px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font-size: 12.5px; cursor: pointer; text-align: left; }
.zrow .zn { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.hdot { display: inline-block; font-style: normal; min-width: 16px; height: 16px; line-height: 16px; border-radius: 8px; background: #e2445c; color: #fff; font-size: 10px; text-align: center; padding: 0 4px; }
.ms-gen { padding: 6px 0; }
.modsec .mini-task { display: flex; align-items: center; gap: 8px; }
.modsec.wide .zrows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
@media (max-width: 1280px) { .modgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis.six { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .modgrid, .ms-cols, .modsec.wide .zrows { grid-template-columns: 1fr; } .kpis.six { grid-template-columns: repeat(2, 1fr); } }

/* ── Übersicht: Textfelder Allgemein / Tagesthemen ── */
.page-head.no-title > div:first-child { display: none; }
.page-head.no-title { justify-content: flex-end; margin-bottom: 8px; }
.bnotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.bnote { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bnote[data-bn="tagesthemen"] { border-left-color: #fdab3d; }
.bn-head { display: flex; align-items: center; gap: 10px; }
.bn-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.bn-meta { font-size: 11.5px; color: var(--muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bn-head .btn { margin-left: auto; }
.bn-text { white-space: pre-wrap; word-break: break-word; font-size: 13.5px; line-height: 1.5; max-height: 260px; overflow: auto; }
.bn-empty { font-size: 12.5px; color: var(--muted); font-style: italic; }
.bn-edit { width: 100%; min-height: 110px; resize: vertical; font: inherit; font-size: 13.5px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); }
.bn-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 760px) { .bnotes { grid-template-columns: 1fr; } }

/* ── Rich-Text (Allgemein/Tagesthemen) ── */
.rt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.rt-btn { min-width: 30px; height: 28px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font-size: 13px; cursor: pointer; }
.rt-btn:hover, .rt-btn:focus-visible { background: var(--neutral-soft); }
.rt-size { height: 28px; font-size: 12px; padding: 0 6px; border-radius: 6px; }
.rt-sep { width: 1px; height: 18px; background: var(--border-strong); margin: 0 4px; }
.rt-col { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); background: var(--cc); cursor: pointer; padding: 0; }
.rt-col:hover { transform: scale(1.15); }
.bn-edit.rt { min-height: 120px; max-height: 360px; overflow: auto; white-space: normal; outline: none; line-height: 1.5; }
.bn-edit.rt:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.bn-text.rt { white-space: normal; }
.rt p, .rt div { margin: 0 0 4px; }
.rt ul, .rt ol { margin: 4px 0; padding-left: 22px; }
.rt .fs-s { font-size: 12px; } .rt .fs-m { font-size: 14px; } .rt .fs-l { font-size: 18px; } .rt .fs-xl { font-size: 23px; font-weight: 650; }
.rt .c-red { color: #e2445c; } .rt .c-orange { color: #e8930c; } .rt .c-green { color: #00a862; } .rt .c-blue { color: #3d8af7; } .rt .c-purple { color: #a25ddc; } .rt .c-muted { color: var(--muted); }
[data-theme="dark"] .rt .c-orange { color: #fdab3d; } [data-theme="dark"] .rt .c-blue { color: #79b0ff; } [data-theme="dark"] .rt .c-green { color: #2ed58f; }
.rt-wrap { display: flex; flex-direction: column; gap: 4px; }
.rt-ed { min-height: 84px; max-height: 320px; overflow: auto; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font-size: 13.5px; line-height: 1.5; outline: none; font-weight: 400; text-transform: none; letter-spacing: 0; }
.rt-ed:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rt-ed:empty::before { content: attr(data-ph); color: var(--muted); pointer-events: none; }
.rt-ed.rt-note { min-height: 56px; }
.rt-view { padding: 6px 0; font-size: 13.5px; line-height: 1.5; font-weight: 400; color: var(--text); }
.tp-note .rt-bar { padding: 2px; } .tp-note .rt-btn { min-width: 26px; height: 24px; padding: 0 5px; }
.c-text.rt { white-space: normal; }

/* ── Privat: Notizen / Medien ── */
.pn-wrap { display: grid; gap: 10px; max-width: 980px; }
.pn-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.pn-top .spacer { flex: 1; }
.pv-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }
.pv-badge svg { width: 13px; height: 13px; }
.pn-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.pn-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 4px; }
.pn-toggle { all: unset; flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 6px 8px; cursor: pointer; border-radius: 6px; }
.pn-toggle:hover { background: var(--hover); } .pn-toggle:focus-visible { outline: 2px solid var(--accent); }
.pn-toggle svg { width: 18px; height: 18px; flex: none; transform: rotate(-90deg); transition: transform .15s; color: var(--muted); }
.pn-item.open .pn-toggle svg { transform: none; }
.pn-title { font-weight: 650; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-body { padding: 4px 16px 14px 38px; border-top: 1px solid var(--border); }
.pn-body .rt-view { padding-top: 8px; }
.pn-editor { background: var(--surface); border: 1px solid var(--accent); border-radius: var(--r); padding: 14px; display: grid; gap: 10px; }
.pn-item.editing { border: 0; background: none; }
.pn-editor .rt-ed { min-height: 140px; }
.pn-editor input.invalid { border-color: var(--bad); }
.pn-foot { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 760px) { .pn-meta { display: none; } .pn-body { padding-left: 16px; } }
.pm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.pm-grid.busy { opacity: .6; pointer-events: none; }
label#pa-media { cursor: pointer; }

/* ── Emergency ── */
.em-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; border: 0; background: #e2445c; color: #fff; font-weight: 700; font-size: 13px; cursor: pointer; box-shadow: 0 2px 8px rgba(226,68,92,.35); letter-spacing: .02em; }
.em-btn:hover { background: #c9304a; } .em-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px #e2445c; }
.em-btn [data-ico] svg, .em-btn svg { width: 16px; height: 16px; }
.btn.em-solid { background: #e2445c; color: #fff; border-color: transparent; font-weight: 700; } .btn.em-solid:hover { background: #c9304a; }
.btn.em-solid svg { width: 16px; height: 16px; }
.em-form { display: grid; gap: 12px; min-width: min(420px, 80vw); }
.alarm-ov { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; background: rgba(160, 10, 30, .82); animation: alarmPulse 1.2s ease-in-out infinite; }
@keyframes alarmPulse { 50% { background: rgba(226, 68, 92, .92); } }
.alarm-box { background: #fff; color: #1d1f2b; border-radius: 16px; padding: 28px 32px; width: min(460px, 100%); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.45); border: 4px solid #e2445c; }
[data-theme="dark"] .alarm-box { background: #1f2340; color: #fff; }
.alarm-ico { width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 50%; background: #e2445c; color: #fff; display: grid; place-items: center; animation: alarmShake .5s infinite; }
.alarm-ico svg { width: 34px; height: 34px; }
@keyframes alarmShake { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
.alarm-kicker { color: #e2445c; font-weight: 800; letter-spacing: .15em; font-size: 13px; }
.alarm-box h2 { margin: 6px 0 10px; font-size: 24px; }
.alarm-msg { font-size: 18px; font-weight: 600; margin: 6px 0; } .alarm-loc { font-size: 16px; margin: 4px 0 8px; }
.btn.alarm-ack { margin-top: 16px; width: 100%; height: 52px; font-size: 20px; font-weight: 800; background: #00a862; color: #fff; border: 0; border-radius: 12px; }
.btn.alarm-ack:hover { background: #008f53; }
@media (prefers-reduced-motion: reduce) { .alarm-ov, .alarm-ico { animation: none; } }
.alarm-status { position: fixed; top: 76px; right: 20px; z-index: 75; width: min(320px, calc(100vw - 40px)); background: var(--surface); border: 2px solid #e2445c; border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 10px 12px; font-size: 13px; }
.as-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; } .as-head b { display: inline-flex; gap: 6px; align-items: center; color: #e2445c; } .as-head svg { width: 15px; height: 15px; }
.as-item { padding: 6px 0; border-top: 1px solid var(--border); } .as-ack { color: #00a862; font-weight: 600; } .as-wait { color: var(--muted); font-style: italic; }
@media (max-width: 760px) { .em-btn > span:last-child { display: none; } .em-btn { padding: 0 10px; } }

/* ── Motivation ── */
.mot { position: fixed; right: 16px; bottom: 16px; z-index: 60; width: 168px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 10px 10px 10px; text-align: center; }
.mot.hidden { display: none; }
.mot-toggle { all: unset; position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; cursor: pointer; color: var(--muted); }
.mot-toggle:hover { background: var(--hover); } .mot-toggle:focus-visible { outline: 2px solid var(--accent); }
.mot-toggle svg { width: 16px; height: 16px; }
.mot-img { width: 128px; height: 128px; display: block; margin: 4px auto 2px; }
.mot-pct { font-size: 13px; color: var(--muted); } .mot-pct b { font-size: 24px; color: var(--mc); font-weight: 800; }
.mot-bar { height: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin: 4px 6px 6px; } .mot-bar span { display: block; height: 100%; border-radius: 4px; }
.mot.closed { width: auto; padding: 4px; border-radius: 999px; }
.mot.closed .mot-toggle { position: static; width: auto; height: auto; display: flex; align-items: center; gap: 6px; padding: 2px 10px 2px 2px; border-radius: 999px; }
.mot.closed .mot-toggle img { width: 40px; height: 40px; } .mot.closed .mot-toggle b { font-size: 15px; }
body:has(.tp-backdrop:not(.hidden)) .mot, body:has(.modal-backdrop:not(.hidden)) .mot { opacity: 0; pointer-events: none; }
.content { padding-bottom: 40px; }
@media (max-width: 760px) { .mot { width: 120px; right: 10px; bottom: 10px; } .mot-img { width: 84px; height: 84px; } .mot-pct b { font-size: 18px; } }

/* ── Live ── */
.sync-dot.live { background: #00c875; box-shadow: 0 0 0 3px rgba(0,200,117,.2); }
.live-hint { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 11.5px; font-weight: 600; color: #b26b00; background: rgba(253,171,61,.15); border-radius: 6px; padding: 2px 8px; width: fit-content; }
[data-theme="dark"] .live-hint { color: #fdab3d; }
.live-hint svg { width: 12px; height: 12px; }
.live-flash { margin-left: 8px; font-size: 11.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; animation: liveIn .3s ease; }
@keyframes liveIn { from { opacity: 0; transform: translateY(-3px); } }

/* ── Motivation Meine/Alle ── */
.mot-scope { display: inline-flex; margin-top: 6px; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.mot-scope button { all: unset; cursor: pointer; font-size: 11px; font-weight: 600; padding: 2px 10px; color: var(--muted); }
.mot-scope button.on { background: var(--accent-strong); color: #fff; }
.mot-scope button:focus-visible { outline: 2px solid var(--accent); }

/* ── VNC ── */
.vnc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.vnc-head .spacer { flex: 1; }
.vnc-search { position: relative; flex: 1 1 260px; max-width: 380px; }
.vnc-search .search-ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); display: grid; }
.vnc-search .search-ico svg { width: 16px; height: 16px; }
.vnc-search input { width: 100%; height: 36px; padding: 0 12px 0 34px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.vnc-search input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.vnc-head select { height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 0 8px; font: inherit; }
.vnc-setup { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--r); padding: 14px 18px; margin-bottom: 14px; }
.vnc-setup.hidden { display: none; }
.vnc-setup h3 { margin: 0 0 6px; font-size: 14px; }
.vs-steps { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; }
.vs-btns { display: flex; gap: 8px; margin: 8px 0 6px; flex-wrap: wrap; }
.btn.disabled { opacity: .5; pointer-events: none; }
.vnc-count { margin: 4px 0 10px; }
.vnc-mod { margin-bottom: 22px; }
.vnc-mh { display: flex; align-items: baseline; gap: 12px; font-size: 18px; margin: 6px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--border); }
.vnc-zelle { margin-bottom: 14px; }
.vnc-zelle h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; }
.vnc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 10px; }
.vnc-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px 10px; display: grid; gap: 4px; transition: transform .12s, box-shadow .12s, border-color .12s; overflow: hidden; }
.vnc-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, #0073ea, #00c875); opacity: .9; }
.vnc-card.off::before { background: var(--border); }
.vnc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.vnc-card.off { opacity: .6; } .vnc-card.off:hover { transform: none; box-shadow: none; border-color: var(--border); }
.vc-top { display: flex; align-items: center; justify-content: space-between; }
.vc-op { font-weight: 800; font-size: 16px; letter-spacing: .01em; }
.vc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); } .vc-dot.on { background: #00c875; box-shadow: 0 0 0 3px rgba(0,200,117,.18); }
.vc-name { font-size: 12px; color: var(--muted); }
.vc-ip { all: unset; cursor: copy; display: inline-flex; align-items: center; gap: 6px; font: 600 13px/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--text); background: var(--surface-2); border-radius: 6px; padding: 3px 8px; width: fit-content; }
.vc-ip:hover { background: var(--accent-soft); color: var(--accent); } .vc-ip:focus-visible { outline: 2px solid var(--accent); }
.vc-ip[disabled] { cursor: default; color: var(--muted); font-family: inherit; font-weight: 500; }
.vc-copy svg { width: 13px; height: 13px; opacity: .6; }
.vc-act { display: flex; gap: 6px; margin-top: 4px; min-height: 28px; }
.vc-act .btn svg { width: 14px; height: 14px; }
.vc-go { flex: 1; justify-content: center; }
.vnc-card.edit { grid-template-columns: 1fr auto; align-items: center; }
.vnc-card.edit .vc-name { grid-column: 1 / -1; }
.vc-ip-in { height: 30px; border: 1px solid var(--border); border-radius: 6px; padding: 0 8px; font: 600 13px ui-monospace, Consolas, monospace; background: var(--surface-2); color: var(--text); min-width: 0; }
.vc-ip-in.invalid { border-color: var(--bad); } .vc-ip-in.saved { border-color: #00c875; }
.vnc-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--r); padding: 10px 12px; margin-bottom: 12px; }
.vnc-add input, .vnc-add select { height: 32px; border: 1px solid var(--border); border-radius: 6px; padding: 0 8px; background: var(--surface-2); color: var(--text); font: inherit; width: 120px; }
@media (max-width: 760px) { .vnc-setup { grid-template-columns: 1fr; } .vnc-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }

/* ── Unternotizen ── */
.pn-subs { margin-top: 10px; display: grid; gap: 6px; padding-left: 6px; border-left: 2px solid var(--border); }
.pn-sub { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; }
.pn-sub .pn-head { padding: 2px 6px 2px 2px; }
.pn-sub .pn-title { font-size: 13.5px; font-weight: 600; }
.pn-sub .pn-toggle svg { width: 15px; height: 15px; transform: rotate(-90deg); transition: transform .15s; color: var(--muted); }
.pn-sub.open .pn-toggle svg { transform: none; }
.pn-sub .pn-body { padding: 2px 12px 10px 30px; border-top: 1px solid var(--border); }
.pn-addsub { justify-self: start; } .pn-addsub svg { width: 13px; height: 13px; }
.pn-subs .pn-editor { margin: 2px 0; }

/* ── Medien: Download + Kamera ── */
.thumb-dl { position: absolute; top: 4px; right: 32px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.thumb-dl svg { width: 13px; height: 13px; }
.pm-thumb:hover .thumb-dl, .pm-thumb:focus-within .thumb-dl { opacity: .9; }
.thumb-dl:hover { background: var(--accent-strong); opacity: 1; }
@media (hover: none) { .thumb-dl { opacity: .9; } }
.pm-cam { display: none; }
@media (hover: none), (max-width: 760px) { .pm-cam { display: flex; } }

/* ── Benachrichtigungs-Einstellungen ── */
.ns { display: grid; gap: 4px; min-width: min(460px, 82vw); }
.ns-always { background: rgba(226,68,92,.1); color: #e2445c; font-weight: 600; font-size: 13px; padding: 8px 10px; border-radius: 8px; margin-bottom: 6px; }
.ns-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 2px; border-bottom: 1px solid var(--border); cursor: pointer; }
.ns-row > span { display: grid; }
.switch { appearance: none; -webkit-appearance: none; width: 40px; height: 22px; border-radius: 999px; background: var(--border-strong); position: relative; cursor: pointer; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch:checked { background: #00a862; } .switch:checked::after { transform: translateX(18px); }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ns-push { margin-top: 6px; }
.ns-pstate { font-size: 12.5px; color: var(--muted); margin: 6px 0; } .ns-pstate.on { color: #00a862; font-weight: 600; }
.ns-btns { display: flex; gap: 8px; flex-wrap: wrap; } .ns-btns svg { width: 14px; height: 14px; }
.ns-help { margin-top: 10px; font-size: 13px; } .ns-help summary { cursor: pointer; color: var(--accent); font-weight: 600; } .ns-help ul { padding-left: 18px; display: grid; gap: 4px; }

.vnc-setup.first{border:2px solid var(--accent,#2563eb);box-shadow:0 0 0 4px rgba(37,99,235,.12)}
.vs-first{display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding:8px 10px;margin-bottom:10px;border-radius:8px;background:rgba(37,99,235,.10);font-size:13px}
.vs-first svg{width:16px;height:16px}

.alarm-btns{display:flex;gap:10px;margin-top:16px}.alarm-btns .btn.alarm-ack{margin-top:0;flex:2}
.btn.alarm-dec{flex:1;height:52px;font-size:15px;font-weight:700;background:#fff;color:#b42318;border:2px solid #b42318;border-radius:12px}
.btn.alarm-dec:hover{background:#fee4e2}
.alarm-decbox{display:flex;gap:8px;margin-top:10px}.alarm-decbox input{flex:1;height:44px;padding:0 10px;border-radius:10px;border:1px solid #d0d5dd;font-size:15px}.alarm-decbox .btn.alarm-dec{height:44px;flex:0 0 auto;padding:0 14px}
.as-dec{color:#b42318;font-weight:600}.as-active{color:#b42318;font-weight:800;animation:asb 1s infinite}@keyframes asb{50%{opacity:.45}}

/* ═════ Mobile (Telefon) ═════ */
@media (max-width: 760px) {
  :root { --tabh: 58px; --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); }
  html, body { overscroll-behavior-y: none; -webkit-text-size-adjust: 100%; }
  body { -webkit-tap-highlight-color: transparent; }
  .only-mobile { display: flex; }
  .app { height: 100dvh; }
  input, select, textarea, [contenteditable=true], .rt-ed { font-size: 16px !important; }
  input:not([type=checkbox]):not([type=radio]), select { min-height: 44px; }
  .btn, .btn.sm, .btn.xs, .icon-btn, .menu-item, .dtab, .tp-tab, .fchip, .rt-btn, .lb-btn, .user-btn, .em-btn { min-height: 44px; }
  .icon-btn, .rt-btn { min-width: 44px; }
  .icon-btn.sm { min-width: 44px; min-height: 44px; }
  label.check-line { min-height: 44px; display: inline-flex; align-items: center; }
  /* Header */
  .topbar { height: auto; flex-wrap: wrap; gap: 6px 8px; padding: calc(6px + var(--sat)) max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left)); }
  .brand { flex: 1; min-width: 0; }
  .brand-logos { padding: 4px 6px; }
  .topbar-actions { gap: 4px; }
  #btn-lang, #btn-theme { display: none; }
  .search-wrap { order: 3; flex: 1 0 100%; }
  .topbar .search-wrap input[type=search] { height: 44px; border-radius: 22px; }
  .em-btn { min-width: 44px; padding: 0 12px; }
  .em-btn > span:last-child { display: inline; font-size: 13px; }
  .user-btn { min-width: 44px; justify-content: center; }
  .popover { position: fixed; left: 8px !important; right: 8px !important; top: calc(var(--sat) + 60px); width: auto !important; max-height: calc(100dvh - var(--sat) - 60px - var(--tabh) - var(--sab) - 16px); overflow-y: auto; }
  .bell-list { max-height: none; }
  .menu-item { width: 100%; }
  /* Bottom-Tabbar */
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; padding: 0 0 var(--sab); border-top: 1px solid var(--border); border-bottom: 0; box-shadow: 0 -2px 10px rgba(0,0,0,.06); }
  .nav { align-items: stretch; gap: 0; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .nav-sep { display: none; }
  .nav-btn { flex: 1 0 64px; flex-direction: column; justify-content: center; gap: 2px; height: var(--tabh); padding: 4px 4px; font-size: 10.5px; font-weight: 600; border-radius: 0; scroll-snap-align: start; }
  .nav-btn svg { display: block; width: 22px; height: 22px; }
  .nav-btn.active::after { top: 0; bottom: auto; left: 14px; right: 14px; border-radius: 0 0 3px 3px; }
  .nav-badge { position: absolute; top: 4px; right: 10px; }
  .page { padding: 12px 12px calc(var(--tabh) + var(--sab) + 84px); padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .page-head { gap: 8px; margin-bottom: 10px; }
  .toast-wrap { bottom: calc(var(--tabh) + var(--sab) + 12px); width: calc(100vw - 24px); justify-items: center; }
  .toast { max-width: 100%; }
  /* Toolbar/Chips: horizontal scrollen */
  .toolbar { flex-wrap: wrap; }
  .chips, .dash-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; -webkit-overflow-scrolling: touch; }
  .chips::-webkit-scrollbar, .dash-tabs::-webkit-scrollbar, .nav::-webkit-scrollbar { display: none; }
  .dtab, .fchip { flex: none; }
  .filter-panel { grid-template-columns: 1fr 1fr; }
  /* Board: Spalten horizontal wischen */
  .board { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 -12px; padding: 0 12px 8px; -webkit-overflow-scrolling: touch; }
  .board > .col { flex: 0 0 86%; scroll-snap-align: center; }
  /* Popup = Vollbild-Sheet */
  .tp-backdrop { padding: 0; place-items: stretch; }
  .tp, .tp.narrow { width: 100%; height: 100dvh; max-height: none; border-radius: 0; border: 0; }
  .tp-head { padding: calc(8px + var(--sat)) 8px 8px 14px; position: sticky; top: 0; }
  .tp-body { -webkit-overflow-scrolling: touch; }
  .tp-form { padding: 14px 14px 8px; }
  .tp-pane { max-height: none; }
  .tp-tabs { overflow-x: auto; scrollbar-width: none; }
  .tp-foot { position: sticky; bottom: 0; flex-wrap: wrap; padding: 10px 12px calc(10px + var(--sab)); box-shadow: 0 -4px 12px rgba(0,0,0,.08); z-index: 2; }
  .tp-foot .btn { flex: 1 1 auto; }
  .tp-foot .spacer { display: none; }
  .rt-bar { flex-wrap: wrap; }
  .tp-note .rt-btn { min-width: 44px; height: 44px; }
  /* Modal als Bottom-Sheet */
  .modal-backdrop { padding: 0; place-items: end stretch; }
  .modal { width: 100%; max-height: calc(100dvh - var(--sat) - 24px); border-radius: 16px 16px 0 0; }
  .modal-foot { padding-bottom: calc(12px + var(--sab)); flex-wrap: wrap; }
  .modal-foot .btn { flex: 1 1 auto; }
  /* Motivation klein */
  .mot { right: 8px; bottom: calc(var(--tabh) + var(--sab) + 8px); width: 128px; padding: 8px; }
  .mot-img { width: 72px; height: 72px; }
  .mot.closed { padding: 2px; }
  .mot.closed .mot-toggle { min-height: 44px; }
  .mot.closed .mot-toggle img { width: 36px; height: 36px; }
  .mot-toggle { width: 44px; height: 44px; top: 0; right: 0; }
  .mot-scope button { min-height: 44px; }
  /* Alarm */
  .alarm-status { top: auto; bottom: calc(var(--tabh) + var(--sab) + 8px); right: 8px; left: 8px; width: auto; max-height: 45dvh; overflow-y: auto; }
  .alarm-ov { padding: calc(12px + var(--sat)) 12px calc(12px + var(--sab)); }
  .alarm-btns { flex-direction: column; }
  /* Lightbox */
  .lb-btn { width: 48px; height: 48px; }
  /* VNC */
  .vnc-head { flex-wrap: wrap; }
  .vnc-search { flex: 1 0 100%; }
  .vnc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vc-ip { min-height: 44px; }
}
@media (display-mode: standalone) and (max-width: 760px) { .topbar { padding-top: calc(10px + var(--sat)); } }
@media (max-width: 760px) {
  .grp-toggle, .drow, .pchip, .cell-chip, .lbl-sel, .csel { min-height: 44px; }
  .drow { display: flex; align-items: center; }
  .rt-col { width: 44px !important; height: 44px !important; padding: 11px !important; background-clip: content-box !important; border-radius: 50% !important; }
  .cell-chips, .chip-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
}

/* Notizbaum */
.pn-tree { display: grid; gap: 10px; }
.pn-node.pn-sub { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; }
.pn-node.pn-sub.open > .pn-head .pn-toggle svg { transform: none; }
.pn-node .pn-body { padding-left: 30px; }
.pn-node.pn-sub > .pn-body { padding: 2px 10px 10px 22px; }
.pn-subs:empty { display: none; }
.pn-cnt { flex: none; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--border); border-radius: 9px; padding: 0 6px; min-width: 18px; text-align: center; }
.pn-head[draggable=true] { cursor: grab; }
.pn-node.dragging { opacity: .45; }
.pn-head.dz-into { outline: 2px dashed var(--accent); outline-offset: -2px; background: var(--accent-soft); border-radius: 8px; }
.pn-head.dz-before { box-shadow: inset 0 3px 0 var(--accent); }
.pn-head.dz-after { box-shadow: inset 0 -3px 0 var(--accent); }
.pn-head .icon-btn svg { width: 16px; height: 16px; }
@media (max-width: 760px) {
  .pn-node .pn-body { padding-left: 10px; padding-right: 6px; }
  .pn-node.pn-sub > .pn-body { padding: 2px 6px 8px 8px; }
  .pn-subs { padding-left: 4px; margin-left: 2px; }
  .pn-head { gap: 0; padding: 2px; }
  .pn-head .icon-btn { min-width: 40px; width: 40px; }
  .pn-toggle { min-height: 44px; padding: 0 6px; }
  .pn-title { font-size: 15px; }
  .pn-sub .pn-title { font-size: 14.5px; }
  .pn-addsub { min-height: 44px; }
}
.pn-node.open > .pn-head .pn-toggle svg { transform: none; }
.pn-node:not(.open) > .pn-head .pn-toggle svg { transform: rotate(-90deg); }
@media (max-width: 760px) { .pn-head .icon-btn { min-width: 44px; width: 44px; } }

.up-prog { position: fixed; right: 16px; bottom: 16px; z-index: 95; width: min(360px, calc(100vw - 24px)); max-height: 50vh; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px 10px; font-size: 13px; }
.up-prog.hidden { display: none; }
.up-head { display: flex; align-items: center; gap: 8px; } .up-head b { flex: 1; } .up-bad { color: var(--bad, #e2445c); font-weight: 600; }
.up-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 5px 0; border-top: 1px solid var(--border); }
.up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .up-st { color: var(--muted); font-variant-numeric: tabular-nums; }
.up-row.ok .up-st { color: #00a862; } .up-row.err .up-st { color: #e2445c; white-space: normal; }
.up-bar { grid-column: 1 / -1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; } .up-bar i { display: block; height: 100%; background: var(--accent); transition: width .15s; }
.up-row.ok .up-bar i { background: #00a862; } .up-row.err .up-bar i { background: #e2445c; }
@media (max-width: 760px) { .up-prog { left: 12px; right: 12px; width: auto; bottom: calc(var(--tabh) + var(--sab) + 10px); } }

.av-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.av-crop { display: grid; gap: 10px; justify-items: center; }
.av-crop.hidden, .av-edit.hidden { display: none; }
.avc-stage { position: relative; width: min(280px, 72vw); aspect-ratio: 1; border-radius: 12px; overflow: hidden; touch-action: none; cursor: grab; background: #222; user-select: none; }
.avc-stage:active { cursor: grabbing; }
.avc-stage canvas { width: 100%; height: 100%; display: block; }
.avc-ring { position: absolute; inset: 0; pointer-events: none; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0,0,0,.55); outline: 2px solid rgba(255,255,255,.9); outline-offset: -2px; }
.avc-ctl { display: flex; align-items: center; gap: 8px; width: min(340px, 100%); }
.avc-ctl input[type=range] { flex: 1; min-height: 44px; }
.avc-ctl .icon-btn { font-size: 20px; font-weight: 700; }
.avc-foot { display: flex; gap: 8px; justify-content: flex-end; width: 100%; }
.avc-hint { text-align: center; }
@media (max-width: 760px) {
  .zrow { min-height: 44px; display: flex; align-items: center; }
  .sub-row { min-height: 44px; align-items: center; }
  .sub-chk { width: 28px; height: 28px; margin: 8px; }
  .sub-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
}
.vc-pw-in{width:100%;margin-top:4px;font-size:13px;padding:4px 6px;border:1px solid var(--border);border-radius:6px;background:var(--surface)}
