/* GLIOVA Anforderungen · Oberfläche
 * Hell und dunkel über Farb-Token; keine externen Schriften oder Dateien.
 */

/* ---------- Token ---------- */
:root {
  color-scheme: light;
  --bg: #F4F5F8;
  --surface: #FFFFFF;
  --surface-2: #F0F2F6;
  --surface-3: #E7EAF0;
  --border: #E0E3EA;
  --border-soft: #ECEEF2;
  --border-strong: #CDD2DC;
  --text: #171A21;
  --text-2: #464E5F;
  --muted: #687083;
  --accent: #CF2E4C;
  --accent-hover: #B5253F;
  --accent-text: #A8213C;
  --accent-tint: #FCE9ED;
  --link: #A8213C;
  --focus: #CF2E4C;
  --danger: #C42B45;
  --danger-text: #A41F37;
  --danger-tint: #FCE8EB;
  --bar: #3F78D8;
  --bar-rgb: 63, 120, 216;
  --track: #E6E9EF;
  --shadow: 0 1px 2px rgba(16, 20, 30, .06), 0 4px 16px rgba(16, 20, 30, .06);
  --shadow-lg: 0 10px 40px rgba(16, 20, 30, .22);
  /* Kennzeichnungen (Hintergrund / Schrift) */
  --mu-bg: #EEF0F4; --mu: #4A5263;
  --in-bg: #E4EEFF; --in: #1D55B5;
  --wa-bg: #FFF1D6; --wa: #845000;
  --vi-bg: #EFE8FF; --vi: #5F33BF;
  --ok-bg: #E1F5E9; --ok: #17703F;
  --ac-bg: #FCE6EB; --ac: #A8213C;
  /* Prototyp-Abdeckung: eine Farbe, hell → dunkel */
  --p0: #DCE2EC; --p1: #A9C4F0; --p2: #5E8FE0; --p3: #1F4FA8;
  /* Fortschritt */
  --s-done: #2E9E5B; --s-work: #E3A33B; --s-open: #D8DDE6;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0F1116; --surface: #171A21; --surface-2: #1E222B; --surface-3: #272C37;
    --border: #2A303C; --border-soft: #232833; --border-strong: #3A4150;
    --text: #E8EBF1; --text-2: #B3BACA; --muted: #8B93A5;
    --accent: #D2334F; --accent-hover: #E04461; --accent-text: #FF8DA1; --accent-tint: rgba(255, 110, 135, .14);
    --link: #FF8DA1; --focus: #FF8DA1;
    --danger: #E04461; --danger-text: #FF8DA1; --danger-tint: rgba(255, 90, 115, .14);
    --bar: #6E9CF0; --bar-rgb: 110, 156, 240; --track: #2A303C;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, .55);
    --mu-bg: #262B35; --mu: #B3BACA;
    --in-bg: rgba(110, 156, 240, .16); --in: #9DBEFF;
    --wa-bg: rgba(227, 163, 59, .16); --wa: #F2C27A;
    --vi-bg: rgba(160, 125, 255, .18); --vi: #C7B3FF;
    --ok-bg: rgba(62, 190, 116, .15); --ok: #7FDBA4;
    --ac-bg: rgba(255, 110, 135, .15); --ac: #FF9DAF;
    --p0: #343B4A; --p1: #3C5E9C; --p2: #5D90EA; --p3: #AECBFF;
    --s-done: #3EBE74; --s-work: #E8AE4C; --s-open: #3A4150;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F1116; --surface: #171A21; --surface-2: #1E222B; --surface-3: #272C37;
  --border: #2A303C; --border-soft: #232833; --border-strong: #3A4150;
  --text: #E8EBF1; --text-2: #B3BACA; --muted: #8B93A5;
  --accent: #D2334F; --accent-hover: #E04461; --accent-text: #FF8DA1; --accent-tint: rgba(255, 110, 135, .14);
  --link: #FF8DA1; --focus: #FF8DA1;
  --danger: #E04461; --danger-text: #FF8DA1; --danger-tint: rgba(255, 90, 115, .14);
  --bar: #6E9CF0; --bar-rgb: 110, 156, 240; --track: #2A303C;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .55);
  --mu-bg: #262B35; --mu: #B3BACA;
  --in-bg: rgba(110, 156, 240, .16); --in: #9DBEFF;
  --wa-bg: rgba(227, 163, 59, .16); --wa: #F2C27A;
  --vi-bg: rgba(160, 125, 255, .18); --vi: #C7B3FF;
  --ok-bg: rgba(62, 190, 116, .15); --ok: #7FDBA4;
  --ac-bg: rgba(255, 110, 135, .15); --ac: #FF9DAF;
  --p0: #343B4A; --p1: #3C5E9C; --p2: #5D90EA; --p3: #AECBFF;
  --s-done: #3EBE74; --s-work: #E8AE4C; --s-open: #3A4150;
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); }
h1 { font-size: 24px; line-height: 1.25; margin: 0 0 12px; letter-spacing: -.01em; }
h2 { font-size: 16px; line-height: 1.3; margin: 0 0 12px; }
p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--border-soft); margin: 8px 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
summary { cursor: pointer; }
::selection { background: var(--accent-tint); }

