/* wp-fleet - Instrumententafel statt Karten-Baukasten.
   Leitgedanke: Monospace als Stimme, Amber als Signal, harte Kanten, Haarlinien. */

:root {
  color-scheme: dark;
  --bg: #0e1013;
  --surface: #15181d;
  --surface-2: #1b1f26;
  --line: #262b33;
  --line-strong: #39414d;
  --text: #e9e6df;
  --muted: #98a0ac;
  --muted-dim: #6b7480;
  --accent: #ffb454;
  --accent-ink: #1a1206;
  --ok: #4fd1a5;
  --warn: #f2c14e;
  --err: #ff6b6b;
  --info: #7cc7ff;
  --track: #242a33;
  --chrome: #12151a;
  --topbar-bg: rgba(14, 16, 19, .94);
  --radius: 3px;
  --radius-sm: 2px;
  --shadow: 0 18px 40px rgba(0, 0, 0, .5);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'JetBrains Mono', Menlo, monospace;
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f6f4ef;
  --surface: #fffdf9;
  --surface-2: #efece5;
  --line: #ddd8cd;
  --line-strong: #c4bcae;
  --text: #14161a;
  --muted: #5d636d;
  --muted-dim: #8a9099;
  --accent: #b26a00;
  --accent-ink: #fff8ec;
  --ok: #0f7a5a;
  --warn: #9a6a00;
  --err: #c0392b;
  --info: #1f6feb;
  --track: #e6e2d8;
  --chrome: #fffdf9;
  --topbar-bg: rgba(246, 244, 239, .94);
  --shadow: 0 12px 30px rgba(20, 22, 26, .14);
}

/* Autor-Regeln schlagen die Browser-Vorgabe [hidden] { display: none }; ohne diese
   Zeile bleiben Drawer, Sammelleiste und Busy-Pille dauerhaft sichtbar. */
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font: 14.5px/1.55 var(--font);
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
  background-position: -1px -1px;
}
:root[data-theme='light'] body { background-image: none; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 1px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--surface-2); padding: 8px 12px; border: 1px solid var(--accent); }

/* Schrift-Rollen: Monospace traegt alles Technische */
.side-foot, .tile span, .card > h2, th, .pill, .count, #updated, .strip, .kv dt, .brand small {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .12em;
}
.tile b, td.num, .score { font-family: var(--mono); font-variant-numeric: tabular-nums; }
/* ---------- Seitenleiste ---------- */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 236px;
  display: flex; flex-direction: column; gap: 20px;
  padding: 18px 14px 16px;
  background: var(--chrome);
  border-right: 1px solid var(--line-strong);
  overflow-y: auto;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 4px 14px; border-bottom: 1px solid var(--line); }
.brand strong { display: block; font-family: var(--mono); font-size: 16px; letter-spacing: .02em; }
.brand small { display: block; color: var(--muted-dim); font-size: 9.5px; }
.logo { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--accent); color: var(--accent); font-family: var(--mono); font-weight: 700; font-size: 12px; }
#nav { display: flex; flex-direction: column; gap: 1px; }
#nav button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: transparent; border: 0; border-left: 2px solid transparent;
  color: var(--muted); padding: 7px 9px; cursor: pointer;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
#nav button:hover { color: var(--text); background: var(--surface); }
#nav button:focus-visible { outline-offset: -2px; }
#nav button[aria-current='true'] { color: var(--text); background: var(--surface-2); border-left-color: var(--accent); }
#nav .idx { color: var(--muted-dim); font-size: 10px; }
#nav .count { margin-left: auto; font-size: 10px; color: var(--muted-dim); border: 1px solid var(--line-strong); padding: 0 5px; }
#nav .count.alert { color: var(--err); border-color: var(--err); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 7px; padding: 12px 4px 0; border-top: 1px solid var(--line); color: var(--muted-dim); font-size: 10px; }

