@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap');

/*
  Token-Set 1:1 aus dem Claude-Design-Handoff übernommen, siehe
  design/Outreach CRM Dashboard.dc.html (WZ_DARK/WZ_LIGHT-Konstanten).
  Dark = weiß-auf-schwarzes Glass, kein Farbakzent. Light = dieselbe
  Sprache dunkelgrau-auf-hell, Polarität getauscht -- keine dritte Farbe.
*/
:root {
  --wz-bg: #f2f2f2;
  --wz-surface-container-lowest: #ffffff;
  --wz-surface-container-low: #f7f7f7;
  --wz-surface-container: #f0f0f0;
  --wz-surface-container-high: #e8e8e8;
  --wz-surface-container-highest: #dedede;
  --wz-surface-bright: #ffffff;
  --wz-surface-variant: #e8e8e8;
  --wz-surface-dim: #e9e9e9;
  --wz-on-background: #1f2020;
  --wz-on-surface: #1f2020;
  --wz-on-surface-variant: #5b5d5d;
  --wz-outline: #8e9192;
  --wz-outline-variant: #dcdede;
  --wz-primary: #2f3131;
  --wz-on-primary: #ffffff;
  --wz-primary-hover: #1a1b1b;
  --wz-error: #ba1a1a;
  --wz-error-container: #ffdad6;
  --wz-success: #2f6b46;
  --wz-warning: #8a5a00;
  --wz-glass-bg: rgba(255, 255, 255, 0.6);
  --wz-glass-border: rgba(142, 145, 146, 0.4);
  --wz-glass-hover-bg: rgba(31, 32, 32, 0.05);
  --wz-glass-hover-border: rgba(142, 145, 146, 0.55);
  --wz-outline-alpha: rgba(31, 32, 32, 0.14);
  --wz-title-glow: none;
  --wz-result-on-success: #ffffff;
  --wz-result-on-error: #ffffff;
  --wz-result-on-warning: #ffffff;

  /* Rückwärtskompatible Aliase für bestehende Klassen */
  --wz-text: var(--wz-on-surface);
  --wz-text-secondary: var(--wz-on-surface-variant);
  --wz-page-bg: var(--wz-bg);
}

/* 'system': ohne explizites data-theme der Betriebssystem-Einstellung folgen */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --wz-bg: #000000;
    --wz-surface-container-lowest: #0d0e0e;
    --wz-surface-container-low: #1b1c1c;
    --wz-surface-container: #1f2020;
    --wz-surface-container-high: #292a2a;
    --wz-surface-container-highest: #343535;
    --wz-surface-bright: #393939;
    --wz-surface-variant: #343535;
    --wz-surface-dim: #131314;
    --wz-on-background: #e4e2e2;
    --wz-on-surface: #e4e2e2;
    --wz-on-surface-variant: #c4c7c8;
    --wz-outline: #8e9192;
    --wz-outline-variant: #444748;
    --wz-primary: #ffffff;
    --wz-on-primary: #2f3131;
    --wz-primary-hover: #e4e2e2;
    --wz-error: #ffb4ab;
    --wz-error-container: #93000a;
    --wz-success: #8bd5a0;
    --wz-warning: #f2c46d;
    --wz-glass-bg: rgba(25, 25, 25, 0.6);
    --wz-glass-border: rgba(142, 145, 146, 0.3);
    --wz-glass-hover-bg: rgba(255, 255, 255, 0.05);
    --wz-glass-hover-border: rgba(142, 145, 146, 0.5);
    --wz-outline-alpha: rgba(255, 255, 255, 0.15);
    --wz-title-glow: 0 0 20px rgba(255, 255, 255, 0.3);
    --wz-result-on-success: #12261a;
    --wz-result-on-error: #3a0d09;
    --wz-result-on-warning: #3a2a06;
  }
}

:root[data-theme='dark'] {
  --wz-bg: #000000;
  --wz-surface-container-lowest: #0d0e0e;
  --wz-surface-container-low: #1b1c1c;
  --wz-surface-container: #1f2020;
  --wz-surface-container-high: #292a2a;
  --wz-surface-container-highest: #343535;
  --wz-surface-bright: #393939;
  --wz-surface-variant: #343535;
  --wz-surface-dim: #131314;
  --wz-on-background: #e4e2e2;
  --wz-on-surface: #e4e2e2;
  --wz-on-surface-variant: #c4c7c8;
  --wz-outline: #8e9192;
  --wz-outline-variant: #444748;
  --wz-primary: #ffffff;
  --wz-on-primary: #2f3131;
  --wz-primary-hover: #e4e2e2;
  --wz-error: #ffb4ab;
  --wz-error-container: #93000a;
  --wz-success: #8bd5a0;
  --wz-warning: #f2c46d;
  --wz-glass-bg: rgba(25, 25, 25, 0.6);
  --wz-glass-border: rgba(142, 145, 146, 0.3);
  --wz-glass-hover-bg: rgba(255, 255, 255, 0.05);
  --wz-glass-hover-border: rgba(142, 145, 146, 0.5);
  --wz-outline-alpha: rgba(255, 255, 255, 0.15);
  --wz-title-glow: 0 0 20px rgba(255, 255, 255, 0.3);
  --wz-result-on-success: #12261a;
  --wz-result-on-error: #3a0d09;
  --wz-result-on-warning: #3a2a06;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: var(--wz-bg);
  color: var(--wz-on-background);
}