.ic { flex: none; vertical-align: -3px; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); color: var(--text); padding: 8px 12px; border-radius: 8px; box-shadow: var(--shadow); }
.skip:focus { left: 8px; }
.boot { padding: 80px 20px; text-align: center; color: var(--muted); }
.loading { padding: 48px 16px; text-align: center; color: var(--muted); }

.mu { color: var(--muted); }
.hint { font-size: 12.5px; color: var(--muted); }
.lbl { font-size: 11.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.er { color: var(--danger-text); }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.ctr { text-align: center; padding: 14px 0; margin: 0; }
.sp { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; }
.row.sb { justify-content: space-between; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.lnk { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: var(--link); font-size: 13px; font-weight: 500; cursor: pointer; }
.lnk:hover { text-decoration: underline; }

/* ---------- Schaltflächen und Eingaben ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font-weight: 500; white-space: nowrap; cursor: pointer; text-decoration: none; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.pri:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.del { color: var(--danger-text); border-color: color-mix(in srgb, var(--danger) 45%, var(--border-strong)); }
.btn.del:hover { background: var(--danger-tint); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
summary.btn { list-style: none; }
summary.btn::-webkit-details-marker { display: none; }

.ib { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); cursor: pointer; flex: none; text-decoration: none; }
.ib:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.ib.sm { width: 28px; height: 28px; border-radius: 6px; }
.ib:disabled, .ib[aria-disabled="true"] { opacity: .35; pointer-events: none; }

.inp, select { height: 36px; min-width: 0; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); }
textarea.inp { height: auto; padding: 8px 10px; line-height: 1.45; resize: vertical; }
input[type="file"].inp { height: auto; padding: 7px; }
.inp:focus, select:focus { outline: 2px solid var(--focus); outline-offset: -1px; border-color: transparent; }
.inp::placeholder { color: var(--muted); opacity: .85; }
.inp.sm, select.sm { height: 30px; font-size: 13px; }
.inp.num { text-align: right; font-variant-numeric: tabular-nums; }
.inp.color { width: 72px; padding: 3px; cursor: pointer; }
select { cursor: pointer; max-width: 100%; }

.ck { position: relative; display: inline-flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.ck input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); cursor: pointer; }
input[type="checkbox"] { accent-color: var(--accent); }

.field { position: relative; display: flex; flex-direction: column; gap: 5px; min-width: 0; margin: 0; }
.field > span, .field > legend { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
fieldset.field { border: 0; padding: 0; }
fieldset.field > legend { padding: 0; margin-bottom: 6px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.span2 { grid-column: 1 / -1; }
.checks-inline { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.factions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.err { margin: 12px 0 0; color: var(--danger-text); font-size: 13.5px; font-weight: 500; }
.form.card { padding: 20px 22px; }
.narrow-form { max-width: 540px; }

/* Segment, Chips */
.seg { display: inline-flex; padding: 2px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); }
.seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--text-2); cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--accent-tint); color: var(--accent-text); font-weight: 600; }
.chipgrp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chipgrp .lbl { margin-right: 2px; }
.chip { height: 28px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 13px; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--muted); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--accent-tint); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }

/* Menüs */
.newmenu, .usermenu, .dd { position: relative; }
.menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; display: flex; flex-direction: column; min-width: 230px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); }
.menu.right { left: auto; right: 0; }
.menu a, .menu button { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: var(--text); text-align: left; white-space: nowrap; cursor: pointer; text-decoration: none; }
.menu a:hover, .menu button:hover, .menu a:focus-visible, .menu button:focus-visible { background: var(--surface-2); text-decoration: none; outline: none; }
.menu .del { color: var(--danger-text); }
.mh { display: flex; flex-direction: column; padding: 6px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
details.dd > summary { list-style: none; }
details.dd > summary::-webkit-details-marker { display: none; }

/* ---------- Kennzeichnungen ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border-radius: 999px; background: var(--mu-bg); color: var(--mu); font-size: 12px; font-weight: 600; line-height: 21px; white-space: nowrap; vertical-align: middle; }
.pill.mu { background: var(--mu-bg); color: var(--mu); }
.pill.in { background: var(--in-bg); color: var(--in); }
.pill.wa { background: var(--wa-bg); color: var(--wa); }
.pill.vi { background: var(--vi-bg); color: var(--vi); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.ac { background: var(--ac-bg); color: var(--ac); }
.pill.off { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--border-strong); }
.pill.proto { background: transparent; color: var(--text-2); font-weight: 500; box-shadow: inset 0 0 0 1px var(--border); }
.pill.proto i { width: 8px; height: 8px; border-radius: 50%; }
.pill.proto.p0 i { background: var(--p0); box-shadow: inset 0 0 0 1px var(--border-strong); }
.pill.proto.p1 i { background: var(--p1); }
.pill.proto.p2 i { background: var(--p2); }
.pill.proto.p3 i { background: var(--p3); }
i.p0 { background: var(--p0); box-shadow: inset 0 0 0 1px var(--border-strong); }
i.p1 { background: var(--p1); }
i.p2 { background: var(--p2); }
i.p3 { background: var(--p3); }
i.s-done { background: var(--s-done); }
i.s-work { background: var(--s-work); }
i.s-open { background: var(--s-open); }

.mtag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; vertical-align: middle; }
.mtag i { width: 8px; height: 8px; border-radius: 2px; background: var(--mc); flex: none; }
.stag { display: inline-block; padding: 0 6px; border: 1px solid var(--border-strong); border-radius: 4px; color: var(--text-2); font-size: 11px; font-weight: 700; line-height: 18px; white-space: nowrap; }
.ref { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--link); white-space: nowrap; }
.lv { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 3px; border-radius: 4px; background: var(--in-bg); color: var(--in); font-size: 10px; font-weight: 700; vertical-align: 1px; }
.tag { display: inline-block; margin: 1px 2px 1px 0; padding: 0 6px; border-radius: 4px; background: var(--surface-2); font-size: 12px; }
.tags { color: var(--muted); }

.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; padding: 0; border: 0; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; vertical-align: middle; }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; background: #5B6B8C; cursor: default; }

/* Fortschrittsbalken */
.bar { display: inline-block; width: 64px; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; vertical-align: middle; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--bar); }
.bar.ok i { background: var(--s-done); }
.bar.er i { background: var(--danger); }
.bar.wide { display: block; width: 100%; margin: 8px 0; }
.stack-bar { display: inline-flex; gap: 2px; width: 100%; max-width: 260px; min-width: 100px; height: 10px; border-radius: 4px; overflow: hidden; vertical-align: middle; }
.stack-bar i { display: block; min-width: 3px; height: 100%; }
.stack-bar.prog { height: 12px; max-width: 240px; }
.wbar { min-width: 190px; white-space: nowrap; }
.legend { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
i.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }

