/* FABULOUS ANALYTICS – schwarz/weiß, clean */
:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --surface: #ffffff;
  --fg: #0a0a0a;
  --fg-2: #404040;
  --muted: #8a8a8a;
  --line: #ececec;
  --line-2: #dcdcdc;
  --bar: #f3f3f3;
  --bar-hover: #e9e9e9;
  --pv: #0a0a0a;
  --uv: #b5b5b5;
  --grid: #f0f0f0;
  --danger: #d11a1a;
  --ok: #0a0a0a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .04);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-soft: #0a0a0a;
    --surface: #0b0b0b;
    --fg: #f5f5f5;
    --fg-2: #c8c8c8;
    --muted: #7a7a7a;
    --line: #1e1e1e;
    --line-2: #2c2c2c;
    --bar: #161616;
    --bar-hover: #1f1f1f;
    --pv: #f5f5f5;
    --uv: #5c5c5c;
    --grid: #161616;
    --danger: #ff5a5a;
    --ok: #f5f5f5;
    --shadow: none;
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
h3 { font-size: 13px; font-weight: 600; }
p { margin: 0 0 12px; }
code, pre { font-family: var(--mono); font-size: 12.5px; }
code { background: var(--bg-soft); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; }
pre { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; overflow-x: auto; margin: 0 0 12px; line-height: 1.6; }
pre code { background: none; border: 0; padding: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.inline { display: inline; margin: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 680px; margin: 0 auto; }
.main { padding-top: 32px; padding-bottom: 48px; min-height: calc(100vh - 140px); }

/* Topbar */
.topbar { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); position: sticky; top: 0; z-index: 20; }
.topbar-inner { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: 13px; letter-spacing: .14em; }
.brand b { font-weight: 800; margin-left: .35em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 20px; height: 20px; flex: none; color: var(--fg); }
.brand-mark rect.bg { fill: var(--fg); }
.brand-mark rect.b { fill: var(--bg); }
.brand-lg { font-size: 15px; }
.brand-lg .brand-mark { width: 24px; height: 24px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a, .nav-btn { padding: 7px 12px; border-radius: 8px; color: var(--fg-2); font: inherit; font-size: 13.5px; background: none; border: 0; cursor: pointer; }
.nav a:hover, .nav-btn:hover { background: var(--bg-soft); color: var(--fg); text-decoration: none; }
.nav a.active { color: var(--fg); font-weight: 600; }

.footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 20px; padding-bottom: 28px; font-size: 12px; color: var(--muted); }

/* Buttons & Forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--fg); font: inherit; font-weight: 500; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; list-style: none; }
.btn:hover { background: var(--bg-soft); border-color: var(--fg-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn-primary:hover { background: var(--fg-2); border-color: var(--fg-2); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; padding: 0; }
.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 13px; }
.form small { color: var(--muted); font-weight: 400; font-size: 12px; }
input[type=text], input[type=email], input[type=password], input[type=date], select, textarea {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--fg); font: inherit; font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 10px 12px; font-family: var(--mono); font-size: 13px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 10%, transparent); }
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238a8a8a'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.input-prefix { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.input-prefix:focus-within { border-color: var(--fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 10%, transparent); }
.input-prefix span { display: flex; align-items: center; padding: 0 0 0 12px; color: var(--muted); font-weight: 400; }
.input-prefix input { border: 0; box-shadow: none !important; padding-left: 2px; }
.check { flex-direction: row !important; align-items: flex-start; gap: 12px !important; font-weight: 400 !important; cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--fg); }
.row-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-form input, .row-form select { width: auto; flex: 1 1 140px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card-danger { border-color: color-mix(in srgb, var(--danger) 25%, var(--line)); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }
.back { display: inline-block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }

.flashes { padding-top: 20px; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--bg-soft); margin-bottom: 8px; font-size: 13.5px; }
.flash-ok::before { content: "✓  "; font-weight: 700; }
.flash-error { border-color: color-mix(in srgb, var(--danger) 35%, transparent); color: var(--danger); background: color-mix(in srgb, var(--danger) 5%, var(--bg)); }

.details { margin-top: 8px; }
.details summary { cursor: pointer; font-weight: 500; font-size: 13px; padding: 6px 0; }
.details[open] summary { margin-bottom: 8px; }

.snippet { position: relative; }
.snippet pre { padding-right: 96px; }
.snippet .copy { position: absolute; top: 9px; right: 9px; }

/* Auth */
.auth-body { background: var(--bg-soft); }
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; gap: 28px; }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 32px; box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 22px; margin-bottom: 20px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; font-size: 13px; }
.auth-foot { font-size: 12px; }

