/* itcomplete – Oberfläche
   Farbe: kühles Grau mit Petrol (Patchkabel) als Akzent.
   Wiedererkennung: Ortspfade im Stil von Beschriftungsband. */
:root {
  --bg: #eef1f0;
  --surface: #ffffff;
  --surface-2: #f5f7f6;
  --ink: #16212a;
  --muted: #586973;
  --line: #d3dbda;
  --accent: #0c666b;
  --accent-ink: #ffffff;
  --accent-soft: #d6ecec;
  --ok: #2b7549;
  --warn: #9a620f;
  --crit: #ad3333;
  --focus: #e9a417;
  --tape: #f3e7a9;
  --tape-edge: #d8c770;
  --cat-ort: #7a5c2e;
  --cat-hardware: #0c666b;
  --cat-logisch: #5b4f9a;
  --vis-10: #2b7549;
  --vis-20: #2f5aa0;
  --vis-30: #5b4f9a;
  --vis-40: #ad3333;
  --radius: 6px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "SF Mono", "Consolas", "DejaVu Sans Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10161a;
    --surface: #172026;
    --surface-2: #1c262d;
    --ink: #e2e9eb;
    --muted: #93a4ad;
    --line: #2a3640;
    --accent: #4fb0b4;
    --accent-ink: #0a1416;
    --accent-soft: #19393b;
    --ok: #63bf8a;
    --warn: #e0a343;
    --crit: #ee7070;
    --tape: #3b3622;
    --tape-edge: #5c5330;
    --cat-ort: #d2ad72;
    --cat-hardware: #4fb0b4;
    --cat-logisch: #a69ae6;
    --vis-10: #63bf8a;
    --vis-20: #7aa5ec;
    --vis-30: #a69ae6;
    --vis-40: #ee7070;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { font-size: 15px; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; font-weight: 600; }
h1 { font-size: 1.6rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
.mono, code, pre, kbd { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: .87rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }

/* Layout */
.app { display: grid; grid-template-columns: 228px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 1rem .75rem;
  display: flex; flex-direction: column; gap: 1rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: baseline; gap: .4rem; padding: 0 .5rem; text-decoration: none; color: var(--ink); }
.brand-mark { font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em; }
.brand-mark span { color: var(--accent); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { font-size: .8rem; color: var(--muted); padding: .75rem .5rem .25rem; }
.nav a {
  display: block; padding: .4rem .6rem; border-radius: var(--radius);
  color: var(--ink); text-decoration: none;
}
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.sidebar-foot { margin-top: auto; font-size: .82rem; color: var(--muted); padding: 0 .5rem; }
.sidebar-foot form { display: inline; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem 1.5rem; border-bottom: 1px solid var(--line); background: var(--surface);
  position: sticky; top: 0; z-index: 5;
}
.search { position: relative; flex: 1; max-width: 640px; }
.search input { width: 100%; padding-left: 2rem; }
.search::before {
  content: ""; position: absolute; left: .65rem; top: 50%; width: .7rem; height: .7rem;
  border: 2px solid var(--muted); border-radius: 50%; transform: translateY(-60%);
}
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(10, 30, 40, .14); max-height: 70vh; overflow-y: auto; z-index: 20;
}
.search-results:empty { display: none; }
.search-group { padding: .4rem .75rem; border-top: 1px solid var(--line); }
.search-group:first-child { border-top: 0; }
.search-group h4 { margin: .2rem 0; font-size: .8rem; color: var(--muted); font-weight: 600; }
.search-group a { display: block; padding: .2rem 0; text-decoration: none; }
.content { padding: 1.5rem; max-width: 1280px; width: 100%; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

/* Flächen */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.panel + .panel { margin-top: 1rem; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin-bottom: .6rem; }
.panel-head h2 { margin: 0; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 1.7rem; font-weight: 600; line-height: 1.1; }
.stat a { text-decoration: none; color: inherit; }
.empty { color: var(--muted); padding: .5rem 0; }

/* Ortspfad im Stil von Beschriftungsband */
.trail { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-bottom: .5rem; }
.tape {
  display: inline-block; padding: .05rem .5rem; font-size: .85rem;
  background: var(--tape); border: 1px solid var(--tape-edge); border-radius: 2px;
  color: var(--ink); text-decoration: none; font-weight: 500;
}
a.tape:hover { border-color: var(--ink); }
.trail .sep { color: var(--muted); font-size: .8rem; }

/* Kennzeichnungen */
.badge {
  display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .8rem;
  border: 1px solid currentColor; line-height: 1.5; white-space: nowrap;
}
.badge.ok { color: var(--ok); }
.badge.warn { color: var(--warn); }
.badge.crit { color: var(--crit); }
.badge.muted { color: var(--muted); }
.vis { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; white-space: nowrap; }
.vis::before { content: ""; width: .55rem; height: .55rem; border-radius: 2px; background: currentColor; }
.vis-10 { color: var(--vis-10); }
.vis-20 { color: var(--vis-20); }
.vis-30 { color: var(--vis-30); }
.vis-40 { color: var(--vis-40); }
.type { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.type::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--cat-hardware); }
.type.cat-ort::before { background: var(--cat-ort); border-radius: 1px; }
.type.cat-logisch::before { background: var(--cat-logisch); transform: rotate(45deg); border-radius: 1px; }
.status-geplant { color: var(--muted); }
.status-wartung { color: var(--warn); }
.status-ausser_betrieb, .status-archiviert { color: var(--muted); text-decoration: line-through; }
.due { color: var(--crit); font-weight: 600; }
.soon { color: var(--warn); font-weight: 600; }

/* Tabellen */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .82rem; font-weight: 600; color: var(--muted); }
tbody tr:hover { background: var(--surface-2); }
td a { text-decoration: none; }
td a:hover { text-decoration: underline; }
dl.props { display: grid; grid-template-columns: minmax(130px, max-content) 1fr; gap: .35rem 1.25rem; margin: 0; }
dl.props dt { color: var(--muted); }
dl.props dd { margin: 0; word-break: break-word; }

/* Baum */
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: .8rem; padding-left: .9rem; border-left: 1px solid var(--line); }
.tree li { padding: .15rem 0; }
.tree .node { display: inline-flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }

