:root {
  --bg: #0d1117; --bg2: #161b22; --bg3: #1c2330; --line: #2a3240;
  --txt: #e6edf3; --muted: #8b949e; --accent: #2dd4bf;
  --offen: #e3b341; --geprueft: #58a6ff; --knownissue: #a371f7; --solved: #3fb950; --err: #f85149;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--txt);
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace; font-size: 14px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .accent { color: var(--accent); }
.err { color: var(--err); } button { font-family: inherit; cursor: pointer; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; }
.login-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 32px; width: 320px; display: flex; flex-direction: column; gap: 12px; }
.login-card h1 { margin: 0; font-size: 22px; font-weight: 700; }
.login-card input { background: var(--bg); border: 1px solid var(--line); color: var(--txt); padding: 10px 12px; border-radius: 8px; }
.login-card button { background: var(--accent); color: #04201c; border: 0; padding: 10px; border-radius: 8px; font-weight: 700; }

/* Bar */
.bar { display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: var(--bg2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.logo { font-size: 18px; font-weight: 800; letter-spacing: -.5px; }
.counts { display: flex; gap: 8px; }
.pill { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--line); }
.p-offen { color: var(--offen); border-color: #5a4a1e; } .p-geprueft { color: var(--geprueft); border-color: #1f3a5f; } .p-knownissue { color: var(--knownissue); border-color: #3a2a5f; } .p-solved { color: var(--solved); border-color: #1d4427; }
.actions { margin-left: auto; display: flex; gap: 8px; }
.ghost { background: var(--bg3); color: var(--txt); border: 1px solid var(--line); padding: 6px 12px; border-radius: 8px; }
.ghost.small { padding: 4px 10px; font-size: 12px; }

/* Filters */
.filters { display: flex; gap: 8px; padding: 12px 20px 0; }
.fbtn { background: transparent; color: var(--muted); border: 1px solid var(--line); padding: 6px 14px; border-radius: 8px; display: inline-flex; align-items: center; gap: 7px; }
.fbtn.on { background: var(--bg3); color: var(--txt); border-color: var(--accent); }
.fbadge { background: var(--err); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }

/* Grid */
.grid { display: grid; grid-template-columns: 380px 1fr; gap: 16px; padding: 16px 20px; align-items: start; }
.list { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 130px); overflow: auto; }
.empty, .empty-detail { color: var(--muted); padding: 24px; }
.card { background: var(--bg2); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.card:hover { border-color: var(--accent); }
.card.sel { background: var(--bg3); border-color: var(--accent); }
.card.st-offen { border-left-color: var(--offen); } .card.st-geprueft { border-left-color: var(--geprueft); } .card.st-knownissue { border-left-color: var(--knownissue); } .card.st-solved { border-left-color: var(--solved); opacity: .75; }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.card-title { font-weight: 600; margin-bottom: 2px; }
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.badge.st-offen { background: #3a2f12; color: var(--offen); } .badge.st-geprueft { background: #102744; color: var(--geprueft); } .badge.st-knownissue { background: #241a3a; color: var(--knownissue); } .badge.st-solved { background: #102b18; color: var(--solved); }

/* Detail */
.detail { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; min-height: 300px; }
.d-head h2 { margin: 8px 0 4px; font-size: 18px; }
.section { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.sec-h { font-weight: 700; margin-bottom: 8px; color: var(--accent); }
.foldable > summary { cursor: pointer; user-select: none; list-style: none; display: flex; align-items: center; gap: 6px; }
.foldable > summary::-webkit-details-marker { display: none; }
.foldable > summary::before { content: "▸"; color: var(--accent); font-size: 11px; }
.foldable[open] > summary::before { content: "▾"; }
.foldable:not([open]) > summary { margin-bottom: 0; }
textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--txt); border-radius: 8px; padding: 10px; font-family: inherit; resize: vertical; }
.msg { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.msg-h { margin-bottom: 6px; } .msg-b { white-space: pre-wrap; color: #c9d1d9; }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.st-btn { border: 1px solid var(--line); background: var(--bg3); color: var(--txt); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.b-offen:hover { border-color: var(--offen); } .b-geprueft:hover { border-color: var(--geprueft); } .b-knownissue:hover { border-color: var(--knownissue); } .b-solved { background: #102b18; border-color: #1d4427; color: var(--solved); }
.solve-box { background: var(--bg); border-radius: 8px; padding: 12px; }
.flash { margin-top: 12px; padding: 8px 12px; border-radius: 8px; font-size: 13px; }
.flash.ok { background: #102b18; color: var(--solved); } .flash.err { background: #3a1518; color: var(--err); }
@media (max-width: 800px) { .grid { grid-template-columns: 1fr; } }