a {
  color: var(--wz-on-surface);
}

.wz-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.wz-card {
  background: var(--wz-glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--wz-glass-border);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
}

/* Nur die zentrierte Auth-Card (Login/Invite) bekommt eine feste Breite --
   .wz-card wird sonst überall (Dashboard, Kanban, Tabellen) wiederverwendet
   und darf dort nicht auf 400px gedeckelt werden. */
.wz-page .wz-card {
  max-width: 400px;
}

/* webzeugx-Logo auf der Login-Seite (login.ejs) -- dasselbe hochgeladene
   SVG wie companyLogoSvg im Topbar-Logo (siehe .wz-logo-svg/partials/
   header.ejs), hier nur größer, da es auf der Login-Seite das
   Hauptelement ist statt eine kleine Topbar-Marke. Textueller
   .wz-vendor-mark bleibt als Fallback, falls (noch) kein Logo hochgeladen
   wurde -- siehe login.ejs. */
.wz-login-logo {
  display: flex;
  justify-content: center;
  margin: 0 0 12px;
}

.wz-login-logo svg {
  height: 48px;
  width: auto;
  display: block;
}

.wz-vendor-mark {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--wz-on-surface-variant);
  text-align: center;
}

.wz-card--wide {
  max-width: 640px;
}

.wz-card h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
  text-shadow: var(--wz-title-glow);
}

.wz-hint {
  font-size: 13px;
  color: var(--wz-on-surface-variant);
  margin: 0 0 24px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
  margin-top: 16px;
}

input[type='email'],
input[type='password'],
input[type='text'],
input[type='tel'],
input[type='number'],
input[type='datetime-local'],
input[type='file'],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--wz-outline-variant);
  background: var(--wz-surface-container);
  color: var(--wz-on-surface);
  font-family: inherit;
  font-size: 14px;
  min-height: 44px;
  text-overflow: ellipsis;
}

textarea {
  border-radius: 12px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--wz-primary);
  outline-offset: 2px;
}

button,
.wz-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0 20px;
  min-height: 44px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  transition: background 150ms ease;
}

.wz-btn--primary {
  background: var(--wz-primary);
  color: var(--wz-on-primary);
  width: 100%;
  margin-top: 24px;
}

.wz-btn--primary:hover {
  background: var(--wz-primary-hover);
}

.wz-btn--secondary {
  background: var(--wz-glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--wz-glass-border);
  color: var(--wz-on-surface);
}

.wz-btn--secondary:hover {
  background: var(--wz-glass-hover-bg);
  border-color: var(--wz-glass-hover-border);
}

.wz-btn--destructive {
  background: transparent;
  border: 1px solid var(--wz-error);
  color: var(--wz-error);
}

.wz-link-btn {
  background: none;
  border: none;
  padding: 0;
  min-height: auto;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  font-size: 13px;
}

.wz-error {
  color: var(--wz-error);
  font-size: 13px;
  margin-top: 12px;
}

.wz-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--wz-glass-bg);
  border: 1px solid var(--wz-glass-border);
  color: var(--wz-on-surface-variant);
}

.wz-badge--success {
  color: var(--wz-success);
}
.wz-badge--warning {
  color: var(--wz-warning);
}
.wz-badge--error {
  color: var(--wz-error);
}

.wz-outcomes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.wz-outcomes button {
  flex: 1 1 auto;
}

.wz-kpi {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}

/* ---- App-Shell: Top-Bar + Sidebar ---- */

.wz-app {
  min-height: 100vh;
}

