/* Heckmann Miete: Werkstatt & Schäden (Patch 4.17) */
[data-ico="clip"]::before,[data-ico="clip"]::after{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E");}
[data-ico="alert"]::before,[data-ico="alert"]::after{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E");}

.ws-tool input[type=search]{ flex:1 1 260px; max-width:420px; }
.ws-tool b{ font-size:15px; }

/* Auftragsbrett: Spalten in Ablaufreihenfolge, Kopf sagt, bei wem der Ball liegt */
.ws-board{ display:grid; grid-auto-flow:column; grid-auto-columns:minmax(232px, 1fr); gap:12px; overflow-x:auto; padding-bottom:8px; align-items:start; }
.ws-col{ background:var(--soft); border:1px solid var(--line); border-radius:4px; padding:10px; min-height:120px; display:flex; flex-direction:column; gap:8px; }
.ws-col h2{ font-size:15px; margin:0; display:flex; justify-content:space-between; }
.ws-who{ margin:-6px 0 2px; font-size:12px; color:var(--ink2); }
.ws-none{ font-size:13px; margin:4px 0; }
.ws-card{ display:grid; gap:2px; background:var(--panel); border:1px solid var(--line); border-left:4px solid var(--line); border-radius:4px; padding:9px 10px; text-decoration:none; color:var(--ink); }
.ws-card.prio{ border-left-color:var(--red); }
.ws-card:hover, .ws-card:focus-visible{ border-color:var(--blue); border-left-color:var(--blue); outline:none; }
.ws-card.prio:hover{ border-left-color:var(--red); }
.ws-card b{ font-size:15px; line-height:1.25; }
.ws-card .muted{ font-size:13px; }
.ws-cno{ font-size:12px; color:var(--ink2); font-variant-numeric:tabular-nums; }
.ws-ctags{ display:flex; flex-wrap:wrap; gap:4px; margin-top:2px; }
.ws-ctags:empty{ display:none; }
.ws-cfoot{ font-size:12px; color:var(--ink2); margin-top:2px; }
@media (max-width:760px){ .ws-board{ grid-auto-flow:row; grid-auto-columns:auto; } .ws-col{ min-height:0; } }

/* Kopf des Auftrags */
.ws-no{ font-family:var(--cond); font-weight:700; font-size:16px; letter-spacing:.01em; font-variant-numeric:tabular-nums; }
.ws-wholine{ margin:4px 0 0; font-weight:600; color:var(--blue-ink); }
.ws-steps{ margin-top:12px; }

/* Baugruppen, Mängel, Entscheidungen */
.ws-fk{ align-items:flex-start; }
.ws-fdet{ flex:1 1 100%; display:flex; flex-wrap:wrap; gap:8px; align-items:flex-start; }
.ws-fdet .fl-ckn{ flex:1 1 240px; }
.fl-ckn{ width:100%; }
.ws-ph{ display:flex; flex-wrap:wrap; gap:8px; align-items:flex-start; margin-top:6px; }
.ws-mini{ grid-template-columns:repeat(auto-fill, 72px); margin-top:0; flex:1 1 auto; }
.ws-mini img{ aspect-ratio:1; }
.ws-file{ display:flex; align-items:center; justify-content:center; text-align:center; font-size:11px; padding:6px; aspect-ratio:1; border:1px solid var(--line); border-radius:7px; background:var(--soft); color:var(--ink); word-break:break-word; }
.ws-dec{ border-top:1px solid var(--line); padding:10px 0; }
.ws-dec:first-of-type{ border-top:0; }
.ws-dec.done .ws-dech b{ text-decoration:line-through; text-decoration-color:var(--green); }
.ws-dech{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:6px; }
.ws-dech .ws-ph{ margin:0 0 0 auto; }
.ws-lab{ font-size:13px; color:var(--ink2); }
.fl-seg.sm button{ padding:5px 10px; }
.fl-seg button.on.bad{ background:var(--red); color:#fff; }
.ws-grade button{ min-width:44px; }
.ws-team{ gap:6px 14px; }
.ws-chk{ display:inline-flex; align-items:center; gap:6px; font-size:14px; color:var(--ink); }
.ws-h3{ font-size:14px; margin:14px 0 4px; color:var(--ink2); }

/* Tabellen und Erfassungszeilen */
.ws-tt{ font-size:13.5px; }
.ws-tt th{ font-size:12px; color:var(--ink2); font-weight:600; text-align:left; padding:6px 6px; border-bottom:1px solid var(--line); white-space:nowrap; }
.ws-tt td{ padding:6px 6px; border-bottom:1px solid var(--line); vertical-align:top; }
.ws-tt .num, .ws-sum .num{ text-align:right; font-variant-numeric:tabular-nums; }
.ws-tt tr.ws-kit td{ background:var(--soft); }
.ws-tt tr.ws-removed td{ color:var(--ink2); text-decoration:line-through; }
.ws-tt tr.ws-removed td:last-child{ text-decoration:none; }
.ws-week td small{ color:var(--ink2); margin-left:3px; }
.ws-x{ border:0; background:none; color:var(--ink2); font-size:18px; line-height:1; cursor:pointer; padding:2px 6px; border-radius:4px; }
.ws-x:hover, .ws-x:focus-visible{ color:var(--red-ink); background:var(--soft); outline:none; }
.ws-add{ display:flex; flex-wrap:wrap; gap:10px; align-items:flex-end; margin-top:12px; padding-top:12px; border-top:1px dashed var(--line); }
.ws-add .field{ flex:1 1 130px; min-width:110px; }
.ws-add .btn{ flex:none; }
.ws-sum{ font-size:14px; }
.ws-sum td{ padding:5px 4px; border-bottom:1px solid var(--line); }
.ws-sum tr.ws-gew td{ border-top:2px solid var(--line); }
.ws-mg{ padding:10px 0; border-bottom:1px solid var(--fl-soft, var(--soft)); }
.ws-lnlist{ display:grid; gap:6px; margin:8px 0 0 26px; font-size:14px; }

/* Unterschrift */
.ws-sigb{ padding:8px 0; border-top:1px solid var(--line); }
.ws-sigb:first-of-type{ border-top:0; }
.ws-sigimg{ margin:8px 0 0; }
.ws-sigimg img{ display:block; max-width:280px; width:100%; height:auto; background:#fff; border:1px solid var(--line); border-radius:4px; }
.ws-sigimg figcaption{ font-size:12px; color:var(--ink2); margin-top:4px; }
.ws-pad{ display:block; width:100%; height:200px; margin-top:10px; background:#fff; border:1px solid var(--ink2); border-radius:4px; touch-action:none; cursor:crosshair; }

/* Seitenspalte */
.ws-dl{ display:grid; grid-template-columns:auto 1fr; gap:4px 12px; margin:8px 0 0; font-size:14px; }
.ws-dl dt{ color:var(--ink2); }
.ws-dl dd{ margin:0; word-break:break-word; }

/* Nevaris-Vorlage */
.ws-cps{ display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:8px; }
.ws-cp{ display:flex; flex-direction:column; gap:2px; font-size:12px; color:var(--ink2); }
.ws-cp button, .ws-cpi{ font:inherit; font-size:14px; color:var(--ink); text-align:left; background:var(--soft); border:1px solid var(--line); border-radius:4px; padding:6px 8px; cursor:copy; }
.ws-cpi{ padding:2px 6px; }
.ws-cp button:hover, .ws-cpi:hover, .ws-cp button:focus-visible, .ws-cpi:focus-visible{ border-color:var(--blue); outline:none; }

/* Einstellungen */
.ws-tpl{ border-top:1px solid var(--line); padding:8px 0; }
.ws-tpl summary{ cursor:pointer; }
.ws-tpl textarea, .ws-tpl select[multiple]{ width:100%; }
.ws-errbox ul{ margin:6px 0 0 18px; padding:0; }
.sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

@media (max-width:760px){
  .ws-add .field{ flex:1 1 44%; }
  .ws-dech .ws-ph{ margin-left:0; }
  .fl-ok button{ min-height:44px; }
}
@media (prefers-reduced-motion: reduce){ .ws-card{ transition:none; } }

/* Verborgene Felder bleiben verborgen (.field setzt sonst display:flex) */
.ws-add [hidden], .fields [hidden], .field[hidden]{ display:none !important; }
/* Umschalter nur so breit wie ihr Inhalt */
.field > .fl-seg, .panel > .fl-seg, .ws-dec .fl-seg{ align-self:flex-start; width:max-content; max-width:100%; }
/* Menü: die Markierung des aktiven Punkts nicht mit dem Symbol maskieren (betraf alle Menüpunkte) */
nav a[data-ico]::before{ -webkit-mask-image:none; mask-image:none; }
/* Breite Tabellen scrollen in sich, statt die Seite auf dem Handy zu verbreitern */
#ws_main, #ws_main + .stack{ min-width:0; }

/* Patch 4.23: Gerätesuche, Gerätekarte, Geräteliste */
.ws-hits{ display:grid; gap:4px; margin-top:6px; }
.ws-hits:empty{ display:none; }
.ws-hit{ display:grid; gap:1px; text-align:left; font:inherit; background:var(--panel); border:1px solid var(--line); border-radius:4px; padding:8px 10px; cursor:pointer; color:var(--ink); }
.ws-hit:hover, .ws-hit:focus-visible{ border-color:var(--blue); background:var(--soft); outline:none; }
.ws-hit span{ font-size:13px; color:var(--ink2); }
.ws-hit small{ font-size:12px; color:var(--ink2); }
.ws-devcard{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px; border:1px solid var(--line); border-left:4px solid var(--blue); border-radius:4px; padding:10px 12px; background:var(--soft); }
.ws-devcard > div{ display:grid; gap:3px; min-width:0; }
.ws-devcard .muted{ font-size:13px; }
.ws-bulk{ border-left:4px solid var(--yellow, #e0a800); }
tr.ws-off td{ color:var(--ink2); }
.ws-delbtn{ margin-left:auto; color:var(--red-ink); }

/* Patch 4.24: Heute, Plantafel, Tageszettel, Kennzahlen, Diktat, offline */
.ws-sec{ font-size:17px; margin:20px 0 8px; }
.ws-shiftbar{ display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:12px; }
.ws-shiftbar > div:first-child{ display:grid; gap:2px; }
.ws-running{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:12px; }
.ws-tcard{ display:flex; flex-wrap:wrap; justify-content:space-between; gap:10px; background:var(--panel); border:1px solid var(--line); border-left:5px solid var(--line); border-radius:6px; padding:12px 14px; margin-bottom:10px; }
.ws-tcard.prio{ border-left-color:var(--red); }
.ws-tcard.run{ border-left-color:var(--blue); box-shadow:0 0 0 2px rgba(0,152,216,.18); }
.ws-tmain{ display:grid; gap:3px; text-decoration:none; color:var(--ink); flex:1 1 260px; min-width:0; }
.ws-tmain b{ font-size:17px; line-height:1.25; }
.ws-tact{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.ws-tact .btn{ min-height:48px; min-width:96px; font-size:16px; }
.ws-planwrap{ display:grid; grid-template-columns:240px minmax(0,1fr); gap:12px; align-items:start; }
.ws-backlog{ display:flex; flex-direction:column; gap:6px; max-height:75vh; overflow:auto; position:sticky; top:10px; }
.ws-backlog.over, .ws-plangrid td.over{ outline:2px dashed var(--blue); outline-offset:-2px; background:rgba(0,152,216,.06); }
.ws-plangrid table{ width:100%; border-collapse:collapse; min-width:640px; }
.ws-plangrid th, .ws-plangrid td{ border:1px solid var(--line); padding:6px; vertical-align:top; text-align:left; }
.ws-plangrid thead th{ font-size:13px; background:var(--soft); }
.ws-plangrid th.today, .ws-plangrid td.today{ background:rgba(0,152,216,.06); }
.ws-plangrid tbody th{ width:150px; font-weight:600; }
.ws-plangrid tbody th small{ display:block; font-weight:400; color:var(--ink2); font-size:12px; }
.ws-plangrid td{ min-width:92px; height:64px; }
.ws-plangrid td.abs{ background:repeating-linear-gradient(135deg, var(--soft) 0 8px, transparent 8px 16px); }
.ws-plangrid.picking td[data-drop]{ cursor:copy; background:rgba(0,152,216,.05); }
.ws-abs{ font-size:12px; color:var(--ink2); font-weight:600; }
.ws-chip{ display:flex; flex-wrap:wrap; align-items:center; gap:4px; font-size:12.5px; background:var(--panel); border:1px solid var(--line); border-left:3px solid var(--blue); border-radius:4px; padding:4px 6px; margin-bottom:4px; cursor:grab; user-select:none; }
.ws-chip.prio{ border-left-color:var(--red); } .ws-chip.late{ background:#fff3f2; }
.ws-chip.sel{ outline:2px solid var(--blue); background:rgba(0,152,216,.08); }
.ws-chip span{ flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ws-chip em{ font-style:normal; font-size:11px; color:var(--orange-ink); }
.ws-chipno{ font-weight:700; color:var(--ink); text-decoration:none; font-variant-numeric:tabular-nums; }
.ws-chip .ws-x{ font-size:15px; padding:0 4px; }
.ws-kpis{ display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:10px; }
.ws-kpi{ display:grid; gap:2px; }
.ws-kpi span{ font-size:13px; color:var(--ink2); } .ws-kpi b{ font-family:var(--cond); font-size:28px; line-height:1.1; } .ws-kpi small{ font-size:12px; color:var(--ink2); }
.ws-kpi.warnk b{ color:var(--red-ink); }
.ws-bar{ display:grid; grid-template-columns:140px 1fr 60px; align-items:center; gap:8px; font-size:13.5px; margin:5px 0; }
.ws-bar i{ display:block; height:10px; border-radius:5px; background:var(--blue); min-width:2px; }
.ws-bar b{ text-align:right; font-variant-numeric:tabular-nums; }
.ws-dictw{ display:flex; gap:6px; align-items:flex-start; flex:1 1 240px; min-width:0; }
.ws-dictw > input, .ws-dictw > textarea{ flex:1 1 auto; min-width:0; width:100%; }
.ws-mic{ flex:none; display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border:1px solid var(--line); border-radius:6px; background:var(--panel); color:var(--ink2); cursor:pointer; }
.ws-mic:hover, .ws-mic:focus-visible{ color:var(--blue); border-color:var(--blue); outline:none; }
.ws-mic.on{ color:#fff; background:var(--red); border-color:var(--red); }
#ws_offline{ position:fixed; left:12px; right:12px; bottom:calc(12px + env(safe-area-inset-bottom, 0px)); z-index:60; background:#222; color:#fff; padding:10px 14px; border-radius:8px; font-size:14px; box-shadow:0 4px 18px rgba(0,0,0,.25); }
/* Tablet */
@media (max-width:1100px){
  .ws-board{ grid-auto-flow:row; grid-template-columns:repeat(2, minmax(0, 1fr)); grid-auto-columns:auto; overflow:visible; }
  .ws-planwrap{ grid-template-columns:1fr; }
  .ws-backlog{ position:static; max-height:none; flex-direction:row; flex-wrap:wrap; }
  .ws-backlog h2{ flex-basis:100%; }
  .ws-backlog .ws-chip{ flex:0 1 220px; }
  .ws-dec .fl-seg button, .fl-ok button, .ws-grade button{ min-height:44px; }
}
@media (max-width:760px){ .ws-board{ grid-template-columns:1fr; } .ws-bar{ grid-template-columns:100px 1fr 52px; } .ws-tact{ width:100%; } .ws-tact .btn{ flex:1; } }
@media (max-width:1300px){
  .ws-planwrap{ grid-template-columns:1fr; }
  .ws-backlog{ position:static; max-height:none; flex-direction:row; flex-wrap:wrap; }
  .ws-backlog h2{ flex-basis:100%; }
  .ws-backlog .ws-chip{ flex:0 1 220px; }
}
@media (max-width:1300px){ .ws-backlog{ align-items:flex-start; align-content:flex-start; height:auto; } .ws-backlog .ws-chip{ align-self:flex-start; } }
/* Patch 4.25: Push-Hinweis, Rechnung, Fristen */
.ws-push{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:8px 0 12px; }
.ws-push span{ flex:1 1 260px; }
.ws-bill input{ width:100%; min-width:70px; font:inherit; font-size:13.5px; padding:5px 6px; border:1px solid var(--line); border-radius:4px; background:var(--panel); color:var(--ink); }
.ws-bill input.num{ text-align:right; max-width:90px; }
.ws-bill input.miss{ border-color:var(--orange); background:#fff8ef; }
.ws-bill td:nth-child(2){ min-width:240px; }
.ws-bill tr.ws-txt input{ font-style:italic; }
.modal .panel:has(.ws-bill){ max-width:1000px; width:96vw; }
/* Patch 4.26: Werkstatt-Board */
.ws-mboard table{ width:100%; border-collapse:collapse; min-width:900px; }
.ws-mboard th, .ws-mboard td{ border:1px solid var(--line); padding:4px; font-size:12.5px; text-align:center; vertical-align:middle; }
.ws-mboard thead th{ background:var(--soft); font-weight:600; line-height:1.2; }
.ws-mboard thead th.we{ color:var(--ink2); }
.ws-mboard tbody th{ text-align:left; min-width:230px; max-width:280px; position:sticky; left:0; background:var(--panel); z-index:1; display:table-cell; }
.ws-mboard tbody th > *{ display:block; }
.ws-mboard tbody th .ws-ctags{ display:flex; }
.ws-mboard tbody tr{ cursor:pointer; }
.ws-mboard tbody tr:hover th{ background:var(--soft); }
.ws-mboard tbody tr.akut th{ box-shadow:inset 4px 0 0 var(--red); }
.ws-mboard td.today, .ws-mboard th.today{ background:rgba(0,152,216,.08); }
.ws-mboard td.bar{ background:rgba(0,152,216,.22); }
.ws-mboard tr.akut td.bar{ background:rgba(198,47,40,.20); }
.ws-mboard td.bar.open{ background:repeating-linear-gradient(90deg, rgba(0,152,216,.22) 0 6px, transparent 6px 12px); }
.ws-mboard td.rent{ box-shadow:inset 0 0 0 2px var(--red); }
.ws-mboard td.part{ box-shadow:inset 0 -3px 0 var(--yellow); }
.ws-mboard td i{ display:inline-block; font-style:normal; font-weight:700; font-size:11px; background:var(--ink); color:var(--panel); border-radius:3px; padding:1px 3px; margin:1px; }
.ws-mboard td b{ display:block; font-size:10.5px; color:var(--red-ink); }
.ws-mboard td.part b{ color:var(--yellow-ink); }
.ws-rentwarn{ color:var(--red-ink); font-size:12px; font-weight:600; margin-top:2px; }

/* Patch 4.27 */
.ws-plangrid tr.ws-grp td{ background:#bfeaf7; font-weight:700; font-size:12.5px; padding:3px 8px; height:auto; }
