/* Version: v113 — Web-Push-Schalter in der Topbar (#push-topbar), 2026-07-19 */
/* BOAVISTA — Ergänzungen zum Tailwind-Build (assets/styles.css wird mit
   `npx tailwindcss@3.4.17 -c tailwind.config.js -i tailwind-input.css -o assets/styles.css --minify`
   aus den PHP-Views erzeugt; eigene Bausteine leben hier). */

/* ---------- Passwortfeld mit Auge-Umschalter ---------- */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 2.75rem; }
.pw-btn {
  position: absolute; top: 0; bottom: 0; right: 0;
  display: flex; align-items: center; padding: 0 0.75rem;
  color: #a3a3a3; background: none; border: 0; cursor: pointer;
}
.pw-btn:hover { color: #404040; }

/* ---------- Hinweisboxen ----------
   Einheitlicher Box-Stil wie der rote Rundumleuchte-Banner: gerahmt (rounded-xl),
   Icon + fetter Text, Rahmen- und Textfarbe gleich, heller Farb-Untergrund.
   Grün = lebendiges Grün (#16a34a), Blau = kräftiges Blau (#1d4ed8). */
.hinweis-gruen, .hinweis-blau {
  display: flex; align-items: center; gap: 0.75rem;
  border-radius: 0.75rem; padding: 0.75rem 1.25rem;
  font-size: 0.875rem; font-weight: 600; line-height: 1.35;
  transition: opacity 0.6s ease;
}
.hinweis-gruen::before, .hinweis-blau::before {
  content: ""; flex: none; width: 22px; height: 22px;
  background: center / contain no-repeat;
}
/* Erfolgsmeldung — lebendiges Grün, mit Häkchen-Icon */
.hinweis-gruen {
  background: #f0fdf4; border: 1px solid #16a34a; color: #16a34a;
}
.hinweis-gruen::before {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2316a34a' stroke-width='1.8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z'/%3E%3C/svg%3E");
}
/* Warn-/Fehlerhinweis — blau (löst das frühere Rot ab), mit Info-Icon davor */
.hinweis-blau {
  background: #eff6ff; border: 1px solid #1d4ed8; color: #1d4ed8;
}
.hinweis-blau::before {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231d4ed8' stroke-width='1.8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M11.25 11.25l.04-.02a.75.75 0 0 1 1.06.85l-.7 2.84a.75.75 0 0 0 1.06.85l.04-.02M12 8.25h.01M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z'/%3E%3C/svg%3E");
}

/* ---------- Rechtsseiten-Typografie ---------- */
.recht h2 { font-weight: 600; color: #262626; margin: 1.5rem 0 0.5rem; font-size: 1rem; }
.recht p, .recht li { font-size: 0.875rem; color: #404040; line-height: 1.6; margin-bottom: 0.5rem; }
.recht ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 0.75rem; }
.recht a { color: #ff0000; }
.recht a:hover { text-decoration: underline; }

/* ---------- Footer-Block (Menüleiste unten bzw. Login-Seite) ---------- */
.nav-fuss, .seiten-fuss {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 0.6rem; padding: 1rem;
}
.nav-fuss { margin-top: auto; }
.nav-fuss a.textlink, .seiten-fuss a.textlink {
  font-size: 0.875rem; font-weight: 400; color: #b5b5b5; text-decoration: none;
}
/* Impressum und Datenschutz dichter zusammenrücken */
.nav-fuss a.textlink + a.textlink, .seiten-fuss a.textlink + a.textlink { margin-top: -0.45rem; }
.nav-fuss a.textlink:hover, .seiten-fuss a.textlink:hover { color: #ff0000; }
/* Fallback-Groessen = die Werte, die fuss.js in Standard-Schrift misst, damit
   der erste Paint bereits stimmt und beim Neuladen NICHTS springt (kein CLS).
   Frueher 80/43px -> fuss.js schrumpfte auf 71/38px = sichtbarer Ruckler. */
img.fuss-mm { width: 71px; height: auto; }
img.fuss-tt { width: 38px; height: auto; margin-left: 18px; }
img.fuss-mm, img.fuss-tt {
  filter: grayscale(1) opacity(0.55);
  transition: filter 0.25s ease;
}
a:hover > img.fuss-mm, a:hover > img.fuss-tt { filter: grayscale(0) opacity(1); }
.fuss-mittig { margin: 0 auto; width: fit-content; }

/* ---------- Navigation ---------- */
/* Desktop: Menüleiste als Spalte (damit der Footer-Block nach unten rutscht) */
@media (min-width: 768px) {
  .nav-spalte { display: flex !important; flex-direction: column; }
}

/* Mobil: Menü standardmäßig versteckt (Tailwind .hidden), Burger öffnet Overlay */
.burger { display: none; background: none; border: 0; color: inherit; padding: 0.25rem 0.5rem 0.25rem 0; cursor: pointer; }

/* Globaler Zurück-Knopf im Mobil-Header — runder Kreis mit großer Trefferfläche,
   wie der Burger nur mobil sichtbar (eigene Media-Query statt Tailwind .md:hidden,
   da custom.css zuletzt lädt). */
.kopf-zurueck {
  position: relative;
  display: none; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem;             /* 44 px — füllt die Header-Höhe nahezu aus */
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 9999px;
  color: inherit; padding: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.1s ease;
}
.kopf-zurueck:active { background: rgba(0,0,0,0.09); transform: scale(0.88); }
.kopf-zurueck svg { width: 26px; height: 26px; }
/* Ring-Puls beim Tippen — radiert nach außen, gleiche Sprache wie der Reload-Buzzer */
.kopf-zurueck::after {
  content: ""; position: absolute; inset: -1px; border-radius: 9999px;
  border: 2px solid rgba(0,0,0,0.35);
  opacity: 0; pointer-events: none;
}
.kopf-zurueck--puls::after { animation: kopf-zurueck-puls 0.5s ease-out; }
@keyframes kopf-zurueck-puls {
  0%   { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.9); }
}

/* ---------- Bild-Lightbox (Chat) ---------- */
.chat-bild { cursor: zoom-in; }
body.lightbox-offen { overflow: hidden; }
.chat-lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; padding: 3.75rem 1rem 1.5rem;
  background: rgba(0,0,0,0.88);
}
.chat-lightbox[hidden] { display: none; }
.chat-lightbox img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 0.5rem; box-shadow: 0 12px 48px rgba(0,0,0,0.55);
}
.chat-lightbox-x {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 2.75rem; height: 2.75rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.5);
  border-radius: 9999px; color: #fff; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background 0.15s ease;
}
.chat-lightbox-x:active { background: rgba(255,255,255,0.3); }
.chat-lightbox-dl {
  display: inline-flex; align-items: center; gap: 0.4rem; flex: none;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.5);
  border-radius: 0.5rem; color: #fff; padding: 0.5rem 1.1rem;
  font-size: 0.85rem; text-decoration: none;
  -webkit-tap-highlight-color: transparent; transition: background 0.15s ease;
}
.chat-lightbox-dl:active { background: rgba(255,255,255,0.3); }

/* ---------- PDF-Viewer (Chat) ---------- */
.pdf-knopf { cursor: pointer; }
.pdf-lightbox {
  position: fixed; inset: 0; z-index: 110;
  display: flex; flex-direction: column;
  background: #525659;
}
.pdf-lightbox[hidden] { display: none; }
.pdf-lightbox-kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  background: #ff0000; color: #fff;   /* BOAVISTA-Markenrot (nicht das alte Tailwind-b91c1c) */
  padding: 0.6rem 0.9rem;
  padding-top: calc(0.6rem + env(safe-area-inset-top, 0px));
}
.pdf-lightbox-schliessen {
  display: inline-flex; align-items: center; gap: 0.45rem; flex: none;
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.65);
  border-radius: 0.5rem; color: #fff; padding: 0.5rem 1.1rem;
  font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background 0.15s ease;
}
.pdf-lightbox-schliessen:active { background: rgba(255,255,255,0.34); }
.pdf-lightbox-dl {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 2.6rem; height: 2.6rem;
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.65);
  border-radius: 9999px; color: #fff; text-decoration: none;
  -webkit-tap-highlight-color: transparent; transition: background 0.15s ease;
}
.pdf-lightbox-dl:active { background: rgba(255,255,255,0.34); }
.pdf-lightbox-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 0.75rem; display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
}
.pdf-seite {
  display: block; width: 100%; max-width: 900px; height: auto;
  background: #fff; border-radius: 2px; box-shadow: 0 2px 12px rgba(0,0,0,0.45);
}
.pdf-status { color: #fff; opacity: 0.9; padding: 2.5rem 1rem; text-align: center; font-size: 0.9rem; }
.nav-schleier { display: none; }

@media (max-width: 767px) {
  .burger { display: block; }
  .kopf-zurueck { display: inline-flex; }
  body.nav-offen .nav-spalte {
    display: flex !important; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 16rem; max-width: 85vw; z-index: 50;
    background: #fff; box-shadow: 0 0 30px rgba(0,0,0,0.35);
    overflow-y: auto;
  }
  body.nav-offen .nav-schleier {
    display: block; position: fixed; inset: 0;
    background: rgba(0,0,0,0.35); z-index: 40;
  }
}

/* Desktop: BOAVISTA-Header-Logo mittig über der 14rem-Menüspalte ausrichten,
   sodass es exakt über dem Firmenlogo (.nav-spalte, justify-center) sitzt.
   Header-Innenpadding (px-4 = 1rem) + 6rem = 7rem Mitte — identisch zur Spalte. */
@media (min-width: 768px) {
  .kopf-logo { width: 12rem; display: flex; justify-content: center; }
}

/* Eigenlogo-Leiste (Login-Seite): alle Marken klein, grau, zentriert, ohne Links */
.eigenlogo-leiste {
  /* wrap-reverse: bei Umbruch (mobil) liegt die volle Zeile unten, der Rest darüber */
  display: flex; flex-wrap: wrap-reverse; justify-content: center; align-items: center;
  gap: 1.1rem; padding: 1rem 1.5rem 1.25rem;
}
.eigenlogo-leiste img {
  height: 1.5rem; width: auto;
  filter: grayscale(1) opacity(0.45);
  transition: filter 0.2s ease, transform 0.2s ease;
}
.eigenlogo-leiste img:hover {
  filter: grayscale(0) opacity(1);
  transform: scale(1.35);
}
/* Login-Logo: proportional zur Kastenbreite (überall gleiches Verhältnis) —
   feste Tailwind-Höhen sind im gepurgten CSS nicht verlässlich vorhanden */
.bv-login-logo { width: 38%; max-width: 170px; height: auto; display: block; }

/* Mobil: Leiste + Login-Startseite kompakter, damit alles ohne Scrollen auf eine
   Bildschirmhöhe passt (auch iPhone SE mit Safari-Leisten, ~553px Viewport) */
@media (max-width: 640px) {
  .eigenlogo-leiste { gap: 0.55rem 0.8rem; padding: 0.45rem 1rem 0.5rem; }
  .eigenlogo-leiste img { height: 1rem; }
  .bv-login h1 { margin-bottom: 0.35rem; }
  .bv-login .bv-gast-card { padding: 0.8rem; gap: 0.5rem; }
  .bv-login .bv-hersteller-box { padding: 0.75rem; margin-top: 0.5rem; }
  .bv-login .sprachwahl { margin-top: 0.3rem !important; }
}

/* Sprachumschalter-Knöpfe wie Textlinks */
.sprachwahl button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; }