/* Websites */
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.site-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; transition: border-color .15s, box-shadow .15s, transform .15s; box-shadow: var(--shadow); }
.site-card:hover { border-color: var(--fg); text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.site-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.site-favicon { width: 26px; height: 26px; border-radius: 7px; background: var(--fg); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.site-domain { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.spark { width: 100%; height: 48px; display: block; margin-bottom: 16px; }
.spark-line { fill: none; stroke: var(--fg); stroke-width: 1.5; stroke-linejoin: round; }
.spark-area { fill: var(--bar); }
.site-card-stats { display: flex; gap: 28px; }
.site-card-stats div { display: flex; flex-direction: column; }
.site-card-stats b { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.site-card-stats span { color: var(--muted); font-size: 12px; }

.live-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border: 1px solid var(--line-2); border-radius: 99px; font-size: 12px; color: var(--fg-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--fg); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--fg) 45%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Dashboard */
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.dash-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.dash-title h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher select { height: auto; border: 0; padding: 0 28px 0 0; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; background-position: right 4px center; cursor: pointer; box-shadow: none !important; width: auto; max-width: 60vw; }
.dash-actions { display: flex; gap: 8px; align-items: center; }
.caret { font-size: 10px; color: var(--muted); }

.dropdown { position: relative; }
.dropdown > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 260px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; display: flex; flex-direction: column; }
.dropdown-menu > a { padding: 8px 10px; border-radius: 6px; font-size: 13.5px; }
.dropdown-menu > a:hover { background: var(--bg-soft); text-decoration: none; }
.dropdown-menu > a.active { font-weight: 600; background: var(--bg-soft); }
.dropdown-menu > a.active::after { content: "✓"; float: right; }
.dropdown-custom { border-top: 1px solid var(--line); margin-top: 6px; padding: 10px 6px 4px; display: flex; flex-direction: column; gap: 8px; }
.dropdown-custom input { height: 34px; font-size: 13px; }
.dropdown-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 12px; border-radius: 99px; background: var(--fg); color: var(--bg); font-size: 12.5px; font-weight: 500; }
.chip .muted { color: color-mix(in srgb, var(--bg) 60%, var(--fg)); }
.chip .x { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 20%, transparent); font-size: 13px; line-height: 1; }
.chip:hover { text-decoration: none; opacity: .85; }
.chip-clear { background: transparent; color: var(--fg-2); border: 1px solid var(--line-2); padding-right: 12px; }

