/* =====================================================================
   LeadPort – Theme „Leitstand"
   Override-Schicht über Metronic 8 (style.bundle.css), wird danach geladen.
   Greift nur, wenn <body> die Klasse "lp" trägt.

   Idee: Ein dunkelblauer Leitstand (Seitenleiste + Rahmen) trägt eine helle,
   ruhige Arbeitsfläche. Die Persönlichkeit kommt aus der Schrift: Mona Sans,
   Überschriften in erweiterter Breite, Zahlen tabellarisch.

   Zustände auf <html>:
     data-bs-theme="light|dark"   Hell / Dunkel
     data-lp-side="left|right"    Position der Seitenleiste
     data-lp-collapsed="0|1"      Seitenleiste eingeklappt
   ===================================================================== */

/* 0. Schrift (lokal, OFL-Lizenz – siehe fonts/HankenGrotesk-OFL.txt) */
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/HankenGrotesk-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------------------------------------------------------------------
   1. Tokens
   --------------------------------------------------------------------- */
:root {
  --lp-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Leitstand (immer dunkel) */
  --lp-ink:          #0a4764;
  --lp-ink-raise:    rgba(255, 255, 255, 0.10);
  --lp-ink-hover:    rgba(255, 255, 255, 0.06);
  --lp-ink-line:     rgba(255, 255, 255, 0.10);
  --lp-ink-text:     #ffffff;
  --lp-ink-muted:    #a7c6d4;
  --lp-ink-subtle:   #7ea3b5;
  --lp-ink-accent:   #ffffff;

  /* Arbeitsfläche */
  --lp-shell:        var(--lp-bg);
  --lp-bg:           #f2f6f7;
  --lp-surface:      #ffffff;
  --lp-surface-2:    #f8f9fa;
  --lp-muted-bg:     #f3f6f9;
  --lp-hover:        rgba(25, 147, 155, 0.05);
  --lp-border:       #e9ebec;
  --lp-border-strong:#ced4da;

  --lp-fg:           #212529;
  --lp-fg-2:         #495057;
  --lp-fg-muted:     #878a99;
  --lp-fg-subtle:    #adb5bd;

  /* Signal */
  --lp-accent:       #19939b;
  --lp-accent-hover: #147a81;
  --lp-accent-text:  #11727a;
  --lp-accent-soft:  rgba(25, 147, 155, 0.10);
  --lp-accent-soft-2:rgba(25, 147, 155, 0.18);
  --lp-ring:         rgba(25, 147, 155, 0.25);

  /* Primäre Aktion = Tinte */
  --lp-primary:      #17868e;
  --lp-primary-hover:#0a4764;
  --lp-primary-fg:   #ffffff;

  /* Velzon-Palette */
  --lpv-primary:     #19939b;
  --lpv-secondary:   #0a4764;
  --lpv-success:     #2aa769;
  --lpv-info:        #2a7fa8;
  --lpv-warning:     #f68c11;
  --lpv-danger:      #f06548;

  --lp-success:      #2aa769;
  --lp-success-text: #1f8a55;
  --lp-success-soft: rgba(42, 167, 105, 0.10);
  --lp-danger:       #f06548;
  --lp-danger-text:  #d9502f;
  --lp-danger-soft:  rgba(240, 101, 72, 0.10);
  --lp-warning:      #f68c11;
  --lp-warning-text: #c26a06;
  --lp-warning-soft: rgba(246, 140, 17, 0.12);
  --lp-info:         #2a7fa8;
  --lp-info-text:    #1f6a8f;
  --lp-info-soft:    rgba(42, 127, 168, 0.10);
  --lp-purple:       #19939b;
  --lp-purple-soft:  rgba(25, 147, 155, 0.08);

  --lp-radius-sm: 4px;
  --lp-radius:    6px;
  --lp-radius-lg: 6px;
  --lp-radius-xl: 8px;

  --lp-shadow-xs:  0 1px 2px rgba(56, 65, 74, 0.15);
  --lp-shadow-pop: 0 0 0 1px rgba(14, 26, 48, 0.07), 0 10px 24px -6px rgba(14, 26, 48, 0.16), 0 24px 48px -16px rgba(14, 26, 48, 0.18);

  --lp-sb-w: 250px;
  --lp-sb-w-collapsed: 70px;
  --lp-gap: 0px;
  --lp-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --lp-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  color-scheme: light;
}

html[data-bs-theme="dark"] {
  --lp-ink:          #0c2230;
  --lp-ink-raise:    rgba(255, 255, 255, 0.08);
  --lp-ink-line:     rgba(255, 255, 255, 0.07);
  --lp-ink-muted:    #8fb1c1;
  --lp-ink-accent:   #ffffff;

  --lp-bg:           #11191f;
  --lp-surface:      #172129;
  --lp-surface-2:    #1c2831;
  --lp-muted-bg:     #223039;
  --lp-hover:        rgba(255, 255, 255, 0.04);
  --lp-border:       #2a3a45;
  --lp-border-strong:#384c59;

  --lp-fg:           #ced4da;
  --lp-fg-2:         #adb5bd;
  --lp-fg-muted:     #878a99;
  --lp-fg-subtle:    #6c757d;

  --lp-accent:       #2bb3bc;
  --lp-accent-hover: #45c3cb;
  --lp-accent-text:  #5fd0d7;
  --lp-accent-soft:  rgba(43, 179, 188, 0.14);
  --lp-accent-soft-2:rgba(43, 179, 188, 0.24);
  --lp-ring:         rgba(43, 179, 188, 0.35);

  --lp-primary:      #1b8f97;
  --lp-primary-hover:#22a3ac;
  --lp-primary-fg:   #ffffff;
  --lpv-primary:     #2bb3bc;
  --lpv-secondary:   #4f9fc4;
  --lpv-success:     #3cc47f;
  --lpv-warning:     #f99d2c;
  --lpv-info:        #4f9fc4;

  --lp-success:      #3cc47f;
  --lp-success-text: #4fd3a3;
  --lp-success-soft: rgba(25, 179, 127, 0.14);
  --lp-danger:       #f0585d;
  --lp-danger-text:  #ff8a8e;
  --lp-danger-soft:  rgba(240, 88, 93, 0.14);
  --lp-warning:      #f99d2c;
  --lp-warning-text: #fbbf4d;
  --lp-warning-soft: rgba(245, 158, 11, 0.14);
  --lp-info:         #38a7f0;
  --lp-info-text:    #7cc6f7;
  --lp-info-soft:    rgba(56, 167, 240, 0.14);
  --lp-purple:       #2bb3bc;
  --lp-purple-soft:  rgba(43, 179, 188, 0.10);

  --lp-shadow-xs:  0 0 0 0 transparent;
  --lp-shadow-pop: 0 0 0 1px rgba(148, 163, 194, 0.16), 0 18px 44px -10px rgba(0, 0, 0, 0.65);
  color-scheme: dark;
}

/* ---------------------------------------------------------------------
   2. Shell
   --------------------------------------------------------------------- */
/* Body darf kein eigener Scroll-Container sein (sonst klebt nichts und
   Seiten-Scrollen meldet window.scrollY = 0). Waagrechtes Überlaufen wird
   per "clip" verhindert, ohne einen Scroll-Container zu erzeugen. */
body.lp { height: auto !important; min-height: 100%; overflow-x: clip !important; overflow-y: visible !important; }
html:has(body.lp) { overflow-x: clip !important; }
body.lp {
  font-feature-settings: normal; font-variation-settings: normal;
  background: var(--lp-shell) !important;
  background-image: none !important;
  color: var(--lp-fg-2);
  font-family: var(--lp-font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.lp h1, body.lp h2, body.lp h3, body.lp h4, body.lp h5, body.lp h6,
body.lp .h1, body.lp .h2, body.lp .h3, body.lp .h4 { color: var(--lp-fg); letter-spacing: 0; font-family: var(--lp-font); }
body.lp a { color: var(--lp-accent-text); }
body.lp ::selection { background: var(--lp-accent-soft-2); }

.lp-i { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.lp-i-sm { width: 15px; height: 15px; }

body.lp .lp-shell { display: flex; flex: 1 0 auto; min-height: 100vh; min-height: 100dvh; align-items: flex-start; }
html[data-lp-side="right"] body.lp .lp-shell { flex-direction: row-reverse; }

/* Arbeitsfläche */
body.lp .lp-main {
  flex: 1 1 auto; min-width: 0;
  min-height: calc(100dvh - 2 * var(--lp-gap));
  margin: var(--lp-gap) 0 var(--lp-gap) var(--lp-gap);
  background: var(--lp-bg);
  border-radius: var(--lp-radius-xl);
}
html[data-lp-side="left"] body.lp .lp-main { margin: var(--lp-gap) var(--lp-gap) var(--lp-gap) 0; }
body.lp .lp-content { min-width: 0; }

/* Leitstand-Leiste */
body.lp .lp-sidebar {
  position: sticky; top: 0;
  flex: 0 0 auto;
  width: var(--lp-sb-w);
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  padding: 14px 10px 12px;
  color: var(--lp-ink-muted);
  background: var(--lp-ink);
  z-index: 50;
}
html.lp-ready body.lp .lp-sidebar { transition: width 0.24s var(--lp-ease-drawer); }
html.lp-no-anim body.lp .lp-sidebar, html.lp-no-anim body.lp .lp-main { transition: none !important; }

body.lp .lp-sb-head { position: relative; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 2px 0 6px; margin-bottom: 14px; }
body.lp .lp-brand { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; text-decoration: none; border-radius: var(--lp-radius-sm); }
body.lp .lp-brand-mark {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 9px; overflow: hidden;
  background: #fff; color: var(--lp-ink); font-weight: 700; font-size: 0.9rem; 
  transition: opacity 0.15s ease;
}
body.lp .lp-brand-mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
body.lp .lp-brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
body.lp .lp-brand-name { font-size: 0.875rem; font-weight: 600;  color: var(--lp-ink-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.lp .lp-brand-slogan { font-size: 0.71875rem; color: var(--lp-ink-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.lp .lp-sb-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--lp-ink-subtle);
  transition: background-color .15s ease, color .15s ease, opacity .15s ease, transform .15s var(--lp-ease-out);
}
body.lp .lp-sb-toggle:hover { background: var(--lp-ink-hover); color: var(--lp-ink-text); }
body.lp .lp-sb-toggle:active { transform: scale(0.92); }
html[data-lp-side="right"] body.lp .lp-panel-line { transform: translateX(6px); }

body.lp .lp-sb-search {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 7px 0 12px; margin-bottom: 18px;
  border: 1px solid var(--lp-ink-line); border-radius: var(--lp-radius-sm); background: rgba(255,255,255,0.03);
  color: var(--lp-ink-subtle); font-size: 0.8125rem; text-align: left;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
body.lp .lp-sb-search:hover { border-color: rgba(255,255,255,0.16); color: var(--lp-ink-muted); background: rgba(255,255,255,0.05); }
body.lp .lp-sb-search > span { flex: 1; min-width: 0; }
body.lp .lp-sb-search .lp-kbd { background: rgba(255,255,255,0.06); border-color: var(--lp-ink-line); color: var(--lp-ink-muted); box-shadow: none; }

body.lp .lp-sb-nav { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; margin: 0 -10px; padding: 0 10px; scrollbar-width: none; }
body.lp .lp-sb-nav::-webkit-scrollbar { display: none; }
body.lp .lp-sb-group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; }
body.lp .lp-sb-label { height: 24px; display: flex; align-items: center; padding: 0 12px; font-size: 0.75rem; font-weight: 500; color: var(--lp-ink-subtle); white-space: nowrap; transition: height .2s var(--lp-ease-drawer), margin .2s var(--lp-ease-drawer); }

body.lp .lp-nav-item {
  position: relative;
  display: flex; align-items: center; gap: 11px; width: 100%;
  height: 36px; padding: 0 12px;
  border: 0; border-radius: var(--lp-radius-sm); background: transparent;
  color: var(--lp-ink-muted) !important; text-decoration: none; text-align: left;
  font-size: 0.875rem; font-weight: 500; white-space: nowrap;
  transition: background-color .12s ease, color .12s ease;
  -webkit-tap-highlight-color: transparent;
}
body.lp .lp-nav-item > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (hover: hover) { body.lp .lp-nav-item:hover { background: var(--lp-ink-hover); color: var(--lp-ink-text) !important; } }
body.lp .lp-nav-item:active { background: var(--lp-ink-hover); }
body.lp .lp-nav-item.is-active { background: var(--lp-ink-raise); color: #fff !important; }
body.lp .lp-nav-item.is-active .lp-i { color: var(--lp-ink-accent); }
body.lp .lp-nav-item.is-active::before { content: ""; position: absolute; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--lp-ink-accent); }
html[data-lp-side="right"] body.lp .lp-nav-item.is-active::before { left: -10px; }
html[data-lp-side="left"] body.lp .lp-nav-item.is-active::before { right: -10px; }
body.lp .lp-nav-item:focus-visible, body.lp .lp-sb-search:focus-visible, body.lp .lp-user:focus-visible, body.lp .lp-sb-toggle:focus-visible { outline: 2px solid var(--lp-ink-accent); outline-offset: -2px; }

body.lp .lp-sb-foot { padding-top: 10px; border-top: 1px solid var(--lp-ink-line); }
body.lp .lp-user {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 48px; padding: 0 8px 0 6px;
  border: 0; border-radius: var(--lp-radius); background: transparent; text-align: left; color: var(--lp-ink-subtle);
  transition: background-color .12s ease;
}
body.lp .lp-user:hover, body.lp .lp-user[aria-expanded="true"] { background: var(--lp-ink-hover); }
body.lp .lp-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,0.08); }
body.lp .lp-user-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
body.lp .lp-user-name { font-size: 0.8125rem; font-weight: 600; color: var(--lp-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.lp .lp-user .lp-user-name { color: var(--lp-ink-text); }
body.lp .lp-user-role { font-size: 0.75rem; color: var(--lp-ink-subtle); }

body.lp .lp-fade { transition: opacity .16s ease; }

/* Eingeklappt (Desktop) */
@media (min-width: 992px) {
  html[data-lp-collapsed="1"] body.lp .lp-sidebar { width: var(--lp-sb-w-collapsed); }
  html[data-lp-collapsed="1"] body.lp .lp-fade { opacity: 0; pointer-events: none; }
  html[data-lp-collapsed="1"] body.lp .lp-sb-head { padding: 0; justify-content: center; }
  html[data-lp-collapsed="1"] body.lp .lp-brand { flex: 0 0 auto; }
  html[data-lp-collapsed="1"] body.lp .lp-brand-text { width: 0; overflow: hidden; }
  html[data-lp-collapsed="1"] body.lp .lp-sb-toggle { position: absolute; left: 50%; top: 50%; margin: -15px 0 0 -15px; opacity: 0; }
  html[data-lp-collapsed="1"] body.lp .lp-sb-head:hover .lp-sb-toggle,
  html[data-lp-collapsed="1"] body.lp .lp-sb-toggle:focus-visible { opacity: 1; background: var(--lp-ink-raise); color: #fff; }
  html[data-lp-collapsed="1"] body.lp .lp-sb-head:hover .lp-brand-mark { opacity: 0; }
  html[data-lp-collapsed="1"] body.lp .lp-sb-search { padding: 0 0 0 12px; }
  html[data-lp-collapsed="1"] body.lp .lp-sb-search .lp-kbd { display: none; }
  html[data-lp-collapsed="1"] body.lp .lp-sb-label { height: 1px; margin: 6px 12px 11px; padding: 0; background: var(--lp-ink-line); }
  html[data-lp-collapsed="1"] body.lp .lp-sb-nav { overflow: visible; }
  html[data-lp-collapsed="1"] body.lp .lp-user { padding: 0 0 0 6px; }

  @media (hover: hover) {
    html[data-lp-collapsed="1"] body.lp .lp-sidebar [data-tip]::after {
      content: attr(data-tip);
      position: absolute; top: 50%; z-index: 60;
      padding: 6px 10px; border-radius: 7px; white-space: nowrap;
      background: var(--lp-surface); color: var(--lp-fg); font-size: 0.78125rem; font-weight: 500;
      box-shadow: var(--lp-shadow-pop);
      opacity: 0; pointer-events: none;
      transition: opacity .12s ease, transform .12s var(--lp-ease-out);
    }
    html[data-lp-collapsed="1"][data-lp-side="right"] body.lp .lp-sidebar [data-tip]::after { right: calc(100% + 16px); transform: translate(4px, -50%) scale(.97); transform-origin: right center; }
    html[data-lp-collapsed="1"][data-lp-side="left"]  body.lp .lp-sidebar [data-tip]::after { left: calc(100% + 16px); transform: translate(-4px, -50%) scale(.97); transform-origin: left center; }
    html[data-lp-collapsed="1"] body.lp .lp-sidebar [data-tip]:hover::after { opacity: 1; transform: translate(0, -50%); transition-delay: .4s; }
    html[data-lp-collapsed="1"] body.lp .lp-sidebar.lp-tips-warm [data-tip]:hover::after { transition-delay: 0s; }
    html[data-lp-collapsed="1"] body.lp .lp-sidebar .lp-user[aria-expanded="true"]::after { display: none; }
  }
}

/* Mobil: Schublade */
.lp-scrim { display: none; }
@media (max-width: 991.98px) {
  body.lp { background: var(--lp-bg) !important; }
  body.lp .lp-shell { display: block; }
  body.lp .lp-main { margin: 0 !important; border-radius: 0; min-height: 100dvh; }
  body.lp .lp-sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; height: auto;
    width: min(300px, 86vw);
    padding: 14px 12px calc(12px + env(safe-area-inset-bottom));
    transform: translateX(-100%);
    transition: transform .32s var(--lp-ease-drawer), box-shadow .32s ease;
    z-index: 1060;
  }
  html[data-lp-side="right"] body.lp .lp-sidebar { left: auto; right: 0; transform: translateX(100%); }
  html.lp-drawer-open body.lp .lp-sidebar { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.35); }
  .lp-scrim { display: block; position: fixed; inset: 0; z-index: 1059; background: rgba(7, 12, 24, .45); opacity: 0; pointer-events: none; transition: opacity .32s var(--lp-ease-drawer); }
  html.lp-drawer-open .lp-scrim { opacity: 1; pointer-events: auto; }
  body.lp .lp-sb-toggle .lp-i { display: none; }
  body.lp .lp-sb-toggle::before { content: "×"; font-size: 24px; line-height: 1; font-weight: 300; }
  body.lp .lp-nav-item { height: 42px; font-size: 0.9375rem; }
  body.lp .lp-nav-item.is-active::before { display: none; }
}
@media (min-width: 992px) { body.lp .lp-only-mobile { display: none !important; } }
@media (max-width: 575.98px) { body.lp .lp-hide-sm { display: none !important; } }

/* Kopfzeile der Arbeitsfläche */
body.lp .lp-topbar {
  position: sticky; top: var(--lp-gap); z-index: 40;
  display: flex; align-items: center; gap: 10px;
  height: 54px; padding: 0 14px 0 clamp(20px, 2.6vw, 36px);
  background: color-mix(in srgb, var(--lp-bg) 90%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  border-radius: var(--lp-radius-xl) var(--lp-radius-xl) 0 0;
  transition: border-color .2s ease;
}
body.lp.lp-scrolled .lp-topbar { border-bottom-color: var(--lp-border); }
body.lp .lp-topbar::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: calc(var(--lp-gap) + 1px); background: var(--lp-shell); }
@media (max-width: 991.98px) {
  body.lp .lp-topbar { top: 0; border-radius: 0; padding: 0 8px 0 6px; }
  body.lp .lp-topbar::before { display: none; }
}
body.lp .lp-crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 1.125rem; }
body.lp .lp-crumbs a { color: var(--lp-fg-muted); text-decoration: none; white-space: nowrap; transition: color .12s ease; }
body.lp .lp-crumbs a:hover { color: var(--lp-fg); }
body.lp .lp-crumb-sep { color: var(--lp-border-strong); }
body.lp .lp-crumb-current { color: var(--lp-fg); font-weight: 600; font-size: 1.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 575.98px) { body.lp .lp-crumbs a, body.lp .lp-crumb-sep { display: none; } }
body.lp .lp-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }

body.lp .lp-icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; border: 0; border-radius: var(--lp-radius-sm);
  background: transparent; color: var(--lp-fg-muted);
  transition: background-color .12s ease, color .12s ease, transform .15s var(--lp-ease-out);
}
body.lp .lp-icon-btn:hover, body.lp .lp-icon-btn[aria-expanded="true"] { background: var(--lp-hover); color: var(--lp-fg); }
body.lp .lp-icon-btn:active { transform: scale(0.94); }
body.lp .lp-search-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 11px; margin-right: 4px;
  border: 1px solid var(--lp-border); border-radius: var(--lp-radius-sm); background: var(--lp-surface);
  color: var(--lp-fg-subtle); font-size: 0.8125rem; min-width: 220px; box-shadow: var(--lp-shadow-xs);
  transition: border-color .12s ease, color .12s ease;
}
body.lp .lp-search-pill span { flex: 1; text-align: left; }
body.lp .lp-search-pill:hover { border-color: var(--lp-border-strong); color: var(--lp-fg-muted); }
@media (max-width: 575.98px) { body.lp .lp-search-pill { min-width: 0; width: 34px; height: 34px; padding: 0; justify-content: center; border: 0; box-shadow: none; background: transparent; margin: 0; } }