/* Sprachumschalter: Formular-Knöpfe sauber in einer Reihe (Login zentriert) */
.sprachwahl { display: inline-flex; align-items: center; gap: 0.45rem; }
.sprachwahl form { display: inline-block; }

/* Login-Seite: Sprachwahl wirklich zentrieren (p ist Block, Inhalt mittig) */
p.sprachwahl { display: flex; justify-content: center; }

/* Sprachflaggen */
.flagge {
  display: block; width: 22px; height: 15px; border-radius: 2px;
  object-fit: cover; opacity: 0.45;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.sprachwahl button:hover .flagge { opacity: 1; transform: scale(1.12); }
.flagge-aktiv { opacity: 1; box-shadow: 0 0 0 2px rgba(255,255,255,0.95); }
.flagge-aktiv-hell { box-shadow: 0 0 0 2px #ff0000; }

/* ---------- Sprachauswahl als Dropdown (nur Header, weißer Hintergrund) ----------
   Sichtbar ist nur die aktive Flagge + ein Pfeil; Klick klappt die übrigen Sprachen
   auf. Bewusst eigene Klasse (.sprachmenu) statt .sprachwahl, damit die Flaggenreihe
   auf Login/Einwilligung unverändert bleibt. */
.sprachmenu { position: relative; display: inline-flex; align-items: center; }
.sprachmenu-knopf {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: none; border: 0; padding: 0.2rem 0.3rem; border-radius: 0.45rem;
  color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease;
}
.sprachmenu-knopf:hover { background: rgba(0,0,0,0.05); }
.sprachmenu-flagge { opacity: 1; }              /* Flagge im Trigger/Menü immer voll sichtbar */
.sprachmenu-pfeil { opacity: 0.5; transition: transform 0.18s ease; }
.sprachmenu[data-offen] .sprachmenu-pfeil { transform: rotate(180deg); }
.sprachmenu-liste {
  position: absolute; top: calc(100% + 0.4rem); right: 0; z-index: 60;
  display: none; flex-direction: column; min-width: 8rem; padding: 0.3rem;
  background: #fff; border: 1px solid #e5e5e5; border-radius: 0.6rem;
  box-shadow: 0 10px 26px rgba(0,0,0,0.16);
}
.sprachmenu[data-offen] .sprachmenu-liste { display: flex; }
.sprachmenu-liste form { display: block; margin: 0; }
.sprachmenu-eintrag {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  background: none; border: 0; padding: 0.45rem 0.55rem; border-radius: 0.4rem;
  color: #262626; font: inherit; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em;
  text-align: left; cursor: pointer;
}
.sprachmenu-eintrag:hover { background: #f5f5f5; }

/* "Als App installieren"-Hinweis (nur mobil per JS eingeblendet) */
.app-hinweis {
  display: flex; align-items: center; gap: 0.8rem;
  background: #fff; border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 0.8rem 1rem; margin-top: 1rem;
  font-size: 0.8rem; color: #404040; text-align: left;
}
.app-hinweis-icon { width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0; }
.app-hinweis-text { display: flex; flex-direction: column; gap: 0.15rem; }
.app-hinweis-text strong { color: #262626; font-size: 0.875rem; }
.app-hinweis-zeile { color: #737373; line-height: 1.45; }
#app-installieren {
  background: #ff0000; color: #fff; border: 0; border-radius: 999px;
  padding: 0.35rem 1rem; font-weight: 600; font-size: 0.8rem; cursor: pointer;
}
#app-hinweis-zu {
  margin-left: auto; background: none; border: 0; cursor: pointer;
  color: #a3a3a3; font-size: 1.3rem; line-height: 1; align-self: flex-start;
}

/* Datei-Wählen-Knopf im Chat: exakt gleiche Höhe/Form wie der SENDEN-Button.
   position:relative ist tragend: das absolut versteckte File-Input muss AM KNOPF
   ankern — sonst ankert es an .bv-shell (position:relative) und bläht deren
   Scrollbereich auf; der Anker-Sprung nach dem Chat-Senden scrollte dann die
   ganze Shell samt Topbar aus dem Bild (mobil nicht zurückholbar). */
.datei-knopf {
  position: relative;
  flex-shrink: 0;
  display: inline-block;
  max-width: 16rem;     /* fasst auch „Weitere Dateien wählen" in allen vier Sprachen */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #e5e5e5;
  color: #404040;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.25rem;
  border-radius: .25rem;
  padding: .375rem 1rem;
  text-transform: uppercase;
  letter-spacing: .025em;
  cursor: pointer;
  transition: background-color .12s ease, color .12s ease;
}
.datei-knopf:hover { background: #d4d4d4; color: #ff0000; }
/* „Auswahl entfernen"-× neben dem Datei-wählen-Knopf (nur bei data-entfernbar,
   z. B. Konfigurator-Motive): setzt die Wahl zurück auf „keine Datei". Gleiche
   Formsprache wie .datei-knopf (abgerundetes Rechteck, NIE Pille). */
.datei-entfernen {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; margin-left: .4rem; vertical-align: middle;
  background: #e5e5e5; color: #404040; border: 0; border-radius: .25rem;
  font-size: 1.15rem; font-weight: 600; line-height: 1; cursor: pointer;
  transition: background-color .12s ease, color .12s ease;
}
.datei-entfernen:hover { background: #d4d4d4; color: #ff0000; }
/* Input fokussierbar versteckt (kein display:none — sonst bricht required) */
.datei-knopf input[type="file"] {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Länderauswahl mit echten Flaggen (fuss.js baut sie aus dem <select> auf).
   Der Knopf erbt die Feldklassen des Formulars, damit er wie jedes andere
   Eingabefeld aussieht; die Liste folgt der Formsprache der App: abgerundetes
   Rechteck, nie Pille. Das <select> bleibt als Wertquelle im DOM. */
.bv-land { position: relative; }
.bv-land-feld {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); border: 0;      /* fokussierbar versteckt, nicht display:none */
}
.bv-land-knopf {
  display: flex; align-items: center; gap: .5rem;
  width: 100%; text-align: left; cursor: pointer;
}
.bv-land-fahne {
  flex: none; width: 1.5rem; height: 1rem; object-fit: cover;
  border: 1px solid rgba(0, 0, 0, .12); border-radius: .125rem; background: #fff;
}
.bv-land-fahne-leer { border-style: dashed; }
.bv-land-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bv-land-leer { color: #a3a3a3; }
.bv-land-pfeil { flex: none; color: #737373; font-size: .75rem; line-height: 1; }
.bv-land-liste {
  position: absolute; z-index: 40; top: calc(100% + .25rem); left: 0; right: 0;
  max-height: 16rem; overflow-y: auto;
  list-style: none; margin: 0; padding: .25rem;
  background: #fff; border: 1px solid #d4d4d4; border-radius: .5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .12);
}
.bv-land-eintrag {
  display: flex; align-items: center; gap: .5rem;
  padding: .4rem .5rem; border-radius: .25rem;
  font-size: .875rem; color: #404040; cursor: pointer;
}
.bv-land-eintrag > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bv-land-eintrag:hover, .bv-land-aktiv { background: #f5f5f5; }
.bv-land-eintrag[aria-selected="true"] { font-weight: 600; }

/* Liste der gewählten Dateien unter dem Wählen-Knopf (fuss.js baut sie auf):
   zeigt vor dem Absenden, WAS hochgeht, und lässt jede Datei einzeln wieder
   herausnehmen. Formsprache wie .datei-knopf — abgerundetes Rechteck, kein Rund. */
.datei-liste {
  list-style: none; margin: .5rem 0 0; padding: 0;
  display: flex; flex-direction: column; gap: .25rem;
  max-width: 28rem;
}
.datei-liste li {
  display: flex; align-items: center; gap: .5rem;
  background: #f5f5f5; border: 1px solid #e5e5e5; border-radius: .25rem;
  padding: .3rem .3rem .3rem .6rem;
  font-size: .8125rem; line-height: 1.2rem; color: #404040;
}
.datei-liste-name {
  flex: 1 1 auto; min-width: 0;                 /* min-width:0 — sonst sprengt ein langer Name die Zeile */
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.datei-liste-groesse { flex: none; color: #a3a3a3; font-variant-numeric: tabular-nums; }
.datei-liste-x {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem;
  background: #e5e5e5; color: #404040; border: 0; border-radius: .25rem;
  font-size: 1rem; font-weight: 600; line-height: 1; cursor: pointer;
  transition: background-color .12s ease, color .12s ease;
}
.datei-liste-x:hover { background: #d4d4d4; color: #ff0000; }

/* Einheitlicher „Hochladen"-Aktionsknopf — abgerundetes RECHTECK (wie .datei-knopf,
   NIE Pille). Paart sich systemweit mit dem Datei-wählen-Knopf: erst auswählen,
   dann bewusst hier klicken. Eine Quelle der Wahrheit via upload_button(). */
.datei-hochladen {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  flex-shrink: 0;
  background: #fff;
  color: #404040;
  border: 1px solid #d4d4d4;
  border-radius: .25rem;
  padding: .375rem 1rem;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.25rem;
  text-transform: uppercase;
  letter-spacing: .025em;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .12s ease, color .12s ease, background-color .12s ease;
}
.datei-hochladen:hover { border-color: #b91c1c; color: #b91c1c; }
/* kompakte Variante für enge Listenzeilen (z. B. Etikettenlager, Angebote) */
.datei-hochladen-klein { padding: .25rem .625rem; font-size: .75rem; gap: .2rem; }

/* Flash-Meldung sanft ausblenden (wie der grüne Hinweis) */
.flash-meldung { transition: opacity 0.6s ease; }

/* Status-Button „Freigeschaltet" — grün, im Stil der Standard-Buttons */
.knopf-gruen {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #16a34a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 0.5rem;
  padding: 0.3rem 0.85rem;
  white-space: nowrap;
}

/* Kleine Team-Markierung in den Übersichtslisten */
.team-badge {
  display: inline-block;
  background: #16a34a;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 9999px;
  padding: 0.05rem 0.4rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* Showroom-Freischaltung in der Kundenliste (orange, nur bei freigeschaltet) */
.show-badge {
  display: inline-block;
  background: #f97316;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 9999px;
  padding: 0.05rem 0.4rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* KUNDENDATEN-Upload-Freischaltung in der Kundenliste (blau) */
.upload-badge {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 9999px;
  padding: 0.05rem 0.4rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* Liefertermine-Freischaltung in der Kundenliste (violett) */
.liefer-badge {
  display: inline-block;
  background: #7c3aed;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 9999px;
  padding: 0.05rem 0.4rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* Hilfe-Freischaltung in der Kundenliste (rot) */
.hilfe-badge {
  display: inline-block;
  background: var(--bv-rot);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 9999px;
  padding: 0.05rem 0.4rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* „Artikel selber gestalten"-Freischaltung in der Kundenliste (magenta — bisher ungenutzt) */
.creator-badge {
  display: inline-block;
  background: #db2777;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 9999px;
  padding: 0.05rem 0.4rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* Erweiterungs-Badges in der Spalte „Erweiterung" (Hersteller-Liste) */
.erw-badge {
  display: inline-block;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 9999px;
  padding: 0.05rem 0.4rem;
  vertical-align: middle;
  white-space: nowrap;
}
.erw-badge + .erw-badge { margin-left: 0.3rem; }
.erw-badge--team { background: #7c3aed; }       /* Lila */
.erw-badge--zulieferer { background: #0e7490; }  /* Petrol */
.erw-badge--hilfe { background: var(--bv-rot); } /* Rot — Hilfe freigeschaltet */

/* Symbol „freigegeben zur finalen Mengenherstellung" (nach Produktionsfreigabe) */
.mengen-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  line-height: 1.2;
}
.mengen-badge svg { width: 1.1em; height: 1.1em; flex: none; }
/* Kompakt — nur das Symbol (in Listen neben dem Artikelnamen) */
.mengen-symbol { display: inline-flex; align-items: center; color: #15803d; margin-left: 0.4rem; vertical-align: middle; }
.mengen-symbol svg { width: 1.05em; height: 1.05em; flex: none; }

/* Artikel- und Projektbilder: die Desktop-Groesse steht inline am Bild, die Handy-
   Groesse reist als Custom Property mit (--lb-mobil bzw. --pb-mobil) und wird hier
   angewandt. Beide Zahlen setzt die Aufrufstelle in db.php/den Views — es gibt keine
   zentrale Umrechnung mehr, in der Zeile steht die Groesse, die im Bild landet.
   !important, weil die Desktop-Groesse inline gesetzt ist. Ohne abweichende Handy-
   Groesse geben die Helfer die Klasse gar nicht erst aus. */
@media (max-width: 640px) {
  .bv-listenbild  { width: var(--lb-mobil) !important; height: var(--lb-mobil) !important; }
  .bv-projektbild { width: var(--pb-mobil) !important; height: var(--pb-mobil) !important; }
}

/* Freigabe-Symbole (Muster/Produktion) in Artikellisten — wichtige Statusanzeige.
   Auf Mobil bewusst deutlich größer, damit die Freigabe auf einen Blick erkennbar ist. */
/* Eigene Zeile unter dem Artikelnamen — die beiden Icons bleiben IMMER zusammen
   (linksbündig, kein Trennen durch Namensumbruch). */
.bv-freigabe-zeile { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.15rem; }
.bv-freigabe-ico { display: inline-flex; align-items: center; }
.bv-freigabe-ico svg { width: 1.15rem; height: 1.15rem; flex: none; display: block; }
@media (max-width: 640px) {
  .bv-freigabe-zeile { gap: 0.5rem; margin-top: 0.25rem; }
  .bv-freigabe-ico svg { width: 1.7rem; height: 1.7rem; }
}

/* Freigabe-STATUS oben im Artikel (Muster/Produktion freigegeben) — Rechteck mit
   abgerundeten Ecken (KEINE Pille), grün. Je Stufe eine Zeile mit Zeitstempel. */
.bv-freigabe-status {
  display: flex; align-items: center; gap: 0.6rem;
  border: 1px solid transparent;
  border-radius: 0.5rem; padding: 0.6rem 0.85rem;
  font-size: 0.8125rem; font-weight: 600; line-height: 1.35;
}
.bv-freigabe-status svg { width: 1.25rem; height: 1.25rem; flex: none; }
.bv-freigabe-status strong { font-weight: 700; }
/* Gewichtung farblich: Muster = leichteres Grün, Produktion = kräftigeres/dunkleres
   Grün — die Produktionsfreigabe ist die gewichtigere Entscheidung. */
.bv-freigabe-status.muster     { background: #f0fdf4; border-color: #bbf7d0; color: #16a34a; }
.bv-freigabe-status.produktion { background: #dcfce7; border-color: #22c55e; color: #166534; font-weight: 700; }

/* Abgestufte Button-Rottöne (Artikel-Aktionen) — Hover = Vollrot */
.btn-stufe-1, .btn-stufe-2, .btn-stufe-3 { transition: background-color .12s ease, color .12s ease; color: #262626; }
.btn-stufe-1 { background: #ebebeb; }
.btn-stufe-2 { background: #e0e0e0; }
.btn-stufe-3 { background: #d7d7d7; }
.btn-stufe-1:hover, .btn-stufe-2:hover, .btn-stufe-3:hover { background: #ff0000; color: #ffffff; }

/* ── Einheitliche Aktions-Buttons (btn() in helpers.php) ───────────────────
   EINE Quelle der Wahrheit: gleiche Funktion → gleicher Button, systemweit.
   Als Komponentenklassen hier in custom.css, weil helpers.php nicht vom
   Tailwind-Purge gescannt wird (rohe Utility-Klassen würden dort verschwinden).
     primaer   grün  – Speichern / Anlegen / Erstellen / Absenden
     sekundaer Outline – Zurück / Abbrechen
     gefahr    rot   – endgültiges Löschen / gefährliches Bestätigen
     loeschen  Icon  – Papierkorb in Listen/Zeilen (neutral, Hover rot)      */
.bv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  border-radius: 0.5rem;                /* abgerundetes Rechteck, keine Pillenform */
  padding: 0.5rem 1.25rem;              /* px-5 py-2 */
  text-transform: uppercase;
  letter-spacing: 0.025em;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .12s ease, color .12s ease, border-color .12s ease;
}
.bv-btn:disabled, .bv-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
/* Kompakte Größe für dichte Kontexte (Chat-Senden, Inline-Mini-Formulare, Tabellenzeilen) */
.bv-btn-klein { padding: 0.3rem 0.85rem; font-size: 0.75rem; }

.bv-btn-primaer   { background: #16a34a; color: #fff; }               /* green-600 */
.bv-btn-primaer:hover   { background: #15803d; color: #fff; }         /* green-700 */

.bv-btn-sekundaer { background: #fff; color: #404040; border-color: #d4d4d4; } /* neutral-300 */
.bv-btn-sekundaer:hover { border-color: #b91c1c; color: #b91c1c; }    /* red-700 */

.bv-btn-gefahr    { background: #b91c1c; color: #fff; }               /* red-700 */
.bv-btn-gefahr:hover    { background: #991b1b; color: #fff; }         /* red-800 */

/* Zugangs-Farben der Login-Startseite: Kunde = Grün-Türkis (wie Kundenchat),
   Hersteller = Blau (wie Herstellerchat/Admin) — die beiden Eintritts-Buttons. */
.bv-btn-kunde      { background: #0d9488; color: #fff; }              /* teal-600 */
.bv-btn-kunde:hover      { background: #0f766e; color: #fff; }        /* teal-700 */
.bv-btn-hersteller { background: #185FA5; color: #fff; }              /* Herstellerchat-Blau */
.bv-btn-hersteller:hover { background: #0C447C; color: #fff; }

/* Löschen-Icon (Papierkorb) — dezent neutral, färbt sich bei Hover rot */
.bv-btn-loeschen {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; padding: 0.15rem; margin: 0;
  color: #a3a3a3;                       /* neutral-400 */
  cursor: pointer; line-height: 0;
  transition: color .12s ease;
}
.bv-btn-loeschen:hover { color: #b91c1c; }     /* red-700 */
.bv-btn-loeschen svg { width: 1.15rem; height: 1.15rem; }

/* ── Design-Regel: einheitliche Feldhöhe (app-weit) ───────────────────────
   Selects und einzeilige Inputs im Standard-Feldstil (…rounded px-3…) sind
   ÜBERALL exakt 40px hoch — gleiche Höhe im ganzen System. Greift zentral ohne
   View-Änderung, da custom.css nach styles.css lädt und höher spezifisch als
   py-2 ist. Bewusst ausgenommen: mehrzeilige <textarea> (nur Elemente
   input/select getroffen) und kompakte Inline-Felder mit px-2. */
select.rounded.px-3,
input.rounded.px-3:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]) {
  height: 2.5rem;   /* = h-10 */
}

/* ── „Seite neu laden"-Buzzer (Originalbild, fest unter dem Menü) ── */
.reload-buzzer-zeile {
  display: flex;
  justify-content: center;
  padding: 0.9rem 0;                 /* gleicher Abstand ober-/unterhalb, Buzzer steht frei */
  border-top: 1px solid #e5e5e5;     /* Trennungslinie über dem Buzzer (neutral-200) */
  border-bottom: 1px solid #e5e5e5;  /* Trennungslinie unter dem Buzzer */
}
.reload-buzzer {
  position: relative;
  width: 9.5rem;           /* Höhe ergibt sich aus dem Bild (200×166) */
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  line-height: 0;
  transition: transform .08s ease, filter .12s ease;
}
.reload-buzzer img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;    /* Klick trifft den Button, nicht das Bild */
}
/* Leucht-Schein hinter der Kuppel (zentriert auf den blauen Dom) */
.reload-buzzer::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 42%;
  width: 150%;
  height: 150%;
  transform: translate(-50%, -50%) scale(0.5);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  filter: blur(5px);
  background: radial-gradient(circle,
    rgba(150, 215, 255, 0.95) 0%,
    rgba(70, 165, 255, 0.7) 32%,
    rgba(40, 140, 255, 0) 68%);
}
.reload-buzzer:hover { filter: brightness(1.05); }
.reload-buzzer:active { transform: translateY(1px) scale(0.96); }
.reload-buzzer:focus-visible { outline: 3px solid #93c5fd; outline-offset: 3px; border-radius: 0.5rem; }
/* Klick: Kuppel flammt hell auf + blauer Schein strahlt nach außen */
.reload-buzzer--puls img { animation: buzzer-puls .5s ease-out; }
.reload-buzzer--puls::before { animation: buzzer-glow .5s ease-out; }
@keyframes buzzer-puls {
  0%   { transform: translateY(2px) scale(0.92); filter: brightness(1.7) saturate(1.4) drop-shadow(0 0 9px rgba(120, 200, 255, 0.95)); }
  35%  { filter: brightness(1.5) saturate(1.3) drop-shadow(0 0 6px rgba(120, 200, 255, 0.7)); }
  100% { transform: none; filter: none; }
}
@keyframes buzzer-glow {
  0%   { opacity: 0;   transform: translate(-50%, -50%) scale(0.5); }
  25%  { opacity: 1;   transform: translate(-50%, -50%) scale(1.05); }
  100% { opacity: 0;   transform: translate(-50%, -50%) scale(1.35); }
}
/* Respektiert Nutzer-Einstellung „weniger Bewegung" */
@media (prefers-reduced-motion: reduce) {
  .reload-buzzer--puls img, .reload-buzzer--puls::before { animation: none; }
}
/* Mobil etwas kleiner */
@media (max-width: 640px) {
  .reload-buzzer { width: 8rem; }
}

/* ---------- Tabellen: horizontaler Scroll statt Abschneiden (mobil) ---------- */
/* Ersetzt overflow-hidden auf Tabellen-Karten: zu breite Tabellen (z. B. mit
   Aktionsspalte) werden scrollbar statt abgeschnitten; rounded-xl klippt weiter. */
.karte-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Mobil-Stabilität: keine Seite darf horizontal wandern ----------
   Quer-Überlauf entsteht durch intrinsisch breite Inhalte (Tabellen, Selects
   mit langen Optionen, nowrap-Zeilen). Breites gehört in einen eigenen
   Scroll-Container (.karte-scroll) — die SEITE selbst bleibt quer fest. */
html, body { overflow-x: hidden; }          /* Gast-/Login-Seiten (Body scrollt) */
.bv-content { overflow-x: hidden; }         /* App-Shell: Inhalt ist der Seiten-Scroller */
/* Formularfelder dürfen ihre Karte nie über die Viewportbreite aufdrücken —
   betrifft v. a. <select> mit langen Firmennamen als Optionen. */
.bv-content input, .bv-content select, .bv-content textarea { max-width: 100%; min-width: 0; }
/* iOS zoomt beim Fokussieren von Feldern mit Schrift < 16px automatisch in die Seite
   und bleibt danach gezoomt (Topbar außerhalb, Seite horizontal verschiebbar — trat
   beim Chat-Senden auf). 16px am Mobilgerät unterbindet den Auto-Zoom an der Wurzel. */
@media (max-width: 767px) {
  .bv-content input, .bv-content select, .bv-content textarea { font-size: 16px; }
}
/* Grid-Zellen (Formulare „grid md:grid-cols-2", Karten-Raster): Standard-Mindestmaß
   ist die Inhaltsbreite — lange Optionen/nowrap-Texte drücken sonst die ganze
   Spalte über den Viewport. min-width:0 lässt die Zelle auf Rasterbreite schrumpfen. */
.bv-content .grid > * { min-width: 0; }

/* ---------- Touch-freundliche Tabellen-Aktionen (≥44px Trefferfläche) ---------- */
.tab-aktion { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.25rem; }

/* ---------- Header: Chat-Indikator für Admin (2 Sprechblasen, flankiert von Rollen-Icons) ---------- */
.chat-leiste { display: inline-flex; align-items: center; gap: 0.35rem; color: inherit; }
/* Chat-Symbolgruppe sitzt links direkt nach dem BOAVISTA-Logo (Hauptaufmerksamkeit) */
.chat-kopf { margin-left: 4rem; }
@media (max-width: 640px) { .chat-kopf { margin-left: 0.6rem; } }
.chat-rolle { display: inline-flex; opacity: 0.9; }
/* Icons (überschreibt die Inline-Größe der $navIcon-SVGs) */
.chat-rolle svg { width: 23px !important; height: 23px !important; }
/* Hersteller-Icon betont größer — Strich proportional dünner, damit die Outline
   absolut so dünn wirkt wie beim 23px-Person-Icon (1.6 × 23/30 ≈ 1.23) */
.chat-rolle--gross svg { width: 30px !important; height: 30px !important; stroke-width: 1.23; }
/* Mobil: nur die beiden Sprechblasen, Rollen-Icons ausblenden */
@media (max-width: 640px) { .chat-rolle { display: none; } }
/* Sprechblase: im Ruhezustand LEER — nur weiße Outline (kein Hintergrund) */
.chat-blase {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.5rem; height: 1.5rem; padding: 0 0.35rem;
  border-radius: 0.7rem 0.7rem 0.7rem 0.15rem;   /* Sprechblasen-Form (Ecke unten links) */
  font-size: 0.8rem; font-weight: 700; line-height: 1;
  background: transparent; color: #525252;
  border: 1.6px solid #a3a3a3;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.chat-blase::after {                              /* kleiner Sprechblasen-Schwanz (grau, passend zur Outline) */
  content: ""; position: absolute; left: 0.2rem; bottom: -0.28rem;
  border: 0.18rem solid transparent;
  border-top-color: #a3a3a3; border-right-color: #a3a3a3;
  transition: border-color .2s ease;
}
/* aktiv: eingefärbt + Anzahl (kein Leuchten).
   Blau  = Hersteller-Seite (Admin-Sicht: Herstellerchat / Hersteller-Sicht: Adminnachrichten)
   Türkis = Kunden-/Zuliefer-Seite (Admin: Kundenchat / Hersteller: Lieferantennachrichten) */
.chat-blase--aktiv { color: #fff; border-color: transparent; }
.chat-blase--aktiv[data-chat-blase="hersteller"],
.chat-blase--aktiv[data-chat-blase="admin"] { background: #3b82f6; }
.chat-blase--aktiv[data-chat-blase="hersteller"]::after,
.chat-blase--aktiv[data-chat-blase="admin"]::after { border-top-color: #3b82f6; border-right-color: #3b82f6; }
.chat-blase--aktiv[data-chat-blase="kunde"],
.chat-blase--aktiv[data-chat-blase="lieferant"] { background: #14b8a6; }
.chat-blase--aktiv[data-chat-blase="kunde"]::after,
.chat-blase--aktiv[data-chat-blase="lieferant"]::after { border-top-color: #14b8a6; border-right-color: #14b8a6; }

/* ===== News-Modul ===== */
/* Ungelesen-Badge: roter Kreis mit Ziffer (Menü + Empfänger-Liste). */
.news-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.25rem; height: 1.25rem; padding: 0 0.3rem;
  border-radius: 9999px; background: #ff0000; color: #fff;
  font-size: 0.72rem; font-weight: 700; line-height: 1; flex: none;
}
.news-badge--nav { margin-left: auto; }

/* ---------- Benachrichtigungen-Glocke im Header ---------- */
.kopf-glocke { position: relative; display: inline-flex; align-items: center; color: inherit; transition: opacity 0.15s ease; }
.kopf-glocke:hover { opacity: 0.65; }
.kopf-glocke-badge {
  position: absolute; top: -0.3rem; right: -0.4rem;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.05rem; height: 1.05rem; padding: 0 0.25rem;
  border-radius: 9999px; background: #ff0000; color: #fff;
  font-size: 0.66rem; font-weight: 700; line-height: 1;
  box-shadow: 0 0 0 2px #fff;   /* weißer Rand hebt den Badge vom Icon ab */
}

/* Rich-Text-Editor */
.news-tool {
  min-width: 2rem; min-height: 2rem; padding: 0 0.5rem;
  border: 1px solid #d4d4d4; border-radius: 0.25rem; background: #fff;
  font-size: 0.85rem; color: #404040; cursor: pointer;
}
.news-tool:hover { background: #f5f5f5; border-color: #ff0000; }
.news-editor { overflow-y: auto; max-height: 460px; }
.news-editor:focus { outline: none; }
.news-editor a { color: #ff0000; text-decoration: underline; }
.news-editor ul { list-style: disc; padding-left: 1.25rem; }
.news-editor ol { list-style: decimal; padding-left: 1.25rem; }

/* Beitragsinhalt (Ausgabe) */
.news-inhalt a { color: #ff0000; text-decoration: underline; }
.news-inhalt a:hover { color: #cc0000; }
.news-inhalt p { margin: 0 0 0.75rem; }
.news-inhalt ul { list-style: disc; padding-left: 1.4rem; margin: 0 0 0.75rem; }
.news-inhalt ol { list-style: decimal; padding-left: 1.4rem; margin: 0 0 0.75rem; }
.news-inhalt h3 { font-size: 1.1rem; font-weight: 600; margin: 1rem 0 0.5rem; }
.news-inhalt h4 { font-size: 1rem; font-weight: 600; margin: 0.75rem 0 0.4rem; }
.news-inhalt blockquote { border-left: 3px solid #d4d4d4; padding-left: 0.9rem; color: #525252; margin: 0 0 0.75rem; }

/* Video-Embed: responsives 16:9 */
.news-video { position: relative; width: 100%; padding-top: 56.25%; border-radius: 0.5rem; overflow: hidden; background: #000; }
.news-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Formularzeile (z. B. Maßtabellen-Verwaltung): auf Mobil gestapelt mit voller
   Breite, ab 640px nebeneinander am unteren Rand ausgerichtet. */
.feld-reihe { display: flex; flex-direction: column; gap: 0.75rem; }
.feld-reihe > * { width: 100%; }
@media (min-width: 640px) {
  .feld-reihe { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
  .feld-reihe > * { width: auto; }
}

/* Aktivitäts-Feed (Dashboard „Letzte Aktivität"): Icon-Akzentfarbe je
   Eintragsgruppe. ereignis_icon_html() setzt die Klassen; das Inline-SVG nutzt
   stroke="currentColor", die Farbe kommt also aus `color`. Hier build-
   unabhängig gepflegt (nicht im purged Tailwind-Build styles.css). */
.ev-icon       { flex-shrink: 0; margin-top: 1px; }
.ev-projekt    { color: #3b82f6; } /* Projekt — blau */
.ev-artikel    { color: #0d9488; } /* Artikel — teal */
.ev-freigabe   { color: #16a34a; } /* Muster/Produktion freigegeben — grün */
.ev-angebot    { color: #f59e0b; } /* Angebot — amber */
.ev-ablehnung  { color: #dc2626; } /* Angebot abgelehnt — rot */
.ev-versand    { color: #92400e; } /* Sendung/Versand — braun */
.ev-datei      { color: #0ea5e9; } /* Kundendaten-Upload — sky */
.ev-bildnachweis { color: #6366f1; } /* Bildnachweis (Fotobeleg) — indigo */
.ev-chat       { color: #2563eb; } /* Chatnachricht — blau */
.ev-news       { color: #d946ef; } /* News veröffentlicht — fuchsia */
.ev-login      { color: #6b7280; } /* Anmeldung — grau */
.ev-kunde      { color: #0891b2; } /* neuer Kunde — cyan */
.ev-hersteller { color: #ea580c; } /* neuer Hersteller — orange */
.ev-sonstiges  { color: #a3a3a3; } /* Fallback — neutral */

/* ---------- Artikelprofil: Vergrößern + Teilen (KEIN Download) ---------- */
/* Auslöser am Profilbild: Lupe-Badge unten rechts, wie ein Zoom-Hinweis. */
.bv-profil-bild {
  position: relative; display: inline-block; padding: 0; border: 0;
  background: none; cursor: zoom-in; -webkit-tap-highlight-color: transparent;
}
.bv-profil-lupe {
  position: absolute; right: 0.35rem; bottom: 0.35rem;
  width: 1.6rem; height: 1.6rem; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.55); color: #fff; border-radius: 9999px;
  opacity: 0.85; transition: opacity 0.15s ease;
}
.bv-profil-lupe svg { width: 1rem; height: 1rem; }
.bv-profil-bild:hover .bv-profil-lupe { opacity: 1; }

.bv-profil-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 3.75rem 1rem 1.5rem; background: rgba(0,0,0,0.9);
}
.bv-profil-overlay[hidden] { display: none; }
.bv-profil-zu {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 2.75rem; height: 2.75rem; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.5);
  border-radius: 9999px; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background 0.15s ease;
}
.bv-profil-zu:active { background: rgba(255,255,255,0.3); }
.bv-profil-buehne {
  display: flex; flex-direction: column; align-items: center; gap: 1.25rem;
  max-width: 100%; max-height: 100%;
}
@media (min-width: 768px) {
  .bv-profil-buehne { flex-direction: row; align-items: center; gap: 2rem; }
}
.bv-profil-bildwrap { position: relative; display: flex; max-width: 100%; }
.bv-profil-gross {
  max-width: 100%; max-height: 70vh; object-fit: contain;
  border-radius: 0.5rem; box-shadow: 0 12px 48px rgba(0,0,0,0.55);
  -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none;
}
/* Dezentes BOAVISTA-Wasserzeichen mittig aufs Bild (Screenshot-/Klau-Schutz). */
.bv-profil-wz {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 45%; max-width: 220px; opacity: 0.22; pointer-events: none; user-select: none;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}
.bv-profil-panel {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: #fff; text-align: center; min-width: 180px;
}
.bv-profil-titel { font-weight: 600; font-size: 1.05rem; }
.bv-profil-untertitel {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.6); margin-top: 0.25rem;
}
.bv-profil-icons { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.6rem; }
.bv-profil-icon {
  width: 2.6rem; height: 2.6rem; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.45);
  border-radius: 9999px; color: #fff; cursor: pointer; text-decoration: none;
  -webkit-tap-highlight-color: transparent; transition: background 0.15s ease;
}
.bv-profil-icon:hover { background: rgba(255,255,255,0.28); }
.bv-profil-icon svg { width: 1.3rem; height: 1.3rem; }
.bv-profil-hinweis { font-size: 0.75rem; color: rgba(255,255,255,0.75); min-height: 1rem; }
.bv-profil-qr {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem; margin-top: 0.35rem;
}
.bv-profil-qr canvas { background: #fff; border-radius: 0.4rem; padding: 0.25rem; width: 132px; height: 132px; }
.bv-profil-qr span { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.6); }

/* ==========================================================================
   REDESIGN 2026-07 — Startseiten-/Shell-Design (Design-Handoff „Startseite").
   Selbst gehostete Fonts, Design-Tokens, Full-Height-Sidebar + Main-Topbar,
   Buzzer-Footer. Legt sich über die bestehende Struktur; keine Funktion entfällt.
   ========================================================================== */

/* ---- Selbst gehostete Fonts (kein externer Request, PWA-tauglich) ---- */
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 400 800;
  font-display: swap; src: url('/assets/fonts/publicsans-var.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('/assets/fonts/ibmplexmono-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500;
  font-display: swap; src: url('/assets/fonts/ibmplexmono-500.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600;
  font-display: swap; src: url('/assets/fonts/ibmplexmono-600.woff2') format('woff2'); }

/* ---- Design-Tokens ---- */
:root {
  --bv-canvas: #f6f6f3; --bv-card: #fff; --bv-card-rand: #e8e7e2;
  --bv-hair: #ecebe5; --bv-hair2: #f1f0ea; --bv-outer: #dcdbd3;
  --bv-t1: #191a19; --bv-t2: #4c4c46; --bv-t3: #8a8a83; --bv-t3b: #9a9a92;
  --bv-label: #b3b2aa; --bv-faint: #a8a79f;
  --bv-rot: #e2231a; --bv-rot-h: #c81d15; --bv-rot-soft: #fbe9e7; --bv-rot-soft2: #fdf1f0;
  --bv-blau: #1467c8; --bv-blau2: #2f8ef0;
  --bv-sans: 'Public Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --bv-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
  --bv-shadow-card: 0 12px 26px -18px rgba(0,0,0,.35);
}

/* ---- Basis: Font + Canvas app-weit ---- */
body { font-family: var(--bv-sans); }
body.bv-app { background: var(--bv-canvas); }
.bv-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.bv-scroll::-webkit-scrollbar-thumb { background: #d6d5cd; border-radius: 8px; }
@keyframes bv-glow { 0% { opacity: .35; } 100% { opacity: 1; } }

/* ---- Shell: Sidebar links (voll hoch) + Main mit eigener Topbar ---- */
/* 100dvh statt 100vh (mit vh-Fallback für alte Browser): am Mobilgerät ist 100vh
   höher als der sichtbare Ausschnitt (Safari-Toolbar) — das Fenster selbst wurde
   dadurch scrollbar und der Anker-Sprung (#chat-…) schob die Topbar aus dem Bild;
   zurückscrollen ging wegen overflow:hidden nicht. dvh folgt dem sichtbaren Maß. */
/* overflow:clip statt hidden (hidden bleibt als Fallback): hidden-Boxen sind
   PROGRAMMATISCH scrollbar — der Sprung zum #chat-…-Anker scrollte die Shell
   selbst und schob die Topbar unerreichbar aus dem Bild. clip verbietet jedes
   Scrollen der Shell. */
.bv-shell { display: flex; height: 100vh; height: 100dvh; width: 100%; position: relative; overflow: hidden; overflow: clip; }
.bv-side {
  background: var(--bv-card); border-right: 1px solid var(--bv-hair);
  display: flex; flex-direction: column; flex-shrink: 0;
  width: 246px; height: 100vh; height: 100dvh; position: relative;
}
.bv-side-logo {
  padding: 24px 20px 18px; display: flex; align-items: center; justify-content: center;
  position: relative; flex-shrink: 0;
}
/* Marken-Logo prominent + horizontal zentriert in der Menüspalte. */
.bv-side-logo img.bv-logo { height: 57px; width: auto; max-width: 100%; display: block; }
.bv-side-close { position: absolute; right: 12px; top: 20px; }
.bv-side-firma { padding: 0 16px 10px; display: flex; justify-content: center; }
.bv-side-firma img { max-height: 2rem; max-width: 9rem; object-fit: contain; }
.bv-nav {
  padding: 4px 12px 16px; display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto; flex: 1; min-height: 0;
}
.bv-nav-gruppe {
  padding: 16px 12px 6px; font: 600 11px var(--bv-mono);
  letter-spacing: .09em; color: var(--bv-label); text-transform: uppercase;
}
.bv-nav-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  text-decoration: none; font-size: 14px; font-weight: 500; color: var(--bv-t2);
  transition: background .15s ease, color .15s ease; position: relative;
}
.bv-nav-item svg { width: 18px; height: 18px; flex: none; }
.bv-nav-item:hover { background: #f3f2ed; color: var(--bv-t1); }
.bv-nav-item--an, .bv-nav-item--an:hover {
  background: var(--bv-rot-soft); color: var(--bv-rot); font-weight: 600;
}
.bv-nav-item--zu {
  color: #cfcec7; cursor: not-allowed; font-weight: 500;
}
.bv-nav-item--zu:hover { background: transparent; color: #cfcec7; }
.bv-nav-trenner { height: 1px; background: var(--bv-hair); margin: 8px 12px; border: 0; }
/* Badge (Ungelesen-Zähler) rechts im Nav-Eintrag */
.bv-nav-item .news-badge--nav { margin-left: auto; }

/* ---- Buzzer-Footer (Sidebar unten, fix) ---- */
/* Etwas mehr Abstand nach oben, keine Trennlinie — der Buzzer steht allein. */
.bv-side-fuss { padding: 22px 12px 14px; flex-shrink: 0; }
/* Buzzer RAHMENLOS, groß, zentriert, ohne Beschriftung — steht allein unter dem Menü. */
.bv-buzzer {
  display: flex; align-items: center; justify-content: center; width: 100%; padding: 4px;
  border: 0; background: transparent; border-radius: 12px;
  cursor: pointer; transition: transform .12s ease; margin-bottom: 6px;
}
.bv-buzzer:hover { background: transparent; }
.bv-buzzer:active { transform: scale(.96); }
.bv-buzzer:focus-visible { outline: 3px solid #93c5fd; outline-offset: 3px; border-radius: 12px; }
/* Wollezei = Hochformat: Strickmütze (eigenes Foto JE FARBE) auf schwarzem Sockel. Welches
   Bild angezeigt wird, setzt fuss.js anhand der gewählten Farbe (Blau = Original-Foto, andere
   Farben = eigene Dateien wollezei-<farbe>.png). Ein farbiger Halo (--wz-glow) hinter der
   Mütze leuchtet nur im Warn-/Reload-Zustand — im Ruhezustand ist er unsichtbar. */
.bv-buzzer { --wz-glow: 47,142,240; }
.bv-buzzer-bild { position: relative; width: 122px; height: 163px; flex-shrink: 0; display: block; }
.bv-buzzer-ambient {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%,-50%);
  width: 185%; height: 168%; z-index: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side circle,
              rgba(var(--wz-glow), 1) 0%, rgba(var(--wz-glow), .45) 44%, transparent 78%);
  transition: opacity .3s ease;
}
.bv-buzzer-bild img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 2;
  transition: filter .35s ease;
}
.bv-buzzer-txt { flex: 1; min-width: 0; }
.bv-buzzer-titel { display: block; font-size: 13.5px; font-weight: 600; color: var(--bv-t1); }
.bv-buzzer-status { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.bv-buzzer-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #c9c8c0; flex-shrink: 0;
  transition: box-shadow .2s ease, background .2s ease;
}
.bv-buzzer-label { font: 500 11px var(--bv-mono); color: var(--bv-t3); }
/* Zustand busy (Reload-Klick): kräftiges Aufleuchten der Mütze + Leucht-Rand + Halo —
   genauso stark wie der Popup-Blitz. */
.bv-buzzer.busy .bv-buzzer-bild img { filter: brightness(2.0) saturate(1.5) drop-shadow(0 0 13px rgba(var(--wz-glow), 1)); }
.bv-buzzer.busy .bv-buzzer-ambient { opacity: 1; animation: bv-glow .55s ease-in-out infinite alternate; }
.bv-buzzer.busy .bv-buzzer-dot { background: var(--bv-blau2); box-shadow: 0 0 8px 1px rgba(47,142,240,.95); }
.bv-buzzer.busy .bv-buzzer-label { color: var(--bv-blau); }
@media (prefers-reduced-motion: reduce) {
  .bv-buzzer.busy .bv-buzzer-ambient { animation: none; }
}
/* Zustand schwach (Warnung): die Mütze LEUCHTET kräftig — der Farb-Halo pulst und das Bild
   wird deutlich heller/gesättigter MIT farbigem Leucht-Rand (so stark wie im Popup). */
.bv-buzzer.schwach .bv-buzzer-bild img { animation: bv-wz-glueh 1.25s ease-in-out infinite; }
.bv-buzzer.schwach .bv-buzzer-ambient { opacity: 1; animation: bv-wz-puls 1.25s ease-in-out infinite; }
@keyframes bv-wz-puls  { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes bv-wz-glueh {
  0%, 100% { filter: brightness(1.14) saturate(1.22) drop-shadow(0 0 5px rgba(var(--wz-glow), .55)); }
  50%      { filter: brightness(1.95) saturate(1.5) drop-shadow(0 0 13px rgba(var(--wz-glow), 1)); }
}
@media (prefers-reduced-motion: reduce) {
  .bv-buzzer.schwach .bv-buzzer-bild img { animation: none; filter: brightness(1.6) saturate(1.4) drop-shadow(0 0 10px rgba(var(--wz-glow), .9)); }
  .bv-buzzer.schwach .bv-buzzer-ambient { animation: none; opacity: .95; }
}

/* ── Wollezei-Einstellungsdialog: Rundumleuchte als Live-Vorschau ──
   Zeigt das Mützen-Bild der gewählten Farbe (Blau = Original, andere = eigene Dateien;
   fuss.js setzt die Quelle). Beim Antippen eines Farbkreises BLITZT sie kurz kräftig auf
   (Halo flart hell + Bild leuchtet), damit man die Farbe „leuchten" sieht. */
.bv-wz-lampe { position: relative; width: 64px; height: 86px; margin: 0 auto .5rem; }
.bv-wz-lampe img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 2;
}
.bv-wz-lampe-schein {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%);
  width: 190%; height: 165%; z-index: 0; pointer-events: none; opacity: .22;
  background: radial-gradient(closest-side circle,
              rgba(var(--wz-glow), .85) 0%, rgba(var(--wz-glow), .3) 46%, transparent 78%);
  transition: background .3s ease;
}
/* Kräftiges kurzes Aufblitzen beim Klick auf einen Farbkreis (ohne Ton). */
.bv-wz-lampe.aufblinken .bv-wz-lampe-schein { animation: bv-wz-flare .8s ease-out; }
.bv-wz-lampe.aufblinken .bv-wz-lampe-mtz    { animation: bv-wz-flare-bild .8s ease-out; }
@keyframes bv-wz-flare { 0% { opacity: .22; } 14% { opacity: 1; } 100% { opacity: .22; } }
@keyframes bv-wz-flare-bild {
  0%   { filter: none; }
  14%  { filter: brightness(2.09) saturate(1.45) drop-shadow(0 0 14px rgba(var(--wz-glow), 1)); }
  100% { filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bv-wz-lampe-schein { transition: none; }
  .bv-wz-lampe.aufblinken .bv-wz-lampe-schein,
  .bv-wz-lampe.aufblinken .bv-wz-lampe-mtz { animation: none; }
}
/* WOLLEZEI™ als Marken-Link (Großbuchstaben, hochgestelltes ™ rechts oben).
   Das ™ liegt ABSOLUT außerhalb des Wortkastens (left:100%), zählt also nicht zur
   Breite — dadurch wird beim Zentrieren nur das Wort „WOLLEZEI" berücksichtigt und die
   darüber (ebenfalls zentriert) stehende Rundumleuchte sitzt mittig über den Buchstaben. */
.bv-wz-marke {
  position: relative; color: inherit; text-decoration: none; letter-spacing: .04em;
  display: inline-block;
}
.bv-wz-marke:hover { text-decoration: underline; }
.bv-wz-tm {
  position: absolute; top: -.1em; left: 100%; margin-left: .1em;
  font-size: .5em; font-weight: 600; letter-spacing: 0; line-height: 1;
}
/* Legacy-Partnerlogos/Impressum unter dem Buzzer — kompakter */
.bv-side-fuss .nav-fuss { padding: 12px 4px 2px; gap: .5rem; }

/* ---- Main + Topbar ---- */
.bv-main { flex: 1; display: flex; flex-direction: column; min-width: 0; height: 100vh; height: 100dvh; }
.bv-topbar {
  height: 64px; flex-shrink: 0; border-bottom: 1px solid var(--bv-hair); background: var(--bv-card);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px;
}
.bv-topbar-links { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bv-topbar-titel {
  font-size: 16px; font-weight: 700; color: var(--bv-t1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bv-topbar-rechts { display: flex; align-items: center; gap: 8px; }
.bv-topbar-palm { height: 28px; width: auto; }
.bv-topbar-trenner { width: 1px; height: 26px; background: var(--bv-hair); margin: 0 2px; flex: none; }
/* Konto: Avatar mit Initialen + Name */
.bv-konto { display: flex; align-items: center; gap: 10px; padding: 4px; border-radius: 10px;
  text-decoration: none; color: inherit; transition: background .15s ease; }
.bv-konto:hover { background: #f4f3ee; }
.bv-avatar {
  width: 32px; height: 32px; border-radius: 8px; background: var(--bv-t1); color: #fff;
  display: grid; place-items: center; font: 700 12px var(--bv-sans); flex: none;
}
.bv-konto-name { line-height: 1.15; padding-right: 4px; font-size: 13px; font-weight: 600; color: var(--bv-t1); }
/* position:relative: absolut positionierte Nachfahren (z. B. sr-only-versteckte
   Inputs) ankern damit IM Scroll-Container statt an .bv-shell — sie können die
   Shell also nicht mehr vertikal aufblähen (siehe .bv-shell/.datei-knopf). */
.bv-content { flex: 1; overflow-y: auto; padding: 26px 22px 48px; position: relative; }
.bv-content-innen { max-width: 1180px; margin: 0 auto; }

/* ---- Karten-Look (ersetzt $karte = bg-white rounded-xl shadow p-5) ---- */
.bv-card {
  background: var(--bv-card); border: 1px solid var(--bv-card-rand); border-radius: 16px; padding: 20px;
}
/* KPI-Kacheln */
.bv-kpi {
  background: var(--bv-card); border: 1px solid var(--bv-card-rand); border-radius: 16px;
  padding: 18px 18px 16px; text-decoration: none; display: block;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
a.bv-kpi:hover { border-color: var(--bv-outer); transform: translateY(-2px); box-shadow: var(--bv-shadow-card); }
.bv-kpi-label { font: 600 11px var(--bv-mono); letter-spacing: .05em; color: var(--bv-t3b); text-transform: uppercase; }
.bv-kpi-wert { font-size: 32px; font-weight: 800; color: var(--bv-t1); font-variant-numeric: tabular-nums; line-height: 1; margin-top: 12px; }
/* Begrüßung / Steckbrief-Kachel (Avatar + Fakten) */
.bv-hallo-datum { font: 500 12px var(--bv-mono); color: var(--bv-faint); letter-spacing: .04em; text-transform: uppercase; }
.bv-hallo-titel { margin: 6px 0 0; font-size: 24px; font-weight: 800; color: var(--bv-t1); letter-spacing: -0.01em; }
.bv-hallo { display: flex; align-items: center; gap: 18px; }
.bv-hallo-avatar { flex: none; }
.bv-hallo-avatar img, .bv-hallo-avatar span { box-shadow: 0 2px 8px rgba(0,0,0,.14); }
.bv-hallo-haupt { flex: 1; min-width: 0; }
.bv-hallo-sub { margin-top: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bv-hallo-rolle {
  font: 600 11px var(--bv-mono); letter-spacing: .05em; text-transform: uppercase;
  color: var(--bv-rot); background: var(--bv-rot-soft); padding: 3px 10px; border-radius: 9999px; flex: none;
}
.bv-hallo-firma {
  font-size: 14px; font-weight: 600; color: var(--bv-t2);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bv-hallo-meta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.bv-hallo-fakt { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--bv-t3); }
.bv-hallo-fakt svg { width: 15px; height: 15px; color: var(--bv-faint); flex: none; }
.bv-hallo-fakt b { color: var(--bv-t1); font-weight: 700; }
.bv-hallo-koll { display: inline-flex; align-items: center; }
.bv-hallo-koll .av { display: inline-flex; margin-left: -7px; }
.bv-hallo-koll .av:first-child { margin-left: 0; }
.bv-hallo-koll .av img, .bv-hallo-koll .av span { box-shadow: 0 0 0 2px var(--bv-card); }
.bv-hallo-logo { margin-left: auto; align-self: flex-start; flex: none; }
@media (max-width: 767px) {
  .bv-hallo { flex-wrap: wrap; gap: 14px; }
  .bv-hallo-avatar { order: 0; }
  .bv-hallo-logo { margin-left: auto; align-self: center; }
}

/* ---- Mobil: Sidebar wird Off-Canvas-Drawer (nutzt bestehende .nav-offen-Logik) ---- */
@media (max-width: 767px) {
  .bv-side { display: none; }
  .bv-topbar { padding: 0 14px; }
  .bv-content { padding: 18px 14px 40px; }
  /* Mobil: Seitentitel rechts der Palme ausblenden — wird eh eingekürzt/schwer lesbar. */
  .bv-topbar-titel { display: none; }
}
/* Drawer-Zustand: die bestehende Regel body.nav-offen .nav-spalte übernimmt Position/
   Breite/Schatten; hier nur sicherstellen, dass die Flex-Spalte sichtbar wird. */
body.nav-offen .bv-side { display: flex; }

/* ---- Ruhe-Nachschärfung (Topbar entrümpeln, Schnellzugriff kompakt) ---- */
/* Topbar rechts: die zusätzlichen Chat-Rollen-Icons (Zahnräder/Person) ausblenden —
   nur die klaren Sprechblasen mit Zähler bleiben. Das nimmt die Unruhe raus. */
.bv-topbar-rechts { gap: 10px; }
.bv-topbar-rechts .chat-rolle { display: none; }
.bv-topbar-rechts .chat-kopf { margin-left: 0; gap: 8px; }
.bv-topbar-rechts .chat-leiste { gap: 0; }
/* Glocke, Logout: gleiche dezente Icon-Optik, gleiche Trefferfläche */
.bv-topbar-rechts .kopf-glocke { color: var(--bv-t2); width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; }
.bv-topbar-rechts .kopf-glocke:hover { background: #f4f3ee; }
/* (Schnellzugriff-Kompaktstil liegt im inline <style> von dashboard.php, da dieses
   nach custom.css lädt und sonst gewinnt.) */

/* ============================================================================
   Öffentliche Gast-Seiten (Showroom, News) — an das App-Design-System angeglichen.
   Ersetzt den alten grellroten Vollbalken + grauen Canvas durch Canvas-Tokens,
   weißen Header mit Haarlinie und weiche Karten (wie in der eingeloggten App).
   ========================================================================== */
.bv-gast { min-height: 100svh; display: flex; flex-direction: column; background: var(--bv-canvas); color: var(--bv-t1); }
.bv-gast-kopf {
  position: sticky; top: 0; z-index: 30;
  background: rgba(246, 246, 243, .88); /* Fallback ohne color-mix */
  background: color-mix(in srgb, var(--bv-canvas) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--bv-card-rand);
}
.bv-gast-kopf-innen {
  max-width: 72rem; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem 1.25rem;
}
.bv-gast-marke { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.bv-gast-logo { height: 28px; width: auto; display: block; }
.bv-gast-cta {
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
  color: var(--bv-rot); text-decoration: none; white-space: nowrap;
  padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--bv-rot-soft);
  background: var(--bv-rot-soft2); transition: background .15s, color .15s, border-color .15s;
}
.bv-gast-cta:hover { color: #fff; background: var(--bv-rot); border-color: var(--bv-rot); }
.bv-gast-main { flex: 1; width: 100%; max-width: 72rem; margin: 0 auto; padding: 1.75rem 1.25rem 2.5rem; }
.bv-gast-main--schmal { max-width: 56rem; }
.bv-gast-main--artikel { max-width: 48rem; }
/* Weiche Karte im App-Stil (Kante + Schatten aus den Tokens). */
.bv-gast-card { background: var(--bv-card); border: 1px solid var(--bv-card-rand); border-radius: 18px; box-shadow: var(--bv-shadow-card); }
.bv-gast-card--hover { transition: box-shadow .18s, transform .18s, border-color .18s; }
.bv-gast-card--hover:hover { box-shadow: 0 18px 34px -20px rgba(0,0,0,.42); border-color: var(--bv-outer); transform: translateY(-2px); }
.bv-gast-titel { color: var(--bv-t1); }
.bv-gast-rotlink { color: var(--bv-rot); }
.bv-gast-rotlink:hover { color: var(--bv-rot-h); text-decoration: underline; }
/* Platzhalter-Fläche (kein Titelbild) auf Token-Farben. */
.bv-gast-platzhalter { background: var(--bv-hair2); color: var(--bv-t3); }
/* Rot vereinheitlichen: Tailwinds Default-Rot (#b91c1c/#dc2626) app- UND gastweit
   aufs Marken-Rot #e2231a (--bv-rot) ziehen. Scope: .bv-app (eingeloggte Shell) +
   .bv-gast (öffentliche/Gast-Seiten) — deckt jede Seite ab, ohne Tailwinds globale
   Utilities für Drittzwecke zu überschreiben. */
.bv-app .text-red-700,           .bv-gast .text-red-700           { color: var(--bv-rot); }
.bv-app .text-red-600,           .bv-gast .text-red-600           { color: var(--bv-rot); }
.bv-app .hover\:text-red-700:hover, .bv-gast .hover\:text-red-700:hover { color: var(--bv-rot); }
.bv-app .hover\:text-red-800:hover, .bv-gast .hover\:text-red-800:hover { color: var(--bv-rot-h); }
.bv-app .bg-red-700,             .bv-gast .bg-red-700             { background-color: var(--bv-rot); }
.bv-app .hover\:bg-red-800:hover,   .bv-gast .hover\:bg-red-800:hover   { background-color: var(--bv-rot-h); }
.bv-app .border-red-700,         .bv-gast .border-red-700         { border-color: var(--bv-rot); }
.bv-app .hover\:border-red-700:hover, .bv-gast .hover\:border-red-700:hover { border-color: var(--bv-rot); }

/* ---- In-App-Hilfe ---- */
/* Rundumleuchte: blau blinkendes Menü-Icon (Polizei-Beacon). Bewusst Blau statt
   Rot, damit es nicht mit dem roten Header/aktiven Nav-Zustand kollidiert. */
@keyframes bv-rundumleuchte-blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.bv-nav-item .bv-rundumleuchte { color: #2563eb; animation: bv-rundumleuchte-blink 1.15s ease-in-out infinite; }
.bv-nav-item--an .bv-rundumleuchte { color: var(--bv-rot); }              /* aktiver Punkt: zur Marke */
.bv-nav-item--zu .bv-rundumleuchte { color: inherit; animation: none; }  /* ausgegraut: ruhig */
.bv-rundumleuchte-gross { color: #2563eb; display: inline-flex; animation: bv-rundumleuchte-blink 1.15s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .bv-nav-item .bv-rundumleuchte, .bv-rundumleuchte-gross { animation: none; }
}
/* Kapiteltext (kommt als HTML aus Registry/Redaktion; Tailwind hat kein prose-Plugin) */
.hilfe-inhalt > :first-child { margin-top: 0; }
.hilfe-inhalt p { margin: 0 0 .7em; }
.hilfe-inhalt ul, .hilfe-inhalt ol { margin: 0 0 .7em; padding-left: 1.35em; }
.hilfe-inhalt ul { list-style: disc; }
.hilfe-inhalt ol { list-style: decimal; }
.hilfe-inhalt li { margin: .2em 0; }
.hilfe-inhalt h4, .hilfe-inhalt h5 { font-weight: 600; color: var(--bv-t1); margin: 1.1em 0 .4em; }
.hilfe-inhalt strong, .hilfe-inhalt b { font-weight: 600; color: var(--bv-t1); }
.hilfe-inhalt a { color: var(--bv-rot); text-decoration: underline; }
.hilfe-box { border-radius: 10px; padding: 12px 14px; margin: .8em 0; border: 1px solid transparent; font-size: .95em; }
.hilfe-box-info    { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.hilfe-box-tipp    { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.hilfe-box-warnung { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.hilfe-box > :last-child { margin-bottom: 0; }

/* ============================================================================
   Artikel-Creator — visueller Live-Konfigurator
   Zwei Spalten: links die große Live-Vorschau (auf Desktop klebend), rechts das
   Formular. Style → Farbe → Veredelung: das Rendering zieht sofort nach, die
   gewählte Veredelungsposition blinkt am Bild, das Motiv erscheint live.
   Akzentfarbe bewusst Blau (#2563eb) — beißt sich nicht mit dem roten Header.
   ========================================================================== */
.bv-creator { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .bv-creator { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } }

.bv-live { position: static; }
@media (min-width: 900px) { .bv-live { position: sticky; top: 1rem; } }
.bv-live-buehne { background:#fff; border-radius:.75rem; box-shadow:0 1px 3px rgba(0,0,0,.08); padding:1rem; }
.bv-live-bild { width:100%; min-height:220px; display:flex; align-items:center; justify-content:center; }
.bv-live-bild svg { width:100%; height:auto; max-height:62vh; display:block; }
.bv-live-platzhalter { color:#a3a3a3; text-align:center; font-size:.9rem; padding:2.5rem 1rem; line-height:1.5; }
.bv-live-platzhalter .schritt { display:block; font-weight:600; color:#737373; margin-bottom:.25rem; }
.bv-live-info { margin-top:.75rem; display:flex; align-items:center; gap:.75rem; flex-wrap:wrap; min-height:1.5rem; }
.bv-live-info .name { font-weight:600; color:#262626; }
.bv-live-info .farbe { display:inline-flex; align-items:center; gap:.4rem; color:#525252; font-size:.85rem; }
/* display:inline-flex überschreibt sonst das hidden-Attribut — ohne diese Regel
   bliebe die Farbzeile nach dem Zurücksetzen (Zurück-Stufe) sichtbar stehen. */
.bv-live-info .farbe[hidden] { display:none; }
.bv-live-swatch { width:1.1rem; height:1.1rem; border-radius:9999px; border:1px solid #d4d4d4; flex:none; }
.bv-live-hinweis { margin-top:.4rem; font-size:.72rem; color:#a3a3a3; }

/* Orientierungshinweis unter der Live-Vorschau: die Konfigurator-Darstellung
   (Farben, Drucke, Stick) ist bewusst nur grobe Orientierung fürs preisliche
   Angebot, nie final. Blaue Karte im normalen App-Look (Rechteck, abgerundet). */
.bv-orientierung { margin-top:.75rem; display:flex; align-items:flex-start; gap:.6rem;
  background:#eff6ff; border:1px solid #bfdbfe; border-radius:.75rem;
  padding:.65rem .85rem; color:#1e40af; font-size:.8rem; line-height:1.45;
  transition:background .3s, border-color .3s, color .3s; }
.bv-orientierung-icon { flex:none; width:1.3rem; height:1.3rem; border-radius:9999px;
  background:#2563eb; color:#fff; font-weight:700; font-size:.85rem;
  display:inline-flex; align-items:center; justify-content:center; transition:background .3s; }
.bv-orientierung strong { display:block; color:#1e3a8a; transition:color .3s; }
.bv-orientierung-liste { list-style:disc; margin:.3rem 0; padding-left:1.1rem;
  display:flex; flex-direction:column; gap:.2rem; }
/* Sobald ein Style gewählt ist, tritt der Hinweis zurück: helles Grau statt Blau —
   weiterhin lesbar, aber das Hauptaugenmerk liegt auf dem Artikel. */
.bv-orientierung.bv-gedimmt { background:#fafafa; border-color:#e5e5e5; color:#a3a3a3; }
.bv-orientierung.bv-gedimmt .bv-orientierung-icon { background:#d4d4d4; }
.bv-orientierung.bv-gedimmt strong { color:#737373; }

/* Aktive Veredelungsposition: Slot-Rechteck am Rendering blinkt als Hinweis. */
rect.bv-slot-aktiv { fill:rgba(37,99,235,.10); stroke:#2563eb; stroke-width:2.5; stroke-dasharray:7 4;
  animation:bv-slot-blink 1.1s ease-in-out infinite; }
@keyframes bv-slot-blink { 0%,100% { opacity:.3; } 50% { opacity:1; } }

/* Farb-Swatch-Palette (Markenfarben / TPX) statt Dropdown. */
.bv-swatches { display:flex; flex-wrap:wrap; gap:.5rem; }
.bv-swatch { display:flex; flex-direction:column; align-items:center; gap:.25rem; width:3.75rem;
  border:0; background:none; cursor:pointer; padding:.25rem; border-radius:.5rem; }
.bv-swatch:hover { background:#f5f5f5; }
.bv-swatch-kreis { width:2rem; height:2rem; border-radius:9999px; border:1px solid #d4d4d4; flex:none; }
.bv-swatch-kreis.ohne-hex { background:
  repeating-linear-gradient(45deg,#f5f5f5 0 4px,#e5e5e5 4px 8px); }
.bv-swatch-txt { font-size:.62rem; color:#525252; line-height:1.15; text-align:center;
  max-width:3.75rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bv-swatch[aria-pressed="true"] { background:#f5f5f5; }
.bv-swatch[aria-pressed="true"] .bv-swatch-kreis { outline:3px solid #525252; outline-offset:1px; border-color:#525252; }

/* Konfig-Abschnitte bleiben gedimmt/gesperrt, bis ein Textilstyle gewählt ist. */
[data-needs-style].bv-gesperrt { opacity:.45; pointer-events:none; filter:saturate(.4); }

/* Große, voll antippbare Detail-/Etikett-Reihen (mobil gut erreichbar). */
.bv-detail-row { display:flex; align-items:center; gap:.75rem; border:1px solid #e5e5e5; border-radius:.5rem;
  padding:.7rem .9rem; font-size:.9rem; color:#262626; cursor:pointer; min-height:2.75rem; }
.bv-detail-row:hover { border-color:#d4d4d4; background:#fafafa; }
.bv-detail-row:has(input:checked) { border-color:#a3a3a3; background:#f5f5f5; }

/* Style-Kacheln (Bild statt Dropdown) — Textilstyle als antippbare Vorschau. */
.bv-style-kacheln { display:grid; grid-template-columns:repeat(auto-fill, minmax(5.5rem, 1fr)); gap:.6rem; margin-top:.25rem; }
.bv-style-kachel { display:flex; flex-direction:column; align-items:center; gap:.35rem; padding:.5rem .35rem;
  border:1px solid #e5e5e5; border-radius:.6rem; background:#fff; cursor:pointer; transition:border-color .12s, box-shadow .12s; }
.bv-style-kachel:hover { border-color:#c9c9c9; }
.bv-style-kachel.aktiv { border-color:#2563eb; box-shadow:0 0 0 2px rgba(37,99,235,.25); }
.bv-style-bild { width:100%; aspect-ratio:1/1; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.bv-style-bild img { max-width:100%; max-height:100%; object-fit:contain; }
.bv-style-bild.leer::after { content:"◻"; color:#d4d4d4; font-size:1.5rem; }
.bv-style-name { font-size:.68rem; line-height:1.1; color:#525252; text-align:center; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; max-width:100%; }
.bv-style-kachel.aktiv .bv-style-name { color:#2563eb; font-weight:600; }

/* Kompakt-Modus nach der Style-Wahl: die Kacheln schrumpfen zu Text-Chips —
   weiterhin klickbar (Umentscheiden möglich), der Fokus wandert zur Farbe. */
.bv-style-picker.bv-kompakt .bv-style-kacheln { grid-template-columns:repeat(auto-fill, minmax(6.5rem, 1fr)); gap:.35rem; }
.bv-style-picker.bv-kompakt .bv-style-bild { display:none; }
.bv-style-picker.bv-kompakt .bv-style-kachel { padding:.3rem .4rem; }

/* Kompakt-Modus nach der Farbwahl: die Swatches schrumpfen zu kleinen Punkten
   ohne Beschriftung — die gewählte Farbe bleibt markiert, der Fokus wandert
   zur Veredelung (Applikationen). */
.bv-kompakt-farbe .bv-swatches { gap:.3rem; }
.bv-kompakt-farbe .bv-swatch { width:auto; padding:.15rem; }
.bv-kompakt-farbe .bv-swatch-kreis { width:1.15rem; height:1.15rem; }
.bv-kompakt-farbe .bv-swatch-txt { display:none; }
.bv-kompakt-farbe .bv-swatch[aria-pressed="true"] .bv-swatch-kreis { outline-width:2px; }


/* ---- Push-Kachel (/benachrichtigungen) ----
   Aus-Zustand: freundlich-grüne Einladung zum Einschalten (deutlich sichtbar,
   Grün beißt sich nicht mit dem roten Header). An-Zustand: halb ausgegraut,
   damit niemand auf die Idee kommt, wieder auszuschalten. Der Schalter ist
   bewusst ein abgerundetes Rechteck (inzwischen App-Standard). */
#push-kachel.push-aus { background: #ecfdf5; border: 1px solid #a7f3d0; }   /* emerald-50/200 */
#push-kachel.push-an { opacity: .55; }
#push-kachel.push-aus #push-schalter { background: #16a34a; color: #fff; border-color: transparent; }
#push-kachel.push-aus #push-schalter:hover { background: #15803d; color: #fff; }

/* ---- Web-Push-Schalter in der Topbar (#push-topbar, layout.php) ----
   Grundoptik erbt .kopf-glocke (34px-Trefferfläche, Hover-Fläche); hier nur
   Button-Reset + Zustände. Aus: grau mit orange pulsierendem Punkt als Einladung
   (Rot ist dem Header vorbehalten). An: Icon grün. Info (kein Support / iOS ohne
   Home-Bildschirm): ausgegraut sichtbar, Klick öffnet den Hinweis-Dialog. */
.push-topbar { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.push-topbar svg { width: 21px; height: 21px; }
.push-topbar-punkt { display: none; position: absolute; top: 3px; right: 3px;
  width: 9px; height: 9px; border-radius: 9999px; background: #ea580c; }
.push-topbar--aus .push-topbar-punkt { display: block; animation: push-puls 2s ease-in-out infinite; }
.push-topbar--an, .bv-topbar-rechts .push-topbar--an { color: #16a34a; }
.push-topbar--info { opacity: .4; }
@keyframes push-puls { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: .5; } }
