/* Wieland PMS – App-Styles. Türkis #00635E / #1FBDB0 wie Marketing-Site. */
:root{ --wpms-teal:#00635E; --wpms-teal2:#00635E; --wpms-bg:#f3f6fb; --wpms-card:#fff; --wpms-line:rgba(0,0,0,.1); --wpms-text:#1b1f24; --wpms-muted:#797c7f; --wpms-hover:#f0f4f8; --wpms-input:#fff; --wpms-bubble:#f0f4f8; }
/* Dunkelmodus – überschreibt die Flächen-/Text-Variablen. Türkis bleibt als Akzent. */
body.wpms-theme-dark{ --wpms-teal:#2ec9bb; --wpms-teal2:#00635E; --wpms-bg:#14171c; --wpms-card:#1e232a; --wpms-line:rgba(255,255,255,.14); --wpms-text:#e7eaec; --wpms-muted:#a7aeb6; --wpms-hover:#272d35; --wpms-input:#262c33; --wpms-bubble:#2a313a; }
body.wpms-theme-dark .wpms-brand{ color:var(--wpms-teal); }

#wpms-app{ font-family:"DM Sans",system-ui,sans-serif; color:var(--wpms-text); max-width:none; margin:0; }
#wpms-app *{ box-sizing:border-box; }

/* Vollbild-Modus: Theme-Header/Footer/Seitentitel ausblenden, Content-Wrapper entfesseln */
body.wpms-app-page .wp-block-template-part,
body.wpms-app-page header.wp-block-template-part,
body.wpms-app-page footer.wp-block-template-part,
body.wpms-app-page .wp-block-post-title,
body.wpms-app-page .wp-block-query-title,
body.wpms-app-page #masthead,
body.wpms-app-page .site-header,
body.wpms-app-page .site-footer,
body.wpms-app-page .entry-header,
body.wpms-app-page .entry-title{ display:none !important; }
/* Breiten-Begrenzung des Block-Themes komplett aufheben → App nutzt die volle Seite */
body.wpms-app-page .wp-site-blocks,
body.wpms-app-page main:not(.wpms-main),
body.wpms-app-page .wp-block-post-content,
body.wpms-app-page .entry-content,
body.wpms-app-page .is-layout-constrained{ margin:0 !important; padding:0 !important; max-width:none !important; min-width:0 !important; }
body.wpms-app-page .is-layout-constrained > *{ max-width:none !important; }
/* Nie waagerecht scrollen: alles bleibt in der Bildschirmbreite. */
html:has(body.wpms-app-page){ background:var(--wpms-bg); overflow-x:hidden; }
body.wpms-app-page{ background:var(--wpms-bg); margin:0 !important; min-height:100vh; min-height:100dvh; overflow-x:hidden; max-width:100vw; }
/* overflow-x:clip statt hidden: hidden macht #wpms-app zum Scroll-Container und
   bricht damit das position:sticky des Headers (er scrollte „ein Stück" mit weg). */
body.wpms-app-page #wpms-app{ background:var(--wpms-bg); min-height:100vh; min-height:100dvh; max-width:100vw; width:100%; overflow-x:hidden; overflow-x:clip; display:flex; flex-direction:column; }
body.wpms-app-page .wpms-body{ background:var(--wpms-bg); }
body.wpms-app-page .wpms-top{ max-width:100%; }
body.wpms-app-page .wpms-main{ max-width:100%; overflow-x:clip; }
.wpms-loading,.wpms-empty,.wpms-soon{ color:var(--wpms-muted); font-size:15px; }

.wpms-top{ display:flex; justify-content:space-between; align-items:center; gap:12px; padding:14px 24px; background:var(--wpms-card); color:var(--wpms-text); border-bottom:1px solid var(--wpms-line); box-shadow:0 1px 4px rgba(0,0,0,.04); position:sticky; top:0; z-index:30; }
/* Desktop: Avatar rechts bündig mit dem Inhaltsbereich (.wpms-main padding-right:38px). */
@media (min-width:761px){ .wpms-top{ padding-right:38px; } }
body.admin-bar .wpms-top{ top:32px; }
@media (max-width:782px){ body.admin-bar .wpms-top{ top:46px; } }
.wpms-top-l{ display:flex; align-items:center; gap:14px; }
.wpms-logo{ height:34px; width:auto; display:block; }
.wpms-brand{ font-weight:700; letter-spacing:.3px; color:var(--wpms-teal); }
.wpms-user{ font-size:13px; color:var(--wpms-muted); }
.wpms-user a{ color:var(--wpms-teal); text-decoration:underline; }
.wpms-burger{ background:none; border:0; cursor:pointer; padding:6px; color:var(--wpms-text); display:flex; border-radius:8px; }
.wpms-burger:hover{ background:var(--wpms-hover); }
.wpms-ic{ width:22px; height:22px; flex:0 0 auto; }
.wpms-greet{ font-size:16px; font-weight:600; color:var(--wpms-text); white-space:nowrap; }
.wpms-top-r{ display:flex; align-items:center; gap:10px; }
.wpms-iconbtn{ background:none; border:0; cursor:pointer; padding:7px; color:var(--wpms-text); display:flex; border-radius:50%; }
.wpms-iconbtn:hover{ background:var(--wpms-hover); }
.wpms-avatar{ width:57px; height:57px; border-radius:50%; border:0; overflow:hidden; cursor:pointer; padding:0; background:var(--wpms-teal2); display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
.wpms-avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
.wpms-avatar-ini{ color:#fff; font-weight:700; font-size:16px; }
.wpms-avatar-lg{ width:84px; height:84px; border-width:3px; }
.wpms-avatar-lg .wpms-avatar-ini{ font-size:34px; }
.wpms-profil-av{ display:flex; align-items:center; gap:16px; margin-bottom:18px; }
.wpms-profil-avact{ display:flex; flex-direction:column; gap:6px; align-items:flex-start; }

/* ---- Layout: Seitenleiste + Inhalt ---- */
.wpms-body{ display:flex; align-items:stretch; flex:1; position:relative; }
.wpms-side{ flex:0 0 232px; width:232px; background:var(--wpms-card); border-right:1px solid var(--wpms-line); padding:10px 12px; transition:flex-basis .2s ease, width .2s ease; display:flex; flex-direction:column; }
.wpms-side-logo{ display:flex; align-items:center; justify-content:flex-start; padding:4px 10px 10px; margin-bottom:6px; border-bottom:1px solid var(--wpms-line); }
.wpms-side-logo img{ height:34px; width:auto; max-width:100%; }
.wpms-nav{ display:flex; flex-direction:column; gap:2px; flex:1; }
.wpms-side-foot{ margin-top:auto; padding-top:8px; border-top:1px solid var(--wpms-line); }
.wpms-themeitem{ color:var(--wpms-muted); }
.wpms-themeitem:hover{ background:var(--wpms-hover); color:var(--wpms-text); }
.wpms-logout{ color:#c0392b; text-decoration:none; }
.wpms-logout:hover{ background:rgba(192,57,43,.1); }
.wpms-logo-mini{ display:none; height:36px; width:auto; }
span.wpms-logo-mini{ font-size:30px; font-weight:800; line-height:1; color:var(--wpms-teal); height:auto; }
#wpms-app.wpms-collapsed .wpms-side-logo{ justify-content:center; padding:6px 0 16px; }
#wpms-app.wpms-collapsed .wpms-logo-full{ display:none; }
#wpms-app.wpms-collapsed .wpms-logo-mini{ display:block; }
.wpms-navitem{ display:flex; align-items:center; gap:10px; width:100%; padding:7px 12px; border:0; background:none; border-radius:10px; font:inherit; font-size:13px; color:var(--wpms-text); cursor:pointer; text-align:left; white-space:nowrap; }
/* Menü-Icons kleiner (nur im Seitenmenü, damit man nicht scrollen muss). */
.wpms-navitem .wpms-ic{ width:18px; height:18px; }
.wpms-navitem:hover{ background:var(--wpms-hover); }
.wpms-navitem.is-active{ background:rgba(31,189,176,.15); color:var(--wpms-teal); font-weight:600; }
.wpms-navitem.is-soon{ color:#aeb4bb; cursor:default; }
.wpms-navitem.is-soon:hover{ background:none; }
.wpms-nav-label em{ font-style:normal; font-size:11px; background:#eef0f3; color:#9097a0; padding:1px 6px; border-radius:8px; margin-left:6px; }
/* Menü-Gruppe „Auswertung" (aufklappbar) */
.wpms-navgroup{ display:flex; flex-direction:column; gap:4px; }
.wpms-navgroup-arr{ width:16px; height:16px; flex:0 0 auto; margin-left:auto; color:var(--wpms-muted); transition:transform .2s ease; }
.wpms-navgroup.is-open .wpms-navgroup-arr{ transform:rotate(90deg); }
/* Roter Menü-Badge (zu klärende Stunden, neue Mitteilungen/Chat/Krankmeldungen). */
.wpms-navitem{ position:relative; }
.wpms-nav-badge{ flex:0 0 auto; margin-left:auto; min-width:18px; height:18px; line-height:18px; padding:0 5px; border-radius:999px; background:#c0392b; color:#fff; font-size:11px; font-weight:700; text-align:center; box-sizing:border-box; }
/* In der Gruppenzeile „Auswertung" sitzt der Pfeil rechts – Badge direkt hinter dem Label. */
.wpms-navgroup-h .wpms-nav-badge{ margin-left:2px; }
/* Eingeklappte Sidebar: Badge als kleiner Punkt oben rechts am Icon (nur in der Sidebar). */
#wpms-app.wpms-collapsed .wpms-side .wpms-nav-badge{ position:absolute; top:4px; right:8px; min-width:8px; width:8px; height:8px; padding:0; font-size:0; line-height:0; margin:0; }
.wpms-nav-neu{ flex:0 0 auto; margin-left:auto; height:18px; line-height:18px; padding:0 7px; border-radius:999px; background:#00A9A2; color:#fff; font-size:10.5px; font-weight:700; letter-spacing:.02em; text-transform:uppercase; }
.wpms-nav-badge:not([hidden]) + .wpms-nav-neu{ margin-left:4px; }
.wpms-nav-neudot{ flex:0 0 auto; width:8px; height:8px; border-radius:50%; background:#00A9A2; margin-left:6px; }
.wpms-navgroup.is-open > .wpms-navgroup-h .wpms-nav-neudot{ display:none; }
#wpms-app.wpms-collapsed .wpms-side .wpms-nav-neu{ position:absolute; top:4px; left:8px; width:8px; height:8px; padding:0; font-size:0; line-height:0; margin:0; }
.wpms-navgroup-sub{ display:none; flex-direction:column; gap:4px; }
.wpms-navgroup.is-open .wpms-navgroup-sub{ display:flex; }
.wpms-navgroup-sub .wpms-navitem{ padding-left:30px; }
#wpms-app.wpms-collapsed .wpms-navgroup-arr{ display:none; }
#wpms-app.wpms-collapsed .wpms-navgroup-sub .wpms-navitem{ padding-left:0; }

.wpms-main{ flex:1; min-width:0; padding:30px 38px 14px; display:flex; flex-direction:column; }
.wpms-view{ max-width:none; flex:1 0 auto; }
/* Widescreen: Inhalt nicht über die ganze Breite dehnen – Maxbreite + zentriert (Desktop).
   Die mehrspaltigen Grids (Dashboard, Listen) füllen diesen Rahmen aus. */
@media (min-width:761px){ .wpms-view, .wpms-foot{ width:100%; max-width:1880px; margin-inline:auto; } }

/* Eingeklappt (Desktop) */
#wpms-app.wpms-collapsed .wpms-side{ flex-basis:62px; width:62px; }
#wpms-app.wpms-collapsed .wpms-nav-label{ display:none; }
#wpms-app.wpms-collapsed .wpms-navitem{ justify-content:center; padding:10px 0; }

/* Overlay (nur Mobil sichtbar) */
.wpms-overlay{ display:none; }

/* Desktop: App füllt den Viewport, nur der Hauptinhalt scrollt –
   Header + Sidebar bleiben fix stehen (scrollen nicht mit weg).
   WICHTIG: .wpms-main als BLOCK (nicht flex) – flex-Container + overflow-y verhindert in WebkKit
   (installierte PWA/Safari) zuverlässiges Scrollen. Block + overflow-y:auto scrollt überall. */
@media (min-width:761px){
  body.wpms-app-page #wpms-app{ height:100dvh; min-height:0; overflow:hidden; }
  body.wpms-app-page .wpms-body{ flex:1; min-height:0; overflow:hidden; }
  body.wpms-app-page .wpms-main{ overflow-y:auto; -webkit-overflow-scrolling:touch; display:block; }
  /* Innerer Flex-Wrapper (KEIN overflow → kein WebKit-Scroll-Bug) füllt die Höhe → Footer klebt unten. */
  .wpms-main-inner{ display:flex; flex-direction:column; min-height:100%; }
  .wpms-side{ overflow-y:auto; }
}

@media (max-width:760px){
  .wpms-side{ position:fixed; top:0; bottom:0; left:0; height:auto; width:250px; flex-basis:auto; z-index:50; transform:translateX(-100%); transition:transform .25s ease; box-shadow:2px 0 16px rgba(0,0,0,.18); padding-top:max(14px, env(safe-area-inset-top)); overflow-y:auto; background:var(--wpms-card); }
  #wpms-app.wpms-nav-open .wpms-side{ transform:translateX(0); }
  #wpms-app.wpms-collapsed .wpms-side{ flex-basis:auto; width:250px; }
  #wpms-app.wpms-collapsed .wpms-nav-label{ display:inline; }
  #wpms-app.wpms-collapsed .wpms-navitem{ justify-content:flex-start; padding:10px 12px; }
  #wpms-app.wpms-collapsed .wpms-side-logo{ justify-content:flex-start; padding:6px 10px 16px; }
  #wpms-app.wpms-collapsed .wpms-logo-full{ display:block; }
  #wpms-app.wpms-collapsed .wpms-logo-mini{ display:none; }
  #wpms-app.wpms-nav-open .wpms-overlay{ display:block; position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:40; }
  .wpms-main{ padding:20px 18px 12px; }
  .wpms-user{ font-size:12px; }
  /* Mobil: innerer Wrapper füllt die volle .wpms-main-Höhe (Flex-Spalte, wächst mit,
     schrumpft nie) → „Software by ibx" klebt am unteren Bildschirmrand statt direkt
     unter der Liste. .wpms-view{flex:1 0 auto} + .wpms-foot{margin-top:auto} schieben. */
  .wpms-main-inner{ display:flex; flex-direction:column; flex:1 0 auto; }
}
.wpms-bar{ display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:14px; }
.wpms-bar h1,.wpms-detail h1{ font-size:22px; margin:0; }
/* „Hinzufügen"-Button in der Seiten-Kopfzeile (z. B. + Neuer Mitarbeiter) etwas kompakter. */
/* „+ Neue …"-Buttons im Header: neutral/outline wie „+ Hinzufügen" (Urlaub), nicht grün gefüllt. */
.wpms-bar > .wpms-btn{ padding:8px 16px; font-size:14px; border-radius:10px; background:transparent; color:var(--wpms-muted); border:1px solid var(--wpms-line); font-weight:600; }
/* „+ Neue Leistung" kompakt wie „+ Neuer Mitarbeiter" (.wpms-exp-Maße). */
#wpms-new{ padding:5px 13px; font-size:13px; min-height:0; border-radius:8px; }
.wpms-bar > .wpms-btn:hover{ border-color:var(--wpms-teal2); color:var(--wpms-text); }
/* Alle Seiten-Überschriften einheitlich groß wie auf „Dokumente" (22px). */
#wpms-app h1{ font-size:22px; }
.wpms-bar-act{ display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
/* CSV-Import */
.wpms-imp-opts{ display:flex; flex-direction:column; gap:8px; }
.wpms-imp-mapgrid{ display:grid; grid-template-columns:repeat(2,1fr); gap:10px 16px; margin-bottom:12px; }
.wpms-imp-map{ display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--wpms-muted); }
.wpms-imp-map select{ font-family:inherit; font-size:14px; padding:8px 10px; border-radius:8px; border:1px solid var(--wpms-line); background:var(--wpms-input); color:var(--wpms-text); }
@media (max-width:600px){ .wpms-imp-mapgrid{ grid-template-columns:1fr; } }
.wpms-imp-info{ background:var(--wpms-hover); border:1px solid var(--wpms-line); border-radius:12px; padding:12px 14px; }
.wpms-imp-info p{ margin:0 0 4px; }
.wpms-imp-sample{ margin:6px 0 0; padding-left:18px; color:var(--wpms-muted); font-size:13px; }
.wpms-imp-prog{ margin-top:8px; }
.wpms-imp-bar{ height:8px; background:var(--wpms-line); border-radius:999px; overflow:hidden; }
.wpms-imp-bar span{ display:block; height:100%; width:0; background:var(--wpms-teal2); transition:width .2s ease; }
.wpms-imp-msg{ margin:8px 0 0; font-size:14px; }
.wpms-wx{ text-align:right; display:flex; flex-direction:column; gap:1px; line-height:1.25; flex:0 0 auto; }
.wpms-wx-now{ font-size:16px; font-weight:600; color:var(--wpms-text); white-space:nowrap; }
.wpms-wx-date{ font-size:13px; color:var(--wpms-muted); white-space:nowrap; }

.wpms-btn{ background:var(--wpms-teal2); color:#fff; border:0; border-radius:999px; padding:10px 18px; font-size:15px; font-weight:600; cursor:pointer; text-decoration:none; display:inline-block; }
.wpms-btn:hover{ background:var(--wpms-teal2); filter:brightness(1.15); }
/* Formular-„Speichern": dunkle, eckigere Schaltfläche statt Teal-Pille (User-Wunsch 16.7.). */
.wpms-form button[type=submit].wpms-btn{ background:var(--wpms-input); color:var(--wpms-text); border:1px solid var(--wpms-line); border-radius:10px; }
.wpms-form button[type=submit].wpms-btn:hover{ background:var(--wpms-hover); border-color:var(--wpms-teal2); filter:none; }
.wpms-btn-sec{ background:transparent; color:var(--wpms-teal); border:1.5px solid var(--wpms-teal); }
.wpms-btn-sec:hover{ background:var(--wpms-teal2); color:#fff; }
.wpms-btn-danger{ background:transparent; color:#c0392b; border:1.5px solid #c0392b; }
.wpms-btn-danger:hover{ background:#c0392b; color:#fff; filter:none; }
.wpms-edit-projekt{ margin:14px 0 4px; }

/* Mitarbeiter-Auswahl: Chips + Suchfeld mit Autocomplete */
.wpms-mspick-chips{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
.wpms-mspick-none{ font-size:14px; }
.wpms-chip{ display:inline-flex; align-items:center; gap:7px; background:var(--wpms-teal2); color:#fff; border-radius:999px; padding:5px 6px 5px 13px; font-size:14px; font-weight:600; }
.wpms-chip-x{ background:rgba(255,255,255,.25); border:0; color:#fff; width:20px; height:20px; border-radius:50%; cursor:pointer; font-size:15px; line-height:1; display:flex; align-items:center; justify-content:center; padding:0; }
.wpms-chip-x:hover{ background:rgba(255,255,255,.45); }
.wpms-mspick-field{ position:relative; }
.wpms-mspick .wpms-mspick-field input{ font-size:15px; height:46px; box-sizing:border-box; }
.wpms-mspick .wpms-mspick-none{ font-size:14px; color:var(--wpms-muted); }
.wpms-mspick-drop{ display:none; position:absolute; left:0; right:0; top:calc(100% + 4px); z-index:25; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:12px; box-shadow:0 8px 24px rgba(0,0,0,.16); max-height:260px; overflow-y:auto; }
.wpms-mspick-drop.is-open{ display:block; }
.wpms-mspick-opt{ display:block; width:100%; text-align:left; background:none; border:0; border-bottom:1px solid var(--wpms-line); padding:11px 14px; font-size:15px; color:var(--wpms-text); cursor:pointer; }
.wpms-mspick-opt:last-child{ border-bottom:0; }
.wpms-mspick-opt:hover{ background:var(--wpms-hover); }
.wpms-mspick-opt small{ color:var(--wpms-muted); font-size:13px; }
.wpms-ss .wpms-mspick-field input{ padding-right:38px; }
.wpms-ss-clear{ position:absolute; right:8px; top:50%; transform:translateY(-50%); width:24px; height:24px; border:0; border-radius:50%; background:var(--wpms-hover); color:var(--wpms-muted); font-size:16px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; }
.wpms-ss-clear:hover{ color:var(--wpms-text); }
.wpms-btn:disabled{ opacity:.5; cursor:default; }

.wpms-list{ display:grid; gap:10px; }
.wpms-list.wpms-cards{ grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); align-items:stretch; }
.wpms-list.wpms-cards > .wpms-empty{ grid-column:1 / -1; }
.wpms-month-sep{ grid-column:1 / -1; display:flex; align-items:center; gap:12px; margin:8px 2px 0; color:var(--wpms-muted); font-size:13px; font-weight:700; }
.wpms-month-sep:first-child{ margin-top:0; }
.wpms-month-sep::after{ content:""; flex:1; height:1px; background:var(--wpms-line); }
.wpms-card{ position:relative; text-align:left; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:14px; padding:14px 16px; cursor:pointer; display:grid; gap:4px; font:inherit; color:var(--wpms-text); }
.wpms-card-badges{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.wpms-card > .wpms-card-badges{ justify-content:flex-end; }
/* Leistungs-Pille (kleine, halbtransparent blaue Kennzeichnung der Leistung) */
.wpms-lst{ display:inline-block; padding:2px 9px; border-radius:999px; font-size:11px; font-weight:700; line-height:1.5; white-space:nowrap; }
/* Leistungs-Pille – neutral (Rahmen + gedämpfter Text), Leistungsfarbe nur als
   8px-Punkt davor (Prinzip „Farbe als Akzent", wie Wochenansicht). App-weit. */
[class*="wpms-lst-c"]{ background:transparent; color:var(--wpms-muted); border:1px solid var(--wpms-line); font-weight:600; display:inline-flex; align-items:center; gap:5px; }
[class*="wpms-lst-c"]::before{ content:""; flex:0 0 auto; width:8px; height:8px; border-radius:50%; background:hsl(var(--lh) 58% 48%); }
body.wpms-theme-dark [class*="wpms-lst-c"]::before{ background:hsl(var(--lh) 55% 62%); }
.wpms-erow-t{ display:flex; align-items:center; gap:8px; min-width:0; }
.wpms-erow-t strong{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-erow-t .wpms-lst{ flex:0 0 auto; }
.wpms-card:hover{ border-color:var(--wpms-teal2); }
/* Linker Farbstreifen je Leistungs-Kategorie (wie die Urlaubs-Anträge) */
/* Einsatz-Karte – linker Farbstreifen aus dem --lh der c0…c13-Klasse.
   Dark hellerer Ton (55% 62%) wie Woche/Kalender/Pillen-Punkt → app-weit konsistent. */
[class*="wpms-card-l-c"]{ border-left:3px solid hsl(var(--lh) 58% 48%); }
body.wpms-theme-dark [class*="wpms-card-l-c"]{ border-left-color:hsl(var(--lh) 55% 62%); }
/* Einblend-Animation der Einsatz-Liste beim Öffnen (Klasse wpms-anim wird per JS gesetzt) */
.wpms-list.wpms-anim .wpms-card,.wpms-elist.wpms-anim .wpms-erow{ animation:wpms-card-in .5s cubic-bezier(.22,.61,.36,1) both; }
.wpms-list.wpms-anim .wpms-card:nth-child(1),.wpms-elist.wpms-anim .wpms-erow:nth-child(1){ animation-delay:.03s; }
.wpms-list.wpms-anim .wpms-card:nth-child(2),.wpms-elist.wpms-anim .wpms-erow:nth-child(2){ animation-delay:.07s; }
.wpms-list.wpms-anim .wpms-card:nth-child(3),.wpms-elist.wpms-anim .wpms-erow:nth-child(3){ animation-delay:.11s; }
.wpms-list.wpms-anim .wpms-card:nth-child(4),.wpms-elist.wpms-anim .wpms-erow:nth-child(4){ animation-delay:.15s; }
.wpms-list.wpms-anim .wpms-card:nth-child(5),.wpms-elist.wpms-anim .wpms-erow:nth-child(5){ animation-delay:.19s; }
.wpms-list.wpms-anim .wpms-card:nth-child(6),.wpms-elist.wpms-anim .wpms-erow:nth-child(6){ animation-delay:.23s; }
.wpms-list.wpms-anim .wpms-card:nth-child(7),.wpms-elist.wpms-anim .wpms-erow:nth-child(7){ animation-delay:.27s; }
.wpms-list.wpms-anim .wpms-card:nth-child(8),.wpms-elist.wpms-anim .wpms-erow:nth-child(8){ animation-delay:.31s; }
.wpms-list.wpms-anim .wpms-card:nth-child(n+9),.wpms-elist.wpms-anim .wpms-erow:nth-child(n+9){ animation-delay:.35s; }
@media (prefers-reduced-motion:reduce){ .wpms-list.wpms-anim .wpms-card,.wpms-elist.wpms-anim .wpms-erow{ animation:none; } }
.wpms-card strong{ font-size:16px; }
.wpms-meta{ display:block; margin-top:2px; color:var(--wpms-muted); font-size:13px; }
/* Kompakter Hinweis über den Erstellen-Formularen (Vertrag/Arbeitsschutz/Objektumsetzung). */
.wpms-vform-hint{ font-size:10.5px; line-height:1.35; max-width:640px; }
/* Wochenplan-Tabelle im Objektumsetzungs-Formular. */
.wpms-oplan{ grid-column:1 / -1; }
.wpms-oplan-h{ display:block; font-size:12px; color:var(--wpms-muted); margin-bottom:6px; }
.wpms-oplan-tbl{ width:100%; border-collapse:collapse; }
.wpms-oplan-tbl th, .wpms-oplan-tbl td{ padding:3px 4px; text-align:left; font-size:12px; }
.wpms-oplan-tbl th{ color:var(--wpms-muted); font-weight:600; }
.wpms-oplan-tbl td:first-child{ white-space:nowrap; }
.wpms-oplan-tbl input[type=time]{ width:100%; box-sizing:border-box; padding:5px 6px; font:inherit; font-size:12px; background:var(--wpms-input); color:var(--wpms-text); border:1px solid var(--wpms-line); border-radius:6px; }
/* Adresse + Beschreibung auf der Einsatz-Kachel (Beschreibung max. 2 Zeilen). */
.wpms-card-adr{ display:flex; align-items:center; gap:6px; }
.wpms-card-adr::before{ content:""; flex:0 0 auto; width:14px; height:14px; background-repeat:no-repeat; background-position:center; background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23797c7f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/><circle cx='12' cy='10' r='3'/></svg>"); }
.wpms-card-desc{ display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; white-space:normal; }
.wpms-card-ma{ display:flex; align-items:center; gap:6px; color:var(--wpms-muted); font-weight:600; }
.wpms-card-ma::before{ content:""; flex:0 0 auto; width:14px; height:14px; background-repeat:no-repeat; background-position:center; background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23797c7f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/><circle cx='9' cy='7' r='4'/><path d='M23 21v-2a4 4 0 0 0-3-3.87'/><path d='M16 3.13a4 4 0 0 1 0 7.75'/></svg>"); }

/* Listenansicht der Einsätze (kompakte Zeilen statt Kacheln) */
.wpms-elist{ display:flex; flex-direction:column; gap:1px; background:var(--wpms-line); border:1px solid var(--wpms-line); border-radius:14px; overflow:hidden; }
.wpms-elist .wpms-empty{ padding:16px 18px; background:var(--wpms-card); }
/* Leere Liste: kein Kasten/Hintergrund/Rand hinter „Noch keine Einsätze". */
.wpms-elist:has(> .wpms-empty:only-child){ background:none; border:0; border-radius:0; overflow:visible; }
.wpms-elist:has(> .wpms-empty:only-child) .wpms-empty{ background:none; padding:16px 2px; }
.wpms-erow{ position:relative; display:grid; grid-template-columns:140px 1fr 190px 320px; align-items:center; gap:14px; padding:13px 18px; background:var(--wpms-card); border:0; font:inherit; color:var(--wpms-text); text-align:left; cursor:pointer; width:100%; }
/* Pillen nebeneinander (eine Zeile), aber über alle Listenzeilen spaltenbündig:
   feste Leistungs-Spalte → alle Status-/Berechnet-Pillen starten an derselben X-Position. */
.wpms-erow-end{ display:grid; grid-template-columns:200px auto; gap:8px; align-items:center; justify-items:start; }
.wpms-erow:hover{ background:var(--wpms-hover); }
.wpms-erow.is-klaerung{ box-shadow:inset 3px 0 0 #c0392b; }
.wpms-erow-date{ display:flex; flex-direction:column; font-size:14px; font-weight:600; }
.wpms-erow-date small{ color:var(--wpms-muted); font-size:12px; font-weight:400; }
.wpms-erow-main{ display:flex; flex-direction:column; min-width:0; }
.wpms-erow-main strong{ font-size:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-erow-main span{ color:var(--wpms-muted); font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-erow-ma{ color:var(--wpms-muted); font-weight:600; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-erow-ma.is-empty{ color:var(--wpms-muted); font-weight:400; }
@media (max-width:720px){
	.wpms-erow{ grid-template-columns:1fr auto; gap:4px 12px; }
	.wpms-erow-date{ grid-column:1; }
	/* Kunde + Mitarbeiter über die volle Breite (beide Spalten) → einzeilig statt
	   von der Status-Spalte gequetscht. */
	.wpms-erow-main{ grid-column:1 / -1; }
	.wpms-erow-ma{ grid-column:1 / -1; }
	.wpms-erow-end{ grid-column:2; grid-row:1; align-self:start; display:flex; flex-direction:row; flex-wrap:wrap; align-items:flex-start; justify-content:flex-end; gap:6px; }
	/* Schrift eine Nummer größer für bessere Lesbarkeit auf dem Handy. */
	.wpms-erow-date{ font-size:16px; }
	.wpms-erow-date small{ font-size:14px; }
	.wpms-erow-main strong{ font-size:17px; }
	.wpms-erow-main span{ font-size:15px; }
	.wpms-erow-ma{ font-size:15px; }
	.wpms-erow-end .wpms-status{ font-size:14px; }
	.wpms-erow-end .wpms-lst{ font-size:13px; }
}

.wpms-status{ justify-self:start; text-align:center; font-size:12px; font-weight:600; padding:2px 10px; border-radius:999px; background:#eee; color:#444; }
.wpms-st-offen{ background:#e7f0ff; color:#1c5bd6; }
.wpms-st-geplant{ background:#d8f3ee; color:#0f7a6e; }
.wpms-st-in_arbeit{ background:#fff1d6; color:#b8740a; }
.wpms-st-abgeschlossen{ background:#e2f7e9; color:#00635E; }
.wpms-st-abgerechnet{ background:#e9e9ef; color:var(--wpms-muted); }
body.wpms-theme-dark .wpms-status{ background:rgba(255,255,255,.1); color:#cfd3d8; }
body.wpms-theme-dark .wpms-st-offen{ background:rgba(60,130,246,.22); color:#7ab0ff; }
body.wpms-theme-dark .wpms-st-geplant{ background:rgba(46,201,187,.22); color:#5fd3c4; }
body.wpms-theme-dark .wpms-st-in_arbeit{ background:rgba(245,196,81,.20); color:#f5c451; }
body.wpms-theme-dark .wpms-st-abgeschlossen{ background:rgba(0,99,94,.28); color:#5fc98a; }
body.wpms-theme-dark .wpms-st-abgerechnet{ background:rgba(255,255,255,.1); color:var(--wpms-muted); }

.wpms-dl{ display:grid; grid-template-columns:140px 1fr; gap:9px 14px; margin:16px 0; font-size:15px; }
.wpms-dl dt{ color:var(--wpms-muted); } .wpms-dl dd{ margin:0; }
.wpms-team{ padding-left:18px; } .wpms-team li{ margin:3px 0; }

/* Projekt-Detail: Kopf zweispaltig – links Projektdaten, rechts Kunden-Infobox */
/* Projekt-Detail: Kopfzeile + zweispaltiges Layout (Hauptinhalt links, Sidebar rechts) */
.wpms-detail-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; margin:6px 0 22px; }
.wpms-detail-title{ display:flex; flex-direction:column; align-items:flex-start; gap:10px; }
.wpms-detail-title h1{ margin:0; }
.wpms-detail-act{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
/* Aktions-Icons (Bearbeiten/Kalender/Löschen): dezent eckig statt kreisrund. */
.wpms-detail-act .wpms-btn-icon{ border-radius:10px; }
/* Bearbeiten/Kalender neutral statt Teal-Outline – „maximal ruhig".
   Nur hier gescopt, CSV/PDF-Buttons (.wpms-btn-sec) app-weit bleiben unberührt. */
.wpms-detail-act .wpms-btn-sec.wpms-btn-icon{ color:var(--wpms-muted); border-color:var(--wpms-line); }
.wpms-detail-act .wpms-btn-sec.wpms-btn-icon:hover{ color:var(--wpms-text); border-color:var(--wpms-teal2); }
.wpms-detail-grid{ display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:18px; align-items:start; }
.wpms-detail-main{ min-width:0; display:flex; flex-direction:column; gap:18px; }
/* Desktop: Fläche nutzen – Kunde + Einsatzdaten nebeneinander (gleich hoch),
   die übrigen Karten (Stunden/Abschluss/Bericht/Arbeitsschein) volle Breite. */
@media (min-width:1100px){
	.wpms-detail-grid{ grid-template-columns:minmax(0,1fr) 360px; }
	.wpms-detail-main{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); align-items:stretch; }
	.wpms-detail-main > *{ grid-column:1 / -1; min-width:0; }
	.wpms-detail-main > .wpms-sidecard, .wpms-detail-main > .wpms-sec-daten{ grid-column:auto; }
}
/* Einsatzdaten-Karte: ruhiger Kapitälchen-Titel statt Teal-Balken (wie STANDORT/Drawer).
   (Doppelte Klasse für Spezifität – die .wpms-sec-Basisregeln stehen später im Stylesheet.) */
.wpms-sec.wpms-sec-daten{ padding:0; overflow:hidden; }
.wpms-sec.wpms-sec-daten h2{ margin:0; padding:16px 22px 0; font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--wpms-muted); background:transparent; }
.wpms-sec.wpms-sec-daten .wpms-dl{ padding:10px 22px 20px; }
/* Detail-Seite: auch die übrigen Section-Titel (Stunden/Abschluss/Bericht/Rechnung …)
   als ruhige Kapitälchen – EINE Titel-Sprache über die ganze Seite. */
.wpms-detail-main > .wpms-sec > h2{ font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--wpms-muted); }
/* Desktop: Aktions-Schaltflächen in den Detail-Karten alle gleich breit. */
@media (min-width:900px){
	.wpms-detail-main .wpms-sec .wpms-btn{ display:block; width:320px; max-width:100%; box-sizing:border-box; text-align:center; }
}
.wpms-detail-side{ display:flex; flex-direction:column; gap:18px; position:sticky; top:18px; }
.wpms-ma-head{ display:flex; align-items:center; gap:12px; }
.wpms-ma-av{ width:66px; height:66px; font-size:26px; }
/* Avatar als „Foto ändern"-Schaltfläche: Kamera-Overlay (Hover am Desktop, dauerhaft auf Touch). */
.wpms-ma-av-btn{ position:relative; cursor:pointer; }
.wpms-ma-av-cam{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.45); color:#fff; opacity:0; transition:opacity .15s ease; }
.wpms-ma-av-btn:hover .wpms-ma-av-cam{ opacity:1; }
@media (hover:none){ .wpms-ma-av-cam{ opacity:1; background:rgba(0,0,0,.32); } }
.wpms-sidecard{ background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:14px; overflow:hidden; }
.wpms-sidecard h3{ margin:0; padding:16px 16px 0; font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--wpms-muted); background:transparent; }
.wpms-sidecard-b{ padding:10px 16px 16px; display:flex; flex-direction:column; gap:12px; }
.wpms-kundename{ margin:0; font-size:17px; font-weight:700; color:var(--wpms-text); }
.wpms-kr{ display:flex; flex-direction:column; gap:1px; font-size:14px; }
.wpms-kr span{ font-size:12px; color:var(--wpms-muted); }
.wpms-kr strong{ font-weight:600; color:var(--wpms-text); }
.wpms-kr a{ color:var(--wpms-teal2); text-decoration:none; font-weight:600; word-break:break-word; }
.wpms-mapbox{ display:flex; flex-direction:column; }
/* Statische OSM-Tile-Karte (kein iframe). pointer-events:none → rein visuell, fängt NIE
   das Mausrad ab (Scroll geht immer durch); Route öffnet der „Route planen"-Button. */
.wpms-map{ position:relative; height:175px; background:var(--wpms-hover); overflow:hidden; pointer-events:none; }
.wpms-smap{ }
.wpms-smap-inner{ position:absolute; left:50%; top:50%; width:0; height:0; }
.wpms-smap-inner img{ position:absolute; width:256px; height:256px; max-width:none; border:0; display:block; }
.wpms-smap-pin{ position:absolute; left:0; top:0; width:14px; height:14px; border-radius:50%; background:#2ec94a; border:3px solid #fff; box-shadow:0 1px 5px rgba(0,0,0,.55); transform:translate(-50%,-50%); }
.wpms-smap-attr{ position:absolute; bottom:0; right:0; background:rgba(255,255,255,.72); color:#333; font-size:9px; line-height:1.4; padding:1px 5px; text-decoration:none; border-top-left-radius:4px; }
.wpms-smap-attr:hover{ text-decoration:underline; }
.wpms-map-link{ display:block; text-align:center; padding:12px; font-weight:700; color:#fff; background:var(--wpms-teal2); text-decoration:none; }
.wpms-map-link:hover{ filter:brightness(1.15); }
/* Karten-Kachel: dezenter Header, größere Karte, „Route planen" vollflächig grün + zentriert. */
.wpms-mapcard h3{ background:transparent; color:var(--wpms-muted); font-weight:700; font-size:12px; letter-spacing:.08em; text-transform:uppercase; padding:10px 14px 2px; }
.wpms-mapcard .wpms-mapbox{ padding:0 14px 14px; }
.wpms-mapcard .wpms-map{ margin-top:12px; height:260px; border-radius:10px; overflow:hidden; border:1px solid var(--wpms-line); }
.wpms-mapcard .wpms-map-link{ display:block; align-self:stretch; text-align:center; margin-top:12px; padding:9px; border-radius:10px; font-size:14px; font-weight:600; background:var(--wpms-input); color:var(--wpms-text); border:1px solid var(--wpms-line); }
.wpms-mapcard .wpms-map-link:hover{ background:var(--wpms-hover); filter:none; }
/* Dokumente (Mitarbeiter) */
.wpms-doklist{ display:flex; flex-direction:column; gap:2px; margin-top:14px; }
.wpms-dok{ display:flex; flex-direction:column; gap:8px; background:var(--wpms-hover); border:1px solid var(--wpms-line); border-radius:10px; padding:10px 12px; }
/* „Neu"-Markierung: Badge am Dokument + Punkt am Ordner, der Neues enthält (grün wie der Push-Banner). */
.wpms-dok-neu{ display:inline-block; flex:0 0 auto; margin-left:8px; font-size:10px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color:#fff; background:#00857a; border-radius:6px; padding:1px 7px; }
.wpms-dok-neudot{ display:inline-block; width:8px; height:8px; border-radius:50%; background:#00857a; vertical-align:middle; }
/* Standard-Dokumentzeile in den Kategorie/Monat-Ordnern: minimalistisch, ohne schwere Box. */
.wpms-dok:not(.wpms-dok-needsign){ background:transparent; border:0; border-radius:0; padding:6px 2px; gap:2px; }
.wpms-dok:not(.wpms-dok-needsign) + .wpms-dok:not(.wpms-dok-needsign){ border-top:1px solid var(--wpms-line); }
.wpms-dok-head{ display:flex; align-items:center; gap:8px; }
.wpms-dok-foot{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.wpms-dok-spacer{ flex:1; }
.wpms-dok-needsign{ border-color:#e7a028; background:rgba(231,160,40,.10); }
.wpms-dok-l{ display:flex; align-items:center; gap:10px; flex:1; min-width:0; color:var(--wpms-text); text-decoration:none; font-weight:600; font-size:13px; background:none; border:0; padding:0; cursor:pointer; text-align:left; font-family:inherit; }
.wpms-dok-l span:first-of-type{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-dok-l .wpms-meta{ margin:0; flex:0 0 auto; font-weight:400; }

/* Dokument-Viewer (Vollbild-Overlay mit Zurück) */
.wpms-docview{ position:fixed; inset:0; z-index:9999; display:flex; flex-direction:column; background:var(--wpms-bg); }
.wpms-docview-bar{ display:flex; align-items:center; gap:12px; padding:12px 16px; border-bottom:1px solid var(--wpms-line); background:var(--wpms-card); }
.wpms-docview-back{ flex:0 0 auto; background:none; border:0; color:var(--wpms-teal); font:inherit; font-weight:700; font-size:16px; cursor:pointer; padding:6px 4px; }
.wpms-docview-title{ flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; }
.wpms-docview-name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; color:var(--wpms-text); }
.wpms-docview-file{ font-size:11px; color:var(--wpms-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-docview-ext{ flex:0 0 auto; color:var(--wpms-teal); text-decoration:none; font-size:14px; }
.wpms-docview-act{ flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; background:none; border:1px solid var(--wpms-teal); color:var(--wpms-teal); border-radius:8px; padding:7px 8px; cursor:pointer; text-decoration:none; }
.wpms-docview-act .wpms-ic{ width:18px; height:18px; display:block; }
.wpms-docview-act:hover{ background:var(--wpms-teal2); color:#fff; }
.wpms-docview-body{ flex:1; min-height:0; }
.wpms-docview-body iframe{ width:100%; height:100%; border:0; background:#fff; }
/* Handy: Toolbar kompakt halten – Name + „Im Browser öffnen" weg, Buttons passen so auf den Screen. */
@media (max-width:760px){
	.wpms-docview-bar{ gap:8px; padding:10px 12px; }
	.wpms-docview-title, .wpms-docview-ext{ display:none; }
	.wpms-docview-back{ font-size:15px; margin-right:auto; }
	.wpms-docview-act{ padding:6px 7px; }
}
.wpms-dok-del{ flex:0 0 auto; background:none; border:0; color:var(--wpms-muted); font-size:20px; line-height:1; cursor:pointer; padding:2px 8px; }
.wpms-dok-del:hover{ color:#c0392b; }
/* Signatur-Status-Badge in der Dokumentzeile */
.wpms-dok-sig{ flex:0 0 auto; font-size:11px; font-weight:700; padding:2px 9px; border-radius:8px; white-space:nowrap; }
.wpms-dok-sig-req{ background:rgba(231,160,40,.18); color:#b8860b; }
body.wpms-theme-dark .wpms-dok-sig-req{ color:#f0b44a; }
.wpms-dok-sig-done{ background:rgba(0,99,94,.16); color:#00635E; }
body.wpms-theme-dark .wpms-dok-sig-done{ color:#00635E; }
.wpms-dok-act{ flex:0 0 auto; background:var(--wpms-card); border:1px solid var(--wpms-line); color:var(--wpms-text); font:inherit; font-size:12px; font-weight:600; border-radius:8px; padding:5px 10px; cursor:pointer; white-space:nowrap; }
.wpms-dok-act:hover{ border-color:var(--wpms-teal); }
.wpms-dok-sign{ border-color:var(--wpms-teal); color:var(--wpms-teal); }
/* Schlanker Schalter ohne Pille drumherum (gleicher Switch wie sigtoggle). */
.wpms-switch{ display:inline-flex; align-items:center; gap:10px; cursor:pointer; font-size:14px; font-weight:600; color:var(--wpms-text); }
.wpms-switch input{ position:absolute; opacity:0; width:1px; height:1px; pointer-events:none; }
.wpms-switch .wpms-toggle-track{ position:relative; flex:0 0 auto; width:40px; height:24px; border-radius:999px; background:rgba(130,130,130,.4); transition:background .2s ease; }
.wpms-switch .wpms-toggle-thumb{ position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.35); transition:transform .2s ease; }
.wpms-switch input:checked + .wpms-toggle-track{ background:var(--wpms-teal2); }
.wpms-switch input:checked + .wpms-toggle-track .wpms-toggle-thumb{ transform:translateX(16px); }
.wpms-switch input:focus-visible + .wpms-toggle-track{ outline:2px solid var(--wpms-teal2); outline-offset:2px; }
/* Termin-Formular: „Ganztägig" + „Bei Einsätzen eintragen" nebeneinander (bricht auf dem Handy um). */
.wpms-term-switches{ display:flex; flex-wrap:wrap; gap:14px 26px; align-items:center; }
.wpms-sigtoggle{ display:inline-flex; align-items:center; gap:10px; padding:7px 16px 7px 10px; border:1px solid var(--wpms-line); border-radius:999px; background:var(--wpms-input); cursor:pointer; font-size:14px; font-weight:600; color:var(--wpms-text); }
.wpms-sigtoggle:has(input:checked){ border-color:var(--wpms-teal2); background:rgba(31,189,176,.08); }
.wpms-sigtoggle input{ position:absolute; opacity:0; width:1px; height:1px; pointer-events:none; }
.wpms-sigtoggle .wpms-toggle-track{ position:relative; flex:0 0 auto; width:40px; height:24px; border-radius:999px; background:rgba(130,130,130,.4); transition:background .2s ease; }
.wpms-sigtoggle .wpms-toggle-thumb{ position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.35); transition:transform .2s ease; }
.wpms-sigtoggle input:checked + .wpms-toggle-track{ background:var(--wpms-teal2); }
.wpms-sigtoggle input:checked + .wpms-toggle-track .wpms-toggle-thumb{ transform:translateX(16px); }
.wpms-sigtoggle input:focus-visible + .wpms-toggle-track{ outline:2px solid var(--wpms-teal2); outline-offset:2px; }
/* Signatur-Pad (Vollbild) */
.wpms-sigpad{ position:fixed; inset:0; z-index:10000; display:flex; flex-direction:column; background:var(--wpms-bg); }
.wpms-sigpad-head{ padding:14px 16px; font-weight:700; font-size:16px; color:var(--wpms-text); border-bottom:1px solid var(--wpms-line); background:var(--wpms-card); }
.wpms-sigpad-area{ position:relative; flex:1; min-height:0; margin:16px; border:2px dashed var(--wpms-line); border-radius:14px; background:#fff; touch-action:none; overflow:hidden; }
.wpms-sigpad-area canvas{ position:absolute; inset:0; width:100%; height:100%; }
.wpms-sigpad-hint{ position:absolute; left:0; right:0; top:50%; transform:translateY(-50%); text-align:center; color:#9aa3b0; font-size:15px; pointer-events:none; }
.wpms-sigpad-foot{ display:flex; gap:10px; justify-content:flex-end; padding:12px 16px; border-top:1px solid var(--wpms-line); background:var(--wpms-card); }
.wpms-sigbusy{ position:fixed; inset:0; z-index:10001; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.45); }
.wpms-sigbusy-box{ background:var(--wpms-card); color:var(--wpms-text); border:1px solid var(--wpms-line); border-radius:12px; padding:18px 26px; font-weight:600; }
/* Kurzer Hinweis-Toast */
.wpms-flash{ position:fixed; left:50%; bottom:28px; transform:translateX(-50%); z-index:10002; background:var(--wpms-teal2); color:#fff; padding:8px 15px; border-radius:9px; font-size:12.5px; font-weight:600; line-height:1.35; box-shadow:0 6px 24px rgba(0,0,0,.3); transition:opacity .4s; max-width:82vw; text-align:center; }
.wpms-flash.is-err{ background:#c0392b; }
.wpms-flash.is-out{ opacity:0; }
/* Bewerbungen */
.wpms-bew-tag{ background:rgba(240,165,0,.18); color:#b8740a; margin-left:6px; }
body.wpms-theme-dark .wpms-bew-tag{ background:rgba(240,165,0,.22); color:#f5c451; }
.wpms-bew-dot{ position:absolute; right:10px; bottom:10px; min-width:22px; height:22px; padding:0 6px; box-sizing:border-box; display:flex; align-items:center; justify-content:center; background:#c0392b; color:#fff; font-size:12px; font-weight:700; border-radius:999px; box-shadow:0 1px 3px rgba(0,0,0,.3); }

/* Footer „Software von ibx" */
.wpms-foot{ text-align:center; padding:22px 0 8px; margin-top:auto; }
.wpms-foot-link{ display:inline-flex; align-items:center; gap:8px; color:var(--wpms-muted); text-decoration:none; font-size:14px; }
.wpms-foot-link:hover{ opacity:.8; }
.wpms-foot-logo{ height:22px; width:auto; display:inline-block; }
.wpms-foot-white{ display:none; }
body.wpms-theme-dark .wpms-foot-navy{ display:none; }
body.wpms-theme-dark .wpms-foot-white{ display:inline-block; }
.wpms-bew-status{ align-self:center; font-weight:700; color:var(--wpms-teal); font-size:15px; }
.wpms-bewerber{ display:flex; align-items:center; gap:10px; }
.wpms-bewerber-n{ flex:1; min-width:0; font-weight:600; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-check-wide{ width:100%; }
.wpms-team-member{ display:flex; align-items:center; gap:10px; font-size:15px; font-weight:600; color:var(--wpms-text); }
.wpms-team-av{ width:32px; height:32px; border-radius:50%; overflow:hidden; background:var(--wpms-teal2); color:#fff; display:flex; align-items:center; justify-content:center; font-size:14px; flex:0 0 auto; }
.wpms-team-av img{ width:100%; height:100%; object-fit:cover; display:block; }
.wpms-team-name{ flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-team-h{ flex:0 0 auto; font-size:12px; font-weight:600; padding:1px 8px; border-radius:999px; }
.wpms-team-h.is-ok{ background:#e2f7e9; color:#00635E; }
.wpms-team-h.is-open{ background:#fff1d6; color:#b8740a; }
body.wpms-theme-dark .wpms-team-h.is-ok{ background:rgba(0,99,94,.28); color:#5fc98a; }
body.wpms-theme-dark .wpms-team-h.is-open{ background:rgba(245,196,81,.20); color:#f5c451; }

/* Einsatz abschließen */
.wpms-abschluss .wpms-btn{ margin-top:4px; }
.wpms-abschluss.is-done{ border-color:#00635E; }
.wpms-abschluss-info{ font-size:13px; font-weight:600; color:#00635E; margin:0 0 6px; }
body.wpms-theme-dark .wpms-abschluss-info{ color:#5fc98a; }

@media (max-width:900px){ .wpms-detail-grid{ grid-template-columns:1fr; } .wpms-detail-side{ position:static; } }

/* Kunden: A-Z-Filter + Master-Detail (Liste links, Daten rechts) */
.wpms-az{ display:flex; flex-wrap:wrap; gap:4px; margin-bottom:18px; }
/* Kategorie-Filter als Dropdown über die ganze Breite (z. B. Mitarbeiter-Seite). */
.wpms-filter-dd{ width:100%; box-sizing:border-box; padding:11px 40px 11px 14px; font:inherit; font-size:14px; font-weight:600; color:var(--wpms-text); background-color:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:10px; cursor:pointer; -webkit-appearance:none; appearance:none; background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa1a8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat:no-repeat; background-position:right 13px center; }
.wpms-filter-dd:focus-visible{ outline:2px solid var(--wpms-teal2); outline-offset:1px; }
.wpms-filter-dd option{ color:var(--wpms-text); background:var(--wpms-card); }
/* A-Z-Buchstabenleiste auf dem Handy ausblenden (Suchfeld reicht; Kategorie-Filter bleibt). */
@media (max-width:760px){ .wpms-az-letters{ display:none; } }
.wpms-az-l{ min-width:30px; height:30px; padding:0 7px; border:1px solid transparent; background:transparent; color:var(--wpms-muted); border-radius:8px; font-size:13px; font-weight:700; cursor:pointer; transition:background .15s, color .15s; }
.wpms-az-l:hover:not(.is-empty):not(.is-active){ background:var(--wpms-hover); color:var(--wpms-text); }
.wpms-az-l.is-active{ background:var(--wpms-teal2); color:#fff; border-color:transparent; }
.wpms-az-l.is-empty{ opacity:.32; cursor:default; }
.wpms-az-cat{ min-width:0; width:auto; padding:0 14px; }
.wpms-tags{ display:flex; flex-wrap:wrap; gap:6px; }
.wpms-cat-tag{ background:rgba(31,189,176,.14); color:var(--wpms-teal); border-radius:999px; padding:2px 9px; font-size:11px; font-weight:600; }
.wpms-katadd{ display:flex; gap:8px; margin-top:10px; }
.wpms-katadd input{ flex:1; min-width:0; }
/* Suchfeld über der Liste */
.wpms-md-search{ margin-bottom:14px; }
.wpms-md-actions{ display:flex; gap:8px; justify-content:flex-end; flex-wrap:wrap; margin-top:14px; margin-bottom:12px; }
/* Bereichs-Umschalter (z. B. Leistungen | Leistungsverzeichnisse) */
.wpms-seg{ display:inline-flex; gap:2px; padding:2px; border:1px solid var(--wpms-line); border-radius:9px; background:var(--wpms-card); }
.wpms-seg button{ height:28px; padding:0 12px; border:0; border-radius:7px; background:transparent; font:inherit; font-size:13px; font-weight:600; color:var(--wpms-muted); cursor:pointer; }
.wpms-seg button[aria-selected="true"]{ background:rgba(31,189,176,.16); color:var(--wpms-teal); }
.wpms-seg button:focus{ outline:none; } .wpms-seg button:focus-visible{ box-shadow:0 0 0 2px var(--wpms-teal); }
.wpms-leist-akt{ justify-content:flex-start; } .wpms-leist-akt .wpms-md-ansicht{ margin-right:0; margin-left:auto; }
/* Ansicht-Umschalter Liste | Kacheln (links in der Aktionszeile) + Tabellenansicht (v1.0.823) */
.wpms-md-ansicht{ display:inline-flex; margin-right:auto; padding:2px; border:1px solid var(--wpms-line); border-radius:9px; background:var(--wpms-card); }
.wpms-md-ansicht button{ width:32px; height:28px; display:inline-flex; align-items:center; justify-content:center; border:0; border-radius:7px; background:transparent; color:var(--wpms-muted); cursor:pointer; }
.wpms-md-ansicht button svg{ width:16px; height:16px; }
.wpms-md-ansicht button[aria-pressed="true"]{ background:rgba(31,189,176,.16); color:var(--wpms-teal); }
.wpms-md-ansicht button:focus{ outline:none; } .wpms-md-ansicht button:focus-visible{ box-shadow:0 0 0 2px var(--wpms-teal); }
.wpms-md-list.is-tabelle{ display:block; }
.wpms-mdt{ width:100%; border-collapse:separate; border-spacing:0; font-size:13.5px; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:12px; overflow:hidden; }
.wpms-mdt th:first-child{ border-top-left-radius:12px; } .wpms-mdt th:last-child{ border-top-right-radius:12px; }
.wpms-mdt th{ padding:10px 12px; text-align:left; font-size:11px; font-weight:650; letter-spacing:.05em; text-transform:uppercase; color:var(--wpms-muted); background:var(--wpms-card); border-bottom:1px solid var(--wpms-line); white-space:nowrap; }
.wpms-mdt th button{ display:inline-flex; align-items:center; gap:4px; padding:0; border:0; background:none; font:inherit; letter-spacing:inherit; text-transform:inherit; color:inherit; cursor:pointer; }
.wpms-mdt th button:hover, .wpms-mdt th[aria-sort="ascending"] button, .wpms-mdt th[aria-sort="descending"] button{ color:var(--wpms-text); }
.wpms-mdt th button:focus{ outline:none; } .wpms-mdt th button:focus-visible{ text-decoration:underline; }
.wpms-mdt-pfeil{ min-width:8px; color:var(--wpms-teal); }
.wpms-mdt td{ padding:10px 12px; border-bottom:1px solid var(--wpms-line); vertical-align:middle; }
.wpms-mdt tbody tr:last-child td{ border-bottom:0; }
.wpms-mdt tbody tr{ cursor:pointer; }
.wpms-mdt tbody tr:hover td{ background:var(--wpms-hover); }
.wpms-mdt tbody tr:focus{ outline:none; } .wpms-mdt tbody tr:focus-visible td{ background:var(--wpms-hover); box-shadow:inset 0 1px 0 var(--wpms-teal), inset 0 -1px 0 var(--wpms-teal); }
.wpms-mdt .mdt-n{ font-weight:600; }
.wpms-mdt .mdt-nr, .wpms-mdt .mdt-zahl{ font-variant-numeric:tabular-nums; white-space:nowrap; }
.wpms-mdt .mdt-zahl{ text-align:right; } .wpms-mdt th.mdt-zahl{ text-align:right; }
.wpms-mdt .mdt-lex{ text-align:center; width:80px; } .wpms-mdt th.mdt-lex{ text-align:center; }
.wpms-mdt .mdt-tel{ white-space:nowrap; }
.wpms-mdt td a{ color:var(--wpms-text); text-decoration:none; } .wpms-mdt td a:hover{ color:var(--wpms-teal); text-decoration:underline; }
.wpms-mdt .mdt-akt{ text-align:right; white-space:nowrap; width:1%; }
.wpms-mdt-k{ height:28px; margin-left:6px; padding:0 11px; border:1px solid var(--wpms-line); border-radius:7px; background:transparent; font:inherit; font-size:12.5px; font-weight:600; color:var(--wpms-text); cursor:pointer; }
.wpms-mdt-k:hover{ background:var(--wpms-hover); } .wpms-mdt-k.is-gefahr{ color:#c23b3b; } .wpms-mdt-k:focus{ outline:none; } .wpms-mdt-k:focus-visible{ box-shadow:0 0 0 2px var(--wpms-teal); }
.wpms-mdt .mdt-tel a{ color:var(--wpms-text); text-decoration:none; } .wpms-mdt .mdt-tel a:hover{ color:var(--wpms-teal); text-decoration:underline; }
.wpms-mdt .mdt-grau{ color:var(--wpms-muted); }
.wpms-mdt .mdt-leer{ color:var(--wpms-muted); opacity:.6; }
.wpms-mdt .mdt-ok{ color:var(--wpms-teal); font-weight:700; }
.mdt-chip{ display:inline-flex; align-items:center; height:19px; padding:0 7px; margin-left:4px; border-radius:999px; font-size:10.5px; font-weight:650; vertical-align:1px; }
.mdt-chip.is-warn{ background:rgba(194,59,59,.12); color:#c23b3b; }
.mdt-chip.is-dup{ background:rgba(217,154,30,.15); color:#a46f0b; }
body.wpms-theme-dark .mdt-chip.is-warn{ color:#ef8a8a; } body.wpms-theme-dark .mdt-chip.is-dup{ color:#e8b552; }
.mdt-punkt{ display:inline-block; width:7px; height:7px; margin-left:4px; border-radius:50%; vertical-align:1px; }
.mdt-punkt.is-blau{ background:#006fc0; } .mdt-punkt.is-gruen{ background:#00af50; }
.wpms-mdt-anzahl{ margin:8px 2px 0; font-size:12px; color:var(--wpms-muted); }
@media (max-width:760px){
	.wpms-mdt .mdt-nr, .wpms-mdt .mdt-adr, .wpms-mdt .mdt-lex, .wpms-mdt .mdt-preis, .wpms-mdt .mdt-ort, .wpms-mdt .mdt-mobil-weg{ display:none; }
	.wpms-mdt td, .wpms-mdt th{ padding:9px 8px; }
}
.wpms-btn.wpms-exp{ padding:5px 13px; font-size:13px; min-height:0; border-radius:8px; }
/* „+ Neuer Kunde/Mitarbeiter" + „Archiv" neutral/outline wie „+ Hinzufügen" statt grün gefüllt.
   Nur .wpms-btn.wpms-exp – CSV/PDF sind .wpms-btn-sec und bleiben unverändert. */
.wpms-btn.wpms-exp{ background:transparent; color:var(--wpms-muted); border:1px solid var(--wpms-line); }
.wpms-btn.wpms-exp:hover{ border-color:var(--wpms-teal2); color:var(--wpms-text); }
.wpms-btn-sec.wpms-exp{ color:var(--wpms-muted); border-color:var(--wpms-line); }
.wpms-btn-sec.wpms-exp:hover{ background:transparent; color:var(--wpms-teal); border-color:var(--wpms-teal); }
.wpms-md-search input{ width:100%; max-width:none; box-sizing:border-box; font:inherit; padding:10px 14px; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-input); color:var(--wpms-text); }
.wpms-md-search input:focus{ outline:none; border-color:var(--wpms-teal2); }
.wpms-md{ display:block; }
/* Kacheln als responsives Raster: so viele Spalten wie passen (min. 250px breit). */
.wpms-md-list{ display:grid; grid-template-columns:repeat(auto-fill, minmax(250px, 1fr)); gap:12px; align-items:stretch; }
.wpms-md-list > .wpms-empty{ grid-column:1 / -1; }
.wpms-md-item{ position:relative; text-align:left; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:12px; padding:14px 16px; cursor:pointer; display:flex; flex-direction:column; gap:3px; color:var(--wpms-text); }
.wpms-md-item.has-corner strong{ padding-right:30px; }
/* Rollen-Pille sitzt ganz unten in der Kachel (Grid stretcht Kacheln auf gleiche Höhe). */
.wpms-md-role-foot{ align-self:flex-start; margin-top:auto; padding-top:16px; }
.wpms-md-corner{ position:absolute; top:11px; right:13px; display:flex; align-items:center; gap:7px; }
.wpms-role{ font-size:11px; font-weight:700; padding:2px 9px; border-radius:8px; white-space:nowrap; }
.wpms-verify{ display:inline-flex; align-items:center; justify-content:center; width:16px; height:16px; border-radius:50%; border:1.5px solid #00635E; color:#00635E; flex-shrink:0; }
.wpms-verify svg{ width:9px; height:9px; }
body.wpms-theme-dark .wpms-verify{ border-color:#00635E; color:#00635E; }
.wpms-role-mgmt{ background:rgba(31,189,176,.16); color:var(--wpms-teal); }
.wpms-role-pl{ background:rgba(231,160,40,.18); color:#b8860b; }
body.wpms-theme-dark .wpms-role-pl{ color:#f0b44a; }
.wpms-role-ma{ background:rgba(120,135,160,.20); color:var(--wpms-muted); }
.wpms-md-item strong{ font-size:15px; }
.wpms-md-item:hover{ border-color:var(--wpms-teal2); }
.wpms-md-item.is-active{ border-color:var(--wpms-teal2); background:var(--wpms-hover); }
.wpms-md-sub{ font-size:12px; color:var(--wpms-muted); }
.wpms-md-hint{ color:var(--wpms-muted); padding:18px 4px; }

/* Detail-Karte: fährt von rechts ein (wie die Header-Schnellsuche), Liste bleibt darunter sichtbar. */
.wpms-mddrawer-ov{ position:fixed; inset:0; background:rgba(0,0,0,.42); opacity:0; transition:opacity .25s ease; z-index:80; }
.wpms-mddrawer-ov.is-open{ opacity:1; }
.wpms-mddrawer{ position:fixed; top:0; right:0; bottom:0; width:38%; min-width:400px; max-width:560px; background:var(--wpms-bg); color:var(--wpms-text); border-left:1px solid var(--wpms-line); box-shadow:-8px 0 34px rgba(0,0,0,.28); z-index:81; transform:translateX(100%); transition:transform .26s cubic-bezier(.22,.61,.36,1); display:flex; flex-direction:column; }
.wpms-mddrawer.is-open{ transform:translateX(0); }
/* Kopf-Icon-Reihe (Bearbeiten/Löschen … Full · Schließen) als fester Kopfstreifen über die
   volle Breite – bleibt beim Scrollen oben, Inhalt verschwindet sauber darunter. */
.wpms-mddrawer-tools{ position:absolute; top:0; left:0; right:0; z-index:6; display:flex; align-items:center; justify-content:flex-end; gap:8px; padding:12px 14px; background:var(--wpms-bg); }
.wpms-mddrawer-x{ width:34px; height:34px; border:0; border-radius:9px; background:var(--wpms-card); color:var(--wpms-text); font-size:22px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.wpms-mddrawer-x:hover{ background:var(--wpms-hover); }
.wpms-mddrawer-act{ width:34px; height:34px; border:0; border-radius:9px; background:var(--wpms-card); color:var(--wpms-text); display:flex; align-items:center; justify-content:center; cursor:pointer; transition:background .15s, color .15s; }
.wpms-mddrawer-act:hover{ background:var(--wpms-hover); }
.wpms-mddrawer-act.is-danger:hover{ background:#c0392b; color:#fff; }
/* Vollbild-Button links neben dem × – öffnet die Details als eigene Seite. */
.wpms-mddrawer-full{ width:34px; height:34px; border:0; border-radius:9px; background:var(--wpms-card); color:var(--wpms-text); display:flex; align-items:center; justify-content:center; cursor:pointer; }
.wpms-mddrawer-full:hover{ background:var(--wpms-hover); }
/* Stift-Icon „Bearbeiten" – links neben dem Vollbild-Icon (right:56px) im Drawer-Kopf. */
/* Stift „Bearbeiten" in der Vollbild-Ansicht – neben der Überschrift. */
.wpms-fullpage-h{ display:inline-flex; align-items:center; gap:12px; }
.wpms-fullpage-edit{ width:34px; height:34px; border:1px solid var(--wpms-line); border-radius:9px; background:var(--wpms-card); color:var(--wpms-text); display:inline-flex; align-items:center; justify-content:center; cursor:pointer; }
.wpms-fullpage-edit:hover{ background:var(--wpms-hover); }
.wpms-fullpage-edit .wpms-ic{ width:16px; height:16px; }
.wpms-mat-detail-del{ color:#c0392b; }
.wpms-mat-detail-del:hover{ border-color:#c0392b; }

/* Artikel-Detail Stammdaten: Label links, Wert rechts in einer Zeile (Haarlinien dazwischen). */
.wpms-mat-stamm .wpms-kr{ flex-direction:row; align-items:baseline; justify-content:space-between; gap:14px; padding:7px 0; border-bottom:1px solid var(--wpms-line); }
.wpms-mat-stamm .wpms-kr:last-child{ border-bottom:0; }
.wpms-mat-stamm .wpms-kr span{ flex:0 0 auto; }
.wpms-mat-stamm .wpms-kr strong{ min-width:0; text-align:right; overflow-wrap:anywhere; }
.wpms-mat-stamm .wpms-kr a{ min-width:0; text-align:right; }
/* Beschreibung bleibt gestapelt (Fließtext). */
.wpms-mat-stamm .wpms-kr.wpms-kr-block{ flex-direction:column; align-items:stretch; }
.wpms-mat-stamm .wpms-kr-block p{ margin:2px 0 0; text-align:left; }

/* Artikel-Detail: Produktbild groß + Thumb-Galerie */
.wpms-mat-gallery{ margin-bottom:14px; }
/* Produktbild: volle Spaltenbreite (wie die Karte darunter), feste flache Höhe,
 * object-fit:cover = füllt randlos OHNE zu verzerren (beschneidet nur oben/unten). */
.wpms-mat-gal-main{ position:relative; border:1px solid var(--wpms-line); border-radius:var(--mat-r-card); background:var(--wpms-input); overflow:hidden; margin-bottom:8px; height:320px; }
.wpms-mat-gal-main img{ display:block; width:100%; height:100%; object-fit:cover; cursor:zoom-in; }
/* Bild-Vollansicht (Klick aufs Produktfoto): Foto komplett, ohne Zuschnitt. */
.wpms-imgview{ position:fixed; inset:0; z-index:1200; display:flex; flex-direction:column; background:var(--wpms-bg); }
.wpms-imgview-bar{ flex:0 0 auto; display:flex; align-items:center; gap:12px; padding:10px 14px; border-bottom:1px solid var(--wpms-line); }
.wpms-imgview-back{ border:0; background:transparent; color:var(--wpms-teal2); font:inherit; font-size:15px; padding:4px 2px; cursor:pointer; }
.wpms-imgview-t{ color:var(--wpms-text); font-size:15px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-imgview-body{ flex:1 1 auto; display:flex; align-items:center; justify-content:center; padding:16px; overflow:auto; cursor:zoom-out; }
.wpms-imgview-body img{ max-width:100%; max-height:100%; object-fit:contain; border-radius:8px; }
@media (max-width:640px){ .wpms-mat-gal-main{ height:220px; } }
/* Bild-Anpassen-Button (Zuschnitt) oben rechts auf dem großen Bild */
.wpms-mat-gal-edit{ position:absolute; top:10px; right:10px; width:34px; height:34px; border-radius:10px; border:1px solid var(--wpms-line); background:rgba(0,0,0,.45); color:#fff; display:flex; align-items:center; justify-content:center; cursor:pointer; padding:0; }
/* Bild-Anpassen-Overlay: Ziehen/Zoomen/Drehen, Rahmen = späterer Zuschnitt (4:3) */
.wpms-mat-imgedit{ position:fixed; inset:0; z-index:600; background:rgba(0,0,0,.55); display:flex; align-items:center; justify-content:center; padding:16px; }
.wpms-mat-imgedit-box{ background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:14px; padding:16px; width:min(520px,92vw); }
.wpms-mat-imgedit-stage{ border-radius:10px; overflow:hidden; border:1px solid var(--wpms-line); }
.wpms-mat-imgedit-stage canvas{ display:block; width:100%; height:auto; cursor:grab; touch-action:none; }
/* Übernehmen = gleiches Format/Größe wie Abbrechen, nur dezent teal-getönt (aktiv). */
.wpms-mat-imgedit-btns .wpms-ie-save{ border-color:var(--wpms-teal2); color:var(--wpms-teal2); }
.wpms-mat-imgedit-ctrl{ display:flex; align-items:center; gap:14px; margin-top:12px; flex-wrap:wrap; }
.wpms-mat-imgedit-ctrl label{ display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--wpms-muted); flex:1; min-width:180px; }
.wpms-mat-imgedit-ctrl input[type=range]{ flex:1; }
.wpms-mat-imgedit-hint{ color:var(--wpms-muted); font-size:11.5px; margin:8px 0 0; }
.wpms-mat-imgedit-btns{ display:flex; justify-content:flex-end; gap:10px; margin-top:12px; }
.wpms-mat-gal-thumbs{ display:flex; gap:8px; flex-wrap:wrap; }
.wpms-mat-gal-thumb{ position:relative; width:64px; height:64px; padding:0; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-input); overflow:hidden; cursor:pointer; }
.wpms-mat-gal-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.wpms-mat-gal-thumb.is-active{ border-color:var(--wpms-teal2); box-shadow:0 0 0 1px var(--wpms-teal2); }
.wpms-mat-gal-x{ position:absolute; top:2px; right:2px; width:18px; height:18px; border-radius:50%; background:rgba(0,0,0,.55); color:#fff; font-size:12px; line-height:18px; text-align:center; cursor:pointer; }
.wpms-mat-gal-x:hover{ background:#c0392b; }
.wpms-mat-gal-add{ width:64px; height:64px; padding:0; border:1px dashed var(--wpms-line); border-radius:10px; background:transparent; color:var(--wpms-muted); font:inherit; font-size:22px; cursor:pointer; }
.wpms-mat-gal-add:hover{ color:var(--wpms-text); border-color:var(--wpms-teal2); }
.wpms-mat-gal-add:disabled{ opacity:.5; cursor:default; }
/* Vollbild-Detailseite: Karten des Drawers nebeneinander über die volle Breite. */
.wpms-fullpage-h{ margin:6px 0 16px; }
.wpms-fullpage{ display:grid; grid-template-columns:repeat(auto-fit, minmax(340px, 1fr)); gap:18px; align-items:start; }
@media (max-width:760px){ .wpms-fullpage{ grid-template-columns:1fr; } }
/* Kunden-Übersicht (Vollbild): links kompakte Fakten (Stammdaten/Standort/Termine),
   rechts breite Analyse (Rechnungen & Umsatz) – skaliert mit wachsender Datenmenge. */
.wpms-kfull{ display:grid; grid-template-columns:minmax(0, 1fr) minmax(320px, 380px); gap:18px; align-items:start; }
.wpms-kfull-1col{ grid-template-columns:1fr; max-width:640px; }
.wpms-kfull-side, .wpms-kfull-main{ display:flex; flex-direction:column; gap:18px; min-width:0; }
@media (max-width:900px){ .wpms-kfull, .wpms-kfull-1col{ grid-template-columns:1fr; max-width:none; } }
/* Kunden-Single: Kopfzeile – Name + Badges links, Bearbeiten/Löschen-Icons rechts. */
.wpms-kfull-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin:6px 0 16px; flex-wrap:wrap; }
.wpms-kfull-titlewrap{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; min-width:0; }
.wpms-kfull-head .wpms-fullpage-h{ margin:0; }
.wpms-kfull-tags{ display:inline-flex; gap:6px; flex-wrap:wrap; }
.wpms-kfull-tags .wpms-tag{ margin-left:0; }
.wpms-kfull-acts{ display:flex; align-items:center; gap:8px; flex:0 0 auto; }
/* „Kontakt“-Titel in der rechten Karte (Kapitälchen, wie STANDORT). */
.wpms-kunde-kontakt-h{ margin:0; font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--wpms-muted); }
/* Rechte Spalte = eine Karte mit nahtlosen Sektionen (Kontakt + Standort), wie im Drawer. */
.wpms-kfull-side{ background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:14px; padding:20px; gap:0; }
.wpms-kfull-side .wpms-kunde-detail{ border:0; background:transparent; padding:0; border-radius:0; }
.wpms-kfull-side .wpms-sidecard{ border:0; background:transparent; border-radius:0; overflow:visible; }
.wpms-kfull-side .wpms-mapcard h3{ padding:0 0 2px; }
.wpms-kfull-side .wpms-mapcard .wpms-mapbox{ padding:0; }
.wpms-kfull-side > * + *{ margin-top:18px; padding-top:18px; border-top:1px solid var(--wpms-line); }
/* Block statt flex-column: verhindert, dass Kacheln (z. B. Standort-Karte) bei Überlauf
   gequetscht/abgeschnitten werden, und scrollt zuverlässig (gleicher Fix wie kpanel-body). */
.wpms-mddrawer-body{ flex:1; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch; padding:58px 20px 20px; display:block; background:var(--wpms-bg); }
/* Mehr Luft zwischen Auswertungs-Karte und der Dokumente-Section im Mitarbeiter-Drawer. */
.wpms-mddrawer-body .wpms-abw-card + .wpms-sec{ margin-top:16px; }
/* Detail-Karte im Drawer randlos einpassen (Rahmen kommt schon vom Drawer). */
.wpms-mddrawer-body .wpms-kunde-detail{ border:0; background:transparent; padding:0; }
/* Drawer-Übersicht („Karte rechts") aufräumen: nahtlose Sektionen statt Box-in-Box –
   Standort/Umsatz randlos, Trennung nur über Kapitälchen-Titel + feine Linie. */
.wpms-mddrawer-body .wpms-sidecard{ border:0; background:transparent; border-radius:0; overflow:visible; }
.wpms-mddrawer-body .wpms-mapcard h3{ padding:0 0 2px; }
.wpms-mddrawer-body .wpms-mapcard .wpms-mapbox{ padding:0; }
.wpms-mddrawer-body .wpms-kunde-analyse .wpms-kdc-body{ padding:0; }
/* Umsatz-Balkendiagramm im Drawer ausblenden – KPI-Werte bleiben sichtbar. */
.wpms-mddrawer-body .wpms-kunde-analyse .wpms-kdc-chart{ display:none; }
/* „Erfasste Stunden“-Diagramm im Mitarbeiter-Drawer ausblenden (Auswertung + Dokumente bleiben). */
.wpms-mddrawer-body .wpms-ma-chart{ display:none; }
/* Mitarbeiter-Drawer: Auswertung + Dokumente als nahtlose Sektionen (wie Kontakt/Standort), Kapitaelchen-Titel. */
.wpms-mddrawer-body .wpms-abw-card, .wpms-mddrawer-body .wpms-sec{ border:0; background:transparent; border-radius:0; padding:0; }
.wpms-mddrawer-body .wpms-abw-card > h3, .wpms-mddrawer-body .wpms-sec > h2{ font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--wpms-muted); margin:0 0 14px; }
/* Auswertung im Drawer: durch Haarlinie oben und unten abgetrennt, mit Luft innen. */
.wpms-mddrawer-body .wpms-abw-card{ margin-top:30px; padding:26px 0; border-top:1px solid var(--wpms-line); border-bottom:1px solid var(--wpms-line); }
.wpms-mddrawer-body .wpms-abw-card + .wpms-sec{ margin-top:26px; padding-top:0; }
.wpms-mddrawer-body > * + *{ margin-top:18px; padding-top:18px; border-top:1px solid var(--wpms-line); }
@media (max-width:760px){ .wpms-mddrawer{ width:100%; min-width:0; max-width:none; } }
.wpms-kunde-detail{ background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:14px; padding:20px; display:flex; flex-direction:column; gap:14px; }
.wpms-kunde-detail h2{ margin:0; }
/* Badges (Lexoffice/Dublette) in eigener Zeile unter dem Titel – kein Umbruch am langen Namen */
.wpms-kunde-tags{ display:flex; flex-wrap:wrap; gap:6px; margin-top:-8px; }
.wpms-kunde-tags .wpms-tag{ margin-left:0; }
/* Kontaktdaten als kompakte Gruppe (eigener, engerer Rhythmus als die Karten-Abstände) */
.wpms-kr-group{ display:flex; flex-direction:column; gap:10px; }
.wpms-kunde-act{ display:flex; flex-wrap:nowrap; align-items:center; gap:8px; margin-top:4px; }
/* „Bearbeiten" als dezent-primäre Aktion (Teal-Outline), Löschen liegt im ⋯-Menü daneben */
.wpms-mini-primary{ border-color:var(--wpms-teal2); color:var(--wpms-teal); background:transparent; font-weight:600; }
.wpms-mini-primary:hover{ background:var(--wpms-teal2); color:#fff; }
/* Aktions-Buttons gleich breit, wachsen mit, brechen sauber um (nicht zu breit). */
.wpms-kunde-act .wpms-mini{ flex:1 1 128px; text-align:center; }
/* Mitarbeiter-Profilkarte (hat .wpms-ma-head): die drei Formular-Buttons untereinander, Text linksbündig. */
.wpms-kunde-detail:has(.wpms-ma-head) .wpms-kunde-act .wpms-mini{ flex:1 1 100%; text-align:left; }
/* 3 Formular-Buttons im MA-Detail nebeneinander (überstimmt die 100%-Stapel-Regel). */
.wpms-kunde-detail:has(.wpms-ma-head) .wpms-kunde-act.wpms-docbtn-row .wpms-mini{ flex:1 1 0; min-width:0; text-align:center; white-space:normal; overflow-wrap:anywhere; padding:8px 5px; line-height:1.2; font-size:11.5px; }
/* Überschrift über den 3 Formular-Buttons (nur MA-Detail). */
.wpms-docbtn-h{ margin:14px 0 0; font-size:13px; font-weight:600; color:var(--wpms-muted); }

/* ============ Dokumentenablage: Suche + Typ-Chips + Personalakten (kompakt) ============ */
.wpms-doksuche-field{ position:relative; display:flex; align-items:center; margin-bottom:12px; }
.wpms-doksuche-ic{ position:absolute; left:13px; display:flex; color:var(--wpms-muted); pointer-events:none; }
.wpms-doksuche-input{ width:100%; box-sizing:border-box; padding:11px 38px; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-input); color:var(--wpms-text); font:inherit; font-size:14px; }
.wpms-doksuche-input::placeholder{ color:var(--wpms-muted); }
.wpms-doksuche-input:focus{ outline:none; border-color:var(--wpms-teal); }
.wpms-doksuche-input::-webkit-search-cancel-button, .wpms-doksuche-input::-webkit-search-decoration{ -webkit-appearance:none; appearance:none; display:none; } /* natives X aus, eigenes bleibt */
.wpms-doksuche-x{ position:absolute; right:7px; width:26px; height:26px; border:0; background:transparent; color:var(--wpms-muted); font-size:18px; line-height:1; cursor:pointer; border-radius:7px; }
.wpms-doksuche-x:hover{ background:var(--wpms-line); color:var(--wpms-text); }
/* Typ-Chips */
.wpms-dokchips{ display:flex; flex-wrap:wrap; gap:6px; margin:0 0 18px; }
.wpms-dokchip{ border:1px solid var(--wpms-line); background:transparent; color:var(--wpms-muted); border-radius:999px; padding:5px 12px; font:inherit; font-size:12.5px; cursor:pointer; transition:color .15s, border-color .15s; }
.wpms-dokchip:hover{ color:var(--wpms-text); }
.wpms-dokchip.is-active{ border-color:var(--wpms-teal); color:var(--wpms-teal); background:rgba(31,189,176,.1); font-weight:600; }
.wpms-dokchips-sel{ display:none; box-sizing:border-box; width:100%; padding:11px 12px; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-input); color:var(--wpms-text); font:inherit; font-size:14px; margin:0 0 18px; -webkit-appearance:none; appearance:none; background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238fa3a8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 14px center; }
@media (max-width:760px){ .wpms-dokchips{ display:none; } .wpms-dokchips-sel{ display:block; } }
/* Gruppen-Label (Mitarbeiter / Kunden) */
.wpms-akten-h{ margin:18px 2px 8px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.09em; color:var(--wpms-muted); display:flex; align-items:center; gap:8px; }
.wpms-akten-h:first-of-type{ margin-top:2px; }
.wpms-akten-h .wpms-asgroup-count{ font-size:10.5px; letter-spacing:0; }
/* Personalakte */
.wpms-akte{ border:1px solid var(--wpms-line); border-radius:11px; background:var(--wpms-card); margin-bottom:7px; overflow:hidden; }
.wpms-akte-head{ display:flex; align-items:center; gap:10px; width:100%; text-align:left; background:transparent; border:0; color:var(--wpms-text); font:inherit; padding:11px 14px; cursor:pointer; }
.wpms-akte-head:hover{ background:rgba(31,189,176,.05); }
.wpms-akte-caret{ color:var(--wpms-muted); transition:transform .18s; flex:none; font-size:10px; }
.wpms-akte.is-open .wpms-akte-caret{ transform:rotate(90deg); }
.wpms-akte-name{ font-weight:600; font-size:14px; flex:none; }
.wpms-akte-sub{ color:var(--wpms-muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-akte-head .wpms-asgroup-count{ margin-left:auto; flex:none; font-size:11px; color:var(--wpms-muted); border:1px solid var(--wpms-line); border-radius:999px; padding:2px 9px; background:transparent; }
.wpms-akte-body{ display:none; padding:2px 10px 10px; }
.wpms-akte.is-open .wpms-akte-body{ display:block; }
/* Dokumentzeile in der Akte */
.wpms-akte-doc{ position:relative; display:flex; align-items:center; gap:6px; margin-top:7px; }
.wpms-akte-doc-main{ flex:1; min-width:0; display:flex; align-items:center; gap:10px; text-align:left; background:var(--wpms-input); border:1px solid var(--wpms-line); border-radius:9px; padding:9px 12px; cursor:pointer; color:var(--wpms-text); font:inherit; font-size:13px; transition:border-color .15s; }
.wpms-akte-doc-main:hover{ border-color:var(--wpms-teal); }
.wpms-akte-doc-t{ font-weight:600; flex:none; }
.wpms-akte-doc-meta{ color:var(--wpms-muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:0 1 auto; min-width:0; }
.wpms-akte-doc-date{ margin-left:auto; flex:none; color:var(--wpms-muted); font-size:12px; font-variant-numeric:tabular-nums; }
/* Typ-Farbpunkte */
.wpms-dokdot{ width:8px; height:8px; border-radius:50%; flex:none; }
.wpms-dokdot-vertrag{ background:#5f9e97; }
.wpms-dokdot-schutz{ background:#b0a06e; }
.wpms-dokdot-objekt{ background:#8f86b8; }
.wpms-dokdot-schein{ background:#7492b5; }
.wpms-dokdot-sonst{ background:#7d8890; }
.wpms-dokdot-lohn{ background:#6ea3c9; }
.wpms-dokdot-sv{ background:#c98f6e; }

/* Header-Chat-Button + Schnell-Nachricht-Drawer */
.wpms-topchat{ display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border:1px solid var(--wpms-line); border-radius:10px; background:transparent; color:var(--wpms-muted); cursor:pointer; flex:none; transition:color .15s, border-color .15s; margin-left:-6px; margin-right:12px; position:relative; }
.wpms-topchat-dot{ position:absolute; top:-4px; right:-4px; width:10px; height:10px; border-radius:50%; background:#e0483e; border:2px solid var(--wpms-card); }

/* Chat-Konversationen (Übersicht + Thread-Kopf) */
.wpms-chatth-such{ box-sizing:border-box; width:100%; padding:11px 14px; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-input); color:var(--wpms-text); font:inherit; font-size:14px; margin:0 0 14px; }
.wpms-chatth-such::placeholder{ color:var(--wpms-muted); }
.wpms-chatth-such:focus{ outline:none; border-color:var(--wpms-teal); }
.wpms-chatth-bar{ display:flex; gap:8px; align-items:center; margin:0 0 14px; }
/* Suchfeld und „+ Gruppe" exakt gleich hoch (feste Höhe statt stretch – Inputs stretchen unzuverlässig). */
.wpms-chatth-bar .wpms-chatth-such{ flex:1; margin:0; height:46px; }
.wpms-chatth-bar .wpms-chatgrp-neu{ display:inline-flex; align-items:center; padding:0 18px; height:46px; }
.wpms-chatgrp-neu{ flex:none; height:42px; padding:0 16px; }
.wpms-chatgrp-form{ display:flex; flex-direction:column; gap:10px; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:12px; padding:14px; }
.wpms-chatgrp-form .wpms-meta{ margin:0 2px; }
.wpms-chatgrp-pers{ display:flex; flex-direction:column; gap:6px; max-height:38vh; overflow-y:auto; }
.wpms-chatgrp-form .wpms-chatdraw-emp.is-active{ border-color:var(--wpms-teal); color:var(--wpms-teal); background:rgba(31,189,176,.1); font-weight:600; }
.wpms-chatth-list{ display:flex; flex-direction:column; gap:8px; }
.wpms-chatth{ display:flex; align-items:center; gap:12px; width:100%; text-align:left; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:12px; padding:11px 14px; color:var(--wpms-text); font:inherit; cursor:pointer; transition:border-color .15s; }
.wpms-chatth:hover{ border-color:var(--wpms-teal2); }
.wpms-chatth-wrap{ position:relative; }
.wpms-chatth-wrap .wpms-chatth{ width:100%; min-width:0; padding-right:60px; } /* mehr Abstand zwischen Uhrzeit und ×-Button */
/* × sitzt IN der Chatzeile (rechts, vertikal zentriert) */
.wpms-chatth-wrap .wpms-udrow-del{ position:absolute; right:12px; top:50%; transform:translateY(-50%); }
.wpms-chatth-av{ width:40px; height:40px; border-radius:50%; overflow:hidden; flex:none; background:var(--wpms-line); display:inline-flex; align-items:center; justify-content:center; font-size:15px; font-weight:600; color:var(--wpms-muted); }
.wpms-chatth-av img{ width:100%; height:100%; object-fit:cover; display:block; }
.wpms-chatth-av-all{ color:var(--wpms-teal); background:rgba(31,189,176,.12); }
/* Online-Punkt (grün/rot) an Chat-Avataren */
.wpms-chatth-av, .wpms-chatdraw-av{ position:relative; overflow:visible; }
.wpms-chatth-av img, .wpms-chatdraw-av img{ border-radius:50%; }
.wpms-avdot{ position:absolute; right:-1px; bottom:-1px; width:10px; height:10px; border-radius:50%; border:2px solid var(--wpms-card); }
.wpms-avdot.is-on{ background:#00635E; }
.wpms-avdot.is-off{ background:#e0483e; }
.wpms-chatth-tx{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.wpms-chatth-n{ font-weight:600; font-size:14px; }
.wpms-chatth-p{ color:var(--wpms-muted); font-size:12.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-chatth-t{ flex:none; color:var(--wpms-muted); font-size:11.5px; align-self:flex-start; margin-top:2px; font-variant-numeric:tabular-nums; }
.wpms-chatth-head{ display:flex; align-items:center; gap:12px; margin:8px 0 14px; }
.wpms-chatth-head h1{ margin:0; font-size:20px; }
.wpms-chatth-headtx{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.wpms-chatth-members{ font-size:12.5px; color:var(--wpms-muted); } /* Gruppenmitglieder unter dem Gruppennamen */
.wpms-chat-wrap.is-dm .wpms-chat{ width:100%; }
.wpms-topchat:hover{ color:var(--wpms-teal); border-color:var(--wpms-teal); }
.wpms-chatdraw{ display:flex; flex-direction:column; gap:12px; height:100%; }
.wpms-chatdraw h2{ margin:0; font-size:17px; }
.wpms-chatdraw-filter{ box-sizing:border-box; width:100%; padding:10px 12px; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-input); color:var(--wpms-text); font:inherit; font-size:16px; }
.wpms-chatdraw-filter:focus{ outline:none; border-color:var(--wpms-teal); }
.wpms-chatdraw-list{ flex:0 1 auto; min-height:0; max-height:32vh; overflow-y:auto; display:flex; flex-direction:column; gap:6px; padding-right:2px; }
.wpms-chatdraw-emp{ display:flex; align-items:center; gap:10px; text-align:left; background:var(--wpms-input); border:1px solid var(--wpms-line); border-radius:9px; padding:8px 12px; color:var(--wpms-text); font:inherit; font-size:13.5px; cursor:pointer; }
.wpms-chatdraw-av{ width:28px; height:28px; border-radius:50%; overflow:hidden; flex:none; background:var(--wpms-line); display:inline-flex; align-items:center; justify-content:center; font-size:12px; font-weight:600; color:var(--wpms-muted); }
.wpms-chatdraw-av img{ width:100%; height:100%; object-fit:cover; display:block; }
.wpms-chatdraw-av-all{ color:var(--wpms-teal); background:rgba(31,189,176,.12); }
.wpms-chatdraw-emp:hover{ border-color:var(--wpms-teal); }
.wpms-chatdraw-emp.is-active{ border-color:var(--wpms-teal); color:var(--wpms-teal); background:rgba(31,189,176,.1); font-weight:600; }
.wpms-chatdraw-all{ font-weight:600; }
.wpms-chatdraw-text{ box-sizing:border-box; width:100%; resize:none; min-height:96px; max-height:120px; overflow-y:auto; flex:none; padding:10px 12px; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-input); color:var(--wpms-text); font:inherit; font-size:16px; line-height:1.35; }
.wpms-chatdraw-text:focus{ outline:none; border-color:var(--wpms-teal); }
.wpms-chatdraw-hist{ flex:1 1 auto; min-height:140px; overflow-y:auto; display:flex; flex-direction:column; gap:10px; padding:4px 2px; }
.wpms-chatdraw-row{ display:flex; align-items:center; gap:10px; }
.wpms-chatdraw-row .wpms-chatdraw-send{ flex:1; }
/* Ausklappende Chat-Leiste links am Nachricht-Drawer */
/* volle Höhe, klappt optisch UNTER der Karte hervor (z-index hinter dem Panel + verzögertes Herausgleiten) */
.wpms-chatdraw-side{ position:absolute; top:0; bottom:0; right:100%; margin-right:0; width:230px; overflow-y:auto; background:var(--wpms-card); border:1px solid var(--wpms-line); border-right:0; border-radius:14px 0 0 14px; padding:16px 12px; box-shadow:-8px 0 34px rgba(0,0,0,.28); z-index:-1; transform:translateX(70px); opacity:0; transition:transform .3s cubic-bezier(.22,.61,.36,1) .12s, opacity .25s ease .12s; }
.wpms-mddrawer.is-open .wpms-chatdraw-side{ transform:none; opacity:1; }
/* Seitenleiste: einklappen (schmaler Streifen mit Pfeil bleibt sichtbar) + Zeilen-Löschen */
.wpms-chatdraw-side.is-collapsed{ transform:translateX(calc(100% - 42px)) !important; overflow:hidden; box-shadow:none; }
.wpms-chatdraw-side.is-collapsed h3, .wpms-chatdraw-side.is-collapsed .wpms-chatdraw-side-list, .wpms-chatdraw-side.is-collapsed .wpms-chatdraw-side-neu{ visibility:hidden; }
.wpms-chatdraw-side-head{ display:flex; align-items:center; gap:9px; margin:10px 0 12px; }
.wpms-chatdraw-side-tgl{ width:24px; height:24px; flex:none; border:1px solid var(--wpms-line); border-radius:7px; background:var(--wpms-card); color:var(--wpms-muted); font-size:14px; line-height:1; cursor:pointer; }
.wpms-chatdraw-side-tgl:hover{ color:var(--wpms-teal); border-color:var(--wpms-teal); }
.wpms-chatdraw-side-head h3{ margin:0; }
.wpms-chatdraw-side.is-collapsed .wpms-chatdraw-side-head h3{ visibility:hidden; }
.wpms-chatdraw-side-row{ position:relative; }
.wpms-chatdraw-side-row .wpms-chatdraw-side-it{ width:100%; padding-right:30px; }
.wpms-chatdraw-side-del{ position:absolute; right:8px; top:50%; transform:translateY(-50%); width:20px; height:20px; border:0; border-radius:6px; background:transparent; color:var(--wpms-muted); font-size:15px; line-height:1; cursor:pointer; }
.wpms-chatdraw-side-del:hover{ color:#e0483e; background:var(--wpms-line); }
/* Chat-Bilder: Blase, Vorschau vorm Senden */
.wpms-msg-img{ display:block; max-width:min(260px, 100%); max-height:260px; border-radius:10px; margin:4px 0 6px; cursor:pointer; }
.wpms-img-preview-host{ margin-bottom:8px; }
.wpms-img-preview{ position:relative; display:inline-block; }
.wpms-img-preview img{ display:block; max-width:120px; max-height:120px; border-radius:10px; border:1px solid var(--wpms-line); }
.wpms-img-preview button{ position:absolute; top:-8px; right:-8px; width:22px; height:22px; border-radius:50%; border:0; background:#e0483e; color:#fff; font-size:14px; line-height:1; cursor:pointer; }
.wpms-chatdraw-side h3{ margin:2px 4px 8px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--wpms-muted); }
.wpms-chatdraw-side-list{ display:flex; flex-direction:column; gap:6px; }
/* „+ Neuer Chat": Empfängerfeld leeren und alle Empfänger zur Auswahl anbieten */
.wpms-chatdraw-side-neu{ display:block; width:100%; margin:0 0 10px; padding:8px 10px; border:1px dashed var(--wpms-teal); border-radius:9px; background:transparent; color:var(--wpms-teal); font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
.wpms-chatdraw-side-neu:hover{ background:rgba(31,189,176,.12); }
.wpms-chatdraw-side-it{ position:relative; display:flex; align-items:center; gap:9px; width:100%; text-align:left; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:9px; padding:7px 10px; color:var(--wpms-text); font:inherit; font-size:13px; cursor:pointer; }
/* Ungelesen: roter Punkt rechts + fetteres Label */
.wpms-chatdraw-side-it.is-unread span:last-child{ font-weight:700; }
.wpms-chatdraw-side-unread{ position:absolute; right:10px; top:50%; transform:translateY(-50%); width:8px; height:8px; border-radius:50%; background:#c0392b; }
.wpms-chatdraw-side-row .wpms-chatdraw-side-it.is-unread .wpms-chatdraw-side-unread{ right:34px; }
.wpms-chatdraw-side-it:hover{ border-color:var(--wpms-teal); }
.wpms-chatdraw-side-it.is-active{ border-color:var(--wpms-teal); color:var(--wpms-teal); background:rgba(31,189,176,.1); font-weight:600; }
.wpms-chatdraw-side-it .wpms-chatth-av{ width:28px; height:28px; font-size:12px; }
.wpms-chatdraw-side-it span:last-child{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* Chat-Drawer: Kopfzeile mit Handy-Pfeil + Chats-Overlay */
.wpms-chatdraw-top{ display:flex; align-items:center; gap:10px; }
.wpms-chatdraw-mstgl{ display:none; width:36px; height:36px; align-items:center; justify-content:center; flex:none; border:1px solid var(--wpms-line); border-radius:9px; background:transparent; color:var(--wpms-muted); cursor:pointer; }
.wpms-chatdraw-mstgl:hover{ color:var(--wpms-text); }
.wpms-chatdraw-mobk{ display:none; }
@media (max-width:900px){
	/* Chats-Leiste als von links einschiebendes Overlay */
	.wpms-chatdraw-side{ display:block; position:fixed; left:0; top:0; bottom:0; right:auto; height:100%; width:min(320px,86vw); max-height:none; margin:0; border-radius:0 14px 14px 0; transform:translateX(-102%); transition:transform .28s cubic-bezier(.22,.61,.36,1); z-index:90; box-shadow:8px 0 34px rgba(0,0,0,.45); opacity:1; }
	.wpms-mddrawer.is-open .wpms-chatdraw-side{ transform:translateX(-102%); }
	.wpms-chatdraw-side.is-mobile-open, .wpms-mddrawer.is-open .wpms-chatdraw-side.is-mobile-open{ transform:none; }
	.wpms-chatdraw-side.is-collapsed{ transform:translateX(-102%); box-shadow:none; }
	.wpms-chatdraw-side-tgl{ display:none; }
	.wpms-chatdraw-mstgl{ display:inline-flex; }
	.wpms-chatdraw-mobk{ display:block; position:fixed; inset:0; background:rgba(0,0,0,.5); opacity:0; pointer-events:none; transition:opacity .25s; z-index:89; }
	.wpms-chatdraw-mobk.is-open{ opacity:1; pointer-events:auto; }
	/* Handy: Schreibfläche kompakt (1 Zeile, wächst per Autogrow mit) + etwas kleinere Buttons */
	.wpms-chatdraw-text{ min-height:44px; }
	.wpms-chatdraw-foto, .wpms-chatdraw-mic{ width:40px; height:40px; border-radius:20px; }
}
.wpms-chatdraw-send{ width:100%; }
@media (max-width:760px){ .wpms-topchat{ width:36px; height:36px; } }


.wpms-kunde-termine .wpms-kt-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 14px 6px; flex-wrap:wrap; }
.wpms-kunde-termine .wpms-kt-head h3{ margin:0; background:transparent; color:var(--wpms-muted); font-weight:600; font-size:13px; padding:0; }
.wpms-kt-tabs{ display:flex; gap:6px; }
.wpms-kt-tab{ border:1px solid var(--wpms-line); background:var(--wpms-input); color:var(--wpms-muted); border-radius:8px; padding:5px 11px; font:inherit; font-size:13px; cursor:pointer; }
.wpms-kt-tab.is-active{ border-color:var(--wpms-teal); color:var(--wpms-teal); background:rgba(31,189,176,.12); font-weight:600; }
.wpms-kt-list{ display:flex; flex-direction:column; gap:8px; padding:4px 14px 14px; }
.wpms-kunde-termine .wpms-empty{ padding:0; }
.wpms-kt-row{ position:relative; display:flex; flex-direction:column; gap:2px; align-items:flex-start; text-align:left; width:100%; background:var(--wpms-input); border:1px solid var(--wpms-line); border-radius:10px; padding:10px 90px 10px 12px; cursor:pointer; color:var(--wpms-text); animation:wpms-card-in .45s cubic-bezier(.22,.61,.36,1) both; }
@media (prefers-reduced-motion: reduce){ .wpms-kt-row{ animation:none; } }
.wpms-kt-row:hover{ border-color:var(--wpms-teal); }
.wpms-kt-d{ font-size:12px; color:var(--wpms-muted); }
.wpms-kt-t{ font-weight:600; }
.wpms-kt-ma{ font-size:12px; color:var(--wpms-muted); }
.wpms-kt-row .wpms-status{ position:absolute; top:50%; right:12px; transform:translateY(-50%); }

/* ---- Rechnungen + Umsatzdiagramm (Kunden-Detail / Panel) ---- */
.wpms-kunde-rechnungen .wpms-krech-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 14px 6px; }
.wpms-kunde-rechnungen .wpms-krech-head h3{ margin:0; background:transparent; color:var(--wpms-muted); font-weight:600; font-size:13px; padding:0; display:flex; align-items:center; gap:8px; }
.wpms-krech-body{ padding:4px 14px 14px; }
.wpms-krech-body > .wpms-empty{ padding:0 0 8px; }
/* Diagramm-Kachel (Zeitraum-Umschalter + Balken) – eigene Kachel oben. */
.wpms-krech-chartcard{ background:var(--wpms-hover); border:1px solid var(--wpms-line); border-radius:12px; padding:12px; margin-bottom:12px; }
.wpms-krech-chartcard .wpms-krech-chart{ margin-bottom:0; }
/* Zeitraum-Filter minimalistisch wie ein Aktien-Chart: nur Text, aktiv = Akzentfarbe (ohne Unterstrich). */
.wpms-krech-tabs{ display:flex; gap:4px; margin-bottom:10px; justify-content:flex-end; flex-wrap:wrap; }
.wpms-krech-tab{ border:0; background:none; color:var(--wpms-muted); border-radius:0; padding:2px 7px; font:inherit; font-size:12px; font-weight:600; cursor:pointer; transition:color .15s ease; }
.wpms-krech-tab:hover{ color:var(--wpms-text); }
.wpms-krech-tab.is-active{ color:var(--wpms-teal); }
/* KPI-Kacheln (Umsatz / Offen / Anzahl) – IMMER gleich breit in EINER Zeile (kein 2+1-Umbruch). */
.wpms-krech-sum{ display:flex; gap:8px; margin-bottom:12px; }
.wpms-kpi{ flex:1 1 0; min-width:0; display:flex; flex-direction:column; gap:2px; background:var(--wpms-hover); border:1px solid var(--wpms-line); border-radius:10px; padding:9px 11px; }
.wpms-kpi-l{ font-size:11px; color:var(--wpms-muted); text-transform:uppercase; letter-spacing:.02em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-kpi-v{ font-size:16px; font-weight:700; color:var(--wpms-text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-kpi-v small{ font-size:11px; font-weight:400; color:var(--wpms-muted); }
/* KPI-Wert: kompakte Handy-Variante ist standardmäßig aus (Desktop zeigt vollen Betrag). */
.wpms-kv-mini{ display:none; }
/* Im schmalen Schnell-Panel kompakter, damit alle drei sauber nebeneinander passen. */
.wpms-kpanel-body .wpms-kpi{ padding:8px 9px; }
.wpms-kpanel-body .wpms-kpi-v{ font-size:14px; }
.wpms-kpanel-body .wpms-kpi-l{ font-size:10px; }
.wpms-kpi-open .wpms-kpi-v{ color:#c9861f; }
/* Dark Mode: „Offen"-Kennzahl in Weiß (nicht Orange). */
body.wpms-theme-dark .wpms-kpi-open .wpms-kpi-v{ color:var(--wpms-text); }
/* Handy: KPI-Werte kompakt (voller Betrag würde abgeschnitten), Labels dürfen umbrechen. */
@media (max-width:760px){
	.wpms-kv-full{ display:none; }
	.wpms-kv-mini{ display:inline; }
	.wpms-krech-sum .wpms-kpi{ padding:8px 9px; }
	.wpms-krech-sum .wpms-kpi-l{ font-size:10px; white-space:normal; }
	.wpms-krech-sum .wpms-kpi-v{ font-size:15px; }
}

/* ---- Kombinierte Kunden-Karte: Umschalter Rechnungen | Termine ---- */
/* Aufbau in EINER Karte: OBEN-Slot (Diagramm + KPIs) → Umschalter-Leiste → UNTEN-Slot (Liste).
   Der Umschalter sitzt damit UNTER den KPI-Kacheln. */
.wpms-kunde-analyse .wpms-kdc-body{ padding:14px; }
.wpms-kdc-bar{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
/* Rechnungen/Einsätze als saubere Segment-Control (ein Rahmen, aktiver Teil gefüllt). */
.wpms-kdc-seg{ display:inline-flex; background:var(--wpms-input); border:1px solid var(--wpms-line); border-radius:9px; padding:3px; }
.wpms-kdc-segbtn{ border:0; background:none; color:var(--wpms-muted); border-radius:6px; padding:6px 16px; font:inherit; font-size:14px; font-weight:600; cursor:pointer; transition:background .15s ease, color .15s ease; }
.wpms-kdc-segbtn:hover{ color:var(--wpms-text); }
.wpms-kdc-segbtn.is-active{ background:rgba(31,189,176,.16); color:var(--wpms-teal); }
/* Kommende/Vergangene minimal (Text + Unterstrich, wie die Diagramm-Filter) – klare Hierarchie zur Segment-Control. */
.wpms-kt-subtabs{ display:flex; gap:6px; padding:4px 14px 0; }
.wpms-kunde-analyse .wpms-kt-subtabs{ gap:16px; padding:2px 2px 10px; }
.wpms-kunde-analyse .wpms-kt-tab{ border:0; background:none; color:var(--wpms-muted); border-bottom:2px solid transparent; border-radius:0; padding:2px 1px; font-size:13px; font-weight:600; }
.wpms-kunde-analyse .wpms-kt-tab:hover{ color:var(--wpms-text); }
.wpms-kunde-analyse .wpms-kt-tab.is-active{ color:var(--wpms-teal); border-bottom-color:var(--wpms-teal); background:none; }
.wpms-kunde-analyse .wpms-kt-list{ padding:0; }
.wpms-kunde-analyse .wpms-empty{ padding:0; }
/* Balkendiagramm: Body scrollt nie mit. */
.wpms-krech-chart{ overflow:hidden; margin-bottom:12px; }
.wpms-uchart{ display:flex; align-items:flex-end; gap:8px; height:132px; min-width:min-content; padding-top:4px; }
.wpms-uchart .wpms-ubar{ display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:4px; flex:0 0 auto; width:34px; height:100%; } /* HTML-Flex-Balken (Kunden-Umsatz); gescoped, damit height:100% NICHT auf SVG-<rect>.wpms-ubar leakt */
.wpms-ubar-val{ font-size:10px; color:var(--wpms-muted); white-space:nowrap; }
/* Umsatz-Diagramm im Kunden-Detail: höher, lesbare Beträge, Balken FÜLLEN die Breite (nie abgeschnitten). */
.wpms-krech-chart .wpms-uchart{ height:184px; padding-top:6px; min-width:0; gap:8px; justify-content:center; }
.wpms-krech-chart .wpms-ubar{ flex:1 1 0; min-width:0; width:auto; max-width:140px; gap:6px; }
.wpms-krech-chart .wpms-ubar-val{ font-size:13px; font-weight:700; color:var(--wpms-text); white-space:nowrap; }
.wpms-krech-chart .wpms-ubar-lbl{ font-size:11px; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
/* Viele Balken (Tage/12 Monate): Beschriftung kleiner + engerer Abstand, damit nichts überlappt/abgeschnitten wird. */
.wpms-krech-chart .wpms-uchart.is-dense{ gap:4px; }
.wpms-krech-chart .wpms-uchart.is-dense .wpms-ubar-val{ font-size:10px; }
.wpms-krech-chart .wpms-uchart.is-dense .wpms-ubar-lbl{ font-size:9px; }
.wpms-ubar-track{ display:flex; align-items:flex-end; width:100%; flex:1 1 auto; min-height:0; }
.wpms-ubar-fill{ display:block; width:100%; min-height:2px; border-radius:5px 5px 2px 2px; background:linear-gradient(180deg, var(--wpms-teal2), #00423e); transition:height .5s cubic-bezier(.22,.61,.36,1); }
@media (prefers-reduced-motion: reduce){ .wpms-ubar-fill{ transition:none; } }
.wpms-ubar-lbl{ font-size:10px; color:var(--wpms-muted); white-space:nowrap; }
.wpms-krech-list{ display:flex; flex-direction:column; gap:1px; background:var(--wpms-line); border:1px solid var(--wpms-line); border-radius:10px; overflow:hidden; }
/* Feste Spalten (Grid) → Status-Pillen und Beträge stehen sauber vertikal untereinander. */
.wpms-krech-row{ display:grid; grid-template-columns:84px minmax(0,1fr) 82px 96px 16px; align-items:center; gap:8px; width:100%; background:var(--wpms-card); border:0; padding:10px 12px; text-align:left; font:inherit; text-decoration:none; color:var(--wpms-text); cursor:pointer; animation:wpms-card-in .45s cubic-bezier(.22,.61,.36,1) both; }
@media (prefers-reduced-motion: reduce){ .wpms-krech-row{ animation:none; } }
.wpms-krech-row:hover{ background:var(--wpms-hover); }
.wpms-krech-row:hover .wpms-krech-eye{ color:var(--wpms-teal); opacity:1; }
.wpms-krech-nr{ font-weight:600; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-krech-dt{ font-size:12px; color:var(--wpms-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-krech-row .wpms-status{ justify-self:start; }
.wpms-krech-amt{ font-weight:600; font-size:13px; text-align:right; white-space:nowrap; }
.wpms-krech-eye{ display:flex; align-items:center; justify-content:center; color:var(--wpms-muted); opacity:.55; }
/* Schmaler Kontext (Schnell-Panel + schmale Viewports): Nr+Datum gestapelt (spart Breite),
   Status-Pille und Betrag trotzdem sauber untereinander ausgerichtet, kein Auge. */
.wpms-kpanel-body .wpms-krech-row{ grid-template-columns:minmax(0,1fr) 82px 90px; grid-template-areas:"nr status amt" "dt status amt"; column-gap:8px; row-gap:0; }
.wpms-kpanel-body .wpms-krech-nr{ grid-area:nr; }
.wpms-kpanel-body .wpms-krech-dt{ grid-area:dt; }
.wpms-kpanel-body .wpms-krech-row .wpms-status{ grid-area:status; align-self:center; }
.wpms-kpanel-body .wpms-krech-amt{ grid-area:amt; align-self:center; }
.wpms-kpanel-body .wpms-krech-eye{ display:none; }
@media (max-width:560px){
	.wpms-krech-row{ grid-template-columns:minmax(0,1fr) 82px 90px; grid-template-areas:"nr status amt" "dt status amt"; column-gap:8px; row-gap:0; }
	.wpms-krech-nr{ grid-area:nr; }
	.wpms-krech-dt{ grid-area:dt; }
	.wpms-krech-row .wpms-status{ grid-area:status; align-self:center; }
	.wpms-krech-amt{ grid-area:amt; align-self:center; }
	.wpms-krech-eye{ display:none; }
}
/* Rechnungs-Status-Farben (hell) */
.wpms-rst-paid{ background:rgba(0,99,94,.16); color:#00635E; }
.wpms-rst-open{ background:rgba(60,130,246,.16); color:#2f6fd0; }
.wpms-rst-overdue{ background:rgba(214,69,69,.16); color:#c23b3b; }
.wpms-rst-draft{ background:var(--wpms-hover); color:var(--wpms-muted); }
.wpms-rst-voided{ background:rgba(0,0,0,.06); color:var(--wpms-muted); text-decoration:line-through; }
body.wpms-theme-dark .wpms-rst-paid{ background:rgba(46,201,187,.20); color:#5fd3c4; }
body.wpms-theme-dark .wpms-rst-open{ background:rgba(60,130,246,.22); color:#7ab0ff; }
body.wpms-theme-dark .wpms-rst-overdue{ background:rgba(214,69,69,.24); color:#ff8a8a; }
body.wpms-theme-dark .wpms-rst-draft{ background:rgba(255,255,255,.08); color:var(--wpms-muted); }
body.wpms-theme-dark .wpms-rst-voided{ background:rgba(255,255,255,.06); color:var(--wpms-muted); }

.wpms-form{ display:grid; gap:14px; max-width:520px; }
/* Desktop: Vollseiten-Formulare (nicht die schmalen Drawer) nutzen die ganze Breite und
   ordnen die Felder mehrspaltig nebeneinander an → deutlich weniger Scrollen. */
@media (min-width:900px){
	.wpms-view .wpms-form{ max-width:none; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); column-gap:22px; align-items:start; }
	.wpms-view .wpms-form > .wpms-form-h,
	.wpms-view .wpms-form > .wpms-grid2,
	.wpms-view .wpms-form > .wpms-grid3,
	.wpms-view .wpms-form > .wpms-invite,
	.wpms-view .wpms-form > .wpms-soon,
	.wpms-view .wpms-form > .wpms-meta,
	.wpms-view .wpms-form > .wpms-err,
	.wpms-view .wpms-form > .wpms-set-actions,
	.wpms-view .wpms-form > .wpms-toggle,
	.wpms-view .wpms-form > .wpms-term-switches,
	.wpms-view .wpms-form > .wpms-mini-check,
	.wpms-view .wpms-form > .wpms-wdh,
	.wpms-view .wpms-form > .wpms-mspick,
	.wpms-view .wpms-form > #wpms-kat,
	.wpms-view .wpms-form > #wpms-an,
	.wpms-view .wpms-form > #wpms-termin-an,
	.wpms-view .wpms-form > #wpms-kunde-pick,
	.wpms-view .wpms-form > label:has(textarea),
	.wpms-view .wpms-form > textarea,
	.wpms-view .wpms-form > .wpms-span,
	.wpms-view .wpms-form > label:not(:has(input,select,textarea)){ grid-column:1 / -1; }
	.wpms-view .wpms-form > button{ grid-column:1 / -1; justify-self:start; }
}
.wpms-btn-row{ display:flex; flex-wrap:wrap; gap:12px; margin-top:14px; }
.wpms-invite{ display:grid; gap:6px; }
.wpms-invite .wpms-invite-btn{ justify-self:start; }
.wpms-form-row{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width:520px){ .wpms-form-row{ grid-template-columns:1fr; } }
/* Einsatz-Formular mit Zeit-Block-Panel rechts (nur Desktop). */
.wpms-projform{ display:flex; align-items:flex-start; gap:28px; }
.wpms-timepick{ position:sticky; top:84px; flex:0 0 300px; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:12px; padding:14px; }
.wpms-timepick-h{ font-size:13px; font-weight:700; color:var(--wpms-muted); text-transform:uppercase; letter-spacing:.03em; margin-bottom:10px; }
.wpms-timepick-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:6px; max-height:60vh; overflow:auto; }
.wpms-timepick-b{ font:inherit; font-size:13px; padding:7px 0; border:1px solid var(--wpms-line); border-radius:8px; background:var(--wpms-input); color:var(--wpms-text); cursor:pointer; transition:background .12s, border-color .12s, color .12s; }
.wpms-timepick-b:hover{ border-color:var(--wpms-teal2); color:var(--wpms-teal2); }
.wpms-timepick-b.is-active{ background:var(--wpms-teal2); border-color:var(--wpms-teal2); color:#fff; }
.wpms-form-h{ margin:8px 0 -2px; font-size:13px; font-weight:700; color:var(--wpms-muted); text-transform:uppercase; letter-spacing:.03em; border-top:1px solid var(--wpms-line); padding-top:14px; }
.wpms-form label{ display:grid; gap:5px; font-size:14px; color:var(--wpms-muted); }
.wpms-form input,.wpms-form textarea,.wpms-form select{ font:inherit; line-height:1.4; padding:10px 12px; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-input); color:var(--wpms-text); width:100%; min-width:0; box-sizing:border-box; }
/* Formulare: einheitlicher Grauton für Platzhalter, leere Datumsfelder und das Art-Dropdown */
.wpms-form input::placeholder,.wpms-form textarea::placeholder,.wpms-ss-input::placeholder{ color:var(--wpms-muted); opacity:1; }
.wpms-fehlen-form select[name="typ"],.wpms-fehlen-form input[type="date"]{ color:var(--wpms-muted); }
.wpms-form select{ appearance:none; -webkit-appearance:none; padding-right:36px; cursor:pointer; background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa1a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat:no-repeat; background-position:right 12px center; }
.wpms-form input:focus,.wpms-form textarea:focus,.wpms-form select:focus{ outline:none; border-color:var(--wpms-teal2); }
/* iOS zoomt bei Fokus rein, wenn font-size < 16px → überall mind. 16px.
   Drawer liegt außerhalb von #wpms-app (an document.body), daher explizit mitnehmen. */
#wpms-app input, #wpms-app textarea, #wpms-app select,
.wpms-drawer-body input, .wpms-drawer-body textarea, .wpms-drawer-body select{ font-size:16px; }
.wpms-form input[type=time]{ max-width:240px; }
/* Alle einzeiligen Felder exakt gleich hoch (Text, Datum, Zeit, Zahl, Auswahl) – iOS rendert
   Datumsfelder sonst niedriger als Textfelder. Checkboxen/Radios ausgenommen. */
.wpms-form input:not([type=checkbox]):not([type=radio]), .wpms-form select{ height:46px; min-height:46px; box-sizing:border-box; }
/* Datum/Uhrzeit-Felder exakt wie Textfelder: gleiche Höhe/Breite, Wert linksbündig (iOS-Eigenheiten neutralisieren).
   WICHTIG: Drawer (openDrawer) hängt an document.body → NICHT unter #wpms-app. Sonst greift appearance:none dort
   nicht und iOS zeigt das native, höhere+breitere Steuerelement, das width/height ignoriert. Darum .wpms-drawer-body mit. */
#wpms-app input[type=date], #wpms-app input[type=time],
.wpms-drawer-body input[type=date], .wpms-drawer-body input[type=time]{ -webkit-appearance:none; appearance:none; text-align:left; height:46px; min-height:46px; line-height:1.4; width:100%; max-width:100%; min-width:0; box-sizing:border-box; }
#wpms-app input[type=date]::-webkit-date-and-time-value,
#wpms-app input[type=time]::-webkit-date-and-time-value,
.wpms-drawer-body input[type=date]::-webkit-date-and-time-value,
.wpms-drawer-body input[type=time]::-webkit-date-and-time-value{ text-align:left; margin:0; }
#wpms-app input[type=date]::-webkit-datetime-edit,
#wpms-app input[type=time]::-webkit-datetime-edit,
.wpms-drawer-body input[type=date]::-webkit-datetime-edit,
.wpms-drawer-body input[type=time]::-webkit-datetime-edit{ text-align:left; padding:0; }
.wpms-grid2 > *, .wpms-grid3 > *{ min-width:0; }
.wpms-err{ color:#c0392b; font-size:14px; min-height:1em; }
.wpms-checklist{ display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:8px; }
.wpms-check{ display:flex; align-items:center; gap:9px; padding:10px 12px; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-input); cursor:pointer; font-size:14px; color:var(--wpms-text); }
/* In Formularen setzt `.wpms-form label{display:grid}` sonst die Checkbox ÜBER den Text (höhere Spezifität). Wieder nebeneinander erzwingen (Checkbox links). */
.wpms-form label.wpms-check{ display:flex; align-items:center; gap:9px; }
.wpms-check input{ width:auto !important; min-width:0; flex:0 0 auto; accent-color:var(--wpms-teal2); }
.wpms-check:has(input:checked){ border-color:var(--wpms-teal2); background:rgba(31,189,176,.1); }
/* Vertragsformular: „Befristet"-Kachel exakt so hoch wie die Eingabefelder (46px inkl. Padding/Border via border-box) und unten am Grid-Item ausgerichtet → gleiche Zeile. */
.wpms-vform .wpms-check{ align-self:end; height:46px; box-sizing:border-box; }
/* Submit im Feld-Format: eine Rasterzelle, 46px hoch, eckig wie die Eingabefelder, unten-bündig. */
.wpms-view .wpms-vform button[type=submit]{ grid-column:auto; justify-self:stretch; align-self:end; height:46px; box-sizing:border-box; border-radius:10px; padding:0 18px; display:flex; align-items:center; justify-content:center; }

/* Toggle-Schalter (z. B. „Für Bewerbungen öffnen") */
.wpms-toggle{ display:flex; align-items:center; gap:14px; width:100%; box-sizing:border-box; padding:14px 16px; border:1px solid var(--wpms-line); border-radius:12px; background:var(--wpms-input); cursor:pointer; }
.wpms-toggle:has(input:checked){ border-color:var(--wpms-teal2); background:rgba(31,189,176,.08); }
.wpms-toggle input{ position:absolute !important; opacity:0; width:1px !important; height:1px; min-width:0; margin:0; pointer-events:none; }
.wpms-toggle-track{ position:relative; flex:0 0 auto; width:48px; height:28px; border-radius:999px; background:rgba(130,130,130,.4); transition:background .2s ease; }
.wpms-toggle-thumb{ position:absolute; top:3px; left:3px; width:22px; height:22px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.35); transition:transform .2s ease; }
.wpms-toggle input:checked + .wpms-toggle-track{ background:var(--wpms-teal2); }
.wpms-toggle input:checked + .wpms-toggle-track .wpms-toggle-thumb{ transform:translateX(20px); }
.wpms-toggle input:focus-visible + .wpms-toggle-track{ outline:2px solid var(--wpms-teal2); outline-offset:2px; }
.wpms-toggle-label{ display:flex; flex-direction:column; gap:3px; font-size:14px; font-weight:600; color:var(--wpms-text); line-height:1.3; }
.wpms-toggle-label small{ font-weight:400; font-size:12px; color:var(--wpms-muted); }

/* Login-/Hinweis-Seite (ohne Rolle): volle App-Schrift + Branding, kein Theme-Footer. */
body.wpms-gate-page{ font-family:"DM Sans",system-ui,-apple-system,sans-serif; }
.wpms-login{ min-height:100vh; display:flex; align-items:flex-start; justify-content:center; padding:14vh 20px 32px; font-family:"DM Sans",system-ui,-apple-system,sans-serif; }
.wpms-gate-card{ background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:18px; box-shadow:0 8px 30px rgba(0,0,0,.06); padding:40px 32px; max-width:420px; width:100%; text-align:center; display:grid; gap:14px; justify-items:center; }
/* Schrift hart erzwingen, damit kein Theme-Style (z. B. monospace) die Karte überschreibt. */
.wpms-gate-card, .wpms-gate-card h2, .wpms-gate-card p, .wpms-login .wpms-btn{ font-family:"DM Sans",system-ui,-apple-system,sans-serif !important; }
.wpms-gate-logo{ height:72px; width:auto; margin-bottom:6px; }
.wpms-gate-card h2{ font-size:22px; font-weight:700; letter-spacing:-.01em; margin:0; color:var(--wpms-text); }
.wpms-gate-card p{ margin:0; color:var(--wpms-muted); line-height:1.55; font-size:15px; }
.wpms-gate-act{ margin-top:8px; }
.wpms-btn-ghost{ background:var(--wpms-card); color:var(--wpms-teal); border:1px solid var(--wpms-teal2); }
.wpms-btn-ghost:hover{ background:#f0fbfa; }
h2{ font-size:17px; margin:22px 0 8px; }

/* Listenzeile mit Aktionen (Kunden/Leistungen) */
.wpms-row{ display:flex; justify-content:space-between; align-items:center; gap:12px; cursor:default; }
.wpms-rowact{ display:flex; gap:8px; flex:0 0 auto; }
.wpms-mini{ font:inherit; font-size:13px; border:1px solid var(--wpms-line); background:var(--wpms-card); color:var(--wpms-text); border-radius:8px; padding:6px 12px; cursor:pointer; }
/* Haken am Formular-Button, wenn das Dokument bereits unterschrieben wurde. */
.wpms-mini.is-signed{ border-color:var(--wpms-teal2); }
.wpms-mini:hover{ border-color:var(--wpms-teal2); color:var(--wpms-teal); }
.wpms-mini-danger:hover{ border-color:#c0392b; background:#c0392b; color:#fff; }
.wpms-mini-ok{ border-color:var(--wpms-teal2); color:#fff; background:var(--wpms-teal2); }
.wpms-mini-ok:hover{ filter:brightness(1.12); color:#fff; }
/* Stunden-Tabelle: Aktionen + Inline-Bearbeiten */
/* Aktions-Spalte rechtsbündig: Bearbeiten/Löschen sitzen in JEDER Zeile an derselben
   Stelle (rechte Kante), der Klärung-Button kommt links davor dazu. */
.wpms-st-act{ white-space:nowrap; text-align:right; }
.wpms-st-act{ text-align:right; width:1%; }
.wpms-st-act .wpms-mini{ margin-left:0; min-width:118px; text-align:center; }
.wpms-sttable tr.is-editing td{ background:var(--wpms-hover); }
.wpms-st-edit{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; padding:6px 0; }
.wpms-st-edit input,.wpms-st-edit select{ font:inherit; font-size:14px; padding:7px 9px; border:1px solid var(--wpms-line); border-radius:8px; background:var(--wpms-input); color:var(--wpms-text); }
.wpms-st-edit input[type=number]{ width:90px; }
.wpms-st-edit input[type=date]{ width:150px; }
.wpms-st-edit input[type=text]{ flex:1; min-width:120px; }
.wpms-tag{ font-size:11px; font-weight:600; background:rgba(31,189,176,.15); color:var(--wpms-teal); padding:1px 8px; border-radius:8px; margin-left:6px; vertical-align:middle; }
/* Leistungs-Kachel: Name links, Lexoffice-Pille oben rechts, Buttons darunter */
.wpms-leist-head{ display:flex; align-items:flex-start; gap:8px; }
.wpms-leist-head strong{ min-width:0; }
.wpms-tag-tr{ margin-left:auto; margin-right:0; flex:0 0 auto; }
.wpms-leist-act{ margin-top:8px; }
/* Dubletten-Markierung (rot) */
.wpms-md-tag,.wpms-tag-dup{ font-size:11px; font-weight:700; background:rgba(192,57,43,.16); color:#c0392b; padding:1px 8px; border-radius:8px; margin-left:6px; vertical-align:middle; }
body.wpms-theme-dark .wpms-md-tag,body.wpms-theme-dark .wpms-tag-dup{ color:#ff6b6b; background:rgba(255,107,107,.18); }
.wpms-md-item.has-tag{ border-color:rgba(192,57,43,.6); }
.wpms-dup-hint{ background:rgba(224,138,30,.1); border:1px solid rgba(224,138,30,.32); color:#c07b1a; border-radius:10px; padding:8px 12px; margin:0 0 12px; font-size:13px; }
body.wpms-theme-dark .wpms-dup-hint{ color:#e6a54a; }
/* „Klärung erforderlich" – rot blinkend */
@keyframes wpms-blink{ 0%,100%{ opacity:1; } 50%{ opacity:.2; } }
@keyframes wpms-blink-outline{ 0%,100%{ box-shadow:0 0 0 2px rgba(192,57,43,.95); } 50%{ box-shadow:0 0 0 2px rgba(192,57,43,0); } }
.wpms-card-klaerung{ border-color:#c0392b !important; animation:wpms-blink-outline 1.1s ease-in-out infinite; }
/* Beim Einblenden (wpms-anim) sonst überschreibt die Einblend-Animation den Blink → beide gleichzeitig laufen lassen. */
.wpms-list.wpms-anim .wpms-card.wpms-card-klaerung{ animation:wpms-card-in .5s cubic-bezier(.22,.61,.36,1) both, wpms-blink-outline 1.1s ease-in-out infinite; }
.wpms-status.wpms-klaerung-tag{ background:rgba(192,57,43,.16); color:#c0392b; }
.wpms-status.wpms-serie-tag{ background:rgba(31,189,176,.15); color:var(--wpms-teal); }
/* Einsatz hat bereits einen Rechnungsentwurf in Lexoffice. */
.wpms-status.wpms-re-tag{ background:rgba(90,140,255,.16); color:#4a72d8; }
body.wpms-theme-dark .wpms-status.wpms-re-tag{ background:rgba(122,160,255,.2); color:#9db9ff; }
/* Sammelrechnung: Einsätze, die zusammen berechnet wurden (gleiche Rechnung an 2+ Einsätzen). */
.wpms-status.wpms-sammel-tag{ background:rgba(232,161,60,.16); color:#c98a3a; }
body.wpms-theme-dark .wpms-status.wpms-sammel-tag{ background:rgba(232,161,60,.22); color:#e0a85e; }
.wpms-erow.wpms-erow-sammel:not(.is-klaerung){ box-shadow:inset 3px 0 0 var(--wpms-sammel-col,#e8a13c); }
/* €-Marker in Wochen-/Monatskacheln: Einsatz hat einen Rechnungsentwurf. */
.wpms-wev-re{ position:absolute; top:5px; right:5px; display:inline-flex; align-items:center; justify-content:center; width:17px; height:17px; border-radius:5px; font-size:11px; font-weight:700; background:rgba(90,140,255,.2); color:#4a72d8; }
body.wpms-theme-dark .wpms-wev-re{ background:rgba(122,160,255,.24); color:#9db9ff; }
.wpms-ev-re{ display:inline-flex; align-items:center; justify-content:center; width:15px; height:15px; border-radius:4px; font-size:10px; font-weight:700; background:rgba(90,140,255,.2); color:#4a72d8; vertical-align:middle; }
body.wpms-theme-dark .wpms-ev-re{ background:rgba(122,160,255,.24); color:#9db9ff; }
/* „OB" (Ohne Berechnung) – kleiner Badge, so groß wie das €-Zeichen. */
.wpms-ob-tag{ display:inline-flex; align-items:center; justify-content:center; min-height:17px; padding:0 5px; border-radius:5px; font-size:10px; font-weight:700; letter-spacing:.3px; background:rgba(200,120,60,.18); color:#b7791f; vertical-align:middle; }
body.wpms-theme-dark .wpms-ob-tag{ background:rgba(220,150,90,.22); color:#e0a45f; }
/* Termin (Kalendereintrag statt Einsatz) – klar abgesetzte violette Kennzeichnung. */
.wpms-status.wpms-termin-tag{ background:rgba(124,92,255,.16); color:#5b3ecc; margin-right:4px; }
body.wpms-theme-dark .wpms-status.wpms-termin-tag{ background:rgba(124,92,255,.24); color:#c3b4ff; }
.wpms-field-hint{ display:block; font-size:12px; font-weight:400; color:var(--wpms-muted); margin-top:2px; }
/* Termin-Kennzeichnung in der Wochenkachel: kleines Label + gestrichelter linker Rand. */
.wpms-wev.wpms-is-termin{ border-left-style:dashed; }
.wpms-wev-termin{ align-self:flex-start; font-size:9px; font-weight:700; letter-spacing:.4px; text-transform:uppercase; padding:1px 6px; border-radius:999px; background:rgba(124,92,255,.22); color:#5b3ecc; margin-bottom:1px; }
body.wpms-theme-dark .wpms-wev-termin{ background:rgba(124,92,255,.28); color:#c3b4ff; }
.wpms-wdh{ display:grid; gap:12px; padding:14px; border:1px solid var(--wpms-line); border-radius:12px; background:var(--wpms-hover); margin-top:-4px; }
body.wpms-theme-dark .wpms-status.wpms-klaerung-tag{ color:#ff6b6b; background:rgba(255,107,107,.18); }
.wpms-blink{ animation:wpms-blink 1s steps(1,end) infinite; }
.wpms-menurow-klaerung .wpms-menurow-l{ color:#c0392b; font-weight:400; }
.wpms-menurow-klaerung .wpms-menurow-v{ color:#c0392b; font-weight:400; }
body.wpms-theme-dark .wpms-menurow-klaerung .wpms-menurow-l,body.wpms-theme-dark .wpms-menurow-klaerung .wpms-menurow-v{ color:#ff6b6b; }
/* Nur die Leitungs-Zeile blinkt (ganze Zeile) – auch bei „Bewegung reduzieren". Mitarbeiter: nur rot. */
.wpms-blink-row{ animation:wpms-blink 1.2s ease-in-out infinite; }
.wpms-blink-row .wpms-blink{ animation:none; }
.wpms-menurow-v.is-red{ color:#c0392b; background:rgba(192,57,43,.14); }
.wpms-menurow-v.is-green{ color:var(--wpms-teal); background:rgba(31,189,176,.14); }
body.wpms-theme-dark .wpms-menurow-v.is-red{ color:#ff6b6b; background:rgba(231,76,60,.2); }
body.wpms-theme-dark .wpms-menurow-v.is-green{ color:var(--wpms-teal); background:rgba(31,189,176,.16); }
.wpms-menurow-l-green{ color:#00635E; }
body.wpms-theme-dark .wpms-menurow-l-green{ color:#00635E; }
body.wpms-theme-dark .wpms-menurow-klaerung .wpms-menurow-l,body.wpms-theme-dark .wpms-menurow-klaerung .wpms-menurow-v{ color:#ff6b6b; }
.wpms-klaerung-box{ border:1px solid #c0392b; border-radius:12px; padding:14px 16px; background:rgba(192,57,43,.07); }
.wpms-klaerung-box h2{ color:#c0392b; margin:0 0 6px; }
body.wpms-theme-dark .wpms-klaerung-box h2{ color:#ff6b6b; }
.wpms-klaerung-list{ margin:6px 0; padding-left:18px; }
/* Klärungstexte auf normale Inhaltsgröße (wie Einsatzdaten-Werte), nicht überdimensioniert. */
.wpms-klaerung-box p:not(.wpms-meta){ font-size:15px; margin:6px 0; }
.wpms-klaerung-list li{ font-size:15px; line-height:1.45; }
.wpms-klaerung-row{ border-top:1px solid rgba(192,57,43,.22); padding:14px 0 6px; }
.wpms-klaerung-row:first-of-type{ border-top:0; padding-top:6px; }
.wpms-klaerung-head{ font-size:15px; margin-bottom:10px; display:flex; flex-wrap:wrap; align-items:baseline; gap:10px; }
.wpms-klaerung-sub{ color:var(--wpms-muted); font-size:14px; }
.wpms-klaerung-act{ display:flex; flex-wrap:wrap; align-items:stretch; gap:10px; }
.wpms-klaerung-corr{ display:flex; align-items:stretch; gap:10px; }
.wpms-klaerung-field{ display:flex; align-items:center; gap:6px; padding:0 12px; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-input); color:var(--wpms-muted); font-size:14px; }
.wpms-klaerung-inp{ width:52px; font:inherit; font-size:14px; border:0; background:transparent; color:var(--wpms-text); padding:0; text-align:right; }
.wpms-klaerung-inp:focus{ outline:none; }
.wpms-klaerung-field:focus-within{ border-color:var(--wpms-teal2); }
.wpms-klaerung-act .wpms-mini{ padding:9px 14px; border-radius:10px; }
.wpms-klaerung-act .wpms-meta{ margin:0; align-self:center; }
@media (max-width:760px){ .wpms-klaerung-corr{ width:100%; } .wpms-klaerung-corr .wpms-mini{ flex:1; } .wpms-klaerung-act > .wpms-mini{ width:100%; } }
@media (prefers-reduced-motion: reduce){ .wpms-card-klaerung{ animation:none; } }

.wpms-grid2{ display:grid; grid-template-columns:1fr 2fr; gap:14px; }
/* Erinnerungen-Zeile (Kunden-Formular): Kanal · Vorlauf · Reaktivierung · Widerspruch.
   Breiter Desktop: EINE Zeile, alle Felder unten bündig (align-items:end) und gleich
   hoch (Widerspruch-Box = 46px wie die Eingabefelder), auch wenn ein Label 2-zeilig
   umbricht. Schmaler: Felder fließen wie normale Formularfelder (display:contents). */
.wpms-remind-row{ display:grid; gap:14px; }
@media (min-width:900px) and (max-width:1099px){ .wpms-view .wpms-form > .wpms-remind-row{ display:contents; } }
@media (min-width:1100px){
	.wpms-view .wpms-form > .wpms-remind-row{ grid-column:1 / -1; grid-template-columns:1fr 1fr 1fr 1.5fr; column-gap:22px; align-items:end; }
	.wpms-view .wpms-form > .wpms-remind-row .wpms-check{ height:46px; box-sizing:border-box; white-space:nowrap; }
}
/* Anschrift-Zeile (Kunden-Formular): Straße · [Hausnummer + PLZ] · Ort.
   Auf dem breiten Desktop löst sich der Container per display:contents auf – dadurch
   werden Straße, das Hausnummer/PLZ-Paar und Ort zu normalen Formularfeldern und sitzen
   spaltenbündig unter der Zeile darüber. Das Paar teilt sich EINE Spalte hälftig, ist
   zusammen also genau so breit wie z. B. „Abrechnungsstelle" darüber.
   Schmalere Breiten: alles gestapelt, nur Hausnummer/PLZ bleiben nebeneinander. */
.wpms-grid-adr{ display:grid; gap:14px; }
.wpms-adr-nr{ display:grid; grid-template-columns:1fr 1fr; gap:14px; align-items:end; }
.wpms-adr-nr > label{ min-width:0; }
@media (min-width:900px){
	.wpms-view .wpms-form > .wpms-grid-adr{ display:contents; }
}
/* Gleich breite Spalten (z. B. Uhrzeit Von/Bis), zusammen so breit wie ein volles Feld. */
.wpms-grid-eq{ grid-template-columns:1fr 1fr; }
.wpms-grid-eq input[type=time]{ max-width:none; width:100%; }
.wpms-card-block{ background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:14px; padding:20px 22px; max-width:560px; }
.wpms-card-block + .wpms-card-block{ margin-top:20px; }
.wpms-card-block hr{ border:0; border-top:1px solid var(--wpms-line); margin:22px 0; }
/* Einstellungen: zwei feste Flex-Spalten. Jede Spalte stapelt ihre Karten dicht
   (kein Reihen-Höhen-Zwang wie bei CSS-Grid → keine Lücke zwischen kurzen Karten),
   und beide Spalten fluchten oben bündig (align-items:flex-start). */
.wpms-settings-grid{ display:flex; gap:20px; align-items:flex-start; }
.wpms-settings-col{ flex:1 1 0; min-width:0; display:flex; flex-direction:column; gap:20px; }
@media (max-width:899px){ .wpms-settings-grid{ flex-direction:column; } }
.wpms-settings-grid .wpms-card-block{ max-width:none; margin:0; }
.wpms-set-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.wpms-set-head h2{ margin:0; }
/* Kompakterer vertikaler Rhythmus in den Einstellungs-Karten (weniger Leerraum, v. a. E-Mail/Outlook). */
.wpms-settings-grid .wpms-card-block hr{ margin:14px 0; }
.wpms-settings-grid .wpms-card-block p{ margin:2px 0 8px; }
.wpms-settings-grid .wpms-card-block h2{ margin-top:4px; }
.wpms-settings-grid .wpms-card-block .wpms-set-head h2{ margin-top:0; }
.wpms-settings-grid .wpms-card-block > *:last-child{ margin-bottom:0; }
.wpms-set-edit{ flex:0 0 auto; color:var(--wpms-teal); border:1.5px solid var(--wpms-teal); border-radius:999px; background:transparent; padding:7px 10px; }
.wpms-set-edit:hover{ background:var(--wpms-teal2); color:#fff; }
/* Einheitlich breite Schaltflächen in den Einstellungen. */
.wpms-set-actions{ display:flex; flex-wrap:wrap; gap:10px; margin-top:6px; }
.wpms-set-actions .wpms-btn{ flex:0 0 auto; width:180px; max-width:100%; padding:8px 14px; font-size:14px; box-sizing:border-box; text-align:center; }
/* Meine-Daten-Formular: Speichern/Abbrechen immer nebeneinander (auch mobil). */
.wpms-form-2col .wpms-set-actions{ flex-wrap:nowrap; }
.wpms-form-2col .wpms-set-actions .wpms-btn{ flex:1 1 0; width:auto; min-width:0; }
/* Meine Daten: breiter + kompakte Info-Ansicht (2-spaltig), weniger Scrollen. */
.wpms-profil-card{ max-width:900px; }
.wpms-info-grid{ display:grid; grid-template-columns:1fr; gap:12px 28px; margin-top:6px; }
@media (min-width:700px){ .wpms-info-grid{ grid-template-columns:1fr 1fr; } }
.wpms-info-row{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.wpms-info-row .lbl{ font-size:12px; color:var(--wpms-muted); }
.wpms-info-row .val{ font-size:14px; color:var(--wpms-text); word-break:break-word; }
.wpms-info-h{ grid-column:1 / -1; font-size:13px; font-weight:700; color:var(--wpms-muted); text-transform:uppercase; letter-spacing:.03em; border-top:1px solid var(--wpms-line); padding-top:12px; margin-top:2px; }
.wpms-info-grid > .wpms-info-h:first-child{ border-top:0; padding-top:0; }
/* Bearbeiten-Formular 2-spaltig ab Desktop (Header/Gruppen/Buttons volle Breite). */
@media (min-width:700px){
	.wpms-form-2col{ grid-template-columns:1fr 1fr; }
	.wpms-form-2col > .wpms-form-h, .wpms-form-2col > .wpms-grid2, .wpms-form-2col > .wpms-set-actions, .wpms-form-2col > .wpms-err, .wpms-form-2col > .wpms-sig-card{ grid-column:1 / -1; }
}
/* „+ Neue Mitteilung" schlanker. */
#wpms-newmit{ padding:8px 16px; font-size:14px; }
.wpms-card.is-unread{ border-left:3px solid var(--wpms-teal2); }
.wpms-backlink{ color:var(--wpms-teal); text-decoration:none; }
@media (max-width:760px){ .wpms-row{ flex-direction:column; align-items:flex-start; } .wpms-grid2{ grid-template-columns:1fr; } }

/* Projekt-Detail: Arbeitsbereiche */
.wpms-sec{ background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:14px; padding:20px 22px; margin:0; }
.wpms-view > .wpms-sec + .wpms-sec{ margin-top:18px; }
.wpms-sec h2{ display:flex; align-items:center; gap:12px; margin:0 0 14px; font-size:17px; }
.wpms-sec .wpms-dl{ margin:0; }
.wpms-summe{ font-size:13px; font-weight:600; letter-spacing:normal; text-transform:none; color:var(--wpms-text); background:var(--wpms-input); border:1px solid var(--wpms-line); padding:2px 10px; border-radius:999px; }
.wpms-upload{ display:flex; align-items:center; gap:14px; margin-bottom:14px; flex-wrap:wrap; }
/* Kompakte Upload-Zeile: zwei kleine .wpms-mini-Buttons; „Unterschrift anfordern" als Toggle. */
.wpms-upload-mini{ gap:8px; flex-wrap:wrap; }
/* „Dokument hochladen" + „Unterschrift anfordern" in EINER Zeile, gleich breit. */
.wpms-upload-mini .wpms-mini{ flex:1 1 140px; text-align:center; }
.wpms-upload-mini .wpms-upmsg{ flex:1 1 100%; }
/* „Hochladen" = primärer Submit: eigene volle Zeile unter Auswählen/Unterschrift. */
.wpms-upload-mini .wpms-doc-send{ flex:1 1 100%; }
/* „Hochladen"-Button (teal) deaktiviert, solange keine Datei gewählt ist. */
.wpms-doc-send:disabled{ opacity:.45; cursor:default; }
.wpms-doc-send:disabled:hover{ filter:none; }
.wpms-doc-sig.is-on{ border-color:var(--wpms-teal2); background:var(--wpms-teal2); color:#fff; }
.wpms-doc-sig.is-on:hover{ filter:brightness(1.1); color:#fff; }

.wpms-fotoblock{ margin-bottom:18px; padding-bottom:18px; border-bottom:1px solid var(--wpms-line); }
.wpms-fotoblock h3{ margin:0 0 12px; font-size:14px; font-weight:600; color:var(--wpms-muted); }
.wpms-fotos{ display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:10px; }
.wpms-foto{ position:relative; aspect-ratio:1/1; border-radius:10px; overflow:hidden; border:1px solid var(--wpms-line); background:#eee; }
.wpms-foto img{ width:100%; height:100%; object-fit:cover; display:block; }
.wpms-foto-del{ position:absolute; top:4px; right:4px; width:24px; height:24px; border:0; border-radius:50%; background:rgba(0,0,0,.55); color:#fff; font-size:16px; line-height:1; cursor:pointer; }
.wpms-foto-del:hover{ background:#c0392b; }

.wpms-stdlist{ display:flex; flex-direction:column; gap:8px; margin-bottom:14px; }
.wpms-std{ display:flex; align-items:flex-start; gap:14px; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:12px; padding:14px 16px; }
.wpms-std-body{ flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; }
.wpms-std-leist{ color:var(--wpms-text); font-weight:700; font-size:15px; line-height:1.25; }
.wpms-std-meta{ color:var(--wpms-muted); font-size:13px; line-height:1.35; }
.wpms-std-d{ font-variant-numeric:tabular-nums; }
.wpms-std-ma{ color:var(--wpms-text); font-weight:600; }
.wpms-std-side{ flex:0 0 auto; display:flex; flex-direction:column; align-items:flex-end; gap:10px; }
.wpms-std-h{ background:var(--wpms-teal-bg,rgba(20,138,123,.14)); color:var(--wpms-teal); font-weight:700; font-size:13px; padding:4px 12px; border-radius:999px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.wpms-std-del{ opacity:.85; }
.wpms-std-n{ color:var(--wpms-muted); font-size:14px; flex:1; }
/* Stunden-Genehmigung: „wird geprüft" (amber) + Genehmigen-Buttons */
.wpms-st-pending{ display:inline-block; font-size:11px; font-weight:700; color:#c0392b; background:rgba(192,57,43,.14); padding:1px 7px; border-radius:7px; margin-left:6px; white-space:nowrap; }
body.wpms-theme-dark .wpms-st-pending{ color:#ff6b6b; background:rgba(255,107,107,.16); }
.wpms-st-klaerung{ display:inline-block; font-size:11px; font-weight:700; color:#c0392b; background:rgba(192,57,43,.18); padding:1px 7px; border-radius:7px; margin-left:6px; white-space:nowrap; }
body.wpms-theme-dark .wpms-st-klaerung{ color:#ff6b6b; background:rgba(255,107,107,.2); }
/* Bericht-/Notiz-Text kleiner darstellen (z. B. „Zusätzlich Rahmen"). */
.wpms-bericht-text{ font-size:14px; line-height:1.45; color:var(--wpms-text); }
.wpms-std.is-pending{ border-color:rgba(192,57,43,.55); }
.wpms-sttable tr.is-pending td{ opacity:.9; }
.wpms-appr{ display:flex; flex-wrap:wrap; gap:8px; margin:2px 0 12px; }
.wpms-appr-btn{ padding:8px 14px; font-size:14px; }
.wpms-pending-note{ background:rgba(192,57,43,.1); border:1px solid rgba(192,57,43,.3); color:#c0392b; border-radius:10px; padding:8px 12px; margin:0 0 12px; font-size:13px; }
body.wpms-theme-dark .wpms-pending-note{ color:#ff6b6b; }
.wpms-grid3{ display:grid; grid-template-columns:1fr 1fr 2fr; gap:12px; }
@media (max-width:760px){ .wpms-grid3{ grid-template-columns:1fr; } .wpms-std{ flex-wrap:wrap; } }

/* Menü-Editor */
.wpms-menued{ max-width:680px; }
.wpms-medlist{ display:flex; flex-direction:column; gap:10px; }
.wpms-medrow{ display:flex; gap:10px; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:12px; padding:12px 14px; }
.wpms-medmove{ display:flex; flex-direction:column; gap:4px; flex:0 0 auto; }
.wpms-medmove .wpms-mini{ padding:2px 8px; line-height:1.2; }
.wpms-medmain{ flex:1; min-width:0; display:flex; flex-direction:column; gap:8px; }
.wpms-medtop{ display:flex; align-items:center; gap:10px; }
.wpms-medtop input[data-f=label]{ flex:1; font:inherit; padding:8px 10px; border:1px solid var(--wpms-line); border-radius:8px; }
.wpms-medroles{ display:flex; flex-wrap:wrap; gap:12px; font-size:13px; color:var(--wpms-muted); }
.wpms-medroles label{ display:flex; align-items:center; gap:5px; }
.wpms-medvis{ margin-left:auto; color:var(--wpms-teal); font-weight:600; }
.wpms-medmain input[data-f=url], .wpms-medmain textarea[data-f=content]{ font:inherit; padding:8px 10px; border:1px solid var(--wpms-line); border-radius:8px; width:100%; }
.wpms-medactions{ display:flex; align-items:center; gap:10px; margin-top:16px; flex-wrap:wrap; }
.wpms-pagecontent{ max-width:820px; line-height:1.6; }

/* ---- Profilbild-Zuschneider ---- */
.wpms-crop-ov{ position:fixed; inset:0; z-index:80; background:rgba(0,0,0,.6); display:flex; align-items:center; justify-content:center; padding:20px; }
.wpms-crop-box{ background:var(--wpms-card); border-radius:18px; padding:20px; max-width:340px; width:100%; display:grid; gap:14px; justify-items:center; }
.wpms-crop-hint{ margin:0; font-size:13px; color:var(--wpms-muted); text-align:center; }
.wpms-crop-view{ width:280px; height:280px; max-width:100%; border-radius:50%; overflow:hidden; position:relative; background:#000; touch-action:none; cursor:grab; box-shadow:0 0 0 3px var(--wpms-teal2); }
.wpms-crop-img{ position:absolute; user-select:none; -webkit-user-drag:none; pointer-events:none; }
.wpms-crop-zoom{ width:100%; accent-color:var(--wpms-teal2); }
.wpms-crop-act{ display:flex; gap:12px; justify-content:flex-end; width:100%; }

/* ---- Pull-to-Refresh-Indikator ---- */
.wpms-ptr{ position:fixed; top:6px; left:50%; transform:translateX(-50%); z-index:60; width:38px; height:38px; border-radius:50%; background:var(--wpms-card); box-shadow:0 3px 10px rgba(0,0,0,.22); display:flex; align-items:center; justify-content:center; opacity:0; transition:opacity .15s ease; pointer-events:none; }
.wpms-ptr-spin{ width:18px; height:18px; border:2px solid var(--wpms-line); border-top-color:var(--wpms-teal); border-radius:50%; }
.wpms-ptr.is-ready .wpms-ptr-spin{ border-top-color:var(--wpms-teal2); border-width:3px; }
.wpms-ptr.is-loading .wpms-ptr-spin{ animation:wpms-spin .7s linear infinite; }
@keyframes wpms-spin{ to{ transform:rotate(360deg); } }

/* ---- Dashboard-Startübersicht ---- */
.wpms-dash-hi{ font-size:18px; color:var(--wpms-text); margin:0 0 18px; }
.wpms-birthday{ background:rgba(31,189,176,.12); border:1px solid var(--wpms-teal2); color:var(--wpms-text); border-radius:14px; padding:14px 18px; margin-bottom:18px; font-size:16px; }
.wpms-birthday strong{ color:var(--wpms-teal); }
.wpms-overhint{ background:rgba(224,138,30,.12); border:1px solid #e08a1e; color:var(--wpms-text); border-radius:14px; padding:14px 18px; margin-bottom:18px; font-size:16px; cursor:pointer; }
.wpms-overhint:hover{ background:rgba(224,138,30,.18); }
.wpms-overhint strong{ color:#e08a1e; }
/* Urlaub */
/* Urlaub – schlank gehalten; Anträge als 3-Spalten-Raster (responsiv). */
.wpms-url-wrap{ max-width:none; }
.wpms-url-wrap .wpms-form{ max-width:560px; }
.wpms-url-wrap .wpms-url-stats{ max-width:560px; }
/* Reiter Übersicht / Kalender */
.wpms-url-tabs{ display:inline-flex; border:1px solid var(--wpms-line); border-radius:10px; overflow:hidden; margin-bottom:20px; }
.wpms-url-tab{ background:var(--wpms-input); border:0; color:var(--wpms-text); font:inherit; font-size:13px; font-weight:600; padding:6px 14px; cursor:pointer; }
.wpms-url-tab + .wpms-url-tab{ border-left:1px solid var(--wpms-line); }
.wpms-url-tab.is-active{ background:var(--wpms-teal2); color:#fff; }
/* Tab-Zeile: Übersicht/Kalender links, „+"-Button rechts */
.wpms-url-tabrow{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:20px; }
.wpms-url-tabrow .wpms-url-tabs{ margin-bottom:0; }
.wpms-url-add{ background:transparent; color:var(--wpms-muted); border:1px solid var(--wpms-line); border-radius:10px; padding:7px 16px; font-size:14px; line-height:1.2; } /* dunkel/neutral wie Export-Buttons auf der Stunden-Seite */
.wpms-url-add:hover{ color:var(--wpms-teal); border-color:var(--wpms-teal); background:transparent; filter:none; }
/* Urlaub-Trenddiagramm (Säulen + D/M/Y/YTD): Kopf-Layout, da .wpms-stunden-head sonst auf .wpms-stunden-card gescoped ist */
.wpms-url-trend .wpms-stunden-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px 4px; }
.wpms-url-trend .wpms-stunden-head h3{ padding:0; } /* sonst doppeltes Padding (.wpms-dcard h3) → Titel weiter rechts als der Leertext */
.wpms-url-trend .wpms-chart{ flex:1 1 auto; min-height:0; padding:0; } /* padding:0 → SVG füllt die Kachel 1:1 (Pixel-Raum-Rendering) */
/* Urlaub-Antragskarten (Handy): kompakt, minimalistisch */
.wpms-url-card{ background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:12px; padding:12px 14px; }
.wpms-url-card + .wpms-url-card{ margin-top:8px; }
.wpms-url-card-top{ display:flex; align-items:center; gap:10px; }
.wpms-url-card-title{ font-weight:600; font-size:14px; }
.wpms-url-card-sub{ margin-top:4px; font-size:12.5px; color:var(--wpms-muted); }
.wpms-url-card-act{ display:flex; gap:8px; margin-top:10px; }
.wpms-url-card-act .wpms-mini{ flex:1; text-align:center; }
/* Mitarbeiter-Suchfeld über den Antrags-Listen */
.wpms-url-filter{ margin:6px 0 4px; }
.wpms-url-listtabs{ margin-top:14px; }
.wpms-url-filter .wpms-ss{ width:100%; }
.wpms-url-filter .wpms-ss-input{ width:100%; box-sizing:border-box; font:inherit; font-size:14px; height:46px; color:var(--wpms-text); background:var(--wpms-input); border:1px solid var(--wpms-line); border-radius:10px; padding:0 42px 0 14px; }
.wpms-url-filter .wpms-ss-input:focus{ outline:none; border-color:var(--wpms-teal); }
.wpms-ss-x{ position:absolute; right:8px; top:8px; width:26px; height:26px; border:0; border-radius:50%; background:var(--wpms-hover); color:var(--wpms-muted); font-size:18px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; }
.wpms-ss-x:hover{ background:#c0392b; color:#fff; }
.wpms-ss-x[hidden]{ display:none; }
/* Diagramm-Zeile: Balken links, Donut rechts – beide gleich hoch (wie Stunden-Chart) */
.wpms-url-charts{ display:flex; gap:16px; align-items:stretch; flex-wrap:wrap; margin-bottom:22px; }
.wpms-url-charts > .wpms-url-chart{ flex:5 1 560px; }
.wpms-url-charts > .wpms-url-donut-card{ flex:0 1 320px; min-width:300px; max-width:340px; }
/* Handy: Diagramme (Säulen + Donut) ausblenden – direkt zu Filter/Liste. NACH der Basisregel, sonst überschreibt display:flex das display:none. */
@media (max-width:760px){ .wpms-url-charts{ display:none; } }
/* Balken nutzt die volle Kachelbreite (Höhe ergibt sich aus der Breite, wie Stunden-Chart) */
.wpms-url-chart .wpms-chart{ min-height:0; }
.wpms-url-chart .wpms-line{ width:100%; height:auto; max-width:none; }
/* Urlaub-Diagramme (Balken + Donut nebeneinander): feste, höhere Kachel wie zuvor */
.wpms-charts-h > .wpms-dcard{ height:336px; }
.wpms-charts-h .wpms-url-chart .wpms-line{ height:100%; }
.wpms-ubar{ fill:var(--wpms-teal2); opacity:.85; transform-box:fill-box; transform-origin:center bottom; animation:wpms-ubar-grow .8s cubic-bezier(.2,.7,.2,1) both; }
.wpms-ubar.is-now{ opacity:1; }
.wpms-ubar-val{ fill:var(--wpms-text); font-size:14px; font-weight:600; }
@keyframes wpms-ubar-grow{ from{ transform:scaleY(0); } to{ transform:scaleY(1); } }
@media (prefers-reduced-motion:reduce){ .wpms-ubar{ animation:none; } }
/* Donut: SVG links groß, Legende rechts daneben */
.wpms-url-donut{ flex-direction:row; align-items:center; justify-content:center; gap:18px; }
.wpms-donut-wrap{ flex:1 1 auto; min-width:0; height:100%; display:flex; align-items:center; justify-content:center; position:relative; }
/* Äußerer Leistungs-Ring: Segmente + Hover-Tooltip (Beschriftung nur beim Drüberfahren). */
.wpms-lring-seg{ transition:stroke-width .12s ease, stroke-dasharray .5s cubic-bezier(.2,.7,.2,1) var(--wpms-lseg-delay,0s); }
@media (prefers-reduced-motion:reduce){ .wpms-lring-seg{ transition:none; } }
.wpms-lring-hit{ cursor:pointer; }
.wpms-lring-tip{ position:absolute; z-index:6; transform:translate(-50%,calc(-100% - 10px)); pointer-events:none; white-space:normal; max-width:calc(100% - 12px); text-align:center; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:8px; padding:5px 9px; font-size:12px; font-weight:600; color:var(--wpms-text); box-shadow:0 6px 18px rgba(0,0,0,.32); }
.wpms-lring-tip[hidden]{ display:none; }
.wpms-donut{ width:auto; height:100%; max-height:260px; display:block; animation:wpms-fade .5s ease both; }
.wpms-donut-outer{ animation:wpms-donut-draw 1s ease .05s forwards; }
.wpms-donut-arc{ animation:wpms-donut-grow 1.1s cubic-bezier(.2,.7,.2,1) .25s forwards; }
@keyframes wpms-donut-draw{ to{ stroke-dashoffset:0; } }
@keyframes wpms-donut-grow{ to{ stroke-dashoffset:var(--target); } }
@media (prefers-reduced-motion:reduce){ .wpms-donut-outer{ animation:none; stroke-dashoffset:0; } .wpms-donut-arc{ animation:none; stroke-dashoffset:var(--target); } .wpms-donut{ animation:none; } }
/* Urlaub-Donut: ein dicker Ring aus zwei Segmenten (Genommen zuerst, Rest danach einwachsend) */
.wpms-donut-seg{ pointer-events:stroke; }
.wpms-donut-seg-gen{ animation:wpms-donut-grow .8s cubic-bezier(.2,.7,.2,1) .15s forwards; }
.wpms-donut-seg-rest{ animation:wpms-donut-grow .7s cubic-bezier(.2,.7,.2,1) .9s forwards; }
@media (prefers-reduced-motion:reduce){ .wpms-donut-seg{ animation:none; stroke-dashoffset:var(--target); } }
.wpms-donut-num{ fill:var(--wpms-text); font-size:40px; font-weight:400; }
.wpms-donut-sub{ fill:var(--wpms-muted); font-size:15px; }
.wpms-donut-legend{ display:flex; flex-direction:column; gap:12px; flex:0 0 auto; font-size:14px; color:var(--wpms-muted); }
.wpms-donut-legend span{ display:flex; align-items:center; white-space:nowrap; }
.wpms-donut-legend i{ display:inline-block; width:11px; height:11px; border-radius:50%; margin-right:8px; }
.wpms-dot-gesamt{ background:var(--wpms-teal2); opacity:.4; }
.wpms-dot-genommen{ background:var(--wpms-teal2); }
.wpms-dot-rest{ background:var(--wpms-line); }
/* Dashboard-Umsatz-Donut (Umsatz = Teal-Außenring, Offen = oranger Innenring). In einer schmalen
   Grid-Zelle: Donut oben, Legende darunter (mittig, umbruchfähig). */
.wpms-umsatz-donut{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; }
/* Größe über die Breite (quadratische viewBox) → unabhängig von der Zellenhöhe. Ca. 1/4 größer. */
.wpms-umsatz-donut .wpms-donut{ width:min(250px,92%); height:auto; max-height:none; }
.wpms-umsatz-donut .wpms-donut-legend{ flex-direction:row; flex-wrap:wrap; justify-content:center; gap:8px 16px; }
.wpms-donut-arc-offen{ animation:wpms-donut-grow 1.1s cubic-bezier(.2,.7,.2,1) .25s forwards; }
/* Statisch (30-Sek.-Poll / aus Cache): keine Animation → kein Blinken/Neu-Einblenden. */
.wpms-donut.is-static{ animation:none; }
.wpms-donut.is-static .wpms-donut-outer,
.wpms-donut.is-static .wpms-donut-arc{ animation:none; }
/* Gedämpfte, wenig „bunte" Ring-Palette: Teal (Umsatz) + neutrales Slate (Offen). */
:root{ --wpms-donut-offen:#7d8896; }
/* Finanz-Optik: tabellarische, kompakte Zahl; gedämpfte Legende. */
.wpms-donut-num-eur{ font-size:27px; font-weight:600; letter-spacing:-.3px; font-variant-numeric:tabular-nums; }
.wpms-umsatz-donut .wpms-donut-sub{ font-size:13px; }
.wpms-umsatz-donut .wpms-donut-legend{ font-size:13px; }
.wpms-dot-umsatz{ background:var(--wpms-teal2); }
.wpms-dot-offen{ background:var(--wpms-donut-offen); }
.wpms-url-sec{ font-size:12px; font-weight:700; color:var(--wpms-muted); text-transform:uppercase; letter-spacing:.04em; margin:22px 0 16px; }
.wpms-url-sec:first-child{ margin-top:2px; }
/* Statistik-Zeile (Mitarbeiter): ein Rahmen, drei Spalten mit feinen Trennern. */
.wpms-url-stats{ display:flex; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:14px; overflow:hidden; }
.wpms-url-stats > div{ flex:1; padding:16px 10px; display:flex; flex-direction:column; align-items:center; gap:4px; text-align:center; }
.wpms-url-stats > div + div{ border-left:1px solid var(--wpms-line); }
.wpms-url-stats strong{ font-size:26px; font-weight:700; line-height:1; color:var(--wpms-text); }
.wpms-url-stats span{ font-size:12px; color:var(--wpms-muted); }
.wpms-url-list{ display:grid; grid-template-columns:repeat(3, 1fr); gap:10px; }
@media (max-width:1024px){ .wpms-url-list{ grid-template-columns:repeat(2, 1fr); } }
@media (max-width:640px){ .wpms-url-list{ grid-template-columns:1fr; } }
.wpms-url-item{ background:var(--wpms-card); border:1px solid var(--wpms-line); border-left:3px solid var(--wpms-line); border-radius:12px; padding:13px 16px; }
.wpms-url-item.wpms-url-offen{ border-left-color:var(--wpms-teal); }
.wpms-url-item.wpms-url-genehmigt{ border-left-color:#00635E; }
.wpms-url-item.wpms-url-abgelehnt{ border-left-color:#c0392b; }
.wpms-url-head{ display:flex; align-items:center; gap:10px; }
.wpms-url-title{ font-weight:600; font-size:15px; color:var(--wpms-text); }
.wpms-url-status{ margin-left:auto; flex:0 0 auto; font-size:11px; font-weight:700; padding:3px 9px; border-radius:999px; text-transform:uppercase; letter-spacing:.03em; }
.wpms-url-st-offen{ background:rgba(0,99,94,.15); color:var(--wpms-teal); }
.wpms-url-item.wpms-url-krank{ border-left-color:#c0392b; }
.wpms-url-st-krank{ background:rgba(192,57,43,.15); color:#c0392b; }
.wpms-uday-bar.wpms-uday-krank{ background:#c0392b; }
.wpms-ubar.wpms-ubar-fehl{ fill:#7d8896; } /* Fehlzeiten grau, gestapelt über dem Urlaub im Trend-Diagramm */
.wpms-ubar.wpms-ubar-krank{ fill:#c0392b; }
.wpms-url-item.wpms-url-fehlen{ border-left-color:#e08a1e; }
.wpms-url-st-fehlen{ background:rgba(224,138,30,.15); color:#e08a1e; }
.wpms-uday-bar.wpms-uday-fehlen{ background:#e08a1e; }
.wpms-ubar.wpms-ubar-fehlen{ fill:#e08a1e; }
/* Gestapeltes Fehltage-Diagramm: ganze Säule (Gruppe) wächst von unten hoch (kein Stapel-Versatz) */
.wpms-fehl-chart .wpms-ubar{ animation:none; }
.wpms-ubar-col{ transform-box:fill-box; transform-origin:center bottom; animation:wpms-ubar-grow .8s cubic-bezier(.2,.7,.2,1) both; }
@media (prefers-reduced-motion:reduce){ .wpms-ubar-col{ animation:none; } }
.wpms-fehl-legend{ justify-content:flex-start; gap:8px 18px; }
.wpms-fehl-legend span{ display:flex; align-items:center; font-size:13px; color:var(--wpms-muted); }
.wpms-fehl-legend i{ display:inline-block; width:11px; height:11px; border-radius:3px; margin-right:6px; }
.wpms-dot-krank{ background:#c0392b; }
.wpms-dot-fehlen{ background:#e08a1e; }
/* Jahreskalender: Tage farbig nach Typ */
.wpms-yd.wpms-yd-krank{ background:#c0392b; color:#fff; font-weight:700; }
.wpms-yd.wpms-yd-fehlen{ background:#e08a1e; color:#fff; font-weight:700; }
/* Krank-Übersicht: Formular links, Monats-Aufschlüsselung rechts */
.wpms-krank-row{ display:flex; gap:16px; flex-wrap:wrap; align-items:stretch; }
.wpms-krank-row .wpms-form{ flex:1 1 340px; max-width:560px; display:flex; flex-direction:column; gap:14px; align-items:stretch; }
.wpms-krank-row .wpms-fehlen-form button[type="submit"]{ margin-top:auto; align-self:flex-start; }
.wpms-krank-detail{ flex:1 1 340px; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:14px; padding:16px 18px; }
.wpms-krank-detail h3{ margin:0 0 14px; font-size:15px; }
.wpms-hbar-row{ display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.wpms-hbar-name{ flex:0 0 120px; font-size:13px; color:var(--wpms-text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-hbar-track{ flex:1; height:7px; background:var(--wpms-bubble); border-radius:4px; overflow:hidden; display:flex; }
.wpms-hbar-seg{ height:100%; flex:0 0 auto; width:0; animation:wpms-hbar-grow .9s cubic-bezier(.2,.7,.2,1) both; }
.wpms-hbar-seg.wpms-hbar-krank{ background:#c0392b; }
.wpms-hbar-seg.wpms-hbar-fehlen{ background:#e08a1e; }
.wpms-hbar-seg.wpms-hbar-gr{ background:var(--wpms-teal2); }
/* Auswertungs-Kachel im Mitarbeiter-Detail */
.wpms-abw-card{ background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:14px; padding:18px 20px; }
.wpms-abw-card h3{ margin:0 0 16px; font-size:16px; }
.wpms-abw-card .wpms-hbar-name{ flex:0 0 170px; white-space:normal; }
.wpms-abw-card .wpms-hbar-val{ min-width:54px; }
/* Handy: Label + Wert oben, Balken in eigener Zeile (volle Breite) */
@media (max-width:760px){
	.wpms-hbar-row{ flex-wrap:wrap; }
	.wpms-hbar-row .wpms-hbar-name{ flex:1 1 auto; order:1; white-space:normal; }
	.wpms-hbar-row .wpms-hbar-val{ order:2; margin-left:auto; }
	.wpms-hbar-row .wpms-hbar-track{ order:3; flex:1 1 100%; margin-top:6px; }
}
@keyframes wpms-hbar-grow{ from{ width:0; } to{ width:var(--w); } }
@media (prefers-reduced-motion:reduce){ .wpms-hbar-seg{ animation:none; width:var(--w); } }
.wpms-hbar-val{ flex:0 0 auto; font-size:13px; color:var(--wpms-muted); min-width:24px; text-align:right; }
/* Durchsuchbares Auswahlfeld (z. B. Mitarbeiter bei großer Liste) */
.wpms-ss{ position:relative; }
.wpms-ss-list{ display:none; position:absolute; left:0; right:0; top:100%; margin-top:4px; z-index:30; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:10px; max-height:240px; overflow-y:auto; box-shadow:0 8px 22px rgba(0,0,0,.28); }
.wpms-ss-list.is-open{ display:block; }
.wpms-ss-opt{ display:block; width:100%; text-align:left; background:none; border:0; color:var(--wpms-text); font:inherit; font-size:15px; padding:10px 12px; cursor:pointer; }
.wpms-ss-opt:hover{ background:var(--wpms-hover); }
.wpms-url-st-genehmigt{ background:rgba(0,99,94,.15); color:#00635E; }
.wpms-url-st-abgelehnt{ background:rgba(192,57,43,.15); color:#c0392b; }
.wpms-fehl-krank{ background:rgba(192,57,43,.15); color:#c0392b; }
.wpms-fehl-fehlen{ background:rgba(224,138,30,.15); color:#e08a1e; }
.wpms-url-tstat{ display:inline-block; } /* Status/Art-Badge rechts neben der Tage-Zahl */
.wpms-url-sub{ font-size:14px; color:var(--wpms-text); margin-top:3px; }
.wpms-url-notiz{ font-size:13px; color:var(--wpms-muted); margin-top:5px; }
.wpms-url-rest{ font-size:12px; color:var(--wpms-muted); margin-top:5px; }
.wpms-url-act{ display:flex; gap:8px; margin-top:12px; }
/* Urlaubskalender */
/* minimalistisch: ohne Karte/Hintergrund, ohne Zell-Outlines, volle Breite */
.wpms-ucal{ background:none; border:0; padding:0; }
.wpms-ucal-top{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:16px; }
.wpms-ucal .wpms-mcal-cell{ min-height:84px; border:0; background:none; border-radius:0; padding:6px 2px; }
.wpms-ucal .wpms-mcal-cell.is-today{ border:0; }
.wpms-ucal .wpms-mcal-cell.is-today .wpms-mcal-d{ color:var(--wpms-teal); font-weight:700; }
.wpms-uday-marks{ display:flex; flex-direction:column; gap:3px; margin-top:auto; }
.wpms-uday-bar{ height:4px; border-radius:2px; background:var(--wpms-teal2); }
.wpms-uday-bar.is-offen{ opacity:.4; }
.wpms-uday-more{ font-size:10px; line-height:1; color:var(--wpms-muted); }
/* Detail-Popover für Abwesenheits-Kalender (Hover Desktop + Klick/Tap Handy) */
.wpms-uday-pop{ position:fixed; z-index:120; min-width:150px; max-width:260px; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:10px; box-shadow:0 8px 28px rgba(0,0,0,.4); padding:9px 11px; font-size:13px; }
.wpms-uday-pop-h{ font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--wpms-muted); margin-bottom:6px; }
.wpms-uday-pop-row{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:2px 0; }
.wpms-uday-pop-n{ color:var(--wpms-text); }
.wpms-uday-pop-krank{ color:#c0392b; font-weight:600; }
.wpms-uday-pop-m{ flex:0 0 auto; font-size:11px; color:var(--wpms-muted); }
.wpms-uday-pop-offen{ color:var(--wpms-teal); }
.wpms-uday-pop-krank{ color:#c0392b; }
.wpms-uday-pop-fehlen{ color:#e08a1e; }
/* Drei Übersichts-Kacheln */
.wpms-dcards{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-bottom:22px; }
.wpms-dcard{ font-variant-numeric:tabular-nums; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:14px; padding:0; overflow:hidden; display:flex; flex-direction:column; min-height:210px; }
.wpms-dcard h3{ margin:0; padding:14px 16px 8px; font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--wpms-muted); background:transparent; }
.wpms-dcard-h-link{ display:flex; align-items:center; justify-content:space-between; gap:8px; cursor:pointer; }
.wpms-dcard-h-link:hover{ color:var(--wpms-teal); }
.wpms-dcard-h-link:focus-visible{ outline:2px solid var(--wpms-teal); outline-offset:-2px; }
.wpms-dcard-h-arrow{ font-size:20px; line-height:1; opacity:.9; }
.wpms-dcard-head{ display:flex; align-items:stretch; justify-content:space-between; background:transparent; }
.wpms-dcard-head h3{ flex:1; }
/* Klickbare Kachel-Überschrift „Kalender" → verlinkt auf die Kalender-Seite. */
.wpms-dcard-h-link{ cursor:pointer; }
.wpms-dcard-h-link:hover{ opacity:.85; }
.wpms-dcard-h-link:focus-visible{ outline:2px solid var(--wpms-teal); outline-offset:-2px; }
.wpms-dcard-add{ flex:0 0 auto; background:none; border:0; color:var(--wpms-muted); font-size:22px; line-height:1; cursor:pointer; padding:0 16px; transition:color .15s; }
.wpms-dcard-add:hover{ color:var(--wpms-teal2); background:none; }
/* Alle grünen Kachel-Header exakt gleich hoch – unabhängig von Schriftgröße/Inhalt. */
.wpms-dcard > h3,
.wpms-dcard-head,
.wpms-stunden-card .wpms-stunden-head{ min-height:48px; box-sizing:border-box; }
.wpms-dcard > h3{ display:flex; align-items:center; padding-top:0; padding-bottom:0; }
.wpms-dcard-head{ align-items:center; }
.wpms-dcard-head > h3{ padding-top:0; padding-bottom:0; }
.wpms-stunden-card .wpms-stunden-head{ padding-top:0; padding-bottom:0; align-items:center; }
/* Termin-Eintrag: Datum/Uhrzeit links (2 Zeilen), Titel·Kunde + Mitarbeiter rechts */
.wpms-term{ display:flex; gap:12px; align-items:center; cursor:pointer; border-bottom:1px solid var(--wpms-line); padding-bottom:9px; }
.wpms-term:last-child{ border-bottom:0; padding-bottom:0; }
.wpms-term-when{ flex:0 0 auto; min-width:90px; display:flex; flex-direction:column; gap:2px; }
.wpms-term-date{ font-weight:700; font-size:12px; color:var(--wpms-text); white-space:nowrap; }
.wpms-term-time{ font-size:12px; color:var(--wpms-muted); white-space:nowrap; }
.wpms-term-main{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.wpms-term-t{ font-size:12px; color:var(--wpms-text); }
.wpms-term-mit{ font-size:11px; color:var(--wpms-muted); }
/* Monatskalender */
.wpms-cal{ position:relative; padding:12px 14px 20px; }
.wpms-cal-tip{ position:absolute; z-index:5; max-width:260px; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:10px; box-shadow:0 6px 20px rgba(0,0,0,.3); padding:8px 10px; display:flex; flex-direction:column; gap:3px; font-size:12px; color:var(--wpms-text); }
.wpms-cal-tip[hidden]{ display:none; }
.wpms-cal-tip strong{ font-size:12px; margin-bottom:2px; }
.wpms-cal-tip-it{ display:block; width:100%; text-align:left; background:none; border:0; color:var(--wpms-muted); font:inherit; font-size:12px; padding:4px 6px; border-radius:6px; cursor:pointer; }
.wpms-cal-tip-it:hover{ background:var(--wpms-hover); color:var(--wpms-teal); }
.wpms-cal-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.wpms-cal-title{ font-weight:700; font-size:14px; color:var(--wpms-text); }
.wpms-cal-nav{ background:none; border:0; color:var(--wpms-teal); font-size:20px; line-height:1; cursor:pointer; padding:2px 10px; border-radius:8px; }
.wpms-cal-nav:hover{ background:var(--wpms-hover); }
.wpms-cal-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:2px; }
.wpms-cal-dow{ text-align:center; font-size:11px; color:var(--wpms-muted); padding:2px 0; }
.wpms-cal-cell{ position:relative; min-height:38px; display:flex; align-items:center; justify-content:center; border:0; background:none; color:var(--wpms-text); font:inherit; font-size:13px; border-radius:8px; cursor:default; }
.wpms-cal-cell.is-empty{ visibility:hidden; }
.wpms-cal-cell.is-today{ background:var(--wpms-hover); font-weight:700; }
.wpms-cal-cell.has-ev{ cursor:pointer; }
.wpms-cal-dot{ position:absolute; bottom:6px; left:50%; transform:translateX(-50%); width:5px; height:5px; border-radius:50%; background:transparent; }
.wpms-cal-cell.has-ev .wpms-cal-dot{ background:var(--wpms-teal); }

/* ===== Kalender-Seite (Woche / Monat / Jahr) ===== */
.wpms-cal-h1{ margin:0 0 12px; }
/* Titel + Datum (Zeitraum) in einer Zeile; Datum unten bündig mit dem Titel. */
.wpms-cal-titlerow{ display:flex; align-items:baseline; gap:22px; flex-wrap:wrap; margin-bottom:12px; }
.wpms-cal-titlerow .wpms-cal-h1{ margin:0; }
.wpms-cal-titlerow .wpms-cal-navrow{ margin-bottom:0; padding-bottom:0; }
.wpms-cal-titlerow .wpms-cal-ptitle{ min-width:0; }
.wpms-cal-top{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.wpms-cal-navrow{ display:flex; align-items:center; gap:8px; }
.wpms-cal-leftrow{ display:flex; align-items:center; gap:8px; }
.wpms-fab-add.wpms-fab-mobile{ display:none; } /* Desktop: „+" nur rechts bei den Modi, nicht in der Datumszeile */
.wpms-eins-addbtn{ flex:0 0 auto; background:transparent; color:var(--wpms-muted); border:1px solid var(--wpms-line); } /* „+ Einsatz/Termin" neutral/outline wie „+ Hinzufügen"; auf dem Handy zeigt der runde „+" (wpms-fab-mobile) */
.wpms-eins-addbtn:hover{ border-color:var(--wpms-teal2); color:var(--wpms-text); }
.wpms-cal-ptitle{ font-weight:700; font-size:17px; min-width:170px; text-align:center; }
.wpms-cal-navrow .wpms-cal-nav{ font-size:20px; padding:4px 12px; }
.wpms-cal-today{ background:var(--wpms-input); border:1px solid var(--wpms-line); color:var(--wpms-text); border-radius:10px; padding:6px 12px; font:inherit; font-size:13px; cursor:pointer; margin-left:4px; }
.wpms-cal-right{ display:flex; align-items:center; gap:12px; }
.wpms-fab-add{ flex:0 0 auto; width:37px; height:37px; box-sizing:border-box; border-radius:10px; border:none; background:var(--wpms-teal2); color:#fff; font-size:22px; line-height:0; cursor:pointer; display:flex; align-items:center; justify-content:center; box-shadow:0 1px 4px rgba(0,0,0,.25); transition:filter .2s ease; }
.wpms-fab-add:hover{ filter:brightness(1.08); }
.wpms-cal-addbtn{ flex:0 0 auto; }
/* Aktions-Pillen (+ Termin / Kategorien / + Einsatz) kompakter – passend zu den Modus-Tabs. */
.wpms-cal-addbtn, .wpms-cal-katbtn, .wpms-eins-addbtn{ padding:8px 18px; font-size:14px; }
/* „+ Einsatz"/„+ Termin" + „Kategorien": gleiche Form wie Tabs/Dropdowns (eckig, 37px). */
.wpms-eins-addbtn, .wpms-cal-katbtn{ border-radius:10px; height:34px; padding:0 16px; font-size:14px; box-sizing:border-box; display:inline-flex; align-items:center; }
/* Handy: „+ Einsatz" ausblenden – der runde „+" (wpms-fab-mobile) übernimmt. NACH der display:inline-flex-Regel, sonst greift es nicht. */
@media (max-width:760px){ .wpms-eins-addbtn{ display:none; } }
@media (max-width:760px){ .wpms-cal-addbtn{ padding:8px 14px; font-size:14px; } }
/* Rechte Steuergruppe: Heute · Umschalter · + Termin. */
.wpms-cal-controls{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
/* Kalender-Seite: Datumszeile links, Umschalter+„+ Termin" rechts (Desktop); mobil „+ Termin" in der Datumszeile, Modi voll breit darunter. */
.wpms-cal-top.wpms-calpage-top{ flex-wrap:wrap; }
.wpms-calpage-top .wpms-cal-navrow{ margin-right:auto; }
/* Datum linksbündig mit dem „Kalender"-Titel (erstes Pfeil-Padding raus). */
.wpms-calpage-top .wpms-cal-navrow .wpms-cal-nav:first-child{ padding-left:0; }
.wpms-add-mini{ display:none; }
@media (min-width:761px){
	.wpms-calpage-top .wpms-cal-modes{ order:2; }
	.wpms-calpage-top .wpms-cal-katbtn{ order:3; }
	.wpms-calpage-top .wpms-cal-addbtn{ order:4; }
}
@media (max-width:760px){
	.wpms-cal-top.wpms-calpage-top{ flex-wrap:wrap; }
	/* „+" und die Umschalter (Tag/Woche/Monat/Jahr) in EINER Zeile. */
	.wpms-calpage-top .wpms-cal-modes{ flex:1 1 auto; min-width:0; order:2; overflow-x:visible; }
	.wpms-calpage-top .wpms-cal-addbtn{ order:1; }
	.wpms-calpage-top .wpms-cal-mode{ flex:1; padding:0 6px; justify-content:center; }
	/* „+ Termin" wird ein kompaktes rundes „+" rechts neben dem Datum. */
	.wpms-calpage-top .wpms-cal-addbtn{ flex:0 0 auto; width:37px; height:37px; padding:0; border-radius:10px; font-size:22px; line-height:1; display:flex; align-items:center; justify-content:center; }
	.wpms-calpage-top .wpms-add-full{ display:none; }
	.wpms-calpage-top .wpms-add-mini{ display:inline; }
}
/* Tagesansicht (Apple-Stil): Stunden-Raster mit platzierten Terminen. */
.wpms-dcal{ }
.wpms-dcal-allday{ display:flex; flex-wrap:wrap; gap:6px; padding:0 0 10px; margin-bottom:10px; border-bottom:1px solid var(--wpms-line); }
.wpms-dcal-grid{ display:flex; position:relative; }
.wpms-dcal-hours{ flex:0 0 52px; }
.wpms-dcal-hr{ position:relative; }
.wpms-dcal-hr span{ position:absolute; top:-8px; right:8px; font-size:11px; color:var(--wpms-muted); font-variant-numeric:tabular-nums; }
.wpms-dcal-area{ position:relative; flex:1; min-width:0; border-left:1px solid var(--wpms-line); }
.wpms-dcal-area.wpms-dcal-addable{ cursor:copy; }
.wpms-dcal-line{ position:absolute; left:0; right:0; border-top:1px solid var(--wpms-line); opacity:.45; }
.wpms-dcal-ev{ position:absolute; box-sizing:border-box; border:0; border-left:3px solid currentColor; border-radius:6px; padding:4px 7px; text-align:left; cursor:pointer; overflow:hidden; font:inherit; display:flex; flex-direction:column; gap:1px; }
.wpms-dcal-ev .n{ font-size:12px; font-weight:600; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-dcal-ev .k{ font-size:11px; opacity:.85; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* Rechts aufklappende Karte (Drawer) für Termin-/Einsatz-Formular. */
.wpms-drawer-ov{ position:fixed; inset:0; z-index:9998; background:rgba(0,0,0,.45); opacity:0; transition:opacity .25s ease; display:flex; justify-content:flex-end; }
.wpms-drawer-ov.is-open{ opacity:1; }
.wpms-drawer{ width:min(480px,100%); height:100%; background:var(--wpms-bg); box-shadow:-8px 0 30px rgba(0,0,0,.35); display:flex; flex-direction:column; transform:translateX(100%); transition:transform .26s cubic-bezier(.2,.7,.2,1); }
.wpms-drawer-ov.is-open .wpms-drawer{ transform:none; }
.wpms-drawer-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 20px; border-bottom:1px solid var(--wpms-line); }
.wpms-drawer-head h2{ margin:0; font-size:18px; color:var(--wpms-text); }
.wpms-drawer-x{ flex:0 0 auto; background:none; border:0; color:var(--wpms-muted); font-size:26px; line-height:1; cursor:pointer; padding:0 4px; }
.wpms-drawer-edit{ flex:0 0 auto; background:none; border:0; color:var(--wpms-teal); cursor:pointer; padding:4px 6px; display:flex; align-items:center; margin-left:auto; }
.wpms-drawer-edit:hover{ color:var(--wpms-text); }
/* Termin-Infoansicht (read-only). */
.wpms-tv-titel{ margin:0 0 16px; font-size:20px; color:var(--wpms-text); }
.wpms-tv-row{ display:flex; gap:12px; padding:11px 0; border-bottom:1px solid var(--wpms-line); }
.wpms-tv-row:last-child{ border-bottom:0; }
.wpms-tv-l{ flex:0 0 110px; color:var(--wpms-muted); font-size:14px; }
.wpms-tv-v{ flex:1; min-width:0; color:var(--wpms-text); font-size:15px; display:flex; align-items:center; gap:8px; }
.wpms-tv-dot{ flex:0 0 auto; width:12px; height:12px; border-radius:50%; display:inline-block; }
.wpms-btn-icon{ display:inline-flex; align-items:center; justify-content:center; padding:9px 12px; }
.wpms-drawer-x:hover{ color:var(--wpms-text); }
.wpms-drawer-body{ flex:1; min-height:0; overflow-y:auto; overflow-x:hidden; padding:20px; }
.wpms-drawer-body .wpms-form{ max-width:none; }
.wpms-drawer-body .wpms-form input:not([type=color]):not([type=checkbox]):not([type=radio]), .wpms-drawer-body .wpms-form select, .wpms-drawer-body .wpms-form textarea{ width:100%; box-sizing:border-box; }
/* Mobil: 16px verhindert iOS-Auto-Zoom beim Fokus; Von/Bis untereinander, nichts läuft aus dem Screen. */
@media (max-width:760px){
	.wpms-drawer-body input, .wpms-drawer-body select, .wpms-drawer-body textarea,
	.wpms-drawer-body .wpms-mspick-field input, .wpms-drawer-body .wpms-ss-input{ font-size:16px; }
	.wpms-drawer-body .wpms-grid2{ grid-template-columns:1fr; }
}
/* Adress-Autovervollständigung. */
.wpms-adr{ position:relative; }
.wpms-adr-drop{ position:absolute; left:0; right:0; top:calc(100% + 4px); z-index:5; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:10px; overflow:hidden; box-shadow:0 6px 20px rgba(0,0,0,.3); max-height:240px; overflow-y:auto; }
.wpms-adr-it{ display:block; width:100%; text-align:left; background:none; border:0; border-bottom:1px solid var(--wpms-line); color:var(--wpms-text); font:inherit; font-size:14px; padding:10px 12px; cursor:pointer; }
.wpms-adr-it:last-child{ border-bottom:0; }
.wpms-adr-it:hover{ background:var(--wpms-input); }
/* Inline-Zeitblöcke unter Von/Bis. */
.wpms-tblocks{ display:grid; grid-template-columns:repeat(auto-fill,minmax(62px,1fr)); gap:6px; margin-top:8px; max-height:200px; overflow-y:auto; padding:8px; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-card); }
.wpms-tblocks[hidden]{ display:none; }
/* Termin-Kategorien-Verwaltung. */
.wpms-katlist{ display:flex; flex-direction:column; gap:10px; }
.wpms-katrow{ display:flex; align-items:center; gap:12px; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:12px; padding:10px 12px; }
.wpms-katrow input[type=color]{ flex:0 0 auto; width:32px; height:32px; padding:0; border:1px solid var(--wpms-line); border-radius:8px; background:none; cursor:pointer; -webkit-appearance:none; appearance:none; }
.wpms-katrow input[type=color]::-webkit-color-swatch-wrapper{ padding:0; }
.wpms-katrow input[type=color]::-webkit-color-swatch{ border:0; border-radius:6px; }
.wpms-katrow .wpms-katname{ flex:1; min-width:0; border:0; background:none; color:var(--wpms-text); font:inherit; font-size:15px; font-weight:600; padding:4px 0; height:auto; }
.wpms-katrow .wpms-katname:focus{ outline:none; }
.wpms-katrow .wpms-mini-danger{ flex:0 0 auto; }
.wpms-katbtns{ display:flex; gap:16px; margin-top:18px; flex-wrap:wrap; }
.wpms-btn-sm{ padding:8px 16px; font-size:14px; }
.wpms-cal-katbtn{ flex:0 0 auto; background:transparent; color:var(--wpms-muted); border:1px solid var(--wpms-line); } /* neutral wie „+ Termin", nicht türkis */
.wpms-cal-katbtn:hover{ border-color:var(--wpms-teal2); color:var(--wpms-text); }
@media (max-width:760px){ .wpms-cal-katbtn{ display:none; } }
.wpms-tblock{ background:var(--wpms-input); border:1px solid var(--wpms-line); color:var(--wpms-text); border-radius:8px; padding:8px 0; font:inherit; font-size:13px; cursor:pointer; font-variant-numeric:tabular-nums; }
.wpms-tblock:hover{ border-color:var(--wpms-teal2); }
.wpms-tblock.is-active{ background:var(--wpms-teal2); color:#fff; border-color:var(--wpms-teal2); }
@media (max-width:560px){ .wpms-drawer{ width:100%; } }
/* Leerer Tag in der Monatsansicht: anklickbar zum Anlegen (dezenter Hover). */
.wpms-mcal-addable{ cursor:pointer; }
.wpms-mcal-addable:hover{ border-color:var(--wpms-teal2); background:rgba(20,184,166,.06); }
/* Tab-Leiste exakt 34px hoch = Filter/„+ Einsatz" (Padding nur horizontal, vertikal zentriert der Flex). */
.wpms-cal-modes{ box-sizing:border-box; height:34px; display:flex; align-items:stretch; border:1px solid var(--wpms-line); border-radius:10px; overflow:hidden; background:var(--wpms-input); }
.wpms-cal-mode{ display:inline-flex; align-items:center; gap:7px; background:var(--wpms-input); border:0; color:var(--wpms-text); font:inherit; font-size:14px; padding:0 16px; cursor:pointer; white-space:nowrap; }
/* Ansichts-Icon im Tab: erbt Textfarbe, im inaktiven Tab leicht zurückgenommen. */
.wpms-mode-ico{ width:14px; height:14px; flex:0 0 auto; opacity:.75; }
.wpms-cal-mode.is-active .wpms-mode-ico{ opacity:1; }
/* Ansichts-Umschalter als Icon-Button + Dropdown (ersetzt die Tab-Leiste bei Einsätze/Kalender). */
.wpms-mode-menubtn{ box-sizing:border-box; height:34px; display:inline-flex; align-items:center; gap:8px; padding:0 12px; background:var(--wpms-input); border:1px solid var(--wpms-line); border-radius:10px; color:var(--wpms-text); font:inherit; font-size:14px; cursor:pointer; white-space:nowrap; }
.wpms-mode-menubtn:hover{ border-color:var(--wpms-teal2); }
.wpms-mode-menubtn .wpms-mode-ico{ opacity:1; }
.wpms-mode-chev{ width:14px; height:14px; flex:0 0 auto; opacity:.6; }
.wpms-mode-menu{ min-width:170px; }
.wpms-mode-it{ display:flex; align-items:center; gap:10px; padding:9px 12px; background:none; border:0; border-radius:8px; color:var(--wpms-text); font:inherit; font-size:14px; cursor:pointer; text-align:left; }
.wpms-mode-it:hover{ background:var(--wpms-hover); }
.wpms-mode-it .wpms-mode-ico{ opacity:.8; }
.wpms-mode-it.is-active{ background:var(--wpms-teal2); color:#fff; }
.wpms-mode-it.is-active:hover{ background:var(--wpms-teal2); }
.wpms-mode-it.is-active .wpms-mode-ico{ opacity:1; }
.wpms-ucal .wpms-cal-mode{ font-size:13px; padding:0 13px; } /* Urlaub/Fehlzeiten-Kalender: Monat/Jahr kompakter */
.wpms-cal-mode.is-active{ background:var(--wpms-teal2); color:#fff; }
/* Leistungs-Filter links neben der Modus-Leiste. */
.wpms-cal-filter{ flex:0 0 auto; }
.wpms-cal-filter-sel{ box-sizing:border-box; height:34px; width:200px; background:var(--wpms-input); border:1px solid var(--wpms-line); color:var(--wpms-text); border-radius:10px; padding:0 34px 0 12px; font:inherit; cursor:pointer; appearance:none; -webkit-appearance:none; background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa1a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat:no-repeat; background-position:right 10px center; }
.wpms-cal-filter-sel:focus{ outline:none; border-color:var(--wpms-teal2); }
/* Filter-Schrift = Tab-/Button-Schrift (14px) am Desktop (Maus): #wpms-app-Präfix nötig,
   sonst gewinnt #wpms-app select{ font-size:16px } (ID, iOS-Zoom-Schutz) über die Klasse.
   Touch-Geräte behalten 16px (iOS zoomt sonst bei Fokus ins Feld). */
@media (hover:hover) and (pointer:fine){
	#wpms-app .wpms-cal-filter-sel, #wpms-app .wpms-cal-ksuche input{ font-size:14px; }
}
.wpms-filter-status{ width:150px; } /* Status-Dropdown schmaler – kurze Begriffe */
.wpms-cal-ksuche{ position:relative; flex:0 0 auto; }
.wpms-cal-ksuche input{ box-sizing:border-box; height:34px; width:200px; background:var(--wpms-input); border:1px solid var(--wpms-line); color:var(--wpms-text); border-radius:10px; padding:0 32px 0 12px; font:inherit; }
.wpms-cal-ksuche input:focus{ outline:none; border-color:var(--wpms-teal2); }
.wpms-cal-ksuche .wpms-ss-x{ top:50%; transform:translateY(-50%); right:6px; width:24px; height:24px; font-size:16px; }
/* Filter-Button (Trichter + „Filter" + Zähler aktiver Filter) auf ALLEN Breiten sichtbar,
   Höhe/Stil wie Ansichts-Button & „+ Einsatz". Öffnet das Filter-Dropdown. */
.wpms-filterbtn{ box-sizing:border-box; height:34px; display:inline-flex; align-items:center; gap:7px; padding:0 14px; background:var(--wpms-input); border:1px solid var(--wpms-line); border-radius:10px; color:var(--wpms-text); font:inherit; font-size:14px; cursor:pointer; white-space:nowrap; }
.wpms-filterbtn:hover, .wpms-filterbtn.is-active{ border-color:var(--wpms-teal2); }
.wpms-filterbtn > svg{ flex:0 0 auto; opacity:.8; }
.wpms-fcount{ flex:0 0 auto; background:var(--wpms-teal2); color:#fff; border-radius:999px; min-width:18px; height:18px; display:inline-flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; padding:0 5px; }
/* Filter-Dropdown: an document.body gehängt, fixed positioniert (wie modeMenu). */
.wpms-filterpop{ position:fixed; z-index:10050; width:264px; max-width:calc(100vw - 16px); box-sizing:border-box; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,.38); padding:13px; display:flex; flex-direction:column; gap:12px; }
.wpms-fp-row{ display:flex; flex-direction:column; gap:5px; }
.wpms-fp-cap{ font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--wpms-muted); }
.wpms-filterpop .wpms-cal-filter-sel, .wpms-filterpop .wpms-cal-ksuche{ width:100%; }
.wpms-filterpop .wpms-cal-ksuche input{ width:100%; }
.wpms-filterpop select, .wpms-filterpop input{ font-size:16px; } /* Touch: kein iOS-Zoom */
.wpms-fp-reset{ align-self:flex-start; background:none; border:0; color:var(--wpms-teal2); font:inherit; font-size:13px; font-weight:600; cursor:pointer; padding:2px 0; }
.wpms-fp-reset:hover{ text-decoration:underline; }
@media (hover:hover) and (pointer:fine){
	.wpms-filterpop select, .wpms-filterpop input{ font-size:14px; }
}
@media (min-width:641px){
	.wpms-cal-top{ flex-wrap:nowrap; }
	.wpms-cal-right{ flex:0 0 auto; }
}
/* Mobil: Toolbar darf umbrechen; Ansichts-/Filter-Button + „+" bleiben kompakt. */
@media (max-width:640px){
	.wpms-cal-right{ gap:8px; flex-wrap:wrap; }
	.wpms-cal-modes{ flex:1 1 auto; min-width:0; overflow-x:auto; -webkit-overflow-scrolling:touch; }
	.wpms-cal-mode{ flex:0 0 auto; padding:0 14px; }
	.wpms-fab-add{ flex:0 0 auto; }
	.wpms-cal-leftrow{ flex-wrap:wrap; }
	.wpms-cal-leftrow .wpms-fab-add.wpms-fab-mobile{ display:flex; margin-left:auto; }
	.wpms-fab-add.wpms-fab-desktop{ display:none; }
}
/* Mehrfachauswahl in der Einsatz-Liste (Sammel-Rechnungsentwürfe, nur Management). */
.wpms-selbar{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
/* „Rechnungsentwürfe erstellen" genauso groß wie „Auswahl aufheben"/„Abbrechen" (wpms-mini) daneben. */
.wpms-selbar .wpms-selgo{ font-size:13px; padding:6px 12px; border-radius:8px; border:1px solid transparent; height:auto; }
.wpms-selbar .wpms-selgo:disabled{ opacity:.45; cursor:default; }
.wpms-selcount{ font-size:15px; }
.wpms-erow-sel{ position:relative; padding-left:38px; }
.wpms-selbox{ position:absolute; left:14px; top:50%; transform:translateY(-50%); width:11px; height:11px; border:1.5px solid var(--wpms-muted); border-radius:3px; background:transparent; cursor:pointer; box-sizing:border-box; }
/* Größerer, unsichtbarer Klickbereich um die kleine Checkbox (bequem klickbar). */
.wpms-selbox::before{ content:''; position:absolute; inset:-13px; }
.wpms-selbox:hover{ border-color:var(--wpms-teal2); }
.wpms-selbox.is-off{ cursor:default; }
.wpms-selbox.is-off:hover{ border-color:var(--wpms-muted); }
.wpms-selbox.is-on{ background:var(--wpms-teal2); border-color:var(--wpms-teal2); }
.wpms-selbox.is-on::after{ content:'✓'; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:#fff; font-size:8px; font-weight:700; line-height:1; }
.wpms-selbox.is-off{ opacity:.25; }
.wpms-erow.is-dim{ opacity:.55; cursor:default; }
/* Monat */
.wpms-mcal-dows{ display:grid; grid-template-columns:repeat(7,1fr); gap:6px; margin-bottom:6px; }
.wpms-mcal-dows span{ text-align:center; font-size:12px; color:var(--wpms-muted); font-weight:600; }
.wpms-mcal-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }
.wpms-mcal-cell{ min-height:96px; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:10px; padding:6px; display:flex; flex-direction:column; gap:4px; overflow:hidden; }
.wpms-mcal-cell.is-out{ opacity:.45; }
.wpms-mcal-cell.is-today{ border-color:var(--wpms-teal2); }
.wpms-mcal-cell.has-ev{ cursor:pointer; }
.wpms-mcal-dots{ display:flex; flex-wrap:wrap; gap:4px; margin-top:auto; padding-top:4px; }
.wpms-mcal-dot{ width:8px; height:8px; border-radius:50%; background:var(--wpms-teal2); }
.wpms-mcal-d{ font-size:12px; font-weight:600; color:var(--wpms-muted); }
.wpms-mcal-cell.is-today .wpms-mcal-d{ color:var(--wpms-teal); }
.wpms-ev{ display:block; width:100%; text-align:left; border:0; border-radius:6px; padding:3px 6px; font:inherit; font-size:12px; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-ev-t{ font-weight:700; }
/* Woche */
.wpms-wcal{ display:grid; grid-template-columns:repeat(7,1fr); gap:12px; }
.wpms-wcol{ background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:10px; overflow:hidden; display:flex; flex-direction:column; min-height:140px; }
.wpms-wcol-h{ padding:8px; font-size:13px; font-weight:600; text-align:center; border-bottom:1px solid var(--wpms-line); }
.wpms-wcol-h.is-today{ color:var(--wpms-teal2); box-shadow:inset 0 -2px 0 var(--wpms-teal2); }
body.wpms-theme-dark .wpms-wcol-h.is-today{ color:var(--wpms-teal); box-shadow:inset 0 -2px 0 var(--wpms-teal); }
.wpms-wcol-b{ padding:10px; display:flex; flex-direction:column; gap:8px; flex:1; }
.wpms-wcol-empty{ color:var(--wpms-muted); text-align:center; font-size:13px; }
.wpms-wev{ position:relative; display:flex; flex-direction:column; gap:2px; text-align:left; border:0; border-left:3px solid currentColor; border-radius:9px; padding:6px 10px; font:inherit; cursor:pointer; }
.wpms-wev-t{ font-size:11px; font-weight:500; color:var(--wpms-muted); font-variant-numeric:tabular-nums; }
.wpms-wev-n{ font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--wpms-muted); }
.wpms-wev-k{ order:-1; font-size:13px; font-weight:600; color:var(--wpms-text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-wev-o{ font-size:11px; color:var(--wpms-muted); opacity:.85; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* Drag & Drop (Wochenansicht Einsätze): Kachel auf einen anderen Tag ziehen. */
.wpms-wev-draggable{ cursor:grab; }
.wpms-wev-draggable:active{ cursor:grabbing; }
.wpms-wev-dragsrc{ opacity:.35; }
.wpms-wev-ghost{ position:fixed; z-index:9999; margin:0; pointer-events:none; opacity:.96; transform:rotate(1.5deg); box-shadow:0 10px 26px rgba(0,0,0,.35); }
body.wpms-dragging{ cursor:grabbing; user-select:none; -webkit-user-select:none; }
.wpms-wcol.wpms-dnd-over{ outline:2px dashed var(--wpms-teal); outline-offset:-2px; }
.wpms-wcol.wpms-dnd-over .wpms-wcol-b{ background:rgba(46,201,187,.12); background:color-mix( in srgb, var(--wpms-teal) 12%, transparent ); }
.wpms-mcal-cell.wpms-dnd-over{ outline:2px dashed var(--wpms-teal); outline-offset:-2px; background:rgba(46,201,187,.12); background:color-mix( in srgb, var(--wpms-teal) 12%, transparent ); }
/* Abgeschlossene/abgerechnete Einsätze: ausgegraut + halbtransparent + Häkchen. */
.wpms-wev.is-done{ opacity:.5; filter:grayscale(.55); }
.wpms-wev.is-done .wpms-wev-t::before{ content:'✓ '; }
/* Wochenblock in Leistungs-/Kategoriefarbe (wie Einsätze-Übersicht). */
/* ── Leistungs-Farbpalette (14 Hues) ──────────────────────────────────────────
   Jede Leistung bekommt in JS (leistungKey) eine Klasse c0…c13. Hier nur der
   Farbton (--lh) je Slot; die eigentliche Darstellung (Kachel/Pille/Karte)
   leitet Border/Hintergrund/Text daraus per hsl() ab – hell- und dunkelfähig. */
.wpms-wev-l-c0,.wpms-lst-c0,.wpms-card-l-c0{ --lh:0; }
.wpms-wev-l-c1,.wpms-lst-c1,.wpms-card-l-c1{ --lh:138; }
.wpms-wev-l-c2,.wpms-lst-c2,.wpms-card-l-c2{ --lh:275; }
.wpms-wev-l-c3,.wpms-lst-c3,.wpms-card-l-c3{ --lh:53; }
.wpms-wev-l-c4,.wpms-lst-c4,.wpms-card-l-c4{ --lh:190; }
.wpms-wev-l-c5,.wpms-lst-c5,.wpms-card-l-c5{ --lh:328; }
.wpms-wev-l-c6,.wpms-lst-c6,.wpms-card-l-c6{ --lh:105; }
.wpms-wev-l-c7,.wpms-lst-c7,.wpms-card-l-c7{ --lh:243; }
.wpms-wev-l-c8,.wpms-lst-c8,.wpms-card-l-c8{ --lh:20; }
.wpms-wev-l-c9,.wpms-lst-c9,.wpms-card-l-c9{ --lh:158; }
.wpms-wev-l-c10,.wpms-lst-c10,.wpms-card-l-c10{ --lh:295; }
.wpms-wev-l-c11,.wpms-lst-c11,.wpms-card-l-c11{ --lh:73; }
.wpms-wev-l-c12,.wpms-lst-c12,.wpms-card-l-c12{ --lh:210; }
.wpms-wev-l-c13,.wpms-lst-c13,.wpms-card-l-c13{ --lh:348; }
/* Kalenderkachel (Woche + Tagesansicht) */
[class*="wpms-wev-l-c"]{ border-left-color:hsl(var(--lh) 58% 48%); background:var(--wpms-hover); color:var(--wpms-text); }
body.wpms-theme-dark [class*="wpms-wev-l-c"]{ border-left-color:hsl(var(--lh) 55% 62%); background:var(--wpms-hover); color:var(--wpms-text); }
/* „+" pro Tagesspalte (Leitung): dezent, am unteren Rand, hebt sich beim Hover ab. */
.wpms-wcol-add{ margin-top:auto; align-self:stretch; border:1px dashed var(--wpms-line); background:transparent; color:var(--wpms-muted); border-radius:6px; padding:4px 0; font-size:16px; line-height:1; cursor:pointer; opacity:.45; transition:opacity .15s ease, color .15s ease, border-color .15s ease, background .15s ease; }
.wpms-wcol-add:hover{ opacity:1; color:var(--wpms-teal2); border-color:var(--wpms-teal2); background:transparent; }
@media (hover:hover){ .wpms-wcol-add{ opacity:0; } .wpms-wcol:hover .wpms-wcol-add{ opacity:.5; } .wpms-wcol-add:hover{ opacity:1; } }
/* Jahr */
.wpms-ycal{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.wpms-ymon{ background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:12px; padding:10px; cursor:pointer; }
.wpms-ymon:hover{ border-color:var(--wpms-teal2); }
.wpms-ymon-h{ font-weight:700; font-size:14px; margin-bottom:8px; text-align:center; }
.wpms-ymon-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:2px; }
.wpms-yd{ text-align:center; font-size:11px; padding:3px 0; color:var(--wpms-text); border-radius:5px; }
.wpms-yd-h{ color:var(--wpms-muted); font-weight:600; }
.wpms-yd.is-empty{ visibility:hidden; }
.wpms-yd.has-ev{ background:var(--wpms-teal2); color:#fff; font-weight:700; }
.wpms-yd.is-today{ outline:2px solid var(--wpms-teal); }
@media (max-width:760px){
	.wpms-wcal{ grid-template-columns:1fr; }
	.wpms-ycal{ grid-template-columns:repeat(2,1fr); }
	.wpms-mcal-cell{ min-height:62px; }
	.wpms-cal-ptitle{ min-width:120px; font-size:15px; }
	.wpms-wcol-h{ font-size:17px; padding:12px; }
	.wpms-wev{ padding:10px 12px; gap:3px; }
	.wpms-wev-t{ font-size:15px; }
	.wpms-wev-n{ font-size:14px; }
	.wpms-wev-k{ font-size:16px; }
	.wpms-wev-o{ font-size:14px; }
		.wpms-wev-termin{ font-size:11px; padding:1px 8px; }
	/* Einsatz-Detail-Kacheln (Kunde/Einsatzdaten/Stunden) eine Nummer größer */
	.wpms-sidecard h3, .wpms-sec h2{ font-size:19px; }
	.wpms-kundename{ font-size:19px; }
	.wpms-kr{ font-size:16px; }
	.wpms-kr span{ font-size:14px; }
	.wpms-dl{ font-size:17px; }
	.wpms-summe{ font-size:15px; }
	.wpms-std-leist{ font-size:17px; }
	.wpms-std-meta{ font-size:15px; }
	.wpms-std-h{ font-size:15px; }
	.wpms-card strong{ font-size:18px; }
}
.wpms-dcard-list{ display:flex; flex-direction:column; gap:9px; overflow-y:auto; max-height:280px; flex:1; padding:14px 16px; }
.wpms-dentry{ position:relative; display:flex; align-items:flex-start; gap:8px; font-size:12px; line-height:1.35; border-bottom:1px solid var(--wpms-line); padding:0 26px 8px 0; color:var(--wpms-text); background:var(--wpms-card); touch-action:pan-y; user-select:none; -webkit-user-select:none; }
.wpms-dentry:last-child{ border-bottom:0; }
.wpms-dentry-c{ display:flex; flex-direction:column; gap:2px; flex:1; min-width:0; }
.wpms-dentry-t{ font-size:11px; color:var(--wpms-muted); }
.wpms-dentry-who{ color:var(--wpms-text); opacity:.8; }
.wpms-lbl-hint{ color:var(--wpms-muted); font-weight:400; font-size:12px; }
.wpms-typewahl{ display:flex; gap:8px; margin-bottom:14px; }
/* Wie .wpms-check: `.wpms-form label{display:grid}` + `input{width:100%}` (höhere Spezifität)
   würden den Radio sonst ÜBER den Text stapeln → Flex + width:auto erzwingen.
   Höhe 46px = wie alle anderen Formularfelder. */
.wpms-typeopt,.wpms-form label.wpms-typeopt{ flex:1; display:flex; align-items:center; justify-content:center; gap:7px; padding:10px 12px; height:46px; min-height:46px; box-sizing:border-box; border:1px solid var(--wpms-line); border-radius:10px; cursor:pointer; background:var(--wpms-input); user-select:none; }
.wpms-typeopt:has(input:checked){ border-color:var(--wpms-teal); background:rgba(31,189,176,.12); color:var(--wpms-teal); font-weight:600; }
.wpms-typeopt input{ width:auto !important; min-width:0; flex:0 0 auto; accent-color:var(--wpms-teal); }
/* Desktop-Formularraster: Typewahl unten bündig mit den Eingabefeldern der gleichen Zeile. */
@media (min-width:900px){ .wpms-view .wpms-form > .wpms-typewahl{ align-self:end; margin-bottom:0; } }
/* ×-Button immer sichtbar (auch Touch) – zuverlässiges Löschen unabhängig vom Swipe. */
.wpms-dentry-x{ position:absolute; top:-4px; right:-4px; background:none; border:0; color:var(--wpms-muted); font-size:22px; line-height:1; cursor:pointer; padding:4px 8px; }
/* Desktop: Ausblenden-× erst beim Überfahren der Zeile zeigen (ruhigeres Bild); Touch zeigt es immer. */
@media (hover:hover){
	.wpms-dentry-x{ opacity:0; transition:opacity .15s; }
	.wpms-dentry:hover .wpms-dentry-x, .wpms-dentry-x:focus-visible{ opacity:1; }
}
.wpms-dentry-x:hover{ color:#c0392b; }
/* Letzten Eintrag-Rahmen auch in der Wisch-Hülle entfernen. */
.wpms-sw:last-child .wpms-dentry{ border-bottom:0; }

/* ---- Wisch-Löschen (Tablet/Handy): roter „Löschen"-Streifen hinter der Zeile ---- */
/* flex:0 0 auto = Hülle darf in Flex-Listen (Dashboard, max-height+scroll) NICHT
   schrumpfen; sonst quetscht overflow:hidden alle Einträge in den Frame. */
.wpms-sw{ position:relative; overflow:hidden; flex:0 0 auto; }
.wpms-sw-inline{ display:inline-block; max-width:100%; vertical-align:top; }
.wpms-sw-del{ position:absolute; top:0; right:0; bottom:0; width:88px; border:0; margin:0; padding:0;
	background:#c0392b; color:#fff; font:inherit; font-weight:700; font-size:15px; cursor:pointer;
	display:flex; align-items:center; justify-content:center; white-space:nowrap; }
.wpms-sw-del:active{ background:#a5301f; }
.wpms-sw-surf{ position:relative; will-change:transform; touch-action:pan-y; background:var(--wpms-card); }
/* Auf Touch-Geräten ersetzt das Wischen den „×" – dort wo gewischt werden kann,
   blenden wir den „×" aus (Desktop hat keine Hülle → „×" bleibt als Lösch-Weg). */
.wpms-sw-surf .wpms-dentry-x,
.wpms-sw-surf .wpms-dok-del,
.wpms-sw-surf .wpms-mitpartner-del,
.wpms-sw-surf .wpms-msg-del{ display:none; }
/* Ohne „×" braucht der Dashboard-Eintrag rechts keinen Extra-Platz mehr. */
.wpms-sw-surf .wpms-dentry{ padding-right:12px; }

/* Breite Kachel (2 Spalten): Stunden-Diagramm unter Chat + Übersicht. */
.wpms-dcard-wide{ grid-column:span 2; }
.wpms-chart{ flex:1; padding:18px 16px 14px; display:flex; }
/* Linien-Diagramm „Erfasste Stunden" */
.wpms-line{ width:100%; max-width:840px; height:auto; display:block; }
.wpms-line-wide{ max-width:none; }
/* Stunden-Diagramm: Filter im grünen Header rechts; Diagramm füllt die Kachelhöhe (Pixel-Raum-SVG). */
.wpms-stunden-card .wpms-stunden-head{ background:transparent; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px 6px; }
.wpms-stunden-card .wpms-stunden-head h3{ background:transparent; padding:0; }
.wpms-stunden-title{ margin:0; font-size:15px; font-weight:700; color:#fff; }
.wpms-stunden-tabs{ display:flex; gap:12px; flex:0 0 auto; }
.wpms-stunden-metric{ display:flex; gap:14px; flex:0 0 auto; }
.wpms-stunden-head .wpms-krech-tab{ color:var(--wpms-muted); font-size:13px; padding:2px 1px; }
.wpms-stunden-head .wpms-krech-tab:hover{ color:var(--wpms-text); }
.wpms-stunden-head .wpms-krech-tab.is-active{ color:var(--wpms-teal); }
/* Metrik-Umschalter (Stunden/Umsatz) etwas größer = Titelrolle. */
.wpms-stunden-metric .wpms-krech-tab{ font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
.wpms-stunden-chart{ display:flex; padding:10px 12px 8px; }
.wpms-stunden-plot{ flex:1 1 auto; min-width:0; min-height:0; position:relative; }
/* Hover-Tooltip am Datenpunkt: Wert + Zeitraum-Label. */
.wpms-st-tip{ position:absolute; z-index:5; transform:translate(-50%,calc(-100% - 12px)); pointer-events:none; white-space:nowrap; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:9px; box-shadow:0 6px 20px rgba(0,0,0,.28); padding:7px 10px; display:flex; flex-direction:column; gap:1px; line-height:1.2; }
.wpms-st-tip[hidden]{ display:none; }
.wpms-st-tip.is-left{ transform:translate(-8px,calc(-100% - 12px)); }
.wpms-st-tip.is-right{ transform:translate(calc(-100% + 8px),calc(-100% - 12px)); }
.wpms-st-tip::after{ content:''; position:absolute; left:50%; bottom:-5px; width:9px; height:9px; margin-left:-5px; background:var(--wpms-card); border-right:1px solid var(--wpms-line); border-bottom:1px solid var(--wpms-line); transform:rotate(45deg); }
.wpms-st-tip.is-left::after{ left:12px; }
.wpms-st-tip.is-right::after{ left:auto; right:12px; margin-left:0; }
.wpms-st-tip-v{ font-size:15px; font-weight:700; color:var(--wpms-text); }
.wpms-st-tip-l{ font-size:12px; color:var(--wpms-muted); }
.wpms-st-svg{ width:100%; height:100%; display:block; }
.wpms-st-ax{ fill:var(--wpms-muted); font-size:12px; }
.wpms-st-m{ fill:var(--wpms-muted); font-size:12px; }
.wpms-st-dot{ fill:var(--wpms-teal2); transform-box:fill-box; transform-origin:center; }
.wpms-st-last{ fill:var(--wpms-text); font-size:13px; font-weight:700; }
/* Linie zeichnet sich beim Laden + bei jedem Umschalten ein (nur wenn .is-anim gesetzt ist – nicht beim Poll/Resize). */
.wpms-st-svg.is-anim .wpms-st-path{ stroke-dasharray:1; animation:wpms-line-grow .75s ease-out .05s both; }
.wpms-st-svg.is-anim .wpms-st-area{ opacity:0; animation:wpms-fade .5s ease .35s forwards; }
.wpms-st-svg.is-anim .wpms-st-dot{ opacity:0; animation:wpms-pop .4s cubic-bezier(.34,1.56,.64,1) both; }
@media (prefers-reduced-motion: reduce){
	.wpms-st-svg.is-anim .wpms-st-path,
	.wpms-st-svg.is-anim .wpms-st-area,
	.wpms-st-svg.is-anim .wpms-st-dot{ animation:none; opacity:1; stroke-dashoffset:0; }
}

/* Dashboard-Kachel „Offene Rechnungen": zwei Summen-Kacheln (Offen / Mahnung fällig), keine Einzelliste. */
.wpms-offrech{ flex-direction:column; align-items:stretch; justify-content:stretch; gap:12px; padding:14px 16px; }
/* Einträge übereinander: schlichte Zeilen (KEINE Kachel), nur dezente Trennlinie. Label+Anzahl links, Betrag rechts. */
.wpms-offrech-rows{ display:flex; flex-direction:column; gap:0; flex:0 0 auto; }
.wpms-offrech-kpi{ flex:0 0 auto; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:15px 2px; border-bottom:1px solid var(--wpms-line); }
.wpms-dcard.wpms-offrech-card{ height:auto; min-height:336px; }
.wpms-offrech-rows .wpms-offrech-kpi:last-child{ border-bottom:0; }
/* Betraege einheitlich in Textfarbe; nur Mahnung bleibt rot. */
.wpms-offrech-info{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.wpms-offrech-kl{ font-size:13px; font-weight:600; color:var(--wpms-text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-offrech-kc{ font-size:12px; color:var(--wpms-muted); white-space:nowrap; }
.wpms-offrech-kv{ flex:0 0 auto; font-size:15px; font-weight:700; color:var(--wpms-text); white-space:nowrap; }
.wpms-offrech-kpi.is-mahn .wpms-offrech-kv{ color:#d9776b; }

/* Anteil-Balken: wie viel des offenen Betrags zur Mahnung fällig ist. */
.wpms-offrech-bar{ flex:0 0 auto; height:8px; border-radius:5px; background:var(--wpms-hover); overflow:hidden; }
.wpms-offrech-barfill{ display:block; height:100%; border-radius:5px; background:#d9776b; }
.wpms-offrech-barlbl{ flex:0 0 auto; font-size:12px; color:var(--wpms-muted); text-align:right; margin-top:-4px; }

/* Dashboard-Kachel „Dokument hochladen". */
.wpms-docup{ flex-direction:column; align-items:stretch; gap:12px; padding:16px; overflow-y:auto; }
.wpms-docup-l{ font-size:13px; color:var(--wpms-muted); }
/* Empfänger: Mehrfachauswahl (Chips) + Suche; „An alle" blendet die Suche aus. */
.wpms-docup-recip{ display:flex; flex-direction:column; gap:8px; }
.wpms-docup-chips{ display:flex; flex-wrap:wrap; gap:6px; }
.wpms-docup-chips:empty{ display:none; }
.wpms-docup-allchip{ background:rgba(31,189,176,.16); }
.wpms-docup-recip.is-alle .wpms-docup-search{ display:none; }
.wpms-docup-search{ position:relative; }
.wpms-docup-search input{ width:100%; box-sizing:border-box; padding:10px 12px; border:1px solid var(--wpms-line); border-radius:9px; background:var(--wpms-input); color:var(--wpms-text); font:inherit; }
/* #wpms-app-Präfix nötig: sonst gewinnt #wpms-app input{ font-size:16px } (ID, iOS-Zoom-Schutz) über die Klasse.
   Touch behält 16px (kein iOS-Zoom beim Fokus), nur Desktop (hover:fine) verkleinert. */
@media (hover:hover) and (pointer:fine){ #wpms-app .wpms-docup-search input{ font-size:12px; } }
/* Dokumentart-Dropdown – exakt wie das Empfänger-Suchfeld formatiert. */
.wpms-docup-kat{ width:100%; box-sizing:border-box; padding:10px 12px; border:1px solid var(--wpms-line); border-radius:9px; background:var(--wpms-input); color:var(--wpms-text); font:inherit; }
@media (hover:hover) and (pointer:fine){ #wpms-app .wpms-docup-kat{ font-size:12px; } }
/* Dropdown genau so hoch wie das Suchfeld + Fokus in dunklem Grün statt nativem Blau. */
.wpms-docup-search input, .wpms-docup-kat{ height:42px; }
.wpms-docup-search input:focus, .wpms-docup-kat:focus{ outline:none; border-color:#00635E; box-shadow:0 0 0 2px rgba(0,99,94,.35); }
/* „Alle Empfänger"-Option im Suchfeld-Dropdown – dezent hervorgehoben. */
.wpms-docup-optall{ font-weight:600; color:var(--wpms-teal2); }
.wpms-docup-optall small{ color:var(--wpms-muted); font-weight:400; }
/* Drag-&-Drop-Upload-Zone (nutzt .wpms-dropzone-Optik). */
.wpms-docup-zone{ padding:26px 16px; flex:1; }
.wpms-docup-zi{ display:flex; flex-direction:column; align-items:center; gap:10px; font-size:13px; }
.wpms-docup-zi svg{ opacity:.7; }
.wpms-docup-zt{ display:flex; flex-direction:column; gap:2px; }
.wpms-docup-zt strong{ color:var(--wpms-text); font-weight:600; font-size:14px; }
.wpms-docup-zt em{ font-style:normal; color:var(--wpms-muted); font-size:12px; }
.wpms-docup-zone .wpms-docup-fname{ color:var(--wpms-text); font-weight:600; word-break:break-word; }
.wpms-docup-zone .wpms-docup-fname:not(:empty){ background:var(--wpms-card); border:1px solid var(--wpms-teal); border-radius:999px; padding:6px 14px; font-size:13px; }
/* „Unterschrift anfordern" + „Hochladen" so breit wie die Upload-Zone (volle Breite). */
/* „Unterschrift anfordern" + „Hochladen" in derselben Form wie das Suchfeld (Rechteck, 9px statt Pille). */
.wpms-docup-sig{ display:flex; justify-content:center; align-self:stretch; border-radius:9px; }
.wpms-docup-go{ align-self:stretch; width:100%; border-radius:9px; }
.wpms-docup-go:disabled{ opacity:.5; cursor:not-allowed; }
.wpms-docup-msg{ text-align:center; }
.wpms-docup-ok{ color:var(--wpms-teal); }
.wpms-docup-err{ color:#d9776b; }

/* Archiv „Unterschriebene Dokumente" (Management-Dokumente-Seite): Jahr › Monat › Zeilen. */
.wpms-udrow{ display:flex; flex-direction:row; align-items:center; gap:6px; border-top:1px solid var(--wpms-line); background:var(--wpms-card); }
.wpms-udrow:first-child{ border-top:0; }
.wpms-udrow-main{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; align-items:flex-start; text-align:left; background:none; border:0; padding:10px 12px; cursor:pointer; color:var(--wpms-text); }
.wpms-udrow-main:hover{ background:var(--wpms-hover); }
.wpms-udrow-name{ font-weight:600; }
.wpms-udrow-del{ flex:0 0 auto; width:30px; height:30px; padding:0; border-radius:50%; background:var(--wpms-hover); border:0; color:var(--wpms-muted); font-size:17px; line-height:1; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.wpms-udrow-del:hover{ background:#c0392b; color:#fff; }
/* Mehrseitige PDF-Vorschau (pdf.js) */
.wpms-docview-body{ overflow:auto; -webkit-overflow-scrolling:touch; }
.wpms-docview-load{ padding:40px 16px; text-align:center; color:var(--wpms-text); opacity:.65; }
.wpms-pdfpages{ max-width:900px; margin:0 auto; padding:14px 12px; display:flex; flex-direction:column; align-items:center; gap:14px; }
.wpms-pdfpage{ display:block; width:100%; height:auto; background:#fff; border-radius:4px; box-shadow:0 2px 12px rgba(0,0,0,.25); }
.wpms-sig-card{ margin-top:14px; padding:14px; border:1px solid var(--wpms-line); border-radius:12px; background:var(--wpms-card); }
.wpms-sig-hint{ margin:4px 0 10px; font-size:13px; color:var(--wpms-muted); }
.wpms-sig-preview{ min-height:70px; display:flex; align-items:center; justify-content:center; background:#fff; border:1px dashed var(--wpms-line); border-radius:10px; padding:10px; }
.wpms-sig-preview img{ max-height:90px; max-width:100%; object-fit:contain; }
.wpms-sig-none{ color:var(--wpms-muted); font-size:13px; }
.wpms-sig-actions{ display:flex; gap:10px; margin-top:12px; flex-wrap:wrap; }
.wpms-offrech-empty{ padding:10px 2px; }
.wpms-offrech-list{ display:flex; flex-direction:column; }
.wpms-offrech-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 4px; border-top:1px solid var(--wpms-line); text-decoration:none; color:var(--wpms-text); }
.wpms-offrech-list > .wpms-offrech-row:first-child{ border-top:0; }
.wpms-offrech-row:hover{ background:var(--wpms-hover); }
.wpms-offrech-main{ display:flex; flex-direction:column; gap:1px; min-width:0; }
.wpms-offrech-k{ font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-offrech-sub{ font-size:12px; color:var(--wpms-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-offrech-row.is-mahn .wpms-offrech-sub{ color:#d9776b; }
.wpms-offrech-amt{ flex:0 0 auto; font-weight:600; white-space:nowrap; }
.wpms-chart-legend{ display:flex; flex-wrap:wrap; gap:6px 14px; padding:10px 14px 4px; }
.wpms-leg{ display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--wpms-muted); }
.wpms-leg i{ width:16px; height:3px; border-radius:2px; display:inline-block; flex:0 0 auto; }
.wpms-line-dot{ fill:var(--wpms-teal2); transform-box:fill-box; transform-origin:center; }
.wpms-line-dot.is-now{ stroke:var(--wpms-card); stroke-width:1.5; }
.wpms-line-grid{ stroke:var(--wpms-line); stroke-width:0.75; opacity:.9; }
.wpms-line-ax{ fill:var(--wpms-muted); font-size:11px; }
.wpms-line-m{ fill:var(--wpms-muted); font-size:11px; }
.wpms-line-m.is-now{ fill:var(--wpms-text); }
@media (max-width:760px){
	.wpms-dcards{ grid-template-columns:1fr; }
	.wpms-dcard{ min-height:0; }
	.wpms-dcard-wide{ grid-column:auto; }
}
/* Übersicht als Menü-Kachel */
.wpms-menucard{ display:flex; flex-direction:column; }
.wpms-menurow{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 16px; border:0; border-bottom:1px solid var(--wpms-line); background:none; font:inherit; font-size:12px; color:var(--wpms-text); cursor:pointer; text-align:left; width:100%; }
.wpms-menurow:last-child{ border-bottom:0; }
.wpms-menurow:hover{ background:var(--wpms-hover); }
.wpms-menurow-v{ font-weight:700; font-size:12px; color:var(--wpms-teal); background:rgba(31,189,176,.14); padding:2px 12px; border-radius:999px; min-width:30px; text-align:center; flex:0 0 auto; }
.wpms-menurow-v.is-alert{ color:#c0392b; background:rgba(192,57,43,.12); }
body.wpms-theme-dark .wpms-menurow-v.is-alert{ color:#ff6b6b; background:rgba(231,76,60,.2); }

/* Kleines „offen"-Optin neben der Endzeit */
.wpms-form .wpms-mini-check,.wpms-mini-check{ display:inline-flex; align-items:center; gap:8px; margin-top:7px; font-size:13px; font-weight:400; color:var(--wpms-muted); cursor:pointer; }
.wpms-mini-check input{ width:auto !important; min-width:0; flex:0 0 auto; margin:0; accent-color:var(--wpms-teal2); }
.wpms-tiles{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,185px)); gap:14px; justify-content:start; }
.wpms-tile{ text-align:left; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:16px; padding:18px 18px 16px; cursor:pointer; display:flex; flex-direction:column; gap:4px; font:inherit; transition:border-color .15s, transform .1s; }
.wpms-tile:hover{ border-color:var(--wpms-teal2); transform:translateY(-2px); }
.wpms-tile-v{ font-size:30px; font-weight:700; line-height:1; color:var(--wpms-text); }
.wpms-tile-l{ font-size:14px; color:var(--wpms-muted); }
.wpms-tone-offen{ border-left:4px solid #1c5bd6; }
.wpms-tone-in_arbeit{ border-left:4px solid #a9700a; }
.wpms-tone-erledigt{ border-left:4px solid #00635E; }
.wpms-tone-alert{ border-left:4px solid #c0392b; }
.wpms-tone-alert .wpms-tile-v{ color:#c0392b; }
.wpms-tone-neutral{ border-left:4px solid var(--wpms-teal2); }
.wpms-dash .wpms-card span{ display:block; }

/* ---- Mitteilungen (1:1 mit Leitung) ---- */
.wpms-mitpartner{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.wpms-mitpartner-del{ flex:0 0 auto; margin-left:auto; background:none; border:0; color:var(--wpms-muted); font-size:22px; line-height:1; cursor:pointer; padding:4px 8px; }
.wpms-mitpartner-del:hover{ color:#c0392b; }
.wpms-mitpartner-l{ display:flex; align-items:center; gap:12px; min-width:0; }
.wpms-mitpartner-tx{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.wpms-badge{ flex:0 0 auto; background:#c0392b; color:#fff; border-radius:999px; padding:2px 10px; font-size:13px; font-weight:700; }
.wpms-msg-del{ align-self:center; background:none; border:0; color:var(--wpms-muted); font-size:18px; line-height:1; cursor:pointer; padding:2px 6px; opacity:.55; flex:0 0 auto; }
.wpms-msg-del:hover{ color:#c0392b; opacity:1; }
.wpms-picker-search{ width:100%; box-sizing:border-box; margin-top:14px; padding:11px 14px; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-input); color:var(--wpms-text); font:inherit; font-size:15px; }
.wpms-picker-search:focus{ outline:none; border-color:var(--wpms-teal2); }
.wpms-picker{ display:flex; flex-direction:column; gap:6px; margin:10px 0 18px; max-height:320px; overflow-y:auto; }
.wpms-picker-it{ display:flex; align-items:center; justify-content:space-between; gap:10px; text-align:left; padding:12px 14px; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-input); color:var(--wpms-text); font:inherit; font-size:15px; cursor:pointer; }
.wpms-picker-it:hover{ border-color:var(--wpms-teal2); }
.wpms-picker-rolle{ flex:0 0 auto; font-size:11px; font-weight:700; color:var(--wpms-teal); background:rgba(31,189,176,.14); border-radius:999px; padding:2px 9px; }

/* ---- Online-Anzeige (rechts im Chat) ---- */
.wpms-chat-wrap{ display:flex; gap:16px; align-items:stretch; }
.wpms-chat-wrap .wpms-chat{ flex:1; max-width:none; }
/* Mitteilungs-Chat: Chatfenster + Eingabe (Nachricht/Mic/Senden) exakt gleich breit. */
.wpms-mit-wrap{ display:flex; flex-direction:column; gap:12px; }
.wpms-mit-wrap .wpms-chat{ max-width:none; width:100%; }
.wpms-mit-wrap .wpms-chat-form{ max-width:none; width:100%; margin-top:0; }
.wpms-online{ flex:0 0 260px; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:14px; padding:14px; display:flex; flex-direction:column; overflow:hidden; }
.wpms-online-h{ flex:0 0 auto; margin:0 0 12px; font-size:14px; color:var(--wpms-muted); }
.wpms-online-list{ flex:1; min-height:0; overflow-y:auto; margin:0 -6px; padding:0 6px; }
.wpms-online-it{ display:flex; align-items:center; gap:10px; padding:6px 0; }
.wpms-online-av{ position:relative; width:32px; height:32px; flex:0 0 auto; border-radius:50%; overflow:hidden; background:var(--wpms-teal2); display:flex; align-items:center; justify-content:center; }
.wpms-online-av img{ width:100%; height:100%; object-fit:cover; }
.wpms-online-av .wpms-avatar-ini{ font-size:13px; color:#fff; }
.wpms-online-dot{ position:absolute; right:-1px; bottom:-1px; width:11px; height:11px; border-radius:50%; background:#00635E; border:2px solid var(--wpms-card); }
.wpms-online-dot.is-on{ background:#00635E; }
.wpms-online-dot.is-off{ background:#c0392b; }
.wpms-online-tx{ display:flex; flex-direction:column; min-width:0; }
.wpms-online-n{ font-size:14px; color:var(--wpms-text); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-online-sub{ font-size:12px; color:var(--wpms-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-online-empty{ color:var(--wpms-muted); font-size:13px; }
@media (max-width:760px){ .wpms-online{ display:none; } }

/* ---- Updates-Chat ---- */
.wpms-chat-push{ max-width:760px; }
.wpms-pushbar{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; background:rgba(31,189,176,.12); border:1px solid rgba(31,189,176,.4); color:var(--wpms-teal); border-radius:12px; padding:10px 14px; margin-bottom:14px; font-size:14px; }
.wpms-pushbar.is-off{ background:#fdeceb; border-color:#e3a3a0; color:#c0392b; }
.wpms-pushbar.is-on{ background:#e2f7e9; border-color:#9ad7b1; color:#00635E; }
.wpms-pushbar span{ flex:1; min-width:120px; }
.wpms-chat{ max-width:760px; width:100%; box-sizing:border-box; height:calc(100vh - 280px); min-height:300px; overflow-y:auto; overflow-x:hidden; display:flex; flex-direction:column; gap:8px; padding:14px; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:14px; }
.wpms-msgrow{ display:flex; gap:8px; align-items:flex-end; max-width:86%; align-self:flex-start; min-width:0; }
.wpms-msgrow.is-mine{ align-self:flex-end; flex-direction:row-reverse; }
.wpms-msgav{ width:30px; height:30px; border-radius:50%; overflow:hidden; flex:0 0 auto; background:var(--wpms-teal2); display:flex; align-items:center; justify-content:center; }
.wpms-msgav img{ width:100%; height:100%; object-fit:cover; }
.wpms-msgav .wpms-avatar-ini{ font-size:12px; color:#fff; }
.wpms-msg{ position:relative; background:var(--wpms-bubble); border-radius:14px; padding:8px 12px; display:flex; flex-direction:column; gap:2px; min-width:0; }
.wpms-msg-del{ position:absolute; top:2px; right:4px; background:none; border:0; color:var(--wpms-muted); font-size:17px; line-height:1; cursor:pointer; padding:2px 5px; border-radius:6px; opacity:0; transition:opacity .15s; }
.wpms-msg:hover .wpms-msg-del{ opacity:.65; }
.wpms-msg-del:hover{ opacity:1; color:#fff; background:#c0392b; }
@media (hover:none){ .wpms-msg-del{ opacity:.5; } }
.wpms-msg.is-mine{ background:rgba(31,189,176,.18); }
.wpms-msg-from{ font-size:12px; font-weight:700; color:var(--wpms-teal); }
.wpms-msg-to{ font-size:11px; font-weight:600; color:var(--wpms-muted); background:rgba(31,189,176,.12); align-self:flex-start; padding:0 7px; border-radius:8px; }
.wpms-msg.is-mine .wpms-msg-to{ align-self:flex-end; }
.wpms-msg-text{ font-size:14px; line-height:1.4; word-break:break-word; }
.wpms-msg-time{ font-size:11px; color:#9097a0; align-self:flex-end; }
/* Lesebestätigung an eigenen Nachrichten */
.wpms-msg-read{ margin-left:5px; color:var(--wpms-teal2); font-size:11px; letter-spacing:-1px; font-weight:700; }
.wpms-chat-form{ display:flex; flex-direction:column; gap:8px; margin-top:12px; }
.wpms-chat-ziel{ align-self:flex-start; font:inherit; font-size:14px; padding:9px 16px; border:1px solid var(--wpms-line); border-radius:999px; background:var(--wpms-input); color:var(--wpms-text); max-width:100%; cursor:pointer; }
.wpms-chat-ziel:focus{ outline:none; border-color:var(--wpms-teal2); }
.wpms-chat-input{ display:flex; gap:10px; align-items:flex-end; max-width:100%; }
.wpms-ta-wrap{ flex:1; min-width:0; position:relative; display:flex; }
.wpms-chat-input textarea{ flex:1; width:100%; min-width:0; box-sizing:border-box; font:inherit; resize:none; padding:11px 16px; border:1px solid var(--wpms-line); border-radius:22px; max-height:120px; background:var(--wpms-input); color:var(--wpms-text); }
.wpms-chat-input textarea:focus{ outline:none; border-color:var(--wpms-teal2); } /* kein blaues Browser-Outline, sondern dunkelgrün */
.wpms-mention{ display:none; position:absolute; left:0; bottom:100%; margin-bottom:8px; min-width:200px; max-width:280px; max-height:220px; overflow-y:auto; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:14px; box-shadow:0 6px 22px rgba(0,0,0,.2); z-index:25; }
.wpms-mention-it{ display:block; width:100%; text-align:left; padding:10px 14px; border:0; background:none; font:inherit; font-size:14px; color:var(--wpms-text); cursor:pointer; }
.wpms-mention-it:hover{ background:var(--wpms-hover); }
.wpms-mention-tag{ color:var(--wpms-teal); font-weight:700; }
.wpms-chat-input .wpms-btn{ flex:0 0 auto; align-self:flex-end; height:46px; border-radius:22px; padding:0 22px; }
.wpms-mic{ order:-1; flex:0 0 auto; align-self:flex-end; width:46px; height:46px; display:flex; align-items:center; justify-content:center; border:1px solid var(--wpms-line); border-radius:22px; background:var(--wpms-input); color:var(--wpms-teal); cursor:pointer; }
.wpms-mic .wpms-ic{ width:20px; height:20px; }
.wpms-send{ flex:0 0 auto; align-self:flex-end; width:46px; height:46px; min-width:46px; display:flex; align-items:center; justify-content:center; border:0; border-radius:22px; background:var(--wpms-teal2); color:#fff; cursor:pointer; }
.wpms-send .wpms-ic{ width:20px; height:20px; }
.wpms-send:hover{ filter:brightness(1.08); }
.wpms-mic.is-rec{ background:#c0392b; border-color:#c0392b; color:#fff; animation:wpms-pulse 1s ease-in-out infinite; }
@keyframes wpms-pulse{ 50%{ opacity:.6; } }
@media (max-width:760px){ .wpms-chat{ height:calc(100vh - 260px); } }

/* ---- PWA-Installations-Hinweis ---- */
.wpms-install{ display:flex; align-items:center; gap:10px; padding:9px 16px 9px 24px; background:rgba(31,189,176,.14); border-bottom:1px solid var(--wpms-line); color:var(--wpms-text); font-size:14px; }
.wpms-install-ic{ flex:0 0 auto; }
.wpms-install-tx{ flex:1; min-width:0; }
.wpms-install-go{ flex:0 0 auto; background:var(--wpms-teal2); color:#fff; border:0; border-radius:999px; padding:6px 14px; font:inherit; font-size:13px; font-weight:600; cursor:pointer; white-space:nowrap; }
.wpms-modal-ov{ position:fixed; inset:0; z-index:90; background:rgba(0,0,0,.5); display:flex; align-items:center; justify-content:center; padding:20px; }
.wpms-modal{ background:var(--wpms-card); border-radius:18px; padding:24px; max-width:380px; width:100%; color:var(--wpms-text); box-shadow:0 12px 40px rgba(0,0,0,.25); }
.wpms-modal h2{ margin:0 0 14px; font-size:18px; }
.wpms-install-steps{ margin:0 0 18px; padding-left:20px; display:flex; flex-direction:column; gap:10px; line-height:1.45; font-size:15px; }
@media (max-width:760px){ .wpms-install{ padding-left:18px; font-size:13px; } }

/* ---- Mitteilungs-Banner ---- */
.wpms-banner{ display:flex; align-items:center; gap:10px; background:#00635E; color:#fff; padding:10px 16px; position:sticky; top:58px; z-index:25; box-shadow:0 2px 6px rgba(0,0,0,.12); }
body.admin-bar .wpms-banner{ top:90px; }
.wpms-banner-ic{ flex:0 0 auto; }
.wpms-banner-tx{ flex:1; font-size:14px; font-weight:600; cursor:pointer; }
.wpms-banner-x{ flex:0 0 auto; background:rgba(255,255,255,.2); border:0; color:#fff; width:26px; height:26px; border-radius:50%; font-size:18px; line-height:1; cursor:pointer; }
.wpms-banner-x:hover{ background:rgba(255,255,255,.35); }

/* Stunden-Auswertung */
.wpms-sthead{ display:flex; align-items:baseline; gap:14px; flex-wrap:wrap; margin-bottom:14px; }
.wpms-sthead h1{ margin:0; }
.wpms-sthead{ align-items:center; }
.wpms-sthead-exp{ margin:0 0 0 auto; }
.wpms-stgroup{ margin-top:28px; }
.wpms-stgroup h2{ display:flex; align-items:baseline; gap:12px; margin:0 0 12px; font-size:17px; }
.wpms-sttable-wrap{ overflow-x:auto; border:1px solid var(--wpms-line); border-radius:14px; background:var(--wpms-card); }
/* Handy: Stunden als aufklappbare Karten statt breiter Tabelle (kein Querscrollen). */
@media (max-width:760px){ .wpms-sttable-wrap{ border:0; background:transparent; overflow:visible; } }
.wpms-stcard{ background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:12px; margin-bottom:8px; overflow:hidden; }
.wpms-stcard.is-pending{ border-color:#c0392b; }
.wpms-stcard-head{ width:100%; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 14px; background:none; border:0; color:var(--wpms-text); cursor:pointer; text-align:left; font:inherit; }
.wpms-stcard-l{ display:flex; align-items:baseline; gap:8px; min-width:0; }
.wpms-stcard-h{ font-weight:700; font-size:15px; flex:0 0 auto; }
.wpms-stcard-leist{ color:var(--wpms-muted); font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-stcard-r{ display:flex; align-items:center; gap:6px; flex:0 0 auto; color:var(--wpms-muted); font-size:13px; white-space:nowrap; }
.wpms-stcard-chev{ color:var(--wpms-muted); font-size:12px; }
.wpms-st-ist{ display:block; }
.wpms-st-soll{ display:block; margin-top:2px; font-size:11px; font-weight:600; color:var(--wpms-muted); }
/* Drei-Punkte-Aktionsmenue */
.wpms-kebab{ width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center; border:0; border-radius:9px; background:transparent; color:var(--wpms-muted); cursor:pointer; transition:color .15s, background .15s; }
.wpms-kebab:hover{ color:var(--wpms-text); background:var(--wpms-hover); }
.wpms-kebab-menu{ position:fixed; z-index:10050; min-width:180px; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:11px; box-shadow:0 10px 30px rgba(0,0,0,.38); padding:6px; display:flex; flex-direction:column; gap:2px; }
.wpms-kebab-it{ width:100%; text-align:left; background:none; border:0; color:var(--wpms-text); font:inherit; font-size:14px; padding:9px 12px; border-radius:8px; cursor:pointer; white-space:nowrap; }
.wpms-kebab-it:hover{ background:var(--wpms-hover); }
.wpms-kebab-it.is-primary{ font-weight:600; }
.wpms-kebab-it.is-danger{ color:#c0392b; }
.wpms-st-klaersp{ white-space:nowrap; text-align:left; width:1%; padding-left:6px; padding-right:6px; }
body.wpms-theme-dark .wpms-kebab-it.is-danger{ color:#ff6b6b; }

.wpms-stcard-soll{ display:block; margin-top:1px; font-size:11px; font-weight:600; color:var(--wpms-muted); }
.wpms-stcard-body{ padding:12px 14px 14px; display:flex; flex-direction:column; gap:8px; border-top:1px solid var(--wpms-line); }
.wpms-stcard-act{ display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; }
.wpms-stcard-act .wpms-mini{ flex:1 1 40%; text-align:center; }
/* Stunden: Filter-Leiste (Monat + Suche) + aufklappbare Mitarbeiter-Liste */
.wpms-st-ctrl{ display:flex; flex-wrap:wrap; gap:10px; margin:16px 0 12px; }
/* Jahr/Monat-Dropdowns exakt so hoch wie das Mitarbeiter-Suchfeld darunter (.wpms-ss-input):
   beide bekommen eine FESTE Höhe (46px), damit select vs. input keine Eigenhöhen mitbringen. */
.wpms-st-month,.wpms-st-year,.wpms-st-search{ font:inherit; font-size:14px; height:46px; padding:0 14px; box-sizing:border-box; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-input); color:var(--wpms-text); }
.wpms-st-month,.wpms-st-year{ flex:1 1 0; min-width:0; }
.wpms-st-search{ flex:1; min-width:160px; }
.wpms-st-list{ display:flex; flex-direction:column; gap:6px; margin-top:14px; }
/* Stunden-Erfassungsformular: aufgeräumtes 2-Spalten-Raster, kompaktere einheitliche Felder. */
.wpms-std-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:12px; }
.wpms-std-form label{ margin-bottom:12px; }
.wpms-std-grid label{ margin-bottom:0; }
.wpms-std-form input:not([type=checkbox]):not([type=radio]), .wpms-std-form select{ height:42px; min-height:42px; font-size:14px; }
/* Datumsfeld auf dieselben 42px wie die übrigen Stunden-Felder. #wpms-app-Präfix nötig,
   sonst gewinnt #wpms-app input[type=date]{ height:46px } (ID) → Feld wäre 4px höher. */
#wpms-app .wpms-std-form input[type=date], .wpms-drawer-body .wpms-std-form input[type=date]{ height:42px; min-height:42px; }
.wpms-std-form .wpms-btn{ display:block; width:100%; padding:11px 18px; font-size:14px; }
@media (max-width:760px){ .wpms-std-grid{ grid-template-columns:1fr; } }
/* Desktop: die vier Erfass-Felder (Mitarbeiter/Leistung/Datum/Stunden) füllen die ganze Zeile. */
@media (min-width:900px){
	.wpms-view .wpms-std-form{ grid-template-columns:repeat(4, minmax(0,1fr)); }
	.wpms-view .wpms-std-form > .wpms-std-grid{ grid-column:span 2; margin-bottom:0; }
}
.wpms-st-emp{ background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:12px; overflow:hidden; }
.wpms-st-emp-head{ width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 15px; background:none; border:0; color:var(--wpms-text); cursor:pointer; text-align:left; font:inherit; }
.wpms-st-emp-name{ font-weight:600; font-size:15px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-st-emp-meta{ display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.wpms-st-emp-sum{ font-weight:700; font-size:15px; font-variant-numeric:tabular-nums; }
.wpms-st-emp-meta .wpms-stcard-chev{ font-size:13px; }
.wpms-st-emp-offen{ font-size:11px; font-weight:700; color:#c0392b; background:rgba(192,57,43,.14); padding:1px 8px; border-radius:8px; }
body.wpms-theme-dark .wpms-st-emp-offen{ color:#ff6b6b; background:rgba(255,107,107,.16); }
/* Roter Zähler am Mitarbeiter-Namen: Anzahl zu klärender Fälle im gewählten Zeitraum. */
.wpms-st-emp-klaerung{ display:inline-block; vertical-align:1px; margin-left:8px; min-width:18px; height:18px; line-height:18px; padding:0 5px; border-radius:999px; background:#c0392b; color:#fff; font-size:11px; font-weight:700; text-align:center; box-sizing:border-box; }
.wpms-st-emp-body{ padding:0 12px 12px; }
.wpms-st-emp-body .wpms-sttable-wrap{ border:0; }
.wpms-st-emp.is-open .wpms-st-emp-head{ border-bottom:1px solid var(--wpms-line); margin-bottom:10px; }
.wpms-sttable{ width:100%; border-collapse:collapse; font-size:14px; }
.wpms-sttable th, .wpms-sttable td{ text-align:left; padding:10px 14px; border-bottom:1px solid var(--wpms-line); white-space:nowrap; }
.wpms-sttable th{ color:var(--wpms-muted); font-weight:700; font-size:11px; text-transform:uppercase; letter-spacing:.03em; }
.wpms-sttable .wpms-num{ text-align:right; }
.wpms-sttable .wpms-tscol{ text-align:left; } /* Tage-Zahl + Pille rechts daneben (nicht gestapelt) */
/* Tage-Zahl an fester Position, Status/Art-Pille bündig rechts daneben -> ruhig, beide Tabellen alignen */
.wpms-ts-cell{ display:inline-flex; align-items:center; gap:10px; }
.wpms-ts-cell .wpms-ts-n{ flex:0 0 auto; min-width:18px; text-align:right; font-weight:600; }
/* feste Breiten rechts -> Tage-Spalte von Urlaub- und Fehlzeiten-Tabelle liegen exakt übereinander */
.wpms-urltable .wpms-macol{ width:220px; }
.wpms-urltable .wpms-tscol{ width:200px; }
.wpms-urltable .wpms-restcol{ width:104px; }
.wpms-urltable .wpms-st-act{ width:48px; }
.wpms-sttable tbody tr:last-child td{ border-bottom:0; }
.wpms-sttable tbody tr:hover{ background:var(--wpms-hover); }

/* ---- Dashboard-Animationen (nur beim ersten Laden, Container .wpms-dash-anim) ---- */
@keyframes wpms-card-in{ from{ opacity:0; transform:translateY(14px); } to{ opacity:1; transform:translateY(0); } }
/* Gestaffelter Einflug für Listen (Klärungsfälle, Kampagnen-Kacheln/-Liste, Arbeitsscheine). */
.wpms-kfrow, .wpms-camp-tile, .wpms-camp-lrow, .wpms-asrow{ animation:wpms-card-in .45s cubic-bezier(.22,.61,.36,1) both; }
@keyframes wpms-line-grow{ from{ stroke-dashoffset:1; } to{ stroke-dashoffset:0; } }
@keyframes wpms-fade{ from{ opacity:0; } to{ opacity:1; } }
@keyframes wpms-pop{ from{ opacity:0; transform:scale(0); } to{ opacity:1; transform:scale(1); } }

.wpms-dash-anim .wpms-dcard{ animation:wpms-card-in .55s cubic-bezier(.22,.61,.36,1) both; }
.wpms-dash-anim .wpms-dcard:nth-child(1){ animation-delay:.02s; }
.wpms-dash-anim .wpms-dcard:nth-child(2){ animation-delay:.09s; }
.wpms-dash-anim .wpms-dcard:nth-child(3){ animation-delay:.16s; }
.wpms-dash-anim .wpms-dcard:nth-child(4){ animation-delay:.23s; }
.wpms-dash-anim .wpms-dcard:nth-child(5){ animation-delay:.30s; }
.wpms-dash-anim .wpms-dcard:nth-child(6){ animation-delay:.37s; }
.wpms-dash-anim .wpms-dcard:nth-child(7){ animation-delay:.44s; }
.wpms-dash-anim .wpms-dcard:nth-child(8){ animation-delay:.51s; }
.wpms-dash-anim .wpms-dcard:nth-child(n+9){ animation-delay:.58s; }

/* Linien-Diagramm wächst ein (Linie zeichnet sich von links nach rechts). .wpms-sline = Serien-Linien
   des Multi-Linien-Diagramms auf dem Dashboard, gleiche Zeichen-Animation wie die Einzel-Linie. */
.wpms-dash-anim .wpms-line-path,
.wpms-dash-anim .wpms-sline{ stroke-dasharray:1; animation:wpms-line-grow .55s ease-out .05s both; }
.wpms-dash-anim .wpms-line-area{ opacity:0; animation:wpms-fade .35s ease .25s forwards; }
.wpms-dash-anim .wpms-line-dot{ opacity:0; animation:wpms-pop .4s cubic-bezier(.34,1.56,.64,1) both; }

@media (prefers-reduced-motion: reduce){
	.wpms-dash-anim .wpms-dcard,
	.wpms-dash-anim .wpms-line-path,
	.wpms-dash-anim .wpms-sline,
	.wpms-dash-anim .wpms-line-area,
	.wpms-dash-anim .wpms-line-dot{ animation:none; opacity:1; stroke-dashoffset:0; transform:none; }
}

/* Detail-Kachel (Kunden/Mitarbeiter) klappt beim Auswählen sanft auf */
@keyframes wpms-expand{ from{ opacity:0; transform:translateY(-8px); } to{ opacity:1; transform:translateY(0); } }
.wpms-md-detail > *{ animation:wpms-expand .35s ease; }
@media (prefers-reduced-motion: reduce){ .wpms-md-detail > *{ animation:none; } }

/* Vermerk „genehmigt von …" bei Stunden, die die Leitung für einen Mitarbeiter erfasst hat */
.wpms-st-erf{ display:block; margin-top:2px; font-size:11px; color:var(--wpms-muted); }

/* ===== Header-Schnellsuche (Kunde) – nur Desktop & Leitung ===== */
.wpms-topsearch{ display:none; position:relative; }
@media (min-width:761px){ .wpms-topsearch{ display:block; width:240px; margin-right:0; } }
/* #wpms-app-Präfix nötig: sonst gewinnt #wpms-app input{ font-size:16px } (ID) über die Klasse. */
#wpms-app .wpms-topsearch input{ box-sizing:border-box; width:100%; height:38px; border:1px solid var(--wpms-line); border-radius:10px; background:transparent; color:var(--wpms-text); padding:0 14px; font:inherit; font-size:12px; }
.wpms-topsearch input::placeholder{ color:var(--wpms-muted); }
.wpms-topsearch input:focus{ outline:none; border-color:var(--wpms-teal2); }
.wpms-topsearch-drop{ position:absolute; top:calc(100% + 6px); left:0; right:0; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:12px; box-shadow:0 10px 28px rgba(0,0,0,.22); padding:6px; z-index:60; max-height:62vh; overflow-y:auto; }
.wpms-topsearch-opt{ position:relative; display:flex; flex-direction:column; gap:1px; align-items:flex-start; text-align:left; width:100%; background:none; border:0; border-radius:8px; padding:8px 64px 8px 10px; cursor:pointer; color:var(--wpms-text); }
.wpms-topsearch-opt:hover{ background:var(--wpms-hover); }
.wpms-topsearch-opt small{ color:var(--wpms-muted); font-size:12px; }
.wpms-topsearch-kind{ position:absolute; top:50%; right:10px; transform:translateY(-50%); font-size:10px; font-weight:600; letter-spacing:.02em; text-transform:uppercase; color:var(--wpms-muted); background:var(--wpms-hover); border-radius:6px; padding:2px 6px; }
.wpms-topsearch-empty{ padding:10px; color:var(--wpms-muted); font-size:13px; }

/* ===== Kunden-Vorschau-Panel (Drawer von rechts, ⅓ Breite, volle Höhe) ===== */
/* Overlay + Panel starten UNTER dem App-Header (--wpms-top-h, per JS gesetzt),
   damit die Kopfzeile (Suche, Profil) bei offenem Panel immer voll sichtbar bleibt. */
.wpms-kpanel-ov{ position:fixed; inset:var(--wpms-top-h, 0px) 0 0 0; background:rgba(0,0,0,.42); opacity:0; transition:opacity .25s ease; z-index:80; }
.wpms-kpanel-ov.is-open{ opacity:1; }
.wpms-kpanel{ position:fixed; top:var(--wpms-top-h, 0px); right:0; bottom:0; width:34%; min-width:380px; max-width:540px; background:var(--wpms-bg); color:var(--wpms-text); border-left:1px solid var(--wpms-line); box-shadow:-8px 0 34px rgba(0,0,0,.28); z-index:81; display:flex; flex-direction:column; transform:translateX(100%); transition:transform .26s cubic-bezier(.22,.61,.36,1); }
.wpms-kpanel.is-open{ transform:translateX(0); }
.wpms-kpanel-head{ flex:0 0 auto; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:18px 20px; border-bottom:1px solid var(--wpms-line); background:var(--wpms-card); }
.wpms-kpanel-head h2{ margin:0; font-size:19px; color:var(--wpms-text); }
.wpms-kpanel-headbtns{ flex:0 0 auto; display:flex; align-items:center; gap:8px; }
.wpms-kpanel-x{ flex:0 0 auto; width:34px; height:34px; border:0; border-radius:50%; background:var(--wpms-hover); color:var(--wpms-text); font-size:22px; line-height:1; cursor:pointer; }
.wpms-kpanel-x:hover{ filter:brightness(1.1); }
.wpms-kpanel-edit,.wpms-kpanel-full{ flex:0 0 auto; display:flex; align-items:center; justify-content:center; width:34px; height:34px; border:0; border-radius:50%; background:var(--wpms-hover); color:var(--wpms-text); cursor:pointer; }
.wpms-kpanel-edit:hover,.wpms-kpanel-full:hover{ filter:brightness(1.1); color:var(--wpms-teal); }
/* WICHTIG: Body als reiner BLOCK-Container (NICHT flex) – die Kombination flex-item +
   flex-container + overflow-y in WebKit verhindert zuverlässiges Scrollen. Block + overflow-y:auto
   scrollt überall; Abstände über margin statt gap; Kacheln behalten ihre natürliche Höhe. */
.wpms-kpanel-body{ flex:1; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; padding:18px 20px; display:block; }
.wpms-kpanel-body > * + *{ margin-top:16px; }
/* Kontaktkarte oben fix; Termine-Kachel füllt den Rest und scrollt intern. */
.wpms-kpanel-body .wpms-kpanel-card{ flex:0 0 auto; }
/* MA-Panel: ganzer Body scrollt (Kontakt + Auswertung + Einsätze stapeln natürlich). */
.wpms-kpanel-ma .wpms-kpanel-body{ overflow-y:auto; }
.wpms-kpanel-ma .wpms-kpanel-body .wpms-abw-card{ flex:0 0 auto; }
.wpms-kpanel-ma .wpms-kpanel-body .wpms-kunde-termine{ flex:0 0 auto; }
.wpms-kpanel-ma .wpms-kpanel-body .wpms-kt-list{ overflow:visible; }
/* Ganzes Panel scrollt (wie MA-Panel): Kacheln behalten ihre natürliche Höhe,
   die Termine-Liste hat KEINEN eigenen Scroll mehr → dritte Kachel (Rechnungen) erreichbar. */
.wpms-kpanel-body .wpms-kunde-termine,
.wpms-kpanel-body .wpms-kunde-rechnungen,
.wpms-kpanel-body .wpms-kunde-analyse{ flex:0 0 auto; }
.wpms-kpanel-body .wpms-kt-list{ overflow:visible; }
.wpms-kpanel-card{ display:flex; flex-direction:column; gap:12px; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:14px; padding:18px; }
@media (max-width:760px){ .wpms-kpanel{ width:100%; min-width:0; max-width:none; } }

/* Rechnungs-Vorschau: von rechts ausklappende Karte (über allem, auch über dem Schnell-Panel). */
.wpms-rvpanel-ov{ position:fixed; inset:0; background:rgba(0,0,0,.42); opacity:0; transition:opacity .25s ease; z-index:82; }
.wpms-rvpanel-ov.is-open{ opacity:1; }
.wpms-rvpanel{ position:fixed; top:0; right:0; bottom:0; width:46%; min-width:420px; max-width:760px; background:var(--wpms-bg); color:var(--wpms-text); border-left:1px solid var(--wpms-line); box-shadow:-8px 0 34px rgba(0,0,0,.28); z-index:83; display:flex; flex-direction:column; transform:translateX(100%); transition:transform .26s cubic-bezier(.22,.61,.36,1); }
.wpms-rvpanel.is-open{ transform:translateX(0); }
.wpms-rvpanel-head{ flex:0 0 auto; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 18px; border-bottom:1px solid var(--wpms-line); background:var(--wpms-card); }
.wpms-rvpanel-title{ display:flex; align-items:center; gap:10px; font-size:16px; min-width:0; flex:1 1 auto; }
.wpms-rvpanel-title strong{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-rvpanel-btns{ flex:0 0 auto; display:flex; align-items:center; gap:8px; }
.wpms-rvpanel-act{ font-size:13px; padding:6px 12px; border-radius:8px; background:var(--wpms-hover); color:var(--wpms-text); text-decoration:none; border:1px solid var(--wpms-line); }
.wpms-rvpanel-act:hover{ color:var(--wpms-teal); }
.wpms-rvpanel-x{ flex:0 0 auto; width:34px; height:34px; border:0; border-radius:50%; background:var(--wpms-hover); color:var(--wpms-text); font-size:22px; line-height:1; cursor:pointer; }
.wpms-rvpanel-x:hover{ filter:brightness(1.1); }
.wpms-rvpanel-body{ flex:1; min-height:0; overflow-y:auto; background:var(--wpms-hover); }
/* Enthaltene Einsätze der Rechnung (über der PDF-Vorschau). */
.wpms-rvpanel-eins{ flex:0 0 auto; border-bottom:1px solid var(--wpms-line); background:var(--wpms-card); padding:9px 14px 11px; max-height:190px; overflow-y:auto; }
.wpms-rvpanel-eins[hidden]{ display:none; }
.wpms-rvpanel-eins-h{ font-size:11px; font-weight:700; color:var(--wpms-muted); text-transform:uppercase; letter-spacing:.02em; margin:0 0 7px; }
.wpms-rvpanel-einslist{ display:flex; flex-direction:column; gap:5px; }
.wpms-rvpanel-einsrow{ display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; text-align:left; background:var(--wpms-hover); border:1px solid var(--wpms-line); border-radius:8px; padding:7px 11px; cursor:pointer; color:var(--wpms-text); font:inherit; }
.wpms-rvpanel-einsrow:hover{ border-color:var(--wpms-teal2); }
.wpms-rvpanel-einsd{ flex:0 0 auto; font-size:12px; color:var(--wpms-muted); white-space:nowrap; }
.wpms-rvpanel-einst{ flex:1 1 auto; min-width:0; font-size:13px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-align:right; }
.wpms-rvpanel-body > .wpms-empty{ padding:24px; }
.wpms-rvpanel-frame{ width:100%; height:100%; border:0; display:block; background:#fff; }
@media (max-width:760px){
	.wpms-rvpanel{ width:100%; min-width:0; max-width:none; }
	/* Kopfzeile Handy: zweizeilig — Rechnungsnummer + × oben, Buttons volle Breite darunter (scrollbar). */
	.wpms-rvpanel-head{ flex-wrap:wrap; gap:8px; row-gap:9px; padding:11px 12px; }
	.wpms-rvpanel-title{ order:1; flex:1 1 auto; font-size:15px; }
	.wpms-rvpanel-x{ order:2; }
	.wpms-rvpanel-btns{ order:3; flex:1 1 100%; min-width:0; justify-content:flex-start; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
	.wpms-rvpanel-btns::-webkit-scrollbar{ display:none; }
	.wpms-rvpanel-act{ padding:6px 12px; white-space:nowrap; }
	/* PDF-Vorschau ganze Seite sichtbar + Zwei-Achsen-Scroll mit Touch-Zoom. */
	.wpms-rvpanel-body{ overflow:auto; -webkit-overflow-scrolling:touch; }
}
/* Datenvorschau eines Entwurfs (kein PDF) */
.wpms-rvdoc{ padding:20px; background:var(--wpms-card); min-height:100%; }
.wpms-rvdoc-note{ font-size:12px; color:var(--wpms-muted); background:var(--wpms-hover); border:1px solid var(--wpms-line); border-radius:8px; padding:8px 12px; margin:0 0 16px; }
.wpms-rvdoc-emp{ font-size:14px; line-height:1.5; margin-bottom:16px; }
.wpms-rvdoc-intro{ font-size:13px; color:var(--wpms-muted); margin:0 0 16px; }
.wpms-rvdoc-tab{ width:100%; border-collapse:collapse; font-size:13px; margin-bottom:16px; }
.wpms-rvdoc-tab th{ text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.02em; color:var(--wpms-muted); border-bottom:1px solid var(--wpms-line); padding:6px 8px; }
.wpms-rvdoc-tab td{ padding:8px; border-bottom:1px solid var(--wpms-line); vertical-align:top; }
.wpms-rvdoc-tab small{ color:var(--wpms-muted); }
.wpms-rvnum{ text-align:right; white-space:nowrap; }
.wpms-rvdoc-sum{ display:flex; flex-direction:column; gap:4px; max-width:280px; margin-left:auto; }
.wpms-rvdoc-sum > div{ display:flex; justify-content:space-between; gap:16px; font-size:13px; color:var(--wpms-muted); }
.wpms-rvdoc-sum strong{ color:var(--wpms-text); }
.wpms-rvdoc-tot{ border-top:1px solid var(--wpms-line); padding-top:6px; margin-top:2px; }
.wpms-rvdoc-tot span, .wpms-rvdoc-tot strong{ color:var(--wpms-text) !important; font-weight:700; font-size:15px; }
/* E-Mail-Versand-Button im Vorschau-Kopf + Sende-Dialog */
.wpms-rvpanel-mail, .wpms-rvpanel-print{ display:inline-flex; align-items:center; gap:5px; cursor:pointer; }
.wpms-rvpanel-mail svg, .wpms-rvpanel-print svg{ flex:0 0 auto; }
.wpms-rvpanel-mail:hover, .wpms-rvpanel-print:hover{ color:var(--wpms-teal); border-color:var(--wpms-teal); }
.wpms-maildlg-ov{ position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:90; }
.wpms-maildlg{ position:fixed; z-index:91; top:50%; left:50%; transform:translate(-50%,-50%); width:460px; max-width:calc(100vw - 32px); max-height:calc(100vh - 64px); overflow-y:auto; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:14px; padding:20px; box-shadow:0 20px 60px rgba(0,0,0,.4); display:flex; flex-direction:column; gap:12px; }
.wpms-maildlg h3{ margin:0; font-size:17px; color:var(--wpms-text); }
.wpms-maildlg label{ display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--wpms-muted); }
.wpms-maildlg input, .wpms-maildlg textarea{ font:inherit; font-size:14px; padding:9px 11px; border-radius:8px; border:1px solid var(--wpms-line); background:var(--wpms-input); color:var(--wpms-text); box-sizing:border-box; width:100%; }
.wpms-maildlg textarea{ resize:vertical; }
.wpms-md-hint{ font-size:12px; color:var(--wpms-muted); margin:0; }
.wpms-md-status{ font-size:13px; margin:0; color:var(--wpms-muted); }
.wpms-md-status.is-err{ color:#c23b3b; }
body.wpms-theme-dark .wpms-md-status.is-err{ color:#ff8a8a; }
.wpms-eudlg input, .wpms-eudlg select, .wpms-eudlg .wpms-ss-input{ font-size:16px; height:42px; box-sizing:border-box; } /* 16px verhindert iOS-Auto-Zoom; einheitliche Höhe für Input+Select */
.wpms-eudlg select{ font:inherit; padding:9px 11px; border-radius:8px; border:1px solid var(--wpms-line); background:var(--wpms-input); color:var(--wpms-text); box-sizing:border-box; width:100%; }
.wpms-maildlg-btns{ display:flex; justify-content:flex-end; gap:10px; margin-top:4px; }
.wpms-maildlg-btns .wpms-md-cancel{ background:var(--wpms-hover); color:var(--wpms-text); }

/* Reaktivierungs-Fällig-Liste (Einstellungen → Erinnerungen & Marketing) */
.wpms-mkt-faellig-list{ margin-top:8px; }
.wpms-mkt-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:7px 0; border-bottom:1px solid var(--wpms-line); }
.wpms-mkt-row:last-child{ border-bottom:none; }
.wpms-mkt-row > span{ min-width:0; }

/* Marketing – Kampagnen */
.wpms-camp-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:16px; }
.wpms-camp-tile{ display:flex; flex-direction:column; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:14px; overflow:hidden; cursor:pointer; transition:border-color .15s; }
.wpms-camp-tile:hover{ border-color:var(--wpms-teal2); }
.wpms-camp-thumb{ aspect-ratio:16/9; background:var(--wpms-input); display:flex; align-items:center; justify-content:center; overflow:hidden; }
.wpms-camp-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.wpms-camp-thumb.is-empty{ color:var(--wpms-muted); }
.wpms-camp-thumb.is-empty .wpms-ic{ width:38px; height:38px; }
.wpms-camp-body{ display:flex; flex-direction:column; gap:6px; padding:14px 16px; min-width:0; }
.wpms-camp-name{ font-weight:600; color:var(--wpms-text); }
.wpms-camp-betreff{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-camp-foot{ margin-top:4px; }
.wpms-camp-viewhero img{ display:block; max-width:100%; border-radius:10px; border:1px solid var(--wpms-line); margin-bottom:14px; }
/* Kopfzeile Marketing: Neue-Kampagne-Button + Ansicht-Umschalter */
.wpms-camp-top{ display:flex; align-items:flex-start; justify-content:flex-end; gap:12px; margin-bottom:18px; flex-wrap:wrap; }
.wpms-camp-topctl{ display:flex; flex-direction:column; align-items:flex-end; gap:10px; }
.wpms-camp-vt{ display:inline-flex; border:1px solid var(--wpms-line); border-radius:10px; overflow:hidden; }
.wpms-camp-vt .wpms-vt{ display:inline-flex; align-items:center; justify-content:center; background:transparent; border:0; padding:8px 12px; color:var(--wpms-muted); cursor:pointer; }
.wpms-camp-vt .wpms-vt + .wpms-vt{ border-left:1px solid var(--wpms-line); }
.wpms-camp-vt .wpms-vt.is-active{ background:var(--wpms-teal2); color:#fff; }
/* Listenansicht */
.wpms-camp-list{ display:flex; flex-direction:column; gap:10px; }
.wpms-camp-lrow{ display:flex; align-items:center; gap:14px; padding:10px 14px; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:12px; cursor:pointer; transition:border-color .15s; }
.wpms-camp-lrow:hover{ border-color:var(--wpms-teal2); }
.wpms-camp-lthumb{ flex:0 0 auto; width:66px; height:48px; border-radius:8px; overflow:hidden; background:var(--wpms-input); display:flex; align-items:center; justify-content:center; color:var(--wpms-muted); }
.wpms-camp-lthumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.wpms-camp-lthumb.is-empty .wpms-ic{ width:24px; height:24px; }
.wpms-camp-lbody{ flex:1 1 auto; min-width:0; }
.wpms-camp-lstatus{ flex:0 0 auto; }
/* Versand-Karte: Datum/Uhrzeit stehen außerhalb eines <form> → App-Input-Optik hier erzwingen
   (sonst zeigt iOS die nativen weißen, eckigen Felder mit blauer Schrift). */
.wpms-camp-plan-row label{ display:grid; gap:5px; font-size:13px; color:var(--wpms-muted); }
.wpms-camp-plan-row input{ width:100%; -webkit-appearance:none; appearance:none; font:inherit; font-size:14px; line-height:1.4; height:44px; padding:9px 12px; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-input); color:var(--wpms-text); box-sizing:border-box; }
.wpms-camp-plan-row input::-webkit-date-and-time-value{ text-align:left; font-size:14px; }
.wpms-camp-plan-row input:focus{ outline:none; border-color:var(--wpms-teal2); }
/* Kampagnen-Übersicht: volle Breite nutzen, auf Desktop zweispaltig (Inhalt links, Versand rechts). */
.wpms-camp-view{ display:grid; grid-template-columns:1fr; gap:20px; align-items:start; }
@media (min-width:1000px){ .wpms-camp-view{ grid-template-columns:1.5fr 1fr; } }
.wpms-camp-view .wpms-card-block{ max-width:none; }
.wpms-camp-side{ display:flex; flex-direction:column; gap:18px; }
/* Kampagne bearbeiten: gleiche Breiten-Nutzung – Inhalt links, Empfänger-Kachel rechts. */
/* Editierbare Empfänger-Felder in der Versand-Karte (Übersicht). */
.wpms-camp-recip label{ display:grid; gap:5px; font-size:13px; color:var(--wpms-muted); margin-bottom:12px; }
.wpms-camp-recip select, .wpms-camp-recip input{ width:100%; box-sizing:border-box; font:inherit; font-size:14px; line-height:1.4; height:44px; padding:9px 12px; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-input); color:var(--wpms-text); }
.wpms-camp-recip input{ -webkit-appearance:none; appearance:none; }
.wpms-camp-recip select:focus, .wpms-camp-recip input:focus{ outline:none; border-color:var(--wpms-teal2); }
/* Leistungen-Mehrfachauswahl (Dropdown mit Checkboxen) */
.wpms-msel{ margin-bottom:12px; }
.wpms-msel-sum{ list-style:none; cursor:pointer; display:flex; align-items:center; justify-content:space-between; height:44px; padding:9px 12px; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-input); color:var(--wpms-text); font-size:14px; box-sizing:border-box; }
.wpms-msel-sum::-webkit-details-marker{ display:none; }
.wpms-msel-sum::after{ content:'▾'; color:var(--wpms-muted); margin-left:8px; }
.wpms-msel[open] .wpms-msel-sum{ border-color:var(--wpms-teal2); }
.wpms-msel-panel{ margin-top:6px; max-height:220px; overflow-y:auto; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-input); padding:6px; }
/* Checkbox links neben dem Leistungs-Text. Spezifisch über .wpms-msel-panel, weil
   .wpms-camp-recip label{display:grid} (u. .wpms-form label) sonst gewinnt und das
   Label zum Grid macht → Checkbox über den Text + Grid-Stretch bläht sie auf.
   margin-bottom:0 hebt das label-margin dieser Formular-Regeln je Option auf. */
.wpms-msel-panel .wpms-msel-opt{ display:flex; align-items:center; gap:9px; margin-bottom:0; padding:7px 8px; border-radius:8px; cursor:pointer; font-size:14px; color:var(--wpms-text); }
.wpms-msel-panel .wpms-msel-opt:hover{ background:var(--wpms-card); }
.wpms-msel-panel .wpms-msel-opt input[type=checkbox]{ width:auto; height:auto; margin:0; -webkit-appearance:auto; appearance:auto; flex:0 0 auto; padding:0; accent-color:var(--wpms-teal2); }
.wpms-camp-editform{ max-width:none; }
.wpms-camp-editgrid{ display:grid; grid-template-columns:1fr; gap:20px; align-items:stretch; }
@media (min-width:1000px){ .wpms-camp-editgrid{ grid-template-columns:1.5fr 1fr; } }
.wpms-camp-editcol{ max-width:none; }
/* Speichern/Abbrechen zentriert unter beiden Karten. */
.wpms-camp-editactions{ justify-content:center; margin-top:20px; }
.wpms-camp-editnote{ text-align:center; }
.wpms-camp-editgrid .wpms-card-block{ max-width:none; }
.wpms-camp-editmain{ min-width:0; }
.wpms-camp-editside{ display:flex; flex-direction:column; gap:16px; min-width:0; }
/* Versand-Karte aufgeräumt: alle Aktions-Buttons gleiche Höhe (44px); Top-Buttons gleich breit. */
.wpms-camp-side .wpms-btn{ height:44px; box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; }
.wpms-camp-side .wpms-set-actions{ gap:10px; }
.wpms-camp-side .wpms-card-block .wpms-set-actions > .wpms-btn{ flex:1 1 0; width:auto; min-width:140px; }
/* Löschen-Button: Outline, Hover = vollflächig rot + weiße Schrift. */
.wpms-btn-danger-o{ color:#c0392b; border-color:#c0392b; background:transparent; }
.wpms-btn-danger-o:hover{ background:#c0392b; border-color:#c0392b; color:#fff; }
/* Löschen-Button (direkter Rand der Seitenspalte) mittig. */
.wpms-camp-side > .wpms-set-actions{ justify-content:center; }
.wpms-cbadge{ display:inline-block; padding:4px 10px; border-radius:999px; font-size:12px; font-weight:600; background:var(--wpms-input); color:var(--wpms-muted); border:1px solid var(--wpms-line); white-space:nowrap; }
.wpms-cbadge.is-ok{ color:#00635E; border-color:rgba(0,99,94,.4); }
.wpms-cbadge.is-warn{ color:#c77700; border-color:rgba(199,119,0,.4); }
.wpms-cbadge.is-info{ color:#1f7ac0; border-color:rgba(31,122,192,.4); }
.wpms-hero-box{ display:flex; flex-direction:column; gap:10px; }
.wpms-hero-prev img{ display:block; width:100%; height:auto; max-height:300px; object-fit:cover; border-radius:10px; border:1px solid var(--wpms-line); }
.wpms-hero-actions{ justify-content:center; }
.wpms-dropzone{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; text-align:center; padding:26px 18px; border:2px dashed var(--wpms-line); border-radius:12px; background:var(--wpms-input); color:var(--wpms-muted); cursor:pointer; transition:border-color .15s, background .15s; }
.wpms-dropzone:hover{ border-color:var(--wpms-teal2); }
.wpms-dropzone.is-drag{ border-color:var(--wpms-teal2); background:rgba(31,189,176,.1); color:var(--wpms-text); }
.wpms-dz-ic{ color:var(--wpms-teal2); }
.wpms-dz-txt{ font-size:14px; color:var(--wpms-text); }
.wpms-dz-txt u{ color:var(--wpms-teal2); text-decoration:none; }
.wpms-dz-hint{ font-size:12px; color:var(--wpms-muted); }
.wpms-camp-plan-row{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.wpms-camp-plan-row > label{ min-width:0; }
@media (max-width:600px){ .wpms-camp-plan-row{ flex-direction:column; align-items:stretch; } .wpms-camp-plan-row .wpms-btn{ width:100%; } }

/* Arbeitsscheine-Archiv: Suche + einklappbare Gruppen (Jahr › Monat › Tag), kompakt */
.wpms-as-search{ margin-bottom:12px; }
.wpms-as-search input{ width:100%; box-sizing:border-box; -webkit-appearance:none; appearance:none; font:inherit; font-size:14px; padding:10px 14px; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-input); color:var(--wpms-text); }
.wpms-as-search input:focus{ outline:none; border-color:var(--wpms-teal2); }
.wpms-asgroup{ border-top:1px solid var(--wpms-line); }
.wpms-asgroup-head{ display:flex; align-items:center; gap:10px; width:100%; background:transparent; border:0; padding:10px 4px; color:var(--wpms-text); cursor:pointer; }
.wpms-asgroup-caret{ flex:0 0 auto; color:var(--wpms-muted); transition:transform .15s; font-size:12px; }
.wpms-asgroup.is-open > .wpms-asgroup-head .wpms-asgroup-caret{ transform:rotate(90deg); }
.wpms-asgroup-title{ flex:1 1 auto; text-align:left; font-weight:600; }
.wpms-asgroup-count{ flex:0 0 auto; color:var(--wpms-muted); font-size:13px; }
.wpms-asgroup-body{ display:none; padding-left:14px; }
.wpms-asgroup.is-open > .wpms-asgroup-body{ display:block; }
/* „Zu unterschreiben"-Ordner im MA-Account: dezenter roter Handlungsakzent. */
.wpms-dokgrp-sign > .wpms-asgroup-head .wpms-asgroup-title{ color:#d9776b; }
.wpms-dokgrp-sign > .wpms-asgroup-head .wpms-asgroup-count{ color:#d9776b; border-color:#d9776b; }
.wpms-asday{ font-size:12px; font-weight:600; color:var(--wpms-muted); margin:8px 0 5px; }
.wpms-asrow{ display:flex; align-items:center; gap:10px; padding:7px 10px; margin-bottom:6px; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:8px; }
.wpms-asrow-main{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; text-align:left; background:transparent; border:0; padding:0; color:var(--wpms-text); cursor:pointer; }
.wpms-asrow-name{ font-weight:600; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-asrow-acts{ flex:0 0 auto; display:flex; align-items:center; gap:6px; }

/* Klärungsfälle-Seite */
.wpms-kf-list{ display:flex; flex-direction:column; gap:8px; }
.wpms-kfrow{ display:flex; align-items:center; gap:12px; padding:9px 14px; background:var(--wpms-card); border:1px solid var(--wpms-line); border-left:3px solid #c0392b; border-radius:10px; }
.wpms-kfrow-main{ flex:1 1 auto; min-width:0; }
.wpms-kfrow-title{ font-weight:600; font-size:14px; color:var(--wpms-text); }
.wpms-kfrow-main .wpms-meta{ font-size:12px; }
.wpms-kfrow-acts{ flex:0 0 auto; display:flex; flex-wrap:wrap; gap:6px; align-items:center; justify-content:flex-end; }
.wpms-kf-corr{ display:flex; align-items:center; gap:6px; }
.wpms-kf-corr input{ width:74px; -webkit-appearance:none; appearance:none; font:inherit; font-size:13px; padding:6px 8px; border:1px solid var(--wpms-line); border-radius:8px; background:var(--wpms-input); color:var(--wpms-text); box-sizing:border-box; }
.wpms-kf-corr > span{ color:var(--wpms-muted); font-size:13px; }
@media (max-width:760px){ .wpms-kfrow{ flex-direction:column; align-items:stretch; } .wpms-kfrow-acts{ justify-content:flex-start; } }

/* ===================================================================== */
/* MATERIALMANAGEMENT – Design-System                                     */
/* Verbindliche Tokens für ALLE Unterseiten des Moduls. Jede Komponente   */
/* bezieht Höhe/Radius/Schrift/Abstände AUSSCHLIESSLICH aus diesen Werten */
/* – keine individuell bemessenen Elemente.                               */
/*   Bedienelemente: Höhe --mat-h, Radius 10px                            */
/*   Karten:         Radius 12px, Rahmen 1px line, Karten-Padding 16px    */
/*   Zeilen-Buttons: Höhe --mat-h-sm (Teil des Systems, z. B. Tabellen)   */
/*   Desktop kompakt (40px/14px) · Mobil größer (46px, Inputs 16px wegen  */
/*   iOS-Fokus-Zoom). Buttons mobil 15px.                                 */
/* ===================================================================== */
#wpms-app{
	--mat-h:46px; --mat-h-sm:32px;
	--mat-r:10px; --mat-r-card:12px;
	--mat-fs-input:16px; --mat-fs-btn:15px; --mat-fs:14px; --mat-fs-sm:12.5px;
	--mat-gap:10px; --mat-pad:16px; --mat-maxw:1240px;
}
@media (min-width:761px){
	#wpms-app{ --mat-h:40px; --mat-h-sm:28px; --mat-fs-input:14px; --mat-fs-btn:14px; --mat-fs:13.5px; --mat-gap:8px; }
}

/* ---- Raster / Seitenaufbau (Überschrift → Tabs → Filter → Inhalt) ---- */
.wpms-mat-host, .wpms-mat-ov{ max-width:var(--mat-maxw); }
.wpms-mat-sect{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; font-size:12px; font-weight:700; letter-spacing:1.1px; text-transform:uppercase; color:var(--wpms-muted); margin:26px 0 8px; }
.wpms-mat-formhost{ margin-bottom:12px; }

/* ---- Tab-Zeile: Tabs links (ohne durchgezogene Haarlinie), „+ Neu" rechts ---- */
.wpms-mat-tabbar{ display:flex; align-items:center; gap:10px; margin-bottom:14px; border-bottom:1px solid var(--wpms-line); padding-bottom:6px; }
.wpms-mat-tabs{ flex:1 1 auto; min-width:0; display:flex; gap:4px; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; margin-bottom:-7px; }
.wpms-mat-tabs::-webkit-scrollbar{ display:none; }
.wpms-mat-neuhost{ flex:0 0 auto; display:flex; align-items:center; gap:8px; }
/* Handy: Tab-Reihe → EIN Umschalter-Button (aktiver Tab + Chevron), Icons bleiben rechts. */
.wpms-mat-tabdd{ display:none; align-items:center; gap:8px; height:34px; padding:0 12px; margin-right:auto; flex:0 0 auto; font:inherit; font-size:14px; font-weight:600; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-input); color:var(--wpms-text); cursor:pointer; white-space:nowrap; }
.wpms-mat-tabdd svg{ flex:0 0 auto; opacity:.7; }
@media (max-width:719px){
	.wpms-mat-tabs{ display:none; }
	/* Volle Breite bis an die Icons: Label links, Chevron rechtsbündig. */
	.wpms-mat-tabdd{ display:flex; flex:1 1 auto; min-width:0; justify-content:space-between; }
	.wpms-mat-tabbar{ padding-bottom:10px; }
}
/* Icon-Buttons in der Tab-Zeile (Zeitraum-Kalender, Buchungsart-Material):
   34px wie „+ Neu", Icon wächst und kippt leicht beim Hover. */
#wpms-app .wpms-mat-zeitbtn, #wpms-app .wpms-mat-buchbtn, #wpms-app .wpms-mat-filterbtn, #wpms-app .wpms-mat-vwbtn, #wpms-app .wpms-mat-expbtn{ height:34px; width:34px; padding:0; }
.wpms-mat-zeitbtn .wpms-ic, .wpms-mat-buchbtn .wpms-ic, .wpms-mat-filterbtn .wpms-ic, .wpms-mat-vwbtn .wpms-ic, .wpms-mat-expbtn .wpms-ic{ width:17px; height:17px; color:var(--wpms-muted); transition:transform .18s ease, color .18s ease; }
.wpms-mat-zeitbtn:hover .wpms-ic, .wpms-mat-buchbtn:hover .wpms-ic, .wpms-mat-filterbtn:hover .wpms-ic, .wpms-mat-vwbtn:hover .wpms-ic, .wpms-mat-expbtn:hover .wpms-ic{ color:var(--wpms-text); }
@media (hover:hover){
	.wpms-mat-zeitbtn:hover .wpms-ic, .wpms-mat-buchbtn:hover .wpms-ic, .wpms-mat-filterbtn:hover .wpms-ic{ transform:scale(1.2) rotate(-8deg); }
}
/* Aktive Filter: Teal-Rahmen + Icon in Textfarbe. */
.wpms-mat-filterbtn.is-active{ border-color:var(--wpms-teal2); }
.wpms-mat-filterbtn.is-active .wpms-ic{ color:var(--wpms-text); }
/* „+ Neu": Feld-Form, aber eine Nummer kleiner (Kopfzeilen-Button). */
/* „+ Neu": nur ein großes Plus, dreht sich beim Hover ein. */
#wpms-app .wpms-mat-neu-btn{ height:34px; width:34px; padding:0; }
.wpms-mat-neu-btn span{ display:inline-flex; align-items:center; justify-content:center; font-size:22px; font-weight:400; line-height:1; transition:transform .18s ease; }
@media (hover:hover){ .wpms-mat-neu-btn:hover span{ transform:rotate(90deg) scale(1.12); } }
.wpms-mat-tab{ flex:0 0 auto; font:inherit; font-size:var(--mat-fs-btn); font-weight:500; height:calc(var(--mat-h) + 7px); padding:0 14px 6px; border:0; border-bottom:2px solid transparent; border-radius:0; background:transparent; color:var(--wpms-muted); cursor:pointer; white-space:nowrap; }
.wpms-mat-tab:hover{ color:var(--wpms-text); }
/* Aktiv: Text normal + Wieland-grüner Unterstrich (kein Türkis). */
.wpms-mat-tab.is-active{ color:var(--wpms-text); border-bottom-color:var(--wpms-teal2); font-weight:600; }
/* Rote Zähler-Blase für offene Anforderungen am Tab */
.wpms-mat-tabbadge{ display:inline-flex; align-items:center; justify-content:center; min-width:17px; height:17px; margin-left:6px; padding:0 5px; border-radius:9px; background:#c0392b; color:#fff; font-size:11px; font-weight:700; line-height:1; vertical-align:middle; }

/* ---- Segmente (Buchen-Typ, Verwaltung, Auswertung, Inventurart) ----
   Gleiche Form wie die Eingabefelder: 40px, r10, 1px Rahmen, Feld-Hintergrund.
   Aktiv = Wieland-Grün. Inhaltsbreit, mobil wischbar. */
/* Unterbereich-Umschalter: leise Text-Segmente (kleiner/ruhiger als die Haupttabs),
   aktiv = Textfarbe + feiner Unterstrich (currentColor → hell & dunkel korrekt). */
.wpms-mat-segwrap{ margin-bottom:14px; }
.wpms-mat-segwrap .wpms-mat-seg{ margin-bottom:0; }
.wpms-mat-seg{ display:inline-flex; max-width:100%; gap:22px; margin-bottom:14px; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
.wpms-mat-seg::-webkit-scrollbar{ display:none; }
.wpms-mat-segbtn{ flex:0 0 auto; min-width:0; height:30px; padding:0 1px 6px; font:inherit; font-size:var(--mat-fs); font-weight:500; border:0; border-bottom:1px solid transparent; border-radius:0; background:transparent; color:var(--wpms-muted); cursor:pointer; white-space:nowrap; }
.wpms-mat-segbtn:hover{ color:var(--wpms-text); }
.wpms-mat-segbtn.is-active{ color:var(--wpms-text); border-bottom-color:var(--wpms-teal2); font-weight:600; }
/* Schmale Viewports: Dropdown-Button statt Segment-Reihe. */
.wpms-mat-segdd{ display:none; align-items:center; gap:8px; height:34px; padding:0 12px; font:inherit; font-size:14px; font-weight:600; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-input); color:var(--wpms-text); cursor:pointer; white-space:nowrap; }
.wpms-mat-segdd svg{ flex:0 0 auto; opacity:.7; }
@media (max-width:719px){
	.wpms-mat-segwrap .wpms-mat-seg{ display:none; }
	.wpms-mat-segdd{ display:inline-flex; }
}

/* ---- Buttons: GENAU drei Typen ---- */
/* Primär: Hauptaktionen (Action-Bar, Buchen, Starten, + Artikel) */
.wpms-mat-abtn{ flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; gap:8px; font:inherit; font-size:var(--mat-fs-btn); font-weight:600; height:var(--mat-h); padding:0 16px; border:1px solid var(--wpms-line); border-radius:var(--mat-r); background:var(--wpms-input); color:var(--wpms-text); cursor:pointer; white-space:nowrap; }
.wpms-mat-abtn:hover{ border-color:var(--wpms-teal2); }
.wpms-mat-abtn .wpms-ic{ width:16px; height:16px; }
.wpms-mat-abtn:disabled{ opacity:.55; cursor:default; }
/* Sekundär: Standard-/Zeilenaktionen (kompakt, überall identisch) */
.wpms-mat-host .wpms-mini, .wpms-mat-detail .wpms-mini, .wpms-mat-rowact .wpms-mini, .wpms-mat-invdiff .wpms-mini, .wpms-mat-rechte .wpms-mini{
	height:var(--mat-h-sm); padding:0 10px; font-size:var(--mat-fs-sm); border-radius:8px; display:inline-flex; align-items:center; justify-content:center; }
.wpms-mat-invdiff .wpms-mini.is-sel{ border-color:var(--wpms-teal2); box-shadow:0 0 0 1px var(--wpms-teal2); font-weight:600; }
/* Ghost: Nebenaktionen (Textlinks in Bereichs-Überschriften) */
.wpms-mat-sect-link{ font:inherit; font-size:12px; font-weight:600; letter-spacing:.3px; text-transform:none; border:0; background:none; color:var(--wpms-muted); cursor:pointer; padding:0; }
.wpms-mat-sect-link:hover{ color:var(--wpms-text); }
.wpms-mat-sect-first{ margin-top:4px; }
.wpms-mat-sect-links{ display:inline-flex; gap:18px; }
/* Formular-Submits übernehmen die System-Höhe (unabhängig von .wpms-btn-Altklassen). */
#wpms-app .wpms-mat-form button[type=submit]{ min-height:var(--mat-h); height:var(--mat-h); font-size:var(--mat-fs-btn); border-radius:var(--mat-r); margin-top:0; }
#wpms-app .wpms-mat-book{ width:100%; }
@media (min-width:761px){ #wpms-app .wpms-mat-form > button[type=submit], #wpms-app .wpms-mat-book{ width:auto; justify-self:end; height:var(--mat-h); min-height:var(--mat-h); min-width:160px; padding:0 22px; font-size:var(--mat-fs-btn); } }

/* ---- Eingabefelder: EIN Maß für Suche/Select/Zahl/Datum/Text ---- */
#wpms-app .wpms-mat-search,
#wpms-app .wpms-mat-toolbar select,
#wpms-app .wpms-mat-topbar select,
#wpms-app .wpms-mat-form input:not([type=checkbox]):not([type=radio]):not([type=file]),
#wpms-app .wpms-mat-form select,
#wpms-app .wpms-mat-invpos input,
#wpms-app .wpms-mat-invdiff-k{
	height:var(--mat-h); min-height:var(--mat-h); font-size:var(--mat-fs-input);
	padding-top:0; padding-bottom:0; border:1px solid var(--wpms-line); border-radius:var(--mat-r);
	background:var(--wpms-input); color:var(--wpms-text); box-sizing:border-box; }
#wpms-app .wpms-mat-search{ padding-left:12px; padding-right:12px; font:inherit; font-size:var(--mat-fs-input); }
#wpms-app .wpms-mat-topbar select, #wpms-app .wpms-mat-toolbar select{ font:inherit; font-size:var(--mat-fs-input); padding-left:12px; padding-right:12px; }
/* Selects im Modul komplett selbst rendern (appearance:none + eigener Chevron):
   native macOS/iOS-Selects zeichnen sonst eigene Ecken → Radius weicht von den Buttons ab. */
#wpms-app .wpms-mat-toolbar select,
#wpms-app .wpms-mat-topbar select,
#wpms-app .wpms-mat-awfilter select,
#wpms-app .wpms-mat-form select{
	appearance:none; -webkit-appearance:none; padding-right:34px; cursor:pointer;
	background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa1a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
	background-repeat:no-repeat; background-position:right 10px center; }
#wpms-app .wpms-mat-form textarea{ font-size:var(--mat-fs-input); min-height:64px; }
#wpms-app .wpms-mat-search:focus,
#wpms-app .wpms-mat-toolbar select:focus,
#wpms-app .wpms-mat-topbar select:focus,
#wpms-app .wpms-mat-invpos input:focus,
#wpms-app .wpms-mat-invdiff-k:focus{ outline:none; border-color:var(--wpms-teal2); box-shadow:0 0 0 1px var(--wpms-teal2); }

/* ---- Filter-/Toolbar-Zeile (alle Elemente exakt --mat-h) ---- */
.wpms-mat-toolbar, .wpms-mat-topbar{ display:flex; align-items:center; gap:var(--mat-gap); flex-wrap:wrap; margin-bottom:12px; }
.wpms-mat-toolbar .wpms-mat-search{ flex:2 1 220px; min-width:0; }
.wpms-mat-topbar .wpms-mat-search{ flex:1 1 220px; min-width:0; }
#wpms-app .wpms-mat-toolbar select{ flex:1 1 150px; min-width:0; }
.wpms-mat-toolbar .wpms-mat-abtn{ flex:0 0 auto; }
@media (max-width:760px){
	.wpms-mat-toolbar .wpms-mat-search{ flex:1 1 100%; }
	#wpms-app .wpms-mat-toolbar select{ flex:1 1 calc(33% - 8px); }
	.wpms-mat-toolbar .wpms-mat-abtn{ flex:1 1 100%; }
}
.wpms-mat-invlager{ flex:0 1 260px; }
/* Auswertung/Historie: Segmente + Filter in EINER Toolbar-Zeile */
.wpms-mat-awbar{ margin-bottom:14px; }
.wpms-mat-awbar .wpms-mat-segwrap{ margin-bottom:0; flex:0 0 auto; }
.wpms-mat-awfilter{ flex:0 0 auto; margin-left:auto; }
#wpms-app .wpms-mat-awfilter select{ height:40px; min-height:40px; font:inherit; font-size:var(--mat-fs-input); padding:0 34px 0 12px; border:1px solid var(--wpms-line); border-radius:var(--mat-r); background-color:var(--wpms-input); color:var(--wpms-text); }
#wpms-app .wpms-mat-awfilter select:focus{ outline:none; border-color:var(--wpms-teal2); box-shadow:0 0 0 1px var(--wpms-teal2); }
@media (max-width:760px){ .wpms-mat-awfilter{ flex:1 1 100%; margin-left:0; } #wpms-app .wpms-mat-awfilter select{ width:100%; height:46px; min-height:46px; } }
.wpms-mat-lwcard .wpms-mat-bignum{ margin:2px 0 4px; }
.wpms-mat-aw-leer{ grid-column:1 / -1; padding:8px 2px; }
.wpms-mat-invhint{ flex:1 1 220px; margin:0; align-self:center; color:var(--wpms-muted); font-size:var(--mat-fs); }

/* ---- Karten: EIN Kartenstil (Radius 12, 1px Rahmen, Karten-BG) ---- */
.wpms-mat-kpi, .wpms-mat-form, .wpms-mat-anf, .wpms-mat-invdiff, .wpms-mat-table, .wpms-mat-art, .wpms-mat-hlist{
	background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:var(--mat-r-card); }

/* Dashboard-Kachel (im App-Dashboard, nutzt die dcard-Optik) */
.wpms-mat-dcard .wpms-menucard{ margin-bottom:8px; }
.wpms-mat-dbtns{ display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.wpms-mat-dbtn{ flex:1 1 0; min-width:90px; font-size:12.5px; padding:6px 8px; min-height:0; border-radius:var(--mat-r); background:var(--wpms-input); border:1px solid var(--wpms-line); color:var(--wpms-text); }
.wpms-mat-dbtn:hover{ border-color:var(--wpms-teal2); background:var(--wpms-input); }
.wpms-menurow.is-static{ cursor:default; }
.wpms-menurow.is-static:hover{ background:transparent; }

/* ---- Übersicht: KPI → Action-Bar → Warnungen → Bewegungen ---- */
.wpms-mat-kpis{ display:grid; grid-template-columns:repeat(4,1fr); gap:var(--mat-gap); margin-bottom:14px; }
@media (max-width:760px){ .wpms-mat-kpis{ grid-template-columns:repeat(2,1fr); } }
/* KPI-Karte: Zahl+Label links, Icon rechts – nutzt die volle Kartenbreite. */
.wpms-mat-kpi{ display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"num icon" "label icon"; align-items:center; row-gap:2px; font:inherit; padding:14px 16px; color:var(--wpms-text); cursor:pointer; text-align:left; min-height:76px; }
.wpms-mat-kpi:disabled{ cursor:default; }
.wpms-mat-kpi:not(:disabled):hover{ border-color:var(--wpms-teal2); }
.wpms-mat-kpi .wpms-ic{ grid-area:icon; width:22px; height:22px; color:var(--wpms-muted); align-self:center; margin-left:12px; }
.wpms-mat-kpi strong{ grid-area:num; font-size:22px; font-weight:700; line-height:1.1; letter-spacing:-.3px; }
.wpms-mat-kpi span{ grid-area:label; font-size:var(--mat-fs-sm); color:var(--wpms-muted); }
@media (max-width:760px){ .wpms-mat-kpi{ min-height:84px; } .wpms-mat-kpi strong{ font-size:24px; } }
.wpms-mat-actions{ display:flex; gap:var(--mat-gap); margin-bottom:16px; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; padding-bottom:2px; }
.wpms-mat-actions::-webkit-scrollbar{ display:none; }
.wpms-mat-warns{ display:flex; flex-direction:column; gap:6px; }
.wpms-mat-warn{ display:flex; align-items:center; gap:12px; width:100%; font:inherit; font-size:var(--mat-fs); min-height:var(--mat-h); padding:0 12px; border:1px solid var(--wpms-line); border-radius:var(--mat-r); background:var(--wpms-card); color:var(--wpms-text); cursor:pointer; text-align:left; }
.wpms-mat-warn:hover{ border-color:var(--wpms-teal2); }
.wpms-mat-warn-dot{ flex:0 0 auto; width:8px; height:8px; border-radius:50%; background:var(--wpms-muted); }
.wpms-mat-warn-dot.is-rot{ background:#c0392b; }
.wpms-mat-warn-dot.is-gruen{ background:#2e7d32; }
body.wpms-theme-dark .wpms-mat-warn-dot.is-gruen{ background:#4caf50; }
.wpms-mat-warn-t{ flex:1 1 auto; min-width:0; }
.wpms-mat-warn-arr{ flex:0 0 auto; color:var(--wpms-muted); font-size:18px; line-height:1; }
.is-red{ color:#c0392b; }
.is-green{ color:#2e7d32; }

/* ---- Buchungsliste (Übersicht/Historie/Artikel-Detail): Spalten-Raster ----
   Typ | Menge+Artikel | Details | Gebucht von | Datum | ⋯ — sauber übereinander,
   volle Breite. Mobil: 3-Spalten-Kurzform (Details/Datum in zweiter Zeile). */
.wpms-mat-moves{ display:flex; flex-direction:column; }
/* Feste Datums-Spalte (statt auto): sonst rechnet jede Zeile ihr eigenes Grid unterschiedlich
 * (Detailzeile ohne Datum) und Spalte 3 verrutscht gegenüber der Kopfzeile. */
.wpms-mat-move{ display:grid; grid-template-columns:112px minmax(140px,1.4fr) minmax(90px,1fr) minmax(130px,1.3fr) minmax(150px,1fr) 140px 52px; align-items:center; gap:4px 12px; padding:7px 2px; border-bottom:1px solid var(--wpms-line); font-size:var(--mat-fs); }
.wpms-mat-move:last-child{ border-bottom:0; }
.wpms-mat-move-typ{ justify-self:start; font-size:10px; font-weight:600; letter-spacing:.3px; text-transform:uppercase; color:var(--wpms-muted); border:1px solid var(--wpms-line); border-radius:999px; padding:2px 8px; white-space:nowrap; }
/* Buchungsrichtung farbig: rein = grün, raus/Verlust = rot (Umbuchung/Inventur neutral). */
.wpms-mat-typ-eingang, .wpms-mat-typ-rueckgabe{ border-color:rgba(46,125,50,.55); color:#2e7d32; }
.wpms-mat-typ-ausgabe, .wpms-mat-typ-schwund, .wpms-mat-typ-entsorgung, .wpms-mat-typ-beschaedigt{ border-color:rgba(192,57,43,.55); color:#c0392b; }
body.wpms-theme-dark .wpms-mat-typ-eingang, body.wpms-theme-dark .wpms-mat-typ-rueckgabe{ color:#4caf50; border-color:rgba(76,175,80,.5); }
body.wpms-theme-dark .wpms-mat-typ-ausgabe, body.wpms-theme-dark .wpms-mat-typ-schwund, body.wpms-theme-dark .wpms-mat-typ-entsorgung, body.wpms-theme-dark .wpms-mat-typ-beschaedigt{ color:#e57368; border-color:rgba(229,115,104,.5); }
/* Spaltenkopf */
.wpms-mat-move-head{ font-size:11px; font-weight:700; letter-spacing:.8px; text-transform:uppercase; color:var(--wpms-muted); }
.wpms-mat-move-head .wpms-mat-move-dt{ font-size:11px; font-weight:700; letter-spacing:.8px; }
@media (max-width:900px){ .wpms-mat-move-head{ display:none; } }
.wpms-mat-move-a{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-mat-move-a strong{ font-size:var(--mat-fs); }
.wpms-mat-move-lg{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--wpms-muted); font-size:var(--mat-fs-sm); }
.wpms-mat-move-info{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--wpms-muted); font-size:var(--mat-fs-sm); }
.wpms-mat-move-info small{ display:block; color:var(--wpms-muted); font-size:var(--mat-fs-sm); overflow:hidden; text-overflow:ellipsis; }
.wpms-mat-move-user{ color:var(--wpms-muted); font-size:var(--mat-fs-sm); white-space:nowrap; text-align:left; justify-self:start; }
.wpms-mat-move-dt{ color:var(--wpms-muted); font-size:11.5px; white-space:nowrap; text-align:right; }
.wpms-mat-move-act{ justify-self:end; display:flex; gap:2px; align-items:center; }
/* Kompakte Buchungsliste (Artikel-Detail): Grund + Aktionsspalte weg → Datum hat Platz. */
.wpms-mat-hkompakt .wpms-mat-move{ grid-template-columns:100px minmax(0,1.3fr) minmax(0,1fr) auto; }
.wpms-mat-hkompakt .wpms-mat-move-info, .wpms-mat-hkompakt .wpms-mat-move-act, .wpms-mat-hkompakt .wpms-mat-move-user{ display:none; }
.wpms-mat-move-act .wpms-kebab{ padding:2px; }
@media (max-width:900px){
	.wpms-mat-move{ grid-template-columns:auto 1fr 52px; }
	.wpms-mat-move-typ{ grid-row:1; }
	.wpms-mat-move-a{ grid-row:1; }
	.wpms-mat-move-act{ grid-row:1; }
	.wpms-mat-move-lg{ grid-column:1 / -1; white-space:normal; }
	.wpms-mat-move-info{ grid-column:1 / -1; white-space:normal; }
	.wpms-mat-move-user{ display:none; }
	.wpms-mat-move-dt{ grid-column:1 / -1; text-align:left; }
}
/* Aufklappbare Detail-Zeile (alle Buchungslisten): Zellen im GLEICHEN Spaltenraster wie die
 * Zeile (Kunde unter Artikel, Kommentar unter Lager, Einsatz unter Mitarbeiter).
 * Chevron ruhig ohne Hover-Fläche, dreht beim Öffnen; ganze Zeile klickbar. */
.wpms-mat-move-klick{ cursor:pointer; -webkit-user-select:none; user-select:none; }
.wpms-mat-move-klick.is-offen{ border-bottom-color:transparent; }
.wpms-mat-move-exp{ background:none; border:0; padding:2px; margin:0; color:var(--wpms-muted); cursor:pointer; display:flex; align-items:center; }
.wpms-mat-move-exp svg{ transition:transform .18s ease; }
.wpms-mat-move-exp.is-open svg{ transform:rotate(180deg); }
.wpms-mat-move-detail{ align-items:start; padding-top:2px; padding-bottom:10px; font-size:var(--mat-fs-sm); }
.wpms-mat-move-detail .wpms-mat-dc{ min-width:0; overflow:hidden; text-overflow:ellipsis; }
.wpms-mat-move-detail small{ display:block; color:var(--wpms-muted); font-size:10px; font-weight:600; letter-spacing:.5px; text-transform:uppercase; margin-bottom:2px; }
.wpms-mat-move-dleer{ color:var(--wpms-muted); }
@media (max-width:900px){
	.wpms-mat-move-detail{ display:flex; flex-wrap:wrap; gap:4px 28px; padding-left:2px; }
}
/* Kapitälchen-Titel über einem Anlage-Formular (Lager/Fahrzeug getrennt) */
.wpms-mat-formtitel{ margin:0 0 4px; font-size:12px; font-weight:700; letter-spacing:.8px; text-transform:uppercase; color:var(--wpms-muted); }
/* Inline-Bearbeiten unter der Zeile (Menge + Kommentar) */
.wpms-mat-move-edit{ display:flex; align-items:flex-end; gap:10px; flex-wrap:wrap; padding:10px 2px 12px; border-bottom:1px solid var(--wpms-line); }
.wpms-mat-move-edit label{ display:grid; gap:4px; font-size:var(--mat-fs-sm); color:var(--wpms-muted); }
#wpms-app .wpms-mat-move-edit input{ height:var(--mat-h-sm); min-height:var(--mat-h-sm); font-size:var(--mat-fs); padding:0 10px; border:1px solid var(--wpms-line); border-radius:8px; background:var(--wpms-input); color:var(--wpms-text); }
#wpms-app .wpms-mat-move-edit input[name=menge]{ width:110px; }
#wpms-app .wpms-mat-move-edit input[name=kommentar]{ width:260px; max-width:60vw; }
#wpms-app .wpms-mat-move-edit input:focus{ outline:none; border-color:var(--wpms-teal2); box-shadow:0 0 0 1px var(--wpms-teal2); }
/* MA-Dropdown im Inline-Bearbeiten wie die anderen App-Selects (eigener Chevron, dunkel). */
#wpms-app .wpms-mat-move-edit select{ height:var(--mat-h-sm); min-height:var(--mat-h-sm); font-size:var(--mat-fs); padding:0 32px 0 10px; border:1px solid var(--wpms-line); border-radius:8px; background-color:var(--wpms-input); color:var(--wpms-text); cursor:pointer; -webkit-appearance:none; appearance:none; background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa1a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat:no-repeat; background-position:right 10px center; }
#wpms-app .wpms-mat-move-edit select:focus{ outline:none; border-color:var(--wpms-teal2); box-shadow:0 0 0 1px var(--wpms-teal2); }
.wpms-mat-hlist{ padding:4px 14px; }
.wpms-mat-kritrow{ display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; font:inherit; font-size:var(--mat-fs); padding:8px 10px; border:0; border-bottom:1px solid var(--wpms-line); background:transparent; color:var(--wpms-text); text-align:left; cursor:pointer; }
.wpms-mat-kritrow:last-child{ border-bottom:0; }
.wpms-mat-kritrow small{ display:block; color:var(--wpms-muted); font-size:var(--mat-fs-sm); }
.wpms-mat-kritrow strong{ flex:0 0 auto; white-space:nowrap; }
.wpms-mat-kritrow.is-sum{ font-weight:600; cursor:default; }
div.wpms-mat-kritrow{ cursor:default; }

/* ---- Formulare: kompaktes Spaltenraster (3 Spalten, 4 ab 1200px) ---- */
.wpms-form.wpms-mat-form{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px 12px; max-width:var(--mat-maxw); padding:14px var(--mat-pad); }
@media (min-width:1200px){ .wpms-form.wpms-mat-form{ grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (max-width:760px){ .wpms-form.wpms-mat-form{ grid-template-columns:1fr; } }
.wpms-mat-form > .wpms-grid2{ display:contents; }
.wpms-mat-form label{ gap:4px; min-width:0; font-size:var(--mat-fs-sm); }
.wpms-mat-form > button[type=submit], .wpms-mat-form > .wpms-err, .wpms-mat-form > .wpms-mini-check,
.wpms-mat-form label:has(textarea){ grid-column:1 / -1; }
.wpms-mat-form > .wpms-err:empty{ display:none; }
.wpms-mat-bestinfo{ margin:2px 0 0; font-size:var(--mat-fs-sm); color:var(--wpms-muted); }
/* Mengenfeld: schlichtes Zahlenfeld ohne +/−-Stepper und ohne native Spin-Pfeile. */
#wpms-app .wpms-mat-form input[type=number]{ appearance:textfield; -moz-appearance:textfield; }
#wpms-app .wpms-mat-form input[type=number]::-webkit-outer-spin-button,
#wpms-app .wpms-mat-form input[type=number]::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }

/* ---- Karten-Listen (Anforderungen/Lager/Lieferanten/Inventurliste) ---- */
.wpms-mat-anflist{ display:flex; flex-direction:column; gap:6px; }
.wpms-mat-anf{ display:flex; align-items:center; gap:10px; padding:8px 12px; font:inherit; color:var(--wpms-text); text-align:left; }
button.wpms-mat-anf, .wpms-mat-invrow{ cursor:pointer; }
button.wpms-mat-anf:hover, .wpms-mat-invrow:hover{ border-color:var(--wpms-teal2); }
.wpms-mat-anf-l{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; }
.wpms-mat-anf-l strong{ font-size:var(--mat-fs); }
.wpms-mat-anf-l small{ color:var(--wpms-muted); font-size:var(--mat-fs-sm); }
.wpms-mat-anf-r{ flex:0 0 auto; display:flex; flex-direction:column; align-items:flex-end; gap:7px; }
.wpms-mat-anf-act{ display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
/* Status: kleiner Punkt + gedimmter Text statt umrandeter Pille
   (grau = erledigt/abgeschlossen, teal2 = laufend/offen, rot = abgelehnt). */
.wpms-mat-status{ display:inline-flex; align-items:center; gap:7px; font-size:12px; font-weight:500; color:var(--wpms-muted); white-space:nowrap; }
.wpms-mat-status::before{ content:''; flex:0 0 auto; width:7px; height:7px; border-radius:50%; background:var(--wpms-muted); }
.wpms-mat-status.is-offen::before, .wpms-mat-status.is-genehmigt::before, .wpms-mat-status.is-teilweise::before{ background:var(--wpms-teal2); }
.wpms-mat-status.is-abgelehnt{ color:#c0392b; }
.wpms-mat-status.is-abgelehnt::before{ background:#c0392b; }
/* Inventur: grün = sauber (0 Differenzen), rot = mit Differenzen. */
.wpms-mat-status.is-sauber::before{ background:#2e7d32; }
body.wpms-theme-dark .wpms-mat-status.is-sauber::before{ background:#4caf50; }
.wpms-mat-status.is-diff::before{ background:#c0392b; }
@media (max-width:600px){ .wpms-mat-anf{ flex-direction:column; align-items:stretch; } .wpms-mat-anf-r{ flex-direction:row; align-items:center; justify-content:space-between; } }

/* ---- Artikel: Karten (mobil) + Datentabelle (Desktop) ---- */
.wpms-mat-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); gap:var(--mat-gap); }
/* Artikel-Kachel-Raster (Desktop-Ansicht „Kacheln"): Produktbild oben, Infos darunter. */
.wpms-mat-kgrid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:14px; }
.wpms-mat-kachel{ position:relative; display:flex; flex-direction:column; border:1px solid var(--wpms-line); border-radius:var(--mat-r-card); background:var(--wpms-input); overflow:hidden; cursor:pointer; text-align:left; }
.wpms-mat-kachel:hover{ border-color:var(--wpms-teal2); }
.wpms-mat-kachel.is-krit{ border-color:rgba(229,115,104,.5); }
.wpms-mat-kachel-img{ display:block; width:100%; height:150px; object-fit:cover; background:var(--wpms-card); border:0; }
.wpms-mat-kachel-ph{ display:flex; align-items:center; justify-content:center; color:var(--wpms-muted); }
.wpms-mat-kachel-ph svg{ width:34px; height:34px; }
.wpms-mat-kachel-b{ display:flex; flex-direction:column; gap:2px; padding:10px 12px 12px; min-width:0; }
.wpms-mat-kachel-b strong{ font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-mat-kachel-b > small{ color:var(--wpms-muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-mat-kachel-bst{ margin-top:5px; display:flex; align-items:baseline; gap:8px; }
.wpms-mat-kachel-bst span{ font-weight:600; }
.wpms-mat-kachel-bst .is-red{ color:#e57368; }
.wpms-mat-kachel-bst small{ color:var(--wpms-muted); font-size:12px; }
.wpms-mat-kachel .wpms-mat-rowact{ position:absolute; top:8px; right:8px; background:rgba(0,0,0,.45); border-radius:8px; }
.wpms-mat-art{ display:flex; flex-direction:column; gap:8px; font:inherit; padding:10px 12px; color:var(--wpms-text); cursor:pointer; text-align:left; }
.wpms-mat-art:hover{ border-color:var(--wpms-teal2); }
.wpms-mat-art.is-krit{ border-left:3px solid #c0392b; }
.wpms-mat-art-top{ display:flex; align-items:center; gap:12px; min-width:0; }
.wpms-mat-art-img{ flex:0 0 auto; width:48px; height:48px; border-radius:var(--mat-r); object-fit:cover; background:var(--wpms-input); display:flex; align-items:center; justify-content:center; color:var(--wpms-muted); }
.wpms-mat-art-ph .wpms-ic{ width:22px; height:22px; }
.wpms-mat-art-m{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; }
.wpms-mat-art-m strong{ font-size:var(--mat-fs); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-mat-art-m small{ color:var(--wpms-muted); font-size:var(--mat-fs-sm); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-mat-art-b{ flex:0 0 auto; display:flex; flex-direction:column; align-items:flex-end; font-weight:700; font-size:16px; }
.wpms-mat-art-b small{ font-weight:400; color:var(--wpms-muted); font-size:11px; }
.wpms-mat-rowact{ display:inline-flex; gap:6px; }
.wpms-mat-art-top .wpms-mat-rowact{ flex:0 0 auto; margin-left:2px; }
.wpms-mat-rowact.is-ghost{ visibility:hidden; pointer-events:none; }
.wpms-mat-table{ overflow:hidden; }
.wpms-mat-trow{ display:grid; grid-template-columns:48px minmax(180px,2fr) 1fr 1fr 100px 80px auto; align-items:center; gap:10px; padding:6px 12px; border-bottom:1px solid var(--wpms-line); cursor:pointer; }
.wpms-mat-trow:last-child{ border-bottom:0; }
.wpms-mat-trow:not(.wpms-mat-thead):hover{ background:var(--wpms-hover); }
.wpms-mat-trow.is-krit{ box-shadow:inset 3px 0 0 #c0392b; }
.wpms-mat-thead{ font-size:11px; font-weight:700; letter-spacing:.8px; text-transform:uppercase; color:var(--wpms-muted); cursor:default; padding-top:8px; padding-bottom:8px; }
.wpms-mat-tname{ min-width:0; display:flex; flex-direction:column; gap:1px; }
.wpms-mat-tname strong{ font-size:var(--mat-fs); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-mat-tname small{ color:var(--wpms-muted); font-size:var(--mat-fs-sm); }
.wpms-mat-tmut{ color:var(--wpms-muted); font-size:var(--mat-fs); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-mat-trow .ta-r{ display:flex; align-items:baseline; justify-content:flex-end; gap:4px; text-align:right; white-space:nowrap; line-height:1.2; align-self:center; }
.wpms-mat-trow .ta-r strong{ font-size:var(--mat-fs); font-weight:500; }
.wpms-mat-trow .ta-r small{ color:var(--wpms-muted); font-size:var(--mat-fs); }
.wpms-mat-table .wpms-mat-rowact{ justify-content:flex-end; flex-wrap:nowrap; }
.wpms-mat-table .wpms-mat-rowact .wpms-mini{ flex:0 0 auto; }
.wpms-mat-table .wpms-mat-art-img{ width:30px; height:30px; border-radius:8px; }

/* ---- Upload-Zonen (Artikelbild / Produktdatenblatt) ---- */
/* Feste Höhe (nicht min-height): die Zone darf beim Befüllen NICHT wachsen, sonst
   verschiebt sich die Nachbarzone daneben und alles darunter. Bei has-file weicht
   das Pfeil-Icon der Dateizeile, damit der Inhalt in derselben Höhe Platz hat. */
.wpms-mat-drop{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; box-sizing:border-box; width:100%; min-width:0; height:104px; padding:14px; border:1.5px dashed var(--wpms-line); border-radius:var(--mat-r-card); background:transparent; color:var(--wpms-muted); cursor:pointer; text-align:center; }
.wpms-mat-drop .wpms-ic{ width:20px; height:20px; flex:0 0 auto; }
.wpms-mat-drop-t{ font-size:var(--mat-fs-sm); max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-mat-drop:hover, .wpms-mat-drop.is-over{ border-color:var(--wpms-teal2); background:var(--wpms-input); }
.wpms-mat-drop.has-file{ border-style:solid; }
.wpms-mat-drop.has-file .wpms-ic{ display:none; }
.wpms-mat-drop-file{ display:flex; align-items:center; gap:8px; flex:0 0 auto; min-width:0; color:var(--wpms-text); font-size:var(--mat-fs-sm); max-width:100%; }
/* Klassen-display schlägt sonst das UA-[hidden] → leere Zeile würde Platz (gap) fressen. */
.wpms-mat-drop-file[hidden]{ display:none; }
.wpms-mat-drop-file img{ width:36px; height:36px; border-radius:8px; object-fit:cover; flex:0 0 auto; }
/* Dateiname kürzen statt die Zone breiter zu machen (sie würde sonst in die Nachbarspalte ragen). */
.wpms-mat-drop-file span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; max-width:100%; }

/* ---- Artikel-Detail ---- */
.wpms-kr-block p{ margin:4px 0 0; font-size:var(--mat-fs); }
.wpms-mat-del{ margin-top:14px; }

/* ---- Inventur ---- */
.wpms-mat-invstart{ margin-bottom:8px; }
/* Statuszeile unter der Startzeile: ruhig wenn bereit, Blocker als wpms-mat-warn-Zeilen. */
.wpms-mat-invstatus{ display:flex; flex-direction:column; gap:6px; margin:2px 0 8px; }
.wpms-mat-ready{ margin:0; color:var(--wpms-muted); font-size:var(--mat-fs-sm); }
/* Buttons in Toolbars (Inventur starten, + Artikel): exakt die Feld-Form der Selects daneben —
   gleiche Höhe/Ecken UND gleiche Schrift (sonst wirkt der Button durch Fettdruck wie eine andere Form).
   #wpms-app-Präfix: font-size muss die ID-Regel (16px iOS-Zoom) schlagen. */
#wpms-app .wpms-mat-toolbar .wpms-mat-abtn{ height:var(--mat-h); min-height:var(--mat-h); border-radius:var(--mat-r); font-size:var(--mat-fs-input); font-weight:400; padding:0 14px; }
.wpms-kebab-it.is-sel{ font-weight:600; }
.wpms-mat-prog{ display:flex; align-items:center; gap:12px; margin:4px 0 10px; }
.wpms-mat-prog-track{ flex:1 1 auto; height:8px; border-radius:4px; background:var(--wpms-input); overflow:hidden; }
.wpms-mat-prog-fill{ display:block; height:100%; border-radius:4px; background:var(--wpms-teal2); transition:width .3s ease; }
.wpms-mat-prog-t{ flex:0 0 auto; font-size:var(--mat-fs-sm); font-weight:600; color:var(--wpms-muted); white-space:nowrap; }
.wpms-mat-invlist{ display:flex; flex-direction:column; gap:4px; margin:10px 0; }
.wpms-mat-invpos{ display:flex; align-items:center; gap:10px; padding:5px 10px; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:var(--mat-r); }
.wpms-mat-invpos.is-done .wpms-mat-invpos-n strong{ color:var(--wpms-muted); }
.wpms-mat-invpos-n{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:1px; }
.wpms-mat-invpos-n strong{ font-size:var(--mat-fs); }
.wpms-mat-invpos-n small{ color:var(--wpms-muted); font-size:var(--mat-fs-sm); }
.wpms-mat-invpos-d{ flex:0 0 auto; font-weight:700; font-size:var(--mat-fs); min-width:44px; text-align:right; }
#wpms-app .wpms-mat-invpos input{ flex:0 0 auto; width:64px; height:34px; min-height:34px; padding:0 8px; text-align:center; font-weight:700; }
/* Inventur-Detail: Kopf mit Titel + Aktions-Icons */
.wpms-mat-invhead{ display:flex; align-items:flex-start; gap:12px; }
.wpms-mat-invhead h1{ flex:1 1 auto; min-width:0; margin:0; }
.wpms-mat-invhead-act{ flex:0 0 auto; display:flex; gap:8px; margin-top:4px; }
.wpms-mat-detail-del:hover{ border-color:#c0392b; color:#e57368; }
/* Artikel-Suche volle Breite */
#wpms-app .wpms-mat-invsearch{ display:block; width:100%; box-sizing:border-box; margin:6px 0 10px; }
/* „Inventur abschließen": dunkel + eckig statt Teal-Pille */
#wpms-app .wpms-mat-invfin{ background:var(--wpms-input); color:var(--wpms-text); border:1px solid var(--wpms-line); border-radius:10px; padding:11px 20px; margin-top:18px; }
#wpms-app .wpms-mat-invfin:hover{ border-color:var(--wpms-teal2); }
.wpms-mat-invdiff{ display:flex; flex-direction:column; gap:14px; padding:16px 16px 18px; border-left:3px solid #e08a1e; }
/* Spalten-Überschrift + Karten-Kopf teilen sich dasselbe Raster (Artikel · Differenz · Anzahl). */
.wpms-mat-invdiff-thead{ display:grid; grid-template-columns:1fr 110px 100px; gap:12px; padding:0 16px 4px 19px; font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--wpms-muted); }
.wpms-mat-invdiff-thead span:nth-child(2), .wpms-mat-invdiff-thead span:nth-child(3){ text-align:right; }
.wpms-mat-invdiff-h{ display:grid; grid-template-columns:1fr 110px 100px; gap:12px; align-items:baseline; font-size:var(--mat-fs); }
.wpms-mat-invdiff-h strong{ font-size:calc(var(--mat-fs) + 1px); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-mat-invdiff-diff{ text-align:right; font-weight:700; }
.wpms-mat-invdiff-anz{ text-align:right; font-weight:700; color:var(--wpms-muted); }
.wpms-mat-invdiff-anz small{ font-weight:400; }
.wpms-mat-invdiff-act{ display:flex; gap:8px; flex-wrap:wrap; }
/* Mengen-Aufteilung je Grund (Schwund/Defekt) */
.wpms-mat-invdiff-split{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; padding-left:18px; }
.wpms-mat-invsplit-it{ display:flex; align-items:center; gap:8px; font-size:var(--mat-fs-sm); color:var(--wpms-muted); }
.wpms-mat-invsplit-it small{ color:var(--wpms-muted); }
#wpms-app .wpms-mat-invsplit-it input{ width:64px; height:34px; min-height:34px; padding:0 8px; text-align:center; font-weight:700; border:1px solid var(--wpms-line); border-radius:8px; background:var(--wpms-input); color:var(--wpms-text); }
#wpms-app .wpms-mat-invsplit-it input:focus{ outline:none; border-color:var(--wpms-teal2); box-shadow:0 0 0 1px var(--wpms-teal2); }
.wpms-mat-invsplit-sum{ font-size:var(--mat-fs-sm); font-weight:600; }
.wpms-mat-invsplit-sum.is-ok{ color:#4caf50; }
.wpms-mat-invsplit-sum.is-warn{ color:#e08a1e; }
/* Kommentarfeld linksbündig mit den Entscheidungs-Buttons, Text darin eingerückt */
#wpms-app .wpms-mat-invdiff-k{ margin-left:0; padding-left:18px; }
.wpms-mat-kpis-bericht{ grid-template-columns:repeat(4,1fr); }
@media (max-width:760px){ .wpms-mat-kpis-bericht{ grid-template-columns:repeat(2,1fr); } }

/* ---- Auswertungen ---- */
.wpms-mat-bignum{ font-size:24px; font-weight:700; margin:0 0 10px; }
.wpms-mat-h2{ margin-top:8px; }
.wpms-mat-bars{ display:flex; flex-direction:column; gap:8px; }
.wpms-mat-bar{ display:grid; grid-template-columns:minmax(110px,180px) 1fr auto; align-items:center; gap:12px; font-size:var(--mat-fs); }
.wpms-mat-bar-l{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-mat-bar-l small{ display:block; color:var(--wpms-muted); font-size:var(--mat-fs-sm); overflow:hidden; text-overflow:ellipsis; }
.wpms-mat-bar-track{ height:6px; border-radius:3px; background:var(--wpms-input); overflow:hidden; }
.wpms-mat-bar-fill{ display:block; height:100%; border-radius:3px; background:var(--wpms-teal2); transform-origin:left center; animation:wpmsMatBarIn .6s cubic-bezier(.22,.8,.3,1) both; }
.wpms-mat-bar-fill.is-rot{ background:#c0392b; }
@keyframes wpmsMatBarIn{ from{ transform:scaleX(0); } to{ transform:scaleX(1); } }
.wpms-mat-bar-v{ white-space:nowrap; font-weight:600; font-size:var(--mat-fs-sm); }
.wpms-mat-aw-mehr{ margin:2px 0 0; color:var(--wpms-muted); font-size:var(--mat-fs-sm); }

/* ---- Auswertung: flache Sektionen, zweispaltige Ranglisten, Säulen-Diagramm ---- */
.wpms-mat-aw .wpms-mat-kpis{ margin-bottom:4px; }
.wpms-mat-awgrid{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:0 48px; align-items:start; }
@media (max-width:900px){ .wpms-mat-awgrid{ grid-template-columns:1fr; } }
.wpms-mat-legend{ display:inline-flex; align-items:center; gap:6px; font-size:11px; font-weight:500; letter-spacing:.3px; text-transform:none; color:var(--wpms-muted); }
.wpms-mat-legend i{ width:8px; height:8px; border-radius:2px; margin-left:10px; }
.wpms-mat-legend i.is-verbrauch{ background:var(--wpms-teal2); }
.wpms-mat-legend i.is-schwund{ background:#c0392b; }
.wpms-mat-chartwrap{ position:relative; }
.wpms-mat-chart{ display:flex; align-items:stretch; gap:3px; height:190px; border-bottom:1px solid var(--wpms-line); }
.wpms-mat-col{ flex:1 1 0; min-width:0; display:flex; flex-direction:column; justify-content:flex-end; border-radius:3px 3px 0 0; cursor:default; outline:none; }
.wpms-mat-col:hover, .wpms-mat-col:focus-visible{ background:var(--wpms-hover); }
.wpms-mat-cbar{ display:block; height:0; transition:height .55s cubic-bezier(.22,.8,.3,1); }
.wpms-mat-cbar.is-verbrauch{ background:var(--wpms-teal2); border-radius:2px 2px 0 0; }
.wpms-mat-cbar.is-schwund{ background:#c0392b; border-radius:2px 2px 0 0; margin-bottom:1px; }
.wpms-mat-chart-x{ display:flex; gap:3px; margin-top:5px; }
.wpms-mat-chart-x span{ flex:1 1 0; min-width:0; text-align:center; font-size:10.5px; color:var(--wpms-muted); white-space:nowrap; overflow:hidden; }
.wpms-mat-cpop{ position:absolute; top:-6px; display:flex; flex-direction:column; gap:2px; pointer-events:none; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:8px; padding:7px 10px; font-size:12px; box-shadow:0 8px 24px rgba(0,0,0,.3); z-index:5; white-space:nowrap; }
.wpms-mat-cpop[hidden]{ display:none; } /* display:flex würde das hidden-Attribut sonst aushebeln */
.wpms-mat-cpop strong{ font-size:11px; color:var(--wpms-muted); font-weight:600; }
@media (max-width:760px){ .wpms-mat-chart{ height:140px; } }
.wpms-mat-bvlist{ display:flex; flex-direction:column; }

/* ---- Lagerberechtigung (Mitarbeiter-Detail) ---- */
.wpms-mat-rechte-body{ display:flex; flex-direction:column; align-items:flex-start; gap:12px; }
.wpms-mat-recht{ margin:0; }
.wpms-mat-rechte-body .wpms-mini{ align-self:flex-start; margin-top:2px; font-size:13px; padding:6px 14px; }
/* Im Drawer unten mit Haarlinie + Luft abgetrennt (wie die Auswertungs-Karte). */
.wpms-mddrawer-body .wpms-mat-rechte{ padding-bottom:26px; border-bottom:1px solid var(--wpms-line); }
.wpms-mddrawer-body .wpms-mat-rechte + .wpms-sec{ margin-top:26px; }

/* ---- Map (Standorte der Mitarbeiter, nur Management) ---- */
.wpms-map-note{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0 0 14px; font-size:13px; color:var(--wpms-muted); }
.wpms-map-dot{ width:8px; height:8px; border-radius:50%; background:#8d949c; flex:0 0 auto; }
.wpms-map-dot.is-an{ background:var(--wpms-teal2); }
.wpms-map-note-sub{ flex:1 1 100%; font-size:12.5px; }
.wpms-map-wrap{ display:grid; grid-template-columns:1fr 290px; gap:16px; align-items:stretch; }
.wpms-map{ height:min(64vh,640px); min-height:360px; border:1px solid var(--wpms-line); border-radius:14px; overflow:hidden; background:var(--wpms-bg); }
.wpms-map-side{ background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:14px; padding:16px 14px; display:flex; flex-direction:column; min-height:0; }
.wpms-map-side h3{ margin:0 0 10px; font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--wpms-muted); }
.wpms-map-list{ display:flex; flex-direction:column; gap:2px; overflow:auto; }
.wpms-map-it{ display:flex; align-items:center; gap:10px; width:100%; text-align:left; background:none; border:0; border-radius:10px; padding:8px; cursor:pointer; color:var(--wpms-text); font:inherit; }
.wpms-map-it:hover{ background:var(--wpms-hover); }
.wpms-map-it.is-off{ cursor:default; opacity:.55; }
.wpms-map-it.is-off:hover{ background:none; }
.wpms-map-av{ width:32px; height:32px; border-radius:50%; overflow:hidden; flex:0 0 auto; background:var(--wpms-teal2); color:#fff; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; }
.wpms-map-av img{ width:100%; height:100%; object-fit:cover; display:block; }
.wpms-map-it-txt{ display:flex; flex-direction:column; min-width:0; flex:1 1 auto; }
.wpms-map-it-txt b{ font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-map-it-txt i{ font-style:normal; font-size:12px; color:var(--wpms-muted); }
.wpms-map-fresh{ width:8px; height:8px; border-radius:50%; background:#8d949c; flex:0 0 auto; }
.wpms-map-fresh.is-frisch{ background:var(--wpms-teal2); }

/* Marker (Leaflet-DivIcon) */
.wpms-mappin-wrap{ background:none; border:0; }
.wpms-mappin{ position:relative; width:38px; height:38px; border-radius:50%; border:2px solid #8d949c; background:var(--wpms-card); box-shadow:0 2px 8px rgba(0,0,0,.35); display:flex; align-items:center; justify-content:center; }
.wpms-mappin.is-frisch{ border-color:var(--wpms-teal2); }
.wpms-mappin img{ width:100%; height:100%; border-radius:50%; object-fit:cover; display:block; }
.wpms-mappin > span{ font-size:12px; font-weight:700; color:var(--wpms-text); }
.wpms-mappin-lbl{ position:absolute; top:39px; left:50%; transform:translateX(-50%); white-space:nowrap; font-size:11.5px; font-weight:600; color:var(--wpms-text); background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:6px; padding:1px 6px; }
.wpms-map-pop{ display:flex; flex-direction:column; gap:2px; }
.wpms-map-pop b{ font-size:14px; }
.wpms-map-pop span{ font-size:12px; color:var(--wpms-muted); }

/* Leaflet ans App-Design angleichen */
.wpms-map.leaflet-container{ font:inherit; background:var(--wpms-bg); z-index:0; isolation:isolate; }
.wpms-map .leaflet-control-attribution{ font-size:10px; }
body.wpms-theme-dark .wpms-map .leaflet-tile-pane{ filter:invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.8); }
body.wpms-theme-dark .wpms-map .leaflet-control-attribution{ background:rgba(30,35,42,.85); color:var(--wpms-muted); }
body.wpms-theme-dark .wpms-map .leaflet-control-attribution a{ color:var(--wpms-teal); }
body.wpms-theme-dark .wpms-map .leaflet-bar a{ background:var(--wpms-card); color:var(--wpms-text); border-bottom-color:var(--wpms-line); }
body.wpms-theme-dark .wpms-map .leaflet-bar a:hover{ background:var(--wpms-hover); }
body.wpms-theme-dark .wpms-map .leaflet-popup-content-wrapper,
body.wpms-theme-dark .wpms-map .leaflet-popup-tip{ background:var(--wpms-card); color:var(--wpms-text); }

@media (max-width:900px){
	.wpms-map-wrap{ grid-template-columns:1fr; }
	.wpms-map{ height:52vh; min-height:300px; }
	.wpms-map-side{ max-height:340px; }
}

/* Einmalige Standort-Freigabe-Erklärung (alle Rollen, vor dem System-Dialog) */
.wpms-geo-ask{ position:fixed; left:50%; bottom:18px; transform:translateX(-50%); z-index:9000; width:min(440px, calc(100vw - 24px)); background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:14px; padding:18px 20px; box-shadow:0 12px 40px rgba(0,0,0,.4); }
.wpms-geo-ask h3{ margin:0 0 6px; font-size:15px; }
.wpms-geo-ask p{ margin:0 0 14px; font-size:13.5px; color:var(--wpms-muted); line-height:1.5; }
.wpms-geo-ask-act{ display:flex; gap:10px; flex-wrap:wrap; }

/* ---- Überstunden (Auswertungs-Karte + Stundenliste) ---- */
/* Minus = Warn-Rot, Plus bleibt normale Textfarbe (Design-Regel: keine grünen Zahlen). */
.wpms-hbar-val.is-minus{ color:#d9776b; }
.wpms-hbar-seg.is-minus{ background:#d9776b; }
.wpms-st-emp-ueber{ font-size:12.5px; font-weight:600; color:var(--wpms-muted); white-space:nowrap; font-variant-numeric:tabular-nums; }
.wpms-st-emp-ueber.is-minus{ color:#d9776b; }

/* Zwei Absende-Knöpfe nebeneinander (Mitarbeiter anlegen: „Anlegen" / „Anlegen & einladen") */
.wpms-formbtns{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.wpms-formbtns .wpms-btn[disabled]{ opacity:.45; cursor:not-allowed; }

/* Zugang / Passwort neu setzen (Mitarbeiter-Akte, nur Management) */
.wpms-zugang-card .wpms-abw-body{ display:block; }
.wpms-zugang-card .wpms-btn{ margin-top:10px; }
.wpms-pwreset-lbl{ display:block; margin:14px 0 0; font-size:14px; color:var(--wpms-text); }
.wpms-pwreset-row{ display:flex; gap:8px; margin-top:6px; align-items:stretch; }
.wpms-pwreset-inp{ flex:1; min-width:0; border-radius:10px; border:1px solid var(--wpms-line); background:var(--wpms-input); color:var(--wpms-text); padding:10px 12px; font:inherit; font-size:15px; letter-spacing:.02em; }
.wpms-pwreset-inp:focus{ border-color:var(--wpms-teal); outline:none; box-shadow:0 0 0 2px rgba(0,99,94,.18); }
.wpms-pwreset-row .wpms-mini{ flex:none; }
.wpms-pwout{ display:flex; align-items:center; justify-content:space-between; gap:12px; border:1px solid var(--wpms-line); border-radius:10px; padding:10px 12px; margin-top:8px; background:var(--wpms-input); }
.wpms-pwout-k{ color:var(--wpms-muted); font-size:12px; }
.wpms-pwout-v{ font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:15px; font-weight:600; color:var(--wpms-text); user-select:all; word-break:break-all; text-align:right; }

/* ===== Angebote (v1.0.794) ===== */
.wpms-ast-entwurf{ background:var(--wpms-hover); color:var(--wpms-muted); }
.wpms-ast-freigegeben{ background:rgba(60,130,246,.16); color:#2f6fd0; }
.wpms-ast-gesendet{ background:rgba(232,160,32,.18); color:#a86a00; }
.wpms-ast-angenommen{ background:rgba(0,99,94,.16); color:#00635E; }
.wpms-ast-abgelehnt{ background:rgba(214,69,69,.16); color:#c23b3b; }
.wpms-ast-abgelaufen{ background:rgba(0,0,0,.06); color:var(--wpms-muted); }
body.wpms-theme-dark .wpms-ast-entwurf{ background:rgba(255,255,255,.08); }
body.wpms-theme-dark .wpms-ast-freigegeben{ background:rgba(60,130,246,.22); color:#7ab0ff; }
body.wpms-theme-dark .wpms-ast-gesendet{ background:rgba(232,160,32,.22); color:#f3c165; }
body.wpms-theme-dark .wpms-ast-angenommen{ background:rgba(46,201,187,.20); color:#5fd3c4; }
body.wpms-theme-dark .wpms-ast-abgelehnt{ background:rgba(214,69,69,.24); color:#ff8a8a; }
body.wpms-theme-dark .wpms-ast-abgelaufen{ background:rgba(255,255,255,.06); }
.wpms-bar h1 .wpms-status{ vertical-align:middle; font-size:13px; margin-left:6px; }

.wpms-ang-top{ display:flex; gap:12px; align-items:center; justify-content:space-between; flex-wrap:wrap; margin-bottom:12px; }
.wpms-ang-tabs{ display:flex; gap:6px; flex-wrap:wrap; }
.wpms-ang-n{ display:inline-block; min-width:18px; padding:0 5px; border-radius:999px; background:var(--wpms-hover); font-size:11px; text-align:center; }
.wpms-ang-q{ flex:0 1 280px; min-width:180px; height:34px; box-sizing:border-box; font:inherit; font-size:13px; padding:6px 12px; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-input); color:var(--wpms-text); -webkit-appearance:none; appearance:none; }
.wpms-ang-q::placeholder{ color:var(--wpms-muted); opacity:1; }
.wpms-ang-q:focus{ outline:none; border-color:var(--wpms-teal2); }
.wpms-ang-q::-webkit-search-cancel-button{ -webkit-appearance:none; }
.wpms-ang-kpi{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.wpms-ang-kpi > div{ background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:10px; padding:8px 12px; display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.wpms-ang-kpi span{ font-size:12px; color:var(--wpms-muted); }
.wpms-ang-kpi strong{ font-size:14px; font-weight:600; font-variant-numeric:tabular-nums; }
.wpms-ang-tab .wpms-status, .kak-tab .wpms-status{ font-size:11.5px; padding:1px 8px; }
.wpms-ang-tab td.mdt-adr{ width:45%; max-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-ang-tab .mdt-kd{ white-space:nowrap; }
@media (max-width:1100px){ .wpms-ang-tab .mdt-gb{ display:none; } }
.wpms-ang-list{ display:flex; flex-direction:column; gap:8px; }
.wpms-ang-row{ display:grid; grid-template-columns:90px minmax(0,1fr) 130px 120px 110px; gap:12px; align-items:center; text-align:left; width:100%; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:12px; padding:12px 14px; cursor:pointer; color:var(--wpms-text); font:inherit; }
.wpms-ang-row:hover{ border-color:var(--wpms-teal); }
.wpms-ang-row small{ display:block; font-size:12px; color:var(--wpms-muted); font-weight:400; }
.wpms-ang-nr{ font-weight:700; font-variant-numeric:tabular-nums; }
.wpms-ang-main{ min-width:0; }
.wpms-ang-main strong, .wpms-ang-main small{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wpms-ang-d{ font-size:13px; }
.wpms-ang-sum{ text-align:right; font-weight:600; font-variant-numeric:tabular-nums; }
.wpms-ang-row .wpms-status{ justify-self:end; }
@media (max-width:760px){
	.wpms-ang-kpi{ grid-template-columns:1fr; }
	.wpms-ang-row{ grid-template-columns:minmax(0,1fr) auto; }
	.wpms-ang-nr{ grid-column:1; }
	.wpms-ang-row .wpms-status{ grid-column:2; grid-row:1; }
	.wpms-ang-main{ grid-column:1 / -1; }
	.wpms-ang-d{ grid-column:1; }
	.wpms-ang-sum{ grid-column:2; }
}

.wpms-ang-actions{ display:flex; gap:8px; flex-wrap:wrap; margin:4px 0 16px; }
.wpms-ang-actions a.wpms-btn{ text-decoration:none; display:inline-flex; align-items:center; }
.wpms-ang-kopf{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:12px; }
@media (max-width:900px){ .wpms-ang-kopf{ grid-template-columns:1fr; } }
.wpms-ang-kneu{ align-self:flex-start; }

.wpms-view .wpms-form.wpms-form-1col{ grid-template-columns:minmax(0,1fr); }
/* Angebots-Editor: eine Spalte, kompakte Felder (statt der 46px-Standardhöhe). */
.wpms-view .wpms-form.wpms-ang-form{ max-width:920px; gap:12px; }
.wpms-ang-form label{ font-size:13px; gap:4px; }
.wpms-ang-form input:not([type=checkbox]):not([type=radio]), .wpms-ang-form select{ height:38px; min-height:38px; padding:6px 10px; font-size:14px; }
.wpms-ang-form textarea{ padding:8px 10px; font-size:14px; line-height:1.45; min-height:0; }
.wpms-ang-form .wpms-mspick-field input{ height:38px; min-height:38px; padding:6px 30px 6px 10px; font-size:14px; }
.wpms-ang-form h2{ font-size:15px; margin:6px 0 0; }
.wpms-ang-head{ display:grid; grid-template-columns:minmax(0,1fr) 170px; gap:12px; align-items:end; }
.wpms-ang-posh{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:6px; }
.wpms-ang-posh h2{ margin:0 auto 0 0; }
.wpms-ang-form select.wpms-ang-katalog{ width:250px; max-width:100%; height:32px; min-height:32px; padding:4px 28px 4px 10px; font-size:13px; }
.wpms-ang-posh .wpms-mini{ height:32px; }
.wpms-ang-pos{ display:flex; flex-direction:column; gap:8px; }
.wpms-ang-prow{ display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px 14px; align-items:start; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:10px; padding:10px; }
.wpms-ang-pmain{ display:flex; flex-direction:column; gap:6px; min-width:0; }
.wpms-ang-pnum{ display:grid; grid-template-columns:70px 96px 110px 76px; gap:8px; align-items:end; }
.wpms-ang-pnum label{ font-size:12px; margin:0; }
.wpms-ang-pnum input, .wpms-ang-pnum select{ text-align:right; }
.wpms-ang-pnum input[data-f=einheit]{ text-align:left; }
.wpms-ang-pfoot{ grid-column:1 / -1; display:flex; justify-content:flex-end; align-items:center; gap:12px; border-top:1px dashed var(--wpms-line); padding-top:6px; }
.wpms-ang-pz{ font-weight:600; font-variant-numeric:tabular-nums; font-size:14px; }
.wpms-ang-pdel{ border:0; background:transparent; color:var(--wpms-muted); font:inherit; font-size:13px; cursor:pointer; padding:2px 4px; }
.wpms-ang-pdel:hover{ color:#c0392b; }
@media (max-width:760px){
	.wpms-ang-head{ grid-template-columns:1fr; }
	.wpms-ang-prow{ grid-template-columns:1fr; }
	.wpms-ang-pnum{ grid-template-columns:1fr 1fr; }
}
.wpms-ang-summe{ margin:2px 0 4px; width:100%; max-width:300px; justify-self:end; }

.wpms-ang-wh{ margin:-4px 0 10px; }
.wpms-ang-wh a{ color:var(--wpms-teal); }
/* #wpms-app-Präfix nötig: sonst gewinnt #wpms-app input{ font-size:16px } (ID, iOS-Zoom-Schutz).
   Touch behält 16px, nur Desktop verkleinert: Suche wie die Reiter (13px), Editor-Felder 14px. */
@media (hover:hover) and (pointer:fine){
	#wpms-app .wpms-ang-q{ font-size:13px; }
	#wpms-app .wpms-ang-form input:not([type=checkbox]):not([type=radio]),
	#wpms-app .wpms-ang-form select,
	#wpms-app .wpms-ang-form textarea{ font-size:14px; }
	#wpms-app .wpms-ang-form select.wpms-ang-katalog{ font-size:13px; }
}

/* ===== Angebots-Editor v2 (v1.0.800): Arbeitsplatz statt Formular =====
   Typo-Skala: Titel 18/600 · Abschnitt 13/600 · Label 12/500 muted · Eingabe 13 · Meta 12.
   Feldhöhe 32px (Klickfläche bleibt ≥32px, Tastatur vollständig bedienbar). */
.wpms-aed{ --aed-h:32px; --aed-r:8px; max-width:1180px; font-size:13px; }
.wpms-aed-bar{ position:sticky; top:-30px; z-index:20; /* -30px = Innenabstand von .wpms-main (Scroll-Container) */ display:flex; align-items:center; gap:14px; flex-wrap:wrap;
	margin:-30px -38px 18px; padding:10px 38px; background:var(--wpms-bg); border-bottom:1px solid var(--wpms-line); }
@media (max-width:760px){ .wpms-aed-bar{ top:var(--wpms-top-h, 0px); margin:-20px -18px 12px; padding:8px 18px; gap:10px; } }
.wpms-aed-back{ width:var(--aed-h); height:var(--aed-h); border:1px solid var(--wpms-line); border-radius:var(--aed-r); background:transparent; color:var(--wpms-text); font-size:20px; line-height:1; cursor:pointer; flex:0 0 auto; }
.wpms-aed-back:hover{ border-color:var(--wpms-teal); color:var(--wpms-teal); }
.wpms-aed-title{ display:flex; align-items:center; gap:8px; min-width:0; flex:1 1 auto; }
.wpms-aed-title h1{ font-size:18px; font-weight:600; margin:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-aed-title .wpms-status{ font-size:11px; padding:1px 8px; }
.wpms-aed-total{ display:flex; gap:16px; color:var(--wpms-muted); font-size:12px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.wpms-aed-total b{ color:var(--wpms-text); font-weight:600; font-size:14px; margin-left:4px; }
.wpms-aed-actions{ display:flex; gap:8px; }
.wpms-aed-actions .wpms-btn{ height:var(--aed-h); padding:0 14px; font-size:13px; display:inline-flex; align-items:center; }
.wpms-aed-wh{ margin:0 0 10px; font-size:12px; color:var(--wpms-muted); }
.wpms-aed-wh a{ color:var(--wpms-teal); }

/* Felder */
.wpms-aed-form{ display:flex; flex-direction:column; gap:14px; }
.wpms-aed input[type=text], .wpms-aed input[type=date], .wpms-aed select, .wpms-aed textarea{
	box-sizing:border-box; font:inherit; font-size:13px; color:var(--wpms-text); background:var(--wpms-input);
	border:1px solid var(--wpms-line); border-radius:var(--aed-r); padding:0 10px; height:var(--aed-h); min-height:0; min-width:0; width:100%; }
.wpms-aed textarea{ height:auto; padding:7px 10px; line-height:1.45; resize:vertical; overflow:hidden; }
.wpms-aed input:focus, .wpms-aed select:focus, .wpms-aed textarea:focus{ outline:none; border-color:var(--wpms-teal2); box-shadow:0 0 0 2px rgba(0,169,162,.18); }
.wpms-aed input::placeholder, .wpms-aed textarea::placeholder{ color:var(--wpms-muted); opacity:1; }
/* iOS-Zoom-Schutz (#wpms-app input 16px) nur auf Touch-Geräten behalten */
@media (hover:hover) and (pointer:fine){ #wpms-app .wpms-aed input, #wpms-app .wpms-aed select, #wpms-app .wpms-aed textarea{ font-size:13px; } }
.wpms-aed label, .wpms-aed-dl{ display:block; font-size:12px; font-weight:500; color:var(--wpms-muted); margin:0 0 4px; }
.wpms-aed label small, .wpms-aed-dl small{ font-weight:400; opacity:.8; margin-left:4px; }
.wpms-aed-head{ display:grid; grid-template-columns:minmax(220px,2fr) minmax(180px,2fr) 150px; gap:12px; align-items:end; }
.wpms-aed-kpick .wpms-mspick-field input{ height:var(--aed-h) !important; min-height:0 !important; padding:0 30px 0 10px !important; }
.wpms-aed-kinfo{ margin:-6px 0 0; font-size:12px; color:var(--wpms-muted); }
.wpms-aed-kinfo .wpms-tag{ font-size:11px; }
.wpms-aed-warn{ color:#d9822b; }
.wpms-aed-muted{ color:var(--wpms-muted); }

/* Abschnitte */
.wpms-aed-sec{ border-top:1px solid var(--wpms-line); padding-top:10px; }
.wpms-aed-sech{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-bottom:8px; }
.wpms-aed-sech h2{ font-size:13px; font-weight:600; margin:0; letter-spacing:.01em; }
.wpms-aed-cnt{ color:var(--wpms-muted); font-weight:400; }
.wpms-aed-tools{ display:flex; gap:6px; }
.wpms-aed-tool{ height:30px; padding:0 10px; border:1px solid var(--wpms-line); border-radius:var(--aed-r); background:transparent; color:var(--wpms-teal); font:inherit; font-size:12.5px; font-weight:500; cursor:pointer; white-space:nowrap; }
.wpms-aed-tool:hover{ border-color:var(--wpms-teal); }
.wpms-aed-kat{ position:relative; }
.wpms-aed-pop{ position:absolute; right:0; top:calc(100% + 4px); z-index:30; width:340px; max-width:80vw; background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:10px; box-shadow:0 10px 30px rgba(0,0,0,.28); padding:6px; }
.wpms-aed-poplist{ max-height:280px; overflow-y:auto; margin-top:6px; }
.wpms-aed-poplist button{ display:flex; justify-content:space-between; gap:10px; width:100%; text-align:left; padding:7px 10px; border:0; border-radius:6px; background:transparent; color:var(--wpms-text); font:inherit; font-size:13px; cursor:pointer; }
.wpms-aed-poplist button:hover, .wpms-aed-poplist button:focus{ background:var(--wpms-hover); outline:none; }
.wpms-aed-poplist small{ color:var(--wpms-muted); white-space:nowrap; font-variant-numeric:tabular-nums; }

/* Positionstabelle */
.wpms-aed-table{ border:1px solid var(--wpms-line); border-radius:10px; overflow:visible; background:var(--wpms-card); }
.wpms-aed-th, .wpms-aed-tr{ display:grid; grid-template-columns:28px minmax(220px,1fr) 72px 104px 108px 72px 104px 32px; gap:6px; align-items:start; }
.wpms-aed-th{ padding:7px 10px; font-size:11px; font-weight:600; color:var(--wpms-muted); text-transform:uppercase; letter-spacing:.04em; border-bottom:1px solid var(--wpms-line); }
.wpms-aed-th .r, .wpms-aed .r{ text-align:right; }
.wpms-aed-row{ border-bottom:1px solid var(--wpms-line); }
.wpms-aed-row:last-child{ border-bottom:0; }
.wpms-aed-row.is-open{ background:rgba(0,169,162,.04); }
.wpms-aed-tr{ padding:6px 10px; }
.wpms-aed-idx{ color:var(--wpms-muted); font-size:12px; line-height:var(--aed-h); text-align:right; font-variant-numeric:tabular-nums; }
.wpms-aed-name{ min-width:0; }
.wpms-aed .wpms-aed-tr input[type=text], .wpms-aed .wpms-aed-tr select{ border-color:transparent; background:transparent; }
.wpms-aed .wpms-aed-tr input[type=text]:hover, .wpms-aed .wpms-aed-tr select:hover{ border-color:var(--wpms-line); background:var(--wpms-input); }
.wpms-aed .wpms-aed-tr input[type=text]:focus, .wpms-aed .wpms-aed-tr select:focus{ background:var(--wpms-input); border-color:var(--wpms-teal2); }
.wpms-aed .wpms-aed-tr input[data-f=preis]:placeholder-shown{ border-color:var(--wpms-line); }
.wpms-aed-tr input[data-f=name]{ font-weight:500; }
.wpms-aed-tr input.r{ font-variant-numeric:tabular-nums; }
.wpms-aed-dhint{ display:block; width:100%; text-align:left; border:0; background:transparent; color:var(--wpms-muted); font:inherit; font-size:12px; padding:0 10px 2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; cursor:pointer; }
.wpms-aed-dhint.is-leer{ opacity:.6; }
.wpms-aed-row.is-open .wpms-aed-dhint{ display:none; }
.wpms-aed-dhint:hover{ color:var(--wpms-teal); }
.wpms-aed-pz{ line-height:var(--aed-h); font-weight:600; font-variant-numeric:tabular-nums; white-space:nowrap; }
.wpms-aed-more{ width:32px; height:var(--aed-h); border:0; border-radius:var(--aed-r); background:transparent; color:var(--wpms-muted); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.wpms-aed-more:hover, .wpms-aed-more:focus-visible{ background:var(--wpms-hover); color:var(--wpms-text); outline:none; }
.wpms-aed-more svg{ transition:transform .15s ease; }
.wpms-aed-row.is-open .wpms-aed-more svg{ transform:rotate(180deg); }
.wpms-aed-detail{ padding:2px 10px 10px 44px; }
.wpms-aed-dact{ display:flex; gap:4px; flex-wrap:wrap; margin-top:6px; }
.wpms-aed-dact button{ height:28px; padding:0 9px; border:1px solid var(--wpms-line); border-radius:6px; background:transparent; color:var(--wpms-muted); font:inherit; font-size:12px; cursor:pointer; }
.wpms-aed-dact button:hover{ color:var(--wpms-text); border-color:var(--wpms-muted); }
.wpms-aed-dact .is-danger{ margin-left:auto; }
.wpms-aed-dact .is-danger:hover{ color:#e05555; border-color:#e05555; }
.wpms-aed-tfoot{ display:flex; justify-content:flex-end; padding:8px 52px 10px 10px; border-top:1px solid var(--wpms-line); }
.wpms-aed-sums{ min-width:240px; display:grid; gap:3px; font-size:12.5px; font-variant-numeric:tabular-nums; }
.wpms-aed-sums > div{ display:flex; justify-content:space-between; gap:24px; color:var(--wpms-muted); }
.wpms-aed-sums b{ color:var(--wpms-text); font-weight:500; }
.wpms-aed-sums .wpms-aed-gesamt{ border-top:1px solid var(--wpms-line); padding-top:5px; margin-top:2px; color:var(--wpms-text); font-weight:600; font-size:14px; }
.wpms-aed-sums .wpms-aed-gesamt b{ font-weight:700; }

/* Texte & Optionen (eingeklappt mit Kurzvorschau) */
.wpms-aed-accitem{ border:1px solid var(--wpms-line); border-radius:var(--aed-r); background:var(--wpms-card); margin-bottom:6px; }
.wpms-aed-accitem summary{ display:flex; align-items:center; gap:12px; padding:0 12px; min-height:36px; cursor:pointer; list-style:none; }
.wpms-aed-accitem summary::-webkit-details-marker{ display:none; }
.wpms-aed-accitem summary::before{ content:''; width:6px; height:6px; border-right:1.5px solid var(--wpms-muted); border-bottom:1.5px solid var(--wpms-muted); transform:rotate(-45deg); transition:transform .15s ease; flex:0 0 auto; }
.wpms-aed-accitem[open] summary::before{ transform:rotate(45deg); }
.wpms-aed-accitem summary:focus-visible{ outline:2px solid var(--wpms-teal2); outline-offset:-2px; border-radius:var(--aed-r); }
.wpms-aed-acct{ font-weight:500; white-space:nowrap; flex:0 0 auto; }
.wpms-aed-accprev{ flex:1 1 auto; min-width:0; color:var(--wpms-muted); font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-aed-accitem[open] .wpms-aed-accprev{ visibility:hidden; }
.wpms-aed-accst{ flex:0 0 auto; font-size:11px; color:var(--wpms-muted); border:1px solid var(--wpms-line); border-radius:999px; padding:0 7px; line-height:18px; }
.wpms-aed-accst.is-mod{ color:var(--wpms-teal); border-color:rgba(0,169,162,.5); }
.wpms-aed-accbody{ padding:0 12px 10px; }
.wpms-aed-reset{ margin-top:6px; border:0; background:transparent; color:var(--wpms-teal); font:inherit; font-size:12px; cursor:pointer; padding:0; }
.wpms-aed .wpms-err:empty{ display:none; }

/* Tablet / schmal: Tabelle wird zu kompakten Zeilenblöcken */
@media (max-width:1100px){
	.wpms-aed-head{ grid-template-columns:minmax(0,1fr) 150px; }
	.wpms-aed-f-betreff{ grid-column:1 / -1; grid-row:2; }
}
@media (max-width:900px){
	.wpms-aed-th{ display:none; }
	.wpms-aed-tr{ grid-template-columns:24px repeat(4, minmax(0,1fr)) 32px; row-gap:4px; }
	.wpms-aed-name{ grid-column:2 / 6; }
	.wpms-aed-more{ grid-column:6; grid-row:1; }
	.wpms-aed-tr input[data-f=menge]{ grid-column:2; }
	.wpms-aed .wpms-aed-tr input[type=text]:not([data-f=name]), .wpms-aed .wpms-aed-tr select{ border-color:var(--wpms-line); }
	.wpms-aed-pz{ grid-column:2 / 6; text-align:right; }
	.wpms-aed-detail{ padding-left:34px; }
	.wpms-aed-tfoot{ padding-right:10px; }
	.wpms-aed-total{ order:5; width:100%; }
}
@media (max-width:600px){
	.wpms-aed-head{ grid-template-columns:1fr; }
	.wpms-aed-f-betreff{ grid-row:auto; }
	.wpms-aed-actions .wpms-aed-prev{ display:none; }
}
/* #wpms-app input[type=date] setzt 46px (ID-Spezifität) – im Editor auf die kompakte Höhe zurück. */
#wpms-app .wpms-aed input[type=date]{ height:var(--aed-h); min-height:0; padding:0 10px; }

/* ===== Kompakte Navigation (v1.0.801): Kopfbereich 52px, Seitenleiste mit Bereichen ===== */
.wpms-top{ padding:8px 24px; min-height:52px; box-sizing:border-box; }
.wpms-top-l{ gap:10px; }
.wpms-burger{ padding:5px; }
.wpms-burger .wpms-ic{ width:20px; height:20px; }
.wpms-greet{ font-size:14px; }
.wpms-top-r{ gap:8px; }
.wpms-avatar{ width:34px; height:34px; }
.wpms-avatar-ini{ font-size:13px; }
.wpms-topchat{ width:32px; height:32px; border-radius:8px; margin-left:0; margin-right:4px; }
.wpms-topchat svg{ width:17px; height:17px; }
#wpms-app .wpms-topsearch input{ height:32px; border-radius:8px; padding:0 12px; }
.wpms-banner{ top:52px; padding:8px 16px; }
.wpms-banner-tx{ font-size:13px; }
body.admin-bar .wpms-banner{ top:84px; }

.wpms-side{ flex-basis:216px; width:216px; padding:8px 10px; }
.wpms-side-logo{ padding:2px 8px 8px; margin-bottom:4px; }
.wpms-side-logo img{ height:28px; }
.wpms-nav{ gap:0; }
.wpms-navsec{ display:flex; flex-direction:column; gap:1px; padding:2px 0; }
.wpms-navsec + .wpms-navsec{ margin-top:6px; }
.wpms-navsec-h{ font-size:10.5px; font-weight:600; letter-spacing:.07em; text-transform:uppercase; color:var(--wpms-muted); padding:6px 10px 3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-navitem{ padding:6px 10px; gap:9px; font-size:13px; border-radius:8px; min-height:30px; box-sizing:border-box; }
.wpms-navitem .wpms-ic{ width:17px; height:17px; }
.wpms-navgroup, .wpms-navgroup-sub{ gap:1px; }
.wpms-navgroup-sub .wpms-navitem{ padding-left:36px; }
.wpms-side-foot{ padding-top:6px; }
/* Eingeklappt: Bereichsüberschriften werden zu feinen Trennlinien. */
#wpms-app.wpms-collapsed .wpms-side{ flex-basis:58px; width:58px; }
#wpms-app.wpms-collapsed .wpms-navsec-h{ font-size:0; padding:0; margin:4px 10px; height:1px; background:var(--wpms-line); }
@media (max-width:760px){
	#wpms-app.wpms-collapsed .wpms-navsec-h{ font-size:10.5px; padding:6px 10px 3px; margin:0; height:auto; background:none; }
	.wpms-navitem{ min-height:38px; } /* Touch: größere Klickfläche */
	.wpms-top{ padding:8px 14px; }
}
@media (min-width:761px){ #wpms-app.wpms-collapsed .wpms-navitem{ padding:7px 0; } }

/* ===== Vorlagen (v1.0.802): Textbausteine in Einstellungen, Auswahl im Angebotseditor ===== */
.wpms-aed-sech a.wpms-aed-zuvl{ font-size:12px; color:var(--wpms-teal); text-decoration:none; }
.wpms-aed-sech a.wpms-aed-zuvl:hover{ text-decoration:underline; }
.wpms-aed-bst{ border:1px solid var(--wpms-line); border-radius:var(--aed-r); background:var(--wpms-card); margin-bottom:6px; }
.wpms-aed-bstrow{ display:grid; grid-template-columns:150px minmax(150px,220px) minmax(0,1fr) auto; gap:12px; align-items:center; padding:2px 6px 2px 12px; min-height:36px; }
.wpms-aed .wpms-aed-bstrow select{ height:28px; font-size:12.5px; padding:0 8px; }
.wpms-aed-bstan{ border:0; background:transparent; color:var(--wpms-teal); font:inherit; font-size:12px; cursor:pointer; padding:4px 6px; border-radius:6px; }
.wpms-aed-bstan:hover{ background:var(--wpms-hover); }
.wpms-aed-bst.is-ind .wpms-aed-bstrow select{ border-color:rgba(0,169,162,.55); color:var(--wpms-teal); }
.wpms-aed-bstbody{ padding:0 12px 10px; }
.wpms-aed-bsthint{ font-size:11.5px; margin:4px 0 0; }
@media (max-width:760px){ .wpms-aed-bstrow{ grid-template-columns:1fr auto; } .wpms-aed-bstrow select{ grid-column:1 / -1; grid-row:2; } .wpms-aed-bstrow .wpms-aed-accprev{ grid-column:1 / -1; } }

.wpms-set-tabs{ display:flex; gap:6px; margin:-6px 0 16px; }
.wpms-vorlagen{ max-width:980px; }
.wpms-vl-intro{ margin:0 0 14px; }
.wpms-vl-sec{ border-top:1px solid var(--wpms-line); padding:10px 0 14px; }
.wpms-vl-h{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; }
.wpms-vl-h h2{ font-size:14px; font-weight:600; margin:0; }
.wpms-vl-list{ display:flex; flex-direction:column; gap:6px; }
.wpms-vl-row{ display:grid; grid-template-columns:minmax(120px,200px) 72px minmax(0,1fr) auto; gap:12px; align-items:center; width:100%; text-align:left; padding:0 12px; min-height:38px; border:1px solid var(--wpms-line); border-radius:8px; background:var(--wpms-card); color:var(--wpms-text); font:inherit; font-size:13px; cursor:pointer; }
.wpms-vl-row:hover{ border-color:var(--wpms-teal); }
.wpms-vl-t{ font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-vl-prev{ color:var(--wpms-muted); font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpms-vl-edit{ color:var(--wpms-teal); font-size:12px; }
.wpms-vl-row .wpms-aed-accst:not(.is-mod){ color:var(--wpms-teal); border-color:rgba(0,169,162,.5); }
.wpms-vl-leer{ font-size:12.5px; margin:0; }
.wpms-vl-form{ border:1px solid var(--wpms-teal2); border-radius:10px; padding:12px; background:var(--wpms-card); display:flex; flex-direction:column; gap:8px; max-width:none; }
.wpms-vl-frow{ display:flex; gap:16px; align-items:flex-end; flex-wrap:wrap; }
.wpms-vl-frow > div{ flex:1 1 260px; }
.wpms-aed label.wpms-vl-std{ display:flex; align-items:center; gap:7px; margin:0 0 8px; font-size:12.5px; color:var(--wpms-text); cursor:pointer; }
.wpms-vl-std input{ width:auto !important; height:auto !important; }
.wpms-vl-fact{ display:flex; gap:8px; align-items:center; }
.wpms-vl-fact .wpms-btn{ height:32px; padding:0 14px; font-size:13px; display:inline-flex; align-items:center; }
.wpms-vl-del{ margin-left:auto; border:0; background:transparent; color:var(--wpms-muted); font:inherit; font-size:12.5px; cursor:pointer; }
.wpms-vl-del:hover{ color:#e05555; }
@media (max-width:760px){ .wpms-vl-row{ grid-template-columns:1fr auto; padding:8px 12px; } .wpms-vl-prev{ grid-column:1 / -1; } .wpms-vl-edit{ display:none; } }

/* ===== Module v1.0.810: Briefe, Verträge, Tresor, Versand (Präfix .m-) =====
   Grundschrift 14px, Labels 12.5px, Felder 34px, Tabellen mit Suche/Reitern, sichtbarer Fokus. */
.m-kopf{ display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; margin-bottom:14px; }
.m-kopf h1{ font-size:20px; font-weight:600; margin:0; }
.m-sub{ margin:4px 0 0; font-size:13px; color:var(--wpms-muted); }
.m-kopf-a{ display:flex; gap:8px; flex-wrap:wrap; }
/* v1.0.839: Seitenkopf-Knöpfe der Module (Briefe, Verträge, Vorlagen, Tresor) wie „+ Neues Angebot"/„+ Neuer Kunde": umrandet, kompakt, nicht gefüllt. */
.m-kopf-a .m-btn, .m-kopf-a .m-btn-p{ height:30px; padding:0 13px; font-size:13px; font-weight:600; border-radius:8px; background:transparent; border:1px solid var(--wpms-line); color:var(--wpms-muted); box-shadow:none; }
.m-kopf-a .m-btn:hover, .m-kopf-a .m-btn-p:hover{ background:transparent; border-color:var(--wpms-teal2); color:var(--wpms-text); }
.m-back{ border:0; background:none; color:var(--wpms-teal); font:inherit; font-size:13.5px; cursor:pointer; padding:2px 0; margin-bottom:6px; }
.m-btn{ font:inherit; font-size:13.5px; font-weight:500; height:34px; padding:0 14px; border-radius:8px; border:1px solid var(--wpms-line); background:var(--wpms-card); color:var(--wpms-text); cursor:pointer; display:inline-flex; align-items:center; gap:6px; text-decoration:none; white-space:nowrap; }
.m-btn:hover{ border-color:var(--wpms-teal); color:var(--wpms-teal); }
.m-btn-p{ background:var(--wpms-teal2); border-color:var(--wpms-teal2); color:#fff; font-weight:600; } /* Wieland-Petrol wie Speichern in den Editoren – nicht das helle Dunkelmodus-Türkis */
.m-btn-p:hover{ background:#00524e; color:#fff; }
.m-btn-g{ color:#c0392b; } .m-btn-g:hover{ border-color:#c0392b; color:#c0392b; }
.m-btn-klein{ height:30px; padding:0 11px; font-size:13px; }
.m-btn:disabled{ opacity:.55; cursor:default; }
.m-btn:focus-visible, .m-tab:focus-visible, .m-link:focus-visible, .m-icon:focus-visible, .m-table tr.is-klick:focus-visible{ outline:2px solid var(--wpms-teal2); outline-offset:2px; }
.m-link{ border:0; background:none; color:var(--wpms-teal); font:inherit; font-size:13px; cursor:pointer; padding:3px 0; text-align:left; }
.m-icon{ border:0; background:none; color:var(--wpms-muted); cursor:pointer; font-size:14px; padding:2px 5px; border-radius:6px; }
.m-icon:hover{ background:var(--wpms-hover); color:var(--wpms-text); }
.m-muted{ color:var(--wpms-muted); } .m-klein{ font-size:12.5px; } .m-nw{ white-space:nowrap; } .m-r{ text-align:right; } .m-c{ text-align:center; }
.m-mono, .m-hash{ font-family:ui-monospace,Menlo,Consolas,monospace; font-size:12.5px; }
.m-hash{ word-break:break-all; color:var(--wpms-muted); }
.m-err{ color:#d64545; font-size:13.5px; } .m-errt{ color:#d64545; }
.m-warn{ background:rgba(232,160,32,.12); border:1px solid rgba(232,160,32,.35); border-radius:8px; padding:8px 12px; font-size:13.5px; }
.m-hinweis{ font-size:13.5px; color:var(--wpms-muted); background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:8px; padding:8px 12px; margin:0 0 12px; }
.m-hinweis a{ color:var(--wpms-teal); }
.m-chip{ display:inline-block; font-size:12px; font-weight:600; padding:1px 9px; border-radius:999px; background:var(--wpms-hover); color:var(--wpms-muted); white-space:nowrap; vertical-align:middle; }
.m-st-entwurf, .m-st-vorbereitet, .m-st-wartend, .m-st-neutral, .m-st-post_test{ background:var(--wpms-hover); color:var(--wpms-muted); }
.m-st-abgeschlossen, .m-st-bereit, .m-st-gesendet, .m-st-versendet, .m-st-geoeffnet, .m-st-ausgehaendigt, .m-st-in_unterschrift, .m-st-zu_versenden, .m-st-offen, .m-st-post_eingeliefert, .m-st-post_aufbereitung{ background:rgba(60,130,246,.15); color:#2f6fd0; }
.m-st-geprueft, .m-st-verzoegert, .m-st-gedrosselt{ background:rgba(232,160,32,.18); color:#a86a00; }
.m-st-unterschrieben, .m-st-zugestellt, .m-st-manuell_versendet, .m-st-aktiv, .m-st-abgerufen, .m-st-post_druck, .m-st-post_druckzentrum{ background:rgba(0,99,94,.15); color:#00635E; }
.m-st-abgelehnt, .m-st-fehler, .m-st-unzustellbar, .m-st-beschwerde{ background:rgba(214,69,69,.15); color:#c23b3b; }
.m-st-abgelaufen, .m-st-zurueckgezogen, .m-st-ersetzt, .m-st-storniert, .m-st-widerrufen{ background:rgba(0,0,0,.06); color:var(--wpms-muted); }
body.wpms-theme-dark .m-st-abgeschlossen, body.wpms-theme-dark .m-st-bereit, body.wpms-theme-dark .m-st-gesendet, body.wpms-theme-dark .m-st-versendet, body.wpms-theme-dark .m-st-geoeffnet, body.wpms-theme-dark .m-st-ausgehaendigt, body.wpms-theme-dark .m-st-in_unterschrift, body.wpms-theme-dark .m-st-zu_versenden, body.wpms-theme-dark .m-st-offen, body.wpms-theme-dark .m-st-post_eingeliefert, body.wpms-theme-dark .m-st-post_aufbereitung{ background:rgba(60,130,246,.22); color:#8ab8ff; }
body.wpms-theme-dark .m-st-geprueft, body.wpms-theme-dark .m-st-verzoegert, body.wpms-theme-dark .m-st-gedrosselt{ background:rgba(232,160,32,.22); color:#f3c165; }
body.wpms-theme-dark .m-st-unterschrieben, body.wpms-theme-dark .m-st-zugestellt, body.wpms-theme-dark .m-st-manuell_versendet, body.wpms-theme-dark .m-st-aktiv, body.wpms-theme-dark .m-st-abgerufen, body.wpms-theme-dark .m-st-post_druck, body.wpms-theme-dark .m-st-post_druckzentrum{ background:rgba(46,201,187,.2); color:#5fd3c4; }
body.wpms-theme-dark .m-st-abgelehnt, body.wpms-theme-dark .m-st-fehler, body.wpms-theme-dark .m-st-unzustellbar, body.wpms-theme-dark .m-st-beschwerde{ background:rgba(214,69,69,.24); color:#ff8a8a; }
body.wpms-theme-dark .m-st-abgelaufen, body.wpms-theme-dark .m-st-zurueckgezogen, body.wpms-theme-dark .m-st-ersetzt, body.wpms-theme-dark .m-st-storniert, body.wpms-theme-dark .m-st-widerrufen{ background:rgba(255,255,255,.07); }

/* Tabellen */
.m-tbar{ display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:10px; }
.m-tabs{ display:flex; gap:4px; flex-wrap:wrap; }
.m-tab{ font:inherit; font-size:13px; height:30px; padding:0 11px; border-radius:8px; border:1px solid var(--wpms-line); background:var(--wpms-input); color:var(--wpms-muted); cursor:pointer; }
.m-tab span{ display:inline-block; min-width:16px; font-size:11px; padding:0 4px; border-radius:999px; background:var(--wpms-hover); text-align:center; margin-left:2px; }
.m-tab.is-active{ border-color:var(--wpms-teal); color:var(--wpms-teal); background:rgba(31,189,176,.1); font-weight:600; }
.m-tabs-gross{ margin:0 0 14px; }
.m-tabs-gross .m-tab{ height:32px; font-size:13.5px; }
.m-such{ box-sizing:border-box; flex:0 1 280px; min-width:180px; height:32px; padding:0 12px; border:1px solid var(--wpms-line); border-radius:8px; background:var(--wpms-input); color:var(--wpms-text); font:inherit; font-size:13.5px; -webkit-appearance:none; appearance:none; }
.m-such:focus{ outline:none; border-color:var(--wpms-teal2); }
@media (hover:hover) and (pointer:fine){ #wpms-app .m-such{ font-size:13.5px; } }
.m-twrap{ overflow-x:auto; border:1px solid var(--wpms-line); border-radius:10px; background:var(--wpms-card); }
.m-table{ width:100%; border-collapse:collapse; font-size:14px; }
.m-table th{ text-align:left; font-size:11.5px; font-weight:600; letter-spacing:.03em; text-transform:uppercase; color:var(--wpms-muted); padding:8px 12px; border-bottom:1px solid var(--wpms-line); white-space:nowrap; }
.m-table td{ padding:9px 12px; border-bottom:1px solid var(--wpms-line); vertical-align:top; }
.m-table tbody tr:last-child td{ border-bottom:0; }
.m-table tr.is-klick{ cursor:pointer; }
.m-table tr.is-klick:hover td{ background:var(--wpms-hover); }
.m-leer{ text-align:center; color:var(--wpms-muted); padding:22px 12px !important; }
@media (max-width:760px){
	.m-table thead{ display:none; }
	.m-table tr{ display:block; border-bottom:1px solid var(--wpms-line); padding:6px 0; }
	.m-table td{ display:flex; gap:10px; border:0; padding:4px 12px; }
	.m-table td::before{ content:attr(data-t); flex:0 0 96px; font-size:11.5px; color:var(--wpms-muted); text-transform:uppercase; padding-top:2px; }
	.m-table td[data-t=""]::before{ content:none; }
}
.m-table-edit input, .m-table-edit select{ width:100%; min-width:70px; height:30px; padding:0 6px; font:inherit; font-size:13px; border:1px solid var(--wpms-line); border-radius:6px; background:var(--wpms-input); color:var(--wpms-text); box-sizing:border-box; }

/* Arbeitsbereich / Formular */
.m-ws{ max-width:1100px; font-size:14px; }
.m-bar{ position:sticky; top:-30px; z-index:20; display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:-30px -38px 16px; padding:10px 38px; background:var(--wpms-bg); border-bottom:1px solid var(--wpms-line); }
@media (max-width:760px){ .m-bar{ top:var(--wpms-top-h, 0px); margin:-20px -18px 12px; padding:8px 18px; } }
.m-bar-back{ width:34px; height:34px; border:1px solid var(--wpms-line); border-radius:8px; background:transparent; color:var(--wpms-text); font-size:20px; cursor:pointer; }
.m-bar-t{ display:flex; align-items:center; gap:8px; flex:1 1 auto; min-width:0; }
.m-bar-t h1{ font-size:18px; font-weight:600; margin:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.m-bar-a{ display:flex; gap:8px; flex-wrap:wrap; }
.m-form{ display:flex; flex-direction:column; gap:14px; }
.m-sec{ border-top:1px solid var(--wpms-line); padding-top:12px; margin-bottom:14px; }
.m-sec h2, .m-card h2{ font-size:14.5px; font-weight:600; margin:0 0 10px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.m-grid{ display:grid; gap:10px 14px; }
.m-grid-2{ grid-template-columns:repeat(2, minmax(0,1fr)); } .m-grid-3{ grid-template-columns:repeat(3, minmax(0,1fr)); } .m-grid-4{ grid-template-columns:repeat(4, minmax(0,1fr)); }
.m-span{ grid-column:1 / -1; }
@media (max-width:900px){ .m-grid-3, .m-grid-4{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width:600px){ .m-grid-2, .m-grid-3, .m-grid-4{ grid-template-columns:1fr; } }
.m-feld{ display:flex; flex-direction:column; gap:4px; margin-bottom:8px; min-width:0; }
.m-feld > label{ font-size:12.5px; font-weight:500; color:var(--wpms-muted); }
.m-feld small{ font-size:12px; color:var(--wpms-muted); }
.m-ws input[type=text], .m-ws input[type=email], .m-ws input[type=url], .m-ws input[type=date], .m-ws input[type=number], .m-ws input[type=password], .m-ws select, .m-ws textarea,
.m-dlg input[type=text], .m-dlg input[type=email], .m-dlg input[type=url], .m-dlg input[type=date], .m-dlg input[type=number], .m-dlg input[type=password], .m-dlg select, .m-dlg textarea,
.m-card input[type=text], .m-card input[type=email], .m-card input[type=password], .m-card textarea, .wpms-vl-sec input[type=text], .wpms-vl-sec textarea{
	box-sizing:border-box; width:100%; min-width:0; font:inherit; font-size:14px; color:var(--wpms-text); background:var(--wpms-input); border:1px solid var(--wpms-line); border-radius:8px; height:34px; min-height:34px; padding:0 10px; }
.m-ws textarea, .m-dlg textarea, .m-card textarea, .wpms-vl-sec textarea{ height:auto; padding:8px 10px; line-height:1.5; resize:vertical; }
.m-ws textarea.m-lang{ min-height:180px; }
.m-ws input:focus, .m-ws select:focus, .m-ws textarea:focus, .m-dlg input:focus, .m-dlg select:focus, .m-dlg textarea:focus, .m-card input:focus{ outline:none; border-color:var(--wpms-teal2); box-shadow:0 0 0 2px rgba(0,169,162,.2); }
#wpms-app .m-ws input, #wpms-app .m-ws select, #wpms-app .m-ws textarea, #wpms-app .m-card input, #wpms-app .m-card textarea, #wpms-app .wpms-vl-sec input, #wpms-app .wpms-vl-sec textarea{ font-size:14px; }
#wpms-app .m-ws input[type=date], .m-dlg input[type=date]{ height:34px; min-height:34px; padding:0 10px; }
@media (hover:none){ #wpms-app .m-ws input, #wpms-app .m-ws textarea, .m-dlg input, .m-dlg textarea{ font-size:16px; } }
.m-seg{ display:inline-flex; border:1px solid var(--wpms-line); border-radius:8px; overflow:hidden; margin-bottom:10px; }
.m-seg label{ display:flex; align-items:center; gap:6px; padding:6px 12px; font-size:13.5px; cursor:pointer; border-right:1px solid var(--wpms-line); }
.m-seg label:last-child{ border-right:0; }
.m-seg label:has(input:checked){ background:rgba(31,189,176,.12); color:var(--wpms-teal); font-weight:600; }
.m-seg input{ accent-color:var(--wpms-teal); }
.m-check{ display:flex !important; flex-direction:row !important; align-items:flex-start; gap:8px; font-size:13.5px !important; color:var(--wpms-text) !important; cursor:pointer; margin:4px 0 8px; }
.m-check input{ width:16px; height:16px; margin-top:2px; accent-color:var(--wpms-teal); flex:0 0 auto; }
.m-zeile{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:8px; }
.m-zeile-r{ justify-content:flex-end; margin:0 0 10px; }
.m-pick .wpms-mspick-field input{ height:34px !important; min-height:0 !important; }

/* Karten / Spalten */
.m-cols{ display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); gap:14px; align-items:start; }
.m-cols-umg{ grid-template-columns:minmax(320px,1fr) minmax(0,1.7fr); }
@media (max-width:1000px){ .m-cols, .m-cols-umg{ grid-template-columns:1fr; } }
.m-col{ display:flex; flex-direction:column; gap:14px; min-width:0; }
.m-card{ background:var(--wpms-card); border:1px solid var(--wpms-line); border-radius:10px; padding:14px 16px; font-size:14px; }
.m-card.m-alt{ opacity:.75; }
.m-recht{ border-left:3px solid var(--wpms-teal2); }
.m-dl{ display:grid; grid-template-columns:130px minmax(0,1fr); gap:5px 12px; margin:0 0 6px; font-size:13.5px; }
.m-dl dt{ color:var(--wpms-muted); } .m-dl dd{ margin:0; min-width:0; word-break:break-word; }
.m-sum{ background:var(--wpms-hover); border-radius:8px; padding:10px 12px; margin-top:10px; }
.m-vrow{ padding:8px 0; border-bottom:1px solid var(--wpms-line); display:flex; flex-direction:column; gap:3px; }
.m-vrow:last-of-type{ border-bottom:0; }
.m-vrow .m-btn{ align-self:flex-start; margin-top:4px; }
.m-hist{ list-style:none; margin:0; padding:0; font-size:13px; }
.m-hist li{ display:grid; grid-template-columns:118px 1fr; gap:2px 10px; padding:7px 0; border-bottom:1px solid var(--wpms-line); }
.m-hist li:last-child{ border-bottom:0; }
.m-hist time{ color:var(--wpms-muted); font-size:12px; font-variant-numeric:tabular-nums; }
.m-hist em{ grid-column:2; font-style:normal; font-size:12px; color:var(--wpms-muted); }
.m-stepper{ display:flex; list-style:none; margin:0 0 14px; padding:0; gap:4px; flex-wrap:wrap; counter-reset:s; }
.m-stepper li{ counter-increment:s; display:flex; align-items:center; gap:6px; font-size:13px; color:var(--wpms-muted); padding:5px 12px 5px 6px; border-radius:999px; background:var(--wpms-card); border:1px solid var(--wpms-line); }
.m-stepper li::before{ content:counter(s); display:inline-flex; width:20px; height:20px; border-radius:50%; align-items:center; justify-content:center; font-size:11px; font-weight:700; background:var(--wpms-hover); }
.m-stepper li.is-done{ color:var(--wpms-teal); } .m-stepper li.is-done::before{ content:'✓'; background:var(--wpms-teal); color:#fff; }
.m-stepper li.is-akt{ color:var(--wpms-text); border-color:var(--wpms-teal); font-weight:600; } .m-stepper li.is-akt::before{ background:var(--wpms-teal2); color:#fff; }
.m-downloads{ border-top:1px solid var(--wpms-line); padding-top:8px; }
.m-sd{ margin-top:8px; } .m-sd > summary{ cursor:pointer; font-size:13px; color:var(--wpms-teal); padding:3px 0; }
.m-steps{ margin:6px 0 10px 18px; padding:0; font-size:13.5px; } .m-steps li{ margin-bottom:4px; }
.m-h3{ font-size:13.5px; margin:14px 0 4px; }

/* Abschnitts-Editor */
.m-abs{ display:flex; flex-direction:column; gap:6px; margin-bottom:8px; }
.m-ab{ border:1px solid var(--wpms-line); border-radius:8px; background:var(--wpms-card); }
.m-ab > summary{ display:flex; align-items:center; gap:10px; padding:0 8px 0 12px; min-height:38px; cursor:pointer; list-style:none; }
.m-ab > summary::-webkit-details-marker{ display:none; }
.m-ab-t{ font-weight:500; flex:1 1 auto; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.m-ab-bed{ font-size:12px; color:#a86a00; white-space:nowrap; }
.m-ab-akt{ display:flex; gap:2px; } .m-ab-akt button{ border:0; background:none; color:var(--wpms-muted); width:28px; height:28px; border-radius:6px; cursor:pointer; font-size:14px; }
.m-ab-akt button:hover{ background:var(--wpms-hover); color:var(--wpms-text); }
.m-ab-b{ padding:4px 12px 12px; }
.m-ph{ display:flex; flex-wrap:wrap; gap:4px; align-items:center; }
.m-phb{ font-family:ui-monospace,Menlo,monospace; font-size:11.5px; border:1px solid var(--wpms-line); background:var(--wpms-input); color:var(--wpms-text); border-radius:6px; padding:2px 6px; cursor:pointer; }
.m-phb:hover{ border-color:var(--wpms-teal); }

/* Dialog */
.m-dlg-ov{ position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:200; }
.m-dlg{ position:fixed; z-index:201; left:50%; top:50%; transform:translate(-50%,-50%); width:min(560px, calc(100vw - 24px)); max-height:calc(100vh - 40px); display:flex; flex-direction:column; background:var(--wpms-card); color:var(--wpms-text); border:1px solid var(--wpms-line); border-radius:12px; box-shadow:0 20px 60px rgba(0,0,0,.35); font-size:14px; font-family:"DM Sans",system-ui,-apple-system,"Segoe UI",sans-serif; line-height:1.45; }
.m-dlg-breit{ width:min(780px, calc(100vw - 24px)); }
.m-dlg-h{ display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-bottom:1px solid var(--wpms-line); }
.m-dlg-h h2{ font-size:16px; margin:0; }
.m-x{ border:0; background:none; color:var(--wpms-muted); font-size:22px; line-height:1; cursor:pointer; width:32px; height:32px; border-radius:8px; }
.m-x:hover{ background:var(--wpms-hover); color:var(--wpms-text); }
.m-dlg-b{ padding:14px 16px; overflow-y:auto; }
.m-dlg-b p{ margin:0 0 10px; }
.m-dlg > .m-err{ margin:0 16px 8px; }
.m-dlg-f{ display:flex; justify-content:flex-end; gap:8px; padding:12px 16px; border-top:1px solid var(--wpms-line); flex-wrap:wrap; }
.m-formen{ border:0; margin:0 0 10px; padding:0; display:flex; flex-direction:column; gap:6px; }
.m-formen legend{ font-size:12.5px; color:var(--wpms-muted); font-weight:500; margin-bottom:4px; }
.m-form-opt{ display:flex !important; flex-direction:row !important; gap:10px; align-items:flex-start; border:1px solid var(--wpms-line); border-radius:8px; padding:9px 12px; cursor:pointer; font-size:13.5px; color:var(--wpms-text) !important; }
.m-form-opt:has(input:checked){ border-color:var(--wpms-teal); background:rgba(31,189,176,.07); }
.m-form-opt input{ margin-top:3px; accent-color:var(--wpms-teal); }
.m-form-opt span{ display:flex; flex-direction:column; gap:2px; } .m-form-opt small{ color:var(--wpms-muted); font-size:12.5px; }
.m-form-opt.is-aus{ opacity:.6; cursor:not-allowed; }
.m-linkbox{ display:flex; gap:6px; } .m-linkbox input{ font-family:ui-monospace,Menlo,monospace; font-size:12px !important; }

/* Tresor */
.m-tresor-leiste{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:-4px 0 12px; font-size:13.5px; }
/* v1.0.850: Status „Gesperrt/Entsperrt" in derselben Form wie der Knopf daneben, ohne Schloss-Symbol (Michel). */
.m-schloss{ display:inline-flex; align-items:center; height:30px; box-sizing:border-box; padding:0 11px; font-size:13px; font-weight:500; border:1px solid var(--wpms-line); border-radius:8px; background:var(--wpms-card); color:var(--wpms-text); }
.m-schloss.is-offen{ color:#c98a12; }
.m-pw-klar{ background:rgba(232,160,32,.16); padding:1px 5px; border-radius:5px; }
.m-pwfeld{ display:flex; gap:6px; align-items:center; } .m-pwfeld input{ font-family:ui-monospace,Menlo,monospace; }
.m-staerke{ display:flex; align-items:center; gap:8px; margin-top:4px; min-height:16px; }
.m-st-bar{ display:inline-block; height:5px; border-radius:3px; max-width:160px; flex:0 0 auto; }
.m-st-gut{ background:#1a8a45; } .m-st-mittel{ background:#d99a1e; } .m-st-schwach{ background:#c0392b; }
.m-gen-b{ display:flex; flex-wrap:wrap; gap:6px 16px; padding:8px 0; font-size:13px; align-items:center; }
.m-gen-b > label:first-child{ display:flex; align-items:center; gap:8px; }
.m-table-edit td{ padding:5px 6px; vertical-align:middle; }
.m-table-edit th{ padding:6px; }
.m-table-edit input[type=checkbox]{ width:16px; min-width:0; height:16px; accent-color:var(--wpms-teal); }
.m-table a, .m-card a{ color:var(--wpms-teal); }

.m-en-info p{ margin:6px 0 0; }

/* Dokumentablage in SharePoint (v1.0.831) – unter der Outlook-Verbindung */
.wpms-msa{ margin-top:18px; padding-top:16px; border-top:1px solid var(--wpms-line); }
.wpms-msa h3{ margin:0 0 6px; font-size:15px; }
.wpms-msa .wpms-set-actions{ flex-wrap:wrap; }
.wpms-msa-log{ margin-top:10px; font-size:12px; color:var(--wpms-muted); }
.wpms-msa-log summary{ cursor:pointer; margin-bottom:4px; }

/* v1.0.845: Listen-Suche klein und in Textfarbe wie die übrigen Felder; Filter-Chips (z. B. Glasreinigung) dezent */
#wpms-app .wpms-md-search input{ height:36px; padding:0 12px; font-size:13.5px; color:var(--wpms-text); background:var(--wpms-card); }
#wpms-app .wpms-md-search input::placeholder{ color:var(--wpms-muted); opacity:1; }
@media (max-width:760px){ #wpms-app .wpms-md-search input{ font-size:16px; } }
.wpms-az:not(.wpms-az-letters){ margin-bottom:8px; }
.wpms-az-cat{ height:28px; padding:0 11px; font-size:12.5px; font-weight:600; border:1px solid var(--wpms-line); }
.wpms-az-cat.is-active{ border-color:transparent; }

/* Tresor → App-Zugänge (v1.0.849) */
.m-appz-l{ display:flex; flex-direction:column; gap:2px; max-height:360px; overflow:auto; margin-top:8px; border:1px solid var(--wpms-line); border-radius:8px; padding:4px; }
.m-appz-z{ display:flex; gap:10px; align-items:flex-start; padding:7px 8px; border-radius:6px; cursor:pointer; font-size:13.5px; }
.m-appz-z:hover{ background:var(--wpms-hover); }
.m-appz-z input{ margin-top:3px; accent-color:var(--wpms-teal2); }
.m-appz-z span{ display:flex; flex-direction:column; gap:1px; } .m-appz-z small{ font-size:12px; color:var(--wpms-muted); }
.m-appz-w{ color:#c98a12; }

/* Einstellungen → Versand (v1.0.851): zwei Kacheln oben, Protokoll volle Breite */
.m-vs{ display:flex; flex-direction:column; gap:14px; }
.m-vs-oben{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:14px; align-items:start; }
@media (max-width:1000px){ .m-vs-oben{ grid-template-columns:1fr; } }
.m-vs-k{ display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.m-vs-k h2{ margin:0; font-size:15px; font-weight:650; }
.m-vs-k .m-vs-b{ margin-left:auto; }
.m-vs-zl{ display:flex; flex-direction:column; border-top:1px solid var(--wpms-line); }
.m-vs-z{ display:grid; grid-template-columns:120px minmax(0,1fr); gap:12px; padding:8px 0; border-bottom:1px solid var(--wpms-line); font-size:13.5px; }
.m-vs-z > span:first-child{ color:var(--wpms-muted); font-size:12.5px; }
.m-vs-z a{ color:var(--wpms-teal); }
.m-vs-karte .m-zeile{ margin-top:12px; }
.m-vs-seg{ margin:2px 0 6px; }
.m-vs-hint{ margin:0 0 10px; }
.m-vs-karte [hidden]{ display:none !important; }
.m-vs-karte.is-edit .m-check{ display:flex; align-items:center; gap:8px; margin:2px 0 10px; font-size:13.5px; }

/* v1.0.857: Seiten-Reiter statt Knopf-Leiste (Michel: „hier oben mit Reitern arbeiten statt mit Knöpfen") –
   Einstellungen (Allgemein | Vorlagen | Versand) und Tresor (Zugänge | Protokoll), gleiches Bild wie die Reiter der Kundenakte. */
.wpms-set-tabs, .m-tabs.m-tabs-gross{ display:flex; gap:2px; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin:0 0 16px; border-bottom:1px solid var(--wpms-line); }
.wpms-set-tabs::-webkit-scrollbar, .m-tabs.m-tabs-gross::-webkit-scrollbar{ display:none; }
.wpms-set-tabs .wpms-kt-tab, .m-tabs.m-tabs-gross .m-tab{ position:relative; display:inline-flex; align-items:center; gap:6px; height:auto; white-space:nowrap; padding:9px 12px 10px; margin:0 0 -1px; border:0; border-radius:6px 6px 0 0; background:none; box-shadow:none; font:inherit; font-size:13.5px; font-weight:550; color:var(--wpms-muted); cursor:pointer; }
.wpms-set-tabs .wpms-kt-tab::after, .m-tabs.m-tabs-gross .m-tab::after{ content:""; position:absolute; left:8px; right:8px; bottom:0; height:2px; border-radius:2px; background:transparent; }
.wpms-set-tabs .wpms-kt-tab:hover, .m-tabs.m-tabs-gross .m-tab:hover{ color:var(--wpms-text); background:none; }
.wpms-set-tabs .wpms-kt-tab.is-active, .m-tabs.m-tabs-gross .m-tab.is-active{ color:var(--wpms-text); font-weight:650; background:none; border:0; }
.wpms-set-tabs .wpms-kt-tab.is-active::after, .m-tabs.m-tabs-gross .m-tab.is-active::after{ background:var(--wpms-teal); }
.wpms-set-tabs .wpms-kt-tab:focus, .m-tabs.m-tabs-gross .m-tab:focus{ outline:none; }

/* v1.0.859: Filter-Leisten überall als Reiter statt Knöpfe (Michel: „mit Reitern statt Knöpfen arbeiten") –
   Briefe, Verträge, Tresor, Angebote, Einsätze … Gleiches Bild wie die Reiter der Kundenakte; Anzahl als kleines Badge. */
.m-tabs, .wpms-kt-tabs, .wpms-ang-tabs{ display:flex; gap:2px; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; align-self:flex-end; }
.m-tabs::-webkit-scrollbar, .wpms-kt-tabs::-webkit-scrollbar, .wpms-ang-tabs::-webkit-scrollbar{ display:none; }
.m-tab, .wpms-kt-tab{ position:relative; display:inline-flex; align-items:center; gap:6px; height:auto; white-space:nowrap; padding:9px 12px 10px; margin:0 0 -1px; border:0 !important; border-radius:6px 6px 0 0; background:none !important; box-shadow:none; font:inherit; font-size:13.5px; font-weight:550; color:var(--wpms-muted); cursor:pointer; }
.m-tab::after, .wpms-kt-tab::after{ content:""; position:absolute; left:8px; right:8px; bottom:0; height:2px; border-radius:2px; background:transparent; }
.m-tab:hover, .wpms-kt-tab:hover{ color:var(--wpms-text); }
.m-tab.is-active, .wpms-kt-tab.is-active{ color:var(--wpms-text); font-weight:650; }
.m-tab.is-active::after, .wpms-kt-tab.is-active::after{ background:var(--wpms-teal); }
.m-tab:focus, .wpms-kt-tab:focus{ outline:none; } .m-tab:focus-visible, .wpms-kt-tab:focus-visible{ outline:none; color:var(--wpms-text); }
.m-tab span, .wpms-ang-n{ display:inline-block; min-width:16px; padding:0 5px; border-radius:999px; background:var(--wpms-hover); font-size:11px; font-weight:600; line-height:16px; text-align:center; margin:0; color:var(--wpms-muted); }
.m-tbar, .wpms-ang-top{ align-items:flex-end; border-bottom:1px solid var(--wpms-line); margin-bottom:14px; }
.m-tbar .m-such, .wpms-ang-top .wpms-ang-q{ margin-bottom:6px; }
.wpms-kt-tabs{ border-bottom:1px solid var(--wpms-line); margin-bottom:10px; }
.wpms-kt-subtabs{ display:flex; gap:2px; border-bottom:1px solid var(--wpms-line); margin-bottom:10px; }

/* Upload-Zone (v1.0.860) */
.m-drop{ position:relative; display:flex; flex-direction:column; align-items:center; gap:4px; padding:18px 14px; border:1.5px dashed var(--wpms-line); border-radius:10px; background:var(--wpms-input); text-align:center; cursor:pointer; transition:border-color .12s, background .12s; }
.m-drop:hover, .m-drop:focus-visible, .m-drop.is-over{ outline:none; border-color:var(--wpms-teal); background:rgba(31,189,176,.07); }
.m-drop-t{ font-size:13.5px; color:var(--wpms-text); } .m-drop-t strong{ font-weight:600; } .m-drop-a{ color:var(--wpms-teal); text-decoration:underline; text-underline-offset:2px; }
.m-drop-h{ font-size:12px; color:var(--wpms-muted); }
.m-drop-l{ list-style:none; margin:6px 0 0; padding:0; width:100%; display:flex; flex-direction:column; gap:4px; }
.m-drop-l:empty{ display:none; }
.m-drop-l li{ display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:7px; background:var(--wpms-card); border:1px solid var(--wpms-line); font-size:13px; text-align:left; cursor:default; }
.m-drop-l li span{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--wpms-text); }
.m-drop-l li small{ color:var(--wpms-muted); font-size:12px; }
.m-drop-l li button{ border:0; background:none; color:var(--wpms-muted); font-size:16px; line-height:1; padding:0 4px; cursor:pointer; border-radius:4px; }
.m-drop-l li button:hover{ color:#c23b3b; background:var(--wpms-hover); }

/* v1.0.861: Formulare (Mitarbeiter, Kunde anlegen, …) kompakter und ruhiger – Michel: „Alles nicht so groß darstellen,
   Hintergrund Felder transparent“. Felder transparent mit feinem Rand wie in den Editoren; am Handy bleibt 16px gegen iOS-Zoom. */
.wpms-form{ gap:12px; }
.wpms-form label{ gap:4px; font-size:12.5px; }
.wpms-form input:not([type=checkbox]):not([type=radio]), .wpms-form select, .wpms-form textarea{ background-color:transparent; border-radius:8px; }
.wpms-form select option{ background:var(--wpms-card); color:var(--wpms-text); }
.wpms-form-h{ font-size:11px; letter-spacing:.05em; padding-top:12px; }
.wpms-backlink{ font-size:13.5px; }
@media (min-width:761px){
	#wpms-app .wpms-form input:not([type=checkbox]):not([type=radio]), #wpms-app .wpms-form select, #wpms-app .wpms-form textarea{ font-size:14px; }
	.wpms-form input:not([type=checkbox]):not([type=radio]), .wpms-form select{ height:38px; min-height:38px; padding-top:0; padding-bottom:0; padding-left:11px; }
	.wpms-form select{ padding-right:32px; background-position:right 10px center; }
	.wpms-form textarea{ padding:8px 11px; }
	.wpms-view > h1, .wpms-fullpage-h{ font-size:20px; }
}

/* v1.0.863 – Suchfelder über Listen einheitlich (Michel: „Schriftgröße und Farbe wie der Rest“):
   13px, Text normal, Platzhalter gedämpft, Hintergrund transparent wie die Formularfelder. */
#wpms-app .m-such, #wpms-app .wpms-ang-q, #wpms-app .wpms-md-search input{ height:34px; padding:0 12px; font-family:inherit; font-size:13px; font-weight:400; color:var(--wpms-text); background:transparent; border:1px solid var(--wpms-line); border-radius:8px; }
#wpms-app .m-such::placeholder, #wpms-app .wpms-ang-q::placeholder, #wpms-app .wpms-md-search input::placeholder{ color:var(--wpms-muted); opacity:1; font-size:13px; }
#wpms-app .m-such:focus, #wpms-app .wpms-ang-q:focus, #wpms-app .wpms-md-search input:focus{ outline:none; border-color:var(--wpms-teal2); }
@media (max-width:760px){ #wpms-app .m-such, #wpms-app .wpms-ang-q, #wpms-app .wpms-md-search input{ font-size:16px; } }
/* ⋯ am Zeilenende (Briefe) */
.m-table td.m-mehr, .m-table th.m-mehr{ width:44px; padding-left:0; padding-right:6px; text-align:right; }
.m-table .m-mehr-b{ width:30px; height:30px; font-size:16px; }
/* Zugang: „Passwort neu setzen“ als kleiner Knopf wie die übrigen */
.wpms-zugang-card .wpms-mini{ margin-top:6px; }

/* v1.0.864 – Bearbeiten-Stifte in Einstellungen dezent: ohne Rahmen, kleiner, gedämpft */
#wpms-app .wpms-set-edit{ width:30px; height:30px; padding:0; border:0; border-radius:8px; background:transparent; color:var(--wpms-muted); display:inline-flex; align-items:center; justify-content:center; box-shadow:none; }
#wpms-app .wpms-set-edit svg{ width:15px; height:15px; }
#wpms-app .wpms-set-edit:hover{ background:var(--wpms-hover); color:var(--wpms-text); }

/* v1.0.866 – Schaltflächen einheitlich eckig wie .m-btn (Michel: „nicht rund“), am Desktop kompakt */
#wpms-app .wpms-btn:not(.wpms-btn-icon){ border-radius:8px; }
@media (min-width:761px){ #wpms-app .wpms-btn:not(.wpms-btn-icon){ font-size:13.5px; padding:8px 14px; line-height:1.25; } }
#wpms-app .wpms-set-actions .wpms-btn{ width:auto; min-width:0; white-space:nowrap; }
#wpms-app .wpms-chat-input .wpms-btn{ border-radius:8px; }
/* Tresor: WhatsApp/Mail je Eintrag */
.m-table td.m-teil{ width:64px; padding-right:0; }
.m-teil-b{ display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:7px; color:var(--wpms-muted); }
.m-teil-b:hover{ background:var(--wpms-hover); color:var(--wpms-teal); }
.m-teil-b.is-leer{ opacity:.45; }

/* v1.0.870 – Umschalter Liste/Kacheln überall ganz rechts außen (Michel), hinter den übrigen Knöpfen */
.wpms-md-actions{ justify-content:flex-end; align-items:center; }
.wpms-md-actions > .wpms-md-ansicht{ order:99; margin-right:0; margin-left:6px; }
.wpms-leist-akt > .wpms-md-ansicht{ margin-left:auto; }

/* v1.0.871 – PDF-Ansicht: Kopfzeile kleiner (Michel: „Schriften im Header bei PDF-Ansichten generell kleiner“) */
.wpms-docview .wpms-docview-bar{ padding:8px 14px; gap:10px; }
.wpms-docview .wpms-docview-back{ font-size:13.5px; font-weight:600; padding:4px 2px; }
.wpms-docview .wpms-docview-name{ font-size:14px; font-weight:600; line-height:1.3; }
.wpms-docview .wpms-docview-file{ font-size:11px; }
.wpms-docview .wpms-docview-ext{ font-size:13px; }
.wpms-docview .wpms-docview-act{ padding:5px 6px; }
.wpms-docview .wpms-docview-act .wpms-ic{ width:16px; height:16px; }

/* v1.0.873 – Dunkelmodus: native Bedienelemente (Zahlen-Pfeile, Kalender-Symbol, Auswahl) hell wie die Schrift */
body.wpms-theme-dark{ color-scheme:dark; }
body:not(.wpms-theme-dark){ color-scheme:light; }
/* Alle Felder gleich hoch (Michel): Datumsfelder (Safari) brachten eigenen Innenabstand mit */
.wpms-form input:not([type=checkbox]):not([type=radio]), .wpms-form select{ box-sizing:border-box; }
@media (min-width:761px){
	/* #wpms-app input[type=date] setzt global 46px (ID-Spezifität) – in Formularen auf die 38px der übrigen Felder */
	#wpms-app .wpms-form input[type=date], #wpms-app .wpms-form input[type=time], #wpms-app .wpms-form input[type=datetime-local]{ height:38px; min-height:38px; padding-top:0; padding-bottom:0; padding-left:11px; line-height:1.2; }
	#wpms-app .wpms-form input::-webkit-datetime-edit, #wpms-app .wpms-form input::-webkit-datetime-edit-fields-wrapper{ padding:0; }
}

/* v1.0.875 – Listen-Einträge mit transparentem Hintergrund (Michel: „Hintergrund Einträge transparent“), feiner Rahmen bleibt */
.wpms-mdt, .wpms-mdt th, .wpms-mdt td, .m-twrap, .m-table th, .wpms-sttable-wrap{ background:transparent; }
.wpms-filter-dd{ background-color:transparent; font-weight:500; padding-top:9px; padding-bottom:9px; }

/* v1.0.876 – Kategorie-Dropdown in der Aktionszeile (links), so hoch wie die Knöpfe */
.wpms-md-actions > .wpms-az-dd{ order:-1; margin:0 auto 0 0; padding:0; flex:0 1 300px; min-width:180px; display:block; }
.wpms-md-actions > .wpms-az-dd .wpms-filter-dd{ height:35px; padding:0 34px 0 12px; font-size:13.5px; font-weight:500; border-radius:8px; background-position:right 11px center; }
@media (max-width:760px){ .wpms-md-actions > .wpms-az-dd{ flex:1 1 100%; } }
.wpms-md-actions > .wpms-md-ansicht button{ height:29px; }