/* ---------- Kopfzeile und Statusleiste ---------- */
.main { margin-left: 236px; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 6; display: grid; gap: 9px; padding: 11px 20px; background: var(--topbar-bg); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line-strong); }
.topbar .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line-strong); padding: 6px 10px; min-width: 220px; }
.search span { color: var(--muted-dim); font-family: var(--mono); font-size: 10px; }
.search input { background: transparent; border: 0; color: var(--text); font-family: var(--mono); font-size: 13px; width: 100%; }
.search input:focus { outline: none; }
.top-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.strip { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 10px; color: var(--muted); }
.strip b { color: var(--text); font-weight: 600; }
.led { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted-dim); margin-right: 6px; vertical-align: middle; }
.led.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.led.warn { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.led.err { background: var(--err); box-shadow: 0 0 8px var(--err); }
main { padding: 20px; display: grid; gap: 14px; align-content: start; }

/* ---------- Bausteine ---------- */
.page-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 30px; letter-spacing: -.02em; }
.page-head h1::before { content: '// '; color: var(--accent); font-family: var(--mono); font-size: 20px; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; max-width: 78ch; }
.page-head .top-actions, .page-head .spacer { margin-left: auto; }
.card { background: var(--surface); border: 1px solid var(--line); padding: 14px 16px 16px; }
.card > h2 { margin: 0 0 12px; font-size: 10.5px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.card > h2::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.card > h2 .pill { text-transform: none; letter-spacing: 0; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--line-strong); padding: 10px 12px 12px; }
.tile b { display: block; font-size: 24px; line-height: 1.15; }
.tile span { color: var(--muted-dim); font-size: 9.5px; }
.tile small { display: block; color: var(--muted-dim); font-size: 11px; margin-top: 4px; font-family: var(--mono); }
.tile.ok { border-left-color: var(--ok); } .tile.warn { border-left-color: var(--warn); } .tile.err { border-left-color: var(--err); }
.tile.ok b { color: var(--ok); } .tile.warn b { color: var(--warn); } .tile.err b { color: var(--err); }
.hint { color: var(--muted); font-size: 12.5px; margin: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn {
  padding: 6px 11px; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text);
  cursor: pointer; font-family: var(--mono); font-size: 12.5px;
  transition: border-color .12s ease, color .12s ease, background .12s ease;
}
.btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); color: var(--accent-ink); }
.btn.warn { border-color: var(--warn); color: var(--warn); }
.btn.danger { border-color: var(--err); color: var(--err); }
.btn.danger:hover:not(:disabled) { background: var(--err); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { color: var(--accent); }
.btn.sm { padding: 4px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.btn:disabled { opacity: .5; cursor: progress; }
.title-btn { background: transparent; border: 0; padding: 0; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.title-btn:hover { color: var(--accent); text-decoration: underline; }
/* ---------- Signale ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; padding: 1px 6px; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: var(--ok); }
.pill.warn { color: var(--warn); border-color: var(--warn); }
.pill.err { color: var(--err); border-color: var(--err); }
.pill.info { color: var(--info); border-color: var(--info); }
.pill.muted { color: var(--muted-dim); }
.score { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-size: 13px; font-weight: 700; }
.score.ok { background: radial-gradient(closest-side, var(--surface) 70%, transparent 71%), conic-gradient(var(--ok) calc(var(--p) * 1%), var(--track) 0); color: var(--ok); }
.score.warn { background: radial-gradient(closest-side, var(--surface) 70%, transparent 71%), conic-gradient(var(--warn) calc(var(--p) * 1%), var(--track) 0); color: var(--warn); }
.score.err { background: radial-gradient(closest-side, var(--surface) 70%, transparent 71%), conic-gradient(var(--err) calc(var(--p) * 1%), var(--track) 0); color: var(--err); }
.bar { height: 4px; background: var(--track); overflow: hidden; min-width: 90px; }
.bar > i { display: block; height: 100%; background: var(--ok); }
.bar.warn > i { background: var(--warn); }
.bar.err > i { background: var(--err); }

/* ---------- Tabellen ---------- */
.table-wrap { max-height: 65vh; overflow: auto; border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 7px 11px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { position: sticky; top: 0; background: var(--surface-2); color: var(--muted-dim); font-size: 9.5px; z-index: 1; }
tbody tr { transition: box-shadow .1s ease; }
tbody tr:hover { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); }
tbody tr:last-child td { border-bottom: 0; }
td.actions { white-space: nowrap; text-align: right; }
td.num { text-align: right; }
.sub { display: block; color: var(--muted-dim); font-size: 11.5px; font-family: var(--mono); }

/* ---------- Site-Karten ---------- */
.sites { display: grid; gap: 10px; }
.site { background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--ok); padding: 12px 14px; display: grid; gap: 9px; }
.site.offline { border-left-color: var(--err); }
.site-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.site-head h3 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.site-head a { color: var(--muted-dim); font-family: var(--mono); font-size: 11px; text-decoration: none; }
.site-head a:hover { color: var(--accent); }
.site-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.site-meta > span { display: inline-flex; gap: 5px; align-items: baseline; }
.site-meta b { color: var(--text); font-family: var(--mono); font-weight: 600; }
.site-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.issue { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-left: 2px solid var(--line-strong); background: var(--surface-2); }
.issue.err { border-left-color: var(--err); }
.issue.warn { border-left-color: var(--warn); }
.issue strong { display: block; font-size: 13.5px; }
.issue p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.issue .btn { margin-left: auto; }
ul.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; max-height: 340px; overflow: auto; }
ul.feed li { font-family: var(--mono); font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 5px; }
ul.feed li.err { color: var(--err); }
ul.feed li.warn { color: var(--warn); }
ul.feed time { color: var(--muted-dim); margin-right: 8px; }
ul.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
ul.check-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
ul.check-list .fix { color: var(--muted); font-size: 12px; display: block; font-family: var(--mono); }
.empty { color: var(--muted); font-size: 13px; display: grid; gap: 8px; justify-items: start; }
.skeleton { height: 14px; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
/* ---------- Formulare ---------- */
form.stack { display: grid; gap: 10px; }
input, select, textarea { padding: 7px 9px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font-size: 13px; font-family: var(--mono); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
label.field { display: grid; gap: 4px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-dim); }
textarea { min-height: 160px; font-size: 12.5px; width: 100%; }
fieldset { border: 1px solid var(--line); padding: 12px; margin: 0; }
legend { color: var(--muted-dim); font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; padding: 0 6px; }
details.card > summary { cursor: pointer; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
details.card > summary::marker { color: var(--accent); }
details.card[open] > summary { margin-bottom: 12px; }

/* ---------- Drawer ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(6, 7, 9, .66); z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(600px, 100%); background: var(--surface); border-left: 2px solid var(--accent); box-shadow: var(--shadow); z-index: 21; overflow: auto; padding: 16px 20px 40px; display: grid; gap: 14px; align-content: start; }
.drawer-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line-strong); }
.drawer-head h2 { margin: 0; font-size: 18px; }
.drawer-head .btn { margin-left: auto; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 5px 8px; cursor: pointer; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-current='true'] { color: var(--accent); border-bottom-color: var(--accent); }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 5px 12px; font-size: 13px; }
.kv dt { color: var(--muted-dim); font-size: 10px; }
.kv dd { margin: 0; font-family: var(--mono); }

/* ---------- Sammelleiste, Toasts, Busy ---------- */
.bulkbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 15; display: flex; gap: 6px; align-items: center; background: var(--surface-2); border: 1px solid var(--accent); padding: 7px 10px 7px 14px; box-shadow: var(--shadow); flex-wrap: wrap; }
.bulkbar strong { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 30; display: grid; gap: 6px; width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--line-strong); border-left-width: 3px; padding: 9px 11px; box-shadow: var(--shadow); font-family: var(--mono); font-size: 11.5px; }
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--err); }
.toast.warn { border-left-color: var(--warn); }
.toast.info { border-left-color: var(--accent); }
.toast button { margin-left: auto; background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; }
.busy { position: fixed; left: 50%; transform: translateX(-50%); top: 12px; z-index: 40; display: flex; gap: 8px; align-items: center; background: var(--accent); color: var(--accent-ink); padding: 6px 14px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; box-shadow: var(--shadow); }
.spinner { width: 11px; height: 11px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Feinschliff ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
.theme-toggle { justify-content: flex-start; }
.sites.compact { gap: 8px; }
.compact-table .title-btn { font-size: 13px; }

@media (max-width: 880px) {
  .main { margin-left: 0; }
  .sidebar { position: static; width: auto; height: auto; z-index: auto; flex-direction: row; align-items: center; gap: 10px; overflow-x: auto; overflow-y: hidden; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .brand { padding: 0 10px 0 2px; border-bottom: 0; border-right: 1px solid var(--line); }
  .brand small, .side-foot { display: none; }
  #nav { flex-direction: row; }
  #nav .idx { display: none; }
  .page-head h1 { font-size: 24px; }
  main { padding: 14px; }
  .topbar { padding: 10px 14px; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { margin-top: 6px; }
}
/* Anmeldung */
.auth-screen { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background-color: var(--bg); background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; }
.auth-card { width: min(380px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line-strong); border-left: 2px solid var(--accent); padding: 22px; display: grid; gap: 12px; }
.auth-card h1 { margin: 0; font-size: 20px; }
.auth-card .btn { width: 100%; }
.auth-error { color: var(--err); font-family: var(--mono); font-size: 12px; border: 1px solid var(--err); padding: 6px 8px; }
#user-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
#user-line .sub { font-size: 10px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- UX-Politur: Trefferflaechen, Fokus, Rhythmus ---------- */
:root { --row-alt: #171a20; --ring: rgba(255, 180, 84, .25); }
:root[data-theme='light'] { --row-alt: #faf8f3; --ring: rgba(178, 106, 0, .22); }

::selection { background: var(--accent); color: var(--accent-ink); }
html { scrollbar-gutter: stable; }

.btn { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn.sm { min-height: 26px; }
.btn:active:not(:disabled) { transform: translateY(1px); }

input, select, textarea { min-height: 36px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
input[type='checkbox'], input[type='radio'] { min-height: 0; width: 16px; height: 16px; accent-color: var(--accent); }

tbody tr:nth-child(even) td { background: var(--row-alt); }
tbody tr:hover td { background: var(--surface-2); }
.table-wrap { scrollbar-gutter: stable; }

.toasts { pointer-events: none; }
.toast { pointer-events: auto; cursor: pointer; }
.toast button { background: transparent; border: 0; color: var(--muted); cursor: pointer; font-family: var(--mono); }

.auth-card { padding: 26px; gap: 14px; }
.auth-card h1 { font-size: 22px; }

@media (max-width: 880px) {
  #nav button { padding: 10px 12px; }
  .btn { min-height: 38px; }
  .toasts { right: 10px; bottom: 10px; }
}


/* Frische des letzten Abrufs */
#updated.fresh { color: var(--ok); }
#updated.stale { color: var(--warn); }
#updated.never { color: var(--err); }
#updated.fresh::before, #updated.stale::before { content: '● '; }
#nav button[title] { cursor: pointer; }



/* ============ Redesign: Aufbau und Optik ============ */
:root {
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --surface-3: #20252d;
  --line-soft: #1e232a;
  --shadow-card: inset 0 1px 0 rgba(255, 255, 255, .025), 0 10px 24px rgba(0, 0, 0, .18);
}
:root[data-theme='light'] {
  --surface-3: #e9e4da;
  --line-soft: #e6e0d4;
  --shadow-card: inset 0 1px 0 rgba(255, 255, 255, .7), 0 8px 20px rgba(20, 22, 26, .06);
}

.sidebar { width: 248px; padding: 16px 12px 14px; gap: 14px; }
.main { margin-left: 248px; }
.nav-group { display: block; margin: 14px 4px 6px; color: var(--muted-dim); font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .14em; }
.nav-group:first-of-type { margin-top: 4px; }
#nav button { padding: 8px 10px; border-radius: 2px; }
#nav button[aria-current='true'] { box-shadow: inset 2px 0 0 var(--accent); border-left-color: transparent; }

.topbar { height: 54px; padding: 8px 18px; background: var(--topbar-bg); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.search { display: flex; align-items: center; gap: 6px; }
.search input { min-width: 240px; }
.search kbd { margin-left: auto; color: var(--muted-dim); border: 1px solid var(--line-strong); padding: 0 5px; font-size: 10px; font-family: var(--mono); }

.card { padding: 18px; border-radius: 2px; box-shadow: var(--shadow-card); }
.card > h2 { margin-bottom: 14px; }
.card > h2::before { content: ''; width: 3px; height: 12px; background: var(--accent); flex: none; }

.tiles { gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.tile { padding: 14px 16px 16px; border-radius: 2px; transition: border-color .12s ease, transform .12s ease; }
.tile:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.tile b { font-size: 28px; letter-spacing: -.02em; }
.tile span { display: block; margin-bottom: 6px; }

.site { border-radius: 2px; padding: 14px 16px; gap: 8px; transition: border-color .12s ease; }
.site:hover { border-color: var(--line-strong); }
.site-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-dim); flex: none; }
.site-dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(79, 209, 165, .12); }
.site-dot.err { background: var(--err); box-shadow: 0 0 0 3px rgba(255, 107, 107, .12); }
.site-meta { gap: 14px; font-size: 12px; }
.site-foot { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.site-foot .sub { font-size: 10.5px; }
.site-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

.page-head h1 { font-size: 28px; }
.auth-card { width: min(420px, calc(100vw - 32px)); padding: 28px; }

@media (max-width: 880px) {
  .main { margin-left: 0; }
  .sidebar { width: auto; padding: 8px 10px; }
  .nav-group { display: none; }
  .site-foot { flex-direction: column; align-items: flex-start; }
  .site-actions { margin-left: 0; }
  .search input { min-width: 0; width: 100%; }
}


/* ================= Modern v3 ================= */
:root {
  --bg: #0a0b0e;
  --surface: #111318;
  --surface-2: #171a20;
  --surface-3: #1e222a;
  --line: rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 255, 255, .13);
  --line-soft: rgba(255, 255, 255, .05);
  --text: #eef0f4;
  --muted: #9aa3b2;
  --muted-dim: #6b7484;
  --accent: #f2b35c;
  --accent-ink: #17110a;
  --ok: #4ade9f;
  --warn: #f5c65a;
  --err: #ff7a7a;
  --info: #7cc4ff;
  --track: rgba(255, 255, 255, .08);
  --chrome: #0c0e12;
  --topbar-bg: rgba(10, 11, 14, .78);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .5);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 30px rgba(0, 0, 0, .22);
  --ring: rgba(242, 179, 92, .28);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Inter, Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'JetBrains Mono', Menlo, monospace;
}
:root[data-theme='light'] {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f2f3f6;
  --surface-3: #e9ebef;
  --line: rgba(15, 18, 25, .08);
  --line-strong: rgba(15, 18, 25, .14);
  --line-soft: rgba(15, 18, 25, .06);
  --text: #12151b;
  --muted: #5b6472;
  --muted-dim: #8a929f;
  --accent: #b46f12;
  --accent-ink: #fffaf1;
  --ok: #0e8a63;
  --warn: #946300;
  --err: #c03a3a;
  --info: #1f66d1;
  --track: rgba(15, 18, 25, .08);
  --chrome: #ffffff;
  --topbar-bg: rgba(244, 245, 247, .82);
  --shadow: 0 24px 60px rgba(15, 18, 25, .16);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 8px 24px rgba(15, 18, 25, .06);
  --ring: rgba(180, 111, 18, .22);
}

/* Grundflaeche */
body { background-image: radial-gradient(1200px 600px at 70% -10%, rgba(242, 179, 92, .06), transparent 60%), radial-gradient(900px 500px at 10% 0%, rgba(120, 160, 255, .045), transparent 55%); background-attachment: fixed; }
:root[data-theme='light'] body { background-image: radial-gradient(1000px 500px at 80% -10%, rgba(180, 111, 18, .07), transparent 60%); }

/* Typografie: keine Grossbuchstaben-Monospace mehr */
.side-foot, .tile span, .card > h2, th, .pill, .count, #updated, .strip, .kv dt, .brand small {
  font-family: var(--font);
  text-transform: none;
  letter-spacing: 0;
}
.tile b { font-family: var(--font); font-weight: 650; }

/* Seitenleiste */
.sidebar { width: 256px; padding: 20px 14px 16px; gap: 8px; background: var(--chrome); border-right: 1px solid var(--line); overflow-y: auto; }
.main { margin-left: 256px; }
.brand { padding: 0 6px 16px; border-bottom: 1px solid var(--line-soft); gap: 11px; }
.brand strong { font-family: var(--font); font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.brand small { font-size: 11px; color: var(--muted-dim); }
.logo { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--accent); color: var(--accent-ink); font-family: var(--font); font-weight: 700; font-size: 12px; }
.nav-group { display: block; margin: 16px 8px 6px; color: var(--muted-dim); font-family: var(--font); font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: none; }
#nav { gap: 2px; }
#nav button { padding: 9px 10px; border: 0; border-radius: 9px; font-family: var(--font); font-size: 13px; letter-spacing: 0; color: var(--muted); gap: 10px; }
#nav button:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
#nav button[aria-current='true'] { background: var(--surface-2); color: var(--text); border-left: 0; box-shadow: inset 0 0 0 1px var(--line); }
#nav .idx { color: var(--muted-dim); font-size: 10px; font-variant-numeric: tabular-nums; }
#nav .count { border: 0; background: rgba(255, 255, 255, .06); border-radius: 999px; padding: 0 7px; font-size: 10.5px; color: var(--muted); }
#nav .count.alert { background: rgba(255, 122, 122, .14); color: var(--err); }
.side-foot { gap: 8px; padding: 14px 8px 0; border-top: 1px solid var(--line-soft); font-size: 11px; }
#updated { font-size: 11px; }

/* Kopfzeile */
.topbar { height: 64px; padding: 0 28px; gap: 10px; background: var(--topbar-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.search { gap: 8px; }
.search input { height: 38px; min-width: 260px; padding: 0 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-family: var(--font); font-size: 13px; }
.search input:focus { border-color: rgba(242, 179, 92, .5); box-shadow: 0 0 0 3px var(--ring); }
.search kbd { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 1px 6px; font-size: 10px; color: var(--muted-dim); font-family: var(--font); }
.topbar .btn { height: 34px; }

/* Inhalt */
main { padding: 28px 32px 48px; max-width: 1480px; }
.page-head { gap: 16px; align-items: center; }
.page-head h1 { font-size: 26px; font-weight: 650; letter-spacing: -.02em; }
.page-head h1::before { content: none; }
.page-head p { margin-top: 6px; color: var(--muted); font-size: 13px; }
.page-head .btn { height: 36px; }

/* Karten */
.card { padding: 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-card); }
.card > h2 { margin-bottom: 16px; font-size: 13px; font-weight: 600; color: var(--muted); gap: 8px; }
.card > h2::before { content: none; }
.card > h2::after { content: none; }
.card > h2 .pill { font-weight: 500; }
.grid { gap: 16px; }
.row { gap: 10px; }
.hint { font-size: 12.5px; }

/* KPI-Kacheln */
.tiles { gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.tile { padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 40%), var(--surface); border-left: 1px solid var(--line); }
.tile:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.tile span { display: block; margin-bottom: 8px; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.tile b { font-size: 30px; line-height: 1.05; letter-spacing: -.02em; }
.tile small { font-size: 11px; color: var(--muted-dim); margin-top: 6px; font-family: var(--font); }
.tile.ok { border-left-color: var(--line); } .tile.warn { border-left-color: var(--line); } .tile.err { border-left-color: var(--line); }

/* Buttons */
.btn { height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-2); font-family: var(--font); font-size: 13px; font-weight: 500; letter-spacing: 0; }
.btn:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-3); color: var(--text); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.05); color: var(--accent-ink); }
.btn.danger { border-color: rgba(255, 122, 122, .35); background: rgba(255, 122, 122, .08); color: var(--err); }
.btn.danger:hover:not(:disabled) { background: var(--err); color: #1a0b0b; border-color: var(--err); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .04); color: var(--text); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; text-transform: none; letter-spacing: 0; }
.title-btn { font-weight: 600; }

/* Signale */
.pill { border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 500; border: 1px solid var(--line-strong); background: var(--surface-2); }
.pill.ok { color: var(--ok); border-color: transparent; background: rgba(74, 222, 159, .12); }
.pill.warn { color: var(--warn); border-color: transparent; background: rgba(245, 198, 90, .12); }
.pill.err { color: var(--err); border-color: transparent; background: rgba(255, 122, 122, .12); }
.pill.info { color: var(--info); border-color: transparent; background: rgba(124, 196, 255, .12); }
.pill.muted { color: var(--muted-dim); border-color: transparent; background: rgba(255, 255, 255, .05); }
.score { border-radius: 12px; }

/* Tabellen */
.table-wrap { border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
table { font-size: 13px; }
th { padding: 10px 14px; font-size: 11px; font-weight: 600; color: var(--muted-dim); background: var(--surface-2); border-bottom: 1px solid var(--line); }
td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); }
tbody tr:nth-child(even) td { background: transparent; }
tbody tr:hover td { background: rgba(255, 255, 255, .03); box-shadow: none; }
tbody tr:last-child td { border-bottom: 0; }
.sub { font-family: var(--font); font-size: 11.5px; }

/* Site-Karten */
.sites { gap: 12px; }
.site { padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--surface); gap: 10px; }
.site.offline { border-left: 1px solid var(--line); }
.site:hover { border-color: var(--line-strong); }
.site-head h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.site-head a { font-family: var(--font); font-size: 12px; }
.site-dot { width: 9px; height: 9px; }
.site-meta { gap: 16px; font-size: 12px; }
.site-meta b { font-family: var(--font); font-weight: 600; }
.site-foot { padding-top: 12px; border-top: 1px solid var(--line-soft); }
.site-foot .sub { font-size: 11px; }
.issue { border-radius: 12px; border-left-width: 1px; background: var(--surface-2); }
ul.feed li { border-bottom: 1px solid var(--line-soft); font-family: var(--font); font-size: 12px; }

/* Formulare */
input, select, textarea { height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-family: var(--font); font-size: 13px; padding: 0 12px; }
textarea { height: auto; padding: 10px 12px; border-radius: 10px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: rgba(242, 179, 92, .5); box-shadow: 0 0 0 3px var(--ring); }
label.field { font-family: var(--font); font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); gap: 6px; }
fieldset { border-radius: 12px; border-color: var(--line); }
legend { font-family: var(--font); font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: none; }

