/* Testboard — mobile first, hell/dunkel über prefers-color-scheme */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --surface-3: #e9ecf1;
  --border: #e2e5ea;
  --border-strong: #cfd4dc;
  --text: #111827;
  --text-2: #374151;
  --muted: #6b7280;
  --accent: #4f46e5;
  --accent-ink: #ffffff;
  --accent-soft: #eef0ff;
  --accent-text: #4338ca;
  --danger: #dc2626;

  --st-open: #9ca3af;      --st-open-soft: #f1f2f4;      --st-open-ink: #4b5563;
  --st-progress: #2563eb;  --st-progress-soft: #e6efff;  --st-progress-ink: #1d4ed8;
  --st-pass: #16a34a;      --st-pass-soft: #e5f6ea;      --st-pass-ink: #15803d;
  --st-fail: #dc2626;      --st-fail-soft: #fdecec;      --st-fail-ink: #b91c1c;
  --st-missing: #d97706;   --st-missing-soft: #fdf1df;   --st-missing-ink: #b45309;
  --st-skip: #64748b;      --st-skip-soft: #eef1f5;      --st-skip-ink: #475569;

  --p1: #dc2626; --p1-soft: #fdecec;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-2: 0 10px 30px rgba(16, 24, 40, .14), 0 2px 6px rgba(16, 24, 40, .06);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar: 248px;
  --tabbar: 58px;
  --topbar: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a21;
    --surface-2: #1d2129;
    --surface-3: #262b35;
    --border: #2a2f3a;
    --border-strong: #3a4150;
    --text: #e8eaee;
    --text-2: #c9cdd5;
    --muted: #979fac;
    --accent: #818cf8;
    --accent-ink: #0f1115;
    --accent-soft: #232748;
    --accent-text: #a5b0ff;
    --danger: #f87171;

    --st-open: #6b7280;      --st-open-soft: #22262e;      --st-open-ink: #b4bac4;
    --st-progress: #60a5fa;  --st-progress-soft: #172640;  --st-progress-ink: #93c5fd;
    --st-pass: #4ade80;      --st-pass-soft: #14291c;      --st-pass-ink: #86efac;
    --st-fail: #f87171;      --st-fail-soft: #331a1a;      --st-fail-ink: #fca5a5;
    --st-missing: #fbbf24;   --st-missing-soft: #33260f;   --st-missing-ink: #fcd34d;
    --st-skip: #94a3b8;      --st-skip-soft: #222832;      --st-skip-ink: #cbd5e1;

    --p1: #f87171; --p1-soft: #331a1a;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-2: 0 12px 34px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.hidden { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 15px; height: 15px; }
svg.i.lg { width: 22px; height: 22px; }

/* ---------- Boot ---------- */
.boot-splash { position: fixed; inset: 0; display: grid; place-items: center; }
.boot-splash img { border-radius: 16px; opacity: .9; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; transform: scale(.97); } }

/* ---------- App-Rahmen ---------- */
.shell { min-height: 100vh; min-height: 100dvh; }
.sidebar { display: none; }
.main { min-width: 0; padding-bottom: calc(var(--tabbar) + var(--safe-b) + 24px); }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  min-height: calc(var(--topbar) + var(--safe-t));
  padding: var(--safe-t) 12px 0;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--border); }