body.lp .lp-dot-count {
  position: absolute; top: 3px; right: 3px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--lp-danger); color: #fff; font-size: 10px; font-weight: 600; line-height: 1;
  box-shadow: 0 0 0 2px var(--lp-bg);
}
body.lp #notification-count[style*="block"] { display: inline-flex !important; }
body.lp #notification-count:empty { display: none !important; }

body.lp .lp-kbd {
  display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px;
  border: 1px solid var(--lp-border); background: var(--lp-surface-2);
  color: var(--lp-fg-muted); font: 500 0.6875rem/1 var(--lp-font);
  box-shadow: inset 0 -1px 0 var(--lp-border);
}

/* Popover */
body.lp .lp-pop-anchor { position: relative; }
body.lp .lp-pop {
  position: absolute; z-index: 1070;
  min-width: 248px; padding: 6px;
  background: var(--lp-surface); color: var(--lp-fg-2);
  border-radius: var(--lp-radius-lg); box-shadow: var(--lp-shadow-pop);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: scale(.96) translateY(var(--lp-pop-y, 4px));
  transition: opacity .12s ease, transform .12s ease, visibility 0s linear .12s;
}
body.lp .lp-pop.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition: opacity .16s var(--lp-ease-out), transform .16s var(--lp-ease-out), visibility 0s; }
body.lp .lp-pop-up { bottom: calc(100% + 8px); left: 0; right: 0; transform-origin: bottom center; --lp-pop-y: 4px; }
body.lp .lp-pop-down { top: calc(100% + 6px); right: 0; transform-origin: top right; --lp-pop-y: -4px; }
body.lp .lp-pop-wide { width: 380px; max-width: calc(100vw - 16px); padding: 0; overflow: hidden; }
@media (min-width: 992px) {
  html[data-lp-collapsed="1"] body.lp .lp-sidebar .lp-pop-up { width: 264px; bottom: 0; }
  html[data-lp-collapsed="1"][data-lp-side="right"] body.lp .lp-sidebar .lp-pop-up { left: auto; right: calc(100% + 14px); transform-origin: bottom right; --lp-pop-y: 0px; }
  html[data-lp-collapsed="1"][data-lp-side="left"] body.lp .lp-sidebar .lp-pop-up { right: auto; left: calc(100% + 14px); transform-origin: bottom left; --lp-pop-y: 0px; }
}
body.lp .lp-pop-head { padding: 8px 10px 10px; }
body.lp .lp-pop-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--lp-border); }
body.lp .lp-pop-sub { font-size: 0.75rem; color: var(--lp-fg-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.lp .lp-link-sm { font-size: 0.75rem; font-weight: 500; color: var(--lp-fg-muted) !important; text-decoration: none; }
body.lp .lp-link-sm:hover { color: var(--lp-fg) !important; }
body.lp .lp-pop-scroll { max-height: min(420px, 60vh); overflow-y: auto; }
body.lp .lp-pop-empty { padding: 32px 16px; text-align: center; color: var(--lp-fg-subtle); font-size: 0.8125rem; }
body.lp .lp-menu-item { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: var(--lp-radius-sm); color: var(--lp-fg) !important; text-decoration: none; font-size: 0.84375rem; font-weight: 500; }
body.lp .lp-menu-item .lp-i { width: 16px; height: 16px; color: var(--lp-fg-2); }
body.lp #lp_user_menu .lp-pop-sub { color: var(--lp-fg-2); }
body.lp .lp-menu-item:hover { background: var(--lp-hover); color: var(--lp-fg) !important; }
body.lp .lp-menu-item:hover .lp-i { color: var(--lp-fg); }
body.lp .lp-menu-item.is-danger:hover { background: var(--lp-danger-soft); color: var(--lp-danger-text) !important; }
body.lp .lp-menu-item.is-danger:hover .lp-i { color: var(--lp-danger-text); }
body.lp .lp-menu-sep { height: 1px; margin: 6px -6px; background: var(--lp-border); }
body.lp .lp-menu-row { display: flex; align-items: center; justify-content: space-between; height: 38px; padding: 0 4px 0 10px; font-size: 0.84375rem; font-weight: 500; color: var(--lp-fg-2); }
body.lp .lp-seg { display: inline-flex; padding: 2px; gap: 2px; border-radius: 8px; background: var(--lp-muted-bg); }
body.lp .lp-seg button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--lp-fg-subtle); transition: background-color .12s ease, color .12s ease; }
body.lp .lp-seg button:hover { color: var(--lp-fg); }
body.lp .lp-seg button.is-on { background: var(--lp-surface); color: var(--lp-fg); box-shadow: 0 1px 2px rgba(14,26,48,.12), 0 0 0 1px var(--lp-border); }
body.lp #notifications-container .notification-item { padding: 12px 14px !important; border-color: var(--lp-border) !important; }
body.lp #notifications-container .notification-item:last-child { border-bottom: 0 !important; }
body.lp #notifications-container .notification-item:hover { background: var(--lp-surface-2); }
body.lp #notifications-container .symbol { width: 28px !important; margin-right: 12px !important; }

/* Befehlsmenü */
.lp-cmdk { position: fixed; inset: 0; z-index: 1090; }
.lp-cmdk[hidden] { display: none; }
body.lp .lp-cmdk-backdrop { position: absolute; inset: 0; background: rgba(7, 12, 24, .42); opacity: 0; transition: opacity .13s ease; }
body.lp .lp-cmdk-panel {
  position: relative; margin: min(14vh, 120px) auto 0; width: min(620px, calc(100vw - 24px));
  background: var(--lp-surface); border-radius: var(--lp-radius-xl); box-shadow: var(--lp-shadow-pop);
  overflow: hidden; opacity: 0; transform: scale(.96);
  transition: opacity .13s ease, transform .13s ease;
}
body.lp .lp-cmdk[data-state="open"] .lp-cmdk-backdrop { opacity: 1; transition-duration: .18s; }
body.lp .lp-cmdk[data-state="open"] .lp-cmdk-panel { opacity: 1; transform: none; transition: opacity .18s var(--lp-ease-out), transform .18s var(--lp-ease-out); }
body.lp .lp-cmdk-input { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--lp-border); color: var(--lp-fg-subtle); }
body.lp .lp-cmdk-input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--lp-fg); font-size: 1rem; font-family: var(--lp-font); }
body.lp .lp-cmdk-input input::placeholder { color: var(--lp-fg-subtle); }
body.lp .lp-cmdk-list { max-height: min(380px, 55vh); overflow-y: auto; padding: 6px; scroll-padding: 6px; }
body.lp .lp-cmdk-group { padding: 10px 10px 4px; font-size: 0.75rem; font-weight: 500; color: var(--lp-fg-subtle); }
body.lp .lp-cmdk-item { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: var(--lp-radius); color: var(--lp-fg-2); font-size: 0.875rem; cursor: pointer; user-select: none; }
body.lp .lp-cmdk-item .lp-i { color: var(--lp-fg-subtle); }
body.lp .lp-cmdk-item.is-active { background: var(--lp-muted-bg); color: var(--lp-fg); }
body.lp .lp-cmdk-item.is-active .lp-i { color: var(--lp-fg); }
body.lp .lp-cmdk-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.lp .lp-cmdk-hint { font-size: 0.75rem; color: var(--lp-fg-subtle); }
body.lp .lp-cmdk-enter { opacity: 0; }
body.lp .lp-cmdk-item.is-active .lp-cmdk-enter { opacity: 1; color: var(--lp-fg-muted); }
body.lp .lp-cmdk-empty { padding: 36px 16px; text-align: center; color: var(--lp-fg-subtle); font-size: 0.875rem; }
body.lp .lp-cmdk-foot { display: flex; align-items: center; gap: 14px; height: 38px; padding: 0 14px; border-top: 1px solid var(--lp-border); background: var(--lp-surface-2); color: var(--lp-fg-subtle); font-size: 0.75rem; }
body.lp .lp-cmdk-foot .lp-kbd { margin-right: 3px; height: 18px; min-width: 18px; font-size: 0.65625rem; }
@media (max-width: 575.98px) { body.lp .lp-cmdk-foot { display: none; } body.lp .lp-cmdk-panel { margin-top: 10px; } }

/* Container */
body.lp .lp-main .container-xxl,
body.lp .lp-main #kt_toolbar_container,
body.lp .lp-main #kt_content_container,
body.lp .lp-main #cc_root {
  width: 100% !important; max-width: none !important;
  margin-left: 0 !important; margin-right: 0 !important;
  padding-left: clamp(20px, 2.6vw, 36px) !important; padding-right: clamp(20px, 2.6vw, 36px) !important;
}
body.lp .lp-main #kt_content_container > .content { max-width: none !important; padding: 0 !important; margin: 0 !important; }

/* Footer / Scrolltop */
body.lp .footer { color: var(--lp-fg-subtle) !important; font-size: 0.78125rem; margin-top: 2.5rem; padding-top: 1rem !important; padding-bottom: 1.25rem !important; }
body.lp .footer .text-dark { color: var(--lp-fg-subtle) !important; padding-top: 0 !important; }
body.lp .footer a { color: var(--lp-fg-muted) !important; text-decoration: none; }
body.lp .footer a:hover { color: var(--lp-fg) !important; }
body.lp .scrolltop { background: var(--lp-primary) !important; border-radius: var(--lp-radius); box-shadow: var(--lp-shadow-pop); }
body.lp .scrolltop .svg-icon svg [fill] { fill: var(--lp-primary-fg) !important; }
html[data-lp-side="right"] body.lp .scrolltop { right: calc(var(--lp-sb-w) + 28px); }
html[data-lp-side="right"][data-lp-collapsed="1"] body.lp .scrolltop { right: calc(var(--lp-sb-w-collapsed) + 28px); }
@media (max-width: 991.98px) { html[data-lp-side="right"] body.lp .scrolltop { right: 16px !important; } }

/* ---------------------------------------------------------------------
   3. Seitenköpfe & Dashboard-Bausteine
   --------------------------------------------------------------------- */
body.lp .toolbar { padding: 22px 0 22px !important; }
body.lp .toolbar h3.text-white,
body.lp .toolbar h1.text-white,
body.lp .container-xxl > .d-flex > div > h1.text-white,
body.lp .lp-page-title {
  color: var(--lp-fg) !important;
  font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem) !important; font-weight: 640 !important; 
  letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 0.25rem !important;
}
body.lp .container-xxl > .d-flex > div > .text-white-50,
body.lp .lp-page-sub { color: var(--lp-fg-muted) !important; font-size: 0.875rem; }
body.lp #cc_root.pt-lg-10, body.lp .container-xxl.pt-lg-10 { padding-top: 22px !important; }

body.lp .lp-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0 22px !important; }
body.lp .lp-page-head .lp-page-sub { margin: 0; }

/* Kennzahlen: eine Fläche, Zellen durch Linien getrennt */
body.lp .lp-dash-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 16px; margin-bottom: 16px; }
@media (max-width: 1199.98px) { body.lp .lp-dash-top { grid-template-columns: 1fr; } }
body.lp .lp-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--lp-surface); border: 1px solid var(--lp-border); border-radius: var(--lp-radius-lg); overflow: hidden; }
body.lp .lp-fig { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; padding: 16px 20px 18px; min-height: 110px; }
body.lp .lp-fig:nth-child(2n) { border-left: 1px solid var(--lp-border); }
body.lp .lp-fig:nth-child(n+3) { border-top: 1px solid var(--lp-border); }
body.lp .lp-fig-label { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--lp-fg-muted); font-weight: 500; }
body.lp .lp-fig-value { font-size: 2.25rem; line-height: 1; font-weight: 600;  letter-spacing: -0.03em; color: var(--lp-fg); }
body.lp .lp-fig-note { font-size: 0.75rem; color: var(--lp-fg-subtle); font-weight: 500; letter-spacing: 0; }
body.lp .lp-fig.is-alert .lp-fig-value { color: var(--lp-danger-text); }
body.lp .lp-fig.is-good .lp-fig-value { color: var(--lp-success-text); }

@media (max-width: 575.98px) { body.lp .lp-fig-value { font-size: 1.75rem; } body.lp .lp-fig { padding: 14px 16px 16px; min-height: 0; } }

