/* keep me up to date – responsives Stylesheet (Desktop & Mobile, Hell/Dunkel) */
:root {
  /* GitHub-ähnliche, neutrale Palette (Anthrazit/Grau) */
  --bg: #f6f8fa; --surface: #ffffff; --surface-2: #f6f8fa; --border: #d1d9e0;
  --text: #1f2328; --muted: #59636e; --primary: #24292f; --primary-600: #32383f; --primary-ink: #ffffff;
  --link: #0969da; --accent: #fd8c73;
  --header-bg: #24292f; --header-text: #f0f6fc; --header-muted: #d1d9e0; --header-hover: rgba(255,255,255,.12);
  --ok: #1a7f37; --ok-bg: #dafbe1; --warn: #9a6700; --warn-bg: #fff8c5; --err: #d1242f; --err-bg: #ffebe9;
  --info: #0969da; --info-bg: #ddf4ff; --muted-bg: #eff2f5; --new: #8250df; --new-bg: #fbefff;
  --radius: 6px; --shadow: 0 1px 0 rgba(31,35,40,.04);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --row-h: 52px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117; --surface: #151b23; --surface-2: #0d1117; --border: #3d444d;
    --text: #f0f6fc; --muted: #9198a1; --primary: #3d444d; --primary-600: #4b535d; --primary-ink: #f0f6fc;
    --link: #4493f8; --accent: #f78166;
    --header-bg: #010409; --header-text: #f0f6fc; --header-muted: #9198a1; --header-hover: rgba(255,255,255,.08);
    --ok: #3fb950; --ok-bg: rgba(46,160,67,.15); --warn: #d29922; --warn-bg: rgba(187,128,9,.15);
    --err: #f85149; --err-bg: rgba(248,81,73,.15); --info: #4493f8; --info-bg: rgba(56,139,253,.15);
    --muted-bg: #212830; --new: #ab7df8; --new-bg: rgba(171,125,248,.15);
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--text); background: var(--bg); }
a { color: var(--link); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; line-height: 1.25; } h2 { font-size: 1.15rem; margin: 0 0 .75rem; } h3 { font-size: 1rem; margin: 1rem 0 .5rem; }
p { margin: .4rem 0 .8rem; }
code { font-family: var(--mono); font-size: .88em; background: var(--muted-bg); padding: .1em .35em; border-radius: 6px; }
pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: .9rem; overflow-x: auto; }
pre code { background: none; padding: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.err-text { color: var(--err); } .break { word-break: break-all; } .prewrap { white-space: pre-wrap; }
code.big { font-size: 1.1rem; }

/* Layout */
.container { max-width: 1280px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.head-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.crumbs { margin: 0; font-size: .85rem; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1rem; }
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.card.highlight { border-color: var(--primary); }
.card.danger { border-color: color-mix(in srgb, var(--err) 35%, var(--border)); }
.toolbar { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; align-items: center; margin-bottom: .5rem; }

/* Topbar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem; padding: .55rem 1rem;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.mainnav { display: flex; align-items: center; gap: .15rem; flex: 1; }
.mainnav > a { padding: .45rem .7rem; border-radius: 8px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.mainnav > a:hover { background: var(--muted-bg); color: var(--text); text-decoration: none; }
.mainnav > a.active { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); }
.nav-admin { margin-left: auto; }
.nav-user { margin-left: .5rem; }
.dropdown { position: relative; } .dropdown summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .45rem; padding: .25rem .4rem; border-radius: 999px; }
.dropdown summary::-webkit-details-marker { display: none; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-weight: 700; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: .35rem; display: flex; flex-direction: column; }
.dropdown-menu a, .dropdown-menu button { padding: .5rem .7rem; border-radius: 6px; color: var(--text); text-align: left; background: none; border: 0; font: inherit; cursor: pointer; width: 100%; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--muted-bg); text-decoration: none; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: .4rem; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 5px 0; background: var(--text); border-radius: 2px; transition: .2s; }

/* Tabs */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: .55rem .9rem; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.tabs a.active { color: var(--primary); border-color: var(--primary); } .tabs a:hover { text-decoration: none; color: var(--text); }

/* Buttons & Forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .5rem .9rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; line-height: 1.2; min-height: 38px; }
.btn:hover { background: var(--muted-bg); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); } .btn-primary:hover { background: var(--primary-600); }
.btn-danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, var(--border)); } .btn-danger:hover { background: var(--err-bg); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-sm { padding: .3rem .6rem; font-size: .85rem; min-height: 30px; }
.btn-block { width: 100%; margin: .35rem 0; }
form.inline { display: inline; }
label, .label { display: flex; flex-direction: column; gap: .3rem; font-weight: 500; font-size: .9rem; }
label small, .label small { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .5rem .65rem; min-height: 38px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--primary) 45%, transparent); border-color: var(--primary); }
input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--primary); }
input[type=color] { padding: 2px; width: 48px; }
input:disabled { opacity: .65; }
.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 400; }
.check.top { align-self: end; padding-bottom: .55rem; }
.checks { display: flex; flex-wrap: wrap; gap: .4rem 1rem; } .checks.column { flex-direction: column; gap: .4rem; }
.check-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: .8rem; }
.form-grid { display: flex; flex-direction: column; gap: 1rem; }
.form-grid fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 1rem; display: flex; flex-direction: column; gap: .85rem; margin: 0; }
.form-grid legend { font-weight: 700; padding: 0 .4rem; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .85rem; }
.form-inline { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin: .4rem 0; }
.form-inline label { flex: 1 1 180px; } .form-inline.compact { flex-wrap: nowrap; align-items: center; } .form-inline.compact input[name=name] { min-width: 120px; }
.form-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
[hidden] { display: none !important; }

/* Flash */
.flash { position: relative; padding: .7rem 2.4rem .7rem .9rem; border-radius: 10px; margin-bottom: .8rem; border: 1px solid transparent; }
.flash-ok { background: var(--ok-bg); color: var(--ok); } .flash-err { background: var(--err-bg); color: var(--err); }
.flash-warn { background: var(--warn-bg); color: var(--warn); } .flash-info { background: var(--info-bg); color: var(--info); }
.flash-close { position: absolute; right: .5rem; top: .35rem; background: none; border: 0; font-size: 1.3rem; color: inherit; cursor: pointer; }

/* Badges */
.badge { display: inline-block; padding: .12rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.badge-ok { background: var(--ok-bg); color: var(--ok); } .badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-err { background: var(--err-bg); color: var(--err); } .badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: var(--muted-bg); color: var(--muted); } .badge-new { background: var(--new-bg); color: var(--new); }
.chip { display: inline-block; padding: .1rem .5rem; border-radius: 6px; background: var(--muted-bg); color: var(--muted); font-size: .78rem; margin: 0 .2rem .2rem 0; }
.chip-team { background: var(--info-bg); color: var(--info); }
.cat { --c: #64748b; display: inline-block; padding: .05rem .45rem; border-radius: 6px; font-size: .75rem; font-weight: 600; margin: .15rem .2rem 0 0;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.http { font-family: var(--mono); font-size: .8rem; padding: .1rem .45rem; border-radius: 6px; color: #fff; vertical-align: middle; }
.http.get { background: #2563eb; } .http.patch { background: #d97706; }

/* Statistik */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.stat { display: flex; flex-direction: column; gap: .15rem; padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: var(--radius); color: var(--text); box-shadow: var(--shadow); }
.stat:hover { text-decoration: none; transform: translateY(-1px); }
.stat-num { font-size: 1.75rem; font-weight: 800; line-height: 1.1; } .stat-label { color: var(--muted); font-size: .85rem; }
.stat-ok { border-left-color: var(--ok); } .stat-warn { border-left-color: var(--warn); } .stat-err { border-left-color: var(--err); }
.stat-info { border-left-color: var(--info); } .stat-muted { border-left-color: var(--muted); }
.stat-warn .stat-num { color: var(--warn); } .stat-err .stat-num { color: var(--err); } .stat-ok .stat-num { color: var(--ok); }
.stat.pulse { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: var(--shadow); } 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 25%, transparent); } }
@media (prefers-reduced-motion: reduce) { .stat.pulse { animation: none; } }
.progress { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--muted-bg); margin: .25rem 0; }
.progress-bar.ok { background: var(--ok); } .progress-bar.warn { background: var(--warn); }