.topbar .title { font-weight: 650; font-size: 17px; min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .title small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.view { padding: 8px 16px 24px; max-width: 1180px; margin: 0 auto; }
.view.wide { max-width: none; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  border-top: 1px solid var(--border);
}
.tabbar a {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: 11px; font-weight: 550;
}
.tabbar a.active { color: var(--accent-text); }
.tabbar a svg.i { width: 23px; height: 23px; }
.tabbar .badge { position: absolute; top: 5px; left: calc(50% + 6px); }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: var(--sidebar) 1fr; }
  .tabbar { display: none; }
  .main { padding-bottom: 32px; }
  .sidebar {
    display: flex; flex-direction: column; gap: 2px;
    position: sticky; top: 0; height: 100vh;
    padding: 16px 12px;
    border-right: 1px solid var(--border);
    background: var(--surface);
    overflow-y: auto;
  }
  .sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; font-weight: 700; font-size: 16px; }
  .sidebar .brand img { width: 28px; height: 28px; border-radius: 7px; }
  .sidebar .section { margin: 16px 8px 6px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
  .sidebar a.nav {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 8px;
    color: var(--text-2); font-weight: 520;
  }
  .sidebar a.nav:hover { background: var(--surface-2); }
  .sidebar a.nav.active { background: var(--accent-soft); color: var(--accent-text); }
  .sidebar a.nav .badge { margin-left: auto; }
  .sidebar a.nav .app-ico { width: 22px; height: 22px; font-size: 13px; border-radius: 6px; }
  .sidebar .foot { margin-top: auto; padding-top: 12px; }
  .view { padding: 12px 28px 32px; }
  .topbar { padding-left: 28px; padding-right: 20px; }
  .topbar .back { display: none; }
}

/* ---------- Bausteine ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.card.pad { padding: 14px 16px; }
.card.link { display: block; color: inherit; transition: border-color .12s, transform .12s; }
.card.link:hover { border-color: var(--border-strong); }
.card.link.row { display: flex; }
.card.link:active { transform: scale(.995); }
.section-head { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; }
.section-head h2 { flex: 1; }
.grid { display: grid; gap: 12px; }
.grid > * { min-width: 0; }
@media (min-width: 640px) { .grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 640px) and (max-width: 1099px) { .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .06s;
  user-select: none; -webkit-user-select: none;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.icon { width: 38px; padding: 0; }
.btn.icon.sm { width: 32px; }
.btn.block { width: 100%; }
.btn.lg { min-height: 48px; font-size: 16px; border-radius: 12px; }

.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
}
.badge.soft { background: var(--surface-3); color: var(--text-2); }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 11px;
  background: var(--surface-2); color: var(--text-2);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.chip.p1 { background: var(--p1-soft); color: var(--p1); }
.chip.p3 { color: var(--muted); }
.chip.new { background: var(--accent-soft); color: var(--accent-text); }
.chip.plat { background: transparent; border: 1px solid var(--border); color: var(--muted); height: 20px; padding: 0 6px; font-size: 11px; }
.stage { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.stage.planned { background: var(--surface-2); color: var(--muted); }
.stage.internal { background: var(--st-progress-soft); color: var(--st-progress-ink); }
.stage.beta { background: #efe7ff; color: #6d28d9; }
.stage.review { background: var(--st-missing-soft); color: var(--st-missing-ink); }
.stage.production { background: var(--st-pass-soft); color: var(--st-pass-ink); }
@media (prefers-color-scheme: dark) { .stage.beta { background: #2a1f47; color: #c4b5fd; } }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 9px; border-radius: 12px;
  font-size: 12px; font-weight: 650; white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.open { background: var(--st-open-soft); color: var(--st-open-ink); }
.pill.progress { background: var(--st-progress-soft); color: var(--st-progress-ink); }
.pill.pass { background: var(--st-pass-soft); color: var(--st-pass-ink); }
.pill.fail { background: var(--st-fail-soft); color: var(--st-fail-ink); }
.pill.missing { background: var(--st-missing-soft); color: var(--st-missing-ink); }
.pill.skip { background: var(--st-skip-soft); color: var(--st-skip-ink); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.open { background: var(--st-open); } .dot.progress { background: var(--st-progress); }
.dot.pass { background: var(--st-pass); } .dot.fail { background: var(--st-fail); }
.dot.missing { background: var(--st-missing); } .dot.skip { background: var(--st-skip); }

.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  font-size: 11px; font-weight: 700; color: #fff; letter-spacing: .02em;
  background: var(--muted);
}
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }
.avatar.lg { width: 36px; height: 36px; font-size: 14px; }
.avatar.none { background: transparent; border: 1.5px dashed var(--border-strong); color: var(--muted); }
.app-ico {
  display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 10px; font-size: 22px;
  background: var(--surface-2);
}
.app-ico.sm { width: 28px; height: 28px; font-size: 16px; border-radius: 8px; }
.app-ico.lg { width: 52px; height: 52px; font-size: 30px; border-radius: 13px; }

/* Fortschrittsbalken (gestapelt) */
.bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-3); }
.bar.thin { height: 5px; }
.bar > span { display: block; height: 100%; }
.bar .pass { background: var(--st-pass); } .bar .fail { background: var(--st-fail); }
.bar .missing { background: var(--st-missing); } .bar .skip { background: var(--st-skip); }
.bar .progress { background: var(--st-progress); }
.counts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.counts b { color: var(--text); font-weight: 650; }
.counts .c { display: inline-flex; align-items: center; gap: 5px; }
button.counts-btn { border: 0; background: none; padding: 2px 0; cursor: pointer; color: inherit; font: inherit; display: inline-flex; align-items: center; gap: 5px; border-radius: 6px; }
button.counts-btn.on { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }

