/* REACH Planer – Stil „Race Control“ (Regatta-TV-Grafik / Zeitnahme): hartes Schwarz, Blau als Signal, Haarlinien,
   schräge Kennzeichen im Markenwinkel 10,5°, kursive Versal-Titel, Tabellenziffern.
   Designsystem nach marken/reach/marken-tokens-2026-10-03.md
   Farben: Schwarz, Weiß, REACH-Blau #065EDD (Flächen/Buttons), Blau hell #5B97F0 (nur Links/Fokus/kleine Marker auf Schwarz).
   Schrift: Barlow (Text), Barlow Semi Condensed 600 kursiv (Titel). Markenwinkel 10,5°. Keine weiteren Farben außer Funktionsfarben. */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(/static/fonts/barlow-400-latin.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(/static/fonts/barlow-500-latin.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(/static/fonts/barlow-600-latin.woff2) format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 500; font-display: swap; src: url(/static/fonts/barlow-semi-condensed-500-latin.woff2) format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-display: swap; src: url(/static/fonts/barlow-semi-condensed-600-latin.woff2) format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-style: italic; font-display: swap; src: url(/static/fonts/barlow-semi-condensed-600-italic-latin.woff2) format("woff2"); }

:root {
  --bg: #000000;
  --surface: #0a0b0d;
  --surface-2: #121317;
  --surface-3: #1b1d23;
  --ink: #ffffff;
  --ink-2: #a9adb8;
  --ink-3: #6f7380;
  --line: #22242b;
  --line-2: #2f323b;
  --brand: #065edd;
  --brand-hover: #1b6ff0;
  --brand-ink: #ffffff;
  --link: #5b97f0;
  --brand-soft: rgba(6, 94, 221, .16);
  --brand-deep: #04163a;
  --ok: #3ddc97; --ok-soft: rgba(61, 220, 151, .12);
  --warn: #ffb84d; --warn-soft: rgba(255, 184, 77, .12);
  --err: #ff9a85; --err-soft: rgba(255, 120, 100, .13);
  --radius: 3px;
  --radius-s: 2px;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --side: 248px;
  --stripes: repeating-linear-gradient(-79.5deg, transparent 0 22px, var(--brand) 22px 30px, transparent 30px 44px, rgba(6,94,221,.55) 44px 47px);
  color-scheme: dark;
}
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f3f5f9; --surface-3: #e8ecf3; --ink: #000; --ink-2: #444; --ink-3: #666; --line: #d6d9e0; --line-2: #c3c7d0; --link: #065edd; color-scheme: light; }
  .side, .tabbar, .topbar, .no-print, .quick { display: none !important; }
  .main { margin: 0 !important; padding: 0 !important; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
::selection { background: var(--brand); color: #fff; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; letter-spacing: -.005em; }
h1 { font-size: 2rem; line-height: 1.1; margin: 0 0 .35rem; font-style: italic; }
h2 { font-size: 1.12rem; margin: 0 0 .8rem; letter-spacing: .01em; }
h3 { font-size: 1rem; margin: 0 0 .5rem; }
.eyebrow { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; color: var(--ink-3); margin: 0 0 .3rem; }
.eyebrow a { color: var(--ink-2); }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: .84rem; }
.tiny { font-size: .75rem; }
.mono { font-family: var(--mono); font-size: .9em; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }

/* ---------- Gerüst ---------- */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 40; background: #000; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; overflow-y: auto; transform: translateX(-100%); transition: transform .2s ease;
}
.side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.6); }
.side-brand { position: relative; display: block; padding: 1.4rem 1.25rem 1.2rem; overflow: hidden; border-bottom: 1px solid var(--line); }
.side-brand::after { content: ""; position: absolute; top: 0; bottom: 0; right: -30px; width: 120px; background: var(--stripes); opacity: .9; -webkit-mask: linear-gradient(90deg, transparent, #000 60%); mask: linear-gradient(90deg, transparent, #000 60%); }
.side-brand img { display: block; height: 22px; width: auto; position: relative; z-index: 1; }
.side-brand span { display: block; margin-top: .45rem; font: 600 .68rem/1 var(--font-display); letter-spacing: .2em; color: var(--ink-2); text-transform: uppercase; position: relative; z-index: 1; }
.side-brand:hover { text-decoration: none; }
.side nav { padding: .75rem .6rem; display: grid; gap: 2px; }
.side .navlabel { font: 600 .66rem/1 var(--font-display); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); padding: 1rem .7rem .4rem; }
.side nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: 10px; color: var(--ink-2); font-weight: 500; }
.side nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.side nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.side nav a.active { background: var(--brand-soft); color: #fff; box-shadow: inset 2px 0 0 var(--brand); }
.side nav a .count { margin-left: auto; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 600; border-radius: 999px; padding: .05rem .45rem; }
.side-foot { margin-top: auto; padding: .9rem 1.2rem 1.2rem; border-top: 1px solid var(--line); display: flex; align-items: center; gap: .6rem; }
.side-foot a { color: var(--ink); font-weight: 500; }
.side-foot form { margin-left: auto; }

.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .6rem; padding: .6rem 1rem; padding-top: max(.6rem, env(safe-area-inset-top)); background: rgba(5,5,5,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar .logo-sm { display: flex; align-items: center; }
.topbar .logo-sm img { height: 16px; }
.topsearch { flex: 1; max-width: 560px; }
.topsearch input { width: 100%; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); padding: .5rem 1rem; }
.iconbtn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: transparent; border: 1px solid transparent; color: var(--ink); cursor: pointer; }
.iconbtn:hover { background: var(--surface-2); }
.iconbtn svg { width: 20px; height: 20px; }

.main { padding: 1.25rem 1rem 6.5rem; max-width: 1400px; }
.main-plain { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: var(--bg); position: relative; overflow: hidden; }
.main-plain::before { content: ""; position: absolute; top: -10%; bottom: -10%; right: -8%; width: 38%; background: var(--stripes); opacity: .8; pointer-events: none; }

@media (min-width: 1000px) {
  .side { transform: none; }
  .side.open { box-shadow: none; }
  .main, .topbar { margin-left: var(--side); }
  .topbar .navtoggle, .topbar .logo-sm { display: none; }
  .main { padding: 1.75rem 2.25rem 3rem; }
  .tabbar { display: none !important; }
}