/* Filterleiste */
.filterbar { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0; align-items: center; }
.filterbar input[type=search] { flex: 2 1 220px; width: auto; } .filterbar select { flex: 1 1 150px; width: auto; }

/* Tabellen */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; margin-bottom: 1rem; }
.card .table-wrap { box-shadow: none; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .65rem .8rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); font-weight: 600; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table td.actions, .table th.actions { text-align: right; white-space: nowrap; }
.table .empty { text-align: center; color: var(--muted); padding: 2rem; }
.apps-table .app-name { font-weight: 600; }
tr.row-update_available:not(.is-confirmed) { background: color-mix(in srgb, var(--warn-bg) 55%, transparent); }
tr.row-update_available:not(.is-confirmed) td:first-child { box-shadow: inset 4px 0 0 var(--warn); }
tr.row-error:not(.is-confirmed) td:first-child { box-shadow: inset 4px 0 0 var(--err); }
tr.row-disabled { opacity: .55; }
.cats { margin-top: .1rem; }

/* Listen / Key-Value */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0 0 .8rem; }
.kv dt { color: var(--muted); font-size: .88rem; } .kv dd { margin: 0; }
.group-card.has-updates { border-top: 3px solid var(--warn); }
.group-head { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.group-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-start; margin-top: .6rem; }
.inline-edit { flex-basis: 100%; } .inline-edit > summary { list-style: none; display: inline-flex; } .inline-edit[open] > summary { margin-bottom: .5rem; }
.inline-edit form { margin-bottom: .5rem; }
.collapsible > summary { list-style: none; cursor: pointer; } .collapsible > summary h2 { display: inline; } .collapsible[open] > summary { margin-bottom: .75rem; }
.versions { display: flex; flex-wrap: wrap; gap: .35rem; } .codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .4rem; margin-bottom: .6rem; }
.copy-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.qr { background: #fff; padding: .6rem; border-radius: 10px; display: inline-block; } .qr svg { width: 200px; height: 200px; display: block; }
.pagination { display: flex; justify-content: center; gap: 1rem; align-items: center; margin: 1rem 0; }
.test-box { background: var(--surface-2); }

/* Login */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem; }
.auth-card { width: 100%; max-width: 420px; padding: 1.75rem; }
.auth-brand { text-align: center; margin-bottom: 1rem; } .auth-brand h1 { margin-top: .5rem; }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .85rem; margin: 1rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