/* Drawer, Toasts, Busy */
.drawer { border-radius: 18px 0 0 18px; border-left: 1px solid var(--line); padding: 22px 24px 48px; }
.drawer-head h2 { font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.tabs button { font-family: var(--font); font-size: 12px; text-transform: none; letter-spacing: 0; border-radius: 8px; padding: 6px 10px; border-bottom: 0; }
.tabs button[aria-current='true'] { background: var(--surface-2); border-bottom-color: transparent; color: var(--text); }
.kv dt { font-size: 11px; color: var(--muted-dim); }
.kv dd { font-family: var(--font); }
.toasts { gap: 8px; }
.toast { border-radius: 12px; border: 1px solid var(--line); border-left-width: 1px; background: var(--surface-2); font-family: var(--font); font-size: 12.5px; box-shadow: var(--shadow); }
.toast.ok { border-left: 3px solid var(--ok); }
.toast.err { border-left: 3px solid var(--err); }
.toast.warn { border-left: 3px solid var(--warn); }
.bulkbar { border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface-2); }
.bulkbar strong { font-family: var(--font); font-size: 12px; text-transform: none; letter-spacing: 0; }

/* Anmeldung */
.auth-screen { background-image: radial-gradient(900px 500px at 50% 0%, rgba(242, 179, 92, .10), transparent 60%); }
.auth-card { width: min(420px, calc(100vw - 32px)); padding: 32px; border-radius: 18px; border: 1px solid var(--line); border-left: 1px solid var(--line); box-shadow: var(--shadow); gap: 14px; }
.auth-card h1 { font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.auth-card .logo { width: 40px; height: 40px; }
.auth-error { border-radius: 10px; font-family: var(--font); font-size: 12.5px; }

@media (max-width: 880px) {
  .sidebar { width: auto; padding: 10px 12px; gap: 8px; }
  .main { margin-left: 0; }
  main { padding: 18px 16px 40px; }
  .nav-group { display: none; }
  .topbar { height: 56px; padding: 0 16px; }
  .page-head h1 { font-size: 22px; }
}


/* Dashboard-Raster */
.overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; margin-top: 16px; }
.overview-main { display: grid; gap: 16px; min-width: 0; }
.overview-rail { display: grid; gap: 16px; position: sticky; top: 84px; }
@media (max-width: 1100px) { .overview-grid { grid-template-columns: 1fr; } .overview-rail { position: static; } }