.wz-topbar {
  height: 80px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  background: var(--wz-glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--wz-glass-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.wz-logo {
  font-weight: 600;
  font-size: 20px;
}

.wz-topbar-spacer {
  flex: 1;
}

.wz-icon-btn {
  background: transparent;
  border: 1px solid var(--wz-outline-alpha);
  border-radius: 9999px;
  min-height: 44px;
  min-width: 44px;
  padding: 0;
  cursor: pointer;
  font-size: 16px;
  color: var(--wz-on-surface);
  /* Ergänzung 06.09.2026 (Nutzer-Fund): ohne explizites Flex-Centering
     stand das Icon eines <a>-basierten .wz-icon-btn (siehe .wz-bell-btn)
     nicht mittig im Kreis -- <button> bekam das über die UA-Stylesheet
     zufällig halbwegs hin, ein <a> nicht. Jetzt für BEIDE Element-Typen
     einheitlich zentriert, nicht nur für die Glocke. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
}

.wz-icon-btn:hover {
  background: var(--wz-glass-hover-bg);
}

/* Ergänzung 06.09.2026 -- Glocken-Symbol im Topbar (siehe partials/
   header.ejs), zeigt die Anzahl ungelesener Einträge aus dem
   Benachrichtigungs-Feed (lib/notifications.js). */
.wz-bell-btn {
  position: relative;
  font-size: 18px;
}

/* Ergänzung 06.09.2026 -- ungelesene Einträge auf /notifications (siehe
   notifications.ejs) optisch abgesetzt (Akzent-Rand), fett gedruckter Titel
   allein wäre bei kurzem Hinsehen leicht zu übersehen. */
.wz-notification-row.is-unread {
  border-left: 3px solid var(--wz-primary);
}

.wz-bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 9999px;
  background: var(--wz-error);
  color: var(--wz-result-on-error);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Ergänzung 07.09.2026 (Nutzer-Wunsch: "Animation hinzufügen, wenn etwas
   passiert ist, damit der Mitarbeiter es auch merkt") -- dezenter Puls auf
   Glocken-Icon (Topbar) UND Sidebar-Link, solange mind. 1 ungelesener
   Benachrichtigungs-Eintrag vorliegt (siehe header.ejs, has-unread-Klasse).
   @media (prefers-reduced-motion) deaktiviert die Animation komplett --
   der Badge/die Zahl bleibt trotzdem sichtbar, keine Information geht
   verloren, nur der Bewegungsreiz entfällt. */
@keyframes wz-notify-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

.wz-bell-btn.has-unread {
  animation: wz-notify-pulse 1.6s ease-in-out infinite;
}

.wz-nav-item.has-unread {
  animation: wz-notify-pulse 1.6s ease-in-out infinite;
  transform-origin: left center;
}

@media (prefers-reduced-motion: reduce) {
  .wz-bell-btn.has-unread,
  .wz-nav-item.has-unread {
    animation: none;
  }
}

.wz-preview-toggle {
  font-size: 12px;
  min-width: auto;
  padding: 0 14px;
  border: 1px solid var(--wz-outline-alpha);
  border-radius: 9999px;
}

.wz-user {
  font-size: 13px;
  color: var(--wz-on-surface-variant);
  white-space: nowrap;
}

.wz-hamburger {
  display: none;
  background: transparent;
  border: 1px solid var(--wz-glass-border);
  border-radius: 9999px;
  font-size: 20px;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
}

.wz-shell {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 80px);
}

.wz-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--wz-surface-container-low);
  border-right: 1px solid var(--wz-glass-border);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wz-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 16px;
  color: var(--wz-on-surface);
  text-decoration: none;
  font-size: 14px;
  opacity: 0.75;
}

.wz-nav-item:hover {
  background: var(--wz-glass-hover-bg);
}

.wz-nav-item.is-active {
  background: var(--wz-primary);
  color: var(--wz-on-primary);
  font-weight: 600;
  opacity: 1;
  box-shadow: inset 3px 0 0 var(--wz-on-primary);
}

.wz-nav-item.is-active:hover {
  background: var(--wz-primary-hover);
}

/* Verschachtelte Sidebar-Gruppe (aktuell nur "Mitarbeiter" -> Profil/
   Kalender/Inbox/Abwesenheiten) -- Gruppenkopf bleibt ein normaler
   .wz-nav-item, die Sub-Items sind eingerückte, kleinere Links darunter. */
.wz-nav-subitems {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 4px 14px;
  padding-left: 10px;
  border-left: 1px solid var(--wz-glass-border);
}

.wz-nav-subitem {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--wz-on-surface);
  text-decoration: none;
  font-size: 13px;
  opacity: 0.7;
}

.wz-nav-subitem:hover {
  background: var(--wz-glass-hover-bg);
}

.wz-nav-subitem.is-active {
  background: var(--wz-primary);
  color: var(--wz-on-primary);
  font-weight: 600;
  opacity: 1;
}