/* Doku */
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; align-items: start; }
.docs-toc { position: sticky; top: 70px; display: flex; flex-direction: column; gap: .35rem; font-size: .9rem; }
.docs-body h2 { margin-top: 1.6rem; padding-top: .5rem; border-top: 1px solid var(--border); } .docs-body h2:first-child { margin-top: 0; border: 0; }
.docs-body .table { margin-bottom: 1rem; }
.swagger-wrap { padding: .25rem; } .swagger-wrap .swagger-ui .info { margin: 1rem 0; }
@media (prefers-color-scheme: dark) { .swagger-wrap { background: #fff; color: #111; } }

/* Mobile */
@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .mainnav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: .5rem; box-shadow: var(--shadow); max-height: calc(100vh - 60px); overflow-y: auto; }
  .mainnav.open { display: flex; }
  .mainnav > a { padding: .75rem .9rem; }
  .nav-admin { margin-left: 0; }
  .nav-user { margin: .4rem 0 0; border-top: 1px solid var(--border); padding-top: .4rem; }
  .dropdown-menu { position: static; box-shadow: none; border: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .docs { grid-template-columns: 1fr; } .docs-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: .3rem .8rem; }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .container { padding: .9rem .7rem 3rem; }
  h1 { font-size: 1.35rem; }
  .grid-2, .group-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: .5rem; } .stat { padding: .7rem .8rem; } .stat-num { font-size: 1.4rem; }
  .page-head { align-items: flex-start; } .head-actions { width: 100%; } .head-actions .btn { flex: 1; }
  .filterbar > * { flex: 1 1 100% !important; }
  /* Tabellen werden zu Karten */
  .table-wrap { background: none; border: 0; box-shadow: none; overflow: visible; }
  .table.responsive thead { display: none; }
  .table.responsive, .table.responsive tbody, .table.responsive tr, .table.responsive td { display: block; width: 100%; }
  .table.responsive tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .6rem; padding: .4rem .2rem; box-shadow: var(--shadow); }
  .table.responsive td { border: 0; padding: .3rem .8rem; display: flex; justify-content: space-between; gap: .75rem; text-align: right; }
  .table.responsive td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .8rem; text-align: left; flex-shrink: 0; }
  .table.responsive td:first-child { display: block; text-align: left; font-size: 1.02rem; }
  .table.responsive td:first-child::before { display: none; }
  .table.responsive td.actions { justify-content: flex-end; }
  .table.responsive td.actions:empty { display: none; }
  .table.responsive td.empty { display: block; text-align: center; }
  tr.row-update_available td:first-child, tr.row-error td:first-child { box-shadow: none; }
  tr.row-update_available:not(.is-confirmed) { border-left: 4px solid var(--warn) !important; }
  tr.row-error:not(.is-confirmed) { border-left: 4px solid var(--err) !important; }
  .table.responsive tr.section-row { background: none; border: 0; box-shadow: none; padding: 0; margin: 1rem 0 .4rem; }
  .table.responsive tr.section-row th { display: block; padding: 0 .2rem; }
  .kv { grid-template-columns: 1fr; gap: .1rem; } .kv dd { margin-bottom: .5rem; }
  .form-inline.compact { flex-wrap: wrap; }
  input, select, textarea { font-size: 16px; } /* verhindert Zoom auf iOS */
}