/* ================= Pink & Charakter ================= */
:root {
  --accent: #ff5c9d;
  --accent-ink: #2a0714;
  --accent-2: #a78bfa;
  --accent-soft: rgba(255, 92, 157, .12);
  --accent-glow: rgba(255, 92, 157, .35);
  --ring: rgba(255, 92, 157, .28);
  --grad: linear-gradient(135deg, #ff5c9d 0%, #b06ab3 100%);
  --grad-soft: linear-gradient(135deg, rgba(255, 92, 157, .16), rgba(167, 139, 250, .10));
}
:root[data-theme='light'] {
  --accent: #d61f69;
  --accent-ink: #ffffff;
  --accent-2: #7c3aed;
  --accent-soft: rgba(214, 31, 105, .09);
  --accent-glow: rgba(214, 31, 105, .28);
  --ring: rgba(214, 31, 105, .22);
  --grad: linear-gradient(135deg, #d61f69 0%, #7c3aed 100%);
  --grad-soft: linear-gradient(135deg, rgba(214, 31, 105, .08), rgba(124, 58, 237, .06));
}

::selection { background: var(--accent); color: var(--accent-ink); }

/* Hintergrund: zwei Glows, kein flaches Schwarz */
body {
  background-image:
    radial-gradient(900px 520px at 78% -12%, rgba(255, 92, 157, .12), transparent 62%),
    radial-gradient(760px 460px at 8% -8%, rgba(167, 139, 250, .09), transparent 58%),
    radial-gradient(700px 380px at 50% 108%, rgba(255, 92, 157, .05), transparent 60%);
  background-attachment: fixed;
}
:root[data-theme='light'] body {
  background-image: radial-gradient(900px 500px at 82% -10%, rgba(214, 31, 105, .10), transparent 60%), radial-gradient(700px 420px at 5% 0%, rgba(124, 58, 237, .06), transparent 55%);
}

/* Marke */
.logo { background: var(--grad); color: #fff; border: 0; box-shadow: 0 6px 18px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .35); }
.brand strong { letter-spacing: -.02em; }
.brand strong::after { content: '.'; color: var(--accent); }
.brand small { color: var(--accent); opacity: .75; }
.sidebar { position: fixed; }
.sidebar::after { content: ''; position: absolute; top: 0; right: -1px; width: 1px; height: 42%; background: linear-gradient(180deg, var(--accent), transparent); opacity: .5; }

/* Navigation */
#nav .idx { color: var(--accent); opacity: .55; font-variant-numeric: tabular-nums; }
#nav button[aria-current='true'] { background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(255, 92, 157, .25); color: var(--text); }
#nav button[aria-current='true'] .idx { opacity: 1; }
#nav .count.alert { background: var(--accent-soft); color: var(--accent); }

/* Buttons */
.btn { border-color: var(--line-strong); }
.btn:hover:not(:disabled) { border-color: rgba(255, 92, 157, .45); color: var(--text); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 22px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .28); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.07); color: #fff; }
.btn.primary:active:not(:disabled) { box-shadow: 0 3px 12px var(--accent-glow); }
.btn.ghost:hover:not(:disabled) { color: var(--accent); background: var(--accent-soft); }

/* Karten und Kacheln */
.card { border-color: var(--line); }
.card:hover { border-color: rgba(255, 92, 157, .18); }
.card > h2::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); flex: none; }
.tile { background: linear-gradient(180deg, rgba(255, 92, 157, .05), transparent 45%), var(--surface); }
.tile:not(.ok):not(.warn):not(.err) b { background: linear-gradient(180deg, #ffffff 25%, #ffc9de 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tile:hover { border-color: rgba(255, 92, 157, .28); box-shadow: 0 14px 34px rgba(0, 0, 0, .28), 0 0 0 1px rgba(255, 92, 157, .08); }
.tile.ok b { color: var(--ok); } .tile.warn b { color: var(--warn); } .tile.err b { color: var(--err); }

/* Seitenkopf mit Editorial-Linie */
.page-head h1::after { content: ''; display: block; width: 44px; height: 3px; margin-top: 10px; border-radius: 2px; background: var(--grad); }

/* Site-Karten */
.site { border: 1px solid var(--line); }
.site:hover { border-color: rgba(255, 92, 157, .22); }
.site-dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(74, 222, 159, .14); position: relative; }
.site-dot.ok::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid rgba(74, 222, 159, .45); animation: ping 2.6s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.8); opacity: .9; } 70%, 100% { transform: scale(1.8); opacity: 0; } }