/* Gruppenkopf ist keine eigene Seite, nur eine Überschrift über den
   Sub-Items, aber klickbar zum Auf-/Zuklappen (siehe data-nav-group-toggle
   in public/app.js, Nutzer-Wunsch 22.08.2026 -- ursprünglich waren
   Untergruppen immer ausgeklappt, wie bei einem "echten" Nav-Item aber ohne
   eigene Zielseite). */
.wz-nav-item--label {
  cursor: pointer;
  font-weight: 600;
  opacity: 0.85;
  justify-content: space-between;
}

.wz-nav-group-chevron {
  font-size: 10px;
  transition: transform 150ms ease;
}

.wz-nav-item--label.is-collapsed .wz-nav-group-chevron {
  transform: rotate(-90deg);
}

.wz-nav-subitems.is-collapsed {
  display: none;
}

.wz-main {
  flex: 1;
  padding: 32px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

/* Board-/Pipeline-Seiten (.wz-kanban) dürfen breiter werden als der sonst
   auf Lesbarkeit gedeckelte Content-Bereich -- sonst muss man bei mehr als
   ~5 Spalten (siehe die 6 Board-Stufen in project-detail.ejs) auf so gut
   wie jedem Bildschirm horizontal scrollen. */
.wz-main:has(.wz-kanban) {
  max-width: 1900px;
}

.wz-drawer-overlay {
  display: none;
}

@media (max-width: 767px) {
  .wz-hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .wz-logo {
    font-size: 16px;
  }
  .wz-user {
    display: none;
  }
  /* Ergänzung 06.09.2026 (Responsive-Durchgang) -- .wz-topbar hat kein
     flex-wrap (sticky Header, feste 80px-Höhe soll nicht durch eine
     zweite Zeile brechen). Ohne diese Anpassung würde der Rollen-
     Vorschau-Button ("Vorschau: Mitarbeiter") zusammen mit Theme-Umschalter
     und Abmelden-Link auf schmalen Handy-Breiten (320-375px) über den
     Viewport hinausragen. Text durch ein kompaktes Icon ersetzen, Padding/
     Abstand verkleinern, statt den ganzen Button auszublenden -- die
     Funktion soll auf dem Handy weiter nutzbar bleiben. */
  .wz-topbar {
    padding: 0 12px;
    gap: 8px;
  }
  .wz-preview-toggle span {
    display: none;
  }
  .wz-preview-toggle::before {
    content: '👁';
  }
  .wz-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 250ms ease;
    z-index: 30;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  }
  .wz-sidebar.is-open {
    transform: translateX(0);
  }
  .wz-drawer-overlay.is-visible {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 20;
  }
  .wz-main {
    padding: 16px;
  }
}

/* ---- Tabellen (Mitarbeiter-/System-Einstellungen) ---- */

.wz-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.wz-table th,
.wz-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--wz-outline-variant);
}

.wz-table form {
  display: inline;
}

.wz-table button {
  padding: 0 14px;
  min-height: 32px;
  font-size: 13px;
}

/* Ergänzung 06.09.2026 (Responsive-Durchgang, Nutzer-Wunsch "gängige
   Displayauflösungen wichtig") -- Tabellen mit vielen Spalten (Kundendaten,
   Projekte, Mitarbeiter, Team-Ranking, ...) sprengen auf Tablet/Handy sonst
   das Layout oder quetschen jede Spalte unlesbar schmal. `display: block`
   auf dem <table>-Element selbst behält die interne Tabellen-Zellausrichtung
   bei (thead/tbody bleiben unverändert), macht das Element aber zu einem
   eigenen horizontal scrollbaren Container -- betrifft automatisch ALLE
   .wz-table-Vorkommen (24 Views), ohne jede einzelne Ansicht anzufassen. */
@media (max-width: 1023px) {
  .wz-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.wz-inline-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--wz-glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--wz-glass-border);
  border-radius: 16px;
}

.wz-inline-form > div {
  flex: 1 1 160px;
}

.wz-inline-form label {
  margin-top: 0;
}

/* Ergänzung 06.09.2026 (Responsive-Durchgang) -- 2-spaltige Formular-
   Abschnitte (bisher als Inline-Style dupliziert, z. B. "Kontakt anlegen"
   in contacts-list.ejs) brauchen auf schmalen Bildschirmen eine Spalte,
   sonst werden Eingabefelder unlesbar schmal gequetscht. */
.wz-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
}

