/*
  workspace-bento-angebote.css — Werkzeug „Angebots-Assistent“ (Beta-Ring; Logik: js/workspace-bento-angebote.js + -detail.js).
  Kurzbeschreibung (für Laien): Formulare im Stil „Neue Aufgabe – Entwurf“: Beschriftung über dem Feld (.av-feld), weiße Felder
  (.a4h-field), Pillen-Knöpfe .av-k / Hauptknopf .av-k.haupt aus css/workspace-bento-aufgaben-ansicht.css. Hier steht nur: Rand der
  Fläche, die Positionen-Tabelle (Stand ganz links als farbiges Wort), Summen rechts, Ablage-Zone für Dateien, Postfach-Liste.
  Abstände nur aus der Leiter, Farben nur aus marke.css bzw. den Bento-Variablen; hell und dunkel. Nie nach rechts scrollen.
*/
/* marke-ausnahme: Bento-Ansicht wie im AIOS (Bento-Variablen, Pillen-Knöpfe wie im Aufgaben-Entwurf) */
:root.wb-menue-modus #bsBereich[data-bereich="angebote"] .ang-wss { padding: 0; }
:root.wb-menue-modus #bsBereich[data-bereich="angebote"] .ang-wss > .wss-detail { overflow-y: auto; overflow-x: hidden; min-height: 0; box-sizing: border-box; }
:root.wbm-links #bsBereich[data-bereich="angebote"] .ang-wss { --wbm-luft: 0px; column-gap: 0; }

.ang { --av-blau: var(--marke-nav-blau); color: var(--bs-text, var(--marke-text)); container: ang / inline-size; }
.ang svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ang :where(button) { font: inherit; cursor: pointer; }
.ang .av-k { gap: 8px; white-space: nowrap; }
.ang .av-k:focus-visible { outline: 2px solid var(--marke-nav-blau); outline-offset: 2px; }
.ang .av-entwurf { max-width: 960px; padding: 24px; box-sizing: border-box; }
.ang .av-leise { margin: 0; font-size: 13px; line-height: 1.5; }
.ang .av-feld textarea.a4h-field { resize: vertical; min-height: 64px; }
.ang .av-feld small { font-size: 12px; font-weight: 400; }
.ang-start { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 560px; padding: 24px; }
.ang-start h2 { margin: 0; font-size: 20px; font-weight: 800; }

/* Neues Angebot: Anfrage rein */
.ang-eingabe { position: relative; display: block; }
.ang-eingabe .ang-text { min-height: 220px; padding-right: calc(var(--marke-sp-4, 16px) * 3); }
.ang-mikro { position: absolute; top: 8px; right: 8px; }
.ang-quellen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ang-neu.ziel .ang-text { border-color: var(--marke-nav-blau); border-style: dashed; background: var(--marke-nav-kachel); }
.ang-warte { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--marke-nav-kachel); font-size: 13px; font-weight: 600; }
.ang-warte[hidden] { display: none; }
.ang-mailmarke { font-style: italic; }
.ang-postfach { border: 1px solid var(--bs-linie, var(--marke-linie)); border-radius: 12px; padding: 8px; background: var(--bs-karte, var(--marke-flaeche)); }
.ang-postfach[hidden] { display: none; }
.ang-pf-titel { padding: 4px 8px 8px; font-size: 12px; font-weight: 600; color: var(--bs-leise, var(--marke-text-2)); }
.ang-pf-liste { display: flex; flex-direction: column; max-height: 280px; overflow-y: auto; }
.ang-pf-mail { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px; border: 0; border-radius: 9px; background: none; text-align: left; color: inherit; }
.ang-pf-mail:hover { background: var(--marke-nav-kachel); }
.ang-pf-mail b { font-size: 13px; font-weight: 600; }
.ang-pf-mail span { font-size: 12px; color: var(--bs-leise, var(--marke-text-2)); }
.ang-pf-leer { padding: 8px; }

/* Angebot bearbeiten */
.ang-blatt { gap: 16px; }
.ang-kopf { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ang-kopf h2 { min-width: 0; overflow-wrap: anywhere; }
.ang-nummer { font-size: 13px; font-weight: 600; color: var(--bs-leise, var(--marke-text-2)); font-variant-numeric: tabular-nums; }
.ang-info { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; border-radius: 12px; background: var(--marke-nav-kachel); font-size: 13px; }
.ang-info p { margin: 0; }
.ang-teil { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 1px solid var(--bs-linie, var(--marke-linie)); }
.ang-teil h3 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 13px; font-weight: 700; }
.ang-crm { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--marke-ok); }
.ang-fragen ul { margin: 8px 0 0; padding-left: 16px; display: flex; flex-direction: column; gap: 4px; }