.chart-card { padding: 0; overflow: hidden; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.kpi { padding: 20px 24px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); min-width: 0; }
.kpi:last-child { border-right: 0; }
.kpi-label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; font-weight: 500; }
.kpi-value { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi-change { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.kpi-change.up { color: var(--fg); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.dot-pv { background: var(--pv); }
.dot-uv { background: var(--uv); }

.chart { position: relative; height: 300px; padding: 20px 20px 8px 8px; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .grid line { stroke: var(--grid); }
.chart .axis text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .b-pv { fill: var(--pv); }
.chart .b-uv { fill: var(--uv); }
.chart .col:hover .hover-bg, .chart .col.on .hover-bg { fill: var(--bar); }
.chart .hover-bg { fill: transparent; }
.tooltip { position: absolute; pointer-events: none; background: var(--fg); color: var(--bg); padding: 10px 12px; border-radius: 8px; font-size: 12px; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); box-shadow: var(--shadow-lg); z-index: 5; opacity: 0; transition: opacity .1s; }
.tooltip.show { opacity: 1; }
.tooltip b { font-weight: 600; display: block; margin-bottom: 4px; }
.tooltip span { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.tooltip .dot-pv { background: var(--bg); }

.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panels .card { margin: 0; }
.panel { padding: 18px 20px 14px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; min-height: 28px; }
.panel-link { font-size: 12px; color: var(--muted); }
.tabs { display: flex; scrollbar-width: none; gap: 2px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 2px; overflow-x: auto; }
.tabs button { border: 0; background: none; font: inherit; font-size: 12px; padding: 4px 9px; border-radius: 6px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button.active { background: var(--surface); color: var(--fg); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.list-head { display: grid; grid-template-columns: 1fr 64px 64px; gap: 8px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; padding: 0 8px 6px; }
.list-head span { text-align: right; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { position: relative; display: grid; grid-template-columns: 1fr 64px 64px; gap: 8px; align-items: center; height: 34px; padding: 0 8px; border-radius: 6px; font-size: 13px; }
.list-head.c2, .list.c2 li { grid-template-columns: 1fr 64px; }
.list li .bar { position: absolute; left: 0; top: 2px; bottom: 2px; background: var(--bar); border-radius: 6px; z-index: 0; transition: background .15s; }
.list li:hover .bar { background: var(--bar-hover); }
.list li > * { position: relative; z-index: 1; }
.list .lbl { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; white-space: nowrap; }
.list .lbl > a:first-of-type, .list .lbl > span:not(.flag) { overflow: hidden; text-overflow: ellipsis; }
.list .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.list .num.muted { font-weight: 400; }
.list .ext { opacity: 0; color: var(--muted); font-size: 12px; flex: none; }
.list li:hover .ext { opacity: 1; }
.list .flag { font-size: 15px; line-height: 1; flex: none; }
.list.collapsible li.extra { display: none; }
.list.collapsible.open li.extra { display: grid; }
.list-more { margin-top: 8px; width: 100%; border: 1px dashed var(--line-2); background: none; color: var(--fg-2); border-radius: 6px; padding: 7px; font: inherit; font-size: 12.5px; cursor: pointer; }
.list-more:hover { border-color: var(--fg); color: var(--fg); }
.list-empty { padding: 28px 8px; text-align: center; color: var(--muted); font-size: 13px; }

.waiting { margin-bottom: 20px; }
.waiting-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.waiting-head p { margin: 4px 0 0; }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--fg); margin-top: 4px; flex: none; animation: pulse 1.6s infinite; }

.public-note { text-align: center; margin-top: 24px; font-size: 12px; }

.empty { text-align: center; padding: 80px 0; }
.empty-code { font-size: 72px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; margin-bottom: 12px; }
.empty h1 { font-size: 18px; font-weight: 500; margin-bottom: 24px; color: var(--fg-2); }

/* Live in der Website-Übersicht */
.live-pill { cursor: pointer; }
.live-pill.zero { color: var(--muted); }
.live-pill.zero i, .live-total.zero i { background: var(--line-2); animation: none; }
.live-total { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-2); }
.live-total i { width: 7px; height: 7px; border-radius: 50%; background: var(--fg); animation: pulse 2s infinite; }
.live-total b { font-variant-numeric: tabular-nums; }
.live-total.zero { color: var(--muted); }

/* Live-Ansicht */
.live-pill:hover { text-decoration: none; border-color: var(--fg); color: var(--fg); }
.rt-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.rt-status i, .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg); animation: pulse 2s infinite; display: inline-block; }
.rt-status.off i { background: var(--danger); animation: none; }
.rt-status.off::after { content: "· Verbindung unterbrochen"; color: var(--danger); }
.rt-top { display: grid; grid-template-columns: 280px 1fr; }
.rt-now { padding: 24px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.rt-count { font-size: 64px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; margin: 6px 0; }
.rt-minutes { padding: 20px 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rt-minutes-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rt-bars { flex: 1; min-height: 110px; display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; align-items: end; }
.rt-bars span { height: 100%; display: flex; align-items: flex-end; border-radius: 3px; background: var(--bar); }
.rt-bars span:last-child { background: color-mix(in srgb, var(--fg) 8%, var(--bar)); }
.rt-bars i { display: block; width: 100%; background: var(--pv); border-radius: 3px; transition: height .4s ease; }
.rt-bars-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.rt-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.rt-grid .card, .rt-side .card { margin: 0; }
.rt-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rt-list, .rt-feed { list-style: none; margin: 0; padding: 0; }
.rt-visitor { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: start; padding: 12px 4px; border-top: 1px solid var(--line); }
.rt-visitor.new { animation: rtIn .5s ease; }
.rt-visitor:first-child { border-top: 0; }
.rt-flag { font-size: 18px; line-height: 1.2; text-align: center; }
.rt-main { min-width: 0; }
.rt-path { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; color: var(--muted); margin-top: 2px; }
.rt-dev { display: inline-flex; align-items: center; }
.rt-scroll { height: 3px; background: var(--bar); border-radius: 2px; margin-top: 8px; overflow: hidden; max-width: 220px; }
.rt-scroll i { display: block; height: 100%; background: var(--fg); border-radius: 2px; transition: width .4s ease; }
.rt-time { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 1px; }
.rt-feed li { display: grid; grid-template-columns: 24px 1fr auto 64px; gap: 10px; align-items: center; height: 34px; border-top: 1px solid var(--line); font-size: 13px; }
.rt-feed li:first-child { border-top: 0; }
.rt-feed .rt-flag { font-size: 15px; }
.rt-feed-path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-ago { text-align: right; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.rt-empty { line-height: 1.7; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 12px; }
@keyframes rtIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
@media (max-width: 860px) {
  .rt-top { grid-template-columns: 1fr; }
  .rt-now { border-right: 0; border-bottom: 1px solid var(--line); }
  .rt-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .rt-count { font-size: 48px; }
  .rt-now, .rt-minutes { padding: 18px; }
}

@media (max-width: 860px) {
  .panels { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(2) { border-right: 0; }
  .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .main { padding-top: 20px; }
  h1, .switcher select { font-size: 21px; }
  .brand > span:last-child { font-size: 11px; letter-spacing: .1em; }
  .nav a, .nav-btn { padding: 6px 8px; font-size: 13px; }
  .kpi { padding: 14px 16px; }
  .kpi-value { font-size: 22px; }
  .chart { height: 220px; padding: 16px 12px 4px 0; }
  .card { padding: 18px; }
  .panel { padding: 16px 14px 12px; }
  .dash-actions { width: 100%; }
  .dash-actions .dropdown { flex: 1; }
  .dash-actions .dropdown > summary { width: 100%; justify-content: space-between; }
  .dropdown-menu { left: 0; right: auto; width: min(280px, calc(100vw - 32px)); }
  .site-grid { grid-template-columns: 1fr; }
}

/* Mobile: Tab-Leiste unten */
.tabbar { display: none; }
@media (max-width: 640px) {
  .topbar .nav { display: none; }
  .topbar-inner { height: 52px; justify-content: center; }
  body.has-tabbar { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--line);
  }
  .tabbar > a, .tabbar > form { flex: 1; display: flex; }
  .tabbar a, .tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    height: 50px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 10.5px; font-weight: 500;
    border-radius: 10px; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--fg); font-weight: 600; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a:active, .tabbar button:active { background: var(--bg-soft); }
  .footer { flex-direction: column; gap: 4px; padding-bottom: 20px; }

  /* iOS zoomt bei Eingabefeldern < 16px */
  input[type=text], input[type=email], input[type=password], input[type=date], select { font-size: 16px; height: 44px; }
  textarea { font-size: 16px; }
  .dropdown-custom input { height: 44px; font-size: 16px; }
  .btn { height: 42px; }
  .btn-sm { height: 34px; }
  .btn-icon { width: 42px; }

  .snippet pre { padding-right: 16px; }
  .snippet .copy { position: static; width: 100%; margin: -4px 0 12px; }
  .row-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .row-form input, .row-form select { min-width: 0; width: 100%; }
  .row-form .row-form-sep { display: none; }
  .row-form select, .row-form button { grid-column: 1 / -1; }

  .panel-head { flex-wrap: wrap; }
  .panel-head .tabs { width: 100%; }
  .panel-head .tabs button { flex: 1; padding: 6px 8px; }
  .list li { height: 40px; }
  .list .ext { opacity: 1; }
  .dropdown-menu > a { padding: 11px 10px; }
  .page-head .btn-primary { width: 100%; }
  .card-danger .btn, .form > div > .btn { width: 100%; }

  .rt-visitor { grid-template-columns: 24px 1fr auto; gap: 10px; }
  .rt-feed li { grid-template-columns: 22px 1fr auto 58px; height: 40px; }
  .rt-bars { gap: 2px; min-height: 90px; }
}