/* Filter-Assistent */
.wizard > details > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.wizard > details > summary::-webkit-details-marker { display: none; }
.wizard > details > summary h2 { margin: 0; }
.wizard > details[open] > summary { margin-bottom: .75rem; }
.wz-body .grow { flex: 3 1 320px; }
.wz-cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .75rem; margin-top: .5rem; }
.wz-cand { border: 1px solid var(--border); border-radius: 10px; padding: .75rem; display: flex; flex-direction: column; gap: .5rem; background: var(--surface-2); }
.wz-cand header { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.wz-cand .btn { align-self: flex-start; margin-top: auto; }
.wz-best { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.wz-chosen { border-color: var(--new); }
.wz-rule { display: block; white-space: pre-wrap; word-break: break-all; font-size: .8rem; }
.wz-ctx { margin: 0; }
code.wz-latest { background: var(--ok-bg); color: var(--ok); font-weight: 700; }
.date-box { background: var(--surface-2); }
.wz-date { margin: 0; color: var(--info); }
.wz-step { grid-column: 1 / -1; margin: .75rem 0 0; }
.wz-dates { margin-top: 1rem; padding-top: .5rem; border-top: 1px dashed var(--border); }
.wz-option { cursor: pointer; font-weight: 400; }
.wz-option header input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--primary); }

/* Status als Farbe im Namen */
.name-update_available { color: var(--warn) !important; }
.name-error { color: var(--err) !important; }
.name-ok { color: var(--ok) !important; }
.name-unknown { color: var(--muted) !important; }
.app-name { font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: .25rem .9rem; margin: -.4rem 0 1rem; }
.legend-item { font-weight: 600; white-space: nowrap; }

