/* vizitcard.de — modernes, schlankes UI (kein Build-Step) */
:root {
  --bg: #f7f7f9;
  --surface: #ffffff;
  --text: #18181b;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --on-primary: #fff;          /* Schrift auf gefüllten Knöpfen und dem aktiven Reiter */
  --danger: #dc2626;
  --success: #16a34a;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.05);
  /* Breite der Inhaltsschale auf großen Bildschirmen — eine einzige Stelle
     für Topbar, Dashboard und Footer. 1536 px sind 20 % mehr als die
     früheren 1280 px; breite Werkzeuge wie der Tischplan bekommen dadurch
     spürbar mehr Zeichenfläche. Auf schmaleren Geräten ändert sich nichts,
     weil der Wert nur eine Obergrenze ist. */
  --shell-max: 1536px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.3rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.mt { margin-top: 1rem; }
.mt2 { margin-top: 2rem; }
.mb { margin-bottom: 1rem; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 0; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
/* Seitenkopf (Titel + Aktionen): passt beides nicht nebeneinander (neben der Seitenleiste am
   Tablet, lange Kartennamen), rücken die Aktionen unter den Titel — statt Titel und Knöpfe
   zu schmalen Spalten zu quetschen */
.spread:has(> h1) { flex-wrap: wrap; }

/* Container */
.container { max-width: var(--shell-max); margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 460px; margin: 0 auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.1rem; border-radius: 10px; border: 1px solid transparent;
  background: var(--primary); color: var(--on-primary); font-weight: 600; font-size: .95rem;
  cursor: pointer; transition: background .15s, transform .05s; text-decoration: none;
}
.btn:hover { background: var(--primary-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn.secondary:hover { background: #f3f4f6; }
.btn.danger { background: var(--danger); }
.btn.ghost { background: transparent; color: var(--primary); }
.btn.sm { padding: .4rem .7rem; font-size: .85rem; }
.btn.full { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Cards / surfaces */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem;
}
.card + .card { margin-top: 1rem; }

/* Forms */
label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 .35rem; }
input, select, textarea {
  width: 100%; padding: .6rem .75rem; border: 1px solid var(--border);
  border-radius: 9px; font-size: .95rem; font-family: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary); }
textarea { resize: vertical; min-height: 90px; }
.field { margin-bottom: 1rem; }

/* Bio Rich-Text-Editor */
.bio-toolbar {
  display: flex; align-items: center; gap: 1px;
  padding: 4px 6px; background: var(--bg);
  border: 1px solid var(--border); border-bottom: none;
  border-radius: 9px 9px 0 0;
}
.bio-toolbar button {
  width: 30px; height: 28px; border: none; background: transparent;
  border-radius: 5px; cursor: pointer; font-size: .85rem; font-family: inherit;
  color: var(--text); display: flex; align-items: center; justify-content: center;
  transition: background .1s; padding: 0; line-height: 1;
}
.bio-toolbar button:hover { background: var(--border); }
.bio-toolbar button.bio-tb-active { background: #dbeafe; color: var(--primary); }
.bio-toolbar .bio-tb-sep { width: 1px; height: 18px; background: var(--border); margin: 0 3px; flex-shrink: 0; }
.bio-editor {
  width: 100%; min-height: 90px; padding: .6rem .75rem;
  border: 1px solid var(--border); border-radius: 0 0 9px 9px;
  font-size: .95rem; font-family: inherit; background: #fff; color: var(--text);
  outline: none; box-sizing: border-box; line-height: 1.55;
}
.bio-editor:focus { outline: 2px solid var(--primary); border-color: var(--primary); outline-offset: 0; }
.bio-editor:empty::before { content: attr(data-placeholder); color: #9ca3af; pointer-events: none; display: block; }
.checkbox { display: flex; align-items: flex-start; gap: .5rem; }
.checkbox input { width: auto; margin-top: .25rem; }
.checkbox label { font-weight: 400; margin: 0; }

/* Alerts */
.alert { padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: .92rem; }
.alert.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert.info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert.warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* Getönte Hinweis-Karten (Downgrade-/Limit-Hinweise) — Dark-Tönungen im Dark-Block */
.card.tint-red   { border: 1px solid #fca5a5; background: #fff5f5; }
.card.tint-amber { border: 1px solid #f6c56f; background: #fff8ec; }

/* Benachrichtigungs-Einblendungen (Glocke: offene Zahlungen, Abo, NFC-Fund …)
   Akzentfarbe pro Typ über --nc; Icon-Bubble links, Aktionen rechts. */
.notice {
  --nc: var(--primary);
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--nc);
  border-radius: 12px; padding: .75rem .9rem; margin-bottom: .7rem; box-shadow: var(--shadow);
  font-size: .92rem;
}
.notice.amber  { --nc: #d97706; }
.notice.purple { --nc: #8b5cf6; }
.notice.green  { --nc: var(--success); }
.notice.red    { --nc: var(--danger); }
.notice-ico {
  flex: none; width: 2.3rem; height: 2.3rem; border-radius: 10px; font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--nc) 13%, var(--surface)); color: var(--nc);
}
.notice-txt { flex: 1; min-width: min(16rem, 100%); }
.notice-txt > strong { display: block; letter-spacing: -.01em; }
.notice-txt .notice-body { color: var(--muted); font-size: .85rem; margin-top: .1rem; }
.notice-actions { flex: none; display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.notice-actions form { margin: 0; }
/* Dezenter "Gelesen"-Button (✕) statt klobigem OK-Button */
.notice-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem; border-radius: 9px; border: none; background: none;
  color: var(--muted); font-size: .95rem; cursor: pointer; transition: background .15s, color .15s;
}
.notice-x:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
/* Sammelaktion unter mehreren Einblendungen */
.notice-readall { text-align: right; margin: -.2rem 0 .8rem; }
.notice-readall button {
  background: none; border: none; cursor: pointer; color: var(--muted);
  font-size: .8rem; padding: .2rem .4rem; border-radius: 7px;
}
.notice-readall button:hover { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); }
@media (max-width: 640px) {
  .notice-actions { margin-left: auto; }
  .notice .btn.sm { padding: .5rem .8rem; }
}

/* Mitteilungen im Dashboard (layouts/dashboard.php) — dezent: ein ruhiger Kasten mit
   kompakten Zeilen, Symbol statt Blase, Text-Link statt Knopf, Erklärung einzeilig
   (voll im title), gleiche Meldungen gebündelt, ab der vierten unter „weitere". */
.nf {
  position: relative; margin: 0 0 1rem; padding: .25rem .35rem;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--border); border-radius: 12px; font-size: .86rem;
}
.nf-list { list-style: none; margin: 0; padding: 0; }
.nf-row { display: flex; align-items: center; gap: .6rem; min-height: 40px; padding: .3rem .45rem; border-radius: 9px; }
.nf-row + .nf-row, .nf-more .nf-row { border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.nf-ico { flex: none; width: 1.1rem; text-align: center; font-size: .82rem; color: var(--muted); }
.nf-row.is-amber .nf-ico { color: #d97706; }
.nf-row.is-green .nf-ico { color: var(--success); }
.nf-row.is-red .nf-ico { color: var(--danger); }
.nf-txt { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: .5rem; }
.nf-txt > strong { flex: none; max-width: 55%; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nf-body { flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .82rem; }
.nf-cnt { flex: none; font-size: .72rem; font-weight: 700; color: var(--muted); background: color-mix(in srgb, var(--text) 7%, transparent); border-radius: 999px; padding: .05rem .4rem; }
.nf-acts { flex: none; display: flex; align-items: center; gap: .15rem; }
.nf-acts form { margin: 0; }
.nf-link { font-size: .8rem; font-weight: 600; color: var(--primary); text-decoration: none; padding: .35rem .5rem; border-radius: 7px; white-space: nowrap; }
.nf-link:hover { background: color-mix(in srgb, var(--primary) 9%, transparent); text-decoration: none; }
.nf-x {
  display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem;
  border: none; background: none; border-radius: 8px; color: var(--muted); cursor: pointer; font-size: .85rem;
}
.nf-x:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
.nf-link:focus-visible, .nf-x:focus-visible, .nf-more > summary:focus-visible, .nf-all button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.nf-more > summary { cursor: pointer; padding: .35rem .5rem; color: var(--muted); font-size: .8rem; list-style-position: inside; }
.nf-more > summary:hover { color: var(--text); }
.nf-all { margin: 0; text-align: right; }
.nf-all button { background: none; border: none; cursor: pointer; color: var(--muted); font-size: .76rem; padding: .25rem .5rem; border-radius: 7px; min-height: 28px; /* Tippziel ≥ 24 px (WCAG 2.5.8) */ }
.nf-all button:hover { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); }
@media (max-width: 640px) {
  /* Schmal: Titel und Erklärung untereinander, Erklärung höchstens zwei Zeilen */
  .nf-txt { flex-direction: column; gap: .05rem; align-items: stretch; }
  .nf-txt > strong { max-width: none; white-space: normal; }
  .nf-body { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  /* Link unter den Text (volle Breite für den Text), ✕ bleibt rechts oben */
  .nf-row { align-items: flex-start; flex-wrap: wrap; row-gap: 0; }
  .nf-acts { display: contents; }
  .nf-link { order: 3; flex: 0 0 100%; padding: .25rem 0 .25rem 1.7rem; min-height: 32px; display: flex; align-items: center; }
  .nf-link:hover { background: none; text-decoration: underline; }
}

/* Badges */
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: #eff6ff; color: var(--primary); }
.badge.gray   { background: #f3f4f6; color: var(--muted); }
.badge.green  { background: #ecfdf5; color: #065f46; }
.badge.red    { background: #fef2f2; color: #991b1b; }
.badge.amber  { background: #fffbeb; color: #92400e; }
.badge.blue   { background: #dbeafe; color: #1d4ed8; }
.badge.purple { background: #ede9fe; color: #6d28d9; }
.badge.orange { background: #ffedd5; color: #c2410c; }
.badge.sm     { font-size: .68rem; padding: .1rem .4rem; }
/* Zähler-Kreis: weiße Zahl auf Rot (z. B. neue Termine/Leads) */
.badge-count  { display: inline-flex; align-items: center; justify-content: center; min-width: 1.2rem; height: 1.2rem; padding: 0 .3rem; border-radius: 999px; background: #dc2626; color: #fff; font-size: .7rem; font-weight: 700; line-height: 1; }

/* Top navigation (dashboard) */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { font-weight: 800; font-size: 1.2rem; color: #2d2d2d; letter-spacing: -.03em; font-style: normal; }
.brand span { color: var(--primary); font-style: normal; }
.brand em { color: #1a1a1a; font-style: normal; }
/* flex:none — Logo darf im Flex-Header nie zusammengedrückt werden (mobil sonst unsichtbar) */
.brand-img { display: flex; align-items: center; text-decoration: none; flex: none; color: #0b0b0d; }
.brand-img img { height: 64px; width: auto; display: block; }
[data-theme="dark"] .brand-img img { filter: brightness(0) invert(1); }
/* Inline-SVG-Wortmarke (_logo.php): Schwarzanteile via currentColor, „card" bleibt blau */
.brand-img svg.vz-logo { height: 24px; width: auto; display: block; }
[data-theme="dark"] .brand-img { color: #fff; }
[data-theme="dark"] .vz-logo .vz-logo__c { fill: #6684ff; }
.nav { display: flex; gap: .25rem; align-items: center; }
.nav a { padding: .45rem .7rem; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.nav a:hover, .nav a.active { background: #f3f4f6; color: var(--text); text-decoration: none; }
.nav a.btn { color: var(--on-primary); }
.nav a.btn:hover { color: var(--on-primary); background: var(--primary-hover); }

/* Layout with sidebar */
.layout { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; padding: 1.5rem 0; }
.sidebar { display: flex; flex-direction: column; gap: .15rem; }
.sidebar a, .sidebar .nav-soon {
  display: flex; align-items: center; gap: .65rem;
  padding: .6rem .7rem; border-radius: 10px;
  color: var(--muted); font-weight: 600; font-size: .92rem; line-height: 1.25;
}
.sidebar a > i, .sidebar .nav-soon > i { width: 1.15rem; text-align: center; font-size: .95rem; flex: none; opacity: .8; }
.sidebar a:hover, .sidebar a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); text-decoration: none; }
.sidebar a.active > i { color: var(--primary); opacity: 1; }
.sidebar a.locked { opacity: .72; }
.sidebar .nav-soon { cursor: default; opacity: .65; }
.sidebar .badge-soon, .sidebar .badge-plan, .sidebar .badge-beta { margin-left: auto; flex: none; }
/* Menüzeile mit Status-Chip und zwei Zählern (Nachrichtenzentrale): darf auf
   schmalen Bildschirmen umbrechen statt die Zeile zu sprengen. */
.sidebar a.vzch-nav-item { flex-wrap: wrap; row-gap: .3rem; }
.sidebar a.vzch-nav-item > span:first-of-type { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .sep { height: 1px; background: var(--border); margin: .5rem .3rem; }
/* Zweite Menügruppe („Mehr als nur digitale Visitenkarten …"): Trennlinie mit kleiner Überschrift */
.sidebar .nav-group { flex: none; margin: .55rem .3rem .2rem; padding: .6rem .4rem 0; border-top: 1px solid var(--border); color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .02em; line-height: 1.3; }
/* Unterzeile eines Menüpunkts (Visitenkarten/Flyer-Designer: „erstellen, gleich bestellen") */
.sidebar a .nav-sub { display: block; margin-top: .1rem; color: var(--muted); font-size: .74rem; font-weight: 500; }
.sidebar a .nav-nw { white-space: nowrap; }

/* Untere Menügruppe (Agentur & Whitelabel, Integrationen & API, Webhooks, Freunde einladen, Support): sitzt direkt über dem Konto-Button */
.sidebar-bottom { margin-top: auto; display: flex; flex-direction: column; gap: .15rem; }

/* Generisches Modal/Overlay (öffnen via [data-modal-open="#id"], schließen via [data-modal-close]) */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  background: rgba(15, 17, 22, .55); backdrop-filter: blur(2px);
  padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal-panel {
  background: var(--surface, #fff); border-radius: 14px;
  width: 100%; max-width: 580px; max-height: 90vh; overflow: auto;
  padding: 1.3rem 1.5rem; box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
  position: relative;
}
.modal-panel h2 { margin-top: 0; }
.modal-close {
  position: absolute; top: .7rem; right: .8rem;
  background: none; border: none; cursor: pointer;
  font-size: 1.3rem; line-height: 1; color: var(--muted); padding: .3rem;
}
.modal-close:hover { color: var(--text); }

/* Konto-Footer (alles rund ums Nutzerkonto, unten in der Sidebar) */
.sidebar-account { margin-top: auto; position: relative; padding-top: .6rem; }
/* Wenn eine untere Menügruppe existiert, übernimmt sie das Nach-unten-Schieben */
.sidebar-bottom ~ .sidebar-account { margin-top: 0; }
.account-btn {
  display: flex; align-items: center; gap: .6rem; width: 100%;
  padding: .5rem .55rem; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; text-align: left; font-family: inherit;
}
.account-btn:hover { background: #f9fafb; }
.account-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; font-weight: 700; font-size: .95rem;
}
.account-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.account-name { font-weight: 700; font-size: .86rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-plan { display: flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 600; color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-plan > i { font-size: .68rem; opacity: .9; }
.account-chevron { margin-left: auto; flex: none; color: var(--muted); font-size: .8rem; transition: transform .15s; }
.account-btn[aria-expanded="true"] .account-chevron { transform: rotate(180deg); }

.account-menu {
  display: none; position: absolute; bottom: calc(100% + .35rem); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: .35rem; flex-direction: column; gap: .1rem; z-index: 40;
}
.account-menu.open { display: flex; }
.account-menu a, .account-menu button {
  display: flex; align-items: center; gap: .6rem; width: 100%;
  padding: .6rem .6rem; border-radius: 9px; border: none; background: none;
  color: var(--muted); font-weight: 600; font-size: .9rem; cursor: pointer; text-align: left; font-family: inherit;
}
.account-menu a:hover, .account-menu button:hover { background: #f3f4f6; color: var(--text); text-decoration: none; }
.account-menu a > i, .account-menu button > i { width: 1.1rem; text-align: center; opacity: .8; flex: none; }
.account-menu form { margin: 0; }
.account-menu .account-logout { color: var(--danger); }
.account-menu .account-logout:hover { background: #fef2f2; color: var(--danger); }
.account-menu-sep { height: 1px; background: var(--border); margin: .3rem .2rem; }

/* =====================================================================
   Reiter-Leiste (Tabs) — z. B. Agentur-Bereich
   Optik bewusst wie die vorhandenen Filter-Chips (aktiv = gefüllt in der
   Primärfarbe, inaktiv = ruhig): ein Segment-Umschalter, der mobil
   horizontal wischbar bleibt. Umgeschaltet wird per JavaScript über das
   `hidden`-Attribut der Panels — ohne JS bleiben alle Abschnitte sichtbar
   und die Reiter wirken als Sprungmarken.
   ===================================================================== */
.tabbar {
  display: flex; gap: .35rem; margin: 0 0 1rem; padding: .3rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow);
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.tabbar::-webkit-scrollbar { height: 0; display: none; }
/* Ab Tablet (Seitenleiste sichtbar): passen nicht alle Reiter in eine Zeile, brechen sie um — mit
   Maus und ohne sichtbaren Rollbalken wären weggewischte Reiter kaum erreichbar (neben der
   Seitenleiste am Tablet z. B. Gastro, Termine, Wartenummern, Profil). Am Handy bleibt sie wischbar. */
@media (min-width: 761px) { .tabbar { flex-wrap: wrap; } }
.tabbar a {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 44px; padding: .5rem .9rem; border-radius: 9px;   /* 44px = bequemes Tap-Ziel */
  color: var(--muted); font-weight: 600; font-size: .92rem;
  white-space: nowrap; text-decoration: none; transition: background .15s, color .15s;
}
.tabbar a:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.tabbar a.is-active, .tabbar a.is-active:hover { background: var(--primary); color: var(--on-primary); }
.tabbar a:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.tabbar a > i { opacity: .85; }
.tabbar .tab-count {
  font-size: .72rem; font-weight: 800; line-height: 1; padding: .18rem .4rem;
  border-radius: 999px; background: var(--bg); color: var(--muted);
}
/* Zähler am aktiven Reiter: feste Fläche statt halbtransparentem Weiß (kleine Schrift braucht 4,5:1) */
.tabbar a.is-active .tab-count { background: var(--surface); color: var(--primary); }
/* Panels: schaltet erst das JavaScript um (setzt `hidden`) */
.tab-panel[hidden] { display: none; }
/* Ohne JS stehen alle Panels untereinander — dann denselben Abstand wie
   zwischen zwei Karten. Mit JS ist nie mehr als ein Panel sichtbar, die Regel
   greift dort also nicht (sonst hinge nur der erste Reiter anders am Rand). */
.tab-panel:not([hidden]) + .tab-panel:not([hidden]) { margin-top: 1rem; }

/* Grid of cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); transition: transform .1s; }
.tile:hover { transform: translateY(-2px); }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }

/* Code-Blöcke (API-Doku etc.) — themefähig statt hartkodiertem Grau */
.codeblock {
  background: #f3f4f6; border: 1px solid var(--border); border-radius: 10px;
  padding: .85rem 1rem; overflow-x: auto; -webkit-overflow-scrolling: touch;
  font-size: .82rem; line-height: 1.6; margin: 0;
}
.codeblock + .codeblock { margin-top: .75rem; }
:root[data-theme="dark"] .codeblock { background: #12151b; }
/* Kopfzeile über einem Code-Block: Beschriftung links, Kopieren-Button rechts */
.code-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: 1rem 0 .4rem; }
.code-head h3, .code-head .l { margin: 0; font-size: .95rem; }
/* Einmalige Key-Anzeige: monospaced Box mit Kopieren-Button */
.key-reveal { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
.key-reveal code {
  flex: 1; min-width: 200px; word-break: break-all; font-size: .95rem;
  background: rgba(255,255,255,.6); border: 1px dashed currentColor;
  border-radius: 8px; padding: .5rem .65rem;
}
:root[data-theme="dark"] .key-reveal code { background: rgba(0,0,0,.25); }

/* Stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); }
.stat .n { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: .85rem; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1rem; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.plan.featured { border-color: var(--primary); border-width: 2px; }
.plan .price { font-size: 2rem; font-weight: 800; margin: .5rem 0; }
.plan ul { list-style: none; padding: 0; margin: 1rem 0; flex: 1; }
.plan li { padding: .3rem 0; font-size: .9rem; border-bottom: 1px solid var(--border); }

/* QR-Template-Picker (im Modal) */
.qr-tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: .65rem;
  margin-top: .5rem;
}
.qr-tpl-card {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: .5rem;
  cursor: pointer;
  transition: border-color .12s, box-shadow .12s;
  background: var(--surface);
  user-select: none;
  text-align: center;
}
.qr-tpl-card:hover:not(.qr-tpl-locked) { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,78,216,.12); }
.qr-tpl-selected { border-color: var(--primary) !important; box-shadow: 0 0 0 3px rgba(29,78,216,.18) !important; }
.qr-tpl-locked { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
.qr-tpl-preview {
  background: var(--tpl-bg, #fff);
  border-radius: 6px;
  overflow: hidden;
  padding: 6px;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.qr-tpl-mock { flex: 1; display: flex; align-items: center; justify-content: center; }
.qr-tpl-mock svg { width: 100%; height: auto; max-height: 56px; }
.qr-tpl-label {
  font-size: .5rem; font-weight: 800; letter-spacing: .06em;
  text-align: center; padding: 3px 2px 2px; color: #fff;
  border-radius: 0 0 3px 3px; margin: 2px -6px -6px;
}
.qr-tpl-name {
  font-size: .7rem; font-weight: 600; color: var(--text);
  margin-top: .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qr-tpl-badges { display: flex; flex-wrap: wrap; gap: .2rem; justify-content: center; margin-top: .2rem; }

/* Premium-Upload-Placeholder (Karte anlegen) */
.premium-preview-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.premium-preview-field { flex: 1; min-width: 140px; }
.premium-preview-field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.badge-premium { display: inline-block; padding: .1rem .4rem; border-radius: 999px; font-size: .68rem; font-weight: 700; background: #dbeafe; color: #1d4ed8; vertical-align: middle; margin-left: .25rem; }
/* Kennzeichnung neu eingeführter Funktionen (Badge „NEU!") */
.badge-neu { display: inline-block; padding: .1rem .45rem; border-radius: 999px; font-size: .66rem; font-weight: 800; letter-spacing: .04em; background: linear-gradient(90deg, #f43f5e, #d946ef); color: #fff; vertical-align: middle; margin-left: .3rem; white-space: nowrap; }
/* Kennzeichnung von Funktionen in der Erprobung (Badge „Beta", App\Services\FeatureStage).
   Bewusst andere Farbwelt als NEU! — eine Funktion ist entweder neu oder Beta. */
.badge-beta { display: inline-block; padding: .1rem .45rem; border-radius: 999px; font-size: .66rem; font-weight: 800; letter-spacing: .04em; background: linear-gradient(90deg, #f59e0b, #ea580c); color: #fff; vertical-align: middle; margin-left: .3rem; white-space: nowrap; }
.premium-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  height: 80px;
  border: 2px dashed var(--border);
  border-radius: 10px;
  background: #f9fafb;
  color: var(--muted);
  font-size: 1.5rem;
}
.premium-upload-placeholder .muted.small { font-size: .78rem; }

.fa-icon-grid {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
  max-height: 220px;
  overflow-y: auto;
  padding: .4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: .25rem;
}
.fa-icon-grid button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s;
}
.fa-icon-grid button:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.fa-icon-grid .fa-grid-empty { grid-column: 1/-1; padding: .5rem; text-align: center; color: var(--muted); font-size: .85rem; }

/* Block 1: Passwort-Toggle */
.pw-wrap { position: relative; }
.pw-wrap input[type="password"],
.pw-wrap input[type="text"] { padding-right: 2.8rem; }
.pw-toggle {
  position: absolute; right: .55rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1.1rem;
  color: var(--muted); padding: .2rem; line-height: 1;
  /* Tippfläche ≥ 24 px (WCAG 2.5.8) — ohne Hintergrund, Optik unverändert */
  min-width: 2rem; min-height: 2rem; display: inline-flex; align-items: center; justify-content: center;
}
.pw-toggle:hover { color: var(--text); }

/* Block 4: Alert close button */
.alert { position: relative; padding-right: 2.5rem; }
.alert-close {
  position: absolute; right: .6rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1.1rem;
  color: inherit; opacity: .6; line-height: 1; padding: .2rem .4rem;
}
.alert-close:hover { opacity: 1; }

/* Block 5: Hamburger-Button */
.hamburger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; padding: 8px;
}
.hamburger span {
  display: block; height: 2px; background: var(--text);
  border-radius: 2px; transition: transform .2s, opacity .2s;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* Neue Antwort vom Support (docs/support-zammad.md „Hinweise"): Der Zähler steht im Menü —
   mobil verdeckt; ein roter Punkt am Hamburger zeigt, dass dort etwas wartet. */
.hamburger.has-support-dot { position: relative; }
.hamburger.has-support-dot::after {
  content: ""; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px;
  border-radius: 50%; background: #dc2626; box-shadow: 0 0 0 2px var(--surface);
}

/* Block 6: Editor 2-Spalten + Phone-Frame */
.editor-grid { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; align-items: start; }
.editor-form  { min-width: 0; }
.preview-pane { position: sticky; top: 90px; }
.phone-frame {
  background: #111; border-radius: 36px; padding: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
  aspect-ratio: 9/19;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.phone-frame iframe {
  flex: 1; border: none; border-radius: 28px;
  width: 100%; height: 100%;
  background: #fff;
}
.preview-toggle { display: none; }

@media (max-width: 760px) {
  /* Kein horizontales Seiten-Panning: zu breite Inhalte werden geclippt (breite
     Tabellen etc. scrollen in ihren eigenen Wrappern) — fixe Elemente wie der
     Vorschau-Button im Editor bleiben so dauerhaft im Sichtbereich */
  html, body { overflow-x: clip; }
  /* Unten Platz für die festen Knöpfe (Support-Blase rechts ≈ 66 px, „Cookie-Einstellungen" links):
     am Seitenende liegen Speichern-Knöpfe & Co. sonst darunter */
  .layout { grid-template-columns: 1fr; padding-bottom: 5rem; }
  /* Topbar kompakt: kleineres Logo + engere Nav, damit alles nebeneinander passt */
  .topbar .container { gap: .5rem; padding: 0 1rem; }
  .brand-img img { height: 44px; }
  .brand-img svg.vz-logo { height: 18px; }
  .nav { gap: .1rem; }
  .nav a { padding: .4rem .5rem; font-size: .85rem; }
  /* Sekundäre Anker-Links (z. B. Funktionen/Preise) mobil ausblenden */
  .nav a.nav-sec { display: none; }
  /* 16px verhindert den Auto-Zoom von iOS Safari beim Fokussieren von Eingabefeldern */
  input, select, textarea { font-size: 16px; }
  /* Breite Tabellen (Leads, Buchungen, Admin) horizontal wischbar statt Seiten-Overflow */
  .card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* Seitenköpfe (Titel + Aktionen) umbrechen statt überlaufen */
  .spread { flex-wrap: wrap; }
  .sidebar {
    display: none;
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 14px 30px rgba(0,0,0,.14);
    flex-direction: column;
    gap: .1rem;
    padding: .6rem;
    z-index: 30;
    /* Lange Menüs (Admin) im Ausklapp-Menü scrollbar statt unerreichbar */
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .sidebar.open { display: flex; }
  /* Komfortable Tap-Ziele im mobilen Menü */
  .sidebar a, .sidebar .nav-soon { padding: .85rem .8rem; font-size: 1rem; border-radius: 12px; }
  .sidebar a > i, .sidebar .nav-soon > i { width: 1.3rem; font-size: 1.05rem; }
  .hamburger { display: flex; }
  .nav .label { display: none; }
  .qr-tpl-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
  /* Block 6 mobil */
  .editor-grid { grid-template-columns: 1fr; }
  .preview-pane { position: static; }
  .phone-frame { aspect-ratio: 9/16; max-width: 360px; margin: 0 auto; }
  .preview-toggle { display: block; }
}
/* Kopfleiste der öffentlichen Seiten (layouts/landing.php, layouts/app.php — .topbar--site) auf schmalen
   Handys: kompakter, Beschriftungen brechen nur an Leerzeichen um (PL/ES), und reicht es nicht (Anmelde-
   seiten mit Hell/Dunkel-Knopf), rückt die Navigation in eine zweite Zeile — die Leiste bleibt 76 px hoch,
   nichts wird mehr rechts abgeschnitten. Dashboard-Kopfleiste unberührt. */
@media (max-width: 480px) {
  .topbar--site .container { gap: .35rem; padding: .3rem .75rem; height: auto; min-height: 76px; flex-wrap: wrap; }
  .topbar--site .brand-img svg.vz-logo { height: 16px; }
  .topbar--site .brand-img img { height: 40px; }
  .topbar--site .nav { flex: 0 1 auto; min-width: 0; gap: .1rem; justify-content: flex-end; margin-left: auto; }
  .topbar--site .nav > a { padding: .35rem .45rem; white-space: normal; line-height: 1.15; text-align: center; }
  .topbar--site .nav > a.btn { padding: .4rem .55rem; }
  .topbar--site .ls-drop > summary { padding: .3rem .5rem; gap: .25rem; }
  .topbar--site .theme-toggle { width: 34px; height: 34px; }
}
/* Fußzeile der öffentlichen Seiten (.site-foot) und Linkzeilen unter den Anmelde-Formularen: Tippfläche
   ≥ 24 px — das Inline-Polster verschiebt keine Zeile; Sprach-Pillen etwas höher. Unten Platz für die
   Support-Blase (fest unten rechts), sonst lägen die letzten Links am Seitenende darunter. */
@media (max-width: 1024px) {
  .site-foot a:not([class]),
  .topbar--site ~ main p.small > a:not([class]) { padding-block: .3rem; }
}
.site-foot .lang-switch.inline a { padding-top: .38rem; padding-bottom: .38rem; }
@media (max-width: 1240px) {
  body:has(#vc-support) > .site-foot { margin-bottom: 4.5rem; }
}

@media (min-width: 761px) {
  /* Sidebar bleibt beim Scrollen stehen → Konto-Footer immer sichtbar */
  .sidebar {
    display: flex !important;
    position: sticky;
    top: 76px;
    align-self: start;
    /* volle sichtbare Höhe abzüglich Topbar (76px) und Layout-Padding (2× 1.5rem),
       damit der Konto-Footer auch ohne Scrollen im Viewport bleibt */
    height: calc(100vh - 76px - 3rem);
    /* Viele Menüpunkte (Admin-Bereich): scrollen statt quetschen/abschneiden.
       KEIN overscroll-behavior:contain — das würde das Seiten-Scrollen blockieren,
       sobald die Maus über der (nicht überlangen) Sidebar steht. */
    overflow-y: auto;
    /* Tastatur-Fokus nie unter dem klebenden Konto-Footer (Support/Freunde stehen ganz unten) */
    scroll-padding-bottom: 4.5rem;
  }
  /* Menüpunkte nie vertikal zusammenstauchen (flex-shrink im Spaltenlayout) */
  .sidebar > a, .sidebar .sep, .sidebar .nav-soon, .sidebar-bottom { flex: none; }
  /* Konto-Footer klebt beim Menü-Scrollen sichtbar am unteren Rand */
  .sidebar-account { position: sticky; bottom: 0; background: var(--bg); }
  /* Admin-Menü: kompaktere Zeilen, damit alle Punkte auf normale Bildschirme passen */
  .sidebar.admin a, .sidebar.admin .nav-soon { padding: .42rem .7rem; font-size: .88rem; }
  .sidebar.admin .sep { margin: .3rem .3rem; }
}

/* =====================================================================
   Dark Mode
   Aktiviert über <html data-theme="dark"> (Toggle in der Topbar, per
   localStorage gemerkt; Default folgt der System-Einstellung). Basis-
   Komponenten (.card/.tile/.topbar/Tabellen) nutzen bereits Variablen —
   hier nur die Variablen-Overrides plus die wenigen hart kodierten Stellen.
   ===================================================================== */
:root[data-theme="dark"] {
  --bg: #0f1115;
  --surface: #171a21;
  --text: #e6e8ee;
  --muted: #9aa2ae;
  --border: #2a2f3a;
  --primary: #60a5fa;
  --primary-hover: #93c5fd;
  /* Helles Primärblau trägt keine weiße Schrift (2,5:1) → dunkle Schrift ≈ 6,9:1 (auf --danger ≈ 5,2:1) */
  --on-primary: var(--surface);
  --danger: #f2555a;
  --success: #34d399;
  --shadow: 0 1px 3px rgba(0,0,0,.5), 0 8px 24px rgba(0,0,0,.4);
}
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea { background: #12151b; color: var(--text); border-color: var(--border); }
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder { color: #6b7280; }
:root[data-theme="dark"] .btn.secondary { background: var(--surface); color: var(--text); }
:root[data-theme="dark"] .btn.secondary:hover { background: #232833; }
/* :not(.is-active), sonst überschriebe diese Regel den gefüllten aktiven Reiter */
:root[data-theme="dark"] .tabbar a:not(.is-active):hover { background: #232833; }
:root[data-theme="dark"] .nav a:hover,
:root[data-theme="dark"] .nav a.active,
:root[data-theme="dark"] .account-menu a:hover,
:root[data-theme="dark"] .account-menu button:hover { background: #232833; }
:root[data-theme="dark"] .account-btn:hover { background: #1e222b; }
:root[data-theme="dark"] .account-menu .account-logout:hover { background: #2a1416; }
:root[data-theme="dark"] .bio-toolbar button.bio-tb-active { background: #26304d; color: #bfdbfe; }
:root[data-theme="dark"] .premium-upload-placeholder { background: #12151b; }
:root[data-theme="dark"] .brand em { color: var(--text); }

/* Alerts (dunkle Tönungen) */
:root[data-theme="dark"] .alert.success { background: #0e2a1f; color: #6ee7b7; border-color: #14532d; }
:root[data-theme="dark"] .alert.error   { background: #2a1416; color: #fca5a5; border-color: #7f1d1d; }
:root[data-theme="dark"] .alert.warning { background: #2a2010; color: #fcd34d; border-color: #78350f; }
:root[data-theme="dark"] .alert.info    { background: #0e1f38; color: #93c5fd; border-color: #1e3a8a; }

/* Getönte Hinweis-Karten (dunkle Tönungen) */
:root[data-theme="dark"] .card.tint-red   { border-color: #7f1d1d; background: #2a1416; }
:root[data-theme="dark"] .card.tint-amber { border-color: #78571a; background: #2a2113; }

/* Badges (dunkle Tönungen) */
:root[data-theme="dark"] .badge         { background: #1e2740; color: #93c5fd; }
:root[data-theme="dark"] .badge.gray    { background: #242833; color: var(--muted); }
:root[data-theme="dark"] .badge.green   { background: #0e2a1f; color: #6ee7b7; }
:root[data-theme="dark"] .badge.red     { background: #2a1416; color: #fca5a5; }
:root[data-theme="dark"] .badge.amber   { background: #2a2113; color: #fcd34d; }
:root[data-theme="dark"] .badge.blue    { background: #0e1f38; color: #93c5fd; }
:root[data-theme="dark"] .badge.purple  { background: #221a3a; color: #c4b5fd; }
:root[data-theme="dark"] .badge.orange  { background: #2a1a10; color: #fdba74; }
:root[data-theme="dark"] .badge-premium { background: #0e1f38; color: #93c5fd; }

/* Theme-Umschalter (Topbar) */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
  background: transparent; border: 1px solid var(--border); color: var(--text);
  font-size: 1rem; line-height: 1; flex: none;
}
.theme-toggle:hover { background: var(--surface); }
.theme-toggle .tt-sun { display: none; }
.theme-toggle .tt-moon { display: inline; }
:root[data-theme="dark"] .theme-toggle .tt-sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .tt-moon { display: none; }

/* Sprachumschalter DE/EN (Topbar, Footer, öffentliche Karte) */
.lang-switch {
  display: inline-flex; align-items: center; gap: .15rem; flex: none;
  border: 1px solid var(--border); border-radius: 999px; padding: .14rem .3rem;
  font-size: .78rem; font-weight: 700; line-height: 1;
}
.lang-switch a { padding: .22rem .45rem; border-radius: 999px; color: inherit; opacity: .55; text-decoration: none; }
.lang-switch a:hover { opacity: .85; text-decoration: none; }
.lang-switch a.active { opacity: 1; background: var(--bg); }
.nav .lang-switch a { font-size: inherit; font-weight: inherit; }
.lang-switch.inline { vertical-align: middle; flex-wrap: wrap; }
/* Kopfzeile: Ausklappmenü mit allen Sprachen (DE, EN, IT, TR, PL, ES) */
.lang-switch.lang-menu { padding: 0; border: 0; }
.ls-drop { position: relative; }
.ls-drop > summary {
  display: inline-flex; align-items: center; gap: .3rem; list-style: none; cursor: pointer;
  border: 1px solid var(--border); border-radius: 999px; padding: .36rem .65rem; line-height: 1;
  min-height: 30px; user-select: none;
}
.ls-drop > summary::-webkit-details-marker { display: none; }
.ls-drop > summary::after { content: ""; width: .38rem; height: .38rem; margin-top: -.2rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); opacity: .6; }
.ls-drop[open] > summary::after { margin-top: .15rem; transform: rotate(-135deg); }
.ls-drop > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ls-list {
  position: absolute; right: 0; top: calc(100% + .35rem); z-index: 60; min-width: 10.5rem;
  display: flex; flex-direction: column; gap: .1rem; padding: .3rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
}
.lang-switch .ls-list a, .lang-switch .ls-list button {
  display: flex; align-items: center; gap: .55rem; width: 100%; text-align: left;
  padding: .5rem .6rem; border-radius: 8px; opacity: .85; font-weight: 600;
}
.lang-switch .ls-list a.active, .lang-switch .ls-list button.active { opacity: 1; background: var(--bg); }
.ls-list .ls-code { min-width: 1.6rem; font-size: .72rem; opacity: .6; }
.ls-list .ls-name { font-size: .88rem; }

/* =====================================================================
   Kontomenü & DE/EN-Umschalter im angemeldeten Bereich
   Kontomenü (layouts/dashboard.php): Kopf „Angemeldet als" + wenige Ziele.
   Umschalter: POST-Formular mit CSRF (AccountLocale) — Optik wie die Links.
   ===================================================================== */
.account-menu-head {
  display: flex; flex-direction: column; min-width: 0;
  padding: .35rem .6rem .55rem; margin-bottom: .2rem; border-bottom: 1px solid var(--border);
}
.account-menu-label { font-size: .72rem; font-weight: 600; color: var(--muted); line-height: 1.3; }
.account-menu-mail { font-size: .84rem; font-weight: 700; color: var(--text); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-menu a > span, .account-menu button > span { min-width: 0; }
.account-menu a.is-current { color: var(--text); }
.account-menu a.is-current > i { color: var(--primary); opacity: 1; }
/* Desktop: Einträge einzeilig in der 220 px breiten Sidebar (sie beschneidet, was übersteht) */
@media (min-width: 761px) {
  .account-menu a, .account-menu button { gap: .5rem; padding-left: .5rem; padding-right: .5rem; font-size: .88rem; white-space: nowrap; }
  .account-menu a > span, .account-menu button > span { overflow: hidden; text-overflow: ellipsis; }
}
/* Mobil ist der Hamburger-Knopf der einzige Weg ins Kontomenü — seine Striche
   hatten 0 px Breite (keine Streckung im Flex-Button) und blieben unsichtbar. */
.hamburger span { width: 100%; }
form.lang-switch { margin: 0; }
.lang-switch button {
  padding: .22rem .45rem; border: 0; border-radius: 999px; background: none; color: inherit;
  font: inherit; line-height: 1; opacity: .55; cursor: pointer;
}
.lang-switch button:hover { opacity: .85; }
.lang-switch button.active { opacity: 1; background: var(--bg); }
.lang-switch button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; opacity: 1; }
@media (max-width: 760px) {
  /* Im mobilen Ausklappmenü klappt das Kontomenü im Fluss auf statt als Popover über den Menüpunkten */
  .account-menu { position: static; margin-bottom: .45rem; box-shadow: none; }
  .account-menu a, .account-menu button { min-height: 48px; }
  /* Tippfläche ≥ 44 px hoch, ohne die schmale Pille in der Topbar zu vergrößern */
  .lang-switch button { position: relative; padding: .4rem .5rem; }
  .lang-switch button::after { content: ""; position: absolute; left: 0; right: 0; top: -10px; bottom: -10px; }
}

/* =====================================================================
   Sendungsverfolgung — Fortschrittsleiste + Ereignis-Verlauf
   Wird im Admin (/admin/shipments) und im Kundenportal
   (/dashboard/shipments) verwendet. Farben ausschließlich über die
   Theme-Variablen, damit der Dark Mode automatisch mitgeht.
   ===================================================================== */
.ship-steps { display: flex; align-items: flex-start; gap: 0; margin: .9rem 0 .4rem; }
.ship-steps .st { flex: 1; text-align: center; position: relative; font-size: .74rem; color: var(--muted); min-width: 0; }
/* Verbindungslinie zwischen den Punkten */
.ship-steps .st::before {
  content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 2px;
  background: var(--border);
}
.ship-steps .st:first-child::before { display: none; }
.ship-steps .st .dot {
  position: relative; z-index: 1; display: block; width: 20px; height: 20px; margin: 0 auto .35rem;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--border);
}
.ship-steps .st.done { color: var(--text); font-weight: 600; }
.ship-steps .st.done .dot { background: var(--primary); border-color: var(--primary); }
.ship-steps .st.done::before { background: var(--primary); }
.ship-steps .st .lbl { display: block; overflow-wrap: anywhere; }
/* Sonderfall (Problem/Rücksendung): Leiste in Rot statt Fortschritt */
.ship-steps.alert .st.done .dot { background: var(--danger); border-color: var(--danger); }
.ship-steps.alert .st.done::before { background: var(--danger); }

.ship-log { list-style: none; margin: .6rem 0 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--border); }
.ship-log li { position: relative; padding: 0 0 .75rem; font-size: .88rem; }
.ship-log li:last-child { padding-bottom: 0; }
.ship-log li::before {
  content: ""; position: absolute; left: -1.45rem; top: .45rem;
  width: 8px; height: 8px; border-radius: 50%; background: var(--border);
}
.ship-log li.now::before { background: var(--primary); box-shadow: 0 0 0 3px rgba(29,78,216,.15); }
.ship-log .t { display: block; font-size: .76rem; color: var(--muted); }
.ship-log .where { color: var(--muted); }

@media (max-width: 520px) {
  .ship-steps .st { font-size: .68rem; }
}

/* =====================================================================
   Vorschau „Pro vs. Free" (Präfix .pp-)
   Hinweisleiste im Kundenbereich (dashboard/_plan_preview_bar.php) und
   Vergleichs-Overlay auf /dashboard (dashboard/_plan_preview_overlay.php). Die Handys
   zeigen die ECHTE Karte per iframe: 390 px breiter Viewport, per
   transform:scale eingepasst (JS). Ab 900 px beide Handys nebeneinander
   (ab 1100 px die Anmerkungen daneben), darunter Bottom-Sheet mit Umschalter.
   Farben über die Theme-Variablen, Dark-Tönungen am Ende des Abschnitts.
   ===================================================================== */
html.pp-lock, html.pp-lock body { overflow: hidden; }
/* Offenes Overlay: festen Link „Cookie-Einstellungen" (layouts/_consent.php) ausblenden — läge sonst über den Aktionen */
html.pp-lock a[data-cc="show-preferencesModal"] { display: none !important; }

/* Hinweisleiste: ruhig und schmal — eine Zeile, in schmalen Spalten (< 680 px,
   Container-Abfrage) zwei; am letzten Tag dezent hervorgehoben. Schließen klappt
   per Höhen-Übergang ein (.is-leaving, JS) statt die Seite springen zu lassen. */
.pp-bar {
  container: pp-bar / inline-size;
  margin: 0 0 .7rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  transition: height .22s ease, opacity .18s ease, margin-bottom .22s ease;
}
.pp-bar[hidden] { display: none; }
.pp-bar.is-leaving { overflow: hidden; opacity: 0; margin-bottom: 0; border-width: 0; }
.pp-bar-in {
  display: grid; align-items: center; column-gap: .6rem;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "ico txt acts x";
  min-height: 48px; padding: .25rem .3rem .25rem .75rem;
  font-size: .88rem; line-height: 1.35;
}
.pp-bar-ico {
  grid-area: ico; display: inline-flex; align-items: center; justify-content: center;
  width: 1.85rem; height: 1.85rem; border-radius: 8px; font-size: .88rem;
  color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, var(--surface));
}
.pp-bar-txt { grid-area: txt; display: flex; align-items: center; gap: .55rem; min-width: 0; margin: 0; white-space: nowrap; }
.pp-bar-long, .pp-bar-short { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: var(--text); }
.pp-bar-short { display: none; }
.pp-bar-days {
  flex: none; padding: .1rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 700;
  color: color-mix(in srgb, var(--text) 80%, var(--surface)); background: color-mix(in srgb, var(--text) 6%, var(--surface));
}
.pp-bar-acts { grid-area: acts; display: flex; align-items: center; gap: .1rem; }
.pp-bar-acts form, .pp-bar-close { margin: 0; }
.pp-bar-close { grid-area: x; }
.pp-bar-cta, .pp-bar-off, .pp-bar-x {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px;
  border: 0; border-radius: 9px; background: none; cursor: pointer; font: inherit; white-space: nowrap;
}
.pp-bar-cta { gap: .45rem; padding: 0 .7rem; font-weight: 700; color: var(--primary); }
.pp-bar-cta i { font-size: .78em; transition: transform .15s ease; }
.pp-bar-cta:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); text-decoration: none; }
.pp-bar-cta:hover i { transform: translateX(2px); }
.pp-bar-off { padding: 0 .6rem; font-size: .8rem; color: var(--muted); }
.pp-bar-off:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.pp-bar-x { width: 40px; padding: 0; font-size: .95rem; color: var(--muted); }
.pp-bar-x:hover { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); }
.pp-bar :focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.pp-bar.is-last { border-color: color-mix(in srgb, var(--primary) 38%, var(--border)); background: color-mix(in srgb, var(--primary) 5%, var(--surface)); }
.pp-bar.is-last .pp-bar-days { color: var(--surface); background: var(--primary); }
@container pp-bar (max-width: 679.98px) {
  .pp-bar-in { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "txt x" "acts acts"; padding-block: .2rem .15rem; }
  .pp-bar-ico { display: none; }
  .pp-bar-long { display: none; }
  .pp-bar-short { display: block; }
  .pp-bar-acts { justify-content: space-between; margin: -.35rem -.3rem 0 -.7rem; }
  .pp-bar-cta, .pp-bar-off, .pp-bar-x { min-height: 44px; }
  .pp-bar-x { width: 44px; }
}
@media (prefers-reduced-motion: reduce) { .pp-bar { transition: none; } }

/* Overlay + Panel — rein grafisch: zwei große Handys, daneben (≥ 1100 px) bzw.
   darunter höchstens vier Anmerkungen und eine beruhigende Zeile */
.pp-overlay {
  --pp-w: 300px;                                        /* Handy-Bildschirm: feste, lesbare Breite … */
  --pp-h: clamp(420px, calc(100vh - 288px), 720px);     /* … die Höhe füllt das Fenster */
  position: fixed; inset: 0; z-index: 1100;
  display: none; align-items: center; justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 17, 22, .6);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.pp-overlay.has-chips { --pp-h: clamp(400px, calc(100vh - 348px), 680px); }
@supports (height: 100dvh) {
  .pp-overlay { --pp-h: clamp(420px, calc(100dvh - 288px), 720px); }
  .pp-overlay.has-chips { --pp-h: clamp(400px, calc(100dvh - 348px), 680px); }
}
.pp-overlay.is-open { display: flex; }
.pp-panel {
  position: relative; display: flex; flex-direction: column;
  width: 100%; max-width: 1080px; max-height: calc(100vh - 3rem);
  background: var(--bg); color: var(--text);
  border-radius: 22px; overflow: hidden;
  overflow: clip; /* kein Scroll-Container: Fokus/scrollIntoView schiebt den Kopf nicht aus dem Bild */
  box-shadow: 0 30px 90px -20px rgba(0, 0, 0, .5);
  animation: pp-in .22s ease-out;
}
@supports (height: 100dvh) { .pp-panel { max-height: calc(100dvh - 3rem); } }
@keyframes pp-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.pp-overlay :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.pp-head {
  position: relative; flex: none; display: flex; align-items: center; gap: .5rem .85rem;
  padding: .85rem 4.2rem .85rem 1.5rem;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.pp-title { order: 1; min-width: 0; margin: 0; font-size: 1.22rem; letter-spacing: -.02em; line-height: 1.3; text-wrap: balance; }
.pp-title:focus, .pp-title:focus-visible { outline: none; }
.pp-t-short { display: none; }
.pp-kicker {
  order: 2; flex: none; display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
  padding: .24rem .7rem; border-radius: 999px;
  font-size: .78rem; font-weight: 700;
  background: color-mix(in srgb, var(--primary) 10%, var(--surface)); color: var(--primary);
}
.pp-kicker.is-last { background: var(--primary); color: var(--surface); } /* letzter Tag */
.pp-closeform { position: absolute; top: 50%; right: .8rem; margin: 0; transform: translateY(-50%); }
.pp-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: inherit; font-size: 1.05rem;
}
.pp-close:hover { background: var(--bg); color: var(--text); }

.pp-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; padding: 1.1rem 1.5rem 1.3rem;
}

/* Karten-Auswahl (mehrere Karten, höchstens 10 + „weitere") */
.pp-chips { display: flex; justify-content: safe center; gap: .5rem; margin: 0 0 1rem; padding: 2px; overflow-x: auto; scrollbar-width: none; }
.pp-chips::-webkit-scrollbar { display: none; }
.pp-chip {
  flex: none; display: inline-flex; align-items: center; gap: .5rem; max-width: 16rem;
  min-height: 44px; padding: .35rem .95rem .35rem .8rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: .88rem; font-weight: 600; text-align: left;
}
.pp-chip:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); }
.pp-chip[aria-pressed="true"] {
  border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}
.pp-chip.is-more { cursor: default; color: var(--muted); padding-inline: .95rem; }
.pp-chip.is-more:hover { border-color: var(--border); }
.pp-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-chip small { flex: none; font-size: .74rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pp-dot { flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: var(--success); }
.pp-chip.is-pause .pp-dot { background: var(--danger); }

/* Bühne: zwei Handys mit Beschriftung, „vs" dazwischen; Anmerkungen daneben */
.pp-stage { min-width: 0; }
.pp-show { display: flex; align-items: center; justify-content: center; gap: 1rem 2.4rem; }
.pp-phones { display: flex; justify-content: center; align-items: flex-start; gap: .9rem; min-width: 0; }
.pp-phone { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .55rem; min-width: 0; }
.pp-cap { display: flex; align-items: center; gap: .5rem; min-height: 30px; font-weight: 800; font-size: .98rem; letter-spacing: -.01em; white-space: nowrap; }
.pp-badge {
  display: inline-block; padding: .2rem .65rem; border-radius: 999px; line-height: 1.3;
  font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}
.pp-badge.is-now { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; }
.pp-badge.is-free { background: #e5e7eb; color: #374151; }
.pp-vs {
  flex: none; align-self: center; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-top: 2.2rem; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.pp-device {
  position: relative; padding: 9px; border-radius: 38px; background: #0c0e13;
  box-shadow: inset 0 0 0 1.5px #2e333d, 0 26px 50px -20px rgba(15, 23, 42, .55);
}
.pp-screen {
  position: relative; overflow: hidden; isolation: isolate;
  width: var(--pp-w); height: var(--pp-h); border-radius: 30px; background: #fff;
}
.pp-screen::after { /* Kamera-Aussparung — macht das Handy als Handy lesbar */
  content: ""; position: absolute; z-index: 3; top: 8px; left: 50%; width: 29%; height: 19px;
  transform: translateX(-50%); border-radius: 999px; background: #0c0e13; pointer-events: none;
}
.pp-screen iframe {
  position: absolute; top: 0; left: 0; width: 390px; height: 100%; border: 0;
  transform-origin: 0 0; background: #fff; opacity: 0; transition: opacity .3s ease;
}
.pp-screen.is-loaded iframe { opacity: 1; }

/* Ladezustand (Skeleton) */
.pp-skel { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0 16px; background: #fff; transition: opacity .3s ease; }
.pp-skel span {
  display: block; flex: none; border-radius: 10px;
  background: linear-gradient(90deg, #eef1f6 25%, #f7f9fc 50%, #eef1f6 75%); background-size: 200% 100%;
  animation: pp-shimmer 1.3s linear infinite;
}
.pp-skel .k-cover { align-self: stretch; height: 27%; margin: 0 -16px; border-radius: 0; }
.pp-skel .k-avatar { width: 34%; aspect-ratio: 1; margin-top: -19%; border-radius: 50%; box-shadow: 0 0 0 4px #fff; }
.pp-skel .k-name { width: 56%; height: 16px; margin-top: 4px; }
.pp-skel .k-line { width: 38%; height: 10px; }
.pp-skel .k-block { align-self: stretch; height: 52px; border-radius: 14px; }
.pp-screen.is-loaded .pp-skel { opacity: 0; pointer-events: none; }
@keyframes pp-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Karte wird im Zieltarif pausiert: die heutige Karte abgeblendet, darüber der Hinweis */
.pp-screen.is-paused.is-loaded iframe { opacity: .5; filter: grayscale(1) blur(1.5px); }
.pp-paused {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .65rem; padding: 1.5rem 1rem; text-align: center;
  background: linear-gradient(180deg, rgba(241, 245, 249, .35), rgba(241, 245, 249, .75));
}
.pp-paused[hidden] { display: none; }
.pp-paused-ico {
  display: flex; align-items: center; justify-content: center; width: 78px; height: 78px; margin-bottom: .2rem;
  border-radius: 50%; background: #fff; color: #dc2626; font-size: 2.3rem;
  box-shadow: 0 14px 34px -14px rgba(15, 23, 42, .5);
}
.pp-paused strong {
  display: inline-flex; padding: .45rem 1rem; border-radius: 999px; background: #fff; color: #b91c1c;
  border: 1.5px dashed rgba(220, 38, 38, .7); font-size: .98rem; line-height: 1.3;
  box-shadow: 0 10px 24px -14px rgba(15, 23, 42, .5);
}
.pp-paused small { padding: .2rem .65rem; border-radius: 999px; background: rgba(255, 255, 255, .85); color: #334155; font-size: .8rem; font-weight: 600; }

/* Anmerkungen: kurze Chips im Stil der Markierungen + eine beruhigende Zeile */
.pp-side { flex: 0 1 17.5rem; min-width: 13rem; display: flex; flex-direction: column; gap: 1rem; }
.pp-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; }
.pp-notes[hidden] { display: none; }
.pp-note {
  display: inline-flex; align-items: center; gap: .6rem; max-width: 100%; min-height: 42px;
  padding: .35rem 1rem .35rem .4rem; border-radius: 999px;
  border: 1.5px dashed color-mix(in srgb, var(--danger) 55%, transparent);
  background: color-mix(in srgb, var(--danger) 5%, var(--surface));
  color: var(--text); font-size: .95rem; font-weight: 700; line-height: 1.25;
}
.pp-note i {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem;
  border-radius: 50%; background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); font-size: .82rem;
}
.pp-note.is-more { padding-inline: 1rem; border-style: solid; border-color: var(--border); background: var(--surface); color: var(--muted); font-weight: 600; }
.pp-note.is-mob { display: none; }
.pp-note.is-same { border-style: solid; border-color: color-mix(in srgb, var(--success) 40%, var(--border)); background: var(--surface); }
.pp-note.is-same i { background: color-mix(in srgb, var(--success) 14%, var(--surface)); color: var(--success); }
.pp-calm { display: flex; align-items: flex-start; gap: .55rem; margin: 0; font-size: .87rem; line-height: 1.45; color: var(--muted); }
.pp-calm i { flex: none; margin-top: .18rem; color: var(--success); }
.pp-empty { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; padding: 1.5rem 0 1rem; text-align: center; }
.pp-empty .pp-notes { flex-direction: row; flex-wrap: wrap; justify-content: center; }
.pp-empty-ico {
  display: flex; align-items: center; justify-content: center; width: 68px; height: 68px; border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 9%, var(--surface)); color: var(--primary); font-size: 1.7rem;
}
.pp-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Fallback: Vergleichsbild, falls eine Vorschau nicht lädt (bzw. ohne JavaScript) */
.pp-fallback, .pp-nojs { display: none; width: 100%; max-width: 600px; height: auto; margin: 0 auto; border-radius: 18px; border: 1px solid var(--border); }
.pp-nojs { display: block; }
.pp-stage.is-fallback .pp-phones, .pp-stage.is-fallback .pp-seg { display: none; }
.pp-stage.is-fallback .pp-fallback { display: block; }

/* Umschalter „heute | ab …" (nur mobil) */
.pp-seg {
  display: none; gap: .25rem; width: min(100%, 390px); margin: 0 auto .7rem; padding: .25rem;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
}
.pp-seg button {
  flex: 1 1 0; min-width: 0; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .3rem .5rem; border: 0; border-radius: 10px; background: none; cursor: pointer;
  font: inherit; font-size: .86rem; font-weight: 700; color: var(--muted); white-space: nowrap;
}
.pp-seg button[aria-selected="true"] { background: var(--text); color: var(--surface); }

/* Fußleiste: Aktionen */
.pp-foot {
  flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .7rem;
  padding: .8rem 1.5rem; background: var(--surface); border-top: 1px solid var(--border);
}
.pp-foot form { margin: 0; }
.pp-foot .btn { min-height: 46px; padding-inline: 1.25rem; }
.pp-foot .pp-offform { margin-left: auto; }
.pp-off {
  min-height: 44px; padding: 0 .4rem; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: .85rem; color: var(--muted); text-decoration: underline; text-underline-offset: 2px;
}
.pp-off:hover { color: var(--text); }

/* Mittlere Breite: Anmerkungen unter den Handys */
@media (min-width: 900px) and (max-width: 1099.98px) {
  .pp-overlay { --pp-h: clamp(360px, calc(100vh - 372px), 640px); }
  .pp-overlay.has-chips { --pp-h: clamp(340px, calc(100vh - 432px), 600px); }
  .pp-show { flex-direction: column; }
  .pp-side { flex: none; width: 100%; min-width: 0; align-items: center; gap: .7rem; }
  .pp-notes { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .pp-calm { justify-content: center; text-align: center; }
}

/* Mobil: Bottom-Sheet, ein Handy — so groß wie möglich — mit Umschalter */
@media (max-width: 899.98px) {
  .pp-overlay { align-items: flex-end; padding: 0; --pp-h: clamp(300px, calc(100vh - 424px), 700px); }
  .pp-overlay.has-chips { --pp-h: clamp(280px, calc(100vh - 480px), 660px); }
  .pp-panel { max-width: none; max-height: calc(100vh - 16px); border-radius: 22px 22px 0 0; animation: pp-up .3s cubic-bezier(.2, .8, .2, 1); transition: transform .2s ease; }
  .pp-head { padding: 1.2rem 3.8rem .7rem 1rem; touch-action: none; } /* ziehbar (Overlay-Skript) */
  .pp-head::before { /* Griff */
    content: ""; position: absolute; top: .45rem; left: 50%; width: 40px; height: 5px; margin-left: -20px;
    border-radius: 3px; background: var(--border);
  }
  .pp-kicker { order: 0; font-size: .74rem; padding: .2rem .6rem; }
  .pp-title { font-size: 1rem; }
  .pp-t-long { display: none; }
  .pp-t-short { display: inline; }
  .pp-closeform { top: calc(50% + .25rem); right: .6rem; }
  .pp-body { padding: .7rem 1rem .9rem; }
  .pp-chips { justify-content: flex-start; margin: 0 -1rem .7rem; padding: 2px 1rem; }
  .pp-seg { display: flex; }
  .pp-cap, .pp-vs { display: none; }
  .pp-show { flex-direction: column; gap: .75rem; }
  .pp-phones { display: block; width: 100%; }
  .pp-overlay[data-side="now"] .pp-phone.is-free,
  .pp-overlay[data-side="free"] .pp-phone.is-now { display: none; }
  .pp-device { width: min(100%, 400px); margin: 0 auto; padding: 6px; border-radius: 32px; }
  .pp-screen { width: 100%; border-radius: 26px; }
  .pp-side { flex: none; width: 100%; min-width: 0; align-items: center; gap: .6rem; }
  .pp-notes { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: .4rem; }
  .pp-note { min-height: 34px; padding: .2rem .75rem .2rem .28rem; font-size: .84rem; gap: .42rem; }
  .pp-note.is-4th, .pp-note.is-desk { display: none; }
  .pp-note.is-mob { display: inline-flex; }
  .pp-note i { width: 1.55rem; height: 1.55rem; font-size: .72rem; }
  .pp-note.is-more { padding-inline: .8rem; }
  .pp-calm { justify-content: center; text-align: center; font-size: .8rem; }
  .pp-foot { padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom)); gap: .3rem .5rem; }
  .pp-foot .pp-keep { flex: 1 1 100%; }
  .pp-foot .pp-keep .btn { width: 100%; }
  .pp-foot .pp-later .btn { min-height: 44px; }
}
@supports (height: 100dvh) {
  @media (max-width: 899.98px) {
    .pp-overlay { --pp-h: clamp(300px, calc(100dvh - 424px), 700px); }
    .pp-overlay.has-chips { --pp-h: clamp(280px, calc(100dvh - 480px), 660px); }
    .pp-panel { max-height: calc(100dvh - 16px); }
  }
  @media (min-width: 900px) and (max-width: 1099.98px) {
    .pp-overlay { --pp-h: clamp(360px, calc(100dvh - 372px), 640px); }
    .pp-overlay.has-chips { --pp-h: clamp(340px, calc(100dvh - 432px), 600px); }
  }
}
@keyframes pp-up { from { opacity: .6; transform: translateY(48px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .pp-panel, .pp-skel span { animation: none; }
}

/* Dark Mode */
:root[data-theme="dark"] .pp-overlay { background: rgba(0, 0, 0, .7); }
:root[data-theme="dark"] .pp-badge.is-free { background: #2a2f3a; color: #cbd5e1; }
:root[data-theme="dark"] .pp-device { background: #050608; box-shadow: inset 0 0 0 1.5px #3a404c, 0 26px 50px -20px rgba(0, 0, 0, .85); }
:root[data-theme="dark"] .pp-screen::after { background: #050608; }
/* Hauptaktion: dunkle Schrift auf dem hellen Primärblau des Dark Mode (≈ 7:1 statt 2,5:1) */
:root[data-theme="dark"] .pp-foot .btn:not(.secondary) { color: var(--surface); }

/* =====================================================================
   Admin-Navigation (Views/admin/_nav.php): Gruppen als <details> mit
   Zählern offener Aufgaben (AdminOverviewService::navCounts). Einträge
   nutzen die .sidebar-a-Regeln oben; hier nur Gruppenkopf, Zähler, Abstände.
   ===================================================================== */
/* Landmark <nav> umschließt Übersicht, Gruppen und „Mein Dashboard" — Abstände wie direkt in .sidebar */
.sidebar .an-nav { display: flex; flex-direction: column; gap: .15rem; flex: none; }
.sidebar .an-group { flex: none; }
.sidebar .an-sum {
  display: flex; align-items: center; gap: .35rem; min-height: 36px;
  margin-top: .25rem; padding: .3rem .7rem; border-radius: 10px;
  list-style: none; cursor: pointer; user-select: none;
  color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.sidebar .an-sum::-webkit-details-marker { display: none; }
.sidebar .an-sum:hover { color: var(--text); background: color-mix(in srgb, var(--text) 5%, transparent); }
.sidebar .an-sum:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.an-sum-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-chev { flex: none; width: 1rem; text-align: center; font-size: .66rem; transition: transform .15s ease; }
.an-group[open] > .an-sum .an-chev { transform: rotate(180deg); }
/* Offene Gruppe: Zähler stehen an den Einträgen, nicht doppelt am Kopf */
.an-group[open] > .an-sum .an-badge { display: none; }
.an-items { display: flex; flex-direction: column; gap: .15rem; padding-bottom: .2rem; }
.sidebar .an-items a { position: relative; }
.an-badge {
  flex: none; margin-left: auto; min-width: 1.4rem; padding: .1rem .42rem; border-radius: 999px;
  font-size: .7rem; font-weight: 700; line-height: 1.3; letter-spacing: 0; text-transform: none; text-align: center;
  font-variant-numeric: tabular-nums; color: var(--text); background: color-mix(in srgb, var(--text) 10%, transparent);
}
.an-sum .an-badge { margin-left: 0; }
.an-badge.is-crit { color: #fff; background: var(--danger); }
:root[data-theme="dark"] .an-badge.is-crit { color: #1c0a0b; }
/* Warnsymbol (z. B. ausstehende Migrationen) — kein Zähler, nicht in der Gruppensumme */
.an-badge.is-warn { min-width: 0; color: #92400e; background: color-mix(in srgb, #f59e0b 22%, transparent); }
/* Im Gruppenkopf nur das Symbol (ohne Fläche), damit der Titel neben Warnung + Zähler nicht gekürzt wird */
.an-sum .an-badge.is-warn { padding: 0 .05rem; background: none; font-size: .74rem; }
:root[data-theme="dark"] .an-badge.is-warn { color: #fcd34d; background: color-mix(in srgb, #f59e0b 20%, transparent); }
.an-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* „Weitere" (Services\Admin\AdminNav): selten genutzte Einträge, verschachtelt in .an-items, nie mit
   Arbeitszähler; der Server öffnet es, wenn die aktive Seite darin liegt. Kopf wie ein Eintrag. */
.sidebar .an-more { flex: none; }
.sidebar .an-more-sum {
  display: flex; align-items: center; gap: .65rem; min-height: 36px; padding: .35rem .7rem; border-radius: 10px;
  list-style: none; cursor: pointer; user-select: none; color: var(--muted); font-size: .86rem; font-weight: 600;
}
.sidebar .an-more-sum::-webkit-details-marker { display: none; }
.sidebar .an-more-sum > i:first-child { width: 1.15rem; text-align: center; font-size: .95rem; flex: none; opacity: .8; }
.sidebar .an-more-sum > span { flex: 1; min-width: 0; }
.sidebar .an-more-sum:hover { color: var(--text); background: color-mix(in srgb, var(--text) 5%, transparent); }
.sidebar .an-more-sum:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.an-more[open] > .an-more-sum .an-chev { transform: rotate(180deg); }
.sidebar .an-more > .an-items { padding: .1rem 0 0 .6rem; }
@media (max-width: 760px) {
  .sidebar .an-sum { min-height: 44px; padding: .5rem .8rem; font-size: .78rem; }
  .sidebar .an-more-sum { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .an-chev { transition: none; } }

/* Sprunglink „Zum Inhalt" (layouts/dashboard.php): erstes Element im <body>, sichtbar erst bei
   Tastaturfokus; Ziel ist <main id="inhalt"> (tabindex=-1, deshalb ohne Fokusrahmen). */
.skip-link {
  position: absolute; left: .75rem; top: -4rem; z-index: 1000; padding: .65rem 1rem; border-radius: 10px;
  background: var(--surface); color: var(--text); font-weight: 700; box-shadow: var(--shadow); text-decoration: none;
}
.skip-link:focus { top: .75rem; outline: 2px solid var(--primary); outline-offset: 2px; text-decoration: none; }
#inhalt:focus { outline: none; }

/* =====================================================================
   Live-Chat — Nachrichtenzentrale (/dashboard/chat), Statuspille und
   Sidebar-Zähler. Präfix vzch-.
   Posteingang-Muster: EIN Rahmen (.vzch) mit Liste und Gespräch, beide
   scrollen innen; die Höhe misst chat-owner.js nach (--vzch-h), damit die
   Eingabe immer sichtbar bleibt und die Seite nicht springt.
   Mobil zuerst: bis 760 px fließt die Liste in der Seite und das Gespräch
   öffnet als Vollbild (html.vzch-sheet), 761–999 px Liste ODER Gespräch im
   Rahmen (.vzch.is-open), ab 1000 px zwei Spalten.
   Farben über die Tokens — Ausnahmen (Avatar-Palette, Ampelfarben) haben
   ihre Gegenstücke im Dark-Block am Ende.
   ===================================================================== */

/* Zähler im Menü rechtsbündig (bisher galt das nur für .badge-soon/.badge-plan) */
.sidebar .badge-count { margin-left: auto; flex: none; }
/* Grüner Zähler: laufende Gespräche (rot bleibt „wartend + ungelesen") */
.badge-count.is-active { background: #16a34a; }
/* Blauer Zähler: ungelesene Kontaktanfragen (docs/kontaktanfragen.md) */
.badge-count.is-leads { background: var(--primary); color: var(--on-primary); }
/* Blauer Zähler: Neuerungen seit dem letzten Besuch der Neuigkeiten (docs/willkommen.md) */
.badge-count.is-news { background: var(--primary); color: var(--on-primary); }
/* Blauer Zähler: neue Teilnahmen an Umfragen seit dem letzten Blick in die Ergebnisse (docs/umfragen.md) */
.badge-count.is-survey { background: var(--primary); color: var(--on-primary); }
/* Ruhiger Zähler (z. B. beantwortete, noch offene Support-Tickets am „Admin-Bereich") */
.badge-count.is-quiet { background: color-mix(in srgb, var(--text) 14%, transparent); color: var(--text); }
/* Mehrere Zähler in einer Menüzeile: nur der erste sichtbare schiebt nach rechts,
   die folgenden rücken dicht an (zwei auto-Ränder teilten sonst den Platz) */
.sidebar a.vzch-nav-item .badge-count:not([hidden]) ~ .badge-count { margin-left: .3rem; }

/* ---- Status-Chip „Live / Abwesend / Offline" (Menüeintrag, Übersicht) ----
   Zeigt den EFFEKTIVEN Status; chat-global.js (paintState) hält ihn aktuell. */
.vzch-nav-live {
  display: inline-flex; align-items: center; gap: .32rem; flex: none;
  max-width: 8.5rem; padding: .1rem .45rem;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--muted);
  font-size: .66rem; font-weight: 700; letter-spacing: .02em; line-height: 1.5;
}
.vzch-nav-live [data-vzch-live-label] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vzch-nav-dot { flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: #9ca3af; }
.vzch-nav-live[data-state="online"]  { color: #16a34a; border-color: rgba(22,163,74,.4); }
.vzch-nav-live[data-state="online"]  .vzch-nav-dot { background: #16a34a; }
.vzch-nav-live[data-state="away"]    { color: #d97706; border-color: rgba(217,119,6,.4); }
.vzch-nav-live[data-state="away"]    .vzch-nav-dot { background: #d97706; }
.vzch-nav-live[data-state="offline"] { color: #9ca3af; }
.vzch-nav-live[data-state="offline"] .vzch-nav-dot { background: #9ca3af; }
/* Im Menü: Chip rechtsbündig, sofern kein Badge davor schon nach rechts schiebt */
.sidebar .vzch-nav-live { margin-left: auto; }

/* Wartende Anfragen: Punkt pulsiert dezent (Pille oben + Chip im Menü) */
@keyframes vzch-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(220,38,38,.5); }
  70%  { box-shadow: 0 0 0 .34rem rgba(220,38,38,0); }
  100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); }
}
.vzch-pill-dot.is-pulse, .vzch-nav-dot.is-pulse { animation: vzch-pulse 1.8s ease-out infinite; }

/* ---- Statuspille (Kopfleiste + Kopfzeile der Nachrichtenzentrale) ---- */
.vzch-pillbox { position: relative; flex: none; }
.vzch-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  min-height: 40px; padding: .35rem .7rem;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text);
  font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
}
.vzch-pill:hover { border-color: var(--primary); }
.vzch-pill i { font-size: .62rem; opacity: .6; }
.vzch-pill-dot {
  flex: none; width: .6rem; height: .6rem; border-radius: 50%;
  background: #9ca3af;
}
.vzch-pill-dot.is-online { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.25); }
.vzch-pill-dot.is-away   { background: #d97706; box-shadow: 0 0 0 3px rgba(217,119,6,.22); }
.vzch-pill-dot.is-offline{ background: #9ca3af; box-shadow: none; }
.vzch-menu {
  position: absolute; right: 0; top: calc(100% + .35rem); z-index: 40;
  min-width: 11rem; padding: .3rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow);
}
.vzch-menu button {
  display: flex; align-items: center; gap: .55rem; width: 100%;
  min-height: 40px; padding: .5rem .6rem;
  border: 0; border-radius: 9px; background: none; color: var(--text);
  font: inherit; font-size: .9rem; text-align: left; cursor: pointer;
}
.vzch-menu button:hover { background: var(--bg); }
/* Auf der Nachrichtenzentrale steht die Pille bereits in der Seitenkopfzeile */
body:has(#vzch) .vzch-pill-top { display: none; }

/* ---- Seitenkopf: Titel links, Status + Benachrichtigungen rechts ---- */
.vzch-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.vzch-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1rem; margin: 0 0 .9rem; }
.vzch-h1 { margin: 0; font-size: 1.55rem; letter-spacing: -.01em; }
.vzch-tools { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.vzch-toolgroup {
  display: inline-flex; align-items: center; gap: 2px; padding: 2px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
}
.vzch-tool {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 0; border-radius: 999px;
  background: none; color: var(--muted); font-size: .95rem; cursor: pointer;
  text-decoration: none; transition: background .15s, color .15s;
}
.vzch-tool:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.vzch-tool[aria-pressed="true"] { color: var(--primary); }
.vzch-tool.is-blocked { opacity: .6; }
.vzch-cardlinks { margin: -.4rem 0 1rem; }

/* Beta: kompakte, wegklickbare Zeile statt Hinweiskasten */
.vzch-beta {
  display: flex; align-items: center; gap: .6rem; margin: 0 0 .9rem;
  padding: .25rem .3rem .25rem .85rem;
  border: 1px solid color-mix(in srgb, #f59e0b 35%, var(--border)); border-radius: 12px;
  background: color-mix(in srgb, #f59e0b 7%, var(--surface));
  font-size: .85rem; line-height: 1.4;
}
.vzch-beta > i { flex: none; color: #d97706; }
.vzch-beta p { flex: 1; min-width: 0; margin: 0; }
.vzch-beta-x {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 0; border-radius: 9px;
  background: none; color: var(--muted); cursor: pointer;
}
.vzch-beta-x:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }

/* ---- Rahmen ---- */
.vzch {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.vzch-list { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.vzch-scroll { position: relative; flex: 1; min-height: 0; }
/* „↑ 2 wartende Anfragen" — nur solange der Abschnitt „Wartend" weggescrollt ist */
.vzch-waitjump {
  position: absolute; top: .45rem; left: 50%; z-index: 4; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: .3rem .85rem;
  border: 0; border-radius: 999px; background: #b45309; color: #fff;
  font: inherit; font-size: .78rem; font-weight: 700; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,.18); cursor: pointer;
}
.vzch-waitjump:hover { background: #92400e; }
.vzch-pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--surface); }
/* Ohne offenes Gespräch zeigen Mobil und Tablet nur die Liste */
.vzch:not(.is-open) .vzch-pane { display: none; }

/* ---- Liste: Abschnitte ---- */
.vzch-sec + .vzch-sec, .vzch-list-note + .vzch-sec { border-top: 1px solid var(--border); }
.vzch-sec-h {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: .45rem; margin: 0;
  padding: .75rem 1rem .45rem; background: var(--surface);
  font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  line-height: 1.2; color: var(--muted);
}
.vzch-sec-c {
  min-width: 1.35rem; padding: .12rem .4rem; border-radius: 999px;
  background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text);
  font-size: .75rem; font-weight: 700; letter-spacing: 0; text-align: center; font-variant-numeric: tabular-nums;
}
.vzch-sec.is-waiting .vzch-sec-h { color: #b45309; }
.vzch-sec.is-waiting .vzch-sec-t::before {
  content: ""; display: inline-block; width: .5rem; height: .5rem; margin: 0 .45rem .08rem 0;
  border-radius: 50%; background: #d97706; vertical-align: middle;
  animation: vzch-pulse-amber 1.8s ease-out infinite;
}
@keyframes vzch-pulse-amber {
  0%   { box-shadow: 0 0 0 0 rgba(217,119,6,.55); }
  70%  { box-shadow: 0 0 0 .34rem rgba(217,119,6,0); }
  100% { box-shadow: 0 0 0 0 rgba(217,119,6,0); }
}
.vzch-sec.is-waiting .vzch-sec-c { background: #b45309; color: #fff; }
.vzch-sec-note {
  margin: 0 1rem .55rem; padding: .45rem .6rem; border-radius: 8px;
  background: color-mix(in srgb, #f59e0b 12%, var(--surface)); color: #92400e;
  font-size: .78rem; line-height: 1.4;
}
.vzch-list-note { margin: 0; padding: .85rem 1rem; color: var(--muted); font-size: .85rem; }
.vzch-retention { margin: 0; padding: .7rem 1rem .9rem; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.vzch-list-empty { padding: 2.4rem 1.25rem; text-align: center; color: var(--muted); }
.vzch-list-empty > i { font-size: 1.7rem; opacity: .5; }
.vzch-list-empty strong { display: block; margin: .6rem 0 .25rem; color: var(--text); font-size: .95rem; }
.vzch-list-empty p { margin: 0 auto; max-width: 20rem; font-size: .84rem; line-height: 1.5; }

/* Kapazität kompakt im Kopf „Aktiv": ▮▮▯ 2/3 */
.vzch-cap {
  margin-left: auto; display: inline-flex; align-items: center; gap: .35rem;
  font-size: .72rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--muted);
}
.vzch-cap-bars { display: inline-flex; gap: 2px; }
.vzch-cap-bars span { width: .5rem; height: .5rem; border-radius: 2px; background: color-mix(in srgb, var(--text) 15%, transparent); }
.vzch-cap-bars span.is-on { background: var(--success); }
.vzch-cap.is-full { color: #b45309; }
.vzch-cap.is-full .vzch-cap-bars span.is-on { background: #d97706; }
.vzch-cap-n { font-variant-numeric: tabular-nums; }

/* ---- Liste: Zeilen ---- */
.vzch-row { position: relative; border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.vzch-rows > .vzch-row:last-child { border-bottom: 0; }
.vzch-row-main {
  display: flex; align-items: flex-start; gap: .7rem; width: 100%; min-height: 44px;
  margin: 0; padding: .7rem 1rem; border: 0; background: none; color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
}
.vzch-row-main:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
/* Auswahl markiert die ganze Zeile (bei Wartenden samt Knöpfen) */
.vzch-row.is-sel, .vzch-row.is-waiting.is-sel {
  background: color-mix(in srgb, var(--primary) 11%, var(--surface));
  box-shadow: inset 3px 0 0 var(--primary);
}
.vzch-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.vzch-row-l1, .vzch-row-l2 { display: flex; align-items: baseline; gap: .5rem; min-width: 0; }
.vzch-row-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .93rem; font-weight: 600; }
.vzch-row-time { flex: none; font-size: .75rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vzch-row-prev { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; color: var(--muted); }
.vzch-row.is-unread .vzch-row-name { font-weight: 800; }
.vzch-row.is-unread .vzch-row-prev { color: var(--text); }
.vzch-row.is-unread .vzch-row-time { color: var(--primary); font-weight: 700; }
.vzch-row-badge {
  flex: none; align-self: center; min-width: 1.3rem; height: 1.3rem; padding: 0 .38rem;
  border-radius: 999px; background: var(--primary); color: var(--on-primary);
  font-size: .72rem; font-weight: 800; line-height: 1.3rem; text-align: center;
}
.vzch-row-l3 { display: flex; align-items: center; gap: .55rem; min-width: 0; margin-top: .1rem; font-size: .75rem; color: var(--muted); }
.vzch-row-card { display: inline-flex; align-items: center; gap: .3rem; min-width: 0; overflow: hidden; white-space: nowrap; }
.vzch-row-card > span { overflow: hidden; text-overflow: ellipsis; }
.vzch-row-st { flex: none; font-weight: 700; }
.vzch-row-st.is-missed { color: #b91c1c; }
/* Kanal-Gespräche (docs/integrationen.md): Herkunfts-Chip in der Liste */
.vzch-row-chan { display: inline-flex; align-items: center; gap: .3rem; min-width: 0; overflow: hidden; white-space: nowrap; color: #0e7490; font-weight: 600; }
.vzch-row-chan > span { overflow: hidden; text-overflow: ellipsis; }
.vzch-sec.is-channels .vzch-sec-h { color: #0e7490; }
.vzch-row-lead { flex: none; color: var(--success); }

/* Wartend: hervorgehoben, Annehmen/Ablehnen direkt erreichbar, Restzeit als Balken */
.vzch-row.is-waiting { background: color-mix(in srgb, #f59e0b 7%, var(--surface)); }
.vzch-row.is-waiting .vzch-row-time { color: #b45309; font-weight: 700; }
.vzch-row.is-waiting .vzch-row-time i { margin-right: .25rem; font-size: .68rem; }
.vzch-row.is-urgent .vzch-row-time { color: #b91c1c; }
.vzch-row-acts { display: flex; flex-wrap: wrap; gap: .45rem; padding: 0 1rem .85rem calc(1rem + 40px + .7rem); }
.vzch-row-acts .btn { min-height: 40px; }
.vzch-wait { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; overflow: hidden; background: color-mix(in srgb, #f59e0b 22%, transparent); }
.vzch-wait-fill { display: block; height: 100%; background: #f59e0b; transform-origin: left center; transition: transform 1s linear; }
.vzch-row.is-urgent .vzch-wait-fill { background: #dc2626; }

/* Avatar: Initialen, Farbe stabil aus dem Namen abgeleitet (c0–c7) */
.vzch-av {
  --av: #1d4ed8;
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: color-mix(in srgb, var(--av) 13%, var(--surface)); color: var(--av);
  font-size: .82rem; font-weight: 800; line-height: 1; letter-spacing: .01em;
  user-select: none;
}
.vzch-av.c0 { --av: #1d4ed8; }
.vzch-av.c1 { --av: #6d28d9; }
.vzch-av.c2 { --av: #be185d; }
.vzch-av.c3 { --av: #9a3412; }
.vzch-av.c4 { --av: #0f766e; }
.vzch-av.c5 { --av: #166534; }
.vzch-av.c6 { --av: #0e7490; }
.vzch-av.c7 { --av: #92400e; }
.vzch-av.is-anon { --av: #4b5563; font-size: .9rem; }

/* ---- Leerzustand rechts (kein Gespräch gewählt) ---- */
.vzch-placeholder {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
  padding: 2rem 1.5rem; text-align: center; color: var(--muted); background: var(--bg);
}
.vzch-ph-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 4rem; height: 4rem; margin-bottom: .45rem; border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 11%, var(--surface)); color: var(--primary); font-size: 1.55rem;
}
.vzch-placeholder[data-presence="offline"] .vzch-ph-ico { background: color-mix(in srgb, var(--text) 7%, var(--surface)); color: var(--muted); }
.vzch-ph-title { margin: 0; color: var(--text); font-size: 1.02rem; font-weight: 700; }
.vzch-ph-text { margin: 0; max-width: 26rem; font-size: .88rem; line-height: 1.5; }
.vzch-placeholder .btn { margin-top: .6rem; min-height: 40px; }

/* ---- Gespräch: Kopf ---- */
.vzch-conv { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.vzch-head {
  flex: none; display: flex; align-items: center; gap: .4rem; min-height: 64px;
  padding: .5rem .7rem .5rem .6rem; border-bottom: 1px solid var(--border); background: var(--surface);
}
.vzch-iconbtn {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 0; border-radius: 10px;
  background: none; color: var(--muted); font-size: 1rem; cursor: pointer; text-decoration: none;
}
.vzch-iconbtn:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); text-decoration: none; }
.vzch-iconbtn[aria-expanded="true"] { background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--text); }
.vzch-back { color: var(--text); }
.vzch-who {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: .65rem;
  margin: 0; padding: .25rem .45rem; border: 0; border-radius: 10px;
  background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.vzch-who:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.vzch-who-txt { min-width: 0; display: flex; flex-direction: column; gap: .08rem; }
.vzch-who-name { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.vzch-who-name strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
.vzch-who-chev { flex: none; font-size: .62rem; color: var(--muted); transition: transform .15s; }
.vzch-who[aria-expanded="true"] .vzch-who-chev { transform: rotate(180deg); }
.vzch-who-sub { display: flex; align-items: center; gap: .4rem; min-width: 0; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.vzch-sub-txt, .vzch-sub-card { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.vzch-sub-card::before { content: "·"; margin-right: .4rem; }
.vzch-pres { flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: #9ca3af; }
.vzch-pres.is-here { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.18); }
.vzch-pres.is-wait { background: #d97706; box-shadow: 0 0 0 3px rgba(217,119,6,.18); }
.vzch-pres.is-chan { background: #0e7490; box-shadow: 0 0 0 3px rgba(14,116,144,.18); }
.vzch-head-acts { flex: none; display: flex; align-items: center; gap: .25rem; }
.vzch-endbtn { min-height: 40px; margin: 0 .2rem; }
.vzch-endbtn > i { color: var(--muted); }

/* Mehr-Menü: seltene und gefährliche Aktionen */
.vzch-more { position: relative; }
.vzch-more-menu {
  position: absolute; right: 0; top: calc(100% + .3rem); z-index: 30;
  min-width: 13rem; padding: .3rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
}
.vzch-more-menu [role="menuitem"] {
  display: flex; align-items: center; gap: .6rem; width: 100%; min-height: 40px;
  padding: .5rem .65rem; border: 0; border-radius: 8px; background: none; color: var(--text);
  font: inherit; font-size: .9rem; text-align: left; text-decoration: none; cursor: pointer;
}
.vzch-more-menu [role="menuitem"] > i { width: 1.1rem; text-align: center; color: var(--muted); }
.vzch-more-menu [role="menuitem"]:hover { background: var(--bg); text-decoration: none; }
.vzch-more-menu .is-danger, .vzch-more-menu .is-danger > i { color: var(--danger); }
.vzch-more-menu .is-danger:hover { background: color-mix(in srgb, var(--danger) 9%, var(--surface)); }
.vzch-more-sep { height: 1px; margin: .3rem .2rem; background: var(--border); }

/* Aufklappbares Infofeld: Kontakt, Karte, Herkunft, Beginn, Status */
.vzch-info {
  flex: none; max-height: 40%; overflow-y: auto;
  padding: .6rem 1rem .75rem; border-bottom: 1px solid var(--border); background: var(--surface);
}
.vzch-info-list { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .3rem 1rem; margin: 0; font-size: .84rem; line-height: 1.45; }
.vzch-info-list dt { color: var(--muted); }
.vzch-info-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---- Verlauf ---- */
.vzch-body { position: relative; flex: 1; min-height: 0; background: var(--bg); }
.vzch-msgs {
  position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column;
  /* unten Platz für die schwebende Tipp-Anzeige — sie verdeckt nie die letzte Blase */
  padding: .6rem 1rem 2.2rem;
}
.vzch-msgs > :first-child { margin-top: auto; }
.vzch-empty { margin: auto; padding: 1rem; color: var(--muted); font-size: .88rem; text-align: center; }
.vzch-day {
  display: flex; align-items: center; gap: .75rem; margin: 1rem 0 .3rem;
  color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .02em;
}
.vzch-day::before, .vzch-day::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.vzch-msg { display: flex; margin-top: .55rem; }
.vzch-msg.has-prev { margin-top: 2px; }
.vzch-msg.is-v { justify-content: flex-start; }
.vzch-msg.is-o { justify-content: flex-end; }
.vzch-msg.is-sys { justify-content: center; margin: .7rem 0 .15rem; }
.vzch-b {
  max-width: min(36rem, 82%); padding: .45rem .7rem .38rem;
  border: 1px solid var(--border); border-radius: 18px;
  background: var(--surface); color: var(--text);
  font-size: .93rem; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word;
}
.vzch-b-txt { white-space: pre-wrap; }
/* Uhrzeit fließt in die letzte Textzeile, wenn Platz ist — sonst darunter */
.vzch-ts { float: right; margin: .3rem 0 -.2rem .6rem; font-size: .66rem; line-height: 1.3; opacity: .7; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vzch-msg.has-next .vzch-ts { display: none; }
.vzch-msg.is-v.has-prev .vzch-b { border-top-left-radius: 6px; }
.vzch-msg.is-v.has-next .vzch-b { border-bottom-left-radius: 6px; }
.vzch-msg.is-o .vzch-b { background: var(--primary); border-color: transparent; color: var(--on-primary); }
.vzch-msg.is-o.has-prev .vzch-b { border-top-right-radius: 6px; }
.vzch-msg.is-o.has-next .vzch-b { border-bottom-right-radius: 6px; }
.vzch-msg.is-pending .vzch-b { opacity: .65; }
/* Zustellstand einer Antwort an einen Kanal: Symbol hinter der Uhrzeit */
.vzch-dl { margin-left: .3rem; font-size: .62rem; }
.vzch-msg.is-failed .vzch-b { outline: 2px solid #dc2626; outline-offset: 1px; }
.vzch-dlnote {
  display: flex; justify-content: flex-end; align-items: center; gap: .4rem; flex-wrap: wrap;
  margin: .25rem 0 0; font-size: .74rem; color: #b91c1c;
}
.vzch-dlretry {
  border: 0; background: none; padding: .15rem .1rem; font: inherit; font-weight: 700;
  color: var(--primary); text-decoration: underline; cursor: pointer; min-height: 32px;
}
.vzch-dlretry:disabled { opacity: .5; cursor: default; }
.vzch-sys {
  max-width: 92%; padding: .28rem .75rem; border-radius: 999px;
  background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--muted);
  font-size: .76rem; line-height: 1.4; text-align: center; overflow-wrap: anywhere;
}

/* Tipp-Anzeige schwebt über dem Verlauf (kein Layoutsprung) */
.vzch-typing {
  position: absolute; left: 1rem; bottom: .45rem; z-index: 2;
  display: inline-flex; align-items: center; gap: .25rem; padding: .28rem .65rem;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  color: var(--muted); font-size: .76rem; box-shadow: 0 2px 8px rgba(0,0,0,.06); pointer-events: none;
}
.vzch-typing-txt { margin-left: .2rem; }
.vzch-dot {
  width: .38rem; height: .38rem; border-radius: 50%; background: currentColor;
  animation: vzch-dot 1.1s infinite ease-in-out;
}
.vzch-dot:nth-child(2) { animation-delay: .18s; }
.vzch-dot:nth-child(3) { animation-delay: .36s; }
@keyframes vzch-dot { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

/* „Neue Nachrichten" — nur wenn man hochgescrollt hat */
.vzch-jump {
  position: absolute; left: 50%; bottom: .55rem; z-index: 3; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .35rem .9rem;
  border: 0; border-radius: 999px; background: var(--primary); color: var(--on-primary);
  font: inherit; font-size: .8rem; font-weight: 700; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,.18); cursor: pointer;
}

/* ---- Eingabe bzw. Hinweisleiste ---- */
.vzch-foot { flex: none; border-top: 1px solid var(--border); background: var(--surface); }
.vzch-comp { padding: .6rem .75rem .4rem; }
.vzch-comp-row { display: flex; align-items: flex-end; gap: .5rem; }
.vzch-comp textarea {
  flex: 1; min-width: 0; min-height: 44px; max-height: 10rem; margin: 0;
  padding: .6rem .95rem; resize: none; border-radius: 22px;
  /* 16px: iOS Safari zoomt sonst beim Fokussieren ins Layout hinein */
  font-size: 16px; line-height: 1.4; background: var(--bg);
}
.vzch-send {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--primary); color: var(--on-primary); font-size: 1rem; cursor: pointer;
  transition: background .15s, opacity .15s;
}
.vzch-send:hover { background: var(--primary-hover); }
.vzch-send:disabled { opacity: .4; cursor: default; }
.vzch-send:disabled:hover { background: var(--primary); }
.vzch-comp-meta { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .22rem .95rem 0; font-size: .7rem; line-height: 1.3; color: var(--muted); }
.vzch-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.vzch-count.is-max { color: var(--danger); font-weight: 700; }

/* ---- Anhänge: Bilder und PDF (docs/live-chat.md, Abschnitt 22) ---- */
.vzch-attach {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 50%;
  background: var(--bg); color: var(--muted); font-size: 1rem; cursor: pointer;
}
.vzch-attach:hover { color: var(--text); border-color: var(--primary); }
.vzch-attach:disabled { opacity: .45; cursor: default; }
.vzch-chip {
  display: flex; align-items: center; gap: .6rem; margin: 0 0 .45rem; padding: .45rem .55rem;
  border: 1px solid var(--border); border-radius: 14px; background: var(--bg); font-size: .82rem; min-width: 0;
}
.vzch-chip-pic { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface); }
.vzch-chip-ico {
  width: 44px; height: 44px; border-radius: 8px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--primary); font-size: 1.25rem;
}
.vzch-chip-txt { flex: 1; min-width: 0; }
.vzch-chip-nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vzch-chip-sub { color: var(--muted); font-size: .74rem; }
.vzch-prog { height: 4px; margin-top: .3rem; border-radius: 2px; background: var(--border); overflow: hidden; }
.vzch-prog span { display: block; width: 0; height: 100%; background: var(--primary); transition: width .15s; }
.vzch-chip-x {
  flex: none; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent;
  color: var(--muted); font-size: .95rem; cursor: pointer;
}
.vzch-chip-x:hover { background: var(--surface); color: var(--text); }
.vzch-chip-x:disabled { opacity: .45; cursor: default; }
.vzch-b.has-att { padding: .3rem; }
.vzch-b.has-att .vzch-b-txt { display: block; padding: .3rem .4rem .1rem; }
.vzch-b.has-att .vzch-ts { margin-right: .35rem; }
.vzch-att {
  display: block; max-width: 100%; margin: 0; padding: 0; border: 0; border-radius: 14px; overflow: hidden;
  background: color-mix(in srgb, var(--text) 8%, transparent); color: inherit; cursor: zoom-in;
}
.vzch-att img { display: block; max-width: 100%; max-height: 280px; height: auto; min-width: 72px; min-height: 56px; object-fit: cover; }
.vzch-att.is-gone { padding: .55rem .75rem; font-size: .8rem; cursor: default; }
.vzch-file {
  display: flex; align-items: center; gap: .55rem; min-width: 12rem; max-width: 100%; padding: .5rem .65rem;
  border: 1px solid currentColor; border-radius: 12px; color: inherit; text-decoration: none; font-size: .84rem;
}
.vzch-file:hover { text-decoration: none; background: color-mix(in srgb, currentColor 8%, transparent); }
.vzch-file .fa-file-pdf { font-size: 1.3rem; flex: none; }
.vzch-file-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vzch-file-nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vzch-file-sz { font-size: .72rem; opacity: .8; }
.vzch-drop {
  position: absolute; inset: .5rem; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .5rem; border: 2px dashed var(--primary); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text); font-weight: 700; pointer-events: none;
}
.vzch-drop[hidden] { display: none; }
.vzch-drop i { font-size: 1.6rem; color: var(--primary); }
.vzch-lbx {
  width: min(96vw, 72rem); max-width: none; height: min(92vh, 60rem); max-height: none; padding: 0; border: 0;
  border-radius: var(--radius); background: #0b0d12; color: #fff;
}
.vzch-lbx[open] { display: flex; flex-direction: column; }
.vzch-lbx::backdrop { background: rgba(8,10,16,.82); }
.vzch-lbx-bar { display: flex; justify-content: flex-end; align-items: center; gap: .5rem; padding: .5rem; }
.vzch-lbx-bar form { margin: 0; }
.vzch-lbx-x {
  width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255,255,255,.14); color: #fff;
  font-size: 1.1rem; cursor: pointer;
}
.vzch-lbx-x:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.vzch-lbx img { flex: 1; min-height: 0; width: 100%; object-fit: contain; padding: 0 .75rem .75rem; }
.vzch-lock { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1rem; padding: .75rem 1rem; }
.vzch-lock-txt { flex: 1 1 14rem; display: flex; align-items: center; gap: .55rem; min-width: 0; margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.4; }
.vzch-lock-txt > i { flex: none; }
.vzch-lock.is-waiting { background: color-mix(in srgb, #f59e0b 9%, var(--surface)); }
.vzch-lock.is-waiting .vzch-lock-txt { color: var(--text); }
.vzch-lock.is-waiting .vzch-lock-txt > i { color: #d97706; }
.vzch-lock-acts { display: flex; flex-wrap: wrap; gap: .45rem; }
.vzch-lock-acts .btn { min-height: 40px; }

/* ---- Löschen bestätigen ---- */
.vzch-dlg {
  width: min(92vw, 26rem); padding: 0; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.28);
}
.vzch-dlg::backdrop { background: rgba(15,17,22,.55); }
.vzch-dlg form { margin: 0; padding: 1.2rem 1.3rem 1.1rem; }
.vzch-dlg h2 { margin: 0 0 .45rem; font-size: 1.12rem; }
.vzch-dlg p { margin: 0 0 1.1rem; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.vzch-dlg-acts { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; }
.vzch-dlg-acts .btn { min-height: 42px; }

/* Sichtbarer Fokus überall in der Nachrichtenzentrale */
:is(.vzch, .vzch-top, .vzch-beta, .vzch-dlg) :is(button, a, [tabindex]):focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
/* Eingabe: Rahmen + weicher Ring statt doppelter Kontur */
.vzch-comp textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
.vzch :is(.vzch-row-main, .vzch-msgs, [role="menuitem"]):focus-visible { outline-offset: -2px; }

/* ---- Kurzmeldung (unten eingeblendet) ---- */
.vzch-flash {
  position: fixed; left: 50%; bottom: 1.1rem; z-index: 1200;
  max-width: min(92vw, 26rem); padding: .6rem .9rem;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text);
  font-size: .88rem; line-height: 1.4; box-shadow: var(--shadow);
  transform: translate(-50%, 1.6rem); opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.vzch-flash.is-on { opacity: 1; transform: translate(-50%, 0); }
.vzch-flash.is-err { border-color: var(--danger); }
.vzch-flash.is-ok { border-color: var(--success); }

/* ---- Profil-Reiter „Live-Chat": drei Status-Karten nebeneinander ---- */
.pf-lang-opts.pf-chat-opts { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 46rem; }

@media (max-width: 600px) {
  .pf-lang-opts.pf-chat-opts { grid-template-columns: minmax(0, 1fr); }
}

@media (hover: none), (pointer: coarse) {
  /* Tastenkürzel-Hinweis nur mit echter Tastatur */
  .vzch-comp-hint { display: none; }
}

@media (max-width: 760px) {
  /* Kompakte Pille in der engen mobilen Kopfleiste — min-width hält das
     Tap-Ziel bei 40 px, auch wenn nur noch der Punkt zu sehen ist */
  .vzch-pill { min-width: 40px; padding: .35rem .5rem; justify-content: center; }
  .vzch-pill-label { display: none; }
  .vzch-h1 { font-size: 1.4rem; }
  .vzch-top { margin-bottom: .75rem; }
  .vzch-beta { font-size: .8rem; }
  /* Mindestschrift 12 px am Handy: Uhrzeit in der Blase und Tagestrenner */
  .vzch-ts, .vzch-day { font-size: .75rem; }
  /* Enger Kopf: Karte steht im Infofeld (Tipp auf den Namen), Tastenhinweis entfällt */
  .vzch-sub-card, .vzch-comp-hint { display: none; }

  /* Gespräch als Vollbild über der Seite; Höhe/Versatz folgen der Bildschirmtastatur */
  .vzch.is-open .vzch-pane {
    position: fixed; left: 0; right: 0; top: var(--vzch-vvt, 0px); z-index: 1000;
    height: var(--vzch-vvh, 100dvh);
  }
  .vzch-head { min-height: 58px; padding: calc(.35rem + env(safe-area-inset-top)) .4rem .35rem .25rem; gap: .15rem; }
  .vzch-who { padding: .2rem .3rem; gap: .55rem; }
  .vzch-av { width: 38px; height: 38px; }
  .vzch-endbtn { padding: .4rem .6rem; margin: 0; }
  .vzch-msgs { padding-left: .7rem; padding-right: .7rem; }
  .vzch-b { max-width: 86%; }
  .vzch-foot { padding-bottom: env(safe-area-inset-bottom); }
  .vzch-comp { padding: .5rem .6rem .45rem; }
  .vzch-comp textarea { max-height: 7.5rem; }
  .vzch-lock { padding: .7rem .75rem; }
  .vzch-lock-acts { width: 100%; }
  .vzch-lock-acts .btn { flex: 1; }
  .vzch-dlg-acts .btn { flex: 1; }
  .vzch-row-acts .btn { flex: 1; }
  html.vzch-sheet, html.vzch-sheet body { overflow: hidden; }
  /* Schwebende Knöpfe anderer Bausteine lägen sonst auf Eingabe und Senden */
  html.vzch-sheet #vc-support, html.vzch-sheet .vc-sup-panel,
  html.vzch-sheet body > a[data-cc="show-preferencesModal"] { display: none; }
  html.vzch-sheet .vzch-flash { bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
}

/* Niedrige Fenster bis 999 px (Handy quer): Gespräch ebenfalls als Vollbild — im Rahmen läge die
   Eingabe unterhalb des Fensters bzw. unter der Tastatur. Ab 1000 px stehen Liste und Gespräch
   nebeneinander (ohne Zurück-Knopf), dort bleibt der Rahmen. Abfrage gleich mqSheet in chat-owner.js. */
@media (min-width: 761px) and (max-width: 999px) and (max-height: 520px) {
  .vzch.is-open .vzch-pane {
    position: fixed; left: 0; right: 0; top: var(--vzch-vvt, 0px); z-index: 1000;
    height: var(--vzch-vvh, 100dvh);
  }
  .vzch-comp-hint { display: none; }
  html.vzch-sheet, html.vzch-sheet body { overflow: hidden; }
  html.vzch-sheet #vc-support, html.vzch-sheet .vc-sup-panel,
  html.vzch-sheet body > a[data-cc="show-preferencesModal"] { display: none; }
}

@media (min-width: 761px) {
  /* Rahmen füllt die Höhe (Wert setzt chat-owner.js), Spalten scrollen innen */
  .vzch { height: var(--vzch-h, calc(100dvh - 16rem)); min-height: 340px; grid-template-rows: minmax(0, 1fr); }
  .vzch-scroll { overflow-y: auto; overscroll-behavior: contain; }
  .vzch.is-open .vzch-list { display: none; }
}

@media (max-width: 999px) {
  /* Kontakt steht im Infofeld — der Kopf bleibt für Name und Aktionen frei */
  .vzch-contact { display: none; }
}

@media (min-width: 1000px) {
  /* Zwei Spalten: Liste links, Gespräch rechts */
  .vzch { grid-template-columns: 17.5rem minmax(0, 1fr); }
  .vzch-list, .vzch.is-open .vzch-list { display: flex; border-right: 1px solid var(--border); }
  .vzch:not(.is-open) .vzch-pane { display: flex; }
  .vzch-back { display: none; }
  .vzch-head { padding-left: .8rem; }
}

@media (min-width: 1200px) {
  .vzch { grid-template-columns: 20rem minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .vzch-dot { animation: none; opacity: .6; }
  .vzch-flash, .vzch-wait-fill, .vzch-who-chev, .vzch-send, .vzch-tool { transition: none; }
  .vzch-pill-dot.is-pulse, .vzch-nav-dot.is-pulse, .vzch-sec.is-waiting .vzch-sec-t::before { animation: none; }
}

@media (max-width: 380px) {
  /* Sehr schmale Handys: nur noch der farbige Punkt, die Beschriftung entfällt */
  .vzch-nav-live [data-vzch-live-label] { display: none; }
  .vzch-endbtn { padding: .35rem .5rem; font-size: .8rem; gap: .35rem; }
}

/* [hidden] schlägt keine display-Regel mit gleicher Spezifität — deshalb hier
   ausdrücklich abschalten (sonst blieben Gesprächsbereich, Eingabe, Tipp-Anzeige
   und der Zähler im Menü trotz el.hidden sichtbar). */
:is(.vzch, .vzch-top) [hidden], .vzch-beta[hidden], .badge-count[hidden] { display: none !important; }

/* ---- Dunkelmodus: nur die wenigen fest kodierten Stellen ---- */
:root[data-theme="dark"] .vzch-pill-dot.is-online { box-shadow: 0 0 0 3px rgba(22,163,74,.35); }
:root[data-theme="dark"] .vzch-menu button:hover { background: #232833; }
:root[data-theme="dark"] .vzch-beta > i { color: #fbbf24; }
:root[data-theme="dark"] .vzch-sec.is-waiting .vzch-sec-h { color: #fbbf24; }
:root[data-theme="dark"] .vzch-sec-note { background: color-mix(in srgb, #f59e0b 14%, var(--surface)); color: #fcd34d; }
:root[data-theme="dark"] .vzch-cap.is-full { color: #fbbf24; }
:root[data-theme="dark"] .vzch-row-main:hover { background: #1e222b; }
:root[data-theme="dark"] .vzch-row.is-waiting { background: color-mix(in srgb, #f59e0b 8%, var(--surface)); }
:root[data-theme="dark"] .vzch-row.is-waiting.is-sel { background: color-mix(in srgb, var(--primary) 11%, var(--surface)); }
:root[data-theme="dark"] .vzch-row.is-waiting .vzch-row-time { color: #fbbf24; }
:root[data-theme="dark"] .vzch-row.is-urgent .vzch-row-time,
:root[data-theme="dark"] .vzch-row-st.is-missed { color: #fca5a5; }
:root[data-theme="dark"] .vzch-av { background: color-mix(in srgb, var(--av) 18%, var(--surface)); }
:root[data-theme="dark"] .vzch-av.c0 { --av: #93c5fd; }
:root[data-theme="dark"] .vzch-av.c1 { --av: #c4b5fd; }
:root[data-theme="dark"] .vzch-av.c2 { --av: #f9a8d4; }
:root[data-theme="dark"] .vzch-av.c3 { --av: #fdba74; }
:root[data-theme="dark"] .vzch-av.c4 { --av: #5eead4; }
:root[data-theme="dark"] .vzch-av.c5 { --av: #86efac; }
:root[data-theme="dark"] .vzch-av.c6 { --av: #67e8f9; }
:root[data-theme="dark"] .vzch-av.c7 { --av: #fcd34d; }
:root[data-theme="dark"] .vzch-av.is-anon { --av: #9ca3af; }
:root[data-theme="dark"] .vzch-pres.is-here { background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.2); }
:root[data-theme="dark"] .vzch-pres.is-chan { background: #22d3ee; box-shadow: 0 0 0 3px rgba(34,211,238,.2); }
:root[data-theme="dark"] .vzch-row-chan,
:root[data-theme="dark"] .vzch-sec.is-channels .vzch-sec-h { color: #67e8f9; }
:root[data-theme="dark"] .vzch-dlnote { color: #fca5a5; }
:root[data-theme="dark"] .vzch-msg.is-failed .vzch-b { outline-color: #f87171; }
:root[data-theme="dark"] .vzch-more-menu { box-shadow: 0 12px 32px rgba(0,0,0,.5); }
:root[data-theme="dark"] .vzch-more-menu [role="menuitem"]:hover { background: #232833; }
:root[data-theme="dark"] .vzch-more-menu .is-danger:hover { background: #2a1416; }
/* Eigene Blasen: kräftiges Blau mit weißer Schrift statt der hellen Primärfarbe (blendet weniger) */
:root[data-theme="dark"] .vzch-msg.is-o .vzch-b { background: #2563eb; color: #fff; }
:root[data-theme="dark"] .vzch-comp textarea { background: #12151b; }
:root[data-theme="dark"] .vzch-lock.is-waiting { background: color-mix(in srgb, #f59e0b 8%, var(--surface)); }
:root[data-theme="dark"] .vzch-lock.is-waiting .vzch-lock-txt > i { color: #fbbf24; }
:root[data-theme="dark"] .vzch-typing { box-shadow: 0 2px 8px rgba(0,0,0,.4); }
/* Status-Chip: hellere Farbwerte, damit er auf dunklem Grund lesbar bleibt */
:root[data-theme="dark"] .vzch-nav-live[data-state="online"]  { color: #4ade80; border-color: rgba(74,222,128,.4); }
:root[data-theme="dark"] .vzch-nav-live[data-state="online"]  .vzch-nav-dot { background: #4ade80; }
:root[data-theme="dark"] .vzch-nav-live[data-state="away"]    { color: #fbbf24; border-color: rgba(251,191,36,.4); }
:root[data-theme="dark"] .vzch-nav-live[data-state="away"]    .vzch-nav-dot { background: #fbbf24; }
:root[data-theme="dark"] .vzch-nav-live[data-state="offline"] { color: #9ca3af; }

/* =====================================================================
   Nachrichtenzentrale — gemeinsamer Eingang (Chats + Kontaktanfragen)
   docs/kontaktanfragen.md. Anfrage-Zeilen nutzen die vzch-row-Bausteine;
   die geöffnete Anfrage (_lead_detail.php) scrollt im rechten Bereich.
   ===================================================================== */
.vzch-view {
  flex: none; display: flex; gap: .25rem; padding: .5rem .6rem;
  border-bottom: 1px solid var(--border); background: var(--surface);
}
.vzch-view button {
  flex: 1 1 0; min-width: 0; min-height: 36px; padding: .3rem .5rem; border: 0; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  background: none; color: var(--muted); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.vzch-view button:hover { background: color-mix(in srgb, var(--text) 5%, transparent); color: var(--text); }
.vzch-view button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.vzch-view button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.vzch-view .badge-beta { margin-left: 0; font-size: .75rem; }
/* Tippziel ≥ 24 px (WCAG 2.5.8) */
.vzch-sec-act {
  margin-left: auto; min-height: 24px; padding: 0 .3rem; border: 0; background: none; color: var(--primary);
  font: inherit; font-size: .75rem; font-weight: 600; cursor: pointer; text-transform: none; letter-spacing: 0;
}
.vzch-sec-act:hover { text-decoration: underline; }
.vzch-sec-act:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.vzch-leads-more {
  display: flex; align-items: center; gap: .45rem; margin: .4rem .9rem .8rem; padding: .55rem .7rem;
  border: 1px dashed var(--border); border-radius: 10px; color: var(--primary); font-size: .85rem; font-weight: 600;
  text-decoration: none;
}
.vzch-leads-more:hover { background: color-mix(in srgb, var(--primary) 6%, transparent); text-decoration: none; }
.vzch-leads-more[hidden] { display: none; }
.vzch-row-new { flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: var(--primary); }
.vzch-row-new[hidden] { display: none; }
.vzch-row-remind { color: #b45309; }
.vzch-row-st.is-lead-new { color: #15803d; }
.vzch-row-st.is-lead-contacted { color: var(--primary); }
.vzch-lead { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; background: var(--surface); }
.vzch-lead[aria-busy="true"] { opacity: .55; }
.vzch-lead .vzld-detail { max-width: 52rem; }
.vzch-lead-gone { margin: 2rem 1.2rem; color: var(--muted); }
.vzld-crumb { margin: 0 0 .4rem; font-size: .88rem; }
.vzld-crumb a { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; }
:root[data-theme="dark"] .vzch-row-remind { color: #fbbf24; }
/* Reservierungsanfragen im Eingang (docs/tischreservierung.md, Nachtrag Eingang) */
.vzch-sec.is-resv .vzch-sec-h { color: #7c3aed; }
.vzch-row.is-resv a.vzch-row-main { text-decoration: none; }
.vzch-av.is-resv { --av: #7c3aed; font-size: 1rem; }
.vzch-row-chan.is-resv { color: #7c3aed; }
.vzch-resv-no { display: grid; gap: .4rem; padding: 0 1rem .85rem calc(1rem + 40px + .7rem); }
.vzch-resv-no[hidden] { display: none; }
.vzch-resv-no input { width: 100%; min-height: 40px; }
.vzch-resv-no-acts { display: flex; flex-wrap: wrap; gap: .45rem; }
.vzch-resv-no-acts .btn { min-height: 40px; }
.vzch-resv-more { margin-top: 0; }
@media (max-width: 760px) {
  .vzch-resv-no { padding-left: 1rem; }
}
:root[data-theme="dark"] .vzch-sec.is-resv .vzch-sec-h,
:root[data-theme="dark"] .vzch-row-chan.is-resv { color: #c4b5fd; }

:root[data-theme="dark"] .vzch-row-st.is-lead-new { color: #6ee7b7; }

/* =====================================================================
   Nachrichtenzentrale — Reiter „Kontaktanfragen" (Präfix vzld-, vzin-)
   docs/kontaktanfragen.md. Serverseitig gerendert: links Suche, Filter und
   Liste, rechts die geöffnete Anfrage. Ab 1000 px zwei Spalten (die Liste
   scrollt innen und klebt), darunter Liste ODER Anfrage (.has-open).
   Avatar, Platzhalter-Symbol und .vzch-sr kommen aus dem Chat-Block.
   ===================================================================== */
.vzin-tabs { margin: 0 0 .9rem; }
/* Zwei Reiter: nie wischen — lieber „Kontaktanfragen" kürzen, Zähler bleiben sichtbar */
.vzin-tabs a:last-child { flex: 0 1 auto; min-width: 0; }
.vzin-tabs a:last-child > span:first-of-type { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.vzin-tabs .tab-count, .vzin-tabs .badge-beta, .vzin-tabs .vzin-lock { flex: none; }
@media (max-width: 440px) {
  .vzin-tabs { gap: .25rem; }
  .vzin-tabs a { padding-inline: .6rem; gap: .35rem; }
  .vzin-tabs a > i.fa-solid:first-child { display: none; } /* Symbole sind aria-hidden */
  .vzin-tabs .badge-beta { margin-left: 0; }
}
.vzin-tabs .vzin-lock { font-size: .72rem; opacity: .7; }
.vzld-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1rem; margin: 0 0 .9rem; }
.vzld-top h1 { margin: 0; font-size: 1.55rem; letter-spacing: -.01em; }

.vzld-new {
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .8rem; margin: 0 0 .9rem;
  padding: .6rem .8rem; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  background: color-mix(in srgb, var(--primary) 8%, var(--surface)); color: var(--text); font-weight: 600;
}
.vzld-new[hidden] { display: none; }
.vzld-new > i { color: var(--primary); }
.vzld-new .btn { margin-left: auto; }

.vzld-fair h2 { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin: 0 0 .3rem; font-size: 1.05rem; }
.vzld-fair h2 > i { color: #0f766e; }
.vzld-fair-tiles { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .6rem; }
.vzld-fair-tiles > div { flex: 1 1 130px; padding: .65rem .8rem; border-radius: 12px; background: var(--bg); }
.vzld-fair-tiles strong { display: block; font-size: 1.45rem; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }

.vzld {
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: start;
  background: var(--surface); border: 1px solid var(--border);
  /* clip statt hidden: hidden machte den Rahmen zum Scroll-Container, dann klebte die Liste nicht */
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; overflow: clip;
}
.vzld-list, .vzld-pane { min-width: 0; }
.vzld-pane { background: var(--surface); }

/* Suche + Filter */
.vzld-filter { display: grid; gap: .55rem; padding: .8rem; border-bottom: 1px solid var(--border); }
.vzld-search { position: relative; }
.vzld-search > i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; pointer-events: none; }
.vzld-search input { width: 100%; min-height: 42px; padding-left: 2.1rem; }
.vzld-more > summary {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: .2rem .1rem;
  color: var(--muted); font-size: .88rem; font-weight: 600; cursor: pointer; list-style: none;
}
.vzld-more > summary::-webkit-details-marker { display: none; }
.vzld-more[open] > summary { color: var(--text); }
.vzld-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem .6rem; padding-top: .35rem; }
.vzld-fields label, .vzld-crm-grid label { display: grid; gap: .25rem; min-width: 0; font-size: .82rem; color: var(--muted); font-weight: 600; }
.vzld-fields select, .vzld-crm-grid select, .vzld-crm-grid input, .vzld-crm-grid textarea { width: 100%; }
.vzld-fields .vzld-check { display: flex; align-items: center; gap: .45rem; align-self: end; min-height: 42px; color: var(--text); font-weight: 500; }
.vzld-fields .vzld-check input { width: auto; margin: 0; }
.vzld-filter-acts { display: flex; flex-wrap: wrap; gap: .5rem; }
.vzld-count {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .2rem .8rem;
  padding: .55rem .9rem; border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.vzld-count p, .vzld-count form { margin: 0; }
.vzld-linkbtn {
  min-height: 32px; padding: 0; border: 0; background: none; color: var(--primary);
  font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer;
}
.vzld-linkbtn:hover { text-decoration: underline; }
.vzld-linkbtn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
#vzld-d-name:focus { outline: none; }
#vzld-d-name:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

/* Liste */
.vzld-rows { list-style: none; margin: 0; padding: 0; }
.vzld-rows > li { border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.vzld-row {
  position: relative; display: flex; align-items: flex-start; gap: .7rem;
  padding: .75rem .9rem; color: var(--text); text-decoration: none;
}
.vzld-row:hover { background: color-mix(in srgb, var(--text) 4%, transparent); text-decoration: none; }
.vzld-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.vzld-row.is-sel { background: color-mix(in srgb, var(--primary) 9%, var(--surface)); }
.vzld-row.is-sel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary); }
.vzld-row-txt { flex: 1; min-width: 0; display: grid; gap: .18rem; }
.vzld-row-l1 { display: flex; align-items: baseline; gap: .5rem; min-width: 0; }
.vzld-row-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.vzld-row.is-unread .vzld-row-name { font-weight: 800; }
.vzld-row-time { flex: none; color: var(--muted); font-size: .76rem; white-space: nowrap; }
.vzld-row.is-unread .vzld-row-time { color: var(--primary); font-weight: 700; }
.vzld-row-prev { color: var(--muted); font-size: .86rem; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.vzld-row.is-unread .vzld-row-prev { color: var(--text); }
.vzld-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .5rem; font-size: .76rem; color: var(--muted); }
.vzld-row-meta .badge { font-size: .68rem; padding: .08rem .45rem; }
.vzld-origin { display: inline-flex; width: 1rem; justify-content: center; }
.vzld-row-card { min-width: 0; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vzld-remind { color: #b45309; }
.vzld-dot { width: .55rem; height: .55rem; margin-left: auto; border-radius: 50%; background: var(--primary); }
.vzld-empty { display: grid; justify-items: center; gap: .2rem; padding: 2rem 1.2rem; text-align: center; }
.vzld-empty p { margin: 0; max-width: 26rem; }
.vzld-empty-ico { font-size: 1.8rem; color: var(--muted); margin-bottom: .3rem; }
.vzld-pager { display: flex; justify-content: space-between; gap: .5rem; padding: .7rem .9rem; }

/* Rechts: Platzhalter + Anfrage */
.vzld-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
  min-height: 22rem; padding: 2rem 1.5rem; text-align: center; color: var(--muted); background: var(--bg);
}
.vzld-placeholder p { margin: 0; max-width: 28rem; }
.vzld-placeholder .vzld-back { align-self: flex-start; }
.vzld-detail { display: grid; gap: 1rem; padding: 1rem 1.1rem 1.2rem; }
.vzld-back { display: none; align-items: center; gap: .4rem; min-height: 40px; font-weight: 600; }
.vzld-dhead { display: flex; align-items: flex-start; gap: .8rem; }
.vzld-dhead .vzch-av { width: 48px; height: 48px; font-size: .95rem; }
.vzld-dhead-txt { min-width: 0; }
.vzld-dhead h2 { margin: 0; font-size: 1.25rem; overflow-wrap: anywhere; }
.vzld-dhead p { margin: .2rem 0 0; }
.vzld-badges { display: flex; flex-wrap: wrap; gap: .35rem; }
.vzld-reply { display: flex; flex-wrap: wrap; gap: .5rem; }
.vzld-reply .btn { min-height: 40px; display: inline-flex; align-items: center; gap: .45rem; }
.vzld-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .55rem 1.2rem; margin: 0; font-size: .9rem; }
.vzld-facts > div { min-width: 0; }
.vzld-facts dt { color: var(--muted); font-size: .76rem; font-weight: 600; }
.vzld-facts dd { margin: .1rem 0 0; overflow-wrap: anywhere; }
.vzld-msg {
  max-height: 28rem; overflow: auto; padding: .75rem .9rem; border-radius: 12px;
  background: var(--bg); border: 1px solid var(--border);
  font-size: .92rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere;
}
.vzld-msg:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.vzld-crm { display: grid; gap: .6rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.vzld-crm h3 { margin: 0; font-size: 1rem; }
.vzld-crm p { margin: 0; }
.vzld-crm .btn { justify-self: start; }
.vzld-crm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .6rem .8rem; }
.vzld-crm-note { grid-column: 1 / -1; }
.vzld-crm-grid textarea { resize: vertical; min-height: 4.5rem; }
.vzld-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding-top: .8rem; border-top: 1px solid var(--border); }
.vzld-foot form { margin: 0; }
.vzld .btn > i { margin-right: .15rem; }

/* Unter 1000 px: Liste ODER Anfrage — die Adresse (?lead=) entscheidet */
@media (max-width: 999px) {
  .vzld.has-open .vzld-list { display: none; }
  .vzld:not(.has-open) .vzld-pane { display: none; }
  .vzld-back { display: inline-flex; }
}
/* Ab 1000 px: zwei Spalten, die Liste klebt und scrollt innen */
@media (min-width: 1000px) {
  .vzld { grid-template-columns: 22rem minmax(0, 1fr); }
  .vzld-list {
    /* unter der klebenden Kopfleiste (76 px + Rand). KEIN overscroll-behavior:contain —
       die Liste beginnt unter Kopf und Reitern und ragt anfangs über den Fensterrand;
       nur das weitergereichte Scrollen holt letzte Zeile und Blätter-Knöpfe ins Bild. */
    position: sticky; top: 88px; max-height: calc(100vh - 100px); overflow: auto;
  }
  /* Trennlinie am rechten Bereich: der füllt die ganze Zeile, die Liste nur ihren Inhalt */
  .vzld-pane { min-height: 100%; border-left: 1px solid var(--border); }
}
@media (min-width: 1200px) { .vzld { grid-template-columns: 24rem minmax(0, 1fr); } }

/* Dunkel: Flächen über die Tokens; nur die Erinnerungsfarbe braucht ein Gegenstück */
:root[data-theme="dark"] .vzld-remind { color: #fbbf24; }
:root[data-theme="dark"] .vzld-fair h2 > i { color: #5eead4; }

/* =====================================================================
   Abbruch-Umfrage (Präfix .xi-)
   Fenster an den Abbruch-Stellen — Preis-, Vergleichs- und Produktseiten,
   Registrierung, Tarifauswahl, Warenkorb (ExitSurveyService::contextForPath;
   src/Views/layouts/_exit_intent.php, public/assets/js/exit-intent.js).
   Drei Schritte in EINEM Markup — Grund, Angebot, Code —, umgeschaltet über
   das hidden-Attribut. Ab 900 px ein zentrierter Dialog, darunter ein echtes
   Bottom-Sheet mit Griff.

   Bewusst NICHT .modal-overlay: Der globale ESC-Handler in app.js:69-73
   schließt alle offenen .modal-overlay mit — und bewusst keine .lp-*-Variablen,
   die sind auf .lp definiert und außerhalb der Landing undefiniert. Hier gelten
   nur die Theme-Tokens von :root (Dark-Tönungen am Ende des Abschnitts; im
   landing-Layout steht kein data-theme, dort ist immer hell).
   ===================================================================== */
html.xi-lock, html.xi-lock body { overflow: hidden; }
/* Offenes Fenster: den festen Link „Cookie-Einstellungen" (layouts/_consent.php,
   position:fixed unten links) ausblenden — er läge sonst über den Knöpfen. */
html.xi-lock a[data-cc="show-preferencesModal"] { display: none !important; }

.xi-overlay {
  /* z-index 1250 — hergeleitet, nicht geraten:
       890   Support-Knopf (_support.php), ~899 Zammad-Chatfenster
       1000  .modal-overlay (app.css) und die Chat-Leiste
       1100  Vergleichs-Overlay .pp-overlay
       1200  Chat-Kurzmeldung .vzch-flash
     → 1250 liegt über allem davon. Nach oben ist Schluss beim Einwilligungs-
       Layer: fester Link 2147483000, vanilla-cookieconsent 2147483647. Die
       Einwilligung muss IMMER obenauf liegen — ein Fenster, das das Banner
       verdeckt, wäre ein Dark Pattern und rechtlich angreifbar. */
  position: fixed; inset: 0; z-index: 1250;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 17, 22, .6);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.xi-overlay[hidden] { display: none; }
/* Schritte, Zeilen und Meldungen werden über [hidden] geschaltet — das darf
   keine eigene display-Regel überstimmen. */
.xi-overlay [hidden] { display: none !important; }
.xi-overlay :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.xi-panel {
  position: relative; display: flex; flex-direction: column;
  width: 100%; max-width: 32rem; max-height: calc(100vh - 3rem);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45);
  animation: xi-in .2s ease-out;
}
@supports (height: 100dvh) { .xi-panel { max-height: calc(100dvh - 3rem); } }
@keyframes xi-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes xi-up { from { opacity: .6; transform: translateY(40px); } to { opacity: 1; transform: none; } }

/* Kopfzeile: mobil der Ziehgriff, immer das Schließen-Kreuz */
.xi-grab { position: relative; flex: none; min-height: 48px; }
.xi-close {
  position: absolute; top: .45rem; right: .45rem;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
}
.xi-close:hover { background: var(--bg); color: var(--text); }
.xi-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.xi-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; padding: 0 1.4rem 1.4rem;
}
.xi-title { margin: 0 0 .35rem; font-size: 1.24rem; line-height: 1.3; letter-spacing: -.02em; text-wrap: balance; }
.xi-title:focus, .xi-title:focus-visible { outline: none; }
.xi-sub { margin: 0 0 1rem; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.xi-note { margin: 0 0 .7rem; font-size: .9rem; line-height: 1.5; }
.xi-hint { margin: .45rem 0 0; font-size: .8rem; line-height: 1.45; color: var(--muted); }
.xi-hint a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.xi-num { font-variant-numeric: tabular-nums; }
.xi-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Schritt 1: die sechs Gründe als große Auswahlflächen ---- */
.xi-reasons { display: grid; gap: .5rem; margin: 0 0 1rem; padding: 0; border: 0; }
.xi-reason {
  position: relative; display: flex; align-items: center; gap: .7rem;
  min-height: 48px; margin: 0; padding: .55rem .9rem;
  border: 1px solid var(--border); border-radius: 12px; cursor: pointer;
  background: var(--surface); color: var(--text);
  font-size: .95rem; font-weight: 500; line-height: 1.35;
}
.xi-reason:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); }
.xi-reason:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.xi-reason input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; opacity: 0; pointer-events: none;
}
.xi-mark {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--surface);
}
.xi-reason input:checked ~ .xi-mark {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 10px var(--primary);
}
.xi-reason input:checked ~ .xi-reason-t { font-weight: 700; }
/* Ausgewählte Fläche zusätzlich hervorheben. :has() fehlt → nur der Punkt
   markiert die Wahl, die Bedienung bleibt vollständig. */
.xi-reason:has(input:checked) {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 7%, var(--surface));
}
/* Freitext erst nach der Wahl eines Grundes — das Fenster startet kurz und
   wirkt nicht wie ein Formular. Ohne :has()-Unterstützung ist die ganze Regel
   ungültig und das Feld steht von Anfang an da. */
[data-xi-form]:not(:has(input[name="reason"]:checked)) .xi-field { display: none; }

.xi-field { margin: 0 0 .2rem; }
.xi-label { display: block; margin: 0 0 .35rem; font-size: .88rem; font-weight: 600; }
/* 16px verhindert den iOS-Auto-Zoom beim Fokus (Mobile-First) */
.xi-overlay textarea,
.xi-overlay input[type="text"],
.xi-overlay input[type="email"] {
  width: 100%; max-width: 100%; font-size: 16px; font-family: inherit; line-height: 1.45;
  padding: .6rem .7rem; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text);
}
.xi-overlay textarea { min-height: 5rem; resize: vertical; }

/* ---- Knöpfe: „Nein danke" ist gleich groß und gleich sichtbar ---- */
.xi-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 0; }
.xi-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; padding: .6rem 1.15rem; border-radius: 11px; cursor: pointer;
  border: 1px solid transparent; background: var(--primary); color: var(--on-primary);
  font: inherit; font-size: .95rem; font-weight: 600; text-decoration: none;
}
.xi-btn:hover { background: var(--primary-hover); text-decoration: none; }
.xi-btn.is-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.xi-btn.is-ghost:hover { background: var(--bg); }
.xi-btn[disabled] { opacity: .6; cursor: progress; }

/* ---- Schritt 2: die beiden Wege ---- */
.xi-ways { display: grid; gap: .35rem; margin: 0 0 .8rem; padding-left: 1.2rem; font-size: .92rem; line-height: 1.5; }

/* ---- Schritt 3: der Code ---- */
.xi-codebox {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem;
  margin: 0 0 .7rem; padding: .85rem 1rem;
  border: 1px dashed color-mix(in srgb, var(--primary) 45%, var(--border)); border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
}
.xi-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1.2rem, 6vw, 1.55rem); font-weight: 700; letter-spacing: .1em;
  word-break: break-all; user-select: all; -webkit-user-select: all;
}
.xi-copy { min-height: 44px; padding-inline: .9rem; font-size: .88rem; }
.xi-mailform { margin: 1.2rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--border); }
.xi-check {
  display: flex; align-items: flex-start; gap: .6rem; min-height: 44px; margin: .2rem 0 0;
  font-size: .9rem; font-weight: 500; line-height: 1.4; cursor: pointer;
}
.xi-check input[type="checkbox"] { flex: none; width: 20px; height: 20px; margin: .2rem 0 0; accent-color: var(--primary); }

/* ---- Freiwilliger Kontaktweg („Sollen wir dir antworten?") ----
   Abgesetzt wie das Mail-Formular: eine Trennlinie und etwas Luft. Er ist ein
   Angebot, kein Schritt — deshalb kleinere Überschrift, gedeckter Knopf
   (.is-ghost im Markup) und kein eigener Rahmen, der ihn wie ein Formular
   wirken ließe, das noch auszufüllen wäre. */
.xi-contact { margin: 1.2rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--border); }
.xi-h3 { margin: 0 0 .35rem; font-size: 1rem; font-weight: 700; line-height: 1.35; }
.xi-contactform .xi-field + .xi-field { margin-top: .6rem; }
.xi-contactform .xi-check { margin-top: .7rem; }

/* ---- Anschluss je Grund (Danke-Schritt, data-xi-follow) ----
   Ein kurzer Absatz, bei „zu kompliziert" ein Knopf, bei „unsicher" eine
   knappe Liste von Belegen. Bewusst ohne Rahmen und Farbe: Das ist eine
   Antwort auf den Grund, keine Werbefläche. */
.xi-follow .xi-actions { margin-top: .2rem; }
.xi-facts { display: grid; gap: .45rem; margin: 0 0 .6rem; padding-left: 1.2rem; font-size: .9rem; line-height: 1.5; }
.xi-facts a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.xi-msg { margin: .8rem 0 0; padding: .55rem .75rem; border-radius: 10px; font-size: .88rem; line-height: 1.45; }
.xi-msg.is-ok { background: color-mix(in srgb, var(--success) 12%, var(--surface)); color: var(--success); }
.xi-msg.is-err { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }

/* ---- Mobil: echtes Bottom-Sheet mit Griff ---- */
@media (max-width: 899.98px) {
  .xi-overlay { align-items: flex-end; padding: 0; }
  .xi-panel {
    max-width: none; max-height: calc(100vh - 12px);
    border-width: 0; border-radius: 20px 20px 0 0;
    animation: xi-up .26s cubic-bezier(.2, .8, .2, 1); transition: transform .2s ease;
  }
  .xi-grab { min-height: 52px; } /* nicht ziehbar: schließt nur über Kreuz/Knopf/ESC */
  .xi-close { top: .7rem; right: .5rem; }
  .xi-body { padding: 0 1rem calc(1.2rem + env(safe-area-inset-bottom)); }
  .xi-title { font-size: 1.12rem; }
  .xi-actions .xi-btn { flex: 1 1 12rem; }
}
@supports (height: 100dvh) {
  @media (max-width: 899.98px) { .xi-panel { max-height: calc(100dvh - 12px); } }
}
@media (max-width: 380px) {
  .xi-body { padding-inline: .85rem; }
  .xi-reason { padding-inline: .7rem; font-size: .92rem; }
  .xi-codebox { padding: .75rem .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .xi-panel { animation: none; transition: none; }
}

/* ---- Betreiber-Vorschau (?abbruch_vorschau=1, nur Superadmin) ----
   Ein knapper Streifen ÜBER dem scrollbaren Bereich (.xi-body), damit er in
   jedem Schritt stehen bleibt — auch beim Beispielcode. Warnfarbe statt
   Primärfarbe: Er soll sich vom Fenster abheben, nicht dazugehören. */
.xi-preview {
  flex: none; margin: 0 1.4rem .9rem; padding: .5rem .75rem;
  /* Bernstein wie .badge.amber — es gibt kein --warning-Token im Theme,
     deshalb hier fest, genau wie bei .badge.amber und .notice.amber. */
  border: 1px dashed #d97706; border-radius: 10px;
  background: #fffbeb; color: #92400e;
  font-size: .82rem; line-height: 1.45;
}
.xi-preview strong { display: block; }
@media (max-width: 899.98px) {
  .xi-preview { margin-inline: 1rem; }
}
@media (max-width: 380px) {
  .xi-preview { margin-inline: .85rem; }
}

/* ---- Dunkelmodus: nur die eine fest kodierte Stelle ---- */
:root[data-theme="dark"] .xi-overlay { background: rgba(0, 0, 0, .72); }
/* Vorschau-Streifen im Dunkelmodus — dieselben Töne wie .badge.amber. */
:root[data-theme="dark"] .xi-preview { border-color: #b4530980; background: #2a2113; color: #fcd34d; }
/* Helles Primärblau trägt im Dark Mode dunkle Schrift (--on-primary) — der
   gestrichelte Coderahmen wäre darauf zu blass. */
:root[data-theme="dark"] .xi-codebox { border-color: color-mix(in srgb, var(--primary) 60%, var(--border)); }

/* =====================================================================
   Push & Anrufe (Präfix vzpush-) und Anruf-Overlay (Präfix vzcall-)
   push-dashboard.js baut das Bauteil [data-vzpush]: Karte im Profil und im
   Platzhalter der Nachrichtenzentrale, Hinweisleiste über deren Liste.
   chat-global.js baut das Anruf-Overlay — mobil ein Bottom-Sheet, ab 761 px
   eine Karte oben rechts — und die Hinweiszeile im Pillen-Menü.
   Farben über die Tokens; die wenigen festen Töne (Grün des Anrufs, Bernstein
   des Hinweises) haben ihr Gegenstück im Dunkel-Block am Ende. Bewegung nur
   ohne prefers-reduced-motion.
   ===================================================================== */

/* [hidden] muss gegen .btn & Co. gewinnen (display-Regeln gleicher Spezifität) */
.vzpush [hidden], .vzpush-banner[hidden], .vzpush-banner [hidden],
.vzcall[hidden], .vzcall [hidden], .vzch-menu-note[hidden], .vzch-menu-note [hidden] { display: none !important; }

/* ---- Bauteil „Push & Anrufe" ---- */
.vzpush { display: flex; flex-direction: column; gap: .65rem; max-width: 40rem; margin: .9rem 0 0; color: var(--text); text-align: left; }
.vzpush-note { margin: 0; color: var(--muted); font-size: .88rem; }
.vzpush-row { display: flex; align-items: flex-start; gap: .65rem; }
.vzpush-dot { flex: none; width: .7rem; height: .7rem; margin-top: .4rem; border-radius: 50%; background: #9ca3af; }
.vzpush-dot.is-on { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.22); }
.vzpush-dot.is-off { background: #d97706; box-shadow: 0 0 0 3px rgba(217,119,6,.2); }
.vzpush-dot.is-blocked { background: var(--danger); }
.vzpush-txt { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.vzpush-state { font-size: .98rem; line-height: 1.35; }
.vzpush-sub { color: var(--muted); font-size: .86rem; line-height: 1.5; }
.vzpush-steps { margin: 0; padding-left: 1.35rem; font-size: .88rem; line-height: 1.55; }
.vzpush-steps li + li { margin-top: .2rem; }
.vzpush-meta { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.vzpush-acts { display: flex; flex-wrap: wrap; gap: .5rem; }
.vzpush-acts .btn { min-height: 40px; }
.vzpush-msg {
  margin: 0; padding: .5rem .7rem; border-radius: 10px;
  background: color-mix(in srgb, var(--text) 6%, var(--surface));
  font-size: .86rem; line-height: 1.45;
}
.vzpush-msg.is-ok { background: color-mix(in srgb, var(--success) 12%, var(--surface)); color: #166534; }
.vzpush-msg.is-warn { background: color-mix(in srgb, #f59e0b 14%, var(--surface)); color: #92400e; }
.vzpush-msg.is-err { background: color-mix(in srgb, var(--danger) 11%, var(--surface)); color: #991b1b; }
.vzpush-help { font-size: .86rem; }
.vzpush-help > summary {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 40px;
  color: var(--primary); font-weight: 600; cursor: pointer; list-style: none;
}
.vzpush-help > summary::-webkit-details-marker { display: none; }
.vzpush-help > summary::before { content: "›"; display: inline-block; font-size: 1.1em; transition: transform .15s; }
.vzpush-help[open] > summary::before { transform: rotate(90deg); }
.vzpush-help ul { margin: .15rem 0 0; padding-left: 1.2rem; color: var(--muted); line-height: 1.55; }
.vzpush-help li + li { margin-top: .35rem; }

/* Im Platzhalter der Nachrichtenzentrale (rechts, solange kein Gespräch offen ist) */
.vzpush-ph {
  width: 100%; max-width: 28rem; margin: 1.4rem auto 0; padding: .95rem 1.05rem 1rem;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
  color: var(--text); text-align: left;
}
.vzpush-ph-h { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: .95rem; }
.vzpush-ph-h > i { color: var(--primary); }
.vzpush-ph .vzpush { margin-top: .6rem; }
.vzch-placeholder .vzpush .btn { margin-top: 0; }

/* ---- Hinweisleiste über der Liste (Push fehlt auf diesem Gerät) ---- */
.vzpush-banner {
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; margin: 0 0 .9rem;
  padding: .45rem .35rem .45rem .85rem;
  border: 1px solid color-mix(in srgb, #f59e0b 40%, var(--border)); border-radius: 12px;
  background: color-mix(in srgb, #f59e0b 9%, var(--surface));
  font-size: .88rem; line-height: 1.4;
}
.vzpush-banner > i { flex: none; color: #d97706; }
.vzpush-banner.is-soft { border-color: var(--border); background: var(--surface); }
.vzpush-banner.is-soft > i { color: var(--muted); }
.vzpush-banner-txt { flex: 1 1 14rem; min-width: 0; }
.vzpush-banner-t { margin: 0; }
.vzpush-banner .vzpush-msg { margin-top: .35rem; }
.vzpush-banner-acts { display: flex; flex-wrap: wrap; gap: .4rem; }
.vzpush-banner-acts .btn { min-height: 40px; }
.vzpush-x {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; border-radius: 9px;
  background: none; color: var(--muted); cursor: pointer;
}
.vzpush-x:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
:is(.vzpush, .vzpush-banner) :is(button, a, summary):focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---- Hinweiszeile im Pillen-Menü: hält „Online" auch bei geschlossener App? ---- */
/* Ohne feste Breite: Das Menü hängt rechtsbündig an der Pille — mobil steht sie
   weit links, ein breiteres Menü ragte dort aus dem Bild. Der Text bricht um. */
.vzch-menu-note { margin: .3rem 0 0; padding: .55rem .5rem .2rem; border-top: 1px solid var(--border); }
@media (min-width: 761px) {
  .vzch-menu:has(> .vzch-menu-note:not([hidden])) { min-width: 14rem; }
}
.vzch-menu-note-t { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.vzch-menu-note.is-ok .vzch-menu-note-t::before,
.vzch-menu-note.is-warn .vzch-menu-note-t::before {
  content: ""; display: inline-block; width: .45rem; height: .45rem; margin-right: .4rem;
  border-radius: 50%; background: #16a34a; vertical-align: .05em;
}
.vzch-menu-note.is-warn .vzch-menu-note-t::before { background: #d97706; }
.vzch-menu .vzch-menu-push { margin-top: .3rem; color: var(--primary); font-weight: 600; }

/* ---- Anruf-Overlay ---- */
.vzcall {
  /* z-index 1150: über dem Vollbild-Gespräch der Nachrichtenzentrale (1000)
     und dem Vergleichs-Overlay (1100), unter der Kurzmeldung (1200), dem
     Abbruch-Fenster (1250) und dem Einwilligungs-Layer (ab 2147483000). */
  position: fixed; z-index: 1150; top: 5rem; right: 1.25rem;
  width: min(24rem, calc(100vw - 2rem));
}
.vzcall-panel {
  position: relative; padding: 1rem 1rem .95rem;
  border: 1px solid var(--border); border-radius: 18px;
  background: var(--surface); color: var(--text);
  box-shadow: 0 24px 60px -18px rgba(0,0,0,.45);
  animation: vzcall-in .22s ease-out;
}
.vzcall-x {
  position: absolute; top: .4rem; right: .4rem;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: none; color: var(--muted); font-size: 1rem; cursor: pointer;
}
.vzcall-x:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
.vzcall-head { display: flex; align-items: center; gap: .85rem; padding-right: 2.7rem; }
.vzcall-ico {
  flex: none; position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 3.2rem; height: 3.2rem; border-radius: 50%;
  background: #15803d; color: #fff; font-size: 1.3rem;
}
.vzcall-ico::after { content: ""; position: absolute; inset: 0; border-radius: 50%; }
.vzcall.is-ringing .vzcall-ico > i { animation: vzcall-ring 1.2s ease-in-out infinite; }
.vzcall.is-ringing .vzcall-ico::after { animation: vzcall-halo 1.5s ease-out infinite; }
.vzcall-titles { display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.vzcall-kicker { margin: 0; color: #15803d; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.vzcall-name { overflow: hidden; font-size: 1.15rem; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.vzcall-card { overflow: hidden; color: var(--muted); font-size: .85rem; text-overflow: ellipsis; white-space: nowrap; }
.vzcall-wait { margin: .75rem 0 0; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.vzcall.is-urgent .vzcall-wait { color: #b91c1c; font-weight: 700; }
.vzcall-more { display: inline-block; margin: .3rem 0 0; font-size: .85rem; font-weight: 600; }
p.vzcall-more { color: var(--muted); }
.vzcall-msg {
  margin: .65rem 0 0; padding: .5rem .7rem; border-radius: 10px;
  background: color-mix(in srgb, var(--text) 6%, var(--surface));
  font-size: .86rem; line-height: 1.45;
}
.vzcall-msg.is-warn { background: color-mix(in srgb, #f59e0b 14%, var(--surface)); color: #92400e; }
.vzcall-msg.is-err { background: color-mix(in srgb, var(--danger) 11%, var(--surface)); color: #991b1b; }
.vzcall-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-top: .9rem; }
.vzcall-acts .btn { min-height: 48px; font-size: 1rem; }
/* Grün mit weißer Schrift in beiden Modi (Kontrast ≈ 5:1) — wie ein Anruf */
.vzcall-acts .vzcall-accept { background: #15803d; color: #fff; }
.vzcall-acts .vzcall-accept:hover { background: #166534; }
.vzcall-acts .vzcall-decline {
  background: var(--surface); color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
}
.vzcall-acts .vzcall-decline:hover { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.vzcall-acts .vzcall-mute { grid-column: 1 / -1; min-height: 44px; font-size: .92rem; }
.vzcall-mute[aria-pressed="true"] { opacity: .7; }
.vzcall :is(button, a):focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

@keyframes vzcall-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes vzcall-up { from { opacity: .6; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes vzcall-ring {
  0%, 60%, 100% { transform: rotate(0); }
  10% { transform: rotate(-16deg); }
  20% { transform: rotate(14deg); }
  30% { transform: rotate(-12deg); }
  40% { transform: rotate(10deg); }
  50% { transform: rotate(-4deg); }
}
@keyframes vzcall-halo {
  0%   { box-shadow: 0 0 0 0 rgba(22,163,74,.55); }
  100% { box-shadow: 0 0 0 1.1rem rgba(22,163,74,0); }
}

/* ---- Mobil: Bottom-Sheet über dem unteren Rand ---- */
@media (max-width: 760px) {
  .vzcall { top: auto; right: 0; bottom: 0; left: 0; width: auto; }
  .vzcall-panel {
    padding: 1.15rem 1rem calc(1rem + env(safe-area-inset-bottom));
    border-width: 1px 0 0; border-radius: 20px 20px 0 0;
    box-shadow: 0 -16px 40px -12px rgba(0,0,0,.35);
    animation: vzcall-up .26s cubic-bezier(.2,.8,.2,1);
  }
  .vzcall-acts .btn { min-height: 52px; font-size: 16px; }
  .vzcall-acts .vzcall-mute { min-height: 46px; font-size: 16px; }
  /* Offenes Gespräch im Vollbild (html.vzch-sheet): oben unter dem Kopf statt
     unten — die Eingabe des laufenden Gesprächs bleibt frei (wie ein
     „Anklopfen" beim Telefonieren). */
  html.vzch-sheet .vzcall { top: calc(3.9rem + env(safe-area-inset-top)); bottom: auto; left: .5rem; right: .5rem; }
  html.vzch-sheet .vzcall-panel {
    padding-bottom: .95rem; border-width: 1px; border-radius: 18px;
    box-shadow: 0 18px 44px -14px rgba(0,0,0,.45);
    animation: vzcall-in .22s ease-out;
  }
  /* Schwebende Knöpfe anderer Bausteine lägen sonst auf dem Sheet */
  html.vzcall-on #vc-support, html.vzcall-on .vc-sup-panel { display: none; }
  html.vzcall-on a[data-cc="show-preferencesModal"] { display: none !important; }
  html.vzcall-on:not(.vzch-sheet) .vzch-flash { bottom: calc(15.5rem + env(safe-area-inset-bottom)); }

  .vzpush-acts .btn, .vzpush-banner-acts .btn { min-height: 44px; font-size: 16px; }
  .vzpush-acts .btn { flex: 1 1 100%; }
  .vzpush-help > summary { min-height: 44px; }
  .vzpush-banner { padding-left: .75rem; }
  .vzpush-banner-acts { flex: 1 1 100%; }
  .vzpush-banner-acts .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .vzcall-panel { animation: none; }
  .vzcall.is-ringing .vzcall-ico > i, .vzcall.is-ringing .vzcall-ico::after { animation: none; }
  /* Ruhiger Ersatz für das Wackeln: ein fester Ring */
  .vzcall.is-ringing .vzcall-ico { box-shadow: 0 0 0 .35rem rgba(22,163,74,.28); }
  .vzpush-help > summary::before { transition: none; }
}

/* ---- Dunkelmodus: nur die fest kodierten Töne ---- */
:root[data-theme="dark"] .vzpush-dot.is-on { background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.25); }
:root[data-theme="dark"] .vzpush-dot.is-off { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251,191,36,.2); }
:root[data-theme="dark"] .vzpush-msg.is-ok { color: #86efac; }
:root[data-theme="dark"] .vzpush-msg.is-warn,
:root[data-theme="dark"] .vzcall-msg.is-warn { color: #fcd34d; }
:root[data-theme="dark"] .vzpush-msg.is-err,
:root[data-theme="dark"] .vzcall-msg.is-err { color: #fca5a5; }
:root[data-theme="dark"] .vzpush-banner > i { color: #fbbf24; }
:root[data-theme="dark"] .vzpush-banner:not(.is-soft) { background: color-mix(in srgb, #f59e0b 10%, var(--surface)); }
:root[data-theme="dark"] .vzch-menu-note.is-ok .vzch-menu-note-t::before { background: #4ade80; }
:root[data-theme="dark"] .vzch-menu-note.is-warn .vzch-menu-note-t::before { background: #fbbf24; }
:root[data-theme="dark"] .vzcall-panel { box-shadow: 0 24px 60px -18px rgba(0,0,0,.8); }
:root[data-theme="dark"] .vzcall-kicker { color: #4ade80; }
:root[data-theme="dark"] .vzcall.is-urgent .vzcall-wait { color: #fca5a5; }
:root[data-theme="dark"] .vzcall-acts .vzcall-decline:hover { background: #2a1416; }
@media (max-width: 760px) {
  :root[data-theme="dark"] .vzcall-panel { box-shadow: 0 -16px 40px -12px rgba(0,0,0,.7); }
}

/* ---- Nachrichtenzentrale unter 1000 px: Bauteil zugeklappt unter der Liste ----
   Der Platzhalter rechts (mit dem Bauteil) ist dort nie im Bild; ab 1000 px
   übernimmt wieder er. Der Punkt in der Titelzeile zeigt den Zustand DIESES
   Geräts (data-state setzt push-dashboard.js). */
.vzpush-more {
  margin: .9rem 0 0; padding: 0 .9rem;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); color: var(--text);
}
.vzpush-more > summary {
  display: flex; align-items: center; gap: .55rem; min-height: 48px;
  font-size: .95rem; font-weight: 700; cursor: pointer; list-style: none;
}
.vzpush-more > summary::-webkit-details-marker { display: none; }
.vzpush-more > summary > i { color: var(--primary); }
.vzpush-more > summary::after {
  content: "›"; margin-left: auto; color: var(--muted); font-size: 1.25em; line-height: 1;
  transition: transform .15s;
}
.vzpush-more[open] > summary::after { transform: rotate(90deg); }
.vzpush-more > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 10px; }
.vzpush-more > .vzpush { margin: 0 0 1rem; }
.vzpush-more-dot { flex: none; width: .6rem; height: .6rem; border-radius: 50%; background: #9ca3af; }
.vzpush-more:has(.vzpush[data-state="on"]) .vzpush-more-dot { background: #16a34a; }
.vzpush-more:has(.vzpush[data-state="off"]) .vzpush-more-dot,
.vzpush-more:has(.vzpush[data-state="ios"]) .vzpush-more-dot { background: #d97706; }
.vzpush-more:has(.vzpush[data-state="blocked"]) .vzpush-more-dot { background: var(--danger); }
@media (min-width: 1000px) {
  .vzpush-more { display: none; }
}
/* Knopf „Push einschalten" im Pillen-Menü: Touch-Ziel ≥ 44 px */
@media (max-width: 760px) {
  .vzch-menu .vzch-menu-push { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .vzpush-more > summary::after { transition: none; }
}
:root[data-theme="dark"] .vzpush-more:has(.vzpush[data-state="on"]) .vzpush-more-dot { background: #4ade80; }
:root[data-theme="dark"] .vzpush-more:has(.vzpush[data-state="off"]) .vzpush-more-dot,
:root[data-theme="dark"] .vzpush-more:has(.vzpush[data-state="ios"]) .vzpush-more-dot { background: #fbbf24; }

/* ---------------------------------------------------------------- Rechtstexte
   Fassungsleiste, Vergleich (Diff) und Text-Overlay (legal/*.php,
   legal-overlay.js). Farben über Variablen bzw. halbtransparent, damit hell
   und dunkel lesbar bleiben. */
.legal-bar {
  display: flex; flex-wrap: wrap; gap: .35rem 1rem; align-items: center; justify-content: space-between;
  margin: .4rem 0 1rem; padding: .55rem .8rem; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); font-size: .85rem; color: var(--muted);
}
.legal-bar-links { display: inline-flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .85rem; }
.legal-bar-links a { white-space: nowrap; }
.legal-summary > :first-child { margin-top: 0; }
.legal-summary > :last-child { margin-bottom: 0; }
.legal-compare-pick { display: flex; gap: .5rem; align-items: end; flex-wrap: wrap; margin: .2rem 0 1rem; }
.legal-compare-pick select { margin-left: .4rem; }

.ldiff { margin: .5rem 0 1.5rem; }
.ldiff-stats { display: flex; flex-wrap: wrap; gap: .4rem; margin: .2rem 0 .4rem; }
.ldiff-chip { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.ldiff-chip.geaendert { background: rgba(217, 119, 6, .14); color: #b45309; }
.ldiff-chip.neu { background: rgba(22, 163, 74, .14); color: #15803d; }
.ldiff-chip.weg { background: rgba(220, 38, 38, .12); color: #b91c1c; }
.ldiff-hunk { border: 1px solid var(--border); border-radius: 10px; margin: .8rem 0; overflow: hidden; background: var(--surface); }
.ldiff-where { font-size: .78rem; font-weight: 600; color: var(--muted); padding: .4rem .8rem; border-bottom: 1px solid var(--border); background: var(--bg); }
.ldiff-row { padding: .45rem .8rem; line-height: 1.5; border-left: 4px solid transparent; }
.ldiff-row + .ldiff-row { border-top: 1px solid var(--border); }
.ldiff-row.heading { font-weight: 700; }
.ldiff-row.gleich { color: var(--muted); font-size: .92em; }
.ldiff-row.weg { background: rgba(220, 38, 38, .07); border-left-color: #dc2626; }
.ldiff-row.neu { background: rgba(22, 163, 74, .08); border-left-color: #16a34a; }
.ldiff-row.geaendert { background: rgba(217, 119, 6, .07); border-left-color: #d97706; }
.ldiff del, .ldiff-legend del { color: #b91c1c; background: rgba(220, 38, 38, .12); text-decoration: line-through; }
.ldiff ins, .ldiff-legend ins { color: #15803d; background: rgba(22, 163, 74, .14); text-decoration: none; font-weight: 600; }
.ldiff-ctx-sample { color: var(--muted); }

/* Overlay mit reinem Rechtstext (Registrierung, Checkout, Kundenkonto) */
.legal-overlay .modal-panel { max-width: 860px; padding: 0; display: flex; flex-direction: column; max-height: 92vh; }
.legal-overlay-head { display: flex; gap: .8rem; align-items: baseline; justify-content: space-between; flex-wrap: wrap;
  padding: 1rem 3rem .7rem 1.3rem; border-bottom: 1px solid var(--border); }
.legal-overlay-head h2 { margin: 0; font-size: 1.1rem; }
.legal-overlay-meta { font-size: .8rem; color: var(--muted); }
.legal-overlay-body { overflow: auto; padding: .4rem 1.3rem 1.2rem; overscroll-behavior: contain; }
.legal-overlay-body .narrow { max-width: none !important; margin: 0; padding: 0; }
.legal-overlay-body .card { border: 0; box-shadow: none; padding: 0; background: none; }
.legal-overlay-body h1 { display: none; } /* Titel steht im Kopf des Overlays */
.legal-overlay-foot { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap;
  padding: .7rem 1.3rem; border-top: 1px solid var(--border); }
.legal-overlay-state { padding: 2rem 0; text-align: center; color: var(--muted); }

/* Harmonisierte EU-Mitteilung „Gesetzliche Gewährleistung" (legal/_gewaehrleistung.php).
   Die Grafik selbst bleibt unangetastet — gestaltet wird nur der Rahmen darum. */
.gn { margin-top: .9rem; }
details.gn { border: 1px solid var(--border); border-left: 4px solid #0b4f9e; border-radius: 12px; background: var(--surface); }
.gn-summary { display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; cursor: pointer; list-style: none; }
.gn-summary::-webkit-details-marker { display: none; }
.gn-summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 10px; }
.gn-icon { flex: none; color: #0b4f9e; }
[data-theme="dark"] .gn-icon { color: #6c9bea; }
.gn-summary-txt { display: flex; flex-direction: column; gap: .05rem; line-height: 1.35; flex: 1; min-width: 0; }
.gn-chevron { flex: none; font-size: 1.3rem; line-height: 1; color: var(--muted); transition: transform .15s; }
details.gn[open] > .gn-summary .gn-chevron { transform: rotate(90deg); }
details.gn > .gn-figure { padding: 0 .9rem .9rem; }
.gn-figure { margin: 0; }
/* A4 in Originalgröße (100 % ≈ 794 px), auf schmalen Bildschirmen volle Breite */
.gn-image { display: block; max-width: 794px; }
.gn-image img { width: 100%; height: auto; border: 1px solid var(--border); background: #fff; }
.gn-caption { display: flex; flex-wrap: wrap; gap: .3rem .5rem; margin-top: .5rem; font-size: .85rem; }
.gn-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { .gn-chevron { transition: none; } }

/* =====================================================================
   Integrationen (Präfix .intg-, docs/integrationen.md)
   Dashboard-Seite /dashboard/integrationen: Chat-Codes, Kanäle der
   Nachrichtenzentrale, Wegweiser. Farben über die Tokens (Dunkelmodus).
   ===================================================================== */
.intg-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; margin: 0 0 1.2rem; }
.intg-tile {
  display: flex; flex-direction: column; gap: .25rem; padding: .9rem 1rem;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
  color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s;
}
.intg-tile:hover { border-color: var(--primary); transform: translateY(-1px); }
.intg-tile > i { color: var(--primary); font-size: 1.1rem; }
.intg-tile > span { color: var(--muted); font-size: .82rem; line-height: 1.4; }
/* Sprungziele (#kanaele, #api …) unter der festen Kopfleiste (.topbar, 76 px) + Luft */
.intg-sec { scroll-margin-top: 92px; }
.intg-sec h2 { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: 1.1rem; }
.intg-sec h2 > i { color: var(--primary); }
.intg-list { display: flex; flex-direction: column; gap: .8rem; }
.intg-item { border: 1px solid var(--border); border-radius: 12px; padding: .8rem 1rem; background: var(--bg, transparent); scroll-margin-top: 92px; }
.intg-item.is-paused { opacity: .75; }
.intg-item-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.intg-code { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.intg-code code, .intg-code input {
  flex: 1 1 280px; min-width: 0; padding: .45rem .6rem; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem;
  overflow-wrap: anywhere; word-break: break-all;
}
.intg-stats { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: .7rem 0 0; }
.intg-stats > div { display: flex; gap: .4rem; align-items: baseline; }
.intg-stats dt { color: var(--muted); }
.intg-stats dd { margin: 0; }
.intg-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.intg-actions form { margin: 0; }
.intg-edit { margin-top: .7rem; }
.intg-edit > summary, .intg-help > summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.intg-danger { padding-top: .6rem; border-top: 1px dashed var(--border); }
.intg-form { margin-top: .6rem; }
.intg-form h3 { font-size: 1rem; margin: 0 0 .5rem; }
.intg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .2rem 1rem; }
.intg-grid .intg-wide { grid-column: 1 / -1; }
.intg-grid .field small { display: block; margin-top: .25rem; }
.intg-check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; margin: .3rem 0 .8rem; }
.intg-check input { width: auto; margin-top: .2rem; }
/* Ereignis-Auswahl der Webhooks (_webhooks_panel.php) */
.intg-events { border: 0; margin: .2rem 0 .4rem; padding: 0; min-width: 0; }
.intg-events legend { font-weight: 600; font-size: .9rem; margin: 0 0 .35rem; padding: 0; }
.intg-events .intg-check { margin: 0 0 .35rem; }
.intg-help { margin-top: 1rem; }
.intg-help ul { margin: .5rem 0 0; padding-left: 1.2rem; font-size: .88rem; line-height: 1.55; }
.intg-help h4 { margin: 1.1rem 0 .3rem; font-size: .95rem; }
.intg-help .codeblock { overflow-x: auto; }
.intg-fields { width: 100%; margin: .7rem 0; }
.intg-fields td:first-child { white-space: nowrap; vertical-align: top; }
.intg-note, .intg-upsell {
  display: flex; gap: .8rem; align-items: flex-start; flex-wrap: wrap; justify-content: space-between;
  padding: .8rem 1rem; border-radius: 12px; background: color-mix(in srgb, var(--primary) 7%, var(--surface));
}
.intg-note { justify-content: flex-start; }
.intg-note > i { color: var(--primary); margin-top: .2rem; }
.intg-upsell p { margin: 0; }
.intg-secret { margin: .3rem 0 .7rem; }
.intg-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; }
.intg-link {
  display: flex; flex-direction: column; gap: .25rem; padding: .8rem 1rem;
  border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none;
}
.intg-link:hover { border-color: var(--primary); }
/* REST-API (_api_panel.php): Unterüberschriften, breite Tabellen scrollen waagerecht */
.intg-h3 { font-size: 1rem; margin: 1.1rem 0 .5rem; }
.intg-scroll { overflow-x: auto; }
.intg-api-set { border: 0; margin: 0; padding: 0; min-width: 0; }
/* Nicht gebucht: Hinweis + Buchung oben, darunter die Oberfläche als Vorschau
   (inert, ausgegraut, unten ausgeblendet) — sichtbar, aber nicht bedienbar */
.intg-lock {
  display: flex; gap: .8rem 1rem; align-items: flex-start; flex-wrap: wrap; margin: .3rem 0 1rem; padding: .9rem 1rem;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border)); border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 7%, var(--surface));
}
.intg-lock > i { color: var(--primary); margin-top: .2rem; }
.intg-lock-txt { flex: 1 1 260px; min-width: 0; }
.intg-lock-txt p { margin: .2rem 0 0; }
.intg-lock-price { display: flex; flex-wrap: wrap; gap: .2rem .45rem; align-items: baseline; margin-top: .5rem !important; }
.intg-lock-price strong { font-size: 1.15rem; }
.intg-lock-act { flex: 0 1 280px; text-align: center; }
.intg-lock-act form, .intg-lock-act .btn.mt { margin-top: 0 !important; }
/* Buchungsknopf (_addon_cta.php, inline min-width:220px) darf auf sehr schmalen Handys schrumpfen */
.intg-lock-act .btn { max-width: 100%; min-width: min(220px, 100%) !important; justify-content: center; }
.intg-preview { position: relative; max-height: 640px; overflow: hidden; opacity: .6; filter: grayscale(.4); pointer-events: none; user-select: none; }
.intg-preview::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 140px; background: linear-gradient(to bottom, transparent, var(--surface)); }
/* API-Zugang (auch die Vorschau ohne Buchung): Bezeichnung und Berechtigung am Handy untereinander
   statt gequetscht nebeneinander; lange Adressen/Kopfzeilen der Anleitung brechen um, statt die
   Tabelle zu verbreitern (in der Vorschau würde sie sonst rechts abgeschnitten) */
.intg-api .row > .field { flex: 1 1 12rem; }
.intg-help td code { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .intg-fields td:first-child { white-space: normal; }
  .intg-code .btn { width: 100%; justify-content: center; }
  .intg-lock-act { flex-basis: 100%; }
}

/* Entwurf-Hinweise (docs/entwurf-hinweis.md): Leiste über „Meine Karten" und Overlay nach dem Anlegen */
.vz-drafts {
  background: var(--surface); border: 1px solid #f6c56f; border-left: 4px solid #d97706; border-radius: 12px;
  padding: .9rem 1rem; margin: 0 0 1rem; box-shadow: var(--shadow);
}
.vz-drafts-head { display: flex; gap: .75rem; align-items: flex-start; }
.vz-drafts-head h2 { font-size: 1.02rem; margin: 0 0 .15rem; }
.vz-drafts-head p { margin: 0; color: var(--muted); font-size: .9rem; }
.vz-drafts-ico {
  flex: none; width: 2.3rem; height: 2.3rem; border-radius: 10px; background: #fff3dc; color: #b45309;
  display: inline-flex; align-items: center; justify-content: center;
}
.vz-drafts-list { list-style: none; margin: .75rem 0 .4rem; padding: 0; display: grid; gap: .5rem; }
.vz-drafts-list li {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: 10px; padding: .55rem .7rem;
}
.vz-drafts-card { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.vz-drafts-card strong { overflow-wrap: anywhere; }
.vz-drafts-list form { margin: 0; }
.vz-drafts-note { margin: .3rem 0 0; }
.vz-draft-modal .modal-panel { max-width: 560px; }
.vz-draft-art { display: block; width: 100%; height: auto; margin: .2rem 0 1rem; }
.vz-draft-good { background: #f1f5f9; border-radius: 10px; padding: .7rem .85rem; margin: .8rem 0 0; font-size: .92rem; }
.vz-draft-good p { margin: .25rem 0 0; }
.vz-draft-acts { display: flex; justify-content: flex-end; margin-top: 1rem; }
@media (max-width: 480px) {
  .vz-draft-modal .modal-panel { padding: 1rem 1.05rem; font-size: .93rem; }
  .vz-draft-modal h2 { font-size: 1.2rem; }
  .vz-draft-art { margin-top: 1.4rem; } /* Platz für das Schließen-Kreuz */
  .vz-draft-good { font-size: .85rem; }
  .vz-draft-acts .btn { width: 100%; }
}
:root[data-theme="dark"] .vz-drafts { border-color: #92400e; border-left-color: #d97706; }
:root[data-theme="dark"] .vz-drafts-ico { background: rgba(217, 119, 6, .18); color: #fbbf24; }
:root[data-theme="dark"] .vz-draft-good { background: rgba(148, 163, 184, .12); }

/* =====================================================================
   Kundenbereich: Feinschliff Handy · Tablet · Desktop (Prüfmaß Welle 4)
   Tippziele ≥ 24 px (WCAG 2.2 AA 2.5.8), Schrift am Handy ≥ 12 px,
   Knopfreihen ohne überstehenden Text. Nur enge Selektoren.
   ===================================================================== */
/* Fußzeile des Kundenbereichs: Links als Tippziele (sonst 21 px hoch, Zeilen eng beieinander) */
.dash-legal a { display: inline-flex; align-items: center; min-height: 24px; }
/* Terminanfragen: E-Mail und Telefon untereinander in der Kontakt-Spalte — als Tippziele höher */
.bk-list td a[href^="mailto:"], .bk-list td a[href^="tel:"] { display: inline-block; padding: .2rem 0; }
/* Kopfzeile „Meine Karten": Knöpfe in Inhaltsbreite — .row > * { flex: 1 } teilte die
   schmale Reihe gleichmäßig auf und brach „+ Neue Karte" auch am Desktop um */
.dash-acts > * { flex: none; }
@media (max-width: 760px) {
  /* Knopfreihen: Breite nach Beschriftung und bei Platzmangel in die nächste Zeile —
     statt drei gestauchter Knöpfe, deren Text über den Rand ragt */
  .row > .btn, .row > form { flex: 1 1 auto; }
  .row > form > .btn:only-of-type { width: 100%; justify-content: center; }
  /* Kleine Etiketten und Zähler am Handy nie unter 12 px */
  .badge.sm, .badge-count, .badge-premium, .badge-beta, .badge-soon, .badge-plan,
  .tabbar .tab-count, .ls-list .ls-code, .sidebar .nav-group, .sidebar a .nav-sub,
  .account-plan, .account-menu-label, .vzld-row-meta .badge, .vzch-sec-act { font-size: .75rem; }
  /* Nachrichtenzentrale (Liste): Abschnittsköpfe, Zähler, Zeit, Kanal und Status — nur die Mindestschrift,
     bewusst außerhalb des Chat-Blocks */
  .vzch-sec-h, .vzch-sec-c, .vzch-row-time, .vzch-row-l3, .vzch-retention, .vzch-nav-live, .vzch-cap { font-size: .75rem; }
}
/* Tablet (Touch, Seitenleiste sichtbar): Etiketten, Zähler und Sprachkürzel im Rahmen ebenfalls ≥ 12 px */
@media (min-width: 761px) and (max-width: 1024px) {
  .badge-count, .badge-premium, .badge-beta, .tabbar .tab-count, .ls-list .ls-code,
  .sidebar .nav-group, .sidebar a .nav-sub, .account-plan, .sidebar .vzch-nav-live { font-size: .75rem; }
}
/* Logo in der Kopfleiste: Tippfläche ≥ 44 px hoch (das Bild selbst ist am Handy nur 18 px hoch) */
.brand-img { min-height: 44px; }
/* Schließen-Kreuz der Overlays: Tippziel 40 × 40 statt 22 × 30 */
.modal-close { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
/* Meldung schließen und Passwort zeigen: Tippziel 32 × 32 statt rund 23 × 24 */
.alert-close, .pw-toggle { min-width: 32px; min-height: 32px; display: inline-flex; align-items: center; justify-content: center; }
@media (min-width: 761px) and (max-width: 1100px) {
  /* Tablet: neben der Seitenleiste bleibt wenig Breite — breite Tabellen wischen in ihrer Karte,
     statt die ganze Seite zu verbreitern (am Handy gilt das schon für jede .card) */
  /* position: relative hält auch unsichtbare Screenreader-Texte (absolut) in der Hülle — sonst verbreitern sie die Seite */
  .card:has(> table), .card:has(> form > table) { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Chat-Fenster der Windows-App (docs/desktop-app.md, seit 1.10.0; DesktopApp::chatWindow): nur die
   Seite selbst — Kopfzeile und Seitenleiste bleiben im Dokument (Abmelde-Form, Statuspille), sind aber
   nicht zu sehen; die Nachrichtenzentrale nutzt die ganze Breite. Fußzeile mit Rechtstexten bleibt. */
body.vz-deskchat .topbar,
body.vz-deskchat .sidebar,
body.vz-deskchat .skip-link { display: none !important; }
body.vz-deskchat .container { max-width: none; padding: 0 .75rem; }
body.vz-deskchat .layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding: .75rem 0; }