/* Schnellanlage „+ Neu“ */
.quick { position: relative; }
.quick > summary { list-style: none; }
.quick > summary::-webkit-details-marker { display: none; }
.quick-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: .35rem; box-shadow: 0 20px 50px rgba(0,0,0,.6); z-index: 50; display: grid; }
.quick-menu a { padding: .55rem .75rem; border-radius: 8px; color: var(--ink); }
.quick-menu a:hover { background: var(--surface-3); text-decoration: none; }

/* Tab-Leiste (Handy) */
.tabbar { position: fixed; inset: auto 0 0 0; z-index: 35; display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(5,5,5,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .5rem 0 .45rem; color: var(--ink-3); font: 500 .68rem/1.1 var(--font); background: none; border: 0; cursor: pointer; position: relative; }
.tabbar svg { width: 22px; height: 22px; }
.tabbar .on { color: #fff; }
.tabbar .on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; background: var(--brand); }
.tabbar .dot { position: absolute; top: .35rem; left: 56%; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

/* ---------- Bausteine ---------- */
.pagehead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.4rem; }
.pagehead .sub { color: var(--ink-2); margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.stack { display: grid; gap: .9rem; }
.stack-s { display: grid; gap: .45rem; }
.grid { display: grid; gap: 1rem; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.grid-main { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .grid-main { grid-template-columns: minmax(0, 1fr) 360px; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.15rem; min-width: 0; }
.card + .card { margin-top: 1rem; }
.grid > .card + .card, .grid-2 > .card + .card, .grid-3 > .card + .card { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .8rem; }
.card-head h2 { margin: 0; }
.card.narrow { max-width: 460px; width: 100%; position: relative; z-index: 1; padding: 2rem; }
.card.accent { border-color: var(--brand); background: linear-gradient(135deg, rgba(6,94,221,.18), var(--surface) 55%); }
.card.flush { padding: 0; overflow: hidden; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem 1rem; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); font: 600 .9rem/1.2 var(--font); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { text-decoration: none; background: var(--surface-3); border-color: var(--ink-3); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: transparent; }
.btn-danger { background: transparent; color: var(--err); border-color: rgba(255,154,133,.45); }
.btn-danger:hover { background: var(--err-soft); border-color: var(--err); }
.btn-s { padding: .32rem .65rem; font-size: .8rem; border-radius: 8px; }
.btn-block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; font: inherit; }
.linkbtn.muted { color: var(--ink-3); }

.flash { padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1.1rem; font-weight: 500; border: 1px solid transparent; }
.flash-ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(61,220,151,.25); }
.flash-err { background: var(--err-soft); color: var(--err); border-color: rgba(255,154,133,.3); }
.hint { background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 10px; padding: .65rem .85rem; font-size: .88rem; color: var(--ink-2); }
.hint.warn { border-left-color: var(--warn); }
.hint.err { border-left-color: var(--err); }

.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: .74rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; line-height: 1.5; }
.pill-blue { background: var(--brand-soft); border-color: rgba(6,94,221,.5); color: #cfe0ff; }
.pill-solid { background: var(--brand); border-color: var(--brand); color: #fff; }
.pill-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.pill-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.pill-err { background: var(--err-soft); border-color: transparent; color: var(--err); }
.pill-ghost { background: transparent; }
.svc { font: 600 .66rem/1 var(--font-display); letter-spacing: .14em; padding: .25rem .45rem; border-radius: 5px; background: var(--surface-3); color: var(--ink-2); }
.svc.on { background: var(--brand); color: #fff; }

.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c, var(--brand)); color: #fff; font: 600 .72rem/1 var(--font); flex: none; letter-spacing: .02em; }
.avatar.l { width: 52px; height: 52px; font-size: 1.05rem; }
.avatar.s { width: 22px; height: 22px; font-size: .6rem; }
.avatars { display: flex; }
.avatars .avatar { margin-left: -6px; border: 2px solid var(--surface); }
.avatars .avatar:first-child { margin-left: 0; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-bottom: 1.25rem; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .95rem 1.05rem; color: var(--ink); }
.stat:hover { text-decoration: none; border-color: var(--brand); }
.stat b { display: block; font: 600 1.85rem/1.1 var(--font-display); font-style: italic; font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-2); font-size: .82rem; }
.stat.alert b { color: var(--warn); }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: .65rem 0; border-bottom: 1px solid var(--line); display: flex; gap: .6rem; align-items: center; }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; color: var(--ink); }
.list a.title:hover { color: var(--link); text-decoration: none; }
.list .meta { color: var(--ink-3); font-size: .8rem; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .6rem .7rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font: 600 .68rem/1.2 var(--font-display); text-transform: uppercase; letter-spacing: .14em; color: var(--ink-3); white-space: nowrap; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table td.right, .table th.right { text-align: right; }
.table tfoot td { font-weight: 600; border-top: 1px solid var(--line-2); border-bottom: 0; }
.empty { text-align: center; padding: 2rem 1rem; color: var(--ink-3); }
.empty b { display: block; color: var(--ink-2); font-size: 1rem; margin-bottom: .25rem; }

.details { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.1rem; margin: 0; font-size: .92rem; }
.details dt { color: var(--ink-3); }
.details dd { margin: 0; overflow-wrap: anywhere; }
.prewrap { white-space: pre-wrap; }

.tabs { display: flex; gap: .2rem; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 0 0 1.25rem; scrollbar-width: none; }
.tabs a { padding: .6rem .85rem; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; font-size: .92rem; }
.tabs a .pill { margin-left: .3rem; }
.tabs a.active { color: #fff; border-color: var(--brand); }
.tabs a:hover { text-decoration: none; color: #fff; }

.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand); border-radius: inherit; }

/* ---------- Formulare ---------- */
label { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
input, select, textarea { font: 400 .95rem/1.35 var(--font); color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: .55rem .75rem; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(6,94,221,.3); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
textarea { min-height: 90px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand); }
input[type=color] { padding: 2px; height: 38px; }
input[type=date] { color-scheme: dark; }
.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; color: var(--ink); }
.checks { display: flex; flex-wrap: wrap; gap: .4rem; }
.checks .chip { position: relative; }
.checks .chip input { position: absolute; opacity: 0; }
.checks .chip span { display: inline-block; padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); font-weight: 600; font-size: .82rem; cursor: pointer; }
.checks .chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.checks .chip input:focus-visible + span { outline: 2px solid var(--link); }
.form { display: grid; gap: .9rem; }
.formgrid { display: grid; gap: .9rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .formgrid { grid-template-columns: 1fr 1fr; } .formgrid .full { grid-column: 1 / -1; } .formgrid-3 { grid-template-columns: repeat(3, 1fr); } .formgrid-4 { grid-template-columns: repeat(4, 1fr); } }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem 1rem; margin: 0; }
legend { font: 600 .7rem/1 var(--font-display); text-transform: uppercase; letter-spacing: .16em; color: var(--ink-3); padding: 0 .4rem; }
.formactions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .4rem; }
.inline { display: flex; gap: .5rem; flex-wrap: wrap; align-items: end; }
.inline > label { flex: 1 1 160px; }
.inline > .btn { flex: none; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; align-items: center; }
.filters input[type=search] { flex: 1 1 240px; width: auto; }
.filters select { width: auto; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg a { padding: .35rem .75rem; border-radius: 7px; color: var(--ink-2); font-weight: 600; font-size: .84rem; }
.seg a.on { background: var(--surface-3); color: #fff; }
.seg a:hover { text-decoration: none; color: #fff; }
details.add > summary { list-style: none; cursor: pointer; }
details.add > summary::-webkit-details-marker { display: none; }
details.add[open] > summary { margin-bottom: .8rem; }
.req::after { content: " *"; color: var(--link); }
.error { color: var(--err); }

/* ---------- Pipeline (Kanban) ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: .75rem; overflow-x: auto; padding-bottom: .75rem; scroll-snap-type: x proximity; }
.kcol { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem; min-height: 120px; scroll-snap-align: start; display: flex; flex-direction: column; gap: .5rem; }
.kcol.drop { border-color: var(--brand); background: var(--brand-soft); }
.kcol-head { display: flex; justify-content: space-between; align-items: baseline; padding: .15rem .25rem .35rem; }
.kcol-head b { font: 600 .74rem/1.2 var(--font-display); text-transform: uppercase; letter-spacing: .12em; }
.kcard { display: block; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 11px; padding: .65rem .7rem; color: var(--ink); cursor: grab; }
.kcard:hover { text-decoration: none; border-color: var(--ink-3); }
.kcard.dragging { opacity: .4; }
.kcard .t { font-weight: 600; line-height: 1.25; }
.kcard .o { color: var(--ink-3); font-size: .78rem; margin-top: .1rem; }
.kcard .f { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .45rem; align-items: center; }
.kcard.late { border-left: 3px solid var(--warn); }
.kcard.noaction { border-left: 3px solid var(--err); }

/* ---------- Zeitplan (Gantt) ---------- */
.gantt { --day: 28px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.gantt-grid { display: grid; grid-template-columns: 240px max-content; min-width: max-content; }
.g-label, .g-row { min-height: 38px; border-bottom: 1px solid var(--line); }
.g-label { position: sticky; left: 0; z-index: 2; background: var(--surface); padding: .45rem .75rem; border-right: 1px solid var(--line); display: flex; align-items: center; gap: .5rem; font-size: .88rem; min-width: 0; }
.g-label .ellipsis { flex: 1; }
.g-label.phase { font: 600 .68rem/1 var(--font-display); text-transform: uppercase; letter-spacing: .16em; color: var(--ink-3); background: var(--surface-2); min-height: 28px; }
.g-row { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: var(--day); }
.g-row.phase { min-height: 28px; background: var(--surface-2); }
.g-cell { border-right: 1px solid rgba(255,255,255,.035); }
.g-cell.we { background: rgba(255,255,255,.025); }
.g-cell.today { background: rgba(6,94,221,.18); }
.g-head .g-cell { font-size: .66rem; color: var(--ink-3); text-align: center; padding-top: .2rem; line-height: 1.15; }
.g-head .g-cell b { display: block; color: var(--ink-2); font-size: .74rem; }
.g-head .g-cell.month { color: var(--link); }
.g-bar { position: absolute; top: 7px; bottom: 7px; border-radius: 6px; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 600; padding: 0 .45rem; display: flex; align-items: center; overflow: hidden; white-space: nowrap; transform: skewX(-10.5deg); }
.g-bar > span { transform: skewX(10.5deg); position: relative; z-index: 1; }
.g-bar > i { position: absolute; inset: 0 auto 0 0; background: rgba(255,255,255,.22); }
.g-bar.done { background: #2a3b5c; }
.g-bar.crew { background: transparent; border: 1.5px solid var(--link); color: var(--link); }
.g-bar.project { background: linear-gradient(90deg, var(--brand), #2b78ea); }
.g-ms { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; background: var(--warn); transform: rotate(45deg); border-radius: 2px; }
.g-ms.done { background: var(--ok); }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--link); opacity: .7; pointer-events: none; }

/* ---------- Ressourcen-Kalender ---------- */
.cal { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cal table { border-collapse: separate; border-spacing: 0; min-width: max-content; }
.cal th, .cal td { border-bottom: 1px solid var(--line); border-right: 1px solid rgba(255,255,255,.04); padding: 0; height: 44px; }
.cal thead th { height: auto; padding: .35rem 0; font-size: .66rem; color: var(--ink-3); font-weight: 600; text-align: center; width: 34px; min-width: 34px; }
.cal thead th b { display: block; font-size: .8rem; color: var(--ink-2); }
.cal .who { position: sticky; left: 0; z-index: 2; background: var(--surface); min-width: 210px; padding: .35rem .75rem; text-align: left; border-right: 1px solid var(--line); }
.cal .who a { color: var(--ink); font-weight: 600; }
.cal .who .meta { font-size: .72rem; color: var(--ink-3); }
.cal td.we, .cal th.we { background: rgba(255,255,255,.025); }
.cal td.today, .cal th.today { background: rgba(6,94,221,.16); }
.cal td { position: relative; }
.cal .slot { position: absolute; inset: 6px 1px; display: block; border-radius: 4px; }
.cal .slot.bestaetigt { background: var(--brand); }
.cal .slot.option, .cal .slot.angefragt { background: repeating-linear-gradient(-60deg, rgba(91,151,240,.55) 0 5px, rgba(91,151,240,.2) 5px 10px); }
.cal .slot.abwesend { background: repeating-linear-gradient(-60deg, rgba(255,154,133,.45) 0 5px, rgba(255,154,133,.12) 5px 10px); }
.cal .slot.frei { background: rgba(61,220,151,.25); }
.cal .slot.conflict { box-shadow: 0 0 0 2px var(--err); }
.cal .slot:hover { filter: brightness(1.25); }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: var(--ink-2); margin: .75rem 0 0; }
.legend i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }

/* ---------- Nachrichten ---------- */
.chat { display: grid; grid-template-columns: 1fr; gap: 1rem; height: calc(100vh - 170px); min-height: 460px; }
@media (min-width: 900px) { .chat { grid-template-columns: 260px 1fr; } }
.chat-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem; overflow-y: auto; }
.chat-list a { display: flex; justify-content: space-between; align-items: center; padding: .5rem .65rem; border-radius: 9px; color: var(--ink-2); font-weight: 500; }
.chat-list a.on { background: var(--brand-soft); color: #fff; }
.chat-list a:hover { background: var(--surface-2); text-decoration: none; }
.chat-list .navlabel { font: 600 .64rem/1 var(--font-display); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); padding: .9rem .65rem .35rem; }
.chat-main { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-height: 0; }
.chat-head { padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .85rem; }
.msg { display: flex; gap: .65rem; align-items: flex-start; }
.msg .body { min-width: 0; }
.msg .who { font-weight: 600; font-size: .88rem; }
.msg .who time { color: var(--ink-3); font-weight: 400; font-size: .74rem; margin-left: .35rem; }
.msg .text { white-space: pre-wrap; overflow-wrap: anywhere; color: #e6e8ee; }
.msg .text .mention { color: var(--link); font-weight: 600; }
.chat-day { text-align: center; font-size: .72rem; color: var(--ink-3); }
.chat-form { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--line); }
.chat-form textarea { min-height: 44px; height: 44px; resize: none; }

/* ---------- Dateien ---------- */
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; }
.file { display: flex; flex-direction: column; gap: .3rem; padding: .6rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-size: .8rem; min-width: 0; }
.file:hover { border-color: var(--brand); text-decoration: none; }
.file .ext { font: 600 .7rem/1 var(--font-display); letter-spacing: .1em; color: var(--link); }
.file img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; }
.upload { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .75rem; }
.upload input[type=file] { flex: 1 1 200px; width: auto; }

/* ---------- Notizen & Aktivitäten ---------- */
.note { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: .75rem .85rem; }
.note + .note { margin-top: .55rem; }
.note.assigned { border-left: 3px solid var(--brand); }
.note .meta { font-size: .76rem; color: var(--ink-3); margin-top: .35rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.feed { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 1px solid var(--line-2); }
.feed li { position: relative; padding: 0 0 .9rem .7rem; }
.feed li::before { content: ""; position: absolute; left: -1.33rem; top: .45rem; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); }
.feed li.k-stufe::before { background: var(--brand); }
.feed li.k-anruf::before, .feed li.k-treffen::before { background: var(--ok); }

/* To-dos */
.todo { display: flex; gap: .65rem; align-items: flex-start; }
.todo form.tick button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink-3); background: none; cursor: pointer; padding: 0; margin-top: 2px; }
.todo form.tick button:hover { border-color: var(--brand); background: var(--brand-soft); }
.todo.done .title { text-decoration: line-through; color: var(--ink-3); }
.todo.done form.tick button { background: var(--brand); border-color: var(--brand); }
.due-late { color: var(--err); font-weight: 600; }
.due-soon { color: var(--warn); font-weight: 600; }

