/* ═══════════════════════════════════════════════════════════════════════
   Aufmaßliste – PDF / Print Layout (Mehrseitig mit Seitennavigation)
   SCHULZ Systemtechnik GmbH | DIN A4 Hochformat
   ═══════════════════════════════════════════════════════════════════════ */

.am-print { font-family: 'Segoe UI', system-ui, sans-serif; }

/* ── A4-Seite ── */
.am-page {
    width: 210mm; height: 297mm;
    margin: 20px auto; padding: 12mm 12mm 15mm 12mm;
    background: #FFF; color: #002230;
    font-size: 7.5pt; line-height: 1.3;
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* Bildschirm: nur aktuelle Seite sichtbar */
.am-page--hidden { display: none; }

/* ── Gruppen ── */
.am-gruppe { margin-bottom: 3mm; }
.am-gruppe__title {
    font-size: 8pt; font-weight: 700; color: #FFF;
    background: #C90023; padding: 1.2mm 2.5mm;
}

/* ── Positionstabelle ── */
.am-table { width: 100%; border-collapse: collapse; font-size: 7pt; }
.am-table thead { display: table-header-group; }
.am-table th {
    background: #F0F3F7; color: #6B7E8A;
    font-weight: 600; font-size: 6.5pt;
    padding: 1.2mm 1.5mm; border: 0.5px solid #C0C8D4;
    text-align: left;
}
.am-table td {
    padding: 1mm 1.5mm; border: 0.5px solid #C0C8D4; font-size: 7pt;
}
.am-table tbody tr:nth-child(even) { background: #FAFBFC; }
.am-table__summe td {
    background: #F0F3F7; border-top: 1px solid #C0C8D4; font-size: 7pt;
}

/* Spaltenbreiten */
.am-col-nr    { width: 12%; }
.am-col-bez   { width: 28%; }
.am-col-einh  { width: 6%; text-align: center; }
.am-col-m     { width: 6%; text-align: right; }
.am-col-ges   { width: 7%; text-align: right; font-weight: 600; }
.am-col-preis { width: 8%; text-align: right; }
.am-col-betrag { width: 10%; text-align: right; font-weight: 600; }

/* ── Gesamtsumme ── */
.am-total {
    display: flex; justify-content: space-between; align-items: center;
    padding: 2.5mm 3mm; margin-top: 2mm;
    background: #002230; color: #FFF;
    font-size: 9pt; font-weight: 700; border-radius: 1mm;
}
.am-total__value { font-size: 10pt; }

/* ── Bemerkungen ── */
.am-bemerkung {
    margin-top: 3mm; padding: 2mm 3mm;
    border: 0.5px solid #C0C8D4; border-radius: 1mm;
}
.am-bemerkung__label { font-size: 6.5pt; color: #6B7E8A; font-weight: 600; margin-bottom: 1mm; }
.am-bemerkung__text { font-size: 7.5pt; white-space: pre-wrap; }

/* ── Fußzeile (absolut unten auf jeder Seite) ── */
.am-footer {
    position: absolute; bottom: 10mm; left: 12mm; right: 12mm;
    display: flex; justify-content: space-between;
    font-size: 6pt; color: #6B7E8A;
    border-top: 0.5px solid #C0C8D4;
    padding-top: 2mm;
}

/* ═══ DRUCK: alle Seiten anzeigen ═══ */
@media print {
    @page { size: A4 portrait; margin: 0; }

    html, body { margin: 0 !important; padding: 0 !important; background: #FFF !important; }
    .no-print, .pp-dev-toolbar { display: none !important; }

    /* Alle Seiten sichtbar machen */
    .am-page--hidden { display: block !important; }

    .am-page {
        margin: 0; box-shadow: none; width: 100%; height: auto;
        min-height: 297mm;
        page-break-after: always;
        overflow: visible;
    }
    .am-page:last-child { page-break-after: auto; }

    .am-table tbody tr { page-break-inside: avoid; }
    .pp-signature { page-break-inside: avoid; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Stücknachweis-Protokoll Print-Erweiterungen
   (nutzt .am-page, .pp-header, .pp-meta, .pp-fields aus den bestehenden Stylesheets)
   ═══════════════════════════════════════════════════════════════════════ */

.snp-print-section { margin-bottom: 3mm; }
.snp-print-section__title {
    font-size: 8pt; font-weight: 700; color: #FFF;
    background: #C90023; padding: 1.2mm 2.5mm;
}

.snp-print-pruef { width: 100%; border-collapse: collapse; font-size: 7pt; }
.snp-print-pruef th {
    background: #F0F3F7; color: #6B7E8A;
    font-weight: 600; font-size: 6.5pt;
    padding: 1.2mm 1.5mm; border: 0.5px solid #C0C8D4;
    text-align: left;
}
.snp-print-pruef td {
    padding: 1mm 1.5mm; border: 0.5px solid #C0C8D4; font-size: 7pt;
}
.snp-print-pruef tbody tr:nth-child(even) { background: #FAFBFC; }