/* Hinweisbänder und Leerzustand */
.band { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; margin-bottom: 16px; border-radius: 10px; font-size: 13.5px; }
.band .ic { margin-top: 1px; }
.band.in { background: var(--in-bg); color: var(--in); }
.band.wa { background: var(--wa-bg); color: var(--wa); }
.band.ok { background: var(--ok-bg); color: var(--ok); }
.band a { color: inherit; text-decoration: underline; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 44px 16px; text-align: center; color: var(--text-2); }
.empty .ic { color: var(--muted); margin-bottom: 4px; }
.empty span { color: var(--muted); max-width: 46ch; }
.empty .btn { margin-top: 10px; }

/* ---------- Rahmen ---------- */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.top .brand { display: flex; align-items: center; gap: 10px; flex: none; color: var(--text); text-decoration: none; }
.top .brand span { display: flex; flex-direction: column; line-height: 1.15; }
.top .brand b { font-size: 14.5px; }
.top .brand small { font-size: 11.5px; color: var(--muted); }
.menu-btn { display: none; }
.qsearch { position: relative; display: flex; align-items: center; flex: 0 1 400px; min-width: 0; margin: 0 0 0 20px; }
.qsearch .ic { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.qsearch input { width: 100%; height: 36px; padding: 0 10px 0 34px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); }
.qsearch input:focus { background: var(--surface); outline: 2px solid var(--focus); outline-offset: -1px; }