/* Pills */
.pill.info { color: var(--accent); background: var(--accent-soft); }
.pill.ok { color: var(--ok); }

/* Tabellen und Eingaben */
tbody tr:hover td { background: var(--accent-soft); }
th { color: var(--muted-dim); }
input:focus-visible, select:focus-visible, textarea:focus-visible, .search input:focus { border-color: rgba(255, 92, 157, .55); box-shadow: 0 0 0 3px var(--ring); }
.search kbd { color: var(--accent); border-color: rgba(255, 92, 157, .3); background: var(--accent-soft); }

/* Anmeldung: Halo und Glas */
.auth-screen { background-image: radial-gradient(900px 520px at 50% 0%, rgba(255, 92, 157, .16), transparent 62%), radial-gradient(700px 420px at 15% 100%, rgba(167, 139, 250, .10), transparent 60%); }
.auth-screen::before { content: ''; position: absolute; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 92, 157, .30), transparent 62%); filter: blur(46px); pointer-events: none; }
.auth-card { position: relative; background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .09); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
.auth-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--grad); border-radius: 18px 18px 0 0; }
.auth-card .logo { width: 42px; height: 42px; box-shadow: 0 10px 30px var(--accent-glow); }

/* Scrollbar */
::-webkit-scrollbar-thumb { background: rgba(255, 92, 157, .28); border: 2px solid var(--bg); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 92, 157, .5); }