@media (max-width: 639px) {
  .wz-form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.wz-toast {
  background: var(--wz-success);
  color: var(--wz-result-on-success);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: inline-block;
}

/* ---- Kanban (Pipeline) ---- */

.wz-kanban {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.wz-kanban-column {
  flex: 0 0 220px;
  background: var(--wz-surface-container-low);
  border: 1px solid var(--wz-glass-border);
  border-radius: 16px;
  padding: 12px;
}

/* Ziel-Karten (goals.ejs) tragen deutlich mehr Inhalt als Kontakt-/Aufgaben-
   Karten (Kategorie-Badge, Zeitraum, Fortschrittsbalken, Verantwortlicher,
   Projekt-Stunden, Notizen, 3 Aktions-Buttons + Bearbeiten-Panel) -- die
   Standard-220px-Spalte wirkt dafür gequetscht. Eigener Modifier statt die
   globale Breite zu ändern, damit Pipeline/Projekt-Board/Ideen unverändert
   bleiben. */
.wz-kanban-column--wide {
  flex-basis: 340px;
}

.wz-kanban-column-header {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wz-kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 40px;
}

.wz-kanban-cards.is-dragover {
  outline: 2px dashed var(--wz-primary);
  border-radius: 8px;
}

.wz-kanban-card {
  display: block;
  background: var(--wz-surface-container);
  border: 1px solid var(--wz-outline-variant);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--wz-on-surface);
  text-decoration: none;
  cursor: grab;
}

.wz-kanban-card:active {
  cursor: grabbing;
}

/* ---- Projekt-Board (project-detail.ejs) ---- */

.wz-board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

/* Unteraufgaben-Zeile beim "Aufgabe anlegen" -- Titel/Zuständig
   nebeneinander, damit mehrere Zeilen kompakt untereinander passen. */
.wz-subtask-create-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.wz-subtask-create-row input {
  flex: 1;
}

.wz-subtask-create-row select {
  flex: 0 0 180px;
}

.wz-kanban-column--add {
  flex: 0 0 200px;
  background: transparent;
  border: 1px dashed var(--wz-outline-variant);
  display: flex;
  flex-direction: column;
  align-self: flex-start;
}

/* Unteraufgaben-Zeile (Task-Detail-Modal, my-tasks.ejs) -- bewusst NICHT
   .wz-hint für den Titel-Text verwenden: dessen 24px-Bottom-Margin verzerrt
   die vertikale Zentrierung von Checkbox+Text in einer Flex-Zeile (Checkbox
   landet sichtbar unter statt neben dem Text). */
.wz-subtask-row {
  display: flex;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--wz-outline-variant);
}

.wz-subtask-row:first-child {
  border-top: none;
  padding-top: 0;
}

.wz-subtask-row input[type='checkbox'] {
  width: auto;
  margin: 2px 0 0;
  flex-shrink: 0;
}

.wz-subtask-row-body {
  flex: 1;
  min-width: 0;
}

.wz-subtask-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wz-subtask-title {
  font-size: 13px;
  font-weight: 600;
}

.wz-subtask-title.is-done {
  text-decoration: line-through;
  color: var(--wz-on-surface-variant);
  font-weight: 500;
}

.wz-subtask-desc {
  font-size: 12px;
  color: var(--wz-on-surface-variant);
  margin: 4px 0 0;
}

.wz-subtask-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--wz-on-surface-variant);
  margin-top: 6px;
}

.wz-board-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

/* ---- Kundendaten-Tabelle: Checkbox-Aktionsleiste ---- */

.wz-bulk-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--wz-surface-container-high);
  border: 1px solid var(--wz-outline-variant);
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 13px;
}

.wz-bulk-bar.is-visible {
  display: flex;
}

/* ---- Dashboard ---- */

.wz-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.wz-kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wz-on-surface-variant);
  margin: 0 0 4px;
}

.wz-page-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  text-shadow: var(--wz-title-glow);
}

.wz-pill-group {
  display: flex;
  gap: 6px;
  background: var(--wz-glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--wz-glass-border);
  border-radius: 9999px;
  padding: 4px;
}

.wz-pill {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 9999px;
  color: var(--wz-on-surface-variant);
  text-decoration: none;
  white-space: nowrap;
}

.wz-pill:hover {
  background: var(--wz-glass-hover-bg);
}

.wz-pill.is-active {
  background: var(--wz-primary);
  color: var(--wz-on-primary);
  font-weight: 600;
}

.wz-quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.wz-quick-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.wz-quick-form input[type='text'] {
  width: auto;
  min-width: 200px;
}

.wz-dash-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.wz-dash-row > .wz-card {
  min-width: 0;
}

.wz-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

/* Produkte/Angebote-Kacheln (products.ejs) -- brauchen mehr Raum als die
   kompakten KPI-Kacheln, da Beschreibungstext mit reinpassen muss. */