/* Rangliste */
body.lp .lp-board { background: var(--lp-surface); border: 1px solid var(--lp-border); border-radius: var(--lp-radius-lg); padding: 16px 18px 8px; }
body.lp .lp-board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
body.lp .lp-board-title { font-size: 0.9375rem; font-weight: 620; color: var(--lp-fg); margin: 0;  }
body.lp .lp-board-sub { font-size: 0.75rem; color: var(--lp-fg-subtle); }
body.lp .lp-board ol { list-style: none; margin: 0; padding: 0; }
body.lp .lp-rank { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; padding: 7px 0; border-top: 1px solid var(--lp-border); }
body.lp .lp-rank:first-child { border-top: 0; }
body.lp .lp-rank-who { min-width: 0; }
body.lp .lp-rank-name { display: block; font-weight: 500; color: var(--lp-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.875rem; }
body.lp .lp-rank-bar { display: block; height: 4px; margin-top: 6px; border-radius: 4px; background: var(--lp-muted-bg); overflow: hidden; }
body.lp .lp-rank-bar > i { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: var(--lp-fg-subtle); }
body.lp .lp-rank:first-child .lp-rank-bar > i { background: var(--lp-accent); }
body.lp .lp-rank-v { font-weight: 600; color: var(--lp-fg); font-size: 0.9375rem; }
body.lp .lp-board-empty { color: var(--lp-fg-subtle); font-size: 0.8125rem; padding: 18px 0; }
body.lp .lp-board-foot { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0 8px; border-top: 1px solid var(--lp-border); font-size: 0.8125rem; color: var(--lp-fg-muted); }
body.lp .lp-board-foot strong { color: var(--lp-fg); font-weight: 600; }

/* Avatare mit Initialen */
body.lp .lp-av {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 50%; overflow: hidden;
  background: var(--lp-muted-bg); color: var(--lp-fg-2);
  font-size: 0.71875rem; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; 
}
body.lp .lp-av img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------------
   4. Metronic-Utilities (dort mit !important gesetzt)
   --------------------------------------------------------------------- */
body.lp .text-dark, body.lp .text-gray-900, body.lp .text-black { color: var(--lp-fg) !important; }
body.lp .text-gray-800, body.lp .text-gray-700 { color: var(--lp-fg-2) !important; }
body.lp .text-gray-600, body.lp .text-gray-500, body.lp .text-muted, body.lp .form-text { color: var(--lp-fg-muted) !important; }
body.lp .text-gray-400, body.lp .text-gray-300 { color: var(--lp-fg-subtle) !important; }
body.lp .text-primary, body.lp .link-primary { color: var(--lp-accent-text) !important; }
body.lp .text-success { color: var(--lp-success-text) !important; }
body.lp .text-danger  { color: var(--lp-danger-text) !important; }
body.lp .text-warning { color: var(--lp-warning-text) !important; }
body.lp .text-info    { color: var(--lp-info-text) !important; }
body.lp .text-hover-primary:hover, body.lp .link-primary:hover { color: var(--lp-accent) !important; }
body.lp .card .text-white-50 { color: var(--lp-fg-muted) !important; }
body.lp .table thead .text-uppercase, body.lp .table thead tr.text-uppercase, body.lp thead th.text-uppercase { text-transform: none !important; }

body.lp .bg-body, body.lp .bg-white { background-color: var(--lp-surface) !important; }
body.lp .bg-light { background-color: var(--lp-muted-bg) !important; }
body.lp .bg-light-primary   { background-color: var(--lp-accent-soft) !important; }
body.lp .bg-light-success   { background-color: var(--lp-success-soft) !important; }
body.lp .bg-light-danger    { background-color: var(--lp-danger-soft) !important; }
body.lp .bg-light-warning   { background-color: var(--lp-warning-soft) !important; }
body.lp .bg-light-info      { background-color: var(--lp-info-soft) !important; }
body.lp .bg-light-secondary { background-color: var(--lp-muted-bg) !important; }
body.lp .bg-primary { background-color: var(--lp-accent) !important; }
body.lp .bg-danger  { background-color: var(--lp-danger) !important; }
body.lp .bg-success { background-color: var(--lp-success) !important; }

body.lp .border, body.lp .border-top, body.lp .border-bottom, body.lp .border-start, body.lp .border-end,
body.lp .border-gray-200, body.lp .border-gray-300 { border-color: var(--lp-border) !important; }
body.lp .separator { border-bottom-color: var(--lp-border) !important; }
body.lp hr { border-color: var(--lp-border); opacity: 1; }

/* ---------------------------------------------------------------------
   5. Komponenten
   --------------------------------------------------------------------- */
body.lp .card { background: var(--lp-surface); border: 1px solid var(--lp-border); border-radius: var(--lp-radius-lg); box-shadow: none; color: var(--lp-fg-2); }
body.lp .card .card-header { border-bottom: 1px solid var(--lp-border); min-height: 60px; padding: 0 20px; }
body.lp .card .card-header.border-0 { border-bottom: 0 !important; }
body.lp .card .card-body { padding: 20px; }
body.lp .card .card-footer { background: transparent; border-top: 1px solid var(--lp-border); }
body.lp .card .card-title, body.lp .card .card-label { color: var(--lp-fg) !important; font-weight: 620 !important; font-size: 0.9375rem;  }
body.lp .card .card-title .fs-7 { color: var(--lp-fg-muted) !important; font-weight: 400 !important;  }
body.lp .card.card-xxl-stretch-50 .fw-semibold { color: var(--lp-fg-muted); font-size: 0.8125rem; font-weight: 500 !important; }
body.lp .card.card-xxl-stretch-50 .fs-1 { color: var(--lp-fg) !important; font-weight: 600 !important;  letter-spacing: -0.03em; font-size: 2rem !important; line-height: 1.15; }

body.lp .symbol .symbol-label { background-color: var(--lp-muted-bg); color: var(--lp-fg-2); border-radius: var(--lp-radius); }
body.lp .symbol.symbol-circle .symbol-label, body.lp .symbol.symbol-circle img { border-radius: 50%; }
body.lp .symbol > img { border-radius: var(--lp-radius); }

/* Buttons (Metronic setzt Padding/Rahmen mit langen :not()-Ketten → !important) */
body.lp .btn { border-radius: var(--lp-radius-sm); font-weight: 500; font-family: var(--lp-font); letter-spacing: 0; box-shadow: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s var(--lp-ease-out); }
body.lp .btn:not(.btn-sm):not(.btn-lg):not(.btn-icon):not(.btn-link) { padding: calc(0.55rem - 1px) 1rem !important; font-size: 0.875rem; }
body.lp .btn.btn-sm:not(.btn-icon) { padding: calc(0.55rem - 1px) 1rem !important; font-size: 0.875rem; }
body.lp table .btn.btn-sm:not(.btn-icon), body.lp .dataTable .btn.btn-sm:not(.btn-icon) { padding: calc(0.42rem - 1px) 0.8rem !important; font-size: 0.8125rem; }
body.lp .btn.btn-lg:not(.btn-icon) { padding: calc(0.55rem - 1px) 1rem !important; font-size: 0.875rem; border-radius: var(--lp-radius-sm); }
body.lp .btn:not(.btn-link):not(.btn-flush):not(.btn-outline) { border: 1px solid transparent !important; }
body.lp .btn:active:not(:disabled) { transform: scale(0.97); }
body.lp .btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--lp-ring) !important; }
body.lp .btn i { line-height: 1; }

body.lp .btn.btn-primary { background: var(--lp-primary); color: var(--lp-primary-fg); }
body.lp .btn.btn-primary:not(.btn-link):not(.btn-flush):not(.btn-outline) { border-color: var(--lp-primary) !important; }
body.lp .btn.btn-primary i { color: var(--lp-primary-fg); }
body.lp .btn.btn-primary:hover:not(.btn-active), body.lp .btn.btn-primary:focus:not(.btn-active), body.lp .btn.btn-primary.active { background: var(--lp-primary-hover) !important; color: var(--lp-primary-fg) !important; }
body.lp .btn.btn-primary:hover i, body.lp .btn.btn-primary.active i { color: var(--lp-primary-fg) !important; }

body.lp .btn.btn-light, body.lp .btn.btn-secondary { background: var(--lp-surface); color: var(--lp-fg-2); box-shadow: var(--lp-shadow-xs); }
body.lp .btn.btn-light:not(.btn-link):not(.btn-flush):not(.btn-outline),
body.lp .btn.btn-secondary:not(.btn-link):not(.btn-flush):not(.btn-outline),
body.lp .btn.btn-light-secondary:not(.btn-link):not(.btn-flush):not(.btn-outline) { border-color: var(--lp-border) !important; }
body.lp .btn.btn-light i, body.lp .btn.btn-secondary i { color: var(--lp-fg-muted); }
body.lp .btn.btn-light:hover:not(.btn-active), body.lp .btn.btn-light:focus:not(.btn-active), body.lp .btn.btn-secondary:hover:not(.btn-active) { background: var(--lp-surface-2) !important; color: var(--lp-fg) !important; }
body.lp .btn.btn-light:not(.btn-link):not(.btn-flush):not(.btn-outline):hover { border-color: var(--lp-border-strong) !important; }
body.lp .btn.btn-light:hover i { color: var(--lp-fg) !important; }

body.lp .btn.btn-light-primary { background: var(--lp-accent-soft); color: var(--lp-accent-text); }
body.lp .btn.btn-light-primary i { color: var(--lp-accent-text); }
body.lp .btn.btn-light-primary:hover:not(.btn-active), body.lp .btn.btn-light-primary:focus:not(.btn-active) { background: var(--lp-accent-soft-2) !important; color: var(--lp-accent-text) !important; }
body.lp .btn.btn-light-primary:hover i { color: var(--lp-accent-text) !important; }