@media (prefers-reduced-motion: reduce) { .site-dot.ok::after { animation: none; } }

.eyebrow { display: block; margin-bottom: 6px; color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }\n
/* ================= Flat & Charakter ================= */
:root, :root[data-theme='light'] { --shadow: none; --shadow-card: none; }
.card, .tile, .site, .btn, .auth-card, .toast, .drawer, .bulkbar, .table-wrap, .pill, .score, .logo { box-shadow: none !important; }

/* Hintergrund: feines Raster, pinker Bogen, violetter Strahl */
body {
  background-image:
    radial-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    conic-gradient(from 200deg at 94% -10%, transparent 0deg, rgba(255, 92, 157, .13) 26deg, transparent 64deg),
    linear-gradient(118deg, transparent 52%, rgba(167, 139, 250, .06) 68%, transparent 82%);
  background-size: 22px 22px, auto, auto;
  background-attachment: fixed;
}
:root[data-theme='light'] body {
  background-image: radial-gradient(rgba(15, 18, 25, .06) 1px, transparent 1px), conic-gradient(from 200deg at 94% -10%, transparent 0deg, rgba(214, 31, 105, .10) 26deg, transparent 64deg);
  background-size: 22px 22px, auto;
}

/* Karten: Eckklammer statt Schatten */
.card { position: relative; border-radius: 12px; }
.card::before { content: ''; position: absolute; top: 0; left: 0; width: 14px; height: 14px; border-top: 1px solid rgba(255, 92, 157, .55); border-left: 1px solid rgba(255, 92, 157, .55); border-radius: 12px 0 0 0; pointer-events: none; }
.card:hover { border-color: rgba(255, 92, 157, .22); }

/* Kacheln: gefaltete Ecke, groessere Zahl */
.tile { position: relative; overflow: hidden; border-radius: 12px; }
.tile::after { content: ''; position: absolute; top: 0; right: 0; width: 18px; height: 18px; background: linear-gradient(225deg, transparent 50%, rgba(255, 92, 157, .38) 50%); }
.tile b { font-size: 32px; }
.tile:hover { border-color: rgba(255, 92, 157, .3); }

/* Buttons bleiben flach */
.btn.primary { background: var(--grad); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.09); }
.btn.primary:active:not(:disabled) { transform: translateY(1px); }

/* Navigation: Marker statt Flaeche */
#nav button[aria-current='true'] { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
#nav button[aria-current='true'] .idx { color: var(--accent); }
#nav button[aria-current='true']::after { content: ''; margin-left: auto; width: 4px; height: 4px; border-radius: 1px; background: var(--accent); }

/* Seitenkopf: redaktioneller Index */
.page-head .eyebrow::before { content: '01 / '; color: var(--muted-dim); }
.page-head h1::after { width: 56px; height: 2px; }

/* Anmeldung: Wasserzeichen statt Halo */
.auth-screen::before { opacity: .5; }
.auth-card { overflow: hidden; }
.auth-card::after { content: 'wf'; position: absolute; right: 6px; bottom: -30px; font-family: var(--font); font-size: 168px; font-weight: 800; line-height: 1; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1px rgba(255, 92, 157, .16); pointer-events: none; }

/* Tabellen */
th { border-bottom: 2px solid rgba(255, 92, 157, .22); }

/* Schmaler pinker Faden in der Seitenleiste */
.sidebar::after { height: 34%; opacity: .65; }


/* ================= Hero & Konsistenz ================= */
.hero { position: relative; display: flex; align-items: center; gap: 24px; padding: 28px 32px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: linear-gradient(120deg, rgba(255, 92, 157, .10), transparent 46%), var(--surface); }
.hero::before { content: ''; position: absolute; top: -60%; right: -8%; width: 520px; height: 520px; border-radius: 50%; background: conic-gradient(from 200deg, transparent 0deg, rgba(255, 92, 157, .16) 40deg, transparent 92deg); pointer-events: none; }
.hero::after { content: '01'; position: absolute; right: 16px; bottom: -34px; font-size: 150px; font-weight: 800; line-height: 1; color: rgba(255, 255, 255, .035); letter-spacing: -.06em; pointer-events: none; }
.hero-copy { position: relative; z-index: 1; display: grid; gap: 10px; }
.hero-title { margin: 0; font-size: clamp(30px, 3.6vw, 44px); font-weight: 650; letter-spacing: -.03em; line-height: 1.04; }
.hero-title .serif { font-family: 'New York', Georgia, 'Times New Roman', serif; font-style: italic; font-weight: 500; color: var(--accent); }
.hero p { margin: 0; color: var(--muted); font-size: 13.5px; }
.hero-actions { margin-top: 8px; }
.hero-pulse { margin-left: auto; width: 240px; max-width: 30vw; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; opacity: .35; animation: pulseGlow 3.4s ease-in-out infinite; }
@keyframes pulseGlow { 0%, 100% { opacity: .26; } 50% { opacity: .7; } }
@media (prefers-reduced-motion: reduce) { .hero-pulse { animation: none; opacity: .45; } }