.wz-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 1023px) {
  .wz-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 639px) {
  .wz-products-grid {
    grid-template-columns: 1fr;
  }
}

.wz-stat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0;
  text-align: center;
}

.wz-dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.wz-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.wz-contact-grid > .wz-card {
  min-width: 0;
  margin: 0;
}

/* Ergänzung 08.09.2026 (Nutzer-Fund): die 3 Karten waren zuvor fest auf
   grid-column 1/2/3 gepinnt -- fehlt die mittlere Karte "Anreicherung
   (Crawler)" (Kontakte ohne KI-Anreicherung, z. B. per CSV/manuell
   angelegt statt gecrawlt), blieb Spalte 2 leer statt dass die Pipeline-
   Status-Karte nachrückt. Alle 3 Karten stehen im Markup bereits in der
   gewünschten Reihenfolge (Stammdaten -> Anreicherung -> Pipeline-Status),
   normale Grid-Auto-Platzierung reicht deshalb aus und füllt eine
   fehlende mittlere Karte automatisch auf. */

@media (max-width: 767px) {
  .wz-contact-grid {
    grid-template-columns: 1fr;
  }
}

.wz-card-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--wz-on-surface);
}

.wz-chart {
  width: 100%;
  height: auto;
  overflow: visible;
}

.wz-chart-axis {
  stroke: var(--wz-outline-variant);
  stroke-width: 1;
}

.wz-chart-line {
  stroke: var(--wz-primary);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.wz-chart-dot {
  fill: var(--wz-primary);
  stroke: var(--wz-surface-container-low);
  stroke-width: 2;
}

.wz-chart-label {
  fill: var(--wz-on-surface);
  font-size: 11px;
  font-family: 'Poppins', sans-serif;
}

.wz-hbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
}

.wz-hbar-label {
  flex: 0 0 120px;
  color: var(--wz-on-surface-variant);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wz-hbar-track {
  flex: 1;
  height: 16px;
  background: var(--wz-surface-container-high);
  border-radius: 4px;
  overflow: hidden;
}

.wz-hbar-fill {
  height: 100%;
  background: var(--wz-primary);
  border-radius: 4px;
}

.wz-hbar-value {
  flex: 0 0 60px;
  text-align: right;
  color: var(--wz-on-surface-variant);
}

/* Volle Breite statt fixer Label-Spalte -- für Ziel-Fortschrittsbalken auf
   Karten (siehe goals.ejs), wo der Kontext-Text schon außerhalb steht. */
.wz-goal-progress-track {
  height: 10px;
  background: var(--wz-surface-container-high);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}

.wz-goal-progress-fill {
  height: 100%;
  background: var(--wz-primary);
  border-radius: 4px;
}

.wz-logo-svg {
  display: inline-flex;
  align-items: center;
  height: 32px;
}

/* Hochgeladene Logos haben oft nur ein viewBox, kein width-/height-Attribut
   (siehe Einstellungen -> System -> Logo-Upload) -- mit nur max-height und
   ohne eine tatsächlich definite Höhe hat der Browser keine Basis, daraus
   eine Größe zu berechnen, und rendert das SVG unsichtbar bei 0x0. Eine
   definite height (statt max-height) plus width:auto nutzt das viewBox
   zuverlässig für das Seitenverhältnis. */
.wz-logo-svg svg {
  height: 32px;
  width: auto;
  display: block;
}

/* ---- Calling (Queue + Detail nebeneinander) ---- */

.wz-calling-layout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.wz-calling-list {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wz-calling-panel {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wz-queue-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 0.75rem;
  padding: 10px 12px;
  cursor: pointer;
  min-height: 44px;
  font-family: inherit;
  color: var(--wz-on-surface);
}

.wz-queue-row:hover {
  background: var(--wz-glass-hover-bg);
}

.wz-queue-row.is-active {
  background: var(--wz-surface-container-high);
}

.wz-queue-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.wz-queue-row-company {
  font-size: 13px;
  font-weight: 600;
}

.wz-queue-row-meta {
  font-size: 11px;
  color: var(--wz-on-surface-variant);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* "Warum jetzt anrufen"-Kontext (siehe lib/queue.js#computeQueueReason) --
   dezent hervorgehoben, damit der Grund nicht in der übrigen Meta-Zeile
   (Branche/Ort/Priorität) untergeht. */
.wz-queue-row-reason {
  color: var(--wz-warning);
  font-weight: 600;
}

.wz-queue-row-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--wz-surface-container-high);
  color: var(--wz-on-surface);
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wz-info-tile {
  background: var(--wz-surface-container);
  border: 1px solid var(--wz-outline-variant);
  border-radius: 1rem;
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wz-info-tile-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wz-on-surface-variant);
  margin: 0 0 2px;
}

.wz-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  min-width: 0;
}

.wz-info-row a {
  min-width: 0;
  overflow-wrap: anywhere;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.wz-ringing {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wz-ringing-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--wz-primary);
  animation: pulse-dot 1s ease-in-out infinite;
}

.wz-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 65;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.wz-modal {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  max-width: min(340px, 100%);
}

@media (max-width: 767px) {
  .wz-calling-list {
    width: 100%;
  }
}

/* ---- Kalender-Widget (Call-Screen) ---- */

.wz-calendar-day {
  position: relative;
  display: flex;
  margin-top: 6px;
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--wz-surface-container-high);
}