/* Neu / Bestätigt */
tr.section-row th { background: transparent; font-size: .85rem; letter-spacing: .05em; padding-top: 1rem; color: var(--text); border-bottom: 2px solid var(--border); }
tr.section-row:first-child th { padding-top: .6rem; }
tr.section-new th { border-bottom-color: var(--primary); }
tr.section-row .count { display: inline-block; min-width: 1.6em; padding: 0 .45rem; margin-left: .35rem; border-radius: 999px; background: var(--muted-bg); color: var(--muted); font-size: .75rem; text-align: center; }
tr.section-row:hover { background: transparent !important; }
tr.is-confirmed { opacity: .6; }
tr.is-confirmed:hover { opacity: .9; }
tr.is-confirmed .app-name { font-weight: 500; }
tr.is-confirmed code { background: transparent; }
.list li.is-confirmed { opacity: .6; }
.btn-confirm { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--border)); font-weight: 600; }
.btn-confirm:hover { background: color-mix(in srgb, var(--ok-bg) 70%, var(--ok) 15%); }
.confirm-box { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: .5rem; }
.stat-new { border-left-color: var(--primary); } .stat-new .stat-num { color: var(--primary); }


/* ---------- GitHub-ähnliches Erscheinungsbild ---------- */
.topbar { background: var(--header-bg); border-bottom-color: transparent; backdrop-filter: none; color: var(--header-text); }
.topbar .brand { color: var(--header-text); }
.topbar .mainnav > a { color: var(--header-muted); }
.topbar .mainnav > a:hover { background: var(--header-hover); color: var(--header-text); }
.topbar .mainnav > a.active { background: var(--header-hover); color: var(--header-text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 6px 6px 0 0; }
.topbar .nav-toggle span { background: var(--header-text); }
.topbar .uname { color: var(--header-text); }
.topbar .avatar { background: #57606a; color: #fff; }
.tabs a.active { color: var(--text); border-color: var(--accent); font-weight: 600; }
.btn { border-radius: 6px; font-weight: 500; background: var(--surface-2); }
.btn:hover { background: var(--muted-bg); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); }
.btn-ghost { background: transparent; }
.card, .table-wrap, .stat { box-shadow: var(--shadow); }
.stat { border-left-width: 3px; }
.mainnav.open { background: var(--header-bg); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--link); outline-offset: -1px; border-color: var(--link); }
input[type=checkbox], .wz-option header input { accent-color: var(--text); }
.wz-best { border-color: var(--text); box-shadow: 0 0 0 1px var(--text) inset; }
tr.section-new th { border-bottom-color: var(--accent); }
.stat-new { border-left-color: var(--accent); } .stat-new .stat-num { color: var(--text); }
.chip-team { background: var(--muted-bg); color: var(--text); border: 1px solid var(--border); }

/* ---------- Applikationstabelle: alle Zeilen gleich hoch ---------- */
.apps-table td { height: var(--row-h); vertical-align: middle; white-space: nowrap; padding-top: .35rem; padding-bottom: .35rem; }
.apps-table td:first-child { max-width: 420px; overflow: hidden; text-overflow: ellipsis; }
.apps-table .cell-line { display: flex; align-items: center; gap: .4rem; min-width: 0; overflow: hidden; }
.apps-table .cell-line .app-name { overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; min-width: 0; }
.apps-table .cats { margin: 0; display: inline-flex; gap: .25rem; flex-shrink: 0; }
.apps-table .cats .cat { margin: 0; }
.apps-table .ver-date { color: var(--muted); font-size: .8rem; margin-left: .35rem; }
.apps-table td.actions form { margin: 0; }
@media (max-width: 720px) {
  .apps-table td { height: auto; white-space: normal; }
  .apps-table td:first-child { max-width: none; }
}


/* ---------- Ruhige, gedeckte Farbgebung ---------- */
:root {
  --link: #3d6a9e; --accent: #8c959f;
  --ok: #4a7a58; --ok-bg: #edf3ee; --warn: #8a6d2a; --warn-bg: #f6f1e4;
  --err: #a8473f; --err-bg: #f7ecea; --info: #4f6f91; --info-bg: #eef2f6; --new: #6e6a8f; --new-bg: #f0eff5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --link: #7fa3cc; --accent: #6e7681;
    --ok: #79a585; --ok-bg: rgba(121,165,133,.12); --warn: #b9a06a; --warn-bg: rgba(185,160,106,.12);
    --err: #cf857c; --err-bg: rgba(207,133,124,.12); --info: #8ba8c6; --info-bg: rgba(139,168,198,.12);
    --new: #a9a3c9; --new-bg: rgba(169,163,201,.12);
  }
}
/* Kopfleiste: aktiver Punkt neutral */
.topbar .mainnav > a.active { box-shadow: inset 0 -2px 0 var(--header-text); }
.tabs a.active { border-color: var(--text); }