/* Formulare */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); min-width: 0; }
.field .hint { font-weight: 450; color: var(--muted); font-size: 12px; }
.field .seg { align-self: flex-start; }
.input, select.input, textarea.input {
  width: 100%; min-height: 42px; padding: 9px 12px;
  border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface); color: var(--text); font-size: 16px; font-weight: 450;
  outline: none; transition: border-color .12s, box-shadow .12s;
}
textarea.input { resize: vertical; min-height: 84px; line-height: 1.45; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
select.input { appearance: none; -webkit-appearance: none; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23888' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.input.sm { min-height: 34px; padding: 5px 10px; font-size: 14px; border-radius: 8px; }
@media (min-width: 900px) { .input, select.input, textarea.input { font-size: 14px; } }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border-radius: 10px; border: 1px solid var(--border); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  border: 0; background: transparent; padding: 6px 11px; border-radius: 7px;
  font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.checks label {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 9px; border: 1px solid var(--border-strong);
  font-size: 13px; font-weight: 600; cursor: pointer; user-select: none;
}
.checks input { accent-color: var(--accent); margin: 0; }
.checks label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.form-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
input[type=checkbox].cb { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex: none; cursor: pointer; }

/* ---------- Übersicht ---------- */
.hello { margin: 6px 0 16px; }
.hello h1 { font-size: 26px; }
.focus-card {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 8px 24px rgba(79, 70, 229, .28);
}
.focus-card .n { font-size: 34px; font-weight: 800; line-height: 1; }
.focus-card .btn { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .28); color: #fff; }
.focus-card .btn:hover { background: rgba(255, 255, 255, .26); }
.focus-card.done { background: linear-gradient(135deg, #059669, #16a34a); box-shadow: 0 8px 24px rgba(22, 163, 74, .22); }
.run-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.run-card .head { display: flex; gap: 10px; align-items: center; }
.run-card .head .t { font-weight: 650; }
.app-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.app-card .vers { display: flex; flex-wrap: wrap; gap: 6px; }
.vchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 6px; border-radius: 8px; background: var(--surface-2); font-size: 12px; font-weight: 600; }
.feed { display: flex; flex-direction: column; }
.feed .item { display: flex; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--border); align-items: flex-start; cursor: pointer; }
.feed .item:last-child { border-bottom: 0; }
.feed .item .txt { font-size: 14px; min-width: 0; }
.feed .item .txt .q { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.install-tip { display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin-bottom: 14px; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .big { font-size: 38px; margin-bottom: 6px; }

/* ---------- Header einer Seite ---------- */
.page-head { display: flex; gap: 14px; align-items: flex-start; margin: 6px 0 16px; }
.page-head .meta { flex: 1; min-width: 0; }
.page-head .meta .sub { color: var(--muted); font-size: 14px; margin-top: 3px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 639px) {
  .page-head { flex-wrap: wrap; }
  .page-head .actions { width: 100%; justify-content: flex-start; }
}
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 12px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- Listen ---------- */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .search { position: relative; flex: 1 1 200px; min-width: 160px; }
.toolbar .search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .search .input { padding-left: 34px; min-height: 36px; }
.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-bottom: 12px; }
.filters::-webkit-scrollbar { display: none; }
.fchip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 32px; padding: 0 11px; border-radius: 16px;
  border: 1px solid var(--border-strong); background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer;
}
.fchip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.fchip .dot { width: 8px; height: 8px; }
select.fchip { appearance: none; -webkit-appearance: none; padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }

.group { margin-bottom: 16px; }
.group-head {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px; cursor: pointer; user-select: none;
  position: sticky; top: calc(var(--topbar) + var(--safe-t)); z-index: 5;
  background: var(--bg);
}
.group-head h3 { font-size: 14px; }
.group-head .bar { width: 80px; }
.group-head .chev { transition: transform .15s; color: var(--muted); }
.group.collapsed .chev { transform: rotate(-90deg); }
.group.collapsed .list { display: none; }
.list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.list-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; min-height: 58px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .1s;
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--surface-2); }
.list-row.selected { background: var(--accent-soft); }
.list-row .body { flex: 1; min-width: 0; }
.list-row .line1 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.list-row .key { font-size: 12px; color: var(--muted); font-weight: 600; flex: none; font-variant-numeric: tabular-nums; }
.list-row .t { font-weight: 560; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.list-row .line2 { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12.5px; color: var(--muted); min-width: 0; overflow: hidden; }
.list-row .line2 .chip { height: 19px; padding: 0 6px; font-size: 11px; }
.list-row .line2 .avatar { width: 18px; height: 18px; font-size: 9px; }
.list-row .line2 .note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.list-row.st-pass .t, .list-row.st-skip .t { color: var(--muted); }
.list-row .cbw { display: flex; align-items: center; padding: 4px; margin: -4px; }
.quick { display: flex; gap: 4px; flex: none; }
.qbtn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--muted);
  transition: background .1s, color .1s, border-color .1s, transform .06s;
}
.qbtn:active { transform: scale(.92); }
.qbtn svg.i { width: 17px; height: 17px; stroke-width: 2.4; }
.qbtn.pass:hover, .qbtn.pass.on { background: var(--st-pass-soft); color: var(--st-pass-ink); border-color: var(--st-pass); }
.qbtn.fail:hover, .qbtn.fail.on { background: var(--st-fail-soft); color: var(--st-fail-ink); border-color: var(--st-fail); }
.qbtn.missing:hover, .qbtn.missing.on { background: var(--st-missing-soft); color: var(--st-missing-ink); border-color: var(--st-missing); }
@media (max-width: 520px) {
  .list-row { padding: 9px 10px; gap: 8px; }
  .list-row .pill { display: none; }
  .qbtn { width: 32px; height: 32px; }
}
@media (hover: none) { .list-row:hover { background: transparent; } .list-row.selected { background: var(--accent-soft); } }