.wz-calendar-hours {
  position: relative;
  width: 44px;
  flex-shrink: 0;
}

.wz-calendar-hour-label {
  position: absolute;
  left: 0;
  right: 0;
  font-size: 10px;
  color: var(--wz-on-surface-variant);
  padding: 2px 4px;
  transform: translateY(-50%);
}

.wz-calendar-track {
  position: relative;
  flex: 1;
  border-left: 1px solid var(--wz-outline-variant);
}

.wz-calendar-gridline {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid var(--wz-outline-variant);
}

.wz-calendar-event {
  position: absolute;
  left: 4px;
  right: 4px;
  background: var(--wz-primary);
  color: var(--wz-on-primary);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1.3;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  z-index: 1;
}

.wz-calendar-now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--wz-error);
  z-index: 2;
}

.wz-calendar-allday-chip {
  background: var(--wz-primary);
  color: var(--wz-on-primary);
  border-radius: 9999px;
  padding: 2px 10px;
  font-size: 11px;
}

.wz-calendar-week {
  display: flex;
  gap: 6px;
}

.wz-calendar-week-day {
  flex: 1;
  min-width: 0;
  background: var(--wz-surface-container-high);
  border-radius: 0.5rem;
  padding: 6px;
}

.wz-calendar-week-day.is-today {
  outline: 2px solid var(--wz-primary);
  outline-offset: -2px;
}