body.lp .btn.btn-success { background: var(--lp-success); color: #fff; }
body.lp .btn.btn-danger  { background: var(--lp-danger);  color: #fff; }
body.lp .btn.btn-info    { background: var(--lp-info);    color: #fff; }
body.lp .btn.btn-success:hover:not(.btn-active), body.lp .btn.btn-danger:hover:not(.btn-active), body.lp .btn.btn-info:hover:not(.btn-active) { filter: brightness(0.94); }
body.lp .btn.btn-success:hover:not(.btn-active) { background: var(--lp-success) !important; }
body.lp .btn.btn-danger:hover:not(.btn-active) { background: var(--lp-danger) !important; }
body.lp .btn.btn-success i, body.lp .btn.btn-danger i, body.lp .btn.btn-info i { color: #fff !important; }

body.lp .btn.btn-light-success { background: var(--lp-success-soft); color: var(--lp-success-text); }
body.lp .btn.btn-light-success i { color: var(--lp-success-text); }
body.lp .btn.btn-light-success:hover:not(.btn-active) { background: var(--lp-success) !important; color: #fff !important; }
body.lp .btn.btn-light-success:hover i { color: #fff !important; }
body.lp .btn.btn-light-danger { background: var(--lp-danger-soft); color: var(--lp-danger-text); }
body.lp .btn.btn-light-danger i { color: var(--lp-danger-text); }
body.lp .btn.btn-light-danger:hover:not(.btn-active) { background: var(--lp-danger) !important; color: #fff !important; }
body.lp .btn.btn-light-danger:hover i { color: #fff !important; }
body.lp .btn.btn-light-secondary { background: var(--lp-muted-bg); color: var(--lp-fg-2); }
body.lp .btn.btn-light-secondary:hover:not(.btn-active) { background: var(--lp-hover) !important; color: var(--lp-fg) !important; }

body.lp .btn.btn-icon { border-radius: var(--lp-radius-sm); }
body.lp .btn.btn-icon.btn-sm { width: 32px; height: 32px; }
body.lp .btn.btn-icon i { font-size: 1.05rem; }
body.lp .btn-group > .btn { box-shadow: none; }
body.lp .btn-close { filter: none; opacity: 0.5; border-radius: var(--lp-radius-sm); }
body.lp .btn-close:hover { opacity: 0.9; }
html[data-bs-theme="dark"] body.lp .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

/* Segment-Filter */
body.lp #leadFilterGroup, body.lp #usedFilterGroup { background: var(--lp-muted-bg); padding: 3px; border-radius: var(--lp-radius); gap: 2px; }
body.lp #leadFilterGroup .btn, body.lp #usedFilterGroup .btn {
  border-color: transparent !important; border-radius: 7px !important; margin: 0 !important;
  background: transparent !important; color: var(--lp-fg-muted) !important; box-shadow: none !important; gap: 0.35rem;
}
body.lp #leadFilterGroup .btn:hover, body.lp #usedFilterGroup .btn:hover { color: var(--lp-fg) !important; }
body.lp #leadFilterGroup .btn.active, body.lp #usedFilterGroup .btn.active { background: var(--lp-surface) !important; color: var(--lp-fg) !important; box-shadow: 0 1px 2px rgba(14,26,48,.10), 0 0 0 1px var(--lp-border) !important; }
body.lp #leadFilterGroup .btn i, body.lp #usedFilterGroup .btn i { color: inherit !important; }
body.lp #leadFilterGroup .ki-duotone { display: none; }

/* Formulare */
body.lp .form-label { color: var(--lp-fg-2); font-weight: 500; font-size: 0.8125rem; }
body.lp .form-label.fs-8, body.lp .form-label.text-muted { color: var(--lp-fg-muted) !important; font-size: 0.75rem !important; }
body.lp .form-control, body.lp .form-select,
body.lp .form-control.form-control-solid, body.lp .form-select.form-select-solid {
  background-color: var(--lp-surface); border: 1px solid var(--lp-border); border-radius: var(--lp-radius-sm);
  color: var(--lp-fg); font-size: 0.875rem; font-family: var(--lp-font); box-shadow: var(--lp-shadow-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
body.lp .form-control.form-control-lg, body.lp .form-select.form-select-lg { font-size: 0.9375rem; border-radius: var(--lp-radius); }
body.lp .form-control::placeholder { color: var(--lp-fg-subtle); }
body.lp .form-control:hover, body.lp .form-select:hover { border-color: var(--lp-border-strong); }
body.lp .form-control:focus, body.lp .form-select:focus,
body.lp .form-control.form-control-solid:focus, body.lp .form-select.form-select-solid:focus { background-color: var(--lp-surface); border-color: var(--lp-accent); box-shadow: 0 0 0 3px var(--lp-ring); color: var(--lp-fg); }
body.lp .form-control:disabled, body.lp .form-control[readonly], body.lp .form-select:disabled { background-color: var(--lp-muted-bg); color: var(--lp-fg-muted); }
body.lp .form-control-plaintext { color: var(--lp-fg); }
body.lp .form-control.is-invalid, body.lp .form-select.is-invalid { border-color: var(--lp-danger); }
body.lp .invalid-feedback { color: var(--lp-danger-text); }
html[data-bs-theme="dark"] body.lp .form-select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238d99b0' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); }
html[data-bs-theme="dark"] body.lp input[type="date"]::-webkit-calendar-picker-indicator,
html[data-bs-theme="dark"] body.lp input[type="datetime-local"]::-webkit-calendar-picker-indicator { filter: invert(0.8); }
body.lp .form-check-input { background-color: var(--lp-surface); border: 1px solid var(--lp-border-strong); }
body.lp .form-check-custom.form-check-solid .form-check-input:not(:checked) { background-color: var(--lp-muted-bg); border-color: var(--lp-border-strong); }
body.lp .form-check-input:checked { background-color: var(--lp-accent) !important; border-color: var(--lp-accent) !important; }
body.lp .form-check-input:focus { box-shadow: 0 0 0 3px var(--lp-ring); border-color: var(--lp-accent); }
body.lp .form-check-label { color: var(--lp-fg-2); }
body.lp .input-group-text { background: var(--lp-muted-bg); border-color: var(--lp-border); color: var(--lp-fg-muted); }

/* Tabellen */
body.lp .table { color: var(--lp-fg-2); --bs-table-bg: transparent; --bs-table-color: var(--lp-fg-2); border-color: var(--lp-border); font-size: 0.875rem !important; }
body.lp .table > :not(caption) > * > * { background-color: transparent; color: inherit; border-bottom-color: var(--lp-border); }
body.lp .table > :not(:first-child) { border-top: 0 !important; }
body.lp .table thead th {
  color: var(--lp-fg-muted) !important; background: var(--lp-surface-2) !important;
  font-size: 0.78125rem !important; font-weight: 500 !important; letter-spacing: 0;
  border-bottom: 1px solid var(--lp-border) !important; border-top: 1px solid var(--lp-border) !important;
  padding-top: 10px !important; padding-bottom: 10px !important; white-space: nowrap;
}
body.lp .table thead th:first-child { border-left: 1px solid var(--lp-border) !important; border-radius: var(--lp-radius-sm) 0 0 var(--lp-radius-sm); }
body.lp .table thead th:last-child { border-right: 1px solid var(--lp-border) !important; border-radius: 0 var(--lp-radius-sm) var(--lp-radius-sm) 0; }
body.lp .table.table-row-dashed tr { border-bottom: 1px solid var(--lp-border); border-bottom-style: solid; }
body.lp .table tbody.text-black, body.lp .table tbody .text-black { color: var(--lp-fg-2) !important; }
body.lp .table tbody.fw-semibold { font-weight: 450 !important; }
body.lp .table tbody tr { transition: background-color 0.12s ease; }
@media (hover: hover) { body.lp .table tbody tr:hover > * { background-color: var(--lp-surface-2); } }
body.lp .table.table-bordered, body.lp .table.table-bordered td, body.lp .table.table-bordered th { border-color: var(--lp-border) !important; }

/* Aktionen in Tabellen: leise Symbole */
body.lp .table td .btn.btn-icon.btn-light { background: transparent; box-shadow: none; color: var(--lp-fg-muted); }
body.lp .table td .btn.btn-icon.btn-light:not(.btn-link):not(.btn-flush):not(.btn-outline) { border-color: transparent !important; }
body.lp .table td .btn.btn-icon.btn-light i { color: var(--lp-fg-muted); }
body.lp .table td .btn.btn-icon.btn-light:hover { background: var(--lp-muted-bg) !important; }
body.lp .table td .btn.btn-icon.btn-light:hover i { color: var(--lp-fg) !important; }
body.lp .table td .btn.btn-icon.btn-light-danger { background: transparent; }
body.lp .table td .btn.btn-icon.btn-light-danger i { color: var(--lp-fg-subtle); }
body.lp .table td .btn.btn-icon.btn-light-danger:hover i { color: #fff !important; }
body.lp .table td .badge.rounded-pill.bg-danger { box-shadow: 0 0 0 2px var(--lp-surface); font-weight: 600; }
body.lp .table td .form-select-sm { height: 30px; padding-top: 0; padding-bottom: 0; padding-left: 12px; border-radius: 999px; background-color: var(--lp-surface-2); box-shadow: none; font-size: 0.8125rem; font-weight: 500; }

/* DataTables-Fuß */
body.lp .dataTables_info, body.lp .dt-info { color: var(--lp-fg-muted); font-size: 0.8125rem; }
body.lp .page-item .page-link { background: transparent; border: 1px solid transparent; color: var(--lp-fg-muted); border-radius: var(--lp-radius-sm) !important; min-width: 32px; height: 32px; font-size: 0.8125rem; font-weight: 500; }
body.lp .page-item .page-link:hover { background: var(--lp-hover); color: var(--lp-fg); }
body.lp .page-item.active .page-link { background: var(--lp-primary); color: var(--lp-primary-fg); border-color: var(--lp-primary); }
body.lp .page-item.disabled .page-link { background: transparent; color: var(--lp-fg-subtle); }
body.lp div.dt-container .dt-paging .dt-paging-button { border-radius: var(--lp-radius-sm) !important; color: var(--lp-fg-muted) !important; border: 1px solid transparent !important; background: transparent !important; }
body.lp div.dt-container .dt-paging .dt-paging-button.current, body.lp div.dt-container .dt-paging .dt-paging-button.current:hover { background: var(--lp-primary) !important; border-color: var(--lp-primary) !important; color: var(--lp-primary-fg) !important; }
body.lp .dt-length select, body.lp .dataTables_length select { background-color: var(--lp-surface); border-color: var(--lp-border); color: var(--lp-fg); }

/* Badges */
body.lp .badge { border-radius: 6px; font-weight: 500; letter-spacing: 0; padding: 0.32em 0.55em; font-family: var(--lp-font); }
body.lp .badge-light { background: var(--lp-muted-bg); color: var(--lp-fg-2); }
body.lp .badge-light-primary { background: var(--lp-accent-soft); color: var(--lp-accent-text); }
body.lp .badge-light-success { background: var(--lp-success-soft); color: var(--lp-success-text); }
body.lp .badge-light-danger  { background: var(--lp-danger-soft);  color: var(--lp-danger-text); }
body.lp .badge-light-warning { background: var(--lp-warning-soft); color: var(--lp-warning-text); }
body.lp .badge-light-info    { background: var(--lp-info-soft);    color: var(--lp-info-text); }
body.lp .badge-light-secondary, body.lp .badge-secondary { background: var(--lp-muted-bg); color: var(--lp-fg-2); }
body.lp .badge-primary { background: var(--lp-accent); color: #fff; }
body.lp .badge-success { background: var(--lp-success); color: #fff; }

/* Alerts */
body.lp .alert { border-radius: var(--lp-radius); border: 1px solid var(--lp-border); font-size: 0.875rem; }
body.lp .alert-primary, body.lp .alert-light-primary, body.lp .alert-info { background: var(--lp-accent-soft); color: var(--lp-fg-2); border-color: var(--lp-accent-soft-2); }
body.lp .alert-success { background: var(--lp-success-soft); color: var(--lp-success-text); border-color: transparent; }
body.lp .alert-danger  { background: var(--lp-danger-soft);  color: var(--lp-danger-text);  border-color: transparent; }
body.lp .alert-warning { background: var(--lp-warning-soft); color: var(--lp-warning-text); border-color: transparent; }

/* Modale */
body.lp .modal-content { background: var(--lp-surface); border: 0; border-radius: var(--lp-radius-xl); box-shadow: var(--lp-shadow-pop); color: var(--lp-fg-2); }
body.lp .modal-header { border-bottom: 1px solid var(--lp-border); padding: 1.1rem 1.5rem; }
body.lp .modal-header .modal-title { color: var(--lp-fg); font-weight: 620; font-size: 1.0625rem;  letter-spacing: -0.01em; }
body.lp .modal-body { padding: 1.5rem; }
body.lp .modal-footer { border-top: 1px solid var(--lp-border); padding: 1rem 1.5rem; gap: 0.5rem; }
body.lp .modal-footer > * { margin: 0; }
body.lp .modal-backdrop.show { opacity: 1; background: rgba(7, 12, 24, 0.45); }
body.lp .modal.fade .modal-dialog { transform: scale(0.96); opacity: 0; transition: transform 0.2s var(--lp-ease-out), opacity 0.2s var(--lp-ease-out); }
body.lp .modal.show .modal-dialog { transform: none; opacity: 1; }

/* Metronic-Dropdowns */
body.lp .menu-sub-dropdown { background: var(--lp-surface) !important; border-radius: var(--lp-radius-lg) !important; box-shadow: var(--lp-shadow-pop) !important; border: 0; }
body.lp .menu-sub-dropdown.show { animation: lp-pop-in 0.16s var(--lp-ease-out); transform-origin: top right; }
body.lp .menu-sub-dropdown .menu-link { color: var(--lp-fg-2) !important; border-radius: var(--lp-radius-sm); font-weight: 500; font-size: 0.875rem; }
body.lp .menu-sub-dropdown .menu-link:hover { background: var(--lp-hover) !important; color: var(--lp-fg) !important; }
body.lp .menu-state-bg .menu-item .menu-link:hover:not(.disabled):not(.active) { background-color: var(--lp-hover); }
@keyframes lp-pop-in { from { opacity: 0; transform: scale(0.97) translateY(-4px); } to { opacity: 1; transform: none; } }

/* Tabs, Progress, Tooltip, Popover */
body.lp .nav-line-tabs { border-bottom-color: var(--lp-border); }
body.lp .nav-line-tabs .nav-item .nav-link { color: var(--lp-fg-muted); }
body.lp .nav-line-tabs .nav-item .nav-link.active, body.lp .nav-line-tabs .nav-item .nav-link:hover:not(.disabled) { color: var(--lp-fg); border-bottom-color: var(--lp-fg); }
body.lp .progress { background: var(--lp-muted-bg) !important; border-radius: 99px; }
body.lp .progress-bar { background: var(--lp-accent) !important; border-radius: 99px; }
body.lp .tooltip .tooltip-inner { background: var(--lp-primary); color: var(--lp-primary-fg); border-radius: var(--lp-radius-sm); font-size: 0.75rem; font-weight: 500; padding: 6px 9px; }
body.lp .tooltip.bs-tooltip-top .tooltip-arrow::before { border-top-color: var(--lp-primary); }
body.lp .tooltip.bs-tooltip-bottom .tooltip-arrow::before { border-bottom-color: var(--lp-primary); }
body.lp .popover { background: var(--lp-surface); border: 1px solid var(--lp-border); border-radius: var(--lp-radius); box-shadow: var(--lp-shadow-pop); }
body.lp .popover-body { color: var(--lp-fg-2); }

/* Select2 / Flatpickr */
body.lp .select2-container--bootstrap5 .select2-selection { background-color: var(--lp-surface) !important; border: 1px solid var(--lp-border) !important; color: var(--lp-fg) !important; border-radius: var(--lp-radius-sm); }
body.lp .select2-container--bootstrap5 .select2-selection__rendered { color: var(--lp-fg) !important; }
body.lp .select2-dropdown { background: var(--lp-surface) !important; border: 0 !important; border-radius: var(--lp-radius) !important; box-shadow: var(--lp-shadow-pop) !important; }
body.lp .select2-results__option { color: var(--lp-fg-2) !important; }
body.lp .select2-results__option--highlighted { background: var(--lp-hover) !important; color: var(--lp-fg) !important; }
body.lp .select2-results__option--selected { background: var(--lp-accent-soft) !important; color: var(--lp-accent-text) !important; }
body.lp .flatpickr-calendar { background: var(--lp-surface); box-shadow: var(--lp-shadow-pop); border-radius: var(--lp-radius-lg); }

body.lp ::-webkit-scrollbar { width: 10px; height: 10px; }
body.lp ::-webkit-scrollbar-thumb { background: var(--lp-border-strong); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
body.lp ::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------------
   6. Seiten-Patches
   --------------------------------------------------------------------- */
@media (min-width: 769px) {
  body.lp #dt_forms tbody tr.table-danger { background: transparent !important; border: 0 !important; box-shadow: none !important; }
  body.lp #dt_forms tbody tr.table-danger td { background: var(--lp-danger-soft) !important; border-top: 0 !important; border-bottom: 1px solid var(--lp-border) !important; border-left: 0 !important; border-right: 0 !important; border-radius: 0 !important; }
  body.lp #dt_forms tbody tr.table-danger td:first-child { box-shadow: inset 3px 0 0 var(--lp-danger); }
}
body.lp #dt_forms tbody tr { border-bottom: 1px solid var(--lp-border) !important; }
body.lp #dt_forms tbody tr td { padding: 12px 12px !important; }
body.lp #dt_forms thead th { padding-left: 12px !important; padding-right: 12px !important; }
body.lp #dt_forms td[data-label="Kunde"] .text-gray-900 { color: var(--lp-fg) !important; font-weight: 600; }
body.lp #dt_forms td[data-label="Erstellt von"] .text-gray-800 { font-weight: 500; }
body.lp #dt_forms td[data-label="Erstellt von"] .fs-8 { color: var(--lp-fg-subtle); }
body.lp #dt_forms .edit-inline-name { opacity: .5; }
/* Aktionen immer in einer Zeile (statt 3×2-Raster) */
@media (min-width: 768px) {
  body.lp #dt_forms tbody td[data-label="Aktionen"] > div { display: inline-flex !important; grid-template-columns: none !important; gap: 2px !important; width: auto !important; }
  body.lp #dt_forms tbody td[data-label="Aktionen"] > div .btn { width: 32px !important; flex: 0 0 auto !important; }
}
@media (max-width: 768px) {
  body.lp #dt_forms tbody tr, body.lp #dt_trash tbody tr, body.lp #dt_users tbody tr { background: var(--lp-surface) !important; border: 1px solid var(--lp-border) !important; border-radius: var(--lp-radius-lg) !important; box-shadow: none !important; }
  body.lp #dt_forms tbody td:before { color: var(--lp-fg-muted) !important; font-weight: 500 !important; }
  body.lp #dt_forms tbody td[data-label="Aktionen"] { border-top-color: var(--lp-border) !important; }
  body.lp .table thead th { border: 0 !important; }
}

/* Call Center */
body.lp #cc_table thead th { border-bottom: 1px solid var(--lp-border) !important; }
body.lp #cc_table tbody tr.cc-due td { background: var(--lp-danger-soft) !important; }
body.lp #cc_table tbody tr.cc-due td:first-child { box-shadow: inset 3px 0 0 var(--lp-danger); }
body.lp #cc_tabs .cc-tab { color: var(--lp-fg-muted); border-radius: var(--lp-radius-sm) var(--lp-radius-sm) 0 0; border-bottom: 2px solid transparent; font-weight: 500; background: transparent; }
body.lp #cc_tabs .cc-tab:hover { color: var(--lp-fg); background: var(--lp-hover); }
body.lp #cc_tabs .cc-tab.active { color: var(--lp-fg) !important; background: transparent; border-bottom-color: var(--lp-fg) !important; font-weight: 620; }
body.lp #cc_tab_actions { background: var(--lp-accent-soft) !important; border: 1px solid var(--lp-accent-soft-2) !important; }
body.lp #cc_tab_shared_info { background: var(--lp-info-soft) !important; border: 1px solid transparent !important; }
body.lp #cc_adv_filters > div { background: var(--lp-surface-2) !important; border: 1px solid var(--lp-border) !important; border-radius: var(--lp-radius) !important; }
body.lp #cc_filter_notice { background: var(--lp-warning-soft); border: 1px solid transparent; color: var(--lp-warning-text); border-radius: var(--lp-radius); }
body.lp #cc_filter_notice .cc-notice-icon { background: var(--lp-warning-soft); color: var(--lp-warning-text); }
body.lp #cc_filter_notice .cc-notice-count, body.lp #cc_filter_notice .cc-notice-reset { color: var(--lp-warning-text); }
body.lp #cc_bulkbar { background: var(--lp-ink) !important; color: var(--lp-ink-text) !important; border: 0; border-radius: var(--lp-radius-lg); box-shadow: var(--lp-shadow-pop); }
body.lp #cc_bulkbar .form-select { background-color: rgba(255,255,255,.06); color: var(--lp-ink-text); border-color: var(--lp-ink-line); box-shadow: none; }
body.lp #cc_bulkbar .btn.btn-light { background: transparent; color: var(--lp-ink-text); }
body.lp #cc_bulkbar .btn.btn-light:not(.btn-link):not(.btn-flush):not(.btn-outline) { border-color: var(--lp-ink-line) !important; }
body.lp #cc_bulkbar .btn.btn-primary { background: #fff; color: #0e1a30; }
body.lp #cc_bulkbar .btn.btn-primary:not(.btn-link):not(.btn-flush):not(.btn-outline) { border-color: #fff !important; }
body.lp #cc_cockpit { border: 1px solid var(--lp-accent) !important; box-shadow: 0 0 0 4px var(--lp-accent-soft); }
body.lp .ck-hist-item { border-left-color: var(--lp-border); }
body.lp .ck-hist-item::before { background: var(--lp-accent); }
body.lp .lp-progress-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 0.8125rem; color: var(--lp-fg-muted); padding: 12px 0 8px; border-top: 1px solid var(--lp-border); }
body.lp .lp-progress-line strong { color: var(--lp-fg); font-weight: 600; }

/* Call-Center-Statistik */
body.lp .cc-stat, body.lp .cc-chart-card { background: var(--lp-surface) !important; border: 1px solid var(--lp-border); box-shadow: none !important; border-radius: var(--lp-radius-lg) !important; }
body.lp .cc-stat .cc-val, body.lp .cc-chart-title { color: var(--lp-fg) !important; letter-spacing: -0.03em;  }
body.lp .cc-stat .cc-lbl { color: var(--lp-fg-muted) !important; font-weight: 500 !important; }
body.lp .cc-info { color: var(--lp-fg-subtle); }
body.lp .cc-info:hover { color: var(--lp-accent); }

/* KI-Import */
body.lp .kii-head h1 { color: var(--lp-fg) !important; font-weight: 640;  letter-spacing: -0.02em; }
body.lp .kii-head p, body.lp .kii-ziel-label { color: var(--lp-fg-muted) !important; }
body.lp .kii-ziel { background: var(--lp-muted-bg) !important; }
body.lp .kii-ziel button { color: var(--lp-fg-muted) !important; }
body.lp .kii-ziel button.active { background: var(--lp-surface) !important; color: var(--lp-fg) !important; box-shadow: 0 1px 2px rgba(14,26,48,.10), 0 0 0 1px var(--lp-border); }
body.lp .kii-drop { background: var(--lp-purple-soft) !important; border-color: color-mix(in srgb, var(--lp-purple) 35%, transparent) !important; }
body.lp .kii-drop h3 { color: var(--lp-fg) !important; }
body.lp .kii-drop p { color: var(--lp-fg-muted) !important; }

/* Logs / Papierkorb / Benutzer */
body.lp #logs_table tbody tr { border-color: var(--lp-border) !important; }
body.lp #logs_table tbody tr:hover { background: var(--lp-surface-2) !important; box-shadow: none !important; }
body.lp #dt_trash tbody tr, body.lp #dt_users tbody tr { border-bottom-color: var(--lp-border) !important; }
body.lp .user-name, body.lp #dt_users .text-gray-800 { color: var(--lp-fg) !important; }

/* Formular-Vorschau */
body.lp .modern-header, body.lp .modern-footer { background: var(--lp-surface) !important; }
body.lp .modern-body { background: var(--lp-bg) !important; }
body.lp .modern-body .card, body.lp .modern-body .section-card { background: var(--lp-surface) !important; border-color: var(--lp-border) !important; }
body.lp .section-title { color: var(--lp-fg) !important; }
body.lp .divider { background: var(--lp-border) !important; }
body.lp .kv dt { color: var(--lp-fg-muted) !important; }
body.lp .kv dd { color: var(--lp-fg) !important; }
body.lp .mf-ki-chip, body.lp .ki-list-dok { background: var(--lp-purple-soft) !important; color: var(--lp-purple) !important; }
body.lp .ki-list-dok:hover { background: var(--lp-purple) !important; color: #fff !important; }

body.lp { --calendar-background: var(--lp-surface); --calendar-border: var(--lp-border); }

html[data-bs-theme="dark"] body.lp .badge[style*="background:#"] { filter: saturate(0.9) brightness(0.92); }
html[data-bs-theme="dark"] body.lp [style*="background:#f9fafb"],
html[data-bs-theme="dark"] body.lp [style*="background: #f9fafb"],
html[data-bs-theme="dark"] body.lp [style*="background:#fff;"],
html[data-bs-theme="dark"] body.lp [style*="background: #fff;"],
html[data-bs-theme="dark"] body.lp [style*="background-color: #fff"],
html[data-bs-theme="dark"] body.lp [style*="background:#ffffff"] { background: var(--lp-surface) !important; color: var(--lp-fg-2) !important; }
html[data-bs-theme="dark"] body.lp .bg-white.rounded-circle { background: #fff !important; }

/* Anmeldung */
body.lp.lp-auth { background: var(--lp-ink) !important; }
body.lp.lp-auth .auth-page-bg { background-image: none !important; }
body.lp.lp-auth .login-wrapper, body.lp.lp-auth .w-lg-500px.bg-body { background: var(--lp-surface) !important; border: 0; border-radius: var(--lp-radius-xl) !important; box-shadow: 0 30px 80px -20px rgba(0,0,0,.6) !important; }
body.lp.lp-auth h1 { font-weight: 640;  letter-spacing: -0.02em; }

/* ---------------------------------------------------------------------
   7. Bewegung & Barrierefreiheit
   --------------------------------------------------------------------- */
html.lp-theme-switching *, html.lp-theme-switching *::before, html.lp-theme-switching *::after { transition: none !important; }
body.lp :focus-visible { outline: 2px solid var(--lp-accent); outline-offset: 2px; }
body.lp .form-control:focus-visible, body.lp .form-select:focus-visible, body.lp .btn:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) {
  body.lp .modal.fade .modal-dialog { transform: none; transition: opacity 0.15s linear; }
  body.lp .menu-sub-dropdown.show { animation: none; }
  body.lp .btn:active:not(:disabled), body.lp .lp-icon-btn:active { transform: none; }
  html.lp-ready body.lp .lp-sidebar { transition: none; }
}

/* =====================================================================
   8. Velzon-Stil: Shell-Anpassungen + Dashboard-Bausteine (lpv-*)
   ===================================================================== */
body.lp { font-size: 13.5px; }
body.lp .lp-main { border-radius: 0; margin: 0 !important; min-height: 100dvh; }
body.lp .lp-topbar {
  top: 0; height: 70px; border-radius: 0;
  background: var(--lp-surface); -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: var(--lp-shadow-xs); border-bottom: 0 !important;
}
body.lp .lp-topbar::before { display: none; }
body.lp .lp-search-pill { background: var(--lp-muted-bg); border-color: transparent; box-shadow: none; height: 38px; min-width: 260px; }
html[data-bs-theme="dark"] body.lp .lp-sidebar { border-right: 1px solid var(--lp-border); }
html[data-bs-theme="dark"][data-lp-side="right"] body.lp .lp-sidebar { border-right: 0; border-left: 1px solid var(--lp-border); }

/* Leiste wie Velzon: Abschnittstitel in Versalien, ruhige Einträge */
body.lp .lp-sidebar { padding: 0 12px 12px; }
body.lp .lp-sb-head { height: 70px; margin: 0 0 6px; padding: 0 4px 0 8px; }
body.lp .lp-brand-mark { width: 32px; height: 32px; border-radius: 6px; }
body.lp .lp-sb-search { background: rgba(255,255,255,0.08); border-color: transparent; color: var(--lp-ink-muted); }
body.lp .lp-sb-search:hover { background: rgba(255,255,255,0.12); border-color: transparent; color: #fff; }
body.lp .lp-sb-label { text-transform: uppercase; font-size: 0.6875rem; letter-spacing: 0.05em; font-weight: 600; color: var(--lp-ink-subtle); }
body.lp .lp-nav-item { height: 40px; font-size: 0.9375rem; font-weight: 500; }
body.lp .lp-nav-item.is-active { background: rgba(255,255,255,0.10); }
body.lp .lp-nav-item.is-active::before { display: none; }

/* Seitentitel einheitlich, kleiner wie Velzon */
body.lp .toolbar h3.text-white,
body.lp .toolbar h1.text-white,
body.lp .container-xxl > .d-flex > div > h1.text-white,
body.lp .lp-page-title { font-size: 1.25rem !important; font-weight: 600 !important;  letter-spacing: 0; }
body.lp .card { border: 0; box-shadow: var(--lp-shadow-xs); border-radius: var(--lp-radius-lg); }
html[data-bs-theme="dark"] body.lp .card { box-shadow: none; border: 1px solid var(--lp-border); }
body.lp .card .card-title, body.lp .card .card-label {  font-weight: 600 !important; }

/* ---- Begrüßung ---- */
body.lp .lpv-welcome { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 24px 0 20px; }
body.lp .lpv-hello { font-size: 1.25rem; font-weight: 600; color: var(--lp-fg); margin: 0 0 4px; letter-spacing: 0; }
body.lp .lpv-hello-sub { margin: 0; color: var(--lp-fg-muted); font-size: 0.875rem; }
body.lp .lpv-welcome-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
body.lp .lpv-welcome-actions #leadFilterGroup { background: var(--lp-surface); box-shadow: var(--lp-shadow-xs); }
html[data-bs-theme="dark"] body.lp .lpv-welcome-actions #leadFilterGroup { border: 1px solid var(--lp-border); }
body.lp .lpv-welcome-actions #leadFilterGroup .btn.active { background: var(--lp-primary) !important; color: #fff !important; box-shadow: none !important; }

/* Weiche Farbflächen (Velzon „-subtle") */
body.lp .lpv-soft-primary   { background: rgba(25, 147, 155, 0.12); color: var(--lpv-primary); }
body.lp .lpv-soft-success   { background: rgba(42, 167, 105, 0.12); color: var(--lpv-success); }
body.lp .lpv-soft-info      { background: rgba(42, 127, 168, 0.12); color: var(--lpv-info); }
body.lp .lpv-soft-warning   { background: rgba(246, 140, 17, 0.16); color: #d9961f; }
body.lp .lpv-soft-danger    { background: rgba(240, 101, 72, 0.12); color: var(--lpv-danger); }
body.lp .lpv-soft-secondary { background: rgba(53, 119, 241, 0.12); color: var(--lpv-secondary); }
html[data-bs-theme="dark"] body.lp .lpv-soft-primary { background: rgba(43, 179, 188, 0.16); color: #5fd0d7; }
body.lp .btn.btn-soft-success { background: rgba(42, 167, 105, 0.12); color: var(--lpv-success); }
body.lp .btn.btn-soft-success:hover { background: var(--lpv-success) !important; color: #fff !important; }
body.lp .btn.btn-soft-primary { background: rgba(25, 147, 155, 0.10); color: var(--lpv-primary); }
body.lp .btn.btn-soft-primary:hover { background: var(--lpv-primary) !important; color: #fff !important; }
html[data-bs-theme="dark"] body.lp .btn.btn-soft-primary { color: #5fd0d7; }

/* ---- Kennzahl-Karten ---- */
body.lp .lpv-kpi { height: 100%; transition: transform .2s var(--lp-ease-out), box-shadow .2s ease; }
@media (hover: hover) { body.lp .lpv-kpi:hover { transform: translateY(-3px); box-shadow: 0 5px 10px rgba(30, 32, 37, 0.12); } }
body.lp .lpv-kpi .card-body { padding: 18px 20px; }
body.lp .lpv-kpi-label { margin: 0; text-transform: uppercase; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.03em; color: var(--lp-fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.lp .lpv-kpi-value { margin: 0 0 14px; font-size: 1.5rem; font-weight: 600; color: var(--lp-fg); line-height: 1.1; }
body.lp .lpv-kpi-link { font-size: 0.8125rem; color: var(--lpv-primary) !important; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(25,147,155,.35); }
html[data-bs-theme="dark"] body.lp .lpv-kpi-link { color: #5fd0d7 !important; }
body.lp .lpv-kpi-link:hover { text-decoration-color: currentColor; }
body.lp .lpv-kpi-note { font-size: 0.8125rem; color: var(--lp-fg-muted); }
body.lp .lpv-kpi-icon { width: 48px; height: 48px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
body.lp .lpv-kpi-icon .lp-i { width: 22px; height: 22px; }
body.lp .lpv-trend { display: inline-flex; align-items: center; gap: 2px; font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
body.lp .lpv-trend.is-up { color: var(--lpv-success); }
body.lp .lpv-trend.is-down { color: var(--lpv-danger); }
body.lp .lpv-trend.is-flat { color: var(--lp-fg-muted); }
body.lp .lpv-trend .lp-i { width: 14px; height: 14px; stroke-width: 2.2; }
body.lp .lpv-pill { font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 4px; background: rgba(246, 140, 17, 0.16); color: #c98b1b; white-space: nowrap; }

/* ---- Kartenkopf ---- */
body.lp .card .card-header.lpv-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 0; padding: 14px 20px; border-bottom: 1px solid var(--lp-border); flex-wrap: wrap; }
body.lp .lpv-card-title { margin: 0; font-size: 0.96875rem; font-weight: 600; color: var(--lp-fg); }
body.lp .lpv-link-sm { font-size: 0.8125rem; color: var(--lpv-primary) !important; text-decoration: none; }
body.lp .lpv-muted-sm { font-size: 0.8125rem; color: var(--lp-fg-muted); }
body.lp .lpv-strong { font-weight: 600; color: var(--lp-fg); text-decoration: none; }
body.lp a.lpv-strong:hover { color: var(--lpv-primary); }
body.lp .lpv-range { display: inline-flex; gap: 4px; }
body.lp .lpv-range .btn { background: rgba(25, 147, 155, 0.08); color: var(--lp-fg-2); font-weight: 600; padding: 4px 10px !important; font-size: 0.75rem !important; }
body.lp .lpv-range .btn.active { background: var(--lp-primary) !important; color: #fff !important; }

/* Kennzahlen über dem Diagramm (Velzon: gestrichelte Teilung) */
body.lp .lpv-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--lp-surface-2); border-bottom: 1px dashed var(--lp-border); }
body.lp .lpv-sum > div { padding: 14px 12px; text-align: center; border-left: 1px dashed var(--lp-border); }
body.lp .lpv-sum > div:first-child { border-left: 0; }
body.lp .lpv-sum h5 { margin: 0 0 2px; font-size: 1.125rem; font-weight: 600; color: var(--lp-fg); }
body.lp .lpv-sum p { margin: 0; font-size: 0.8125rem; color: var(--lp-fg-muted); }
@media (max-width: 575.98px) { body.lp .lpv-sum { grid-template-columns: repeat(2, 1fr); } body.lp .lpv-sum > div:nth-child(3) { border-left: 0; } body.lp .lpv-sum > div:nth-child(n+3) { border-top: 1px dashed var(--lp-border); } }
body.lp .lpv-chart { min-height: 320px; }
body.lp .apexcharts-tooltip { box-shadow: var(--lp-shadow-pop) !important; border: 0 !important; }
body.lp .apexcharts-legend-text { font-family: var(--lp-font) !important; }

/* Status-Ring + Legende */
body.lp .lpv-donut { min-height: 230px; }
body.lp .lpv-legend { list-style: none; margin: 8px 0 0; padding: 0; }
body.lp .lpv-legend li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--lp-border); font-size: 0.875rem; }
body.lp .lpv-legend li:first-child { border-top: 0; }
body.lp .lpv-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
body.lp .lpv-legend-name { flex: 1; min-width: 0; color: var(--lp-fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.lp .lpv-legend-n { font-weight: 600; color: var(--lp-fg); }
body.lp .lpv-legend-pct { width: 3rem; text-align: right; color: var(--lp-fg-muted); font-size: 0.8125rem; }

/* Tabellen in Karten (Velzon: graue Kopfzeile, keine Rahmen) */
body.lp .table.lpv-table { font-size: 0.875rem !important; }
body.lp .table.lpv-table thead th { background: var(--lp-surface-2) !important; border: 0 !important; border-radius: 0 !important; color: var(--lp-fg-muted) !important; font-weight: 600 !important; padding: 10px 20px !important; }
body.lp .table.lpv-table td { padding: 12px 20px !important; border-bottom: 1px solid var(--lp-border); }
body.lp .table.lpv-table tbody tr:last-child td { border-bottom: 0; }
body.lp .lpv-av { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--lp-muted-bg); color: var(--lp-fg-2); font-size: 0.78125rem; font-weight: 700; text-transform: uppercase; }
body.lp .lpv-av img { width: 100%; height: 100%; object-fit: cover; }
body.lp .min-w-0 { min-width: 0; }
body.lp .badge.lpv-badge-primary   { background: rgba(25, 147, 155, 0.12); color: var(--lpv-primary); }
body.lp .badge.lpv-badge-info      { background: rgba(42, 127, 168, 0.12); color: var(--lpv-info); }
body.lp .badge.lpv-badge-success   { background: rgba(42, 167, 105, 0.12); color: var(--lpv-success); }
body.lp .badge.lpv-badge-secondary { background: var(--lp-muted-bg); color: var(--lp-fg-2); }
html[data-bs-theme="dark"] body.lp .badge.lpv-badge-primary { color: #5fd0d7; }
body.lp .progress.lpv-progress { height: 6px; background: var(--lp-muted-bg) !important; border-radius: 6px; }
body.lp .progress.lpv-progress .progress-bar { background: var(--lpv-primary) !important; }
body.lp .lpv-region + .lpv-region { margin-top: 18px; }
body.lp .lpv-region:nth-child(2) .progress-bar { background: var(--lpv-success) !important; }
body.lp .lpv-region:nth-child(3) .progress-bar { background: var(--lpv-info) !important; }
body.lp .lpv-region:nth-child(4) .progress-bar { background: var(--lpv-warning) !important; }
body.lp .lpv-region:nth-child(5) .progress-bar { background: var(--lpv-danger) !important; }

/* Zeitachse */
body.lp .lpv-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
body.lp .lpv-timeline li { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
body.lp .lpv-timeline li:last-child { padding-bottom: 0; }
body.lp .lpv-timeline li:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; border-left: 1px dashed var(--lp-border-strong); }
body.lp .lpv-tl-icon { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
body.lp .lpv-tl-body { min-width: 0; padding-top: 4px; }
body.lp .lpv-tl-body .lpv-strong { font-size: 0.875rem; }
body.lp .lpv-tl-kunde { font-weight: 500; color: var(--lp-fg-2); }

/* Leerzustände */
body.lp .lpv-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 36px 20px; text-align: center; color: var(--lp-fg-muted); }
body.lp .lpv-empty .lp-i { width: 28px; height: 28px; color: var(--lp-fg-subtle); }
body.lp .lpv-empty p { margin: 0; font-size: 0.875rem; max-width: 30ch; }

/* Call-Center-Karte */
body.lp .lpv-cc { background: var(--lpv-primary) !important; color: #fff; border: 0 !important; }
html[data-bs-theme="dark"] body.lp .lpv-cc { background: #2f3d6b !important; }
body.lp .lpv-cc .lpv-card-title { color: #fff !important; }
body.lp .lpv-cc-icon { background: rgba(255,255,255,0.14); color: #fff; width: 40px; height: 40px; }
body.lp .lpv-cc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin-bottom: 20px; }
body.lp .lpv-cc-grid h5 { margin: 0; color: #fff; font-size: 1.375rem; font-weight: 600; }
body.lp .lpv-cc-grid p { margin: 0; color: rgba(255,255,255,0.72); font-size: 0.8125rem; }
body.lp .lpv-cc .btn.btn-light { background: #fff; color: var(--lpv-primary); border-color: #fff !important; }

/* Lead-Tabelle */
body.lp #lp_leads .lpv-leads-head { padding: 12px 20px; }
body.lp #lp_leads .card-body { padding: 0 20px 16px; }
body.lp #lp_leads #globalSearch { width: 240px !important; }
@media (max-width: 575.98px) {
  body.lp .lp-search-pill { min-width: 0; width: 38px; padding: 0; justify-content: center; background: transparent; }
  body.lp .lpv-welcome-actions { width: 100%; }
}

/* ---------------------------------------------------------------------
   9. Dubletten, Sperrliste, Power-Dialer, Verkäufe
   --------------------------------------------------------------------- */
body.lp .lp-flags { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
body.lp .lp-flags:empty { display: none; }
body.lp .lp-flag {
  display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 3px;
  font-size: 10.5px; font-weight: 600; line-height: 1; white-space: nowrap; letter-spacing: .01em;
}
body.lp .lp-flag-dublette { color: #a86f0d; background: rgba(246,140,17,.16); }
body.lp .lp-flag-gesperrt { color: var(--lpv-danger); background: rgba(240,101,72,.12); }
body.lp .lp-flag-verkauft { color: var(--lpv-success); background: rgba(42,167,105,.12); }
body.lp .lp-flag-reklamiert { color: var(--lpv-danger); background: rgba(240,101,72,.12); }
[data-bs-theme="dark"] body.lp .lp-flag-dublette { color: #f7b84b; }
body.lp tr.lp-row-gesperrt > td { background: rgba(240,101,72,.04) !important; }
body.lp tr.lp-row-gesperrt a[href^="tel:"] { text-decoration: line-through; opacity: .6; }

/* Kontakt-Hinweis in Formularen */
body.lp .lp-kontakt-hinweis { margin-top: 12px; display: grid; gap: 8px; }
body.lp .lp-kontakt-hinweis[hidden] { display: none; }
body.lp .lp-kh { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--lp-radius); font-size: 13px; line-height: 1.45; }
body.lp .lp-kh .lp-i { flex: none; margin-top: 2px; }
body.lp .lp-kh ul { margin: 4px 0 0; padding-left: 18px; }
body.lp .lp-kh-warning { background: rgba(246,140,17,.14); color: #8a5a06; }
body.lp .lp-kh-danger { background: rgba(240,101,72,.12); color: #b8402a; }
[data-bs-theme="dark"] body.lp .lp-kh-warning { color: #f7c56f; }
[data-bs-theme="dark"] body.lp .lp-kh-danger { color: #f8957f; }

/* Power-Dialer */
body.lp .ck-auto { display: inline-flex; align-items: center; gap: 6px; padding-left: 0; }
body.lp .ck-auto .form-check-input { float: none; margin: 0; }
body.lp .ck-countdown {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px;
  padding: 10px 12px; border-radius: var(--lp-radius); background: rgba(42,167,105,.1); color: var(--lp-fg);
}
body.lp .ck-countdown.d-none { display: none !important; }
body.lp .ck-countdown span { margin-right: auto; }

/* Sperrliste-Seite */
body.lp .lp-sperr-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 991.98px) { body.lp .lp-sperr-grid { grid-template-columns: 1fr; } }
body.lp .lp-sperr-wert { font-variant-numeric: normal; font-weight: 600; color: var(--lp-fg); }
body.lp .lp-muted { color: var(--lp-fg-muted); }
body.lp .lp-flag[data-lpv-find] { cursor: pointer; }
body.lp .lpv-verkauf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
body.lp .lpv-verkauf-grid > div { min-width: 0; }
body.lp .lpv-verkauf-n { font-size: 22px; font-weight: 600; color: var(--lp-fg); line-height: 1.3; margin: 2px 0; }
@media (max-width: 767.98px) { body.lp .lpv-verkauf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------------
   10. Formulardetails (#modalFormGoruntule) – hell & dunkel einheitlich
   Das Widget bringt feste Farben (#fff, #f6f7f9 …) mit; hier auf Tokens.
   --------------------------------------------------------------------- */
body.lp #modalFormGoruntule .modern-modal { background: var(--lp-surface); border: 1px solid var(--lp-border); border-radius: var(--lp-radius-xl); }
body.lp #modalFormGoruntule .modern-header,
body.lp #modalFormGoruntule .modern-footer { background: var(--lp-surface); color: var(--lp-fg); }
body.lp #modalFormGoruntule .modern-header { border-bottom: 1px solid var(--lp-border); }
body.lp #modalFormGoruntule .modern-footer { border-top: 1px solid var(--lp-border); }
body.lp #modalFormGoruntule .modal-title { color: var(--lp-fg); font-weight: 600; }
body.lp #modalFormGoruntule .modern-body { background: var(--lp-bg); }
body.lp #modalFormGoruntule .surface {
  background: var(--lp-surface); border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-lg); box-shadow: 0 1px 2px rgba(56,65,74,.08);
}
body.lp #modalFormGoruntule .section-title {
  color: var(--lp-fg); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--lp-border);
}
body.lp #modalFormGoruntule .d-flex > .section-title { border-bottom: 0; padding-bottom: 0; }
body.lp #modalFormGoruntule .kv dt { color: var(--lp-fg-muted); font-weight: 500; }
body.lp #modalFormGoruntule .kv dd { color: var(--lp-fg); font-weight: 500; margin-bottom: 0; }
body.lp #modalFormGoruntule .kv dt, body.lp #modalFormGoruntule .kv dd { padding: 6px 0; border-bottom: 1px dashed var(--lp-border); }
body.lp #modalFormGoruntule .kv dt:nth-last-of-type(1), body.lp #modalFormGoruntule .kv dd:last-of-type { border-bottom: 0; }
body.lp #modalFormGoruntule .text-muted { color: var(--lp-fg-muted) !important; }
body.lp #modalFormGoruntule .text-dark,
body.lp #modalFormGoruntule .fw-semibold { color: var(--lp-fg) !important; }
body.lp #modalFormGoruntule #mf-status-top { background: var(--lp-muted-bg) !important; color: var(--lp-fg) !important; font-weight: 600; }
body.lp #modalFormGoruntule .note-block { background: var(--lp-surface-2); border-color: var(--lp-border); color: var(--lp-fg); }
body.lp #modalFormGoruntule .mini-item { border-bottom-color: var(--lp-border); }
body.lp #modalFormGoruntule .mini-text { color: var(--lp-fg); }
body.lp #modalFormGoruntule .mini-meta { color: var(--lp-fg-muted); }
body.lp #modalFormGoruntule .mf-ki-chip { background: var(--lp-accent-soft); border-color: var(--lp-accent-soft-2); color: var(--lp-accent-text); }
body.lp #modalFormGoruntule .mf-ki-chip small { color: var(--lp-fg-muted); }
body.lp #modalFormGoruntule .btn[data-bs-dismiss="modal"] .ki-duotone,
body.lp #modalFormGoruntule .modern-header .ki-duotone { color: var(--lp-fg-muted); }
body.lp #modalFormGoruntule .modern-header .btn:hover .ki-duotone { color: var(--lp-fg); }
html[data-bs-theme="dark"] body.lp #modalFormGoruntule .surface { box-shadow: none; }
html[data-bs-theme="dark"] body.lp #modalFormGoruntule .brand-logo { filter: drop-shadow(0 0 1px rgba(255,255,255,.35)); }
html[data-bs-theme="dark"] body.lp #modalFormGoruntule .insurer-logo { background: #fff; border-radius: 4px; padding: 2px; }

/* ---------------------------------------------------------------------
   11. Einstellungen (Firma bearbeiten) – Bereichsnavigation
   --------------------------------------------------------------------- */
body.lp .lp-set { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
body.lp .lp-set-nav {
  position: sticky; top: 86px; max-height: calc(100vh - 106px); overflow: auto;
  background: var(--lp-surface); border: 1px solid var(--lp-border); border-radius: var(--lp-radius-lg);
  padding: 12px; box-shadow: 0 1px 2px rgba(56,65,74,.08);
}
body.lp .lp-set-search { position: relative; width: 340px; max-width: 100%; }
body.lp .lp-set-search .lp-i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--lp-fg-muted); pointer-events: none; }
body.lp .lp-set-search input {
  width: 100%; height: 38px; padding: 0 12px 0 34px; border: 1px solid var(--lp-border); border-radius: var(--lp-radius);
  background: var(--lp-surface); color: var(--lp-fg); font-size: 13.5px; outline: 0;
}
body.lp .lp-set-search input:focus { border-color: var(--lp-accent); box-shadow: 0 0 0 3px var(--lp-ring); }
body.lp .lp-set-group { padding: 4px 0; }
body.lp .lp-set-group + .lp-set-group { border-top: 1px solid var(--lp-border); }
body.lp .lp-set-group-name { padding: 6px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--lp-fg-subtle); }
body.lp .lp-set-link {
  position: relative; display: grid; grid-template-columns: 1fr auto; column-gap: 8px;
  padding: 6px 10px; border-radius: var(--lp-radius); color: var(--lp-fg-2); text-decoration: none;
  transition: background-color .15s var(--lp-ease-out), color .15s var(--lp-ease-out);
}
body.lp .lp-set-link:hover { background: var(--lp-hover); color: var(--lp-fg); }
body.lp .lp-set-link.is-active { background: var(--lp-accent-soft); color: var(--lp-accent-text); }
body.lp .lp-set-link.is-active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--lpv-primary); }
body.lp .lp-set-link-t { font-size: 13.5px; font-weight: 500; }
body.lp .lp-set-link-d { grid-column: 1; font-size: 11.5px; color: var(--lp-fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.lp .lp-set-dirty { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 7px; height: 7px; border-radius: 50%; background: var(--lpv-warning); opacity: 0; transition: opacity .2s; }
body.lp .lp-set-link.is-dirty .lp-set-dirty { opacity: 1; }
body.lp .lp-set-empty { padding: 10px; font-size: 13px; color: var(--lp-fg-muted); }
body.lp .lp-set-body > .card { margin-bottom: 20px !important; }
body.lp .lp-set-body:not(.is-searching) > .card { animation: lp-set-in .18s var(--lp-ease-out); }
@keyframes lp-set-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
body.lp .lp-set-body > .card > .card-header { min-height: 60px; border-bottom: 1px solid var(--lp-border) !important; }
body.lp .lp-set-body > .card > .card-header h3 { font-size: 16px; }
/* Speichern-Leiste bleibt im Blick */
body.lp .lp-set-body > .card .card-footer {
  position: sticky; bottom: 0; z-index: 2; background: var(--lp-surface);
  border-top: 1px solid var(--lp-border); border-radius: 0 0 var(--lp-radius-lg) var(--lp-radius-lg);
  padding: 14px 24px !important;
}
@media (prefers-reduced-motion: reduce) { body.lp .lp-set-body > .card { animation: none; } }
@media (max-width: 991.98px) {
  body.lp .lp-set { grid-template-columns: 1fr; gap: 14px; }
  body.lp .lp-set-nav { position: static; max-height: none; padding: 10px; }
  body.lp #lp_set_links { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
  body.lp .lp-set-group { display: contents; }
  body.lp .lp-set-group-name { display: none; }
  body.lp .lp-set-link { flex: none; display: block; padding: 7px 12px; border: 1px solid var(--lp-border); }
  body.lp .lp-set-link-d { display: none; }
  body.lp .lp-set-link.is-active::before { display: none; }
  body.lp .lp-set-dirty { position: absolute; top: 4px; right: 4px; }
}
body.lp .lpv-leads-top { scroll-margin-top: 86px; }

/* ---------------------------------------------------------------------
   12. Statistik (Call Center)
   --------------------------------------------------------------------- */
body.lp .lps-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--lp-surface); border: 1px solid var(--lp-border); border-radius: var(--lp-radius); }
body.lp .lps-seg-item { padding: 6px 12px; border-radius: 4px; font-size: 13px; font-weight: 500; color: var(--lp-fg-2); text-decoration: none; white-space: nowrap; transition: background-color .15s var(--lp-ease-out), color .15s; }
body.lp .lps-seg-item:hover { background: var(--lp-hover); color: var(--lp-fg); }
body.lp .lps-seg-item.is-active { background: var(--lp-primary); color: #fff; }
body.lp .lpv-kpi .card-body { position: relative; }
body.lp .lps-kpi-top { display: flex; align-items: center; gap: 8px; padding-right: 48px; min-height: 22px; }
body.lp .lps-kpi-top .lpv-trend { margin-left: auto; }
body.lp .lps-kpi-n { font-size: 28px; font-weight: 600; color: var(--lp-fg); line-height: 1.2; margin-top: 14px; }
body.lp .lps-kpi-sub { font-size: 12.5px; color: var(--lp-fg-muted); margin-top: 4px; }
body.lp .lps-kpi-sub a { color: var(--lp-accent-text); text-decoration: underline; text-underline-offset: 3px; }
body.lp .lps-kpi-ico { position: absolute; top: 16px; right: 18px; width: 40px; height: 40px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
body.lp .lps-kpi-ico.is-primary { background: rgba(25,147,155,.1); color: var(--lpv-primary); }
body.lp .lps-kpi-ico.is-success { background: rgba(42,167,105,.12); color: var(--lpv-success); }
body.lp .lps-kpi-ico.is-info { background: rgba(42,127,168,.12); color: var(--lpv-info); }
body.lp .lps-kpi-ico.is-danger { background: rgba(240,101,72,.12); color: var(--lpv-danger); }
html[data-bs-theme="dark"] body.lp .lps-kpi-ico.is-primary { color: var(--lp-accent-text); background: var(--lp-accent-soft); }
body.lp .lps-kpi-top .lpv-trend { position: absolute; right: 18px; top: 62px; }
body.lp .lps-kpi-top { padding-right: 0; }

body.lp .lps-stack { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--lp-muted-bg); gap: 2px; }
body.lp .lps-stack span { display: block; min-width: 0; }
body.lp .lps-stack .is-success { background: var(--lpv-success); }
body.lp .lps-stack .is-warning { background: var(--lpv-warning); }
body.lp .lps-stack .is-muted { background: var(--lp-border-strong); }
body.lp .lps-legend { list-style: none; margin: 16px 0 0; padding: 0; }
body.lp .lps-legend li { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 13px; color: var(--lp-fg-2); border-bottom: 1px dashed var(--lp-border); }
body.lp .lps-legend li:last-child { border-bottom: 0; }
body.lp .lps-legend b { margin-left: auto; color: var(--lp-fg); font-weight: 600; }
body.lp .lps-legend em { font-style: normal; color: var(--lp-fg-muted); width: 3rem; text-align: right; font-size: 12px; }
body.lp .lps-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
body.lp .lps-mini-grid > div { padding: 10px 12px; border-radius: var(--lp-radius); background: var(--lp-surface-2); border: 1px solid var(--lp-border); }
body.lp .lps-mini-grid span { display: block; font-size: 11.5px; color: var(--lp-fg-muted); }
body.lp .lps-mini-grid b { font-size: 17px; font-weight: 600; color: var(--lp-fg); }

body.lp .lps-rank { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; font-size: 12px; font-weight: 600; background: var(--lp-muted-bg); color: var(--lp-fg-2); }
body.lp .lps-rank.is-top { background: rgba(246,140,17,.18); color: #b7790c; }
html[data-bs-theme="dark"] body.lp .lps-rank.is-top { color: #f7b84b; }
body.lp .lps-pill { display: inline-flex; min-width: 28px; justify-content: center; padding: 2px 8px; border-radius: 10px; font-size: 12.5px; font-weight: 600; background: var(--lp-muted-bg); color: var(--lp-fg-2); }
body.lp .lps-pill.is-success { background: rgba(42,167,105,.14); color: var(--lpv-success); }
body.lp .lps-hint { font-size: 12.5px; color: var(--lp-fg-muted); }
body.lp .lps-hint b { color: var(--lpv-success); font-weight: 600; }

body.lp .lps-hours { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 6px; align-items: end; height: 190px; }
body.lp .lps-hour { display: flex; flex-direction: column; align-items: center; height: 100%; gap: 6px; }
body.lp .lps-hour-q { font-size: 10.5px; color: var(--lp-fg-muted); height: 14px; white-space: nowrap; }
body.lp .lps-hour-bar { flex: 1; width: 100%; display: flex; align-items: flex-end; background: var(--lp-surface-2); border-radius: 4px; overflow: hidden; }
body.lp .lps-hour-bar span { display: block; width: 100%; background: var(--lpv-primary); opacity: .75; border-radius: 4px 4px 0 0; min-height: 2px; transition: opacity .15s; }
body.lp .lps-hour:hover .lps-hour-bar span { opacity: 1; }
body.lp .lps-hour.is-best .lps-hour-bar span { background: var(--lpv-success); opacity: 1; }
body.lp .lps-hour.is-best .lps-hour-q { color: var(--lpv-success); font-weight: 600; }
body.lp .lps-hour-h { font-size: 11px; color: var(--lp-fg-muted); }

body.lp .lps-status-legend li { padding: 7px 0; }
body.lp .lps-funnel { display: grid; gap: 14px; }
body.lp .lps-funnel-row { display: grid; grid-template-columns: 150px minmax(0,1fr) 110px; align-items: center; gap: 12px; }
body.lp .lps-funnel-name { font-size: 13px; color: var(--lp-fg-2); }
body.lp .lps-funnel-bar { height: 26px; background: var(--lp-surface-2); border-radius: 4px; overflow: hidden; }
body.lp .lps-funnel-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--lpv-primary), var(--lpv-info)); border-radius: 4px; }
body.lp .lps-funnel-row:nth-child(3) .lps-funnel-bar span { background: var(--lpv-success); }
body.lp .lps-funnel-row:nth-child(4) .lps-funnel-bar span { background: var(--lpv-success); opacity: .7; }
body.lp .lps-funnel-n { text-align: right; }
body.lp .lps-funnel-n b { color: var(--lp-fg); font-weight: 600; margin-right: 6px; }
body.lp .lps-funnel-n em { font-style: normal; font-size: 12px; color: var(--lp-fg-muted); }
body.lp .lps-file { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 575.98px) {
  body.lp .lps-seg { width: 100%; }
  body.lp .lps-seg-item { flex: 1; text-align: center; padding: 6px 4px; }
  body.lp .lps-kpi-n { font-size: 22px; margin-top: 10px; }
  body.lp .lps-kpi-ico { width: 32px; height: 32px; top: 14px; right: 14px; }
  body.lp .lps-kpi-top .lpv-trend { position: static; }
  body.lp .lps-kpi-top { padding-right: 36px; flex-wrap: wrap; gap: 2px 8px; }
  body.lp .lps-hours { gap: 3px; height: 160px; }
  body.lp .lps-hour-q { font-size: 9px; transform: rotate(-45deg); }
  body.lp .lps-funnel-row { grid-template-columns: 1fr auto; }
  body.lp .lps-funnel-bar { grid-column: 1 / -1; grid-row: 2; height: 18px; }
}

/* ---------------------------------------------------------------------
   13. Mobil: Tabellen werden zu Karten, Kennzahlen kompakt
   --------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  body.lp :is(#cc_table, .lp-mtable) thead { display: none; }
  body.lp :is(#cc_table, .lp-mtable),
  body.lp :is(#cc_table, .lp-mtable) tbody { display: block; width: 100% !important; }
  body.lp :is(#cc_table, .lp-mtable) tbody tr {
    display: block; margin: 0 0 10px; padding: 10px 14px;
    background: var(--lp-surface); border: 1px solid var(--lp-border) !important; border-radius: var(--lp-radius-lg);
  }
  body.lp .lp-mtable tbody tr { margin: 10px 12px; }
  body.lp :is(#cc_table, .lp-mtable) tbody td {
    display: flex !important; align-items: center; justify-content: space-between; gap: 12px;
    padding: 7px 0 !important; border: 0 !important; border-bottom: 1px dashed var(--lp-border) !important;
    text-align: right !important; width: auto !important; background: transparent !important; min-width: 0;
  }
  body.lp :is(#cc_table, .lp-mtable) tbody td:last-child { border-bottom: 0 !important; }
  body.lp :is(#cc_table, .lp-mtable) tbody td[data-label]::before {
    content: attr(data-label); flex: none; max-width: 45%; text-align: left;
    font-size: 12px; font-weight: 500; color: var(--lp-fg-muted);
  }
  body.lp :is(#cc_table, .lp-mtable) tbody td > * { min-width: 0; }
  body.lp :is(#cc_table, .lp-mtable) tbody td .d-flex.flex-column { align-items: flex-end; }
  body.lp :is(#cc_table, .lp-mtable) tbody td .progress { min-width: 80px; }
  /* erste Zelle als Kartenkopf ohne Beschriftung */
  body.lp .lp-mtable-first tbody td:first-child { justify-content: flex-start; text-align: left !important; }
  body.lp .lp-mtable-first tbody td:first-child::before { display: none; }
  body.lp .lp-mtable-first tbody td:first-child .d-flex.flex-column { align-items: flex-start; }
  /* Call Center: Auswahl + Kopf */
  body.lp #cc_table tbody td:first-child { justify-content: flex-start; padding-bottom: 2px !important; border-bottom: 0 !important; }
  body.lp #cc_table tbody td:first-child::before { display: none; }
  body.lp #cc_table tbody td[data-label="Firma / Kunde"] .d-flex.flex-column { align-items: flex-end; text-align: right; }
  body.lp #cc_table tbody td[data-label="Aktionen"] { justify-content: flex-end; flex-wrap: wrap; gap: 6px; padding-top: 10px !important; }
  body.lp #cc_table tbody td[data-label="Aktionen"]::before { display: none; }
  body.lp #cc_table tbody td .form-select { max-width: 60%; }
  body.lp #cc_table_wrapper .table-responsive, body.lp #cc_root .table-responsive { overflow: visible; }
  body.lp .lp-mtable + * { margin-top: 0; }
  /* Dashboard-Liste: vorhandenes Kartenlayout an Theme-Farben anpassen */
  body.lp #dt_forms tbody tr { background: var(--lp-surface) !important; border: 1px solid var(--lp-border) !important; box-shadow: none !important; border-radius: var(--lp-radius-lg) !important; }
  body.lp #dt_forms tbody tr.lp-row-gesperrt { border-color: rgba(240,101,72,.4) !important; }
  body.lp #dt_forms tbody td::before { color: var(--lp-fg-muted) !important; font-weight: 500 !important; }
  body.lp :is(#logs_table, #dt_trash, #dt_users) tbody tr { background: var(--lp-surface) !important; border-color: var(--lp-border) !important; box-shadow: none !important; }
  body.lp :is(#logs_table, #dt_trash, #dt_users) tbody td::before { color: var(--lp-fg-muted) !important; }
  /* Kopfbereiche */
  body.lp .lpv-welcome { padding: 18px 0 14px; }
  body.lp .lpv-card-header { flex-wrap: wrap; gap: 8px; padding-top: 12px; padding-bottom: 12px; }
  body.lp .lpv-leads-head .card-toolbar { width: 100%; justify-content: flex-start; }
  body.lp #globalSearch { width: 100% !important; }
  body.lp .lpv-leads-head .card-title { width: 100%; }
  body.lp .lpv-leads-head .card-title > .position-relative { flex: 1 1 100%; }
  body.lp #usedFilterGroup { overflow-x: auto; max-width: 100%; }
  body.lp #usedFilterGroup .btn { white-space: nowrap; }
}
@media (max-width: 575.98px) {
  body.lp .lpv-kpi .card-body { padding: 14px; }
  body.lp .lpv-kpi-icon { width: 34px; height: 34px; }
  body.lp .lpv-kpi-icon .lp-i { width: 17px; height: 17px; }
  body.lp .lpv-kpi-value { font-size: 1.35rem; }
  body.lp .lpv-kpi .mt-4 { margin-top: .75rem !important; }
  body.lp .lpv-kpi-label { font-size: .68rem; }
  body.lp .lpv-trend { font-size: .72rem; }
  body.lp .lpv-kpi-note, body.lp .lpv-kpi a { font-size: .75rem; }
  body.lp .lpv-welcome-actions { width: 100%; }
  body.lp .lpv-welcome-actions > .btn { flex: 1 1 auto; justify-content: center; }
  body.lp #leadFilterGroup { width: 100%; display: flex; }
  body.lp #leadFilterGroup .btn { flex: 1; justify-content: center; padding-left: 4px; padding-right: 4px; }
  body.lp .lp-set-search { width: 100%; }
  body.lp .modal-dialog { margin: 8px; }
  body.lp #modalFormGoruntule .surface { padding: 12px 14px; }
}
body.lp .lps-rank-m { display: none; }
@media (max-width: 767.98px) {
  body.lp .lps-agents tbody td.lps-td-rank { display: none !important; }
  body.lp .lps-agents tbody td.lps-td-agent { justify-content: flex-start; }
  body.lp .lps-agents tbody td.lps-td-agent::before { display: none; }
  body.lp .lps-rank-m { display: inline-flex; }
  body.lp .lps-cell { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; width: 60%; }
  body.lp .lps-cell > .d-flex { width: 100%; }
}
/* Formular-Beschriftungen gut lesbar (Metronic setzt sie im Dunkelmodus sehr blass) */
body.lp .col-form-label, body.lp .form-label { color: var(--lp-fg-2); font-weight: 500; }
body.lp .lp-set-body .col-form-label { font-size: 14px !important; }
body.lp .lp-set-body .card-body.p-9 { padding: 24px !important; }
@media (max-width: 767.98px) {
  body.lp :is(#cc_table, .lp-mtable).lps-agents tbody td.lps-td-rank { display: none !important; }
  body.lp :is(#cc_table, .lp-mtable).lps-agents tbody td.lps-td-agent { justify-content: flex-start; }
  body.lp :is(#cc_table, .lp-mtable).lps-agents tbody td.lps-td-agent::before { display: none; }
  body.lp .lp-set-body .card-body.p-9 { padding: 16px !important; }
  body.lp .lp-set-body .col-form-label { padding-bottom: 4px; }
}

/* ---------------------------------------------------------------------
   14. Markenfarben LeadPort (Petrol · Navy · Orange)
   --------------------------------------------------------------------- */
:root { --lp-brand-orange: #f68c11; --lp-brand-orange-2: #f7a70e; --lp-brand-navy: #0a4764; --lp-brand-teal: #19939b; }
body.lp .lp-nav-item.is-active::before { display: block !important; background: linear-gradient(180deg, var(--lp-brand-orange-2), var(--lp-brand-orange)); }
@media (max-width: 991.98px) { body.lp .lp-nav-item.is-active::before { display: none !important; } }
body.lp .lp-nav-item.is-active { background: rgba(255,255,255,0.10); }
body.lp .lp-sidebar { background: linear-gradient(180deg, #0b5170 0%, var(--lp-ink) 55%, #083a52 100%); }
html[data-bs-theme="dark"] body.lp .lp-sidebar { background: var(--lp-ink); border-color: var(--lp-border); }
body.lp .btn.btn-soft-success { background: rgba(246,140,17,.12); color: #c26a06; }
body.lp .btn.btn-soft-success:hover { background: rgba(246,140,17,.2) !important; color: #a95a04 !important; }
html[data-bs-theme="dark"] body.lp .btn.btn-soft-success { color: #f9a94a; }
body.lp .lpv-welcome-actions #leadFilterGroup .btn.active { background: var(--lp-brand-navy) !important; }
html[data-bs-theme="dark"] body.lp .lpv-welcome-actions #leadFilterGroup .btn.active { background: var(--lp-primary) !important; }
body.lp .lps-seg-item.is-active { background: var(--lp-brand-navy); }
html[data-bs-theme="dark"] body.lp .lps-seg-item.is-active { background: var(--lp-primary); }
body.lp .lp-set-link.is-active::before { background: var(--lp-brand-orange); }
body.lp .lps-hour.is-best .lps-hour-bar span { background: var(--lp-brand-orange); }
body.lp .lps-hour.is-best .lps-hour-q, body.lp .lps-hint b { color: #d97606; }
body.lp .lps-funnel-bar span { background: linear-gradient(90deg, var(--lp-brand-navy), var(--lp-brand-teal)); }
body.lp .lps-rank.is-top { background: rgba(246,140,17,.16); color: #c26a06; }
body.lp .lps-kpi-ico.is-warning { background: rgba(246,140,17,.12); color: var(--lpv-warning); }
body.lp .lps-kpi-ico.is-secondary { background: rgba(10,71,100,.1); color: var(--lpv-secondary); }
html[data-bs-theme="dark"] body.lp .lps-kpi-ico.is-secondary { background: rgba(79,159,196,.14); }
body.lp .badge.lpv-badge-warning { background: rgba(246,140,17,.12); color: #c26a06; }
body.lp .badge.lpv-badge-danger { background: rgba(240,101,72,.12); color: #d9502f; }
html[data-bs-theme="dark"] body.lp .badge.lpv-badge-warning { color: #f9a94a; }
html[data-bs-theme="dark"] body.lp .badge.lpv-badge-danger { color: #f8957f; }

/* =====================================================================
   Seitenleiste – hell und ruhig
   Weiße Fläche, Gruppen mit Chevron, aktiver Eintrag als getönte Pille
   mit orangem Akzentbalken am Rand. Hell- und Dunkelmodus über Tokens.
   ===================================================================== */
body.lp .lp-sidebar {
  --lp-ink: var(--lp-surface);
  --lp-ink-text: var(--lp-fg);
  --lp-ink-muted: var(--lp-fg-2);
  --lp-ink-subtle: var(--lp-fg-muted);
  --lp-ink-hover: var(--lp-muted-bg);
  --lp-ink-raise: var(--lp-accent-soft);
  --lp-ink-line: var(--lp-border);
  --lp-ink-accent: var(--lp-accent);
  font-family: "Inter", var(--lp-font);
  background: var(--lp-surface);
  border-right: 1px solid var(--lp-border);
  padding: 0 14px 14px;
}
body.lp .lp-sidebar * { font-family: inherit; }
html[data-lp-side="right"] body.lp .lp-sidebar { border-right: 0; border-left: 1px solid var(--lp-border); }

/* Kopf */
body.lp .lp-sb-head { height: 72px; padding: 0 2px; margin-bottom: 4px; }
body.lp .lp-brand-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--lp-accent-soft); color: var(--lp-accent-text); }
body.lp .lp-brand-name { font-size: 15px; font-weight: 600; color: var(--lp-fg); letter-spacing: -0.01em; }
body.lp .lp-brand-slogan { font-size: 12px; color: var(--lp-fg-muted); }
body.lp .lp-sb-toggle { color: var(--lp-fg-muted); }
body.lp .lp-sb-toggle:hover { background: var(--lp-muted-bg); color: var(--lp-fg); }

/* Gruppen */
body.lp .lp-sb-group { gap: 2px; margin-bottom: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--lp-border); }
body.lp .lp-sb-group:last-child { border-bottom: 0; }
body.lp .lp-sb-label {
  height: 32px; margin-top: 6px; padding: 0 12px; cursor: pointer; user-select: none;
  justify-content: space-between; font-size: 11px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--lp-fg-muted);
}
body.lp .lp-sb-label:hover { color: var(--lp-fg-2); }
body.lp .lp-sb-label::after {
  content: ""; width: 6px; height: 6px; margin-right: 3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-135deg) translate(-2px, -2px); transition: transform .18s ease;
}
body.lp .lp-sb-group.is-closed > .lp-sb-label::after { transform: rotate(45deg) translate(-2px, -2px); }
body.lp .lp-sb-group.is-closed > .lp-nav-item { display: none; }

/* Einträge */
body.lp .lp-nav-item {
  height: 42px; padding: 0 12px; gap: 12px; border-radius: 10px;
  font-size: 14px; font-weight: 500; line-height: 1.4; letter-spacing: 0;
  color: var(--lp-fg-2) !important;
}
body.lp .lp-nav-item .lp-i { width: 20px; height: 20px; stroke-width: 1.6; color: var(--lp-fg-muted); transition: color .12s ease; }
@media (hover: hover) {
  body.lp .lp-nav-item:hover { background: var(--lp-muted-bg); color: var(--lp-fg) !important; }
  body.lp .lp-nav-item:hover .lp-i { color: var(--lp-fg-2); }
}
body.lp .lp-nav-item.is-active { background: var(--lp-accent-soft); color: var(--lp-accent-text) !important; font-weight: 600; }
body.lp .lp-nav-item.is-active .lp-i { color: var(--lp-accent); }
body.lp .lp-nav-item.is-active::before {
  display: block; content: ""; position: absolute; left: -14px; right: auto; top: 9px; bottom: 9px;
  width: 4px; border-radius: 0 4px 4px 0; background: var(--lpv-warning);
}
html[data-lp-side="right"] body.lp .lp-nav-item.is-active::before { left: auto; right: -14px; border-radius: 4px 0 0 4px; }
body.lp .lp-nav-item:focus-visible { outline: 2px solid var(--lp-accent); outline-offset: -2px; }

/* Fuß */
body.lp .lp-sb-foot { border-top: 0; padding-top: 12px; }
body.lp .lp-user {
  height: 56px; padding: 0 10px 0 8px; border-radius: 12px;
  background: var(--lp-surface-2); border: 1px solid var(--lp-border);
}
body.lp .lp-user:hover, body.lp .lp-user[aria-expanded="true"] { background: var(--lp-muted-bg); }
body.lp .lp-avatar { width: 36px; height: 36px; box-shadow: none; }
body.lp .lp-user .lp-user-name { font-size: 14px; font-weight: 600; color: var(--lp-fg); }
body.lp .lp-user-role { font-size: 12px; color: var(--lp-fg-muted); }

/* Eingeklappt */
html[data-lp-collapsed="1"] body.lp .lp-sidebar { padding: 0 10px 14px; }
html[data-lp-collapsed="1"] body.lp .lp-sb-label::after { display: none; }
html[data-lp-collapsed="1"] body.lp .lp-sb-label { height: 1px; margin: 8px 10px 12px; padding: 0; background: var(--lp-border); }
html[data-lp-collapsed="1"] body.lp .lp-sb-group.is-closed > .lp-nav-item { display: flex; }
html[data-lp-collapsed="1"] body.lp .lp-nav-item { padding: 0; justify-content: center; }
html[data-lp-collapsed="1"] body.lp .lp-user { padding: 0; justify-content: center; border: 0; background: transparent; }
html[data-lp-collapsed="1"] body.lp .lp-nav-item.is-active::before { left: -10px; }

/* Seitenleiste: schwarze Schrift und Icons (Hellmodus) */
html:not([data-bs-theme="dark"]) body.lp .lp-nav-item,
html:not([data-bs-theme="dark"]) body.lp .lp-nav-item:hover,
html:not([data-bs-theme="dark"]) body.lp .lp-nav-item.is-active { color: #111 !important; }
html:not([data-bs-theme="dark"]) body.lp .lp-nav-item .lp-i,
html:not([data-bs-theme="dark"]) body.lp .lp-nav-item:hover .lp-i,
html:not([data-bs-theme="dark"]) body.lp .lp-nav-item.is-active .lp-i { color: #111; }
html:not([data-bs-theme="dark"]) body.lp .lp-sb-label { color: #444; }
html:not([data-bs-theme="dark"]) body.lp .lp-brand-name,
html:not([data-bs-theme="dark"]) body.lp .lp-user .lp-user-name { color: #111; }
html:not([data-bs-theme="dark"]) body.lp .lp-brand-slogan,
html:not([data-bs-theme="dark"]) body.lp .lp-user-role,
html:not([data-bs-theme="dark"]) body.lp .lp-sb-toggle { color: #444; }

/* Seitenleiste: kompaktere Maße */
body.lp .lp-sidebar { --lp-sb-w: 232px; padding: 0 12px 12px; }
body.lp .lp-sb-head { height: 60px; }
body.lp .lp-brand-mark { width: 32px; height: 32px; border-radius: 9px; }
body.lp .lp-brand-name { font-size: 14px; }
body.lp .lp-brand-slogan { font-size: 11px; }
body.lp .lp-sb-label { height: 28px; font-size: 10.5px; }
body.lp .lp-nav-item { height: 36px; gap: 10px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
body.lp .lp-nav-item .lp-i { width: 18px; height: 18px; }
body.lp .lp-nav-item.is-active::before { top: 8px; bottom: 8px; left: -12px; }
body.lp .lp-user { height: 48px; }
body.lp .lp-avatar { width: 32px; height: 32px; }
body.lp .lp-user .lp-user-name { font-size: 13px; }
body.lp .lp-user-role { font-size: 11px; }

/* Seitenleiste eingeklappt: nur Icons, mittig, ruhig (steht bewusst ganz unten) */
html[data-lp-collapsed="1"] body.lp .lp-sidebar { padding: 0 12px 12px; align-items: stretch; }
html[data-lp-collapsed="1"] body.lp .lp-sb-head { justify-content: center; padding: 0; height: 64px; }
html[data-lp-collapsed="1"] body.lp .lp-brand { flex: 0 0 auto; justify-content: center; gap: 0; }
html[data-lp-collapsed="1"] body.lp .lp-brand-mark { width: 36px; height: 36px; }
html[data-lp-collapsed="1"] body.lp .lp-sb-group { gap: 4px; margin-bottom: 8px; padding-bottom: 8px; align-items: stretch; }
html[data-lp-collapsed="1"] body.lp .lp-sb-label { height: 1px; margin: 4px 8px 8px; padding: 0; background: var(--lp-border); overflow: hidden; font-size: 0; }
html[data-lp-collapsed="1"] body.lp .lp-sb-group { border-bottom: 0; }
html[data-lp-collapsed="1"] body.lp .lp-nav-item { width: 100%; height: 40px; padding: 0; gap: 0; justify-content: center; border-radius: 10px; }
html[data-lp-collapsed="1"] body.lp .lp-nav-item > span { display: none; }
html[data-lp-collapsed="1"] body.lp .lp-nav-item .lp-i { width: 20px; height: 20px; }
html[data-lp-collapsed="1"] body.lp .lp-nav-item.is-active::before { left: -12px; top: 10px; bottom: 10px; }
html[data-lp-collapsed="1"] body.lp .lp-sb-foot { padding-top: 8px; }
html[data-lp-collapsed="1"] body.lp .lp-user { width: 100%; height: 44px; padding: 0; justify-content: center; background: transparent; border: 0; }
html[data-lp-collapsed="1"] body.lp .lp-user .lp-user-text,
html[data-lp-collapsed="1"] body.lp .lp-user > .lp-i { display: none; }
html[data-lp-collapsed="1"] body.lp .lp-avatar { width: 34px; height: 34px; }
html[data-lp-collapsed="1"] body.lp .lp-nav-item .lp-i { width: 17px; height: 17px; stroke-width: 1.6; }
html[data-lp-collapsed="1"] body.lp .lp-nav-item { height: 36px; }
html[data-lp-collapsed="1"] body.lp .lp-brand-mark { width: 32px; height: 32px; }
html[data-lp-collapsed="1"] body.lp .lp-avatar { width: 30px; height: 30px; }

/* Boards: Übersicht als Kacheln */
body.lp .bd-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
body.lp .bd-liste-eintrag {
  position: relative; display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 16px 18px;
  border: 1px solid var(--lp-border); border-radius: 14px; background: var(--lp-surface);
  color: var(--lp-fg); text-decoration: none; box-shadow: var(--lp-shadow-xs);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
@media (hover: hover) {
  body.lp .bd-liste-eintrag:hover { border-color: var(--lp-accent); box-shadow: 0 6px 18px -8px rgba(23,134,142,.35); transform: translateY(-1px); }
}
body.lp .bd-liste-ico {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 12px; background: var(--lp-accent-soft); color: var(--lp-accent);
}
body.lp .bd-liste-ico .lp-i { width: 22px; height: 22px; }
body.lp .bd-liste-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
body.lp .bd-liste-text b { font-size: .9375rem; font-weight: 600; color: var(--lp-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.lp .bd-liste-text small { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .8125rem; color: var(--lp-fg-muted); }
body.lp .bd-liste-sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
body.lp .bd-liste-tag {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; padding: 3px 9px; border-radius: 999px;
  font-size: .75rem; font-weight: 600; background: var(--lp-info-soft); color: var(--lp-info-text);
}
body.lp .bd-kopf-aktionen .btn { display: inline-flex; align-items: center; gap: 8px; }
body.lp .bd-kopf-aktionen .btn i { font-size: 1rem; margin: 0 !important; }

/* =====================================================================
   Anmeldung – hell, ruhig, mit Icons und Passwort-Auge
   ===================================================================== */
body.lp.lp-auth {
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(25,147,155,.14), transparent 60%),
    radial-gradient(800px 480px at 100% 110%, rgba(246,140,17,.10), transparent 60%),
    var(--lp-bg) !important;
}
body.lp.lp-auth .auth-page-bg { background-image: none !important; }
body.lp.lp-auth .lg-card {
  width: 100%; max-width: 440px; margin: 0 auto; padding: 40px 36px 34px;
  background: var(--lp-surface); border: 1px solid var(--lp-border); border-radius: 20px;
  box-shadow: 0 1px 2px rgba(14,26,48,.04), 0 24px 60px -24px rgba(14,26,48,.22);
}
@media (max-width: 575.98px) { body.lp.lp-auth .lg-card { padding: 28px 20px 24px; border-radius: 16px; } }
body.lp.lp-auth .lg-head { text-align: center; margin-bottom: 28px; }
body.lp.lp-auth .lg-head h1 { margin: 0 0 6px; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; color: var(--lp-fg); }
body.lp.lp-auth .lg-head p { margin: 0; font-size: .9375rem; color: var(--lp-fg-muted); }

body.lp.lp-auth .lg-field { margin-bottom: 18px; }
body.lp.lp-auth .lg-label { display: block; margin-bottom: 8px; font-size: .875rem; font-weight: 600; color: var(--lp-fg); }
body.lp.lp-auth .lg-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
body.lp.lp-auth .lg-label-row .lg-label { margin: 0; }
body.lp.lp-auth .lg-link { font-size: .8125rem; font-weight: 600; color: var(--lp-accent-text); text-decoration: none; }
body.lp.lp-auth .lg-link:hover { text-decoration: underline; }

body.lp.lp-auth .lg-input {
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px;
  background: var(--lp-surface-2); border: 1px solid var(--lp-border-strong); border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
body.lp.lp-auth .lg-input:focus-within { background: var(--lp-surface); border-color: var(--lp-accent); box-shadow: 0 0 0 4px var(--lp-ring); }
body.lp.lp-auth .lg-input.is-invalid { border-color: var(--lp-danger); }
body.lp.lp-auth .lg-input input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent !important;
  font-size: .9375rem; color: var(--lp-fg); box-shadow: none !important; padding: 0;
}
body.lp.lp-auth .lg-input input::placeholder { color: var(--lp-fg-subtle); }
body.lp.lp-auth .lg-ico, body.lp.lp-auth .lg-eye svg {
  width: 19px; height: 19px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
body.lp.lp-auth .lg-ico { color: var(--lp-fg-muted); }
body.lp.lp-auth .lg-eye {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-right: -8px;
  border: 0; border-radius: 8px; background: transparent; color: var(--lp-fg-muted); cursor: pointer;
}
body.lp.lp-auth .lg-eye:hover { background: var(--lp-muted-bg); color: var(--lp-fg); }
body.lp.lp-auth .lg-eye .lg-eye-off { display: none; }
body.lp.lp-auth .lg-eye.is-on .lg-eye-on { display: none; }
body.lp.lp-auth .lg-eye.is-on .lg-eye-off { display: block; }
body.lp.lp-auth .lg-error { margin-top: 6px; font-size: .8125rem; color: var(--lp-danger-text); }

body.lp.lp-auth .lg-remember { display: flex; align-items: center; margin: 4px 0 22px; }
body.lp.lp-auth .lg-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .875rem; color: var(--lp-fg-2); user-select: none; }
body.lp.lp-auth .lg-check input { position: absolute; opacity: 0; width: 0; height: 0; }
body.lp.lp-auth .lg-box {
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--lp-border-strong); background: var(--lp-surface);
  display: inline-flex; align-items: center; justify-content: center; transition: background-color .12s ease, border-color .12s ease;
}
body.lp.lp-auth .lg-check input:checked + .lg-box { background: var(--lp-accent); border-color: var(--lp-accent); }
body.lp.lp-auth .lg-check input:checked + .lg-box::after {
  content: ""; width: 5px; height: 10px; margin-top: -2px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
body.lp.lp-auth .lg-check input:focus-visible + .lg-box { box-shadow: 0 0 0 3px var(--lp-ring); }

body.lp.lp-auth .lg-submit {
  width: 100%; height: 48px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--lp-primary); color: #fff; font-size: .9375rem; font-weight: 600;
  transition: background-color .15s ease, transform .1s ease, box-shadow .15s ease;
  box-shadow: 0 8px 20px -10px rgba(23,134,142,.7);
}
body.lp.lp-auth .lg-submit:hover { background: var(--lp-primary-hover); }
body.lp.lp-auth .lg-submit:active { transform: scale(.985); }
body.lp.lp-auth .lg-submit:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--lp-ring); }
body.lp.lp-auth .lg-submit[data-kt-indicator="on"] { opacity: .8; }

/* Anmeldung: ohne Kartenrahmen – Formular steht frei auf der Fläche */
body.lp.lp-auth .lg-card {
  max-width: 400px; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none;
}
body.lp.lp-auth .lg-input { background: var(--lp-surface); }
body.lp.lp-auth .lg-head h1 { font-size: 1.75rem; }
body.lp.lp-auth .lg-head { margin-bottom: 32px; }
@media (max-width: 575.98px) { body.lp.lp-auth .lg-card { padding: 0 4px; } }

/* Anmeldung: älteres .login-wrapper-Styling (Karte/Schatten) endgültig aufheben */
body.lp.lp-auth .lg-card.login-wrapper {
  background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  width: 100% !important; max-width: 400px !important; padding: 0 !important;
}
body.lp.lp-auth .lg-input input:-webkit-autofill,
body.lp.lp-auth .lg-input input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 40px var(--lp-surface) inset !important; -webkit-text-fill-color: var(--lp-fg) !important; caret-color: var(--lp-fg);
}

/* Anmeldung: weiße Karte zurück – weiche Kanten, dezenter Schatten, innen Luft */
body.lp.lp-auth .lg-card.login-wrapper {
  background: var(--lp-surface) !important; border: 1px solid var(--lp-border) !important; border-radius: 20px !important;
  box-shadow: 0 1px 2px rgba(14,26,48,.04), 0 16px 40px -20px rgba(14,26,48,.16) !important;
  max-width: 440px !important; padding: 40px 36px 34px !important;
}
body.lp.lp-auth .lg-input { background: var(--lp-surface-2); }
body.lp.lp-auth .lg-input input:-webkit-autofill,
body.lp.lp-auth .lg-input input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 40px var(--lp-surface-2) inset !important; }
@media (max-width: 575.98px) { body.lp.lp-auth .lg-card.login-wrapper { padding: 28px 20px 24px !important; border-radius: 16px !important; } }

/* Rote Zähler im Menü (offene Unterschriften, Leads zu prüfen) */
body.lp .lp-nav-item > .lp-nav-zahl {
  flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: #e5363d; color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center;
}
html[data-lp-collapsed="1"] body.lp .lp-nav-item > .lp-nav-zahl {
  display: block; position: absolute; top: 2px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; line-height: 16px;
}

/* Benutzer-Menü oben rechts in der Kopfzeile */
body.lp .lp-topbar .lp-user-top {
  width: auto; height: 44px; margin-left: 6px; padding: 0 10px 0 6px; gap: 10px;
  border: 0; border-radius: 10px; background: transparent; color: var(--lp-fg-muted);
}
body.lp .lp-topbar .lp-user-top:hover,
body.lp .lp-topbar .lp-user-top[aria-expanded="true"] { background: var(--lp-muted-bg); }
body.lp .lp-topbar .lp-user-top .lp-avatar { width: 34px; height: 34px; }
body.lp .lp-topbar .lp-user-top .lp-user-text { flex: 0 1 auto; max-width: 180px; }
body.lp .lp-topbar .lp-user-top .lp-user-name { font-size: 13px; color: var(--lp-fg); }
body.lp .lp-topbar .lp-user-top .lp-user-role { font-size: 11px; color: var(--lp-fg-muted); }
body.lp .lp-topbar #lp_user_menu { width: 264px; }
@media (max-width: 575.98px) { body.lp .lp-topbar .lp-user-top { padding: 0 4px; margin-left: 2px; } }

/* ---------------------------------------------------------------------
   Globale Suche in der Kopfzeile (widgets/lp_suche.html, js/custom/lp-suche.js)
   Feld in der Leiste, darunter mittig die Liste (links) mit Vorschau (rechts).
   --------------------------------------------------------------------- */
body.lp .lp-suche { position: relative; margin-left: auto; flex: 0 1 420px; min-width: 0; }
body.lp .lp-suche-knopf { display: none; }
body.lp .lp-suche-feld {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 11px;
  border: 1px solid var(--lp-border); border-radius: var(--lp-radius-sm);
  background: var(--lp-surface); color: var(--lp-fg-subtle); box-shadow: var(--lp-shadow-xs);
  transition: border-color .12s ease, box-shadow .12s ease;
}
body.lp .lp-suche.ist-offen .lp-suche-feld,
body.lp .lp-suche-feld:focus-within { border-color: var(--lp-accent); box-shadow: 0 0 0 3px var(--lp-ring); }
body.lp .lp-suche-lupe { color: var(--lp-fg-subtle); }
body.lp .lp-suche-input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent;
  color: var(--lp-fg); font: 400 0.8125rem/1 var(--lp-font);
}
body.lp .lp-suche-input::placeholder { color: var(--lp-fg-subtle); }
body.lp .lp-suche-input::-webkit-search-cancel-button,
body.lp .lp-suche-input::-webkit-search-decoration { display: none; -webkit-appearance: none; }
body.lp .lp-suche-x {
  display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; padding: 0;
  border: 0; border-radius: 99px; background: transparent; color: var(--lp-fg-subtle);
}
body.lp .lp-suche-x:hover { background: var(--lp-hover); color: var(--lp-fg); }
body.lp .lp-suche-taste { flex-shrink: 0; }
body.lp .lp-suche-feld:focus-within .lp-suche-taste { display: none; }
body.lp .lp-suche-laeuft {
  width: 14px; height: 14px; flex-shrink: 0; border-radius: 99px;
  border: 2px solid var(--lp-border-strong); border-top-color: var(--lp-accent);
  animation: lp-suche-dreht .6s linear infinite;
}
@keyframes lp-suche-dreht { to { transform: rotate(360deg); } }

/* Die Liste hängt mittig unter dem Feld; wird der Platz nach rechts knapp, richtet sie sich am Feldende aus. */
body.lp .lp-suche-panel {
  position: absolute; z-index: 1075; top: calc(100% + 6px);
  left: 50%; transform: translateX(-50%); width: min(880px, calc(100vw - 32px));
  background: var(--lp-surface); border-radius: var(--lp-radius-lg); box-shadow: var(--lp-shadow-pop);
  overflow: hidden; animation: lp-suche-auf .14s var(--lp-ease-out);
}
@keyframes lp-suche-auf {
  from { opacity: 0; transform: translateX(-50%) translateY(-5px) scale(.985); }
  to { opacity: 1; transform: translateX(-50%); }
}
@media (max-width: 1399.98px) {
  body.lp .lp-suche-panel { left: auto; right: 0; transform: none; animation-name: lp-pop-in; }
}
body.lp .lp-suche-panel[hidden] { display: none; }
body.lp .lp-suche-zwei { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
body.lp .lp-suche-zwei.ohne-vorschau { grid-template-columns: minmax(0, 1fr); }
body.lp .lp-suche-zwei.ohne-vorschau .lp-suche-vorschau { display: none; }
body.lp .lp-suche-liste { max-height: min(460px, 62vh); overflow-y: auto; padding: 6px; scroll-padding: 34px 0 6px; }
body.lp .lp-suche-kopf {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px;
  padding: 9px 10px 5px; background: var(--lp-surface);
}
body.lp .lp-suche-kopf-titel {
  display: flex; align-items: center; gap: 7px; min-width: 0;
  font-size: 0.6875rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--lp-fg-muted);
}
body.lp .lp-suche-kopf-titel .lp-i { color: var(--lp-fg-subtle); }
body.lp .lp-suche-anzahl {
  padding: 1px 6px; border-radius: 99px; background: var(--lp-muted-bg); color: var(--lp-fg-muted);
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0; font-variant-numeric: tabular-nums;
}
body.lp .lp-suche-mehr { margin-left: auto; flex-shrink: 0; font-size: 0.6875rem; font-weight: 500; color: var(--lp-accent-text) !important; text-decoration: none; }
body.lp .lp-suche-mehr:hover { text-decoration: underline; }

body.lp .lp-suche-zeile {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--lp-radius);
  color: var(--lp-fg-2) !important; text-decoration: none; cursor: pointer;
}
body.lp .lp-suche-zeile.is-aktiv { background: var(--lp-muted-bg); }
/* Farbe je Bereich – nur so viel, dass die Augen die Gruppen beim Scrollen wiederfinden.
   Verwandte Bereiche teilen sich eine Farbe: Telefon-Dinge grün, alles aus den Boards bernstein. */
body.lp .lp-suche-kopf, body.lp .lp-suche-zeile-i, body.lp .lp-suche-vorschau { --lp-b: var(--lp-accent); }
body.lp [data-b="leads"]        { --lp-b: #2a7fa8; }
body.lp [data-b="anrufliste"],
body.lp [data-b="telefonbuch"],
body.lp [data-b="anrufe"]       { --lp-b: #2aa769; }
body.lp [data-b="mars"]         { --lp-b: #7a5cd6; }
body.lp [data-b="mars_karten"]  { --lp-b: #19939b; }
body.lp [data-b="boards"],
body.lp [data-b="board_updates"]{ --lp-b: #c2740a; }
body.lp [data-b="notizen"]      { --lp-b: #6c7a89; }
body.lp [data-b="mails"]        { --lp-b: #b5536b; }
body.lp [data-b="benutzer"]     { --lp-b: #5b6b8c; }
html[data-bs-theme="dark"] body.lp [data-b="leads"]        { --lp-b: #5aa8cd; }
html[data-bs-theme="dark"] body.lp [data-b="anrufliste"],
html[data-bs-theme="dark"] body.lp [data-b="telefonbuch"],
html[data-bs-theme="dark"] body.lp [data-b="anrufe"]       { --lp-b: #4cc48a; }
html[data-bs-theme="dark"] body.lp [data-b="mars"]         { --lp-b: #a48ae8; }
html[data-bs-theme="dark"] body.lp [data-b="mars_karten"]  { --lp-b: #2bb3bc; }
html[data-bs-theme="dark"] body.lp [data-b="boards"],
html[data-bs-theme="dark"] body.lp [data-b="board_updates"]{ --lp-b: #e09a3f; }
html[data-bs-theme="dark"] body.lp [data-b="notizen"]      { --lp-b: #93a2b3; }
html[data-bs-theme="dark"] body.lp [data-b="mails"]        { --lp-b: #d98098; }
html[data-bs-theme="dark"] body.lp [data-b="benutzer"]     { --lp-b: #8f9fc0; }

body.lp .lp-suche-kopf .lp-suche-kopf-titel { color: var(--lp-b); }
body.lp .lp-suche-kopf .lp-suche-kopf-titel .lp-i { color: var(--lp-b); opacity: .9; }
body.lp .lp-suche-kopf .lp-suche-anzahl {
  background: color-mix(in srgb, var(--lp-b) 13%, transparent); color: var(--lp-b);
}
body.lp .lp-suche-zeile-i {
  display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex-shrink: 0;
  border-radius: 7px; background: color-mix(in srgb, var(--lp-b) 13%, transparent); color: var(--lp-b);
}
body.lp .lp-suche-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
body.lp .lp-suche-titel { display: flex; align-items: baseline; gap: 7px; min-width: 0; font-size: 0.8125rem; font-weight: 600; color: var(--lp-fg); }
/* Eigener Textträger: sonst würden die hervorgehobenen Wörter als Flex-Kinder auseinandergezogen */
body.lp .lp-suche-titel-t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.lp .lp-suche-marke { flex-shrink: 0; padding: 0 5px; border-radius: 3px; background: var(--lp-muted-bg); color: var(--lp-fg-muted); font-size: 0.6875rem; font-weight: 500; }
body.lp .lp-suche-unter { font-size: 0.75rem; color: var(--lp-fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.lp .lp-suche-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 0.6875rem; color: var(--lp-fg-subtle); }
body.lp .lp-suche-meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
/* Neben der Vorschau genügt in der Liste die Kurzform – die Einzelheiten stehen rechts. */
body.lp .lp-suche-zwei:not(.ohne-vorschau) .lp-suche-meta { display: none; }
body.lp .lp-suche-zeile mark { padding: 0; border-radius: 2px; background: var(--lp-warning-soft); color: inherit; font-weight: 700; }

/* Vorschau rechts */
body.lp .lp-suche-vorschau { padding: 16px 16px 18px; background: var(--lp-surface-2); border-left: 1px solid var(--lp-border); overflow-y: auto; max-height: min(460px, 62vh); }
body.lp .lp-v-titel { font-size: 0.9375rem; font-weight: 700; letter-spacing: -.01em; color: var(--lp-fg); overflow-wrap: anywhere; }
body.lp .lp-v-art { margin-top: 2px; font-size: 0.75rem; color: var(--lp-b); opacity: .95; }
body.lp .lp-v-felder { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; }
body.lp .lp-v-reihe { display: flex; gap: 10px; font-size: 0.75rem; }
body.lp .lp-v-reihe .l { flex: 0 0 76px; color: var(--lp-fg-subtle); }
body.lp .lp-v-reihe .w { min-width: 0; color: var(--lp-fg-2); overflow-wrap: anywhere; }
body.lp .lp-v-tat { display: flex; gap: 6px; margin-top: 18px; }
body.lp .lp-v-tat .haupt {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 31px;
  border: 0; border-radius: var(--lp-radius-sm); background: var(--lp-primary); color: #fff !important;
  font-size: 0.75rem; font-weight: 600; text-decoration: none;
}
body.lp .lp-v-tat .haupt:hover { background: var(--lp-primary-hover); }
body.lp .lp-v-tat .neben {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 31px;
  border: 1px solid var(--lp-border); border-radius: var(--lp-radius-sm); background: var(--lp-surface);
  color: var(--lp-fg-2) !important; text-decoration: none; cursor: pointer;
}
body.lp .lp-v-tat .neben:hover { border-color: var(--lp-border-strong); color: var(--lp-fg) !important; }
body.lp .lp-v-quelle { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--lp-border); color: var(--lp-fg-subtle); font-size: 0.6875rem; }
body.lp .lp-v-quelle b { display: block; margin-top: 3px; color: var(--lp-fg-2); font-weight: 600; }

body.lp .lp-suche-hinweis, body.lp .lp-suche-leer { padding: 22px 16px; text-align: center; color: var(--lp-fg-subtle); font-size: 0.8125rem; line-height: 1.5; }
body.lp .lp-suche-leer b { color: var(--lp-fg); }
body.lp .lp-suche-leer span { font-size: 0.75rem; }
body.lp .lp-suche-fuss {
  display: flex; align-items: center; gap: 14px; height: 34px; padding: 0 12px;
  border-top: 1px solid var(--lp-border); background: var(--lp-surface-2);
  color: var(--lp-fg-subtle); font-size: 0.6875rem;
}
body.lp .lp-suche-fuss .lp-kbd { margin-right: 3px; height: 17px; min-width: 17px; font-size: 0.625rem; }
body.lp .lp-suche-zahl { margin-left: auto; font-variant-numeric: tabular-nums; }

@media (max-width: 991.98px) { body.lp .lp-suche { flex-basis: 260px; } }
@media (max-width: 899.98px) {
  /* Zu schmal für zwei Spalten: nur die Liste, dafür mit allen Angaben in der Zeile */
  body.lp .lp-suche-zwei { grid-template-columns: minmax(0, 1fr); }
  body.lp .lp-suche-vorschau { display: none; }
  body.lp .lp-suche-zwei:not(.ohne-vorschau) .lp-suche-meta { display: flex; }
}
@media (max-width: 767.98px) {
  body.lp .lp-suche { flex: 0 0 auto; }
  body.lp .lp-suche-knopf { display: inline-flex; }
  body.lp .lp-suche-feld { display: none; }
  body.lp .lp-suche.ist-offen { position: static; }
  body.lp .lp-suche.ist-offen .lp-suche-knopf { display: none; }
  body.lp .lp-suche.ist-offen .lp-suche-feld { display: flex; position: absolute; left: 8px; right: 8px; top: 10px; z-index: 1076; }
  body.lp .lp-suche-panel { left: 8px; right: 8px; width: auto; top: 52px; transform: none; }
  body.lp .lp-suche-fuss { display: none; }
}
