/* ═══════════════════════════════════════════════════════════════════════
   Prüfprotokoll DIN EN 61439 – PDF / Print Layout
   SCHULZ Systemtechnik GmbH
   Format: DIN A4 Hochformat (210mm × 297mm)

   DEV-TOOL: Dieses Stylesheet wird bei Migration durch das
   Power Automate Flow F-06 PDF-Template ersetzt.
   Anpassungen hier werden direkt in der Druckvorschau sichtbar.

   Nutzbare Höhe A4: 297mm - 12mm oben - 10mm unten - 8mm Footer = ~267mm
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    --pp-red: #C90023;
    --pp-dark: #002230;
    --pp-grey: #6B7E8A;
    --pp-border: #C0C8D4;
    --pp-bg-alt: #F0F3F7;
    --pp-font: 'Segoe UI', system-ui, sans-serif;
}

/* ── Dev-Toolbar (nicht druckbar) ── */
.pp-dev-toolbar {
    display: flex; align-items: center; gap: 16px;
    padding: 10px 24px; background: #1a1a2e; color: #FFF;
    font-size: 13px; font-family: var(--pp-font);
    position: sticky; top: 0; z-index: 100;
}

/* ── DIN A4 Seite ── */
.pp-page {
    width: 210mm; min-height: 297mm;
    margin: 20px auto; padding: 12mm 15mm 25mm 15mm;
    background: #FFF; font-family: var(--pp-font);
    color: var(--pp-dark); font-size: 8pt; line-height: 1.35;
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
    position: relative; box-sizing: border-box;
}

/* ── Kopfbereich (kompakt) ── */
.pp-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 2mm;
}
.pp-header__title {
    font-size: 15pt; font-weight: 700; color: var(--pp-dark);
    letter-spacing: -0.3px;
}
.pp-header__subtitle {
    font-size: 9pt; color: var(--pp-grey); margin-top: 1px;
}
.pp-logo {
    height: 12mm; width: auto; object-fit: contain;
}
.pp-red-line {
    height: 2px; background: var(--pp-red); margin-bottom: 3mm;
}

/* ── Kopfdaten-Tabelle (kompakt) ── */
.pp-meta {
    width: 100%; border-collapse: collapse; margin-bottom: 3mm;
    font-size: 7.5pt;
}
.pp-meta td { padding: 1.5mm 2.5mm; border: 0.5px solid var(--pp-border); }
.pp-meta__label {
    width: 16%; font-size: 6.5pt; color: var(--pp-grey);
    background: var(--pp-bg-alt); font-weight: 600;
    vertical-align: top;
}
.pp-meta__value { width: 34%; font-weight: 500; }

/* ── Prüfsektionen (kompakt) ── */
.pp-section { margin-bottom: 2mm; }
.pp-section__title {
    font-size: 8pt; font-weight: 700; color: #FFF;
    background: var(--pp-red); padding: 1.2mm 2.5mm;
    margin-bottom: 0;
}
.pp-fields {
    width: 100%; border-collapse: collapse;
}
.pp-fields td {
    padding: 1.2mm 2.5mm; border: 0.5px solid var(--pp-border);
    font-size: 7.5pt;
}
.pp-fields__label {
    width: 40%; color: var(--pp-grey); background: var(--pp-bg-alt);
}
.pp-fields__value {
    width: 60%; font-weight: 500;
}

/* ── Signaturblock (kompakt) ── */
.pp-signature {
    display: flex; gap: 15mm; margin-top: 4mm; padding-top: 3mm;
    border-top: 1px solid var(--pp-border);
}
.pp-signature__block { flex: 1; }
.pp-signature__label {
    font-size: 6.5pt; color: var(--pp-grey); font-weight: 600;
    margin-bottom: 8mm;
}
.pp-signature__line {
    border-bottom: 1px solid var(--pp-dark);
    min-height: 6mm; font-size: 8pt; font-weight: 500;
    padding-bottom: 1mm;
}
.pp-signature__date {
    font-size: 6.5pt; color: var(--pp-grey); margin-top: 1.5mm;
}

/* ── Fußzeile (fixiert 15mm vom unteren Seitenrand) ── */
.pp-footer {
    position: absolute; bottom: 15mm; left: 15mm; right: 15mm;
    display: flex; justify-content: space-between;
    font-size: 6.5pt; color: var(--pp-grey);
    border-top: 0.5px solid var(--pp-border);
    padding-top: 2mm;
}

/* ── Papierformat-Varianten (Vorschau) ── */
.pp-page--a4-landscape {
    width: 297mm; min-height: 210mm;
}
.pp-page--a3 {
    width: 297mm; min-height: 420mm;
}

/* ═══ PRINT-SPEZIFISCH ═══ */

/* Standard: A4 Hochformat */
@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;
    }

    .pp-page {
        margin: 0; padding: 12mm 15mm 25mm 15mm;
        box-shadow: none; width: 100%;
        min-height: auto;
        page-break-after: always;
    }

    /* Sektionen nicht umbrechen */
    .pp-section { page-break-inside: avoid; }
    .pp-signature { page-break-inside: avoid; }
}