/* Kennzahlen neutral – nur Fehler leicht rot, wenn vorhanden */
.stat, .stat-ok, .stat-warn, .stat-err, .stat-info, .stat-muted, .stat-new { border-left: 1px solid var(--border); }
.stat .stat-num, .stat-ok .stat-num, .stat-warn .stat-num, .stat-info .stat-num, .stat-new .stat-num { color: var(--text); }
.stat-err .stat-num { color: var(--err); }
.stat.pulse { animation: none; }

/* Status im Namen: OK = normale Schrift, nur Abweichungen gefärbt */
.name-ok { color: var(--text) !important; }
.name-error { color: var(--err) !important; }
.name-unknown { color: var(--muted) !important; }
.legend-item.name-ok::first-letter { color: var(--ok); }

/* Tabelle: keine farbigen Balken/Hintergründe, Links und Versionen neutral */
tr.row-error td:first-child, tr.row-update_available td:first-child { box-shadow: none !important; }
@media (max-width: 720px) {
  .table.responsive tr.row-error, .table.responsive tr.row-update_available { border-left: 1px solid var(--border) !important; }
}
.apps-table a, .list a { color: var(--text); }
.apps-table a:hover, .list a:hover { color: var(--link); }
.apps-table code, .list code { background: transparent; padding: 0; color: var(--text); font-size: .85em; }
.apps-table td[data-label="Gruppe"] a { color: var(--muted); }
tr.section-new th, tr.section-row th { border-bottom: 1px solid var(--border); color: var(--muted); font-weight: 600; }
tr.section-new th { color: var(--text); }

/* Kategorien: neutrale Chips mit kleinem Farbpunkt */
.cat { color: var(--muted) !important; background: var(--muted-bg) !important; border: 1px solid var(--border) !important;
  font-weight: 500 !important; }
.cat::before { content: ""; display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: var(--c);
  margin-right: .35em; vertical-align: .05em; }

/* Kontext & Badges dezent */
.chip, .chip-team { background: transparent !important; border: 0 !important; color: var(--muted) !important; padding: 0 !important; }
.badge { font-weight: 500; }
.badge-new { background: var(--muted-bg); color: var(--muted); }

/* Bestätigen-Button neutral */
.btn-confirm { background: var(--surface-2); color: var(--text); border-color: var(--border); font-weight: 500; }
.btn-confirm:hover { background: var(--muted-bg); }

/* Bestätigte Zeilen nur leicht zurückgenommen */
tr.is-confirmed { opacity: .55; }


/* ---------- Blaue Akzente (gedeckt) ---------- */
:root {
  --accent: #3d6a9e; --accent-600: #345b88; --accent-bg: #e9eff6; --accent-border: #c6d5e6; --accent-ink: #2f5580;
  --primary: var(--accent); --primary-600: var(--accent-600); --primary-ink: #ffffff; --link: #3d6a9e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #6f97c4; --accent-600: #84a8d0; --accent-bg: rgba(111,151,196,.14); --accent-border: rgba(111,151,196,.35);
    --accent-ink: #a9c3e0; --primary: #3a5f8a; --primary-600: #446c9a; --primary-ink: #f0f6fc; --link: #7fa3cc;
  }
}
/* Versionsbubble */
.ver { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-family: var(--mono); font-size: .8rem; line-height: 1.5;
  background: var(--accent-bg); color: var(--accent-ink) !important; border: 1px solid var(--accent-border); white-space: nowrap; }