/* Formulare */
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: .45rem .6rem; max-width: 100%;
}
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--accent); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { width: 100%; }
textarea.editor { min-height: 28rem; line-height: 1.55; tab-size: 4; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1.25rem; }
.field { display: flex; flex-direction: column; gap: .25rem; }
.field.wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9rem; }
.field input:not([type="checkbox"]), .field select { width: 100%; }
.field.check { flex-direction: row; align-items: center; gap: .5rem; }
.field.check label { font-weight: 500; order: 2; }
.field .help { font-size: .82rem; color: var(--muted); }
.field .error, .errorlist { color: var(--crit); font-size: .85rem; margin: 0; padding: 0; list-style: none; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--crit); }
.field ul:not(.errorlist) { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .2rem; }
.field ul:not(.errorlist) label { font-weight: 400; display: flex; gap: .4rem; align-items: center; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem 1rem; margin: 0 0 1rem; }
legend { padding: 0 .35rem; font-weight: 600; }
.form-actions { display: flex; gap: .6rem; align-items: center; margin-top: 1.25rem; flex-wrap: wrap; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin-bottom: 1rem; }
.filters .field { min-width: 150px; }
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: end; }

/* Schaltflächen */
.btn {
  display: inline-flex; align-items: center; gap: .35rem; cursor: pointer;
  font: inherit; font-weight: 600; text-decoration: none; white-space: nowrap;
  padding: .45rem .9rem; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); filter: none; }
.btn.danger { background: transparent; color: var(--crit); border-color: var(--crit); }
.btn.small { padding: .2rem .55rem; font-size: .85rem; font-weight: 500; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; }

