/* ===========================================================================
   AV-Board — PPS · css/herstellerdoku.css
   Herstellerunterlagen prüfen (#/herstellerdoku). Die hd-*-Stile standen bis
   Lauf 10 in style.css und sind unverändert hierher umgezogen (P-00); die
   Datei lädt direkt nach style.css, damit die Kaskade gleich bleibt.
   =========================================================================== */

/* ── Herstellerunterlagen prüfen (DMS-Schreibweg AP6, FB-2026-028) ──────── */
.hd-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); margin-bottom: var(--sp-3); }
.hd-kopf h1 { margin: 0; font-size: var(--fs-5); }
.hd-kopf .unterzeile { color: var(--text-muted); font-size: var(--fs-3); }
.hd-hinweis { flex-basis: 100%; color: var(--text-muted); font-size: var(--fs-2); }
.hd-zeile-badges { display: inline-flex; gap: var(--sp-1); flex-wrap: wrap; justify-content: flex-end; }
.hd-ablage { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; padding: var(--sp-1) 0; }
.hd-ablage-aktion { display: inline-flex; gap: var(--sp-1); margin-left: auto; }
.hd-filter { display: flex; gap: var(--sp-1); flex-wrap: wrap; }
.hd-suche { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.hd-suche label { font-weight: 600; font-size: var(--fs-3); }
.hd-suche input { width: 16rem; max-width: 100%; padding: var(--sp-1) var(--sp-2); border: 1px solid var(--border); border-radius: var(--radius); font: inherit; background: var(--surface); color: var(--text); }
.hd-auftraege { flex-basis: 100%; display: flex; flex-direction: column; gap: var(--sp-1); }
.hd-auftraege:empty { display: none; }
.hd-auftrag { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.hd-tag { flex-basis: 100%; color: var(--text-muted); }
.hd-tag:empty { display: none; }
.hd-raster { display: grid; grid-template-columns: minmax(300px, 30fr) minmax(0, 70fr); gap: var(--sp-3); align-items: start; }
.hd-liste { display: flex; flex-direction: column; gap: var(--sp-1); max-height: calc(100vh - 170px); overflow-y: auto; padding-right: var(--sp-1); }
.hd-zeile { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: var(--sp-2) var(--sp-2); cursor: pointer; }
.hd-zeile:hover, .hd-zeile:focus-visible { border-color: var(--primary); outline: none; }
.hd-zeile.aktiv { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.hd-zeile-kopf { display: flex; gap: var(--sp-2); align-items: baseline; flex-wrap: wrap; }
.hd-zeile .klein, .hd-vorschau .klein { color: var(--text-muted); font-size: var(--fs-2); margin-top: 2px; }
.hd-zeile-fuss { display: flex; gap: var(--sp-2); align-items: center; margin-top: var(--sp-1); }
/* Herstellerunterlagen — drei Knöpfe, Dokumentart, Bildvorschau (Plan Herstellerdoku-Medien, 01.10.2026) */
.hd-art { font: inherit; font-weight: 600; padding: 2px var(--sp-1); border: 1px solid var(--border);
          border-radius: var(--radius-s); background: var(--surface); color: inherit; max-width: 100%; }
.hd-art.unklar { border-color: var(--accent); }
.hd-auswahl { display: inline-flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.hd-auswahl label { display: inline-flex; align-items: center; gap: var(--sp-1); font-weight: 600; cursor: pointer; }
.hd-auswahl input { width: 18px; height: 18px; accent-color: var(--st-done); }
.hd-auswahl input:disabled + * , .hd-auswahl label:has(input:disabled) { opacity: .6; cursor: not-allowed; }
.hd-bild { display: block; max-width: 100%; max-height: 70vh; margin: var(--sp-2) auto; object-fit: contain;
           background: var(--zeichnung-grund); border-radius: var(--radius-s); }
.hd-vorschau { position: sticky; top: 8px; border: 1px solid var(--border); border-radius: var(--radius);
               background: var(--surface); padding: var(--sp-2); min-height: 60vh; }
.hd-vorschau-kopf { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; padding: 2px var(--sp-1) var(--sp-2); }
.hd-vorschau-aktion { margin-left: auto; display: inline-flex; gap: var(--sp-2); align-items: center; }
.hd-seiten { height: calc(100vh - 170px); overflow-y: auto; background: var(--bg); border-radius: var(--radius-s); padding: var(--sp-2); }
.hd-pin1 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding: var(--sp-1) 2px var(--sp-2); }
.hd-pin1 .hd-pin1-aktion { margin-left: auto; display: inline-flex; gap: var(--sp-1); }
.hd-pin1 .hd-pin1-beleg { flex: 1 1 220px; min-width: 160px; padding: var(--sp-1) var(--sp-2); border: 1px solid var(--line-strong, var(--border)); border-radius: var(--radius-s); background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-3); }
/* Pin-1-Angaben (P-2, AL 10.10.2026): Seite, Kammer, Blickrichtung */
.hd-pin1 .hd-pin1-feld { flex: 0 1 140px; min-width: 90px; padding: var(--sp-1) var(--sp-2); border: 1px solid var(--line-strong, var(--border)); border-radius: var(--radius-s); background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-3); }
.hd-pin1 .hd-pin1-zahl { flex-basis: 70px; min-width: 60px; }
.hd-pin1 .hd-pin1-hinweis { flex-basis: 100%; font-size: var(--fs-2); }
/* Tastaturweg für Pin 1 eingeklappt wie im Portal (AP-8b3, UX N-03) */
.hd-pin1 .hd-pin1-ohnemaus { flex-basis: 100%; }
.hd-pin1 .hd-pin1-ohnemaus > summary { cursor: pointer; min-height: 24px; display: inline-flex; align-items: center; }
.hd-pin1 .hd-pin1-ohnemaus-feld { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding-top: var(--sp-1); }
.hd-pin1 .hd-pin1-meldung:empty { display: none; }
/* Steckseite (AP-9): leise Zeile mit Link in die Werkbank des Herstellerportals (neuer Tab), nie eine Frage */
.hd-pin1 .hd-pin1-steckseite-link { margin-left: var(--sp-1); text-decoration: underline; text-underline-offset: 2px; display: inline-block; min-height: 24px; line-height: 24px; }
.hd-seiten > canvas { display: block; margin: 0 auto var(--sp-2); background: var(--zeichnung-grund); box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.hd-quellen { display: inline-flex; gap: var(--sp-1); align-items: center; font-size: var(--fs-3); }
.hd-quellen .btn { padding: 2px var(--sp-2); }
.hd-nummern { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); margin: var(--sp-1) 0 1px; }
.hd-nr-label { color: var(--text-muted); font-size: var(--fs-1); font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: var(--label-spur); margin-right: var(--sp-1); }
.hd-vorschau-kopf .hd-nummern { margin: 0; }
/* ── Lauf 10 (P-04): Recherche-Leiste, Suchaufträge ausblendbar, Dokument-Zeichen ── */
/* FB-2026-072: „Artikelnr. recherchieren“ zentral und als Primärknopf */
.hd-recherche { justify-content: center; gap: var(--sp-2) var(--sp-3); margin: var(--sp-1) auto var(--sp-3); padding: var(--sp-3) var(--sp-4);
                max-width: 760px; border: 1px solid var(--primary); border-radius: var(--radius);
                background: var(--primary-soft); }
.hd-recherche label { font-size: var(--fs-4); font-weight: 600; color: var(--text); }
.hd-recherche input { width: 22rem; font-size: var(--fs-4); padding: var(--sp-2) var(--sp-3); }
.hd-recherche .btn.primaer { font-size: var(--fs-4); padding: var(--sp-2) var(--sp-4); }
/* FB-2026-057: Suchaufträge lassen sich ein- und ausblenden */
.hd-auftraege-rahmen { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-1); margin: 0 0 var(--sp-3); }
.hd-auftraege-rahmen:has(> .hd-auftraege:empty) { display: none; }
.hd-auftraege-rahmen.zu > .hd-auftraege { display: none; }
.hd-auftraege-schalter { align-self: flex-end; }
.hd-grund { color: var(--text-muted); font-size: var(--fs-1); max-width: 16rem; }
.hd-zuordnung-hinweis { margin: 0 0 var(--sp-2); padding: var(--sp-1) var(--sp-2); border-left: 3px solid var(--warn);
                        background: var(--warn-soft); border-radius: var(--radius-s); color: var(--text); }