/* Kacheln als Datenblatt */
.tiles { counter-reset: tile; }
.tile::before { counter-increment: tile; content: counter(tile, decimal-leading-zero); position: absolute; top: 10px; right: 28px; font: 10px/1 var(--mono); color: var(--muted-dim); letter-spacing: .08em; }

/* Konsistenz: weniger Radien, weniger Schriftstufen */
.btn, .btn.sm, input, select, textarea, .search input { border-radius: 8px; }
.card, .tile, .site, .table-wrap { border-radius: 12px; }
.pill, .count { border-radius: 999px; }
.btn { min-height: 30px; }
.btn.sm { min-height: 26px; }
body { font-size: 14px; }
.hint, .sub, .site-foot .sub { font-size: 12px; }
.card > h2 { font-size: 13px; }
th { font-size: 11px; }
td { font-size: 13px; }

/* Kontrast */
:root { --muted-dim: #7d8696; }
:root[data-theme='light'] { --muted-dim: #6f7885; }

@media (max-width: 880px) { .hero { flex-direction: column; align-items: flex-start; padding: 22px; } .hero-pulse { width: 100%; max-width: none; } }


/* Typo-Skala: 11/12/13/14/15 + Display */
.btn, .btn.sm, #nav button, td, input, select, textarea, .card > h2, .issue strong { font-size: 13px; }
.hint, .sub, .site-foot .sub, .tile span, .tile small, th, .pill, .count, small, .side-foot, #updated, .kv dt, .brand small { font-size: 11px; }
.toast { font-size: 12px; }
.site-head h3 { font-size: 15px; }
.card > h2 { font-size: 13px; }
.btn.sm { font-size: 12px; }


/* ================= UX-Feinschliff & Motion ================= */
#nav .count { font-size: 10px; }
.hero p { font-size: 14px; }
.issue p { font-size: 12px; }
#nav button { border-radius: 8px; }
.title-btn { padding: 5px 0; }
.tabs button { min-height: 32px; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes markerIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#view.enter > * { animation: rise .3s cubic-bezier(.2, .7, .3, 1) both; }
#view.enter > *:nth-child(2) { animation-delay: .05s; }
#view.enter > *:nth-child(3) { animation-delay: .1s; }
#view.enter > *:nth-child(4) { animation-delay: .15s; }
.toast { animation: slideIn .22s ease both; }
.drawer { animation: slideIn .24s cubic-bezier(.2, .7, .3, 1) both; }
.backdrop { animation: fadeIn .18s ease both; }
#nav button[aria-current='true']::after { animation: markerIn .24s ease both; }
.btn, #nav button, .tabs button, td, .title-btn, .site, .tile { transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease; }
.site:hover { transform: translateY(-1px); }
.btn.primary { position: relative; overflow: hidden; }
.btn.primary::after { content: ''; position: absolute; top: 0; bottom: 0; left: -50%; width: 34%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-18deg); opacity: 0; pointer-events: none; transition: left .5s ease, opacity .2s ease; }
.btn.primary:hover::after { left: 130%; opacity: 1; }


/* ================= Choreografie ================= */
.hero-title .word { display: inline-block; animation: wordUp .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 70ms + 60ms); }
@keyframes wordUp { from { opacity: 0; transform: translateY(.55em); } to { opacity: 1; transform: none; } }
.hero-title .serif { display: inline-block; animation: popIn .5s .3s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes popIn { from { opacity: 0; transform: scale(0) rotate(-8deg); } to { opacity: 1; transform: none; } }

.hero-pulse path { stroke-dasharray: 700; stroke-dashoffset: 700; animation: drawPulse 3.6s ease-in-out infinite; }
@keyframes drawPulse { 0% { stroke-dashoffset: 700; opacity: .2; } 55% { stroke-dashoffset: 0; opacity: .85; } 100% { stroke-dashoffset: -700; opacity: .2; } }

:root { --ripple: rgba(255, 255, 255, .55); }
:root[data-theme='light'] { --ripple: rgba(0, 0, 0, .18); }
.ripple { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: radial-gradient(circle, var(--ripple), transparent 70%); pointer-events: none; animation: ripple .55s ease-out forwards; }
@keyframes ripple { to { transform: scale(16); opacity: 0; } }

.toast { position: relative; overflow: hidden; }
.toast::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); opacity: .65; animation: drain var(--life, 6s) linear forwards; }
.toast.err::after { background: var(--err); }
@keyframes drain { to { width: 0; } }

.drawer > * { animation: rise .3s cubic-bezier(.2, .7, .3, 1) both; }
.drawer > *:nth-child(2) { animation-delay: .04s; }
.drawer > *:nth-child(3) { animation-delay: .08s; }
.drawer > *:nth-child(4) { animation-delay: .12s; }
.drawer > *:nth-child(5) { animation-delay: .16s; }

#view.enter tbody tr { animation: rise .28s ease both; }
#view.enter tbody tr:nth-child(2) { animation-delay: .03s; }
#view.enter tbody tr:nth-child(3) { animation-delay: .06s; }
#view.enter tbody tr:nth-child(4) { animation-delay: .09s; }
#view.enter tbody tr:nth-child(5) { animation-delay: .12s; }
#view.enter tbody tr:nth-child(6) { animation-delay: .15s; }
#view.enter .page-head h1::after { transform-origin: left; animation: lineDraw .55s .15s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes lineDraw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

a { background-image: linear-gradient(var(--accent), var(--accent)); background-repeat: no-repeat; background-size: 0 1px; background-position: 0 100%; transition: background-size .25s ease; }
a:hover { background-size: 100% 1px; }

.skeleton-stack { display: grid; gap: 12px; padding: 10px 0; }
.skeleton-stack i { display: block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .11) 37%, rgba(255, 255, 255, .05) 63%); background-size: 400% 100%; animation: shimmer 1.5s ease infinite; }
.skeleton-stack i:nth-child(1) { width: 42%; }
.skeleton-stack i:nth-child(2) { width: 72%; }
.skeleton-stack i:nth-child(3) { width: 56%; }
:root[data-theme='light'] .skeleton-stack i { background: linear-gradient(90deg, rgba(15, 18, 25, .05) 25%, rgba(15, 18, 25, .10) 37%, rgba(15, 18, 25, .05) 63%); background-size: 400% 100%; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }


