/* Auftragsbearbeitung: Arbeitsstand und Positionen zuerst. Bestehende KURTH-Farben. */
.wk-auftrag{--wk-border:#dcdedc;--wk-muted:#626965;font-size:14px}
.wk-auftrag .wk-auftrag-kopf{margin-bottom:14px;gap:16px}
.wk-auftrag .wk-auftrag-kopf h1{font-size:30px;letter-spacing:-.6px}
.wk-auftrag .wk-document-meta{font-size:14px;line-height:1.5}
.wk-auftrag .wk-steps{display:flex;margin-bottom:12px}
.wk-auftrag #wk-belege{margin-bottom:12px} /* Ausgabe direkt unter Auftrag & Übersicht. */
.wk-prioritaet{border:1px solid #decfae;border-left:4px solid #a77b28;background:#fffcf5;border-radius:6px;margin:0 0 12px;padding:15px 18px}
.wk-prioritaet-main{display:flex;align-items:center;justify-content:space-between;gap:18px}
.wk-workspace .wk-section-label{display:block;text-transform:uppercase;font-size:11px;letter-spacing:1.1px;font-weight:600;color:#76613b;margin-bottom:4px}
.wk-prioritaet h2{font-size:19px;line-height:1.25;margin:0 0 4px}
.wk-prioritaet p{font-size:13px;color:#62665e;margin:0}
.wk-prioritaet-main>button{flex-shrink:0;min-height:40px}
/* 1.11.2026: Werkstattvorschau neben dem Hauptknopf (Freigabe & Druck) */
.wk-haupt-paar{display:flex;gap:8px;flex-shrink:0;flex-wrap:wrap}.wk-haupt-paar>button{min-height:40px}
.wk-klaerungen{margin-top:9px;font-size:13px}
.wk-klaerungen summary{cursor:pointer;color:#75561e;padding:3px 0}
.wk-klaerungen ul{padding:0;list-style:none;margin:8px 0}
.wk-klaerungen li{display:grid;grid-template-columns:155px minmax(0,1fr);gap:10px;border-top:1px solid #e9dfcb;padding:9px 0;line-height:1.5}
.wk-klaerungen li button{align-self:start;text-align:left;border:0;background:none;text-decoration:underline;padding:0;color:#604817}
.wk-offene-angaben{display:flex;align-items:center;flex-wrap:wrap;gap:6px 14px;padding-top:10px;margin-top:10px;border-top:1px solid #e9dfcb;font-size:13px}
.wk-offene-angaben>span{color:#685b44}
.wk-workspace .wk-task-link{border:0;background:transparent;text-decoration:underline;text-underline-offset:3px;color:#534527;padding:0;min-height:26px}
.wk-section-nav{display:flex;flex-wrap:wrap;gap:4px;margin:0 0 12px;border-bottom:1px solid var(--wk-border);padding:0 0 8px}
.wk-section-nav button{border:0;background:transparent;color:#464d48;padding:8px 12px;min-height:36px;font-weight:500}
.wk-section-nav button:first-child{background:#e8ece8;color:#171d18;border-radius:4px}
.wk-section-nav button:hover{background:#e6e9e6}
.wk-section-nav span{margin-left:4px;font-size:12px}
.wk-disclosure{background:#fff;border:1px solid var(--wk-border);border-radius:6px;margin:0 0 12px;scroll-margin-top:16px}
.wk-disclosure>summary{cursor:pointer;display:flex;align-items:center;gap:12px;min-height:48px;padding:12px 15px;list-style:none}
.wk-disclosure>summary::-webkit-details-marker{display:none}
.wk-disclosure>summary:before{content:'›';font-size:22px;line-height:1;color:#656d66;width:10px;flex-shrink:0}
.wk-disclosure[open]>summary:before{transform:rotate(90deg)}
.wk-disclosure>summary>b{font-size:14px;font-weight:600;flex-shrink:0}
.wk-disclosure>summary>span{font-size:13px;color:var(--wk-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wk-disclosure[open]>summary{border-bottom:1px solid #e9ece9;margin-bottom:10px}
.wk-disclosure>.wk-info-grid{padding:0 12px 12px;margin:0;gap:12px}
.wk-disclosure>.wk-card{border:0;border-radius:0;margin:0!important}
.wk-disclosure .wk-entry-section{margin:0;padding:0 12px 12px}
.wk-disclosure .wk-entry-section>h2{display:none}
.wk-disclosure .wk-entry-option{min-height:88px}
.wk-workspace #wk-positionen{scroll-margin-top:16px}
.wk-workspace #wk-positionen .wk-table-head{align-items:start;flex-direction:column;gap:12px;margin:18px 0 10px}
.wk-workspace #wk-positionen .wk-table-head h2{font-size:21px}
.wk-workspace #wk-positionen .wk-table-tools{width:100%;gap:9px;display:flex;align-items:center}
.wk-workspace #wk-positionen .wk-table-tools>input{width:auto!important;min-width:190px;flex:1;max-width:420px;min-height:38px;background:#fff}
.wk-workspace #wk-positionen .wk-sort-label{display:flex;align-items:center;gap:7px;font-size:12px}
.wk-workspace #wk-positionen select{width:auto;min-height:38px;max-width:180px;background:#fff}
.wk-workspace #wk-positionen .wk-table-scroll{min-height:160px}
.wk-workspace #wk-positionen .wk-table{min-width:950px}
.wk-workspace #wk-positionen .wk-quick{position:sticky;top:16px;display:block}
.wk-workspace #wk-positionen .wk-quick h2{font-size:16px}
.wk-workspace #wk-positionen .wk-quick .wk-entwurf{white-space:normal}
.wk-workspace #wk-positionen .wk-quick .wk-warning{font-size:13px;line-height:1.5;padding:9px;background:#fffcf5;border:1px solid #eadfc9;margin:10px 0}
.wk-workspace #wk-positionen .wk-quick-sketch{max-height:170px;overflow:hidden}
.wk-workspace #wk-positionen .wk-table tr.selected{background:#edf2ed;box-shadow:inset 3px 0 #263e2e}
.wk-workspace .wk-disclosure summary:focus-visible,.wk-workspace input:focus-visible,.wk-workspace select:focus-visible,.wk-workspace textarea:focus-visible{outline:2px solid #3d6550;outline-offset:3px}
.wk-workspace #wk-filter-reset[hidden]{display:none}
@media(min-width:1450px){.wk-workspace #wk-positionen .wk-list-layout{grid-template-columns:minmax(0,1fr) 280px}}
@media(max-width:1250px){.wk-workspace #wk-positionen .wk-list-layout{grid-template-columns:minmax(0,1fr)}.wk-workspace #wk-positionen .wk-quick{position:static;max-width:none;display:grid;grid-template-columns:180px minmax(0,1fr);gap:5px 18px}.wk-workspace #wk-positionen .wk-quick>h2,.wk-workspace #wk-positionen .wk-quick>.wk-warning,.wk-workspace #wk-positionen .wk-quick>.wk-block,.wk-workspace #wk-positionen .wk-quick>details{grid-column:1/-1}.wk-workspace #wk-positionen .wk-quick-sketch{grid-column:1;grid-row:2/7}.wk-workspace #wk-positionen .wk-quick>.wk-field,.wk-workspace #wk-positionen .wk-quick>h3{grid-column:2}}
@media(max-width:700px){.wk-prioritaet-main{flex-direction:column;align-items:stretch;gap:10px}.wk-haupt-paar>button{flex:1 1 auto}.wk-prioritaet{padding:12px}.wk-klaerungen li{grid-template-columns:1fr;gap:4px}.wk-disclosure>summary{flex-wrap:wrap;gap:6px 10px}.wk-disclosure>summary>span{white-space:normal;flex-basis:100%;padding-left:20px}.wk-section-nav{gap:0}.wk-section-nav button{padding:9px;min-height:44px}.wk-workspace #wk-positionen .wk-table-tools>input{max-width:none;flex-basis:100%}.wk-workspace #wk-positionen .wk-quick{display:block}.wk-workspace #wk-positionen input,.wk-workspace #wk-positionen select{font-size:16px;min-height:44px}.wk-workspace .wk-info-grid.wk-info-drei{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.wk-workspace *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

/* Bei vorhandenen Positionen öffnet «+ Position» die Wegwahl bei Bedarf. */
.wk-workspace #wk-erfassung:not([open]){display:none}
/* Kompakte Hinweiszeile; Details beanspruchen erst beim Öffnen mehr Platz. */
.wk-prioritaet{display:flex;align-items:center;flex-wrap:wrap;gap:4px 14px;padding:4px 10px;margin-bottom:8px;border-left-width:3px}
.wk-prioritaet-main{display:contents}
.wk-prioritaet-main>div{display:flex;align-items:center;gap:8px}
.wk-prioritaet-main .wk-section-label{display:none}
.wk-prioritaet h2{font-size:14px;line-height:1.3;margin:0}
/* Die ergänzende Erklärung bleibt für assistive Technik lesbar. */
.wk-prioritaet-main p{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.wk-workspace #wk-zutun .wk-prioritaet-main>button{order:4;margin-left:auto;height:auto;min-height:28px;padding:4px 9px;font-size:12px;line-height:1.4}
.wk-klaerungen{order:2;margin:0;font-size:12px}
.wk-klaerungen summary{padding:4px 0;min-height:24px}
.wk-klaerungen[open]{order:5;flex-basis:100%}
.wk-offene-angaben{order:3;margin:0;border:0;padding:0;gap:4px 12px;font-size:12px}
.wk-offene-angaben>span:first-child{display:none}
.wk-prioritaet .wk-task-link{min-height:24px;font-size:12px}
@media(max-width:700px){.wk-prioritaet{gap:4px 10px;padding:5px 8px}.wk-prioritaet-main>div{flex-basis:100%}.wk-workspace #wk-zutun .wk-prioritaet-main>button{min-height:32px;margin-left:0}.wk-offene-angaben{flex-basis:100%}.wk-prioritaet .wk-task-link,.wk-klaerungen summary{min-height:28px}.wk-klaerungen summary{display:list-item}}

.wk-priority-badge{border:1px solid #d6b36c;background:#fff8e7;color:#704d14;border-radius:4px;padding:5px 8px;font-size:13px;font-weight:600}

/* Dateien im oberen Auftragsbereich ablegen; die Akte selbst bleibt bei den Unterlagen. */
.wk-auftrag #wk-dateiablage{margin:0 0 12px}
.wk-auftrag #wk-dateiablage[hidden]{display:none}
.wk-auftrag #wk-dateiablage .ak-drop{margin:0;padding:10px 14px;border-radius:6px;background:#fff;line-height:1.4}

/* Auftragsangaben bleiben immer sichtbar, ohne Aufklappsteuerung. */
.wk-auftragsangaben{margin:0 0 12px;scroll-margin-top:16px}
.wk-auftragsangaben>header{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px 12px;margin:0 0 10px}
.wk-auftragsangaben>header h2{font-size:14px;margin:0}
.wk-auftragsangaben>header span{font-size:13px;color:var(--wk-muted)}
.wk-auftragsangaben>.wk-info-grid{margin:0;gap:12px}

/* Belege neben der Suche: gleiche Kopfhöhe, bei wenig Platz horizontal erreichbar. */
#topbar.wk-mit-belegen{gap:12px}
#topbar.wk-mit-belegen>.search{flex:1 1 300px;min-width:150px;max-width:420px}
#topbar.wk-mit-belegen>.top-actions:empty{display:none}
#topbar #wk-belege{order:2;flex:1 1 580px;min-width:0;max-width:710px;margin:0}
#topbar #ausgabe-card{display:flex;align-items:center;gap:8px;height:38px;min-width:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
#topbar .ausgabe-kopf{display:none}
#topbar .ausgabe-zeile{display:flex;flex:1;min-width:0;flex-wrap:nowrap;align-items:center;gap:4px;height:38px;margin:0;padding:3px;overflow-x:auto;scrollbar-width:none}
#topbar .ausgabe-zeile::-webkit-scrollbar{display:none}
#topbar .ausgabe-beleg{flex:0 0 42px;min-width:42px;height:30px;min-height:30px;padding:2px 4px;gap:0;border-radius:4px;line-height:1.1}
#topbar .ausgabe-beleg b{font-size:12px}
#topbar .ausgabe-beleg small{font-size:9px;line-height:1.1}
#topbar .ausgabe-aktionen{flex-wrap:nowrap;flex-shrink:0;gap:4px;margin-left:auto;padding-left:5px;border-left:1px solid #ddd}
#topbar button.ausgabe-art{min-width:30px;width:30px;height:30px;min-height:30px;padding:3px;font-size:0;border-radius:4px}
#topbar .ausgabe-art span{font-size:15px;line-height:1}
#topbar .wk-produktionsstand{flex-shrink:0;font-size:12px}
#topbar .wk-produktionsstand>summary{cursor:pointer;padding:8px 2px;white-space:nowrap}
/* 10.2.4 Produktionsstand direkt in der Kopfzeile (Fabian 25.10.2026): zwei Zeilen wie die Beleg-Knöpfe – oben «Produktion 1/4 · als
   Nächstes: …», unten je Arbeitsplatz ein Balkenstück; Klick öffnet die Einzelheiten */
#topbar .wk-produktionsstand>summary{display:flex;align-items:center;gap:6px;height:32px;padding:3px 8px;border:1px solid #ddd;border-radius:4px;background:#fff;list-style:none}
#topbar .wk-produktionsstand>summary::-webkit-details-marker{display:none}
#topbar .wk-produktionsstand>summary::before{content:none}   /* allgemeiner Pfeil von details>summary (styles.css) – hier steht ▾ rechts */
#topbar .wk-produktionsstand[open]>summary:after{content:'▴'}
#topbar .wk-produktionsstand>summary:after{content:'▾';font-size:10px;color:var(--muted,#64748b)}
#topbar .wk-produktionsstand[open]>summary{border-color:#111}
.wk-ps{display:flex;flex-direction:column;justify-content:center;gap:4px;min-width:150px;max-width:280px}
.wk-ps-zeile{display:flex;align-items:baseline;gap:6px;min-width:0;font-size:11.5px;line-height:1.1;white-space:nowrap}
.wk-ps-zeile b{font-weight:600}
.wk-ps-zahl{color:var(--muted,#64748b)}
.wk-ps-jetzt{min-width:0;overflow:hidden;text-overflow:ellipsis}
.wk-ps-fertig .wk-ps-jetzt{color:#1e6b3a;font-weight:600}
.wk-ps-balken{display:flex;gap:2px;height:5px}
.wk-ps-balken i{flex:1;min-width:10px;border-radius:2px;background:#e1e4e8}
.wk-ps-balken i.st-ok{background:#1e6b3a}.wk-ps-balken i.st-teil{background:#c2860c}
#topbar .wk-produktionsstand>.auftrag-status{position:absolute;top:calc(100% + 4px);right:16px;width:min(580px,calc(100vw - 32px));margin:0;padding:14px;background:#fff;border:1px solid #ddd;border-radius:6px;box-shadow:0 5px 20px #0002;z-index:20}
#topbar #wk-belege button:focus-visible,#topbar #wk-belege summary:focus-visible{outline:2px solid #424c5e;outline-offset:1px}
@media(max-width:700px){#topbar.wk-mit-belegen{gap:6px}#topbar.wk-mit-belegen>.search{flex:0 1 150px;min-width:100px;padding:0 7px}#topbar.wk-mit-belegen .kbd-hint{display:none}#topbar #wk-belege{flex:1 1 180px}#topbar #ausgabe-card{gap:4px}#topbar .wk-ps{min-width:56px}#topbar .wk-ps-zeile b,#topbar .wk-ps-jetzt{display:none}}

/* Prüfung und Bemerkung gemeinsam minimiert neben der technischen Position. */
.wk-auftrag .wk-schrittzeile{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;position:relative;margin-bottom:14px}
.wk-auftrag .wk-schrittzeile>.wk-steps{margin:0;width:auto;flex:0 1 auto}
.wk-pruefung{font-size:12px;min-width:0}
.wk-pruefung>summary{cursor:pointer;border:1px solid #decfae;border-radius:4px;background:#fffcf5;color:#534527;padding:9px 10px;line-height:18px;min-height:38px;box-sizing:border-box;font-weight:600}
.wk-pruefung>summary span{font-weight:400}
.wk-pruefung-inhalt{position:absolute;right:0;top:calc(100% + 5px);width:min(640px,100%);max-height:70vh;overflow:auto;box-sizing:border-box;padding:12px;background:#fff;border:1px solid #decfae;border-radius:6px;box-shadow:0 5px 20px #0002;z-index:10}
.wk-pruefung-inhalt .wk-prioritaet{margin:0;border:0;padding:0;background:none}
.wk-pruefung-notiz{font-size:13px;line-height:1.45;overflow-wrap:anywhere}
.wk-prioritaet+.wk-pruefung-notiz{border-top:1px solid #eee;margin-top:10px;padding-top:10px}
.wk-pruefung-notiz p{margin:5px 0 0;white-space:pre-wrap}
.wk-pruefung>summary:focus-visible{outline:2px solid #424c5e;outline-offset:2px}
.wk-auftrag .wk-title-row #wk-dateiablage{margin:0;flex:0 0 auto}
.wk-auftrag .wk-title-row #wk-dateiablage .ak-drop{padding:6px 10px;min-height:32px;box-sizing:border-box;font-size:12px;line-height:18px;white-space:nowrap;border-radius:4px}
@media(max-width:700px){.wk-auftrag .wk-schrittzeile{gap:6px}.wk-auftrag .wk-schrittzeile>.wk-steps{flex:1 1 100%}.wk-pruefung-inhalt{width:100%;max-height:65vh;overflow:auto}}

/* Auftragsseite optimieren (Fabian 20.10.2026, Punkte 1–4). 2: Schnelldetail neben der Tabelle schon ab 1280 px – dafür die Tabelle
   schmaler: 1400–1449 px ohne CHF/m² (aus Netto und m² ableitbar), 1280–1399 px zusätzlich ohne m² und Bearb. (Kanten und
   Bearbeitungen stehen im Detail daneben). Die Tabelle darf dabei nie breiter als ihr Rahmen werden (kein Querbalken). */
.wk-termin-ueber,.wk-task-ueber,.wk-pruefung-ueber,.wk-workspace .wk-document-meta .wk-termin-ueber,.wk-workspace .wk-pruefung summary .wk-pruefung-ueber{color:#b3261e;font-weight:600}
.wk-workspace .wk-task-link.wk-task-ueber{color:#b3261e}
.wk-workspace #wk-positionen .wk-quick-sketch{height:220px;max-height:220px}
@media(min-width:1400px) and (max-width:1449px){.wk-workspace #wk-positionen .wk-list-layout{grid-template-columns:minmax(0,1fr) 250px}.wk-workspace #wk-positionen .wk-table{min-width:860px}.wk-workspace #wk-positionen .wk-quick{display:block;position:sticky;top:16px}
  .wk-workspace #wk-positionen .wk-table td:nth-child(8) small,.wk-workspace #wk-positionen .wk-table td:nth-child(11) span,.wk-workspace #wk-positionen .wk-table td:nth-child(11) .badge{white-space:nowrap}
  .wk-workspace #wk-positionen .wk-table th:nth-child(9),.wk-workspace #wk-positionen .wk-table td:nth-child(9){display:none}}
@media(min-width:1280px) and (max-width:1399px){.wk-workspace #wk-positionen .wk-list-layout{grid-template-columns:minmax(0,1fr) 232px}.wk-workspace #wk-positionen .wk-table{min-width:740px}.wk-workspace #wk-positionen .wk-quick{display:block;position:sticky;top:16px}
  .wk-workspace #wk-positionen .wk-table th:nth-child(7),.wk-workspace #wk-positionen .wk-table td:nth-child(7),.wk-workspace #wk-positionen .wk-table th:nth-child(9),.wk-workspace #wk-positionen .wk-table td:nth-child(9){display:none}
  .wk-workspace #wk-positionen .wk-table th:nth-child(8),.wk-workspace #wk-positionen .wk-table td:nth-child(8){display:none}.wk-workspace #wk-positionen .wk-table td:nth-child(11) span,.wk-workspace #wk-positionen .wk-table td:nth-child(11) .badge{white-space:nowrap}}

/* ---- Sechs Verbesserungen (Fabian 4.11.2026: «ja gib die 6 verbesserungen claude zum umsetzen»), Auftrag und Angebot gleich ---- */
/* 1 Kopf kompakt: die ersten Positionen sind ohne langes Scrollen sichtbar, Projekt und Konditionen bleiben offen */
.wk-auftrag .wk-auftrag-kopf{align-items:center;gap:8px 14px;margin-bottom:8px}
.wk-auftrag .wk-auftrag-kopf h1{font-size:22px;letter-spacing:-.3px}
.wk-auftrag .wk-title-row{gap:6px 10px}
.wk-auftrag .wk-title-row .wk-zurueck{margin:0;white-space:nowrap}
.wk-workspace.wk-auftrag .wk-title-row .wk-document-meta{margin:0;font-size:13px;line-height:1.3}
.wk-workspace.wk-auftrag .wk-document-meta span{padding:0 4px}
.wk-workspace.wk-auftrag .wk-header-right{flex-direction:row;align-items:center;gap:12px;max-width:none}
.wk-auftrag .wk-kopf-summe span{font-size:11px}
.wk-auftrag .wk-kopf-summe b{font-size:18px}
@media(pointer:fine){.wk-workspace.wk-auftrag .wk-header-actions button,.wk-workspace.wk-auftrag .wk-mehr-menue>summary{min-height:34px;padding-top:4px;padding-bottom:4px}}
.wk-auftrag .wk-schrittzeile{margin-bottom:8px}
@media(pointer:fine){.wk-workspace.wk-auftrag .wk-steps button{min-height:32px;padding:4px 12px;font-size:12.5px}}
.wk-auftrag .wk-auftragsangaben{margin:0 0 10px}
.wk-workspace .wk-info-grid.wk-info-drei{grid-template-columns:minmax(200px,.8fr) minmax(340px,1.5fr) minmax(250px,1fr);gap:8px;margin:0}
.wk-workspace .wk-info-drei>.wk-card{padding:9px 12px}
.wk-workspace .wk-info-drei>.wk-card>h2{margin:0 0 4px;padding:0;border:0;font-size:13px;min-height:0}
.wk-workspace .wk-info-drei .wk-card h3{margin:0;font-size:13px;line-height:1.3}
.wk-workspace .wk-info-drei .wk-address{margin:1px 0 0;font-size:12.5px;line-height:1.3}
.wk-kunde-zeile{margin:3px 0 0;font-size:12.5px;line-height:1.35;color:#555;overflow-wrap:anywhere}
.wk-kunde-zeile span{color:#bbb}
.wk-workspace .wk-klapp-grund{margin:0 0 4px;font-size:12px;line-height:1.3}
.wk-felder{display:grid;gap:4px 8px;align-items:start}
.wk-felder-projekt{grid-template-columns:repeat(3,minmax(0,1fr))}
.wk-felder-konditionen{grid-template-columns:repeat(2,minmax(0,1fr))}
.wk-workspace .wk-felder .wk-edit-field{margin:0;min-width:0}
.wk-workspace .wk-felder label{margin:0 0 1px;font-size:12px;font-weight:500;color:#555}
@media(pointer:fine){.wk-workspace .wk-felder input,.wk-workspace .wk-felder select{width:100%;height:30px;min-height:30px;padding:2px 7px;font-size:13px}}
.wk-workspace .wk-felder .wk-feld-hilfe{font-size:12px;line-height:1.25}
.wk-workspace .wk-felder .wk-weitere{margin:0;align-self:end;font-size:12px}
.wk-workspace .wk-felder .wk-weitere[open]{grid-column:1/-1}
.wk-workspace .wk-felder .wk-weitere>summary{padding:6px 0}
.wk-workspace .wk-card-state{margin:0;font-size:11.5px}
@media(max-width:820px){.wk-workspace .wk-info-grid.wk-info-drei{grid-template-columns:1fr}.wk-felder-projekt{grid-template-columns:repeat(2,minmax(0,1fr))}.wk-workspace.wk-auftrag .wk-header-right{flex-wrap:wrap;justify-content:space-between;width:100%}}
/* 2 Eine Erfassungsleiste an der Positionsliste */
.wk-workspace .wk-table-head{flex-direction:row;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:0 0 6px}
.wk-table-titel{display:flex;align-items:center;flex-wrap:wrap;gap:6px 14px;min-width:0}
.wk-workspace .wk-table-head>.wk-table-titel>span{margin:0}
.wk-workspace .wk-table-head h2{margin:0;font-size:15px;white-space:nowrap}
.wk-workspace .wk-einfuegen{flex-wrap:nowrap;gap:6px;margin:0}
.wk-workspace .wk-einf-titel{font-size:13px;font-weight:600}
.wk-workspace .wk-einf-gruppe{flex-wrap:wrap;align-items:center}
@media(pointer:fine){.wk-workspace .wk-einf-knopf,.wk-workspace .wk-einf-weitere{min-height:32px;padding:0 11px;font-size:13px}}
.wk-workspace .wk-einf-weitere{border:1px solid var(--kurth-line);border-radius:6px;background:#fff;color:var(--kurth-black);font-weight:500}
.wk-workspace .wk-einf-weitere:hover{border-color:var(--kurth-black);background:#FAFAFA}
.wk-workspace .wk-einf-knopf[data-einf="glas"]{border-color:#000;background:#000;color:#fff}
.wk-workspace .wk-einf-knopf[data-einf="glas"]:hover{background:#333}
.wk-einf-mehr{position:relative}
.wk-workspace .wk-einf-mehr>summary{display:inline-flex;align-items:center;gap:5px;list-style:none;cursor:pointer}
.wk-einf-mehr>summary::-webkit-details-marker{display:none}
.wk-workspace .wk-einf-mehr>summary::before{content:none}
.wk-einf-mehr>summary::after{content:'▾';font-size:10px}
.wk-einf-liste{position:absolute;left:0;top:calc(100% + 4px);z-index:30;display:flex;flex-direction:column;gap:4px;min-width:220px;padding:8px;background:#fff;border:1px solid #ddd;border-radius:6px;box-shadow:0 5px 20px #0002}
.wk-workspace .wk-einf-liste .wk-einf-knopf{width:100%;text-align:left}
@media(pointer:fine){.wk-workspace .wk-table-tools>input{width:200px!important;height:32px;min-height:32px}}
@media(pointer:fine){.wk-workspace .wk-table-tools .wk-sort-label select{height:32px;min-height:32px}}
/* 5 Ausgabe gebündelt unter «Ausgeben» */
#topbar #wk-belege{flex:0 1 auto;max-width:none}
#topbar #ausgabe-card,#topbar #angebot-ausgabe{display:flex;align-items:center;gap:8px;height:38px;min-width:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.ausgabe-haken{flex:none;box-sizing:border-box;width:15px;height:15px;border:1.5px solid #888;border-radius:3px;background:#fff}
.ausgabe-haken.aus{visibility:hidden}
.ausgabe-haken.ein,.ausgabe-beleg.aktiv .ausgabe-haken{border-color:#111;background:#111;box-shadow:inset 0 0 0 2.5px #fff}
#topbar .ausgabe-art:disabled{opacity:.45;cursor:not-allowed}
/* 6 Zeichnung neben der Liste: bleibt beim Blättern stehen; schmal darüber */
.wk-quick-mass{margin:6px 0 0;font-size:13px;font-weight:600;text-align:center}
.wk-quick-dxf{padding:0;border:0;background:none;font:inherit;text-align:right;text-decoration:underline;cursor:pointer;overflow-wrap:anywhere}
@media(min-width:1280px){.wk-workspace #wk-positionen .wk-quick{position:sticky;top:72px;max-height:calc(100vh - 160px);overflow:auto}}
@media(min-width:1080px) and (max-width:1279px){.wk-workspace #wk-positionen .wk-list-layout{grid-template-columns:minmax(0,1fr) 240px}.wk-workspace #wk-positionen .wk-table{min-width:0}
  .wk-workspace #wk-positionen .wk-table th:nth-child(7),.wk-workspace #wk-positionen .wk-table td:nth-child(7),.wk-workspace #wk-positionen .wk-table th:nth-child(8),.wk-workspace #wk-positionen .wk-table td:nth-child(8),.wk-workspace #wk-positionen .wk-table th:nth-child(9),.wk-workspace #wk-positionen .wk-table td:nth-child(9),.wk-workspace #wk-positionen .wk-table th:nth-child(12),.wk-workspace #wk-positionen .wk-table td:nth-child(12){display:none}
  .wk-workspace #wk-positionen .wk-quick{position:sticky;top:72px;max-height:calc(100vh - 160px);overflow:auto}.wk-workspace #wk-positionen .wk-quick-sketch{height:170px;max-height:170px}}
@media(max-width:1079px){.wk-workspace #wk-positionen .wk-list-layout{grid-template-columns:minmax(0,1fr)}.wk-workspace #wk-positionen .wk-quick-sketch{height:170px;max-height:170px}}
/* Liste: eine Zeile für Erfassen, Suchen und Sortieren; Blockzeile ohne Auswahl nur der eine Knopf daneben, mit Auswahl eine eigene Zeile */
.wk-workspace #wk-positionen .wk-table-tools{flex:1 1 300px;justify-content:flex-end;flex-wrap:nowrap}
@media(pointer:fine){.wk-workspace #wk-positionen .wk-table-tools>input{flex:1 1 150px;min-width:120px;max-width:240px;height:32px;min-height:32px;font-size:13px}}
.wk-workspace #wk-positionen .wk-table-tools label{white-space:nowrap}
.wk-workspace .wk-table-head>.wk-bl-leiste{flex:1 1 100%;margin:0}
.wk-workspace .wk-table-head>.wk-bl-leiste.wk-bl-ohne-wahl{flex:0 0 auto;padding:0;border:0;background:none}
@media(pointer:fine){.wk-workspace .wk-bl-leiste .btn-sm{min-height:30px;height:30px;padding:0 9px;font-size:12.5px}}
/* Zeilen niedriger, damit mehr Positionen sichtbar sind */
.wk-workspace #wk-positionen .wk-table td{padding:7px 8px!important}
.wk-workspace #wk-positionen .wk-table th{padding:6px 8px;line-height:1.2}
.wk-workspace #wk-positionen .wk-table td small{white-space:normal!important}
.wk-workspace #wk-positionen .wk-table-scroll{min-height:200px}
.wk-workspace .wk-info-drei .wk-address{min-height:0;margin-bottom:0!important}
/* Summenleiste einzeilig: die Summe steht auch im Kopf, die Leiste darf die Liste nicht verdecken */
.wk-workspace #wk-summen{padding:6px 14px;gap:6px 14px;border-radius:6px}
.wk-workspace #wk-summen>div{align-items:baseline;gap:4px 16px}
.wk-workspace #wk-summen>div>span{display:inline-flex;align-items:baseline;gap:5px;font-size:12px}
.wk-workspace #wk-summen>div b{display:inline;font-size:13px}
.wk-workspace #wk-summen .wk-grand b{font-size:15px}
.wk-workspace .wk-quick h2{margin:0 0 6px}
@media(max-width:1060px){.wk-workspace .wk-info-grid.wk-info-drei{grid-template-columns:repeat(2,minmax(0,1fr))}.wk-workspace .wk-info-drei>#wk-card-kunde{grid-column:1/-1}}
@media(min-width:601px) and (max-width:1079px){.wk-workspace #wk-positionen .wk-quick{display:grid;grid-template-columns:minmax(200px,38%) minmax(0,1fr);column-gap:14px}.wk-workspace #wk-positionen .wk-quick>*{grid-column:2}.wk-workspace #wk-positionen .wk-quick>h2{grid-column:1/-1}.wk-workspace #wk-positionen .wk-quick>.wk-quick-sketch{grid-column:1;grid-row:2/span 8}}
@media(max-width:600px){.wk-workspace #wk-positionen .wk-quick-sketch{height:130px;max-height:130px}.wk-workspace #wk-positionen .wk-table-tools{flex-wrap:wrap}.wk-workspace .wk-einfuegen{flex-wrap:wrap}}
.wk-workspace #wk-positionen .wk-table-head{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 12px}
.wk-workspace #wk-positionen .wk-table-head>.wk-table-titel{flex:0 1 auto}
.wk-workspace .wk-quick-sketch svg{color:#111}
.entry-grund .btn-secondary{margin-left:8px}   /* 4.11.2026: «Zu klären» in der Positionsmaske */
@media(max-width:700px){#topbar.wk-mit-belegen>.search{flex:0 1 110px;min-width:60px}#topbar #wk-belege{flex:0 0 auto}#topbar .wk-produktionsstand{flex:0 0 auto}#topbar .wk-produktionsstand>summary{padding:3px 5px}#topbar .wk-ps{min-width:56px;max-width:92px}#topbar .ausgabe-knopf{padding:0 8px}}
@media(max-width:820px){.wk-workspace .wk-info-grid.wk-info-drei{grid-template-columns:1fr}}
/* Erste Spalte: Haken, Griff und Nummer dürfen sich auch mit weniger Rand nicht überdecken */
.wk-workspace #wk-positionen .wk-table td:first-child{min-width:64px;white-space:nowrap}
.wk-workspace #wk-positionen .wk-table td:first-child .wk-griff{position:static;display:inline-block;margin:0 3px;vertical-align:middle}
.wk-workspace #wk-positionen .wk-table td:first-child .wk-bl-wahl{vertical-align:middle;margin:0}
.wk-workspace #wk-positionen .wk-table td:first-child small{display:inline;margin-left:4px}

/* ---------- Ergänzungen 5.11.2026 (Fabian: Blöcke, Lieferart, Ansprechpartner) ---------- */
/* Alle Zeilen eines Blocks als eine Fläche mit Seitenlinie; Text- und Summenzeilen gehören dazu, andere Positionen nicht */
#wk-rows tr.wk-block-kopf,#wk-rows tr.wk-block-kopf:hover{background:#D5E4EF}
#wk-rows tr.wk-block-kopf td{border-top-color:#2F5F7F}
#wk-rows tr[data-im-block]:not([data-im-block=""]):not(.wk-text-intern),#wk-rows tr.wk-block-ende{background:#EDF3F8}
#wk-rows tr[data-im-block]:not([data-im-block=""]):not(.wk-text-intern):not(.wk-text-zeile):hover{background:#E0EAF2}
#wk-rows tr[data-im-block]:not([data-im-block=""]) td{border-bottom-color:#D3E0EA}
#wk-rows tr.wk-block-kopf td:first-child,#wk-rows tr.wk-block-ende td:first-child,#wk-rows tr[data-im-block]:not([data-im-block=""]) td:first-child{box-shadow:inset 4px 0 #2F5F7F}
#wk-rows tr.wk-block-ende td{height:8px;border-bottom:2px solid #2F5F7F}
/* Die gewählte Zeile bleibt auch im Block eindeutig */
#wk-rows tr.selected[data-im-block]:not([data-im-block=""]),#wk-rows tr.selected[data-im-block]:not([data-im-block=""]):hover{background:#BFD5E5}
#wk-rows tr.selected[data-im-block]:not([data-im-block=""]) td:first-child{box-shadow:inset 7px 0 #000}
.wk-block-summe{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:2px 18px;padding:5px 10px 5px 14px;font-size:13px;color:#30353b}
.wk-block-summe-teil{white-space:nowrap}
.wk-block-summe-teil b{margin-left:3px;color:#000;font-variant-numeric:tabular-nums}
.wk-im-block{font-size:12px;color:#4b5058;white-space:nowrap}
/* Blockfenster und Reiter «Preise»: dieselben Preisfelder */
.wk-bl-preis{margin:10px 0 6px;padding:8px 10px 6px;border:1px solid var(--kurth-line,#e4e4e4);border-radius:6px;min-width:0}
.wk-bl-preis legend{padding:0 4px;font-size:13px;font-weight:600}
.wk-bl-preis-art,.wk-bl-preis-felder{display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px}
.wk-bl-preis-felder{margin-top:8px}
.wk-bl-preis label{display:inline-flex;align-items:center;gap:6px;margin:0;font-size:13px;font-weight:400;white-space:nowrap}
.wk-bl-preis label[hidden]{display:none}
.wk-bl-preis input[type=radio],.wk-bl-preis input[type=checkbox]{width:16px;height:16px;margin:0;flex:0 0 auto}
.wk-bl-preis input[type=number]{width:110px;height:32px;padding:2px 6px;border:1px solid var(--kurth-line,#e4e4e4);border-radius:4px;font:inherit}
.wk-bl-preis-hinweis{margin:8px 0 2px;font-size:12.5px;line-height:1.35;color:#4b5058}
.wk-bl-preis-hinweis:empty{display:none}
.wk-btp-blockpreis .wk-bl-preis{margin:0;flex:1 1 100%}
.wk-btp-blockpreis label.wk-bl-preis-feld,.wk-btp-blockpreis label.wk-bl-preis-haken{white-space:nowrap}
.wk-preis-aus-block{margin:6px 0}
/* Leiste bei «Lieferung inkl. Montage»: alle Arten stehen offen */
.wk-einf-offen{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
/* Ansprechpartner in der Kundenkarte */
.wk-kontakt-wahl{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:2px 8px;margin-top:5px}
.wk-kontakt-wahl label{margin:0;font-size:12.5px;font-weight:500;color:#555}
.wk-kontakt-wahl select{grid-column:1/-1;grid-row:2;width:100%;min-width:0;height:30px;padding:2px 6px;border:1px solid var(--kurth-line,#e4e4e4);border-radius:4px;background:#fff;font:inherit;font-size:13px}
@media(pointer:fine){.wk-workspace .wk-kontakt-wahl .wk-card-btn{min-height:22px;height:22px;padding:0 7px;font-size:12px}}
#wk-card-kunde .wk-card-state:empty{display:none}
@media(pointer:coarse){.wk-kontakt-wahl select{height:44px}}
/* Ausgabe oben ohne Menü (Fabian 5.11.2026: «KEIN DROP DOWN immer alle oben sichtbar»): alle Knöpfe direkt in der Kopfzeile, bei wenig Platz mehrzeilig */
#topbar.wk-mit-belegen{flex-wrap:wrap;height:auto;min-height:72px;padding-top:8px;padding-bottom:8px;row-gap:6px}
#topbar.wk-mit-belegen>.search{flex:1 1 220px;max-width:320px}
#topbar #wk-belege,#topbar #ausgabe-card,#topbar #angebot-ausgabe{display:contents}
#topbar .ausgabe-zeile{display:flex;flex:0 1 auto;flex-direction:row;flex-wrap:wrap;align-items:stretch;gap:4px;height:auto;margin:0;padding:0;overflow:visible}
#topbar .ausgabe-beleg{display:grid;grid-template-columns:auto auto;column-gap:5px;flex:none;align-items:center;justify-items:start;width:auto;min-width:0;height:auto;min-height:36px;padding:2px 8px;border-radius:4px;line-height:1.15;text-align:left}
#topbar .ausgabe-haken{grid-row:1/3}
#topbar .ausgabe-beleg b{font-size:12.5px;font-weight:500;white-space:nowrap}
#topbar .ausgabe-beleg small{margin:0;font-size:10.5px;white-space:nowrap}
#topbar .ausgabe-aktionen,#topbar .ausgabe-papiere{display:flex;flex:0 1 auto;flex-wrap:wrap;align-items:stretch;gap:4px;margin:0;padding:0;border:0}
#topbar button.ausgabe-art,#topbar .ausgabe-erp-mail,#topbar .ausgabe-papier{display:inline-flex;flex-direction:row;align-items:center;gap:5px;width:auto;min-width:0;height:auto;min-height:36px;padding:2px 10px;border:1px solid #bbb;border-radius:4px;background:#fff;color:#111;font:inherit;font-size:12.5px;line-height:1.15;white-space:nowrap;cursor:pointer}
#topbar .ausgabe-art span{font-size:14px}
#topbar .ausgabe-art:not(:disabled):hover,#topbar .ausgabe-erp-mail:not(:disabled):hover,#topbar .ausgabe-papier:hover{border-color:#111}
#topbar .ausgabe-erp-mail:disabled{opacity:.45;cursor:not-allowed}
.ausgabe-wahl{margin:0}   /* nur für Vorleser (wk-sr-only): nennt die gewählten Belege */
@media(pointer:coarse){#topbar .ausgabe-beleg,#topbar button.ausgabe-art,#topbar .ausgabe-erp-mail,#topbar .ausgabe-papier{min-height:44px}}
/* Mehrzeilig wird die Leiste hoch: Sie bleibt oben stehen, wandert auf schmalen Bildschirmen aber mit der Seite, sonst verdeckt sie die Arbeit */
@media(max-width:1200px){#topbar.wk-mit-belegen{position:static}}
@media(max-width:700px){#topbar.wk-mit-belegen>.search{order:-1}#topbar.wk-mit-belegen>.menu-btn{order:-2}#topbar .wk-produktionsstand{order:-1}#topbar .ausgabe-beleg b,#topbar button.ausgabe-art,#topbar .ausgabe-erp-mail,#topbar .ausgabe-papier{white-space:normal}#topbar .ausgabe-zeile,#topbar .ausgabe-aktionen,#topbar .ausgabe-papiere{flex:1 1 100%}#topbar .wk-ps-zeile b,#topbar .wk-ps-jetzt{display:inline}#topbar.wk-mit-belegen>.search{flex:1 1 150px;min-width:0}}
/* Belegleiste im Auftrag (Fabian 6.11.2026: «dies hat mir früher besser gefallen», «wichti ist hier das drucken und ansehen drucken email pdf der papieren»): feste Gruppen statt freiem Umbruch.
   Erste Zeile Papiere und Suche, zweite Zeile Ausgabe und Produktion. Tablet hochkant: Suche und Produktion zuoberst, darunter Papiere und Ausgabe. Das Angebot behält seine eine Zeile. */
#topbar.wk-auftrag-kopf{display:grid;grid-template-columns:auto minmax(200px,1fr);grid-template-areas:"papiere suche" "unten unten";align-items:center;gap:6px 14px;height:auto;min-height:0;padding:8px 24px}
#topbar.wk-auftrag-kopf>.menu-btn{position:absolute;left:8px;top:8px}
#topbar.wk-auftrag-kopf>.search{grid-area:suche;width:100%;min-width:0;max-width:320px;flex:none;justify-self:end}
#topbar.wk-auftrag-kopf .kbd-hint{display:none}
#topbar.wk-auftrag-kopf>.page-title,#topbar.wk-auftrag-kopf>.top-actions:empty,#topbar.wk-auftrag-kopf>.top-tagline{display:none}
#topbar.wk-auftrag-kopf #wk-belege,#topbar.wk-auftrag-kopf #ausgabe-card{display:contents}
#topbar .ausgabe-gruppe{display:flex;align-items:center;gap:6px;min-width:0}
#topbar .ausgabe-gruppe-papiere{grid-area:papiere}
#topbar .ausgabe-unten{grid-area:unten;display:flex;align-items:center;gap:6px 14px;min-width:0}
#topbar .ausgabe-titel{flex:none;width:46px;font-size:11px;font-weight:600;color:var(--muted,#64748b)}
#topbar.wk-auftrag-kopf .ausgabe-zeile{flex:0 1 auto;flex-wrap:wrap;height:auto;padding:0;overflow:visible}
#topbar.wk-auftrag-kopf .ausgabe-aktionen{flex:none;flex-wrap:nowrap;margin:0;padding:0;border:0}
#topbar .ausgabe-bestellung{display:flex;flex:none;flex-direction:column;justify-content:center;min-height:36px;padding:2px 8px;border-left:1px solid var(--line2,#d7dade);background:transparent;color:inherit;text-decoration:none;line-height:1.15}
#topbar a.ausgabe-bestellung:hover b{text-decoration:underline}
#topbar .ausgabe-bestellung b{font-size:12px;font-weight:500;white-space:nowrap}
#topbar .ausgabe-bestellung small{margin:0;font-size:10.5px;color:var(--muted,#64748b);white-space:nowrap}
#topbar .ausgabe-beleg.aktiv{background:#111;border-color:#111;color:#fff;outline:0}
#topbar .ausgabe-beleg.aktiv small{color:#fff}
#topbar .ausgabe-beleg.aktiv .ausgabe-haken{border-color:#fff}
#topbar .ausgabe-art-wirkung{border-color:#111;font-weight:600}
#topbar .ausgabe-hinweis{flex:0 1 auto;min-width:0;max-width:130px;font-size:12px;line-height:1.15;color:var(--muted,#64748b)}
#topbar .ausgabe-hinweis:empty{display:none}
#topbar .wk-produktion-bereich{display:flex;flex:1 1 0;align-items:center;justify-content:flex-end;gap:6px;min-width:0;padding-left:14px;border-left:1px solid var(--line2,#d7dade)}
#topbar .wk-produktion-bereich .wk-produktionsstand{flex:0 1 auto;min-width:0}
#topbar .wk-produktion-bereich .wk-ps{min-width:120px}
#topbar .wk-produktion-bereich .ausgabe-papier{flex:none;white-space:nowrap}
@media(max-width:1130px){
  #topbar.wk-auftrag-kopf{grid-template-columns:minmax(180px,240px) minmax(0,1fr);grid-template-areas:"suche produktion" "papiere papiere" "unten unten"}
  #topbar.wk-auftrag-kopf>.search{max-width:none}
  #topbar.wk-auftrag-kopf .ausgabe-unten{display:contents}
  #topbar.wk-auftrag-kopf .ausgabe-gruppe-art{grid-area:unten}
  #topbar .wk-produktion-bereich{grid-area:produktion;padding-left:0;border-left:0}
}
@media(max-width:700px){
  #topbar.wk-auftrag-kopf{grid-template-columns:minmax(0,1fr);grid-template-areas:"suche" "produktion" "papiere" "unten";padding:8px 12px}
  #topbar.wk-auftrag-kopf>.search{margin-left:44px;width:auto;justify-self:stretch}
  #topbar .ausgabe-gruppe{flex-wrap:wrap}
  #topbar .ausgabe-titel{width:100%}
  #topbar.wk-auftrag-kopf .ausgabe-aktionen{flex:1 1 100%;flex-wrap:wrap;min-width:0}
  #topbar .ausgabe-hinweis{max-width:none}
  #topbar .wk-produktion-bereich{flex-wrap:wrap;justify-content:flex-start}
  #topbar .ausgabe-hinweis{white-space:normal}
}
.ausgabe-mail-angaben{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 12px;margin:0 0 12px}
.ausgabe-mail-angaben dt{font-weight:600}
.ausgabe-mail-angaben dd{margin:0;overflow-wrap:anywhere}
.ausgabe-mail-warnung{margin:0 0 12px;font-weight:600}
.ausgabe-mail-weg{display:grid;grid-template-columns:minmax(150px,auto) minmax(0,1fr);gap:4px 12px;align-items:center;margin-bottom:10px}
.ausgabe-mail-weg p{margin:0;font-size:12.5px;color:var(--muted,#64748b)}
@media(max-width:600px){.ausgabe-mail-weg{grid-template-columns:minmax(0,1fr)}}
#topbar .ausgabe-papier[hidden]{display:none}
