:root {
  --bg: #f6f7f9; --card: #fff; --text: #1f2933; --muted: #6b7280; --line: #e5e7eb;
  --accent: #2563eb; --up: #15803d; --down: #b91c1c; --warn-bg: #fef3c7; --err-bg: #fee2e2; --info-bg: #e0ecff;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-size: 12px; background: #f1f3f5; padding: 1px 4px; border-radius: 3px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.topbar nav { display: flex; gap: 18px; align-items: center; }
.brand { font-weight: 700; color: var(--text); }
main { max-width: 1280px; margin: 0 auto; padding: 24px 16px; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 15px; margin: 0 0 12px; }
.pagehead { margin-bottom: 18px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.cardhead { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.cardhead h2 { margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline { display: inline; margin: 0; }
button, .button { font: inherit; border: 1px solid var(--accent); background: var(--accent); color: #fff; padding: 6px 12px; border-radius: 6px; cursor: pointer; display: inline-block; }
button:hover, .button:hover { text-decoration: none; filter: brightness(1.05); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.secondary { background: #fff; color: var(--accent); }
button.small { padding: 2px 8px; font-size: 12px; }
button.link { background: none; border: none; color: var(--accent); padding: 0; }
button.toggle { background: #fff; color: var(--muted); border-color: var(--line); padding: 2px 10px; font-size: 12px; }
button.toggle.on { background: #dcfce7; color: var(--up); border-color: #86efac; }
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; background: var(--info-bg); }
.flash.error { background: var(--err-bg); }
.empty { padding: 32px; text-align: center; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: 8px; }
table.data { width: 100%; border-collapse: collapse; background: var(--card); }
table.data th, table.data td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { font-size: 12px; color: var(--muted); font-weight: 600; }
table.data.compact td, table.data.compact th { padding: 4px 6px; font-size: 13px; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.up { color: var(--up); }
.down { color: var(--down); }
tr.inactive td { color: var(--muted); }
td.key { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.error { color: var(--down); font-size: 12px; max-width: 420px; word-break: break-word; }
.spark { display: block; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.kpis { display: flex; gap: 16px; flex-wrap: wrap; }
.kpi { min-width: 220px; display: flex; flex-direction: column; }
.kpi .label { color: var(--muted); font-size: 12px; }
.kpi strong { font-size: 26px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(480px, 1fr)); gap: 16px; }
.range { display: flex; gap: 12px; margin-bottom: 8px; font-size: 13px; }
.range a.active { font-weight: 700; color: var(--text); }
.status { padding: 1px 8px; border-radius: 10px; font-size: 12px; }
.status.ok { background: #dcfce7; color: var(--up); }
.status.error { background: var(--err-bg); color: var(--down); }
.status.running { background: var(--warn-bg); color: #92400e; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; }
.login { max-width: 340px; margin: 80px auto; display: flex; flex-direction: column; gap: 12px; }
.login input { width: 100%; padding: 8px; font: inherit; border: 1px solid var(--line); border-radius: 6px; margin-top: 4px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } .topbar { flex-direction: column; gap: 6px; } table.data { font-size: 12px; } }
.badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--down); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 600; }
a.badge:hover { text-decoration: none; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 6px 0; white-space: nowrap; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.sev { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: #f59e0b; }
.sev.critical { background: var(--down); }
tr.seen td { opacity: .6; }
td .msg { word-break: break-word; }
.alerts-inline ul { margin: 0; padding-left: 0; list-style: none; }
.alerts-inline li { padding: 3px 0; }
tbody.group tr.grouphead td { background: #f8fafc; border-top: 2px solid var(--line); }
tbody.group tr.sub td { border-bottom: none; }
.charthead { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.charthead .range { margin-bottom: 0; }
.range.devices { padding: 3px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; display: inline-flex; gap: 2px; }
.range.devices a { padding: 3px 12px; border-radius: 6px; color: var(--muted); }
.range.devices a.active { background: var(--info-bg); color: var(--accent); }
.range.devices a:hover { text-decoration: none; color: var(--text); }
.tag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 4px; background: #f1f3f5; color: var(--muted); margin-left: 4px; white-space: nowrap; }
.good { color: var(--up); }
.avg { color: #b45309; }
.poor { color: var(--down); }
.score { display: inline-block; min-width: 30px; text-align: center; font-weight: 700; }
table.perf td.key { max-width: 420px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-size: 13px; }
.field input, .field textarea { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.field textarea { font-family: ui-monospace, monospace; font-size: 12px; }
.metrics { display: flex; flex-wrap: wrap; gap: 18px; margin: 6px 0 14px; }
.metric { display: flex; flex-direction: column; min-width: 70px; }
.metric .label { font-size: 12px; color: var(--muted); }
.metric strong { font-size: 20px; }
h3 { font-size: 13px; margin: 8px 0 4px; }
.urlhead { word-break: break-all; }
table.sortable th[data-sort-type] { cursor: pointer; user-select: none; white-space: nowrap; }
table.sortable th[data-sort-type]:hover { color: var(--text); }
table.sortable th[data-sort-type]::after { content: "↕"; margin-left: 4px; opacity: .35; font-size: 11px; }
table.sortable th[aria-sort="ascending"]::after { content: "▲"; opacity: .9; }
table.sortable th[aria-sort="descending"]::after { content: "▼"; opacity: .9; }
.tag.warn { background: var(--warn-bg); color: #92400e; }
.snippet { white-space: normal; max-width: 460px; margin-top: 3px; line-height: 1.35; }
table.curve td, table.curve th { text-align: right; }
table.curve td:first-child, table.curve th:first-child { text-align: left; }
a.ext { color: var(--muted); margin-left: 3px; vertical-align: -1px; display: inline-flex; }
a.ext:hover { color: var(--accent); }
a.ext.big { vertical-align: -2px; margin-left: 6px; }
.pagetitle { margin: 6px 0 14px; }
.pagetitle .tags { margin-top: 4px; }
.pagetitle .tags .tag:first-child { margin-left: 0; }
dl.meta { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; margin: 0; }
dl.meta dt { color: var(--muted); font-size: 13px; }
dl.meta dd { margin: 0; word-break: break-word; }
.card.inner { border-color: var(--line); box-shadow: none; }
.nowrap { white-space: nowrap; }
@media (max-width: 640px) { dl.meta { grid-template-columns: 1fr; } }
td.hints { white-space: normal; min-width: 180px; }
td.hints .competitor { display: inline-block; margin-right: 8px; word-break: break-all; }
details.issue { padding: 10px 16px; }
details.issue summary { cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
details.issue summary::-webkit-details-marker { display: none; }
details.issue summary::before { content: "▸"; color: var(--muted); }
details.issue[open] summary::before { content: "▾"; }
details.issue .hint { flex-basis: 100%; margin-left: 18px; }
details.issue table { margin-top: 8px; }
details.issue td.detail { white-space: normal; word-break: break-word; }
.sevtag { font-size: 11px; padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.sevtag.error { background: var(--err-bg); color: var(--down); }
.sevtag.warning { background: var(--warn-bg); color: #92400e; }
.sevtag.info { background: #f1f3f5; color: var(--muted); }
a.kpi.plain { color: inherit; }
a.kpi.plain:hover { text-decoration: none; border-color: var(--accent); }
ul.issues { margin: 0 0 8px; padding: 0; list-style: none; }
ul.issues li { padding: 3px 0; }
.notesgrid { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
@media (max-width: 900px) { .notesgrid { grid-template-columns: 1fr; } }
.noteform .row { display: flex; gap: 10px; flex-wrap: wrap; }
.noteform .row .field { flex: 1 1 140px; }
.noteform select, .noteform input[type=date], .noteform input[type=text], .noteform input[type=url] { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.verdict { font-size: 12px; padding: 1px 8px; border-radius: 10px; background: #f1f3f5; color: var(--muted); white-space: nowrap; }
.verdict.besser { background: #dcfce7; color: var(--up); }
.verdict.schlechter { background: var(--err-bg); color: var(--down); }
.verdict.läuft { background: var(--warn-bg); color: #92400e; }
table.notes tr.google td { color: var(--muted); }
details.addnote { margin-top: 10px; }
details.addnote summary { cursor: pointer; color: var(--accent); margin-bottom: 8px; }
.sev.info { background: var(--accent); }
/* Schmale Bildschirme: breite Tabellen scrollen in sich, statt die Seite zu verbreitern */
@media (max-width: 760px) {
  table.data { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .card { min-width: 0; }
}
.spark.down polyline { stroke: var(--down); }
.kpi.inner { min-width: 150px; padding: 10px 12px; margin-bottom: 8px; }