.layout { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: calc(100vh - 56px); }
.side { position: sticky; top: 56px; display: flex; flex-direction: column; gap: 2px; height: calc(100vh - 56px); padding: 12px 10px; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border); }
.ni { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-2); font-weight: 500; text-decoration: none; }
.ni:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.ni[aria-current="page"] { background: var(--accent-tint); color: var(--accent-text); }
.ni span { flex: 1; }
.ni .n { flex: none; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.side .sep { height: 1px; margin: 8px 4px; background: var(--border); }
.side .grow { flex: 1; }
.side .links { display: flex; flex-direction: column; gap: 1px; padding-top: 8px; border-top: 1px solid var(--border); }
.side .links a { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; color: var(--text-2); font-size: 12.5px; }
.side .links a:hover { background: var(--surface-2); text-decoration: none; }
.scrim { display: none; }
.main { min-width: 0; padding: 24px 28px 64px; }
.main:focus { outline: none; }

/* Projektwechsel in der Seitenleiste */
.pswitch { position: relative; margin: 0 0 10px; }
.pbtn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); text-align: left; cursor: pointer; }
.pbtn:hover { border-color: var(--border-strong); }
.pbtn > span { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.25; }
.pbtn b { overflow: hidden; font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.pbtn small { overflow: hidden; color: var(--muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.pswitch .menu { right: 0; min-width: 0; max-height: 60vh; overflow-y: auto; }
.menu .pitem { align-items: flex-start; white-space: normal; }
.menu .pitem i.pdot { margin-top: 4px; }
.menu .pitem span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.menu .pitem b { font-weight: 500; overflow-wrap: anywhere; }
.menu .pitem small { color: var(--muted); font-size: 11.5px; }
.menu a[aria-current="true"] { background: var(--accent-tint); color: var(--accent-text); }
.msep { height: 1px; margin: 4px 6px; background: var(--border); }
.menu .mh.hint { border: 0; }
i.pdot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--c); vertical-align: 0; }
.side-lbl { padding: 4px 10px 2px; }
.side .ni i.pdot { margin: 0 4px; }
.side .ni .ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.band.archived { margin: -8px 0 16px; }

/* ---------- Seiten ---------- */
.page { max-width: 1240px; margin: 0 auto; }
.page.wide { max-width: none; }
.page.narrow-wide { max-width: 940px; }
.ph { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.ph h1 { margin-bottom: 4px; }
.ph p { max-width: 78ch; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.crumbs a { color: var(--text-2); }

.card { margin-bottom: 16px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.card.flush { padding: 0; }
.card > .row.sb { margin-bottom: 12px; }
.card > .row.sb h2 { margin: 0; }
.cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.cols2 > .card { margin-bottom: 0; }

.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none; }
a.kpi:hover { border-color: var(--accent); text-decoration: none; }
.kpi b { font-size: 26px; font-weight: 650; line-height: 1.2; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }

.hbars { display: flex; flex-direction: column; gap: 2px; }
.hbar { display: grid; grid-template-columns: 120px minmax(0, 1fr) 44px; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 6px; color: var(--text); text-decoration: none; }
.hbar:hover { background: var(--surface-2); text-decoration: none; }
.hbar .b { height: 10px; border-radius: 5px; background: var(--track); overflow: hidden; }
.hbar .b i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--bar); }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

.lrow { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 6px; border-radius: 8px; color: var(--text); text-decoration: none; }
a.lrow:hover { background: var(--surface-2); text-decoration: none; }
.lrow .tx { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.lrow .tx b, .lrow .tx a { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.lrow .tx a { color: var(--text); }
.lrow .tx span { font-size: 12px; color: var(--muted); }
.lrow .mt { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12px; white-space: nowrap; }
.sw { flex: none; width: 6px; height: 30px; border-radius: 3px; background: var(--c); }

.feed { margin: 0; padding: 0; list-style: none; }
.feed li { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.feed li:last-child { border-bottom: 0; }
.feed .when { color: var(--muted); white-space: nowrap; }
.feed .who { color: var(--muted); text-align: right; white-space: nowrap; }
.feed li > span:nth-child(2) { overflow-wrap: anywhere; }

/* Tabellen */
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { padding: 8px 10px; border-bottom: 1px solid var(--border); color: var(--text-2); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl .c { text-align: center; }
.tbl.compact td, .tbl.compact th { padding: 5px 8px; }
.tbl td a:not(.ref):not(.btn):not(.ib):not(.cell) { color: var(--text); }
.tbl td a:not(.ref):not(.btn):not(.ib):not(.cell):hover { color: var(--link); }
.tbl tr.off td { opacity: .55; }
.tbl tr.selected td { background: var(--accent-tint); }
.tbl .sort { display: inline-flex; align-items: center; gap: 3px; padding: 0; border: 0; background: none; color: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tbl .sort:hover { color: var(--text); }
.tbl .sort[aria-sort="ascending"], .tbl .sort[aria-sort="descending"] { color: var(--accent-text); }
.tbl .cb { width: 34px; padding-right: 0; }
.tbl .cb input { width: 16px; height: 16px; margin: 0; vertical-align: middle; cursor: pointer; }
.tbl tr.grp th { padding: 7px 10px; background: var(--surface-2); text-align: left; }
.tbl tr.grp th .mu { margin-left: 6px; font-weight: 500; }
.tbl.list td.ttl { min-width: 260px; }
.tbl.list td.ttl > a { font-weight: 500; }
.tbl .sub { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; font-size: 12px; }
.tbl .sub:empty { display: none; }
.tbl .num .bar { margin-left: 6px; width: 48px; }
.tbl .icons { text-align: right; white-space: nowrap; }
.tbl .icons span { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; color: var(--muted); font-size: 12px; }
.tbl tr.sum td { background: var(--surface-2); font-weight: 600; }
.tbl.matrix th.c .hint { display: block; max-width: 120px; margin: 0 auto; font-weight: 500; font-size: 11px; white-space: normal; }
.cell { display: inline-flex; flex-direction: column; align-items: center; min-width: 66px; padding: 4px 8px; border-radius: 8px; background: rgba(var(--bar-rgb), var(--a)); color: var(--text); line-height: 1.25; text-decoration: none; }
.cell:hover { outline: 2px solid var(--bar); text-decoration: none; }
.cell b { font-size: 15px; }
.cell span { font-size: 11px; color: var(--text-2); }

/* Filter, Sammelaktionen */
.filters { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; }
.frow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.frow.card { padding: 10px 12px; }
.frow.filters { flex-direction: row; }
.frow.chips { gap: 10px 24px; }
.frow.small { gap: 8px 20px; color: var(--text-2); font-size: 13px; }
.frow > label { position: relative; }
.frow select { max-width: 230px; }
.fsearch { position: relative; display: flex; align-items: center; flex: 1 1 260px; min-width: 200px; }
.fsearch.sm { flex: 0 1 200px; min-width: 150px; }
.fsearch .ic { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.fsearch input { width: 100%; height: 36px; padding: 0 10px 0 34px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); }
.fsearch input:focus { outline: 2px solid var(--focus); outline-offset: -1px; border-color: transparent; }
.filters-inline > label { position: relative; }
.filters-inline select { max-width: 200px; }
.bulk { position: sticky; top: 64px; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--accent); border-radius: 12px; box-shadow: var(--shadow); }
.bulk select { height: 30px; font-size: 13px; max-width: 190px; }

/* ---------- Detail ---------- */
.dhd { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.dhd .t { flex: 1 1 420px; min-width: 0; }
.dhd h1 { margin: 6px 0 0; font-size: 22px; line-height: 1.3; overflow-wrap: anywhere; }
.refrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bigref { margin-right: 4px; color: var(--accent-text); font-family: var(--mono); font-size: 14px; font-weight: 700; }
.jump { position: sticky; top: 56px; z-index: 5; display: flex; gap: 2px; margin: 0 0 10px; padding: 8px 0; overflow-x: auto; background: var(--bg); scrollbar-width: none; }
.jump::-webkit-scrollbar { display: none; }
.jump button { flex: none; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--text-2); font-size: 13px; white-space: nowrap; cursor: pointer; }
.jump button:hover { background: var(--surface); color: var(--text); }
.jump b { margin-left: 4px; color: var(--text); font-weight: 600; }
.dgrid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 16px; }
.dmain > .card, [id^="sec-"] { scroll-margin-top: 112px; }
.txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.prose .txt { line-height: 1.6; }
.story { margin: 14px 0 0; padding: 10px 14px; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; background: var(--surface-2); white-space: pre-wrap; }
.story .lbl, .notes .lbl { display: block; margin-bottom: 4px; white-space: normal; }
.notes { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
h2.inline { display: inline; margin: 0; }
details > summary .hint { margin-left: 6px; }
details[open] > summary { margin-bottom: 10px; }

.crit { margin: 6px 0 0; padding: 0; list-style: none; }
.crit li { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 2px 10px; padding: 8px 2px; border-bottom: 1px solid var(--border-soft); }
.crit li:last-child { border-bottom: 0; }
.crit li .ck { flex: 1 1 320px; min-width: 0; }
.crit li .ck input { width: 18px; height: 18px; margin-top: 1px; }
.crit .ctext { overflow-wrap: anywhere; }
.crit li.done .ctext { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.crit .who { align-self: center; font-size: 12px; white-space: nowrap; }
.crit li.editing { display: block; }
.crit li.editing .addline { margin: 0; }
.acts { display: inline-flex; gap: 2px; opacity: .55; transition: opacity .12s; }
li:hover > .acts, li:focus-within > .acts, figure:hover .acts, figure:focus-within .acts { opacity: 1; }
.addline { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; }
.addline .inp { flex: 1; }
.addline textarea.inp { min-height: 64px; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 18px; margin-bottom: 14px; }
.facts > div { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.facts b { font-size: 16px; font-weight: 600; }
.facts .bar { display: block; width: 100%; max-width: 220px; margin-top: 4px; }
.facts .inl { display: inline-flex; align-items: center; gap: 6px; }
.facts .inl .inp { width: 90px; }
.facts select.sm { width: 90px; }
.facts.card { padding: 16px 18px; }

.impls { margin: 0 0 4px; padding: 0; list-style: none; }
.impls li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.impls .tx { display: flex; flex: 1; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }

.grid-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.grid-form label { display: flex; flex: 0 1 auto; flex-direction: column; gap: 4px; min-width: 110px; }
.grid-form label > span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.grid-form label.grow { flex: 1 1 200px; }
.grid-form .inp.num { width: 90px; }
.grid-form input[type="date"] { min-width: 140px; }

.rel { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 22px; }
.rel > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rel .lbl { margin-bottom: 2px; }
.rel .lrow { padding: 4px; }

.comments { margin: 0; padding: 0; list-style: none; }
.comments li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.comments li > div { flex: 1; min-width: 0; }
.comments .row { gap: 8px; }
.comments .row .ib { margin-left: auto; }

.props { padding: 10px 14px; }
.prop { display: grid; grid-template-columns: 108px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 34px; padding: 4px 0; font-size: 13.5px; }
.prop > .lbl { font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.prop .pv { min-width: 0; overflow-wrap: anywhere; }
.prop select { width: 100%; height: 32px; }
.thumbs .lbl { display: block; margin-bottom: 8px; }
.tgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.thumb { aspect-ratio: 4 / 3; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); overflow: hidden; cursor: zoom-in; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* Anhänge */
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.agrid.big { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.att { display: flex; flex-direction: column; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.aimg { display: block; width: 100%; aspect-ratio: 16 / 10; padding: 0; border: 0; border-bottom: 1px solid var(--border-soft); background: var(--surface-2); overflow: hidden; cursor: zoom-in; }
.aimg img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .2s; }
.aimg:hover img { transform: scale(1.02); }
.aimg.icon { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--text-2); font-size: 12px; font-weight: 600; text-decoration: none; cursor: pointer; }
.aimg.icon:hover { color: var(--text); text-decoration: none; }
.att figcaption { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px 6px; min-width: 0; }
.att figcaption b { overflow: hidden; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.att figcaption .acts { margin: 2px 0 0 -6px; }
.upl { display: flex; flex-direction: column; margin-top: 14px; }
.drop { position: relative; display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.dz { display: flex; flex: 1 1 300px; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 18px; border: 1.5px dashed var(--border-strong); border-radius: 10px; color: var(--text-2); text-align: center; cursor: pointer; transition: background .12s, border-color .12s; }
.dz:hover, .dz.over { border-color: var(--accent); background: var(--accent-tint); color: var(--text); }
.drop input[type="file"]:focus-visible + .dz { outline: 2px solid var(--focus); outline-offset: 2px; }
.drop .kind { display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.drop .kind span { font-size: 12px; font-weight: 600; color: var(--text-2); }

/* ---------- Pakete ---------- */
.pgroup { margin-bottom: 24px; }
.pgroup h2 { margin-bottom: 2px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 10px; }
.pcard { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--c); border-radius: 12px; color: var(--text); text-decoration: none; }
.pcard:hover { box-shadow: var(--shadow); border-color: var(--border-strong); border-top-color: var(--c); text-decoration: none; }
.pcard .row.sb { flex-wrap: nowrap; align-items: flex-start; }
.pcard .row.sb b { min-width: 0; }
.pcard .bar.wide { margin: 2px 0; }
.prow { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }

/* ---------- Roadmap ---------- */
.rm { --lw: 230px; overflow: hidden; }
.rm-scroll { overflow-x: auto; overflow-y: hidden; }
.rm-canvas { position: relative; width: calc(var(--w) + var(--lw)); }
.rm-row { display: flex; }
.rm-row > .rm-lab, .rm-row > .rm-track { border-bottom: 1px solid var(--border-soft); }
.rm-row.head > .rm-lab, .rm-row.head > .rm-track { border-bottom-color: var(--border); }
.rm-lab { position: sticky; left: 0; z-index: 3; display: flex; flex: 0 0 var(--lw); flex-direction: column; justify-content: center; gap: 1px; width: var(--lw); padding: 8px 12px; background: var(--surface); border-right: 1px solid var(--border); font-size: 13px; }
.rm-lab b { font-weight: 600; }
.rm-row.head, .rm-row.head .rm-lab { background: var(--surface-2); }
.rm-track { position: relative; flex: none; }
.rm-track.head { height: 34px; }
.rm-m { position: absolute; top: 0; height: 100%; display: flex; align-items: center; padding-left: 6px; border-left: 1px solid var(--border); color: var(--text-2); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.rm-gl { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border-soft); }
.rm-gl.q { background: var(--border); }
.rm-bar { position: absolute; z-index: 1; display: flex; align-items: center; height: 24px; border: 1px solid color-mix(in srgb, var(--c) 75%, var(--surface)); border-radius: 6px; background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--text); font-size: 12px; font-weight: 500; overflow: hidden; text-decoration: none; }
.rm-bar i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: inherit; background: color-mix(in srgb, var(--c) 42%, var(--surface)); }
.rm-bar span { position: relative; padding: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-bar:hover { box-shadow: 0 0 0 2px var(--c); text-decoration: none; }
.rm-bar.off { opacity: .55; border-style: dashed; }
.rm-bar.out { overflow: visible; }
.rm-bar.out span { position: absolute; left: calc(100% + 4px); padding: 0 4px; border-radius: 4px; background: var(--surface); overflow: visible; color: var(--text-2); }
.rm-bar.out.l span { left: auto; right: calc(100% + 4px); }
.rm-bar.ok span::before { content: "✓ "; }
.rm-gate { position: absolute; top: 0; bottom: 0; z-index: 0; width: 0; border-left: 1.5px dashed var(--accent); color: var(--accent-text); }
.rm-gate .ic { position: absolute; top: -1px; left: -8px; fill: var(--accent); stroke: var(--surface); }
.rm-gate span { position: absolute; bottom: 2px; left: 5px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.rm-today { position: absolute; top: 0; bottom: 0; left: calc(var(--lw) + var(--tx)); z-index: 2; border-left: 2px solid var(--accent); pointer-events: none; }
.rm-today span { position: absolute; bottom: 6px; left: 4px; padding: 1px 6px; border-radius: 4px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; white-space: nowrap; }

/* ---------- Board ---------- */
.board { display: grid; grid-auto-columns: minmax(250px, 1fr); grid-auto-flow: column; align-items: start; gap: 12px; padding-bottom: 10px; overflow-x: auto; }
.board .col { display: flex; flex-direction: column; min-height: 220px; padding: 8px; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 12px; transition: background .12s, outline-color .12s; }
.board .col.over { outline: 2px dashed var(--accent); outline-offset: -2px; background: var(--accent-tint); }
.board .col > header { display: flex; align-items: center; gap: 8px; padding: 4px 4px 10px; }
.board .col > header .n { font-weight: 700; font-variant-numeric: tabular-nums; }
.board .col > header .hint { margin-left: auto; }
.board .cards { display: flex; flex: 1; flex-direction: column; gap: 8px; min-height: 60px; }
.kcard { display: flex; flex-direction: column; gap: 6px; padding: 9px 11px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--mc); border-radius: 8px; box-shadow: 0 1px 1px rgba(0, 0, 0, .03); }
.kcard[draggable="true"] { cursor: grab; }
.kcard.dragging { opacity: .45; }
.kcard .kt { color: var(--text); font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.kcard .row.hint { flex-wrap: wrap; gap: 4px 8px; }
.kcard .bar { width: 100%; }

/* ---------- Diagramme ---------- */
.vbars { display: flex; align-items: stretch; gap: 6px; height: 190px; padding-top: 18px; }
.vb { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.vt { position: relative; flex: 1; border-bottom: 1px solid var(--border); }
.vt i { position: absolute; bottom: 0; left: 16%; right: 16%; min-height: 1px; border-radius: 4px 4px 0 0; background: var(--bar); }
.vb:hover .vt i { filter: brightness(1.1); }
.vt b { position: absolute; left: -10px; right: -10px; margin-bottom: 3px; color: var(--text-2); font-size: 11px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.vb > span { height: 20px; padding-top: 4px; color: var(--muted); font-size: 11px; text-align: center; }

/* ---------- Ideen ---------- */
.igrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.icard { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.icover { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; border-bottom: 1px solid var(--border-soft); }
.icover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ph-ic { display: grid; place-items: center; height: 100%; color: var(--muted); }
.ib-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 12px 14px; }
.ib-body > .row { flex-wrap: wrap; gap: 6px; }
.ib-body p { margin: 0; font-size: 13px; }
.it { color: var(--text); font-weight: 600; line-height: 1.35; }
.it .ref { margin-right: 4px; }
.ifoot { margin-top: auto; padding-top: 4px; flex-wrap: nowrap; }
.ifoot .hint { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 3px; text-align: right; }
.vote { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.vote:hover { border-color: var(--accent); }
.vote[aria-pressed="true"] { background: var(--accent-tint); border-color: var(--accent); color: var(--accent-text); }
.vote.lg { height: 36px; padding: 0 14px; font-size: 14px; }

/* ---------- Einstellungen ---------- */
.tabs { display: flex; gap: 2px; margin-bottom: 16px; overflow-x: auto; border-bottom: 1px solid var(--border); }
.tabs a { margin-bottom: -1px; padding: 10px 14px; border-bottom: 2px solid transparent; color: var(--text-2); font-weight: 500; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--text); }

/* ---------- Dialoge, Bildansicht, Meldungen ---------- */
.ov { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; overflow-y: auto; background: rgba(10, 12, 18, .5); animation: ov-in .15s ease-out; }
.dlg { display: flex; flex-direction: column; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); animation: dlg-in .18s ease-out; }
.dlg.wide { max-width: 720px; }
.dh { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 12px 6px 20px; }
.dh h2 { margin: 0; font-size: 17px; }
.db { padding: 8px 20px 4px; overflow-y: auto; }
.db > p { color: var(--text-2); }
.df { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; }
.df .btn.del { background: var(--danger); border-color: var(--danger); color: #fff; }
.df .btn.del:hover { background: var(--accent-hover); }
.plain { margin: 8px 0 14px; padding-left: 18px; color: var(--text-2); }
.plain li { margin-bottom: 4px; }
@keyframes ov-in { from { opacity: 0; } }
@keyframes dlg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.ov.lb { padding: 0; background: rgba(5, 6, 10, .9); }
.lbox { display: flex; flex-direction: column; width: 100%; height: 100%; }
.lbh { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 14px; color: #fff; }
.lbh b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbh .hint { color: rgba(255, 255, 255, .7); white-space: nowrap; }
.lbh .ib { color: #fff; }
.lbh .ib:hover { background: rgba(255, 255, 255, .14); }
.lbb { position: relative; display: flex; flex: 1; align-items: center; justify-content: center; min-height: 0; padding: 0 60px 18px; }
.lbb img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; background: #fff; }
.lbb .ib.nav { position: absolute; top: 50%; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; transform: translateY(-50%); }
.lbb .ib.nav:hover { background: rgba(255, 255, 255, .24); }
.lbb .ib.nav.l { left: 8px; }
.lbb .ib.nav.r { right: 8px; }

.toasts { position: fixed; bottom: 16px; left: 50%; z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(460px, calc(100vw - 32px)); transform: translateX(-50%); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 14px; border-left: 4px solid #3EBE74; border-radius: 10px; background: #1F232C; color: #fff; box-shadow: var(--shadow-lg); font-size: 14px; pointer-events: auto; animation: dlg-in .18s ease-out; }
.toast.er { border-left-color: #FF6B83; background: #8E1C31; }
.toast span { flex: 1; }
.toast button { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: none; color: #fff; opacity: .8; cursor: pointer; }
.toast button:hover { background: rgba(255, 255, 255, .14); opacity: 1; }
.toast button:focus-visible { outline: 2px solid #fff; }

/* ---------- Anmeldung und Einrichtung ---------- */
body.auth { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; }
.auth-box { width: 100%; max-width: 400px; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.auth-box.wide { max-width: 580px; }
.auth-box .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.auth-box .brand div { display: flex; flex-direction: column; line-height: 1.2; }
.auth-box .brand span { color: var(--muted); font-size: 12.5px; }
.auth-box h1 { margin-bottom: 16px; font-size: 22px; }
.auth-box > .hint { margin-top: 16px; }
.alert { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; font-size: 13.5px; }
.alert.er { background: var(--danger-tint); color: var(--danger-text); }
.checks { display: flex; flex-direction: column; gap: 4px; margin: 0 0 16px; padding: 0; list-style: none; font-size: 13.5px; }
.checks .ok { color: var(--ok); }
.checks .er { color: var(--danger-text); font-weight: 600; }
.steps-list { padding-left: 20px; line-height: 1.7; }

/* ---------- Bildschirmbreiten ---------- */
@media (max-width: 1100px) {
  .dgrid { grid-template-columns: minmax(0, 1fr); }
  .dside { order: -1; }
  .props { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: 24px; }
  .props hr { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .menu-btn { display: inline-grid; margin-left: -6px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: 56px; bottom: 0; left: 0; z-index: 25; width: 270px; height: auto; visibility: hidden; transform: translateX(-100%); transition: transform .2s ease, visibility .2s; box-shadow: var(--shadow-lg); }
  .nav-open .side { visibility: visible; transform: none; }
  .nav-open .scrim { position: fixed; inset: 56px 0 0; z-index: 24; display: block; background: rgba(0, 0, 0, .35); }
  .main { padding: 18px 16px 64px; }
  .cols2 { grid-template-columns: minmax(0, 1fr); }
  .qsearch { margin-left: 8px; }
}
@media (max-width: 640px) {
  .hide-s { display: none; }
  .top { gap: 4px; padding: 0 10px; }
  .top .brand span { display: none; }
  .qsearch { margin-left: 4px; flex: 1 1 auto; }
  .newmenu .btn { width: 36px; padding: 0; }
  h1, .ph h1 { font-size: 21px; }
  .dhd h1 { font-size: 19px; }
  .fgrid { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 14px; }
  .form.card { padding: 16px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 12px; }
  .kpi b { font-size: 22px; }
  .hbar { grid-template-columns: 104px minmax(0, 1fr) 36px; }
  .feed li { grid-template-columns: minmax(0, 1fr) auto; }
  .feed .when { grid-column: 1 / -1; font-size: 12px; }
  .props { grid-template-columns: minmax(0, 1fr); }
  .prop { grid-template-columns: 100px minmax(0, 1fr); }
  .frow > label:not(.fsearch):not(.ck), .frow select { flex: 1 1 140px; max-width: none; }
  .frow select { width: 100%; }
  .filters-inline > label:not(.fsearch) { flex: 1 1 130px; }
  .filters-inline select { width: 100%; max-width: none; }
  .bulk { top: 60px; }
  .bulk select { flex: 1 1 130px; max-width: none; }
  .grid-form label { flex: 1 1 130px; }
  .addline { flex-wrap: wrap; }
  .addline .inp { flex: 1 1 100%; }
  .drop .kind { flex: 1 1 100%; }
  .dlg { max-height: calc(100vh - 16px); }
  .ov { padding: 8px; }
  .db { padding: 8px 16px 4px; }
  .df { padding: 12px 16px 16px; }
  .lbb { padding: 0 0 12px; }
  .lbh .hint { display: none; }
  .pgrid, .igrid { grid-template-columns: minmax(0, 1fr); }
  .agrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .agrid.big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rm { --lw: 150px; }
  .rm-lab { padding: 6px 8px; font-size: 12px; }
  .board { grid-auto-columns: minmax(78vw, 1fr); }
  .auth-box { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .top, .side, .scrim, .jump, .tools, .bulk, .grid-form, .addline, .upl, .acts, .toasts { display: none !important; }
  .layout { display: block; }
  .main { padding: 0; }
  .card { break-inside: avoid; border-color: #ccc; }
  body { background: #fff; }
}

/* ---------- Projekte ---------- */
.prjgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 18px; }
.prj { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--c); border-radius: 12px; color: var(--text); text-decoration: none; }
.prj:hover { box-shadow: var(--shadow); border-color: var(--border-strong); border-left-color: var(--c); text-decoration: none; }
.prj.off { opacity: .7; }
.prj .row.sb { flex-wrap: nowrap; }
.prj .row .row { gap: 6px; }
.pcode { font-family: var(--mono); font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.pname { font-size: 18px; font-weight: 650; line-height: 1.25; }
.pdesc { color: var(--text-2); font-size: 13px; }
.pstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.pstats span { display: flex; flex-direction: column; color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.pstats b { color: var(--text); font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
.prj .bar.wide { margin: 2px 0; }
.prj .prow .ic { vertical-align: -1px; }
.rchip { display: inline-flex; align-items: center; gap: 5px; margin: 1px 4px 1px 0; padding: 0 7px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 20px; white-space: nowrap; }
.rchip small { color: var(--muted); font-weight: 500; }
.card.danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.card .row .btn + .btn { margin-left: 0; }
fieldset.projroles { margin-top: 14px; }
fieldset.projroles[disabled] .tw { opacity: .5; }
.projroles .tbl td { padding: 4px 8px; }
.projroles select { min-width: 150px; }
@media (max-width: 640px) {
  .prjgrid { grid-template-columns: minmax(0, 1fr); }
  .pstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
