/* ---- Farben: hell als Grundlage, dunkel nach System oder Umschalter ---- */
:root {
  --bg: #f3f4f8;
  --surface: #ffffff;
  --surface-2: #eef0f5;
  --surface-3: #e3e6ee;
  --line: #e1e4ec;
  --text: #171a26;
  --muted: #61687b;
  --accent: #6553e0;
  --accent-soft: #ebe8fd;
  --on-accent: #ffffff;
  --run: #c27a0a;
  --run-soft: #fdf0d9;
  --ok: #10915b;
  --ok-soft: #dcf4e9;
  --bad: #d23f37;
  --bad-soft: #fde4e2;
  --add: #10915b;
  --del: #d23f37;
  --area-0: #6553e0;
  --area-1: #0b8f84;
  --area-2: #c27a0a;
  --area-3: #d0307a;
  --area-4: #2563eb;
  --area-5: #5f9a0d;
  --shadow-sm: 0 1px 2px rgb(20 24 40 / 6%);
  --shadow: 0 2px 6px rgb(20 24 40 / 6%), 0 12px 32px rgb(20 24 40 / 8%);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0e14;
    --surface: #141720;
    --surface-2: #1b1f2a;
    --surface-3: #252a37;
    --line: #252a37;
    --text: #e8eaf1;
    --muted: #8b92a7;
    --accent: #9d8fff;
    --accent-soft: #29244d;
    --on-accent: #120f29;
    --run: #f6b347;
    --run-soft: #382a10;
    --ok: #3ddc97;
    --ok-soft: #113126;
    --bad: #ff7b72;
    --bad-soft: #3b1918;
    --add: #3ddc97;
    --del: #ff7b72;
    --area-0: #9d8fff;
    --area-1: #2dd4bf;
    --area-2: #f6b347;
    --area-3: #f472b6;
    --area-4: #60a5fa;
    --area-5: #a3e635;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 30%);
    --shadow: 0 2px 6px rgb(0 0 0 / 30%), 0 16px 40px rgb(0 0 0 / 40%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0e14;
  --surface: #141720;
  --surface-2: #1b1f2a;
  --surface-3: #252a37;
  --line: #252a37;
  --text: #e8eaf1;
  --muted: #8b92a7;
  --accent: #9d8fff;
  --accent-soft: #29244d;
  --on-accent: #120f29;
  --run: #f6b347;
  --run-soft: #382a10;
  --ok: #3ddc97;
  --ok-soft: #113126;
  --bad: #ff7b72;
  --bad-soft: #3b1918;
  --add: #3ddc97;
  --del: #ff7b72;
  --area-0: #9d8fff;
  --area-1: #2dd4bf;
  --area-2: #f6b347;
  --area-3: #f472b6;
  --area-4: #60a5fa;
  --area-5: #a3e635;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 30%);
  --shadow: 0 2px 6px rgb(0 0 0 / 30%), 0 16px 40px rgb(0 0 0 / 40%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.push { margin-left: auto; }

/* ---- Grundlayout ---- */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); height: 100vh; }
.sidebar {
  display: flex; flex-direction: column; gap: 12px; min-height: 0;
  padding: 18px 14px 14px; border-right: 1px solid var(--line); background: var(--surface);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; padding: 0 4px; letter-spacing: -.01em; }
.brand-mark { width: 38px; flex: none; }
.side-label { font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 6px 8px 0; }
.main { overflow-y: auto; padding: 28px 32px 64px; min-width: 0; }

/* ---- Schaltflächen ---- */
.btn {
  border: 1px solid var(--line); background: var(--surface); border-radius: 9px;
  padding: 7px 13px; cursor: pointer; font-weight: 580; white-space: nowrap; box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { padding: 4px 10px; font-size: 12.5px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { border: 0; background: none; cursor: pointer; padding: 5px 9px; border-radius: 7px; color: var(--muted); font-size: 15px; line-height: 1; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Seitenleiste ---- */
.project-list { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; flex: 1; min-height: 0; }
.project-item { display: block; text-decoration: none; color: inherit; padding: 9px 10px; border-radius: 10px; border: 1px solid transparent; }
.project-item:hover { background: var(--surface-2); }
.project-item.active { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.project-item .row { display: flex; align-items: center; gap: 8px; }
.project-item .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.project-item .pct { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.project-item .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.mini-bar { height: 3px; border-radius: 99px; background: var(--surface-3); margin-top: 7px; overflow: hidden; }
.mini-bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.mini-dog { width: 24px; flex: none; margin: -4px 0; }
.side-empty { color: var(--muted); font-size: 13px; padding: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; margin: 0 8px; }
.dot.done { background: var(--ok); }
.dot.error { background: var(--bad); }
.dot.paused, .dot.idle { background: var(--run); }

.side-foot { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 8px; justify-items: start; }
.agent-status { font-size: 12.5px; color: var(--muted); padding: 0 4px; }
.agent-status strong { color: var(--text); font-weight: 600; }
.agent-status code { font-family: var(--mono); font-size: 11.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; color: var(--text); }
.agent-status .warn { color: var(--bad); font-weight: 600; }
.ok-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 6px; box-shadow: 0 0 0 3px var(--ok-soft); }

/* ---- Leerer Zustand ---- */
.empty { max-width: 560px; margin: 9vh auto 0; text-align: center; }
.empty-dog { width: 120px; margin: 0 auto 14px; }
.empty h1 { font-size: 26px; letter-spacing: -.02em; margin-bottom: 10px; }
.empty p { color: var(--muted); margin-bottom: 22px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: left; margin-bottom: 26px; }
.steps div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 13px; font-size: 13px; box-shadow: var(--shadow-sm); }
.steps b { display: block; color: var(--accent); font-size: 12px; margin-bottom: 4px; }

/* ---- Projektkopf ---- */
.project-head { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 18px; }
.project-head .titles { flex: 1; min-width: 0; }
.project-head h1 { font-size: 23px; letter-spacing: -.02em; line-height: 1.25; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.idea { color: var(--muted); margin-top: 6px; max-width: 80ch; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.idea.open { display: block; }
.path { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; opacity: .8; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.pill { display: inline-block; font-size: 11.5px; font-weight: 650; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; letter-spacing: .01em; }
.pill.running, .pill.planning, .pill.in_progress { background: var(--run-soft); color: var(--run); }
.pill.done { background: var(--ok-soft); color: var(--ok); }
.pill.error, .pill.failed { background: var(--bad-soft); color: var(--bad); }

.banner { display: flex; align-items: center; gap: 12px; border-radius: 12px; padding: 11px 14px; margin-bottom: 16px; background: var(--bad-soft); color: var(--bad); overflow-wrap: anywhere; }
.banner.ok { background: var(--ok-soft); color: var(--ok); font-weight: 550; }
.banner-dog { width: 54px; flex: none; }

.stats { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; box-shadow: var(--shadow-sm); }
.stat .label { color: var(--muted); font-size: 12px; }
.stat .value { font-size: 21px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat .value small { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--ok))); border-radius: 99px; transition: width .6s; }

.tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; margin-bottom: 18px; }
.tab { border: 0; background: none; padding: 6px 14px; cursor: pointer; color: var(--muted); font-weight: 600; border-radius: 8px; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tab .count { font-weight: 600; font-size: 11.5px; margin-left: 6px; background: var(--surface-3); color: var(--muted); padding: 0 6px; border-radius: 99px; }

/* ---- Board ---- */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.column { background: color-mix(in srgb, var(--surface-2) 70%, transparent); border: 1px solid var(--line); border-radius: 16px; padding: 12px; min-height: 160px; }
.column-head { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 13px; margin: 2px 4px 12px; }
.column-head .count { margin-left: auto; color: var(--muted); font-weight: 600; font-size: 12px; background: var(--surface); border: 1px solid var(--line); padding: 0 8px; border-radius: 99px; }
.col-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.col-run .col-dot { background: var(--run); }
.col-done .col-dot { background: var(--ok); }
.column-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 22px 8px; }
.column-empty.dogged { display: grid; justify-items: center; gap: 4px; padding-top: 14px; }
.column-empty.dogged .dog { width: 86px; }

.card {
  display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line);
  border-radius: 13px; padding: 12px 13px; margin-bottom: 10px; cursor: pointer; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); opacity: .9; }
.card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.card.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.card.in_progress { border-color: color-mix(in srgb, var(--run) 45%, var(--line)); }
.card.failed { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.card.blocked { opacity: .78; }
.card-top { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; font-size: 12px; color: var(--muted); }
.key { font-family: var(--mono); font-weight: 650; font-size: 12px; color: var(--text); white-space: nowrap; }
.card-top { flex-wrap: wrap; }
.card-title { font-weight: 620; line-height: 1.38; overflow-wrap: anywhere; }
.card-foot { display: flex; align-items: center; gap: 9px; margin-top: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.card-note { margin-top: 8px; font-size: 12px; color: var(--muted); }
.card-note.bad { color: var(--bad); overflow-wrap: anywhere; }
.card-live { margin-top: 8px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--surface-2); border-radius: 6px; padding: 3px 7px; }
.hash { font-family: var(--mono); font-size: 11.5px; background: var(--surface-2); border-radius: 5px; padding: 1px 6px; color: var(--text); }
.tag { font-size: 10.5px; font-weight: 650; padding: 1px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.tag.user { background: var(--surface-2); color: var(--muted); }
.area { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 1px 8px 1px 7px; border-radius: 99px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); white-space: nowrap; }
.area::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.add { color: var(--add); font-family: var(--mono); font-size: 12px; }
.del { color: var(--del); font-family: var(--mono); font-size: 12px; }

/* Status-Symbole */
.si { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; font-size: 10px; font-weight: 800; font-style: normal; flex: none; line-height: 1; }
.si.done { background: var(--ok); color: var(--surface); }
.si.bad { background: var(--bad); color: var(--surface); }
.si.run { background: var(--run); box-shadow: 0 0 0 0 color-mix(in srgb, var(--run) 50%, transparent); animation: ping 1.6s ease-out infinite; transform: scale(.7); }
.si.todo { border: 2px solid var(--muted); width: 14px; height: 14px; }
.si.wait { border: 2px dashed var(--muted); width: 14px; height: 14px; opacity: .7; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---- Fortschritt ---- */
.phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 10px; }
.ph { font-size: 10.5px; font-weight: 600; color: var(--muted); padding-top: 6px; border-top: 3px solid var(--surface-3); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ph.done { border-color: var(--ok); color: var(--ok); }
.ph.now { color: var(--run); border-image: repeating-linear-gradient(-45deg, var(--run) 0 5px, color-mix(in srgb, var(--run) 45%, transparent) 5px 10px) 1; animation: stripes 1s linear infinite; }
@keyframes stripes { to { border-image-source: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--run) 45%, transparent) 0 5px, var(--run) 5px 10px); } }

.ptrack { --dog: 42px; position: relative; height: 6px; background: var(--surface-3); border-radius: 99px; margin-top: 10px; }
.ptrack.live { margin-top: 30px; }
.ptrack.mini { --dog: 30px; height: 5px; flex: 1; margin-top: 0; }
.ptrack.mini.live { margin-top: 18px; }
.pfill { height: 100%; width: calc(var(--p) * 1%); border-radius: 99px; background: var(--accent); transition: width 1s cubic-bezier(.3, .7, .3, 1); }
.ptrack.live .pfill { background: linear-gradient(90deg, color-mix(in srgb, var(--run) 70%, var(--accent)), var(--run)); }
.ptrack.done .pfill { background: var(--ok); }
.pdog { position: absolute; bottom: 1px; width: var(--dog); left: calc((100% - var(--dog)) * var(--p) / 100); transition: left 1s cubic-bezier(.3, .7, .3, 1); }
.pmeta { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; font-size: 12px; color: var(--muted); }
.pmeta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmeta b { color: var(--run); font-variant-numeric: tabular-nums; }

/* ---- Karte ---- */
.map-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .si.run { animation: none; transform: scale(.7); }
.zoom { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.zoom > span { min-width: 40px; text-align: center; }
.map-scroll {
  overflow: auto; max-height: 72vh; border: 1px solid var(--line); border-radius: 16px; padding: 10px;
  background-color: var(--surface);
  background-image: radial-gradient(circle, color-mix(in srgb, var(--muted) 28%, transparent) 1px, transparent 1.2px);
  background-size: 18px 18px;
}
.map-canvas { position: relative; }
.map-inner { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.lane { position: absolute; left: 0; right: 0; border-radius: 14px; background: color-mix(in srgb, var(--c) 6%, transparent); border: 1px solid color-mix(in srgb, var(--c) 18%, transparent); }
.lane-label { position: absolute; left: 14px; top: 10px; display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--c); letter-spacing: .02em; }
.lane-dot { width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.lane-count { font-weight: 600; color: var(--muted); font-size: 11.5px; }
.edges { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.edge { fill: none; stroke-width: 2; transition: opacity .2s, stroke-width .2s; }
.edge.done { stroke: color-mix(in srgb, var(--ok) 70%, transparent); }
.edge.todo { stroke: color-mix(in srgb, var(--muted) 55%, transparent); stroke-dasharray: 5 5; }
.edge.active { stroke: var(--run); stroke-dasharray: 7 6; animation: flow .7s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -13; } }
.arrow-done { fill: color-mix(in srgb, var(--ok) 70%, transparent); }
.arrow-todo { fill: color-mix(in srgb, var(--muted) 55%, transparent); }
.arrow-active { fill: var(--run); }

.node {
  position: absolute; display: flex; flex-direction: column; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 10px 12px 10px 14px;
  box-shadow: var(--shadow-sm); overflow: hidden; transition: opacity .2s, box-shadow .2s, transform .15s, border-color .2s;
}
.node::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.node:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.node.done { background: color-mix(in srgb, var(--ok) 6%, var(--surface)); }
.node.in_progress { border-color: var(--run); box-shadow: 0 0 0 3px color-mix(in srgb, var(--run) 22%, transparent), var(--shadow); }
.node.failed { border-color: var(--bad); }
.node.blocked { opacity: .72; }
.node.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.node-top { display: flex; align-items: center; gap: 6px; }
.node-title { font-weight: 620; font-size: 13px; line-height: 1.32; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.node-foot { margin-top: auto; display: flex; align-items: flex-end; gap: 8px; font-size: 11.5px; color: var(--muted); min-height: 18px; }
.node-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node-note.ok { color: var(--ok); }
.node-note.bad { color: var(--bad); }
.node-pct { font-weight: 700; color: var(--run); font-variant-numeric: tabular-nums; line-height: 1; }
.map-inner.focus .node:not(.hl) { opacity: .3; }
.map-inner.focus .edge:not(.hl) { opacity: .12; }
.map-inner.focus .edge.hl { stroke-width: 3; }
.map-hint { color: var(--muted); font-size: 12px; margin-top: 8px; }

/* ---- Planung ---- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; max-width: 880px; box-shadow: var(--shadow-sm); }
.plan-hero { display: flex; align-items: center; gap: 18px; }
.plan-dog { width: 110px; flex: none; }
.plan-hero h3 { font-size: 16px; margin-bottom: 4px; }
.plan-hero p { color: var(--muted); }
.plan-panel .log { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.paws { display: flex; gap: 14px; margin: 10px 0 0 120px; }
.paws span { width: 14px; color: var(--muted); opacity: 0; animation: paw 2.8s ease-in-out infinite; animation-delay: calc(var(--i) * .3s); }
.paws span:nth-child(odd) { transform: translateY(6px) rotate(80deg); }
.paws span:nth-child(even) { transform: rotate(100deg); }
.paws svg { fill: currentColor; display: block; }
@keyframes paw { 0% { opacity: 0; } 15%, 55% { opacity: .55; } 80%, 100% { opacity: 0; } }

/* ---- Hunde ---- */
.dog { display: block; width: 100%; height: auto; overflow: visible; }
.dog .fur { stroke: rgb(0 0 0 / 20%); stroke-width: .7; }
.dog-shadow { fill: rgb(0 0 0 / 14%); }
.dog .leg-a, .dog .leg-b { transform-box: fill-box; transform-origin: 50% 0; }
.dog-run .leg-a { animation: dog-leg .32s ease-in-out infinite alternate; }
.dog-run .leg-b { animation: dog-leg .32s ease-in-out infinite alternate-reverse; }
@keyframes dog-leg { from { transform: rotate(30deg); } to { transform: rotate(-30deg); } }
.dog-run .dog-bob { animation: dog-bob .16s ease-in-out infinite alternate; }
@keyframes dog-bob { to { transform: translateY(-1.3px); } }
.dog-tail { transform-box: fill-box; transform-origin: 100% 100%; animation: dog-wag .3s ease-in-out infinite alternate; }
.dog-sniff .dog-tail, .dog-wag .dog-tail { animation-duration: .16s; }
@keyframes dog-wag { from { transform: rotate(-16deg); } to { transform: rotate(18deg); } }
.dog-ear { transform-box: fill-box; transform-origin: 50% 8%; }
.dog-run .dog-ear { animation: dog-ear .32s ease-in-out infinite alternate; }
@keyframes dog-ear { from { transform: rotate(-10deg); } to { transform: rotate(16deg); } }
.dog-head { transform-box: fill-box; transform-origin: 15% 85%; }
.dog-sniff .dog-head { animation: dog-sniff 1.4s ease-in-out infinite; }
@keyframes dog-sniff { 0%, 100% { transform: rotate(0); } 35%, 75% { transform: rotate(20deg) translateY(3px); } 45%, 65% { transform: rotate(17deg) translateY(3px); } 55% { transform: rotate(20deg) translateY(3px); } }
.dog-wag .dog-head { animation: dog-tilt 2.6s ease-in-out infinite; }
@keyframes dog-tilt { 0%, 60%, 100% { transform: rotate(0); } 70%, 90% { transform: rotate(-9deg); } }
.dog-breath { transform-box: fill-box; transform-origin: 50% 100%; animation: dog-breath 2.8s ease-in-out infinite; }
@keyframes dog-breath { 50% { transform: scaleY(1.07); } }
.dog-z { font: 700 8px sans-serif; fill: var(--muted); opacity: 0; animation: dog-z 2.8s ease-in-out infinite; }
.dog-z.z2 { font-size: 10px; animation-delay: 1.4s; }
@keyframes dog-z { 0% { opacity: 0; transform: translate(0, 4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(5px, -7px); } }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.loading .dog { width: 46px; }

/* ---- Commit-Verlauf & Aktivität ---- */
.timeline { position: relative; padding-left: 22px; max-width: 880px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.commit { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px; margin-bottom: 12px; cursor: pointer; width: 100%; text-align: left; display: block; box-shadow: var(--shadow-sm); }
.commit:hover { border-color: var(--accent); }
.commit::before { content: ""; position: absolute; left: -21px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--accent)); border: 2px solid var(--bg); }
.commit-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.commit-head .subject { font-weight: 620; flex: 1; min-width: 200px; overflow-wrap: anywhere; }
.commit-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.files { margin-top: 9px; font-family: var(--mono); font-size: 12px; color: var(--muted); display: grid; gap: 2px; }
.files div { display: flex; gap: 10px; }
.files .p { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }

.feed { max-width: 880px; display: grid; gap: 2px; }
.feed-item { display: grid; grid-template-columns: 80px 18px 1fr; gap: 8px; padding: 7px 8px; border-radius: 8px; align-items: baseline; }
.feed-item[data-ticket] { cursor: pointer; }
.feed-item[data-ticket]:hover { background: var(--surface-2); }
.feed-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); align-self: center; }
.feed-dot.ticket-done, .feed-dot.done { background: var(--ok); }
.feed-dot.error { background: var(--bad); }
.feed-dot.ticket-start, .feed-dot.run, .feed-dot.plan { background: var(--run); }
.feed-dot.ticket-new { background: var(--accent); }

/* ---- Ticket-Schublade ---- */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100vw); background: var(--surface);
  border-left: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; z-index: 10;
}
.drawer-head { display: flex; align-items: flex-start; gap: 10px; padding: 18px 18px 14px 22px; border-bottom: 1px solid var(--line); }
.drawer-head > div { flex: 1; min-width: 0; }
.drawer-head h2 { font-size: 18px; letter-spacing: -.01em; line-height: 1.3; margin-top: 6px; overflow-wrap: anywhere; }
.drawer-body { overflow-y: auto; padding: 16px 22px 40px; flex: 1; }
.meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.section-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 22px 0 8px; font-weight: 650; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
.criteria { margin: 0; padding-left: 18px; }
.criteria li { margin-bottom: 3px; }
.box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.box.ok { background: var(--ok-soft); border-color: transparent; }
.box.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); overflow-wrap: anywhere; }
.box .phases { margin-top: 0; }
.drawer-actions { display: flex; gap: 8px; margin-top: 12px; }
.touched { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; align-items: center; font-size: 12px; color: var(--muted); }
.touched span { width: 100%; }
.touched code { font-family: var(--mono); font-size: 11px; background: var(--surface-2); padding: 1px 6px; border-radius: 5px; color: var(--text); }
.deps { display: grid; gap: 10px; }
.deps > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.deps-label { width: 100%; font-size: 12px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 99px; padding: 3px 10px 3px 5px; cursor: pointer; font-size: 12px; font-family: var(--mono); font-weight: 600; }
.chip span { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-weight: 500; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.chip:hover { border-color: var(--accent); }

.diff { font-family: var(--mono); font-size: 12px; line-height: 1.45; background: var(--surface-2); border-radius: 10px; padding: 10px 0; margin-top: 10px; overflow-x: auto; max-height: 420px; overflow-y: auto; }
.diff div { padding: 0 12px; white-space: pre; min-width: max-content; }
.diff .a { color: var(--add); background: color-mix(in srgb, var(--add) 10%, transparent); }
.diff .d { color: var(--del); background: color-mix(in srgb, var(--del) 10%, transparent); }
.diff .h { color: var(--muted); }
.diff .f { font-weight: 700; margin-top: 8px; }

.log { display: grid; gap: 6px; font-size: 13px; }
.log-empty { color: var(--muted); }
.log-line { display: grid; grid-template-columns: 58px 1fr; gap: 8px; }
.log-time { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.log-body { min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.log-line.tool .log-body { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border-radius: 6px; padding: 4px 8px; }
.log-line.tool b { color: var(--accent); margin-right: 6px; }
.log-line.system .log-body { color: var(--muted); font-style: italic; }
.log-line.error .log-body { color: var(--bad); }
.log-line.result .log-body { background: var(--ok-soft); border-radius: 6px; padding: 6px 9px; }

/* ---- Dialoge ---- */
dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); padding: 0; width: min(540px, calc(100vw - 32px)); box-shadow: var(--shadow); }
dialog::backdrop { background: rgb(5 6 12 / 55%); backdrop-filter: blur(2px); }
dialog form { display: grid; gap: 14px; padding: 22px; }
dialog h2 { font-size: 18px; }
label { display: grid; gap: 5px; font-weight: 600; font-size: 13px; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
input:not([type=checkbox]), textarea, select {
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: var(--bg); font-weight: 400; width: 100%;
}
textarea { resize: vertical; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.form-error { color: var(--bad); }

@media (prefers-reduced-motion: reduce) {
  .dog *, .paws span, .edge.active, .si.run, .ph.now { animation: none !important; }
  .paws span { opacity: .4; }
  .pfill, .pdog { transition: none; }
}

/* ---- Schmale Bildschirme ---- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; height: auto; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .project-list { max-height: 200px; }
  .main { padding: 20px 16px 60px; overflow: visible; }
  .project-head { flex-direction: column; }
  .actions { justify-content: flex-start; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats .stat.wide { grid-column: 1 / -1; }
  .board { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .tabs { display: flex; overflow-x: auto; }
  .plan-hero { flex-direction: column; align-items: flex-start; }
  .paws { margin-left: 0; }
}

/* ---- Abo-Limit ---- */
.banner.wait { background: color-mix(in srgb, var(--area-4) 12%, var(--surface)); color: var(--text); border: 1px solid color-mix(in srgb, var(--area-4) 35%, transparent); align-items: flex-start; }
.banner.wait b { color: var(--area-4); }
.banner.wait small { display: block; color: var(--muted); margin-top: 4px; }
.banner.wait .banner-dog { width: 64px; margin-top: 4px; }
.dot.waiting { background: var(--area-4); }
.pill.waiting { background: color-mix(in srgb, var(--area-4) 16%, transparent); color: var(--area-4); }
.card.interrupted { border-color: color-mix(in srgb, var(--area-4) 45%, var(--line)); }
.card.interrupted .pfill { background: var(--area-4); }
.node-note.run { color: var(--area-4); }

/* ---- Tickets aus natürlicher Sprache ---- */
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 22px 22px 0; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--muted); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.hint { color: var(--muted); font-size: 12.5px; margin-top: -6px; }
.draft { display: flex; align-items: flex-start; gap: 14px; border-radius: 14px; padding: 12px 14px; margin-bottom: 18px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); }
.draft.running { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.draft.waiting { border-color: color-mix(in srgb, var(--area-4) 40%, var(--line)); }
.draft.error { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.draft.done { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.draft-dog { width: 64px; flex: none; margin-top: 2px; }
.draft-body { flex: 1; min-width: 0; }
.draft-body p { margin-top: 4px; color: var(--muted); }
.draft.error .draft-body p { color: inherit; opacity: .85; }
.draft-quote { font-style: italic; overflow-wrap: anywhere; }
.draft-live { margin-top: 8px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); background: var(--surface-2); border-radius: 6px; padding: 3px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ---- Waagrechte Timeline ---- */
.tl-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tl-legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--tone); }
.tone-ok { --tone: var(--ok); }
.tone-run { --tone: var(--run); }
.tone-bad { --tone: var(--bad); }
.tone-accent { --tone: var(--accent); }
.tone-muted { --tone: var(--muted); }
.tone-limit { --tone: var(--area-4); }
.tl-scroll {
  overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); scroll-behavior: auto; overscroll-behavior-x: contain;
}
.tl-track { position: relative; display: flex; height: 360px; min-width: max-content; padding: 0 28px; }
.tl-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: linear-gradient(90deg, var(--line), var(--surface-3) 6%, var(--surface-3) 94%, var(--line)); }
.tl-item { position: relative; flex: none; width: 210px; margin-right: -94px; cursor: default; }
.tl-item[data-ticket] { cursor: pointer; }
.tl-dot { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--tone); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--tone); z-index: 2; }
.tl-stem { position: absolute; left: 50%; width: 2px; margin-left: -1px; height: 24px; background: color-mix(in srgb, var(--tone) 55%, transparent); }
.tl-item.up .tl-stem { bottom: 50%; }
.tl-item.down .tl-stem { top: 50%; }
.tl-card {
  position: absolute; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--tone);
  border-radius: 11px; padding: 8px 10px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s;
}
.tl-item.up .tl-card { bottom: calc(50% + 24px); }
.tl-item.down .tl-card { top: calc(50% + 24px); }
.tl-item:hover { z-index: 3; }
.tl-item:hover .tl-card { box-shadow: var(--shadow); }
.tl-item.up:hover .tl-card { transform: translateY(-2px); }
.tl-item.down:hover .tl-card { transform: translateY(2px); }
.tl-head { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.tl-label { font-weight: 700; color: var(--tone); text-transform: uppercase; letter-spacing: .05em; font-size: 10.5px; }
.tl-time { margin-left: auto; font-variant-numeric: tabular-nums; }
.tl-text { font-size: 12.5px; line-height: 1.38; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tl-mark { position: relative; flex: none; width: 76px; margin-left: 94px; margin-right: 6px; display: grid; place-items: center; }
.tl-day::before { content: ""; position: absolute; top: 16px; bottom: 16px; left: 50%; border-left: 2px dashed var(--surface-3); }
.tl-day span { position: relative; z-index: 1; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 2px 9px; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.tl-gap::before { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 12px; margin-top: -6px; background: var(--surface); background-image: repeating-linear-gradient(90deg, var(--muted) 0 3px, transparent 3px 8px); background-size: 100% 2px; background-repeat: no-repeat; background-position: center; z-index: 1; }
.tl-gap span { position: absolute; top: calc(50% + 12px); font-size: 11px; color: var(--muted); white-space: nowrap; }
.tl-now { width: 96px; margin-right: 0; }
.tl-now span { position: absolute; top: calc(50% + 10px); font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.tl-now::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-now-dog { position: absolute; bottom: calc(50% + 2px); width: 58px; }
@media (max-width: 900px) {
  .tl-track { height: 340px; }
  .tl-item { width: 180px; margin-right: -80px; }
  .tl-mark { margin-left: 80px; }
}
#draft-form, #ticket-form { padding-top: 16px; }
.card.interrupted .pmeta b { color: var(--area-4); }

/* ---- Tests, Review, On Hold ---- */
:root { --hold: var(--area-3); }
.phases { grid-template-columns: repeat(5, 1fr); }
.ph.skip { border-top-style: dashed; border-color: var(--line); color: color-mix(in srgb, var(--muted) 55%, transparent); text-decoration: line-through; }
.board.with-hold { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.col-hold .col-dot { background: var(--hold); }
.card.on_hold, .card.failed { border-color: color-mix(in srgb, var(--hold) 45%, var(--line)); background: color-mix(in srgb, var(--hold) 5%, var(--surface)); }
.card-note.hold { color: var(--hold); font-weight: 550; }
.card-cta { margin-top: 8px; font-size: 12px; font-weight: 650; color: var(--hold); }
.si.hold { background: var(--hold); color: var(--surface); font-size: 9px; }
.node.on_hold { border-color: var(--hold); }
.node-note.hold { color: var(--hold); font-weight: 600; }
.pill.on_hold, .pill.attention { background: color-mix(in srgb, var(--hold) 14%, transparent); color: var(--hold); }
.dot.attention { background: var(--hold); }
.stats:has(.stat.hold) { grid-template-columns: 2fr repeat(5, 1fr); }
.stat.hold .value { color: var(--hold); }
.tone-hold { --tone: var(--hold); }

.qa-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.qa { font-size: 11px; font-weight: 650; padding: 1px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.qa.ok { background: var(--ok-soft); color: var(--ok); }
.qa.bad { background: var(--bad-soft); color: var(--bad); }

.banner.hold { background: color-mix(in srgb, var(--hold) 9%, var(--surface)); color: var(--text); border: 1px solid color-mix(in srgb, var(--hold) 35%, transparent); align-items: flex-start; }
.banner.hold b { color: var(--hold); }
.banner.hold small { display: block; color: var(--muted); margin-top: 4px; }
.banner.hold .banner-dog { width: 64px; margin-top: 4px; }
.banner.hold .draft-chips { margin-top: 8px; }

.section-label small { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); margin-left: 6px; }
.tests-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.tests-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; display: flex; }
.tests-bar .ok { background: var(--ok); }
.tests-bar .bad { background: var(--bad); }
.tests-note { margin: 0 0 8px; color: var(--muted); font-size: 12.5px; }
ul.tests, ul.issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
ul.tests li, ul.issues li { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; font-size: 12.5px; }
ul.tests li div { display: grid; gap: 1px; min-width: 0; }
ul.tests b { font-weight: 600; overflow-wrap: anywhere; }
ul.tests .crit { color: var(--accent); font-size: 11.5px; }
ul.tests .desc { color: var(--muted); }
ul.tests code, ul.issues code, .tests-cmd code { font-family: var(--mono); font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.tc { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; font-size: 10px; font-weight: 800; margin-top: 1px; }
.tc.ok { background: var(--ok-soft); color: var(--ok); }
.tc.bad { background: var(--bad-soft); color: var(--bad); }
.tc.pending { background: var(--surface-2); color: var(--muted); }
.tests-cmd { margin-top: 10px; font-size: 12px; color: var(--muted); }

.reviews { display: grid; gap: 8px; }
.review { border: 1px solid var(--line); border-left: 3px solid var(--ok); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.review.bad { border-left-color: var(--bad); }
.review-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.review.ok .review-head b { color: var(--ok); }
.review.bad .review-head b { color: var(--bad); }
.review .round { font-size: 11px; font-weight: 650; color: var(--muted); }
.review p { margin: 6px 0; font-size: 12.5px; }
.review-next { margin-top: 8px; font-size: 12px; color: var(--muted); }
.sev { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; white-space: nowrap; }
.sev.blocker { background: var(--bad); color: var(--surface); }
.sev.major { background: var(--bad-soft); color: var(--bad); }
.sev.minor { background: var(--surface-2); color: var(--muted); }

.hold-box { border: 1px solid color-mix(in srgb, var(--hold) 40%, var(--line)); background: color-mix(in srgb, var(--hold) 6%, var(--surface)); border-radius: 12px; padding: 14px; margin-bottom: 8px; }
.hold-title { display: flex; gap: 10px; align-items: flex-start; }
.hold-title .dog { width: 54px; flex: none; }
.hold-title b { color: var(--hold); }
.hold-title p { margin: 4px 0 0; font-size: 13px; }
.hold-sub { display: block; margin: 12px 0 6px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.hold-box textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); resize: vertical; }
.hold-box textarea:focus { outline: 2px solid color-mix(in srgb, var(--hold) 50%, transparent); border-color: var(--hold); }
.hold-box label.check { margin-top: 8px; font-size: 13px; }
.hold-box .hint { margin: 8px 0 0; }
.instr { display: grid; gap: 2px; font-size: 13px; }
.instr + .instr { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.instr span { font-size: 11px; color: var(--muted); }

@media (max-width: 1100px) { .board.with-hold { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .board.with-hold { grid-template-columns: 1fr; } .stats:has(.stat.hold) { grid-template-columns: repeat(2, 1fr); } }

/* ---- Login ---- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; box-sizing: border-box; background: var(--bg); }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px 24px; box-shadow: var(--shadow); text-align: center; }
.login-dog { width: 120px; margin: 0 auto 12px; }
.login-card h1 { font-size: 21px; margin: 0 0 6px; letter-spacing: -.01em; }
.login-lead { color: var(--muted); margin: 0 0 20px; }
.login-btn { display: block; text-align: center; text-decoration: none; padding: 11px 16px; font-size: 14.5px; }
.login-foot { color: var(--muted); font-size: 12px; margin: 16px 0 0; }
.login-msg { font-size: 13px; border-radius: 10px; padding: 9px 12px; margin: 0 0 16px; text-align: left; }
.login-msg.bad { background: var(--bad-soft); color: var(--bad); }
.login-msg.ok { background: var(--ok-soft); color: var(--ok); }
.login-msg.info { background: var(--surface-2); color: var(--text); }

.user-box { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12.5px; min-width: 0; }
.user-box .avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12px; flex: none; }
.user-box .who { min-width: 0; flex: 1; }
.user-box .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-box .who span { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Branches ---- */
.bi { width: 13px; height: 13px; flex: none; }
.card-branch { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-family: var(--mono); font-size: 11px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.merge-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.merge-line code { font-family: var(--mono); font-size: 11.5px; background: var(--surface-2); color: var(--text); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.merge-line .arrow { color: var(--ok); font-weight: 700; }
.merge-line.standalone { margin: 0 0 12px; }