/* Kalkulation */
.calc-sum { display: grid; gap: .6rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .calc-sum { grid-template-columns: repeat(4, 1fr); } }
.calc-sum .stat b { font-size: 1.4rem; }
.margin-ok b { color: var(--ok); }
.margin-low b { color: var(--warn); }
.margin-neg b { color: var(--err); }

/* Angebot (Druckansicht) */
.paper { background: #fff; color: #0b0b0b; border-radius: 6px; padding: 2.5rem 2.75rem; max-width: 860px; margin: 0 auto; font-size: 14px; }
.paper h1 { color: #000; font-size: 1.7rem; }
.paper .table th { color: #555; }
.paper .table td, .paper .table th { border-color: #e1e4ea; }
.paper .table tbody tr:hover { background: none; }
.paper .brandline { height: 6px; background: linear-gradient(90deg, #065edd 0 60%, transparent 60% 63%, #065edd 63% 70%, transparent 70%); margin-bottom: 1.6rem; }
.paper .muted { color: #555; }
.paper a { color: #065edd; }
@media print { .paper { padding: 0; max-width: none; border-radius: 0; } body { background: #fff; } }

/* Call Sheet */
.callsheet h2 { margin-top: 1.2rem; }

/* Login */
.login-logo { display: block; height: 30px; margin-bottom: 1.6rem; }
.login-sub { font: 600 .7rem/1 var(--font-display); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); margin: -1.2rem 0 1.6rem; }
.qr svg { width: 200px; height: 200px; background: #fff; padding: 10px; border-radius: 10px; }
.codes { columns: 2; font-family: var(--mono); }

/* ===== Race Control: Feinschliff ===== */
h1 { text-transform: uppercase; letter-spacing: .01em; font-size: 2.15rem; }
h2 { text-transform: uppercase; font-size: .86rem; letter-spacing: .14em; font-style: normal; color: var(--ink); }
.card { border-radius: var(--radius); border-color: var(--line); position: relative; }
.card::before { content: ""; position: absolute; left: -1px; top: -1px; width: 22px; height: 2px; background: var(--brand); }
.card.flush::before, .card.narrow::before { display: none; }
.btn { border-radius: 2px; text-transform: uppercase; letter-spacing: .08em; font: 600 .78rem/1.2 var(--font-display); padding: .62rem 1.05rem; }
.btn-s { padding: .38rem .7rem; font-size: .7rem; }
.btn-primary { clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); padding-left: 1.25rem; padding-right: 1.25rem; }
.pill { border-radius: 1px; transform: skewX(-10.5deg); font: 600 .68rem/1.5 var(--font-display); letter-spacing: .08em; text-transform: uppercase; }
.pill > * { transform: skewX(10.5deg); }
.svc { border-radius: 1px; transform: skewX(-10.5deg); }
input, select, textarea { border-radius: 2px; }
.topsearch input { border-radius: 2px; }
.stat { border-radius: var(--radius); position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -14px; top: 0; bottom: 0; width: 60px; background: repeating-linear-gradient(-79.5deg, transparent 0 9px, rgba(6,94,221,.22) 9px 12px); }
.stat b { font-size: 2.2rem; }
.kcol, .kcard, .note, .file, .gantt, .cal, .chat-list, .chat-main, .quick-menu, .flash, .hint, .seg, .seg a, .chat-list a, .side nav a, .tabs a, .avatar { border-radius: 2px; }
.avatar { border-radius: 50%; }
.side nav a.active { box-shadow: inset 3px 0 0 var(--brand); }
.g-bar { border-radius: 1px; }
.list > li { padding: .7rem 0; }
.eyebrow::before { content: ""; display: inline-block; width: 14px; height: 2px; background: var(--brand); vertical-align: middle; margin-right: .5rem; transform: skewX(-10.5deg); }
.table th { border-bottom-color: var(--line-2); }
.kcol-head b::before { content: "▍"; color: var(--brand); margin-right: .3rem; }

/* ===== Bereich Nachrichten, Dateien, Ideen (Nachrichten/Push-Agent) ===== */
.chat-list .count { margin-left: .5rem; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 600; border-radius: 999px; padding: .05rem .45rem; flex: none; }
.chat-list details.chat-new { padding: .2rem .65rem; }
.chat-list details.chat-new > summary { padding: .3rem 0; }
.chat-list details.chat-new form { margin: .3rem 0 .5rem; }
.chat-list details.chat-new a { padding: .4rem .5rem; }
.chat-hint { padding: .2rem .65rem; margin: 0; }
.chat-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; }
.chat-head h2 { margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.chat-back { display: none; width: 100%; }
.chat-start { justify-content: center; padding: 1rem; overflow-y: auto; }
.chat-pushwrap { max-width: 520px; margin: 0 auto; width: 100%; }
.chat-empty { text-align: center; margin: auto 0; }
.chat-status { margin: 0; padding: 0 .75rem .6rem; }
.chat-embed { height: min(70vh, 640px); min-height: 380px; }
.msg.own .who { color: var(--link); }
.msg .who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .35rem; }
.msg .who time { margin-left: 0; }
.msg-del { display: inline; margin-left: .35rem; }
.msg-del button { font-size: .72rem; }
@media (max-width: 899px) {
  .chat { height: auto; min-height: 0; }
  .chat .chat-main { height: calc(100vh - 190px); height: calc(100dvh - 190px); min-height: 380px; }
  .chat:not(.has-channel) .chat-main:not(.chat-start) { display: none; }
  .chat:not(.has-channel) .chat-start { height: auto; }
  .chat.has-channel .chat-list { display: none; }
  .chat.has-channel .chat-back { display: block; }
}
.push-box .formactions { margin-top: .6rem; }

.storage { min-width: 220px; flex: 0 1 320px; display: grid; gap: .35rem; }
.progress.full > i { background: var(--warn); }
.files-l { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.file-icon { display: grid; place-items: center; aspect-ratio: 4/3; background: var(--surface-3); border-radius: 2px; }
.file-icon .ext { font-size: .9rem; }
.file-title { overflow-wrap: anywhere; text-transform: none; }
.file-preview { display: grid; place-items: center; min-height: 240px; }
.file-preview img { max-width: 100%; max-height: 75vh; object-fit: contain; }
details.card.add { margin-bottom: 1rem; }
details.card.add > summary { display: inline-flex; }

.idea { display: flex; gap: .9rem; align-items: flex-start; scroll-margin-top: 80px; }
.idea:target { border-color: var(--brand); }
.idea h3 { margin: .35rem 0 .3rem; font-size: 1.05rem; }
.idea-body { flex: 1; min-width: 0; }
.idea-tags { display: flex; gap: .35rem; flex-wrap: wrap; }
.idea .meta { margin-top: .45rem; }
.vote button { display: grid; justify-items: center; gap: .1rem; width: 48px; padding: .45rem 0; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 2px; color: var(--ink-2); cursor: pointer; font: inherit; }
.vote button b { font: 600 1.1rem/1 var(--font-display); font-style: italic; color: var(--ink); font-variant-numeric: tabular-nums; }
.vote button:hover { border-color: var(--brand); }
.vote button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.vote button.on b { color: #fff; }
.idea-comments { list-style: none; margin: .7rem 0 0; padding: 0 0 0 .8rem; border-left: 2px solid var(--line-2); display: grid; gap: .5rem; font-size: .9rem; }
.idea-actions { margin-top: .6rem; }
.idea-actions form { margin-top: .6rem; }
#neu { scroll-margin-top: 80px; }

/* ===== Bereich Watcher, Verwaltung, Systemstatus (Watcher/Debugger-Agent) ===== */
.finding { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.finding:last-child { border-bottom: 0; }
.finding-head { display: flex; gap: .75rem; align-items: flex-start; }
.finding-head .grow { flex: 1; min-width: 0; }
.finding .title { font-weight: 600; color: var(--ink); }
.finding a.title:hover { color: var(--link); text-decoration: none; }
.finding .meta { color: var(--ink-3); font-size: .8rem; margin-top: .15rem; }
.finding-pills { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: flex-end; flex: none; max-width: 45%; }
.finding-text { margin: .45rem 0 .25rem; color: var(--ink-2); font-size: .9rem; }
.finding p { margin: .3rem 0; }
.finding-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .55rem; }
.finding-actions form { margin: 0; }
.finding-actions .seg-form { display: inline-flex; gap: 2px; }
.finding-more { flex-basis: auto; }
.finding-more[open] { flex-basis: 100%; }
.finding-big .title { font-size: 1.15rem; }
.watcher-grid aside .finding-actions { margin-top: .35rem; }
@media (min-width: 1100px) { .watcher-grid { grid-template-columns: minmax(0, 1fr) 340px; } }
.admin-tiles .tile { display: block; color: var(--ink); }
.admin-tiles .tile:hover { text-decoration: none; border-color: var(--brand); }
.admin-tiles .tile p { margin: .3rem 0 0; }
@media (min-width: 760px) { .admin-tiles { grid-template-columns: repeat(3, 1fr); } }
.syscheck { min-width: 5.5rem; justify-content: center; }
.errstack { white-space: pre-wrap; word-break: break-word; max-height: 16rem; overflow: auto; background: var(--surface-2); padding: .5rem; border-radius: 2px; }
.inline-label { flex-direction: row; align-items: center; gap: .4rem; }
.login-logo + .login-sub { margin-top: -1.2rem; }

/* ===== Bereich Team, Kalender, To-dos, Notizen (Team/Kalender-Agent) ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.span-label, .formgrid .label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-2); margin-bottom: .3rem; }
.quickadd { margin-bottom: .6rem; }
.quickadd .grow-2 { flex: 2 1 220px; }
.skillchips { display: flex; flex-wrap: wrap; gap: .25rem; }
.skillchip { display: inline-block; padding: .05rem .45rem; border: 1px solid var(--line-2); border-radius: 1px; font: 600 .66rem/1.5 var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.skillchip.on { background: var(--brand-soft); border-color: var(--brand); color: #fff; }
.teamfilter fieldset { padding: .6rem .8rem .8rem; }
tr.inactive td { opacity: .55; }
/* Online-Status */
.statusdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .35rem; vertical-align: 1px; background: var(--ink-3); }
.statusdot.s-online { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.statusdot.s-kuerzlich { background: var(--ok); opacity: .55; }
.statusdot.s-heute { background: var(--link); opacity: .6; }
.statusdot.s-offline { background: transparent; border: 1px solid var(--ink-3); }
.statusdot.away, .statusdot.s-abwesend { background: var(--err); box-shadow: none; opacity: 1; border: 0; }
.avatar { position: relative; }
.avatar.online::after, .avatar.recent::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 30%; height: 30%; min-width: 7px; min-height: 7px; border-radius: 50%; background: var(--ok); border: 2px solid var(--surface); }
.avatar.recent::after { background: #2b7a57; }
.focus-now { font-weight: 600; margin: 0 0 .6rem; }
.focus-now.stale, .focus-now.stale a { color: var(--ink-3); font-weight: 500; }
.focus-text { color: var(--ink-2); }
/* Satz-Einordnung (nur Admin) */
.ratedot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: 0; background: transparent; border: 1px dashed var(--ink-3); cursor: help; }
.ratedot.r-guenstig { background: var(--ok); border: 0; }
.ratedot.r-normal { background: var(--link); border: 0; }
.ratedot.r-teuer { background: var(--warn); border: 0; }
/* Team-Kalender: zusätzliche Arten */
.cal .who a { display: inline-flex; align-items: center; gap: .4rem; }
.cal .slot.privat { background: repeating-linear-gradient(45deg, rgba(169,173,184,.42) 0 3px, rgba(169,173,184,.1) 3px 7px); }
.cal .slot.vorgemerkt { background: transparent; border: 1.5px dashed var(--link); }
.cal .slot.angefragt { background: repeating-linear-gradient(-60deg, rgba(91,151,240,.55) 0 5px, rgba(91,151,240,.2) 5px 10px); }
.legend i.lg { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: .35rem; vertical-align: -1px; }
.legend i.lg.bestaetigt { background: var(--brand); }
.legend i.lg.angefragt { background: repeating-linear-gradient(-60deg, rgba(91,151,240,.75) 0 3px, rgba(91,151,240,.2) 3px 6px); }
.legend i.lg.abwesend { background: repeating-linear-gradient(-60deg, rgba(255,154,133,.7) 0 3px, rgba(255,154,133,.15) 3px 6px); }
.legend i.lg.privat { background: repeating-linear-gradient(45deg, rgba(169,173,184,.7) 0 2px, rgba(169,173,184,.12) 2px 5px); }
.legend i.lg.vorgemerkt { border: 1.5px dashed var(--link); }
.legend i.lg.frei { background: rgba(61,220,151,.35); }
.legend i.lg.conflict { box-shadow: 0 0 0 2px var(--err); }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex: none; }
.legend-dot.k-abwesend { background: var(--err); }
.legend-dot.k-frei { background: var(--ok); }
.legend-dot.k-option { border: 1.5px dashed var(--link); }
.conflicts { border-color: rgba(255,154,133,.45); }
/* To-dos: Board, Status-Umschalter */
.todo-board { grid-auto-columns: minmax(230px, 1fr); }
.todo-board .kcard { cursor: default; }
.todo-board .kcard .t { color: var(--ink); display: block; }
.todo-board .kcard .f .btn { padding: .2rem .4rem; font-size: .62rem; }
.seg .segbtn { padding: .35rem .7rem; border-radius: 2px; color: var(--ink-2); font: 600 .78rem/1.2 var(--font-display); text-transform: uppercase; letter-spacing: .06em; background: none; border: 0; cursor: pointer; }
.seg .segbtn.on { background: var(--brand); color: #fff; }
.seg .segbtn:hover { color: #fff; }
.note.pinned { border-top: 2px solid var(--brand); }
.note .meta form { display: inline; }
.steps { margin: .5rem 0; padding-left: 1.1rem; display: grid; gap: .45rem; }

/* ===== Bereich Hinweis-Zentrale (hinweise-box, /hinweise) ===== */
.hw-dot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); vertical-align: middle; }
.hw-err .hw-dot, .hw-err-dot { background: var(--err); box-shadow: 0 0 0 3px var(--err-soft); }
.hw-warn .hw-dot, .hw-warn-dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.hw-info .hw-dot, .hw-info-dot { background: var(--brand); }
.hw-ok-dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); margin-right: .5rem; }
.hw-list > li { align-items: flex-start; }
.hw-list .hw-dot { margin-top: .4rem; }
.hw-text { color: var(--ink); font-size: .9rem; }
a.hw-text:hover { color: var(--link); text-decoration: none; }
.hw-action { flex: none; white-space: nowrap; }
.hw-ok { margin: 0; display: flex; align-items: center; }

/* ===== Bereich Projekte, Kalkulations-Cockpit, Equipment (Projekte-Agent) ===== */
.pj-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.calc-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: middle; background: var(--ink-3); flex: none; }
.calc-dot.calc-ok { background: var(--ok); } .calc-dot.calc-low { background: var(--warn); } .calc-dot.calc-neg { background: var(--err); } .calc-dot.calc-none { background: #5d636e; }
h1 .calc-dot { width: 14px; height: 14px; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; margin-top: .7rem; }
.legend > span { display: inline-flex; align-items: center; gap: .35rem; }
.g-bar.calc-ok { box-shadow: inset 0 0 0 2px var(--ok); } .g-bar.calc-low { box-shadow: inset 0 0 0 2px var(--warn); }
.g-bar.calc-neg { box-shadow: inset 0 0 0 2px var(--err); } .g-bar.calc-none { box-shadow: inset 0 0 0 2px #5d636e; }
.g-ms-inline { display: inline-block; width: 10px; height: 10px; background: var(--warn); transform: rotate(45deg); flex: none; }
.g-ms-inline.done { background: var(--ok); }
.num-s { width: 6.5rem; padding: .35rem .5rem; font-variant-numeric: tabular-nums; text-align: right; }
.edit-table td { padding: .35rem .4rem; } .edit-table .is-off { opacity: .35; }
.calc-table td.right, .edit-table td.right, .cockpit b { font-variant-numeric: tabular-nums; }
.calc-table tr.margin-ok td, .calc-table tr.margin-low td, .calc-table tr.margin-neg td { font-weight: 600; }
.calc-table tr.margin-ok td:last-child { color: var(--ok); } .calc-table tr.margin-low td:last-child { color: var(--warn); } .calc-table tr.margin-neg td:last-child { color: var(--err); }
dd.margin-ok b { color: var(--ok); } dd.margin-low b { color: var(--warn); } dd.margin-neg b { color: var(--err); }
.cost-row input[name=name] { flex: 1 1 180px; }
.cockpit-top { position: sticky; top: 58px; z-index: 20; margin-bottom: 1rem; background: rgba(12,12,14,.96); backdrop-filter: blur(10px); }
@media (max-width: 760px) { .cockpit-top { position: static; } }
.cockpit-head { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .cockpit-head { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.cockpit-result { display: grid; gap: .25rem; }
.cockpit-result .big { font: 600 2.6rem/1 var(--font-display); font-style: italic; }
.cockpit-result.margin-ok .big { color: var(--ok); } .cockpit-result.margin-low .big { color: var(--warn); } .cockpit-result.margin-neg .big { color: var(--err); }
.cockpit-marge input[type=range] { padding: 0; accent-color: var(--brand); }
.stackbar { display: flex; height: 34px; margin-top: .9rem; border-radius: 2px; overflow: hidden; background: var(--surface-2); }
.stackbar > span { display: flex; flex-direction: column; justify-content: center; padding: 0 .4rem; min-width: 0; overflow: hidden; white-space: nowrap; font-size: .66rem; line-height: 1.15; color: #fff; transition: width .2s; }
.stackbar em { font-style: normal; opacity: .85; overflow: hidden; text-overflow: ellipsis; } .stackbar b { font-weight: 600; }
.seg-crew { background: #065edd; } .seg-travel { background: #3f7fe0; } .seg-equip { background: #6c8fc4; } .seg-costs { background: #4b5566; } .seg-risk { background: #8a5a2b; } .seg-margin { background: #1f8f5f; }
.cockpit-tools { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; margin-top: .8rem; align-items: center; }
.whatif output .pos { color: var(--ok); font-weight: 600; } .whatif output .neg { color: var(--err); font-weight: 600; }
details.card > summary { cursor: pointer; list-style: none; } details.card > summary::-webkit-details-marker { display: none; }
details.card > summary h2 { display: inline; } details.card[open] > summary { margin-bottom: .8rem; }
.tips .tip p { margin: 0 0 .4rem; } .tip-effect.pos { color: var(--ok); font-weight: 600; } .tip-effect.neg { color: var(--err); font-weight: 600; }
.tip-unvollstaendig { border-left: 3px solid var(--warn); }
.possearch { position: relative; display: flex; gap: .5rem; }
.possearch input { flex: 1; }
.ps-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 40; margin-top: 4px; background: var(--surface-2); border: 1px solid var(--line-2); max-height: 360px; overflow-y: auto; }
.ps-list .ps-group, h3.ps-group { font: 600 .66rem/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); padding: .6rem .75rem .3rem; margin: 0; }
.ps-list [role=option] { padding: .45rem .75rem; cursor: pointer; display: flex; justify-content: space-between; gap: .6rem; }
.ps-list [role=option] small { color: var(--ink-3); }
.ps-list [role=option][aria-selected=true], .ps-list [role=option]:hover { background: var(--brand-soft); }
.explode { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.explode-block { background: var(--surface-2); border: 1px solid var(--line); padding: .6rem .7rem; display: grid; gap: .35rem; }
.wbs { list-style: none; margin: 0; padding-left: 1.1rem; border-left: 1px solid var(--line); }
.wbs-root { padding-left: 0; border-left: 0; }
.wbs li { margin: .2rem 0; } .wbs summary { cursor: pointer; padding: .25rem 0; }
.wbs-title { font-weight: 600; margin-right: .5rem; } .wbs-leaf .wbs-title { font-weight: 500; }
.wbs-meta { color: var(--ink-3); font-size: .8rem; display: inline-flex; gap: .3rem; align-items: center; flex-wrap: wrap; }
.wbs-prog { display: inline-block; width: 70px; vertical-align: middle; }
.print-page { background: #e9ebef; color: #0b0b0b; padding: 1rem; }
.print-hint { max-width: 860px; margin: 0 auto 1rem; font-size: .85rem; color: #333; }
.print-hint a { color: #065edd; } .print-hint a.on { font-weight: 700; text-decoration: underline; }
.paper-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.paper-logo { height: 26px; }
.paper-meta { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.paper .details dt { color: #555; }
.paper h2 { color: #000; }
.paper .table tfoot td { border-color: #c9ced8; }
@media print {
  .no-print, .side, .topbar, .tabbar, .tabs, .pagehead .actions, .flash { display: none !important; }
  .print-page { padding: 0; background: #fff; }
  .main { margin: 0 !important; }
  .wbs details { break-inside: avoid; } .wbs details:not([open]) > *:not(summary) { display: block; }
}

/* ===== Bereich Leistungskatalog (/leistungen) ===== */
.leist-pos td.num, .leist-pos th.num { text-align: right; white-space: nowrap; }
.leist-pos .leist-vorschlag td { background: rgba(255, 196, 0, .04); }
.leist-pos .leist-edit td { padding-top: 0; border-top: 0; }
.leist-pos .leist-edit details:not([open]) { margin: 0; }
.leist-hint { max-width: 46ch; margin-top: .25rem; overflow-wrap: anywhere; }
.leist-status { cursor: pointer; font: inherit; }
.leist-runs { margin-top: .8rem; }
/* ===== Ende Bereich Leistungskatalog ===== */
/* Baukasten (Projekte-Agent) */
.bk-switch { margin-bottom: 1rem; }
.baukasten { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-bottom: 1rem; position: relative; }
@media (min-width: 980px) { .baukasten { grid-template-columns: 300px minmax(0, 1fr); } }
.bk-palette { background: var(--surface); border: 1px solid var(--line); padding: .8rem; display: grid; gap: .6rem; align-content: start; max-height: 80vh; overflow-y: auto; }
@media (max-width: 979px) { .bk-palette { order: 2; grid-auto-flow: column; grid-auto-columns: minmax(230px, 70%); overflow-x: auto; max-height: none; } .bk-palette > p, .bk-palette > .bk-h { display: none; } }
.bk-h { font: 600 .68rem/1 var(--font-display); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin: .6rem 0 0; }
.bk-card { display: grid; gap: .35rem; padding: .75rem .8rem; background: var(--surface-2); border: 1px solid var(--line-2); cursor: grab; min-height: 64px; transition: border-color .15s, transform .15s; }
.bk-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.bk-card:active { cursor: grabbing; }
.bk-card-top { display: flex; align-items: center; gap: .5rem; }
.bk-card-top b { flex: 1; font-size: .95rem; }
.bk-desc { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bk-add { display: flex; gap: .4rem; } .bk-add select { padding: .3rem .5rem; font-size: .8rem; }
.bk-icon { width: 22px; height: 22px; color: var(--link); flex: none; }
.rate-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ink-3); }
.rate-dot.rate-guenstig { background: var(--ok); } .rate-dot.rate-normal { background: var(--link); } .rate-dot.rate-teuer { background: var(--warn); }
.bk-board { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-content: start; }
.bk-zone { background: var(--surface); border: 2px dashed var(--line-2); min-height: 220px; display: flex; flex-direction: column; transition: border-color .15s, background .15s; }
.bk-dragging-card .bk-zone { border-color: rgba(6,94,221,.6); }
.bk-zone.bk-over, .bk-palette.bk-over { border-color: var(--brand); background: var(--brand-soft); }
.bk-zone-head { display: flex; align-items: center; gap: .5rem; padding: .7rem .8rem; border-bottom: 1px solid var(--line); font: 600 .9rem/1 var(--font-display); letter-spacing: .12em; }
.bk-zone-body { padding: .6rem; display: grid; gap: .5rem; align-content: start; flex: 1; }
.bk-empty { text-align: center; padding: 2rem .5rem; margin: 0; }
.bk-chip { display: grid; grid-template-columns: 1fr auto; gap: 0 .4rem; align-items: center; padding: .55rem .6rem; background: var(--surface-2); border-left: 3px solid var(--brand); cursor: grab; }
.bk-chip .small { grid-column: 1; }
.bk-x { grid-row: 1 / span 2; grid-column: 2; width: 36px; height: 36px; border: 0; background: transparent; color: var(--ink-3); font-size: 1rem; cursor: pointer; }
.bk-x:hover { color: var(--err); }
.bk-new { animation: bk-pop .35s ease-out; }
@keyframes bk-pop { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.bk-bump { color: var(--link) !important; }
.bk-toast { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; background: var(--surface-3); border: 1px solid var(--line-2); padding: .65rem 1rem; box-shadow: 0 8px 30px rgba(0,0,0,.5); max-width: calc(100vw - 2rem); }
@media (min-width: 760px) { .bk-toast { bottom: 1.5rem; } }
@media (prefers-reduced-motion: reduce) { .bk-new, .stackbar > span, .bk-card { animation: none; transition: none; } }
/* ===== Bereich Checklisten (Checklisten-Agent) ===== */
.cl-card > .card-head { padding: 1rem 1rem 0; }
.cl-pad { padding: 0 1rem 1rem; margin: .6rem 0 0; }
.checklist-box .cl-progress { margin: .2rem 0 .4rem; }
.cl-progress.cl-late > i { background: var(--err); }
.cl-sum { margin: 0 0 .4rem; }
.cl-list > li { align-items: flex-start; }
.cl-list > li.cl-group { font: 600 .68rem/1 var(--font-display); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); padding: 1rem 0 .3rem; border-bottom: 0; }
.cl-toggle { margin: 0; }
.cl-box { width: 28px; height: 28px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--line-2); background: transparent; color: var(--ok); font-weight: 700; cursor: pointer; border-radius: 4px; padding: 0; }
.cl-box:hover { border-color: var(--brand); }
.cl-box-ro { cursor: default; width: 20px; height: 20px; }
.cl-done .cl-box { border-color: var(--ok); }
.cl-done .cl-text { color: var(--ink-3); text-decoration: line-through; }
.cl-overdue { border-left: 3px solid var(--err); padding-left: .5rem !important; }
.cl-overdue .cl-text { color: var(--err); }
.cl-text { overflow-wrap: anywhere; font-weight: 500; }
.cl-list .meta a { overflow-wrap: anywhere; }
.cl-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: end; margin-top: .4rem; }
.cl-actions form { margin: 0; }
.cl-person select { padding: .25rem .5rem; font-size: .8rem; }
.cl-laender td { vertical-align: top; }
/* ===== Ende Bereich Checklisten ===== */
