/* SEO/GEO Monitor */
:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --text: #1f2330;
  --muted: #6b7280;
  --line: #e6e8ef;
  --primary: #4338ca;
  --primary-soft: #eef0ff;
  --seo: #1c7ed6;
  --geo: #7048e8;
  --up: #0f9d58;
  --down: #d93025;
  --warn: #e8590c;
  --side: #161a2b;
  --side-text: #c6cadb;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .6em; line-height: 1.25; }
h2 { font-size: 18px; }
h3 { font-size: 15px; font-weight: 600; }
code { background: #f1f3f9; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.center { text-align: center; }
.right { text-align: right; margin-left: auto; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.up { color: var(--up); }
.down { color: var(--down); }
.mt { margin-top: 1.2em; }
.w1 { width: 1%; }

/* ---------- Layout ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex: 0 0 240px; background: var(--side); color: var(--side-text);
  display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { color: #fff; font-weight: 700; font-size: 16px; display: flex; flex-direction: column; gap: 6px; margin: 0 2px 18px; }
.brand img { display: block; width: 100%; height: auto; background: #fff; border-radius: 10px; padding: 8px 10px; box-sizing: border-box; }
.brand span { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--side-text); opacity: .75; padding-left: 2px; }
.print-logo, .print-head, .print-foot { display: none; }
.brand.client-brand { background: #fff; border-radius: 10px; padding: 10px; align-items: center; }
.brand img.client { max-height: 80px; width: auto; max-width: 100%; padding: 0; border-radius: 0; object-fit: contain; }
.powered { display: flex; align-items: center; gap: 8px; margin: -8px 4px 18px; color: var(--side-text); font-size: 10px; opacity: .8; }
.powered:hover { text-decoration: none; opacity: 1; }
.powered img { height: 22px; width: auto; background: #fff; border-radius: 4px; padding: 2px 4px; }
.pc-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: #fff; padding: 3px; flex: 0 0 40px; }
.pc-title { flex: 1; min-width: 0; }
.logo-edit { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.logo-preview { width: 160px; height: 90px; flex: 0 0 160px; box-sizing: border-box; border: 1px dashed var(--line); border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #fff; padding: 8px; overflow: hidden; }
.logo-preview img { display: block; max-width: 144px; max-height: 74px; width: auto; height: auto; object-fit: contain; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.logo-dot { width: 14px; height: 14px; border-radius: 50%; background: conic-gradient(var(--seo) 0 50%, var(--geo) 50% 100%); display: inline-block; box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.side-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #7d849c; margin: 18px 8px 6px; }
.side-group { font-size: 11px; font-weight: 700; color: #9aa1b9; margin: 10px 10px 2px; }
.project-switch { width: 100%; background: #22273d; color: #fff; border: 1px solid #2f3550; border-radius: 8px; padding: 7px 8px; }
.side-nav a { display: flex; align-items: center; gap: 10px; color: var(--side-text); padding: 7px 10px; border-radius: 8px; margin: 1px 0; }
.side-nav a i { font-style: normal; width: 16px; text-align: center; opacity: .8; }
.side-nav a:hover { background: #22273d; text-decoration: none; color: #fff; }
.side-nav a.active { background: var(--primary); color: #fff; }
.side-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid #262b42; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.user-chip { display: flex; align-items: center; gap: 8px; color: #fff; min-width: 0; }
.user-chip:hover { text-decoration: none; }
.user-chip span:last-child { display: flex; flex-direction: column; font-size: 13px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip small { color: #7d849c; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); display: grid; place-items: center; font-weight: 700; flex: 0 0 30px; }
.link-btn { background: none; border: 0; color: inherit; cursor: pointer; padding: 0; font: inherit; font-size: 12px; text-decoration: underline; }
.link-btn.danger { color: var(--down); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 18px 28px 6px; }
.topbar h1 { font-size: 22px; margin: 0; }
.crumb { font-size: 12px; color: var(--muted); }
.menu-btn { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; }
.content { padding: 14px 28px 40px; max-width: 1500px; width: 100%; }

.runner { margin-left: auto; display: flex; align-items: center; gap: 12px; background: var(--primary-soft); color: var(--primary); padding: 9px 14px; border: 1px solid #d4d8ff; border-radius: 12px; font-size: 13px; width: 360px; max-width: 100%; }
.runner-body { flex: 1; min-width: 0; }
.runner-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.runner-bar { height: 5px; background: rgba(67, 56, 202, .15); border-radius: 99px; overflow: hidden; margin: 5px 0 3px; }
.runner-bar span { display: block; height: 100%; width: 0; background: var(--primary); border-radius: 99px; transition: width .4s; }
.runner-current { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.runner-action { border: 1px solid currentColor; background: #fff; color: inherit; border-radius: 8px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.runner.error { background: #fdecea; color: var(--down); border-color: #f5c2bd; }
.runner.error .spinner, .runner.finished .spinner { display: none; }
.runner.error .runner-bar span { background: var(--down); }
.runner.finished { background: #e6f6ee; color: var(--up); border-color: #b7e4cb; }
.runner.finished .runner-bar span { background: var(--up); }
.queued-badge { display: inline-flex; align-items: center; gap: 5px; color: var(--primary); font-size: 12px; }
.queued-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Komponenten ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 18px; min-width: 0; }
.card.empty { text-align: center; padding: 40px 20px; }
.big-code { font-size: 48px; font-weight: 800; color: var(--line); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid2.wide-left { grid-template-columns: 1.6fr 1fr; }
.grid2.tight { gap: 10px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.grid2 > .card, .grid2 > div > .card { margin-bottom: 18px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi.accent-warn { border-color: #ffc9a8; background: #fff8f3; }
.kpi.accent-geo { border-color: #d0c4fb; background: #f8f5ff; }
.kpi-label { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.kpi-value { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--muted); }
.hint { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--line); font-size: 10px; cursor: help; color: var(--muted); }

.area-title { display: flex; align-items: center; gap: 8px; margin: 10px 0 12px; font-size: 16px; }
.area-title::before { content: ""; width: 8px; height: 18px; border-radius: 3px; background: var(--seo); }
.area-title.geo::before { background: var(--geo); }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 14px; }
.section-head h2, .section-head p { margin: 0; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar > .muted { margin-right: auto; }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.project-card { color: inherit; display: block; transition: transform .12s, box-shadow .12s; }
.project-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(16,24,40,.08); }
.pc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
.pc-head h3 { margin: 0; }
.pc-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.pc-value { font-size: 20px; font-weight: 700; }
.pc-value small { font-size: 12px; color: var(--muted); font-weight: 500; }
.spark-empty { height: 40px; display: flex; align-items: center; }
.chart-wrap { position: relative; width: 100%; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-weight: 500; white-space: nowrap; }
.btn:hover { border-color: #c9cddb; text-decoration: none; background: #fafbfd; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: #3730a3; }
.btn.danger { color: var(--down); border-color: #f3c3bf; }
.btn.danger:hover { background: #fdecea; }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn.block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .5; cursor: default; }
form.inline { display: inline; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #f1f3f9; color: var(--muted); font-size: 11px; font-weight: 600; }
.badge.info { background: var(--primary-soft); color: var(--primary); }
.badge.success { background: #e6f6ee; color: var(--up); }
.badge.warn { background: #fff0e6; color: var(--warn); }
.tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 6px; background: #f1f3f9; color: #555d75; font-size: 11px; }
.tag.comp { background: #fff0e6; color: var(--warn); }
.tag.own { background: #e6f6ee; color: var(--up); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

.alert { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; border: 1px solid; }
.alert.success { background: #e6f6ee; border-color: #b7e4cb; color: #0b6b3c; }
.alert.error { background: #fdecea; border-color: #f5c2bd; color: #a3241b; }
.alert.info { background: var(--primary-soft); border-color: #d4d8ff; color: #3730a3; }
.alert.warning { background: #fff4e6; border-color: #ffd8a8; color: #a14a00; }

/* ---------- Formulare ---------- */
.form label { display: block; margin-bottom: 12px; font-weight: 500; font-size: 13px; }
.form label.check, label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
input, select, textarea { font: inherit; color: inherit; }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea,
.filters input, .filters select, .inline-form input, .bulk-bar input {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid #d5d9e4; border-radius: 8px; background: #fff;
}
.form input:focus, .form select:focus, .form textarea:focus, .filters input:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.form h3 { margin-top: 10px; padding-top: 6px; }
.form.narrow { max-width: 520px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input { width: auto; flex: 1; min-width: 140px; margin-top: 0 !important; }
.inline-form form { margin: 0; }
input.mini { width: 120px !important; display: inline-block !important; margin-top: 0 !important; padding: 4px 8px !important; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filters input, .filters select { width: auto; margin: 0; }
.filters input[name=q] { min-width: 220px; }
.spacer { flex: 1; }
.engine-picks { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.pick { display: flex !important; align-items: center; gap: 6px; border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; cursor: pointer; margin: 0 !important; font-weight: 500; }
.pick:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.add-box summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.add-box[open] summary { margin-bottom: 12px; }
.danger-zone { border-color: #f5c2bd; }
.copy-box { display: flex; gap: 8px; align-items: center; background: #f6f7fb; padding: 8px 10px; border-radius: 8px; margin: 6px 0; }
.copy-box code { background: none; word-break: break-all; flex: 1; }
.checklist { list-style: none; padding: 0; columns: 2; }
.checklist .ok { color: var(--up); }
.checklist .fail { color: var(--down); }
ul.plain { list-style: none; padding: 0; }
ul.plain li { padding: 4px 0; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
.table-wrap.scroll-y { max-height: 460px; overflow-y: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--surface); }
.table td { padding: 9px 10px; border-bottom: 1px solid #f0f1f5; vertical-align: middle; }
.table.compact td { padding: 6px 8px; }
.table tbody tr:hover { background: #fafbfe; }
.table tr.own { background: #f0faf4; }
.table tr.paused { opacity: .5; }
.table td.worse { color: var(--down); font-weight: 600; }
.sortable-th { cursor: pointer; user-select: none; }
.sortable-th:hover { color: var(--text); }
.sortable-th[data-dir=asc]::after { content: " ▲"; font-size: 9px; }
.sortable-th[data-dir=desc]::after { content: " ▼"; font-size: 9px; }
.url-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.bulk-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding-top: 12px; }

.delta { font-size: 12px; font-weight: 600; white-space: nowrap; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.delta.neutral { color: #adb5bd; font-weight: 400; }
.kd { display: inline-block; min-width: 26px; text-align: center; border-radius: 6px; padding: 0 4px; font-size: 12px; font-weight: 600; }
.kd0 { background: #e6f6ee; color: var(--up); }
.kd1 { background: #f4f9e6; color: #5c940d; }
.kd2 { background: #fff4e6; color: #d9480f; }
.kd3, .kd4 { background: #fdecea; color: var(--down); }
.features { white-space: nowrap; }
.feat { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: #f1f3f9; color: #6b7280; margin-right: 2px; }
.feat.hit { background: #e6f6ee; color: var(--up); }
.feat.mention { background: #fff4e6; color: var(--warn); }
.uncertain { display: inline-grid; place-items: center; width: 14px; height: 14px; margin-left: 3px; border-radius: 50%; background: #fff4e6; color: var(--warn); font-size: 10px; font-weight: 700; cursor: help; vertical-align: 1px; }
.gsc-col { background: #f6f7ff; }
.warn-text { color: var(--warn); }

.cell-ico { font-size: 16px; line-height: 1; }
.cell-ico.yes { color: var(--up); }
.cell-ico.mention { color: #37b24d; opacity: .75; }
.cell-ico.cited { color: var(--seo); }
.cell-ico.no { color: #ced4da; }
.legend { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }

.mover { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px dashed #eef0f4; font-size: 13px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 44px; gap: 8px; align-items: center; margin: 6px 0; font-size: 13px; }
.bar-row.own .bar-label { font-weight: 700; }
.bar { height: 10px; background: #f1f3f9; border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: #adb5bd; border-radius: 99px; }
.bar-row.own .bar span { background: var(--geo); }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; }

dl.meta { display: grid; grid-template-columns: 130px 1fr; gap: 6px 10px; font-size: 13px; margin: 14px 0 0; }
dl.meta dt { color: var(--muted); }
dl.meta dd { margin: 0; word-break: break-all; }

/* ---------- GEO-Antworten ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; font-weight: 500; }
.tab.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.answer-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.answer { font-size: 14px; line-height: 1.65; max-height: 640px; overflow-y: auto; padding-right: 6px; }
.answer strong.h { display: inline-block; margin-top: 6px; }
mark.brand { background: #c3fae8; color: #087f5b; padding: 0 2px; border-radius: 3px; font-weight: 600; }
mark.comp { background: #ffe8cc; color: #a14a00; padding: 0 2px; border-radius: 3px; }
ol.sources { padding-left: 20px; margin: 0; }
ol.sources li { margin-bottom: 8px; font-size: 13px; }
ol.sources li.own { background: #e6f6ee; border-radius: 6px; padding: 2px 6px; }
.prompt-text { font-size: 17px; }

/* ---------- Prompt-Liste & Seiten ---------- */
.grid3 { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 18px; }
.grid3 > .card { margin-bottom: 18px; }
.controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; padding: 10px; background: #f8f9fc; border: 1px solid var(--line); border-radius: 10px; }
.controls input, .controls select { padding: 7px 10px; border: 1px solid #d5d9e4; border-radius: 8px; background: #fff; font: inherit; }
.controls input[name=q] { min-width: 220px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.seg a { padding: 6px 12px; color: var(--text); font-weight: 600; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.seg a:hover { text-decoration: none; background: #f4f5fa; }
.seg a.on { background: var(--primary-soft); color: var(--primary); }
.seg .count { font-size: 11px; background: #eef0f7; color: var(--muted); border-radius: 99px; padding: 0 7px; }
.seg a.on .count { background: #fff; color: var(--primary); }
.col-vis { background: #f6f7ff; }
.vis-badge { display: inline-block; min-width: 34px; text-align: center; padding: 2px 6px; border-radius: 6px; font-weight: 700; background: #eef0f7; }
.vis-badge.good { background: #e6f6ee; color: var(--up); }
.vis-badge.mid { background: #fff4e6; color: var(--warn); }
.vis-badge.low { background: #fdecea; color: var(--down); }
.spark-svg polyline { fill: none; stroke: var(--primary); stroke-width: 1.8; stroke-linejoin: round; }
.spark-svg circle { fill: var(--primary); }
.spark-svg .spark-base { stroke: #e6e8ef; stroke-width: 1; }
.rank-pill { display: inline-block; min-width: 30px; text-align: center; padding: 1px 6px; border-radius: 99px; font-weight: 700; font-size: 12px; }
.rank-pill.r1 { background: #e6f6ee; color: var(--up); }
.rank-pill.r2 { background: #f1f8e6; color: #5c940d; }
.rank-pill.r3 { background: #fff4e6; color: var(--warn); }
.rank-pill.r4 { background: #fdecea; color: var(--down); }
.rank-row .bar span.r1 { background: #12b886; }
.rank-row .bar span.r2 { background: #82c91e; }
.rank-row .bar span.r3 { background: #fab005; }
.rank-row .bar span.r4 { background: #fd7e14; }
.rank-row .bar span.r0 { background: #ced4da; }
.cell-ico.none { color: #dee2e6; }
.prompt-cell { min-width: 280px; }
.url-cell.wide { max-width: 420px; font-size: 13px; }
.nowrap { white-space: nowrap; }
.dot-lg { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #dee2e6; vertical-align: middle; }
.dot-lg.on { background: #12b886; }
.engine-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; margin-right: 8px; white-space: nowrap; }

.scope-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.scope-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chip { padding: 3px 11px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 12px; font-weight: 600; }
.chip:hover { text-decoration: none; border-color: #c9cddb; }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.small-alert { padding: 8px 12px; font-size: 13px; }

/* ---------- Technik-Check ---------- */
.verdict { display: flex; gap: 24px; align-items: center; border-left: 6px solid #adb5bd; }
.verdict-good { border-left-color: #12b886; background: linear-gradient(90deg, #effaf5, #fff 45%); }
.verdict-warn { border-left-color: #fab005; background: linear-gradient(90deg, #fff8e6, #fff 45%); }
.verdict-bad { border-left-color: var(--down); background: linear-gradient(90deg, #fdecea, #fff 45%); }
.score-ring { --c: #adb5bd; width: 112px; height: 112px; flex: 0 0 112px; border-radius: 50%; display: grid; place-items: center; align-content: center;
  background: radial-gradient(closest-side, #fff 78%, transparent 79% 100%), conic-gradient(var(--c) calc(var(--p) * 1%), #e9ecef 0); }
.verdict-good .score-ring { --c: #12b886; } .verdict-warn .score-ring { --c: #fab005; } .verdict-bad .score-ring { --c: var(--down); }
.score-ring span { font-size: 32px; font-weight: 800; line-height: 1; }
.score-ring small { color: var(--muted); font-size: 11px; }
.verdict-body { flex: 1; min-width: 0; }
.verdict-body p { margin: 4px 0; }
.verdict-title { font-size: 20px; font-weight: 700; }
.verdict-good .verdict-title { color: #0b7a55; } .verdict-warn .verdict-title { color: #b35c00; } .verdict-bad .verdict-title { color: var(--down); }
.verdict-counts { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.vc { font-size: 12px; padding: 3px 9px; border-radius: 99px; background: #f1f3f9; }
.vc-critical { background: #fdecea; color: var(--down); } .vc-action { background: #fff4e6; color: var(--warn); }
.vc-note { background: #fff9db; color: #8a6d00; } .vc-ok { background: #e6f6ee; color: var(--up); }
.verdict-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.area-card { color: inherit; }
.area-card:hover { text-decoration: none; box-shadow: 0 6px 18px rgba(16,24,40,.08); }
.area-score { font-size: 26px; font-weight: 800; margin: 2px 0 6px; }
.area-score.good { color: var(--up); } .area-score.warn { color: #d08700; } .area-score.bad { color: var(--down); }
.area-card .bar span.good { background: #12b886; } .area-card .bar span.warn { background: #fab005; } .area-card .bar span.bad { background: var(--down); }
.st { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.st-ok { background: #e6f6ee; color: var(--up); } .st-note { background: #fff9db; color: #8a6d00; }
.st-action { background: #fff4e6; color: var(--warn); } .st-critical { background: #fdecea; color: var(--down); }
.st-info, .st-na { background: #f1f3f9; color: var(--muted); }
.checklist-rows { list-style: none; padding: 0; margin: 0; }
.cr { display: flex; gap: 12px; padding: 11px 4px; border-bottom: 1px solid #f0f1f5; }
.cr:last-child { border-bottom: 0; }
.cr-icon { flex: 0 0 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: #f1f3f9; color: var(--muted); }
.cr-ok .cr-icon { background: #e6f6ee; color: var(--up); } .cr-note .cr-icon { background: #fff9db; color: #8a6d00; }
.cr-action .cr-icon { background: #fff4e6; color: var(--warn); } .cr-critical .cr-icon { background: var(--down); color: #fff; }
.cr-body { flex: 1; min-width: 0; }
.cr-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 2px; }
.cr-weight { margin-left: auto; letter-spacing: 1px; font-size: 9px; }
.cr-fix { color: #3730a3; margin-top: 3px; }
pre.code { background: #f6f7fb; padding: 10px; border-radius: 8px; max-height: 260px; overflow: auto; font-size: 12px; white-space: pre-wrap; }
.tool-card .inline-form { margin-top: 10px; }
.tech-strip { display: flex; align-items: center; gap: 14px; padding: 10px 16px; margin-bottom: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: inherit; }
.tech-strip:hover { text-decoration: none; box-shadow: var(--shadow); }
.tech-strip > span:nth-child(2) { flex: 1; }
.tech-score { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #f1f3f9; }
.tech-good { border-color: #b7e4cb; background: #f3fbf7; } .tech-good .tech-score { background: #12b886; color: #fff; }
.tech-warn { border-color: #ffe08a; background: #fffbea; } .tech-warn .tech-score { background: #fab005; color: #fff; }
.tech-bad { border-color: #f5c2bd; background: #fdf3f2; } .tech-bad .tech-score { background: var(--down); color: #fff; }
.muted-card { background: #fafbfd; }
.mb { margin-bottom: 12px; }
@media (max-width: 800px) { .verdict { flex-direction: column; align-items: flex-start; } .verdict-side { align-items: flex-start; } }

/* ---------- Optimierungs-Hinweise ---------- */
.insights h4 { font-size: 13px; margin: 18px 0 8px; }
.insights h4.mt { margin-top: 18px; }
.tips { list-style: none; padding: 0; margin: 0 0 4px; display: grid; gap: 8px; }
.tip { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: #f6f7fb; border-left: 4px solid #adb5bd; font-size: 13px; }
.tip.high { background: #fdecea; border-left-color: var(--down); }
.tip.mid { background: #fff4e6; border-left-color: var(--warn); }
.tip.info { background: var(--primary-soft); border-left-color: var(--primary); }
.tip-level { flex: 0 0 82px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding-top: 1px; }
.fanout { list-style: none; padding: 0; margin: 0 0 10px; }
.fanout li { display: flex; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px dashed #eef0f4; font-size: 13px; flex-wrap: wrap; }
.contexts { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.contexts li { padding: 8px 10px; border-radius: 8px; background: #fff8f0; border: 1px solid #ffe8cc; font-size: 13px; }
.contexts li.own { background: #effaf5; border-color: #c3ecd6; }

/* ---------- Gast (Login/Installer) ---------- */
body.guest { display: grid; place-items: center; min-height: 100vh; background: radial-gradient(circle at 20% 10%, #e7e9ff, transparent 40%), radial-gradient(circle at 80% 90%, #efe6ff, transparent 40%), var(--bg); }
.guest-box { width: 100%; max-width: 400px; padding: 24px; }
.guest-box.wide { max-width: 720px; }
.brand-title { display: flex; align-items: center; gap: 10px; font-size: 20px; margin-bottom: 4px; }
.brand-title img { width: 260px; max-width: 100%; height: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid2, .grid2.wide-left, .grid3 { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .sidebar { position: fixed; left: -260px; z-index: 50; transition: left .2s; }
  .sidebar.open { left: 0; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .menu-btn { display: block; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .grid4 { grid-template-columns: 1fr; }
  .pc-metrics { grid-template-columns: 1fr 1fr 1fr; }
  .checklist { columns: 1; }
}

/* ---------- Druck (Report) ---------- */
@media print {
  .sidebar, .menu-btn, .toolbar, .add-box, .bulk-bar, .filters, .runner, form button, .btn { display: none !important; }
  body { background: #fff; }
  .print-logo { display: block; width: 220px; height: auto; margin: 0 0 12px; }
  .print-head { display: block; }
  .print-logo.client { width: auto; max-width: 220px; max-height: 80px; }
  .print-foot { display: flex; align-items: center; gap: 8px; position: fixed; bottom: 0; right: 0; font-size: 10px; color: #6b7280; }
  .print-foot img { height: 16px; width: auto; }
  .powered { display: none; }
  .card, .kpi { box-shadow: none; break-inside: avoid; }
  .content { padding: 0; max-width: none; }
  .grid2 { grid-template-columns: 1fr 1fr; }
}

/* ---------- Entdecken ---------- */
.mt0 { margin-top: 0; }
.chips { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.discover-form input[name=q] { width: auto; flex: 1 1 260px; max-width: 420px; margin-top: 0; }
.discover-form select { padding: 8px 10px; border: 1px solid #d5d9e4; border-radius: 8px; background: #fff; }
.table-filter { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.table-filter input[type=search] { padding: 7px 10px; border: 1px solid #d5d9e4; border-radius: 8px; min-width: 220px; }
.table-filter input[type=number] { width: 90px; padding: 5px 8px; border: 1px solid #d5d9e4; border-radius: 8px; margin-left: 4px; }
.table-wrap.scroll-y.tall { max-height: 640px; }
.bulk-bar label input { display: inline-block; width: 160px; margin: 0 0 0 4px; }
#disc-table .url-cell { max-width: 200px; }
.sched { display: flex; gap: 6px; }
.sched select { flex: 1; min-width: 0; }
.form .sched select { margin-top: 4px; }