/* ================= Klarheit ================= */
body { background-image: none; background-color: var(--bg); }
.card::before, .tile::before, .tile::after, .hero::before, .hero::after, .sidebar::after { content: none; }
.hero-pulse { display: none; }
.hero { padding: 24px 28px; background: var(--surface); }
.hero-title { font-size: clamp(24px, 2.6vw, 32px); }
.hero-title .word { animation: none; }
.hero p { font-size: 13.5px; }

.card > h2::before { content: none; }
.card > h2 { color: var(--text); font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.card:hover { border-color: var(--line); }

.tile { background: var(--surface); }
.tile:not(.ok):not(.warn):not(.err) b { background: none; -webkit-text-fill-color: currentColor; color: var(--text); }
.tile b { font-size: 28px; }
.tile:hover { transform: none; border-color: var(--line-strong); }
.tiles { gap: 14px; }

.site { position: relative; padding: 16px 18px; }
.site:hover { transform: none; }
.site-meta { gap: 18px; }

#nav .idx { color: var(--muted-dim); opacity: 1; }
#nav button[aria-current='true'] .idx { color: var(--accent); }
.brand small { color: var(--muted-dim); }
.eyebrow { color: var(--muted); }
th { border-bottom: 1px solid var(--line); }

.overview-grid { gap: 20px; }
.drawer > * { animation: none; }

details.more { position: relative; }
details.more summary { list-style: none; cursor: pointer; color: var(--muted); font-size: 12px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary { background: var(--surface-2); color: var(--text); }
details.more > .row { position: absolute; right: 0; top: calc(100% + 6px); z-index: 6; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }


/* ================= Icons, Avatare, viele kleine Bewegungen ================= */
#nav .ico { width: 16px; height: 16px; display: inline-grid; place-items: center; color: var(--muted-dim); flex: none; transition: transform .18s ease, color .18s ease; }
#nav .ico svg { width: 16px; height: 16px; }
#nav button:hover .ico { transform: scale(1.14); color: var(--text); }
#nav button[aria-current='true'] .ico { color: var(--accent); }
#nav .count { transition: transform .15s ease; }
#nav button:hover .count { transform: scale(1.08); }

.avatar { width: 30px; height: 30px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 13px; font-weight: 650; color: #fff; background: linear-gradient(135deg, hsl(var(--h, 320) 70% 56%), hsl(calc(var(--h, 320) + 40) 70% 44%)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28); flex: none; transition: transform .18s ease, box-shadow .18s ease; }
.site:hover .avatar, tr:hover .avatar { transform: scale(1.07); box-shadow: 0 0 0 3px rgba(255, 92, 157, .12), inset 0 1px 0 rgba(255, 255, 255, .28); }
.name-cell { display: inline-flex; align-items: center; gap: 10px; }

.hero-title .word { animation: wordUp .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 60ms + 40ms); }
.tile:hover { transform: translateY(-1px); }

details.more summary { position: relative; padding-right: 24px; }
details.more summary::after { content: ''; position: absolute; right: 9px; top: 50%; width: 5px; height: 5px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: translateY(-70%) rotate(45deg); transition: transform .2s ease; }
details.more[open] summary::after { transform: translateY(-30%) rotate(225deg); }

input[type='checkbox'] { transition: transform .12s ease; }
input[type='checkbox']:checked { animation: checkPop .22s ease; }
@keyframes checkPop { 0% { transform: scale(.8); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }

.toast button { transition: transform .15s ease, color .15s ease; }
.toast button:hover { transform: rotate(90deg); color: var(--text); }
.tabs button { transition: background-color .18s ease, color .18s ease; }

.reveal { opacity: 0; transform: translateY(8px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .35s ease, transform .35s cubic-bezier(.2, .7, .3, 1); }

.qr { background: #fff; padding: 10px; border-radius: 12px; width: max-content; } .qr svg { display: block; width: 190px; height: 190px; } .stack-sm { display: grid; gap: 4px; } .qr-row { align-items: flex-start; }
/* ================= UI-Korrekturen: Topbar, Suche, Settings, Mobil ================= */
.topbar { height: auto; min-height: 64px; padding: 10px 20px; gap: 8px; }
.topbar .row { flex-wrap: nowrap; gap: 10px; }
.search { flex: 0 1 300px; min-width: 0; height: 38px; padding: 0 10px; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.search span { display: none; }
.search input { width: 100%; min-width: 0; height: 36px; font-family: var(--font); font-size: 13px; background: transparent; }
.search kbd { flex: none; margin-left: auto; }
.top-actions { margin-left: auto; flex-wrap: nowrap; }
.strip { width: max-content; max-width: 100%; margin-left: auto; gap: 14px; flex-wrap: nowrap; font-size: 11px; }
.strip > * { white-space: nowrap; }

/* Abstaende in Formularen und Einstellungen */
main { gap: 20px; }
.stack { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; }
label.row { display: flex; align-items: center; gap: 8px; }
.card > h2 { margin-bottom: 16px; }

/* Mobil */
@media (max-width: 880px) {
  .topbar { padding: 8px 12px; gap: 8px; min-height: 0; }
  .topbar .row { flex-wrap: wrap; }
  .top-actions { display: none; }
  .search { flex: 1 1 100%; max-width: none; }
  .search kbd { display: none; }
  .strip { width: 100%; margin-left: 0; overflow-x: auto; gap: 12px; scrollbar-width: none; }
  .strip::-webkit-scrollbar { display: none; }
  main { padding: 14px 12px 36px; gap: 16px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-head .btn { width: auto; }
  .hero { padding: 18px; }
  .hero-title { font-size: 26px; }
  .grid.two { grid-template-columns: 1fr; }
  .drawer { width: 100%; padding: 16px 16px 40px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .site-actions { width: 100%; }
  .site-actions .btn { flex: 1 1 auto; }
}

/* ================= Mobil: Sidebar statisch, Strip umbrechend ================= */
@media (max-width: 880px) {
  .sidebar { position: static; top: auto; left: auto; bottom: auto; width: auto; height: auto; z-index: auto; flex-direction: row; align-items: center; gap: 10px; overflow-x: auto; overflow-y: hidden; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  .brand { padding: 0 10px 0 2px; border-bottom: 0; border-right: 1px solid var(--line); }
  .brand small, .side-foot { display: none; }
  #nav { flex-direction: row; }
  #nav .idx { display: none; }
  .strip { width: 100%; margin-left: 0; flex-wrap: wrap; overflow: visible; gap: 10px 14px; }
  .search kbd { display: none; }
}