/* Positionen: Stand ganz links */
.ang-pos-huelle { overflow-x: clip; }   /* clip statt hidden: kein eigener Scrollbereich, sonst klebt der Kopf nicht (Ralph 21.11.2026) */
.ang-pos { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.ang-pos th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-leise, var(--marke-text-3)); padding: 8px 4px; border-bottom: 1px solid var(--bs-linie, var(--marke-linie-stark)); }
.ang-pos thead th { position: sticky; top: 0; z-index: 1; background: var(--bs-karte, var(--marke-flaeche)); box-shadow: inset 0 -1px 0 var(--bs-linie, var(--marke-linie-stark)); }   /* Kopf bleibt beim Scrollen stehen (Ralph 21.11.2026) */
.ang-pos td { padding: 4px; border-bottom: 1px solid var(--bs-linie, var(--marke-linie)); vertical-align: top; }
.ang-pos .a4h-field { width: 100%; box-sizing: border-box; min-width: 0; }
.ang-pos th.ang-s, .ang-pos td.ang-s { width: 116px; }
.ang-pos th:nth-child(3), .ang-pos th:nth-child(5) { width: 96px; }
.ang-pos th:nth-child(4) { width: 96px; }
.ang-pos th:nth-child(6) { width: 108px; }
.ang-pos th:last-child { width: 40px; }
.ang-pl .ang-pos th:nth-child(1) { width: 120px; }
.ang-pl .ang-pos th:nth-child(2) { width: auto; }
.ang-pl .ang-pos th:nth-child(3) { width: 96px; }
.ang-pl .ang-pos th:nth-child(4) { width: 112px; }
.ang-pos th.ang-zahl-k, .ang-pos .ang-zahl, .ang-g { text-align: right; font-variant-numeric: tabular-nums; }
.ang-g { padding-top: 12px; white-space: nowrap; font-weight: 600; }
.ang-pos textarea.a4h-field.ang-bez { resize: none; field-sizing: content; min-height: 36px; max-height: 160px; }
.ang-nr { display: block; padding: 4px 0 0 4px; font-size: 11px; color: var(--bs-leise, var(--marke-text-3)); }
.ang-st { display: inline-block; padding-top: 12px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ang-st.rot { color: var(--marke-gefahr); }
.ang-st.gelb { color: var(--marke-warn); }
.ang-st.gruen { color: var(--marke-ok); }
.ang-pos .a4h-field.fehlt { border-color: var(--marke-gefahr); }
.ang-pos .a4h-field.fehlt::placeholder { color: var(--marke-gefahr); font-weight: 600; opacity: 1; }
.ang-x { margin-top: 4px; }
.ang-pos-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.ang-pos-knoepfe [hidden] { display: none; }

.ang-summen { align-self: flex-end; width: min(320px, 100%); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.ang-sz { display: flex; justify-content: space-between; gap: 12px; }
.ang-sz b { font-weight: 600; font-variant-numeric: tabular-nums; }
.ang-sz-b { padding-top: 8px; border-top: 2px solid var(--bs-text, var(--marke-text)); font-size: 15px; }
.ang-sz-b b { font-weight: 800; }
.ang-sz-fehlt { margin: 4px 0 0; color: var(--marke-gefahr); font-size: 12px; font-weight: 600; }

.ang-fuss { flex-wrap: wrap; align-items: center; }
.ang-fuss .ang-weg { margin-right: auto; color: var(--marke-gefahr); }
.ang-fuss .ang-weg:hover { border-color: var(--marke-gefahr); color: var(--marke-gefahr); }
.ang-stand { font-size: 12px; color: var(--bs-leise, var(--marke-text-2)); }
.ang-stand.rot { color: var(--marke-gefahr); }
.ang-ergebnis { margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--marke-nav-kachel); font-size: 13px; line-height: 1.5; }
.ang-ergebnis[hidden] { display: none; }
.ang .av-fehler[hidden] { display: none; }

/* schmal (Vorschau, Handy): Einheit und Gesamt rücken zusammen, Felder untereinander */
@container ang (max-width: 640px) {
  .ang .av-entwurf { padding: 16px; }
  .ang .av-feld-paar { grid-template-columns: minmax(0, 1fr); }
  .ang-pos th:nth-child(4), .ang-pos td:nth-child(4) { display: none; }
  .ang-pos th.ang-s, .ang-pos td.ang-s { width: 88px; }
  .ang-pos th:nth-child(6) { width: 88px; }
}