/* Meldungen */
.messages { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .5rem; }
.messages li { padding: .6rem .9rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); border-left: 4px solid var(--accent); }
.messages .error { border-left-color: var(--crit); }
.messages .warning { border-left-color: var(--warn); }
.notice { padding: .7rem .9rem; border-radius: var(--radius); border: 1px solid var(--line); border-left: 4px solid var(--warn); background: var(--surface); margin-bottom: 1rem; }
.notice.crit { border-left-color: var(--crit); }

/* Doku */
.doc { max-width: 78ch; }
.doc h1 { font-size: 1.5rem; margin-top: 1.5rem; }
.doc h1:first-child { margin-top: 0; }
.doc h2 { font-size: 1.2rem; margin-top: 1.5rem; padding-bottom: .25rem; border-bottom: 1px solid var(--line); }
.doc h3 { margin-top: 1.2rem; }
.doc table { margin: .75rem 0; }
.doc pre { background: var(--surface-2); padding: .75rem; border-radius: var(--radius); overflow-x: auto; }
.doc code { background: var(--surface-2); padding: .05rem .3rem; border-radius: 3px; }
.doc pre code { background: none; padding: 0; }
.doc blockquote { margin: .75rem 0; padding: .2rem 1rem; border-left: 3px solid var(--line); color: var(--muted); }
.diff { font-family: var(--mono); font-size: .88rem; white-space: pre-wrap; margin: 0; }
.diff div { padding: 0 .5rem; }
.diff .add { background: color-mix(in srgb, var(--ok) 16%, transparent); }
.diff .del { background: color-mix(in srgb, var(--crit) 16%, transparent); }
.diff .hunk { color: var(--muted); margin-top: .5rem; }
.editor-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.preview { border: 1px dashed var(--line); border-radius: var(--radius); padding: .75rem 1rem; min-height: 28rem; overflow-y: auto; }