a.ver:hover { text-decoration: none; background: color-mix(in srgb, var(--accent-bg) 70%, var(--accent) 15%); }
tr.is-confirmed .ver { background: transparent; }
/* Akzente */
.topbar .mainnav > a.active { box-shadow: inset 0 -2px 0 var(--accent-600); }
.tabs a.active { border-color: var(--accent); color: var(--text); }
tr.section-new th { border-bottom: 2px solid var(--accent); }
.stat-new { border-left: 3px solid var(--accent); }
.topbar .avatar { background: var(--accent); }
input[type=checkbox], input[type=radio], .wz-option header input { accent-color: var(--accent); }
input:focus, select:focus, textarea:focus { outline-color: var(--accent); border-color: var(--accent); }
.wz-best { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
code.wz-latest { background: var(--accent-bg); color: var(--accent-ink); }
.badge-info { background: var(--accent-bg); color: var(--accent-ink); }
.apps-table a:hover, .list a:hover { color: var(--accent); }
.legend-item.name-ok::first-letter { color: var(--accent); }
.ver.big { font-size: 1rem; padding: .15rem .7rem; }


/* Bestätigen: gedecktes Grün, in Listen nur Icon */
:root { --confirm: #4a7a58; --confirm-bg: #edf3ee; --confirm-border: #c5d8ca; }
@media (prefers-color-scheme: dark) {
  :root { --confirm: #86b393; --confirm-bg: rgba(121,165,133,.14); --confirm-border: rgba(121,165,133,.35); }
}
.btn-confirm { background: var(--confirm-bg); color: var(--confirm); border-color: var(--confirm-border); font-weight: 500; }
.btn-confirm:hover { background: color-mix(in srgb, var(--confirm-bg) 65%, var(--confirm) 18%); border-color: var(--confirm); }
.btn-icon { width: 32px; height: 32px; min-height: 0; padding: 0; border-radius: 6px; }
.btn-icon svg { display: block; }

/* Sortierbare Spalten & Live-Liste */
th.sortable a { color: inherit; display: inline-flex; align-items: center; gap: .3rem; text-decoration: none; }
th.sortable a:hover { color: var(--text); }
th.sortable .sort-ind { font-size: .7rem; color: var(--muted); opacity: .6; }
th.sortable.sorted { color: var(--text); }
th.sortable.sorted .sort-ind { color: var(--accent); opacity: 1; }
[data-live-results] { transition: opacity .15s; }
[data-live-results].is-loading { opacity: .55; pointer-events: none; }

/* Abschnittsüberschriften „Neu“ / „Bestätigt“ hervorheben */
tr.section-row th { background: var(--muted-bg) !important; color: var(--text) !important; padding-top: .55rem !important;
  padding-bottom: .55rem !important; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border) !important;
  text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; font-weight: 700; }
tr.section-new th { background: var(--accent-bg) !important; color: var(--accent-ink) !important;
  border-bottom: 1px solid var(--accent-border) !important; box-shadow: inset 3px 0 0 var(--accent); }
tr.section-confirmed th { box-shadow: inset 3px 0 0 var(--muted); }
tr.section-new .count { background: var(--surface); color: var(--accent-ink); border: 1px solid var(--accent-border); }
tr.section-confirmed .count { background: var(--surface); border: 1px solid var(--border); }
@media (max-width: 720px) {
  .table.responsive tr.section-row th { border-radius: 6px; border: 1px solid var(--border); }
}

/* Einklappbare Abschnitte */
.section-toggle { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; width: 100%;
  font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
.section-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.section-toggle .chev { transition: transform .15s; flex-shrink: 0; }
.section-toggle[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.apps-table.collapsed-new tr.sec-new, .apps-table.collapsed-confirmed tr.sec-confirmed { display: none; }
.live-hidden { display: none !important; }

/* Deaktivierte Applikationen */
.apps-table.collapsed-disabled tr.sec-disabled, .apps-table.collapsed-hidden tr.sec-hidden { display: none; }
tr.section-hidden th { box-shadow: inset 3px 0 0 var(--border); color: var(--muted) !important; }
tr.section-hidden .count { background: var(--surface); border: 1px solid var(--border); }
tr.is-hidden { opacity: .55; }
tr.is-hidden .ver { background: transparent; }
.list li.is-hidden { opacity: .55; }
.sec-hint { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: .8em; }
.row-actions { display: inline-flex; gap: .3rem; justify-content: flex-end; align-items: center; }
.btn-hide { color: var(--muted); }
.btn-hide:hover { color: var(--text); }
tr.section-disabled th { box-shadow: inset 3px 0 0 var(--border); color: var(--muted) !important; }
tr.is-disabled { opacity: .45; }
tr.is-disabled .app-name { text-decoration: line-through; text-decoration-color: var(--muted); }
tr.is-disabled .ver { background: transparent; }
.list li.is-disabled { opacity: .45; }
.is-disabled-title { color: var(--muted) !important; }
tr.section-disabled .count { background: var(--surface); border: 1px solid var(--border); }


/* ---------- Mobile Optimierung ---------- */
.auth-wrap { min-height: 100vh; min-height: 100dvh; }
.filter-more { display: contents; }
.filter-more > summary { display: none; }
.filter-fields { display: contents; }
.check { align-items: flex-start; }
.check > input[type=checkbox], .check > input[type=radio] { margin-top: .15rem; flex-shrink: 0; }

@media (max-width: 720px) {
  /* Login & Auth: ohne Scrollen, Inhalt oben statt vertikal zentriert */
  .auth-wrap { place-items: start center; padding: max(1rem, 5vh) .75rem 1rem; }
  .auth-card { padding: 1rem .25rem; border: 0; background: transparent; box-shadow: none; }
  .auth-brand { margin-bottom: .75rem; }
  .auth-brand img { width: 40px; height: 40px; }
  .auth-brand h1 { font-size: 1.25rem; margin: .35rem 0 0; }
  .auth-brand p { margin: .2rem 0 0; font-size: .85rem; }
  .auth-card .stack { gap: .6rem; }
  .auth-card .divider { margin: .6rem 0; }
  .btn-block { margin: .2rem 0; min-height: 44px; }

  /* Kopf & Kennzahlen kompakter */
  .page-head { margin-bottom: .6rem; gap: .5rem; }
  .page-head p.muted { display: none; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-bottom: .6rem; }
  .stat { padding: .45rem .55rem; }
  .stat-num { font-size: 1.15rem; }
  .stat-label { font-size: .7rem; line-height: 1.2; }

  /* Filter: Suche + „Filter“-Knopf in einer Zeile, Rest einklappbar */
  .filterbar { gap: .4rem; margin: .5rem 0; }
  .filterbar > input[type=search] { flex: 1 1 auto !important; width: auto; min-width: 0; }
  .filter-more { display: block; flex: 0 0 auto !important; }
  .filter-more > summary { display: inline-flex; list-style: none; }
  .filter-more > summary::-webkit-details-marker { display: none; }
  .filter-more[open] { flex-basis: 100% !important; }
  .filter-more[open] > summary { margin-bottom: .4rem; }
  .filter-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
  .filter-fields select:first-child { grid-column: 1 / -1; }
  .filterbar > [data-live-reset] { flex: 1 1 100% !important; }

  /* Buttons im Seitenkopf gleichmäßig */
  .head-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .4rem; }
  .head-actions form, .head-actions .btn, .head-actions form .btn { width: 100%; }

  /* Formulare: Hinweise unter Checkboxen statt daneben */
  .check { display: block; position: relative; padding-left: 1.75rem; line-height: 1.4; }
  .check > input[type=checkbox], .check > input[type=radio] { position: absolute; left: 0; top: .05rem; margin: 0; }
  .check > small { display: inline; }
  .checks .check { padding-top: .1rem; }
  .card { padding: .9rem; }
  .form-grid fieldset { padding: .75rem; }
  .row { gap: .6rem; }

  /* Tabellen-Karten etwas dichter */
  .table.responsive tr { margin-bottom: .45rem; }
  .table.responsive td { padding: .22rem .75rem; }
  .table.responsive td.actions { padding-top: .3rem; }
  .apps-table .cell-line { flex-wrap: wrap; }
  .legend { margin-top: .2rem; }
}