/* Bulk-Leiste */
.bulkbar {
  position: fixed; z-index: 40; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar) + var(--safe-b) + 10px);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center;
  max-width: calc(100vw - 20px);
  padding: 8px 10px; border-radius: 14px;
  background: var(--text); color: var(--bg);
  box-shadow: var(--shadow-2);
  animation: rise .18s ease-out;
}
.bulkbar .n { font-weight: 700; padding: 0 6px; font-size: 14px; }
.bulkbar .btn { background: transparent; border-color: color-mix(in srgb, var(--bg) 30%, transparent); color: var(--bg); }
.bulkbar .btn:hover { background: color-mix(in srgb, var(--bg) 14%, transparent); }
@media (min-width: 900px) { .bulkbar { bottom: 20px; left: calc(50% + var(--sidebar) / 2); } }
@keyframes rise { from { transform: translate(-50%, 12px); opacity: 0; } }

/* ---------- Kanban ---------- */
.board {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr);
  gap: 12px; overflow-x: auto; padding-bottom: 12px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  margin: 0 -16px; padding-left: 16px; padding-right: 16px; scroll-padding: 16px;
}
@media (max-width: 899px) { .board { grid-auto-columns: 84%; } }
@media (min-width: 900px) { .board { margin: 0; padding-left: 0; padding-right: 0; } }
.col {
  scroll-snap-align: start;
  display: flex; flex-direction: column; min-height: 200px;
  background: var(--surface-2); border-radius: var(--radius); border: 1px solid var(--border);
  transition: background .12s, border-color .12s;
}
.col.drop { border-color: var(--accent); background: var(--accent-soft); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px; font-weight: 650; font-size: 13.5px; }
.col-head .count { margin-left: auto; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.col-body { display: flex; flex-direction: column; gap: 8px; padding: 6px 8px 10px; min-height: 60px; flex: 1; }
.kcard {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 11px; box-shadow: var(--shadow-1); cursor: grab;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.kcard:hover { border-color: var(--border-strong); }
.kcard .t { font-weight: 560; font-size: 14px; line-height: 1.35; margin: 3px 0 6px; }
.kcard .foot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.kcard .note { font-size: 12.5px; color: var(--text-2); background: var(--surface-2); border-radius: 7px; padding: 5px 7px; margin-bottom: 6px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.kcard.ghost { position: fixed; z-index: 100; pointer-events: none; box-shadow: var(--shadow-2); transform: rotate(2deg); opacity: .95; cursor: grabbing; }
.kcard.placeholder { opacity: .35; }
.col-more { text-align: center; }

/* ---------- Sheet / Modal ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(10, 12, 18, .42);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .16s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: 100%; max-height: calc(100dvh - 24px - var(--safe-t)); max-height: calc(100vh - 24px);
  background: var(--surface); border-radius: 18px 18px 0 0;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-2);
  animation: slideup .22s cubic-bezier(.2, .9, .3, 1);
  padding-bottom: var(--safe-b);
}
@keyframes slideup { from { transform: translateY(40px); opacity: .6; } }
.sheet-grip { width: 38px; height: 5px; border-radius: 3px; background: var(--border-strong); margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px 10px 16px; border-bottom: 1px solid var(--border); flex: none; }
.sheet-head .title { flex: 1; min-width: 0; font-weight: 650; }
.sheet-body { overflow-y: auto; padding: 14px 16px 18px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sheet-foot { flex: none; padding: 10px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }
@media (min-width: 700px) {
  .overlay { align-items: center; padding: 24px; }
  .sheet { max-width: 640px; border-radius: 16px; max-height: calc(100vh - 48px); padding-bottom: 0; }
  .sheet.wide { max-width: 820px; }
  .sheet-grip { display: none; }
}

/* Detail eines Tests */
.detail-title { font-size: 19px; font-weight: 700; line-height: 1.3; margin: 2px 0 8px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.blk { margin-bottom: 14px; }
.blk .lbl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }
.blk .txt { white-space: pre-wrap; font-size: 15px; color: var(--text); }
.blk.expected .txt { color: var(--st-pass-ink); }
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 14px; }
.sbtn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 62px; border-radius: 12px; border: 1.5px solid var(--border);
  background: var(--surface); cursor: pointer; font-weight: 650; font-size: 13.5px; color: var(--text-2);
  transition: background .1s, border-color .1s, transform .06s;
}
.sbtn:active { transform: scale(.97); }
.sbtn svg.i { width: 22px; height: 22px; stroke-width: 2.4; }
.sbtn.pass { color: var(--st-pass-ink); } .sbtn.pass.on { background: var(--st-pass-soft); border-color: var(--st-pass); }
.sbtn.fail { color: var(--st-fail-ink); } .sbtn.fail.on { background: var(--st-fail-soft); border-color: var(--st-fail); }
.sbtn.missing { color: var(--st-missing-ink); } .sbtn.missing.on { background: var(--st-missing-soft); border-color: var(--st-missing); }
.sbtn.progress { color: var(--st-progress-ink); } .sbtn.progress.on { background: var(--st-progress-soft); border-color: var(--st-progress); }
.sbtn.skip { color: var(--st-skip-ink); } .sbtn.skip.on { background: var(--st-skip-soft); border-color: var(--st-skip); }
.sbtn.open { color: var(--st-open-ink); } .sbtn.open.on { background: var(--st-open-soft); border-color: var(--st-open); }
.status-grid .sbtn.xl { min-height: 70px; font-size: 14.5px; }
.status-grid.secondary { grid-template-columns: repeat(3, 1fr); margin-top: -6px; }
.status-grid.secondary .sbtn { min-height: 40px; flex-direction: row; font-size: 13px; }
.status-grid.secondary .sbtn svg.i { width: 16px; height: 16px; }
.composer { border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); overflow: hidden; }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.composer textarea { width: 100%; border: 0; outline: none; resize: none; min-height: 64px; padding: 10px 12px; background: transparent; font-size: 16px; line-height: 1.4; }
@media (min-width: 900px) { .composer textarea { font-size: 14.5px; } }
.composer .bar2 { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-top: 1px solid var(--border); background: var(--surface-2); }
.timeline { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.ev { display: flex; gap: 10px; }
.ev .b { flex: 1; min-width: 0; font-size: 14px; }
.ev .b .h { color: var(--muted); font-size: 13px; }
.ev .b .h b { color: var(--text); font-weight: 650; }
.ev .b .c { white-space: pre-wrap; margin-top: 4px; padding: 8px 10px; background: var(--surface-2); border-radius: 10px; }
.ev .thumb { display: block; margin-top: 6px; max-width: 240px; border-radius: 10px; border: 1px solid var(--border); overflow: hidden; background: var(--surface-2); }
.ev .thumb img, .ev .thumb video { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.device-line { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13.5px; margin-bottom: 12px; }
.device-line input { border: 0; background: transparent; outline: none; flex: 1; min-width: 0; font-size: 14px; }
.navline { display: flex; align-items: center; gap: 6px; }
.kbd { display: inline-block; padding: 0 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; font-size: 11px; color: var(--muted); font-family: ui-monospace, Menlo, monospace; }

/* Menüs */
.menu {
  position: fixed; z-index: 80; min-width: 210px; max-width: calc(100vw - 16px); max-height: 60vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-2);
  padding: 6px; animation: fade .1s ease-out;
}
.menu button, .menu a {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: 0; background: transparent; border-radius: 8px;
  text-align: left; cursor: pointer; font-size: 14px; font-weight: 520; color: var(--text);
}
.menu button:hover, .menu a:hover { background: var(--surface-2); }
.menu .sep { height: 1px; background: var(--border); margin: 5px 4px; }
.menu .lbl { padding: 6px 10px 4px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.menu .danger { color: var(--danger); }

/* Toasts */
#toast-root { position: fixed; z-index: 120; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + var(--safe-b) + 16px); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
@media (min-width: 900px) { #toast-root { bottom: 24px; left: calc(50% + var(--sidebar) / 2); } }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 12px; background: var(--text); color: var(--bg);
  box-shadow: var(--shadow-2); font-size: 14px; font-weight: 550; animation: rise2 .18s ease-out;
}
.toast.err { background: var(--danger); color: #fff; }
.toast button { border: 0; background: transparent; color: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; padding: 0; }
@keyframes rise2 { from { transform: translateY(10px); opacity: 0; } }
.offline { position: fixed; top: calc(var(--safe-t) + 6px); left: 50%; transform: translateX(-50%); z-index: 110; background: var(--st-missing); color: #111; padding: 6px 12px; border-radius: 10px; font-size: 13px; font-weight: 650; box-shadow: var(--shadow-2); }

/* Login */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px calc(24px + var(--safe-b)); }
.auth .box { width: 100%; max-width: 380px; }
.auth .logo { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 22px; text-align: center; }
.auth .logo img { width: 64px; height: 64px; border-radius: 16px; box-shadow: var(--shadow-2); }
.auth .card { padding: 20px; }
.auth .err { color: var(--danger); font-size: 14px; font-weight: 550; }

/* Tabellen (Team) */
.people { display: flex; flex-direction: column; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.person:last-child { border-bottom: 0; }
.person.inactive { opacity: .55; }

/* Druck/Export */
@media print { .sidebar, .tabbar, .topbar, .bulkbar, .quick { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