/* Anmeldung */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box .brand { padding: 0; margin-bottom: 1.25rem; }
.auth-box .panel { padding: 1.5rem; }
.auth-box .field input { width: 100%; }
.qr { background: #fff; padding: .5rem; border-radius: var(--radius); display: inline-block; }

.pagination { display: flex; gap: .75rem; align-items: center; margin-top: 1rem; }
.htmx-indicator { opacity: 0; transition: opacity .2s; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-group { display: none; }
  .sidebar-foot { margin-top: 0; }
  .grid-2, .grid-3, .grid-main, .form-grid, .editor-wrap { grid-template-columns: 1fr; }
  .topbar { position: static; padding: .6rem 1rem; }
  .content { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .sidebar, .topbar, .actions, .form-actions, .no-print { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
  .panel { border: 0; padding: 0; }
}

/* Hilfsklassen (keine Inline-Styles wegen Content-Security-Policy) */
.mt { margin-top: 1rem; }
.narrow { max-width: 640px; }
.medium { max-width: 920px; }
.spacer { flex: 1; }
hr.sep-line { border: 0; border-top: 1px solid var(--line); margin: .6rem 0; }
.type-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .3rem .75rem; }
.choice { display: flex; align-items: center; gap: .45rem; padding: .25rem 0; cursor: pointer; }

/* Tickets */
.prio { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; white-space: nowrap; }
.prio::before { content: ""; width: .5rem; height: .9rem; border-radius: 1px; background: var(--muted); }
.prio-kritisch { color: var(--crit); font-weight: 600; }
.prio-kritisch::before { background: var(--crit); }
.prio-hoch { color: var(--warn); }
.prio-hoch::before { background: var(--warn); }
.prio-normal::before { background: var(--accent); }
.prio-niedrig { color: var(--muted); }
.sla { font-size: .85rem; white-space: nowrap; }
.sla-breached { color: var(--crit); font-weight: 600; }
.sla-warn { color: var(--warn); font-weight: 600; }
.sla-paused, .sla-done { color: var(--muted); }
.ticket-no { font-family: var(--mono); font-size: .88em; color: var(--muted); white-space: nowrap; }
.views { display: flex; gap: .25rem; flex-wrap: wrap; margin-bottom: .75rem; }
.views a { padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .9rem; background: var(--surface); }
.views a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.meta-line { display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center; }

.timeline { display: flex; flex-direction: column; gap: .75rem; }
.entry { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.entry-head { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .45rem .8rem; border-bottom: 1px solid var(--line); font-size: .87rem; }
.entry-body { padding: .7rem .8rem; white-space: pre-wrap; word-break: break-word; }
.entry.in { border-left: 4px solid var(--vis-20); }
.entry.out { border-left: 4px solid var(--ok); }
.entry.note { border-left: 4px solid var(--warn); background: color-mix(in srgb, var(--warn) 6%, var(--surface)); }
.entry.system, .entry.time { border: 0; background: none; }
.entry.system .entry-body, .entry.time .entry-body { padding: 0 .8rem; color: var(--muted); font-size: .87rem; white-space: normal; }
.entry.time .entry-body::before { content: "◷ "; }
.entry .attachments { padding: 0 .8rem .6rem; display: flex; flex-wrap: wrap; gap: .5rem; font-size: .87rem; }
.compose { display: grid; gap: .6rem; }
.compose textarea { min-height: 8rem; }
.related-item { padding: .35rem 0; border-top: 1px solid var(--line); }
.related-item:first-child { border-top: 0; }
.reasons { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .2rem; }
.reason { font-size: .78rem; padding: 0 .4rem; border-radius: 3px; background: var(--accent-soft); }
.side-actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .35rem; }
.timer { display: inline-flex; align-items: center; gap: .5rem; padding: .25rem .6rem; border-radius: 999px; background: color-mix(in srgb, var(--crit) 12%, transparent); color: var(--crit); font-weight: 600; font-size: .88rem; }
.mail-preview { white-space: pre-wrap; font-size: .9rem; max-height: 22rem; overflow-y: auto; background: var(--surface-2); padding: .6rem .8rem; border-radius: var(--radius); }
.day-head { display: flex; justify-content: space-between; align-items: baseline; margin: 1rem 0 .3rem; }
.day-head h3 { margin: 0; }
.weekend { opacity: .75; }
.bar { height: .5rem; background: var(--accent-soft); border-radius: 999px; overflow: hidden; min-width: 80px; }
.bar span { display: block; height: 100%; background: var(--accent); }
details.inline > summary { cursor: pointer; color: var(--accent); }
details.inline[open] > summary { margin-bottom: .6rem; }

/* Balkenbreiten ohne Inline-Styles */
.bar .w0 { width: 0%; }
.bar .w1 { width: 1%; }
.bar .w2 { width: 2%; }
.bar .w3 { width: 3%; }
.bar .w4 { width: 4%; }
.bar .w5 { width: 5%; }
.bar .w6 { width: 6%; }
.bar .w7 { width: 7%; }
.bar .w8 { width: 8%; }
.bar .w9 { width: 9%; }
.bar .w10 { width: 10%; }
.bar .w11 { width: 11%; }
.bar .w12 { width: 12%; }
.bar .w13 { width: 13%; }
.bar .w14 { width: 14%; }
.bar .w15 { width: 15%; }
.bar .w16 { width: 16%; }
.bar .w17 { width: 17%; }
.bar .w18 { width: 18%; }
.bar .w19 { width: 19%; }
.bar .w20 { width: 20%; }
.bar .w21 { width: 21%; }
.bar .w22 { width: 22%; }
.bar .w23 { width: 23%; }
.bar .w24 { width: 24%; }
.bar .w25 { width: 25%; }
.bar .w26 { width: 26%; }
.bar .w27 { width: 27%; }
.bar .w28 { width: 28%; }
.bar .w29 { width: 29%; }
.bar .w30 { width: 30%; }
.bar .w31 { width: 31%; }
.bar .w32 { width: 32%; }
.bar .w33 { width: 33%; }
.bar .w34 { width: 34%; }
.bar .w35 { width: 35%; }
.bar .w36 { width: 36%; }
.bar .w37 { width: 37%; }
.bar .w38 { width: 38%; }
.bar .w39 { width: 39%; }
.bar .w40 { width: 40%; }
.bar .w41 { width: 41%; }
.bar .w42 { width: 42%; }
.bar .w43 { width: 43%; }
.bar .w44 { width: 44%; }
.bar .w45 { width: 45%; }
.bar .w46 { width: 46%; }
.bar .w47 { width: 47%; }
.bar .w48 { width: 48%; }
.bar .w49 { width: 49%; }
.bar .w50 { width: 50%; }
.bar .w51 { width: 51%; }
.bar .w52 { width: 52%; }
.bar .w53 { width: 53%; }
.bar .w54 { width: 54%; }
.bar .w55 { width: 55%; }
.bar .w56 { width: 56%; }
.bar .w57 { width: 57%; }
.bar .w58 { width: 58%; }
.bar .w59 { width: 59%; }
.bar .w60 { width: 60%; }
.bar .w61 { width: 61%; }
.bar .w62 { width: 62%; }
.bar .w63 { width: 63%; }
.bar .w64 { width: 64%; }
.bar .w65 { width: 65%; }
.bar .w66 { width: 66%; }
.bar .w67 { width: 67%; }
.bar .w68 { width: 68%; }
.bar .w69 { width: 69%; }
.bar .w70 { width: 70%; }
.bar .w71 { width: 71%; }
.bar .w72 { width: 72%; }
.bar .w73 { width: 73%; }
.bar .w74 { width: 74%; }
.bar .w75 { width: 75%; }
.bar .w76 { width: 76%; }
.bar .w77 { width: 77%; }
.bar .w78 { width: 78%; }
.bar .w79 { width: 79%; }
.bar .w80 { width: 80%; }
.bar .w81 { width: 81%; }
.bar .w82 { width: 82%; }
.bar .w83 { width: 83%; }
.bar .w84 { width: 84%; }
.bar .w85 { width: 85%; }
.bar .w86 { width: 86%; }
.bar .w87 { width: 87%; }
.bar .w88 { width: 88%; }
.bar .w89 { width: 89%; }
.bar .w90 { width: 90%; }
.bar .w91 { width: 91%; }
.bar .w92 { width: 92%; }
.bar .w93 { width: 93%; }
.bar .w94 { width: 94%; }
.bar .w95 { width: 95%; }
.bar .w96 { width: 96%; }
.bar .w97 { width: 97%; }
.bar .w98 { width: 98%; }
.bar .w99 { width: 99%; }
.bar .w100 { width: 100%; }

/* Paket 4: Projekte und Changes */
.panel h3 { font-size: .95rem; margin: 1rem 0 .35rem; }
.state { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .8rem; border: 1px solid var(--line); white-space: nowrap; }
.state-genehmigung { color: var(--warn); border-color: currentColor; }
.state-genehmigt, .state-geplant { color: var(--accent); border-color: currentColor; }
.state-umsetzung { color: var(--accent); border-color: currentColor; font-weight: 600; }
.state-abgeschlossen { color: var(--ok); border-color: currentColor; }
.state-fehlgeschlagen, .state-abgelehnt { color: var(--crit); border-color: currentColor; }
.state-entwurf { color: var(--muted); }
.gantt { display: block; max-width: none; font-size: 12px; }
.gantt text { fill: var(--ink); }
.gantt .gantt-tick { fill: var(--muted); font-size: 11px; }
.gantt .gantt-ms-label { font-style: italic; }
.gantt-grid { stroke: var(--line); stroke-width: 1; }
.gantt-today { stroke: var(--crit); stroke-width: 1.5; stroke-dasharray: 4 3; }
.gantt-bar { fill: var(--muted); opacity: .55; }
.gantt-bar.gantt-in_arbeit { fill: var(--accent); opacity: 1; }
.gantt-bar.gantt-erledigt { fill: var(--ok); opacity: .8; }
.gantt-ms { fill: var(--warn); }
.gantt-ms.gantt-ms-erreicht { fill: var(--ok); }
table.budget td:last-child { min-width: 140px; }