/* FB-2026-063: Unterlagen links als beschriftete Dokument-Zeichen, Vorschau rechts kleiner */
.hd-raster-kacheln { grid-template-columns: minmax(280px, 55fr) minmax(320px, 45fr); }
.hd-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: var(--sp-2);
              align-content: start; max-height: calc(100vh - 230px); overflow-y: auto; padding: 2px var(--sp-1) 2px 2px; }
.hd-kacheln > .leer { grid-column: 1 / -1; }
.hd-kachel { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); text-align: center;
             padding: var(--sp-2) var(--sp-1) var(--sp-2); border: 1px solid var(--border); border-radius: var(--radius);
             background: var(--surface); cursor: pointer; min-width: 0; }
.hd-kachel:hover, .hd-kachel:focus-visible { border-color: var(--primary); outline: none; }
.hd-kachel.aktiv { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.hd-dok-zeichen { position: relative; display: inline-flex; flex-direction: column; justify-content: flex-end;
                  align-items: center; width: 44px; height: 56px; padding-bottom: var(--sp-1);
                  border: 2px solid var(--primary); border-radius: var(--radius-s) var(--radius-l) var(--radius-s) var(--radius-s); background: var(--surface-alt); }
.hd-dok-zeichen::after { content: ""; position: absolute; top: -2px; right: -2px; width: 14px; height: 14px;
                         border-left: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
                         border-radius: 0 var(--radius) 0 var(--radius-s); background: var(--primary-soft); }
.hd-dok-zeichen.hd-dok-unklar, .hd-dok-zeichen.hd-dok-unklar::after { border-color: var(--accent); }
.hd-dok-kuerzel { font-family: var(--font-display, inherit); font-weight: 700; font-size: var(--fs-4); color: var(--primary-strong, var(--text)); }
.hd-dok-format { font-family: var(--font-mono, monospace); font-size: var(--fs-1); color: var(--text-muted); letter-spacing: .04em; }
.hd-kachel-typ { font-weight: 600; font-size: var(--fs-2); color: var(--text); }
.hd-kachel-name { font-size: var(--fs-1); color: var(--text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-kachel-datum { font-size: var(--fs-1); color: var(--text-muted); }
.hd-kachel-stand { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-1); }
.hd-kachel-stand .badge, .hd-kachel > .badge { font-size: var(--fs-1); }
.hd-vorschau-klein { min-height: 50vh; }
.hd-vorschau-klein .hd-seiten { height: calc(100vh - 260px); }
@media (max-width: 900px) {
  .hd-raster-kacheln { grid-template-columns: 1fr; }
  .hd-kacheln { max-height: none; }
  .hd-recherche input { width: 100%; }
  .hd-raster { grid-template-columns: 1fr; }
  .hd-liste { max-height: none; }
  .hd-vorschau { position: static; }
  .hd-seiten { height: 70vh; }
}

/* Löschdialog (Portal E-F3): Pflichtklasse als Auswahlfeld, Freitext optional */
.hd-loesch-dialog form { display: flex; flex-direction: column; gap: var(--sp-1); }
.hd-loesch-dialog label { font-weight: 600; margin-top: var(--sp-1); }
.hd-loesch-dialog select, .hd-loesch-dialog input[type="text"] { font: inherit; padding: var(--sp-1) var(--sp-2);
    border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); }

/* Verweisseite ins Herstellerportal (AP-14, Plan UX HDR-Niveau): Seitenkopf links wie jede Ansicht,
   Reiter darunter, Inhalt als leerer Zustand mit einer Handlung; Erläuterung als Tooltip an der h1. */
.hd-verweis { max-width: 960px; }
.hd-verweis .seitenkopf { margin-bottom: var(--sp-2); }
.hd-verweis a.btn { text-decoration: none; display: inline-flex; align-items: center; gap: var(--sp-1); }
.hd-verweis .hd-reiter { margin: 0 0 var(--sp-3); }
.hd-verweis .hd-reiter a.reiter { text-decoration: none; min-height: 24px; display: inline-flex; align-items: center; }
.hd-verweis .leer-zustand { text-align: left; margin: 0; }
a.hd-chip { text-decoration: none; display: inline-block; }
a.hd-marke-chip { text-decoration: none; margin-right: var(--sp-1); white-space: nowrap; }   /* AP-11: Marke fertig / fehlt am Chip */

/* P7 (Kernplan „HDR-Suche autonom“, Z-1/Z-2): Stand je Position in der Spalte „Unterlagen“ der Stückliste. Zu ist es je
   eine Zeile (vier Zeichen der Bausteine, „meintest du?“ als Marke); Grund, Liste, Link und Knöpfe stehen aufgeklappt
   darunter. Die Stücklistenzeile wird dadurch höchstens eine Textzeile höher. */
.hd-bst-platz:empty, .hd-pos-stand-platz:empty { display: none; }
.hd-bst-platz, .hd-pos-stand-platz { margin-top: 2px; line-height: 1.25; white-space: normal; text-align: left; }
.hd-bst-klappe > summary, .hd-pos-stand > summary {
    display: inline-flex; align-items: center; min-height: 24px; cursor: pointer; list-style: none; white-space: nowrap;
}
.hd-bst-klappe > summary::-webkit-details-marker, .hd-pos-stand > summary::-webkit-details-marker { display: none; }
.hd-bst-klappe > summary:focus-visible, .hd-pos-stand > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; border-radius: var(--radius-s); }
.hd-bst-marken { display: inline-flex; gap: 2px; }
.hd-bst-m { min-width: 18px; justify-content: center; padding: 0 2px; line-height: 18px; }
/* Aufgeklappt liegt der Inhalt über den Nachbarspalten (rechtsbündig an der Zelle): die Zeile wächst nicht, die Spalte bleibt schmal. */
.hd-bst-klappe, .hd-pos-stand { position: relative; }
.hd-bst-inhalt, .hd-pos-stand-inhalt {
    position: absolute; right: 0; top: 100%; z-index: var(--z-menue); width: max-content; min-width: 14em; max-width: 24em;
    padding: var(--sp-1) var(--sp-2); border: 1px solid var(--line); border-radius: var(--radius-s);
    background: var(--surface); color: var(--ink); box-shadow: 0 4px 12px rgba(0, 0, 0, .18); white-space: normal;
}
.hd-bst-hinweis { margin: var(--sp-1) 0; color: var(--ink); }
.hd-bst-liste { list-style: none; margin: var(--sp-1) 0; padding: 0; display: grid; gap: 2px; }
.hd-bst-quellen > summary { cursor: pointer; min-height: 24px; display: inline-flex; align-items: center; }
.hd-bst-quellen ul { margin: 2px 0 0; padding-left: var(--sp-3); }
.hd-bst-inhalt a { display: inline-flex; align-items: center; min-height: 24px; margin-right: var(--sp-2); }
.hd-bst-suche, .hd-pos-stand-knoepfe .btn { margin-top: 2px; }
.hd-pos-stand-knoepfe { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-top: var(--sp-1); }