.wz-calendar-week-day-header {
  font-size: 10px;
  font-weight: 600;
  color: var(--wz-on-surface-variant);
  text-transform: uppercase;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wz-calendar-week-event {
  font-size: 10px;
  background: var(--wz-primary);
  color: var(--wz-on-primary);
  border-radius: 4px;
  padding: 2px 4px;
  margin-bottom: 3px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.wz-calendar-month {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.wz-calendar-month-header {
  font-size: 10px;
  font-weight: 600;
  color: var(--wz-on-surface-variant);
  text-align: center;
  text-transform: uppercase;
}

.wz-calendar-month-cell {
  background: var(--wz-surface-container-high);
  border-radius: 0.5rem;
  padding: 4px;
  min-height: 52px;
  min-width: 0;
  font-size: 10px;
}

.wz-calendar-month-cell.is-today {
  outline: 2px solid var(--wz-primary);
  outline-offset: -2px;
}

.wz-calendar-month-cell.is-other-month {
  opacity: 0.35;
}

.wz-calendar-month-day-number {
  font-weight: 600;
  margin-bottom: 2px;
}

.wz-calendar-month-event {
  background: var(--wz-primary);
  color: var(--wz-on-primary);
  border-radius: 3px;
  padding: 1px 3px;
  margin-bottom: 2px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.wz-calendar-month-more {
  color: var(--wz-on-surface-variant);
  font-size: 9px;
}

/* ---- Team-Kalender Abwesenheiten (absences.ejs) ---- */
/* Zeilen = Mitarbeiter, Spalten = Tage -- kann bei einem 31-Tage-Monat
   breiter als der Content-Bereich werden, deshalb eigener Scroll-Container
   statt das ganze Layout zu sprengen (siehe dataviz-Skill: breiter Inhalt
   scrollt im eigenen Container, nicht die Seite). */
.wz-absence-calendar-scroll {
  overflow-x: auto;
  margin-bottom: 8px;
}

.wz-absence-calendar {
  border-collapse: collapse;
  font-size: 12px;
}

.wz-absence-calendar th,
.wz-absence-calendar td {
  padding: 2px;
  text-align: center;
  white-space: nowrap;
}

.wz-absence-calendar th.wz-absence-employee-col,
.wz-absence-calendar td.wz-absence-employee-col {
  text-align: left;
  padding-right: 12px;
  position: sticky;
  left: 0;
  background: var(--wz-surface-container-low);
}

.wz-absence-cell {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

.wz-absence-cell--approved {
  background: var(--wz-success);
}

.wz-absence-cell--pending {
  background: var(--wz-warning);
  opacity: 0.7;
}

.wz-absence-cell--sick {
  background: var(--wz-error);
}

.wz-absence-cell--neutral {
  background: var(--wz-on-surface-variant);
  opacity: 0.55;
}

.wz-absence-cell--neutral-pending {
  background: var(--wz-on-surface-variant);
  opacity: 0.3;
}

.wz-absence-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--wz-on-surface-variant);
  margin-bottom: 10px;
}

.wz-absence-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Inbox (inbox.ejs) -- Liste links, Detail+Antworten rechts, wie die
   meisten Mail-Clients ("wie Gmail, nur viel einfacher", siehe
   future-ideas.md). */
.wz-inbox-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 767px) {
  .wz-inbox-layout {
    grid-template-columns: 1fr;
  }
}

.wz-inbox-list {
  max-height: 70vh;
  overflow-y: auto;
}

.wz-inbox-row {
  padding: 10px 8px;
  border-bottom: 1px solid var(--wz-outline-variant);
  cursor: pointer;
  font-size: 13px;
  line-height: 1.4;
}

.wz-inbox-row:hover {
  background: var(--wz-glass-hover-bg);
}

.wz-inbox-row.is-active {
  background: var(--wz-surface-container-high);
}

.wz-inbox-row.is-unread strong {
  font-weight: 700;
}

.wz-inbox-body {
  border-top: 1px solid var(--wz-outline-variant);
  border-bottom: 1px solid var(--wz-outline-variant);
  padding: 12px 0;
  margin-bottom: 12px;
  max-height: 45vh;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.5;
}

.wz-inbox-body img {
  max-width: 100%;
}

/* Gerendeter Dokumentation-Artikel (doc-detail.ejs) -- Quill-erzeugtes,
   serverseitig sanitiziertes HTML (siehe lib/htmlSanitizer.js#sanitizeDocHtml)
   bekommt keine eigenen Klassen mit, deshalb Element-Selektoren statt .wz-*. */
.wz-doc-content {
  font-size: 14px;
  line-height: 1.6;
}

.wz-doc-content h1,
.wz-doc-content h2,
.wz-doc-content h3 {
  margin: 20px 0 8px;
}

.wz-doc-content h1:first-child,
.wz-doc-content h2:first-child,
.wz-doc-content h3:first-child {
  margin-top: 0;
}

.wz-doc-content p {
  margin: 0 0 12px;
}

.wz-doc-content ul,
.wz-doc-content ol {
  margin: 0 0 12px;
  padding-left: 24px;
}

.wz-doc-content blockquote {
  margin: 0 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--wz-outline-variant);
  color: var(--wz-on-surface-variant);
}

.wz-doc-content pre,
.wz-doc-content code {
  background: var(--wz-surface-container-high);
  border-radius: 6px;
  font-family: monospace;
}

.wz-doc-content pre {
  padding: 12px;
  overflow-x: auto;
  margin: 0 0 12px;
}

.wz-doc-content code {
  padding: 2px 4px;
}

/* ---- Geführte Tour (Produkt-Verbesserung, siehe public/app.js#initPageTour) ----
   Ergänzt den bestehenden Schritt-für-Schritt-Onboarding-Assistenten
   (separate Seiten) um eine Tooltip-Tour DIREKT auf den echten Arbeits-
   seiten (Dashboard/Pipeline/Calling) -- für fremde Reseller-Kunden ohne
   persönliche Einführung. Manuell per "❔ Tour"-Button gestartet, kein
   automatisches Aufpoppen (würde im täglichen Gebrauch nur stören). */
.wz-tour-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 70;
}

.wz-tour-highlight {
  position: fixed;
  border: 2px solid var(--wz-primary);
  border-radius: 12px;
  box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.55);
  background: transparent;
  z-index: 71;
  pointer-events: none;
  transition:
    top 150ms ease,
    left 150ms ease,
    width 150ms ease,
    height 150ms ease;
}

.wz-tour-tooltip {
  position: fixed;
  z-index: 72;
  background: var(--wz-surface-container-lowest);
  border: 1px solid var(--wz-glass-border);
  border-radius: 16px;
  padding: 16px;
  max-width: 300px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition:
    top 150ms ease,
    left 150ms ease;
}

.wz-tour-tooltip-title {
  font-weight: 700;
  margin: 0 0 6px;
}

.wz-tour-tooltip-text {
  font-size: 13px;
  color: var(--wz-on-surface-variant);
  margin: 0 0 12px;
}

.wz-tour-tooltip-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wz-tour-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 15;
  border-radius: 9999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
