/* ==========================================================================
   PRINT-STYLES (A4-Simulation für Anträge & Quittungen)
   ========================================================================== */

body.print-mode { background: #e2e8f0; margin: 0; padding: 40px 0; font-family: 'Inter', sans-serif; }

.a4-paper { 
    background: white; 
    width: 210mm; /* A4 Breite */
    min-height: 297mm; /* A4 Höhe */
    margin: 0 auto; 
    padding: 25mm; /* Standard Brief-Ränder */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    box-sizing: border-box;
    position: relative;
    color: #000;
}

.print-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #000; padding-bottom: 15px; margin-bottom: 40px; }
.print-logo-text { font-size: 28px; font-weight: 800; color: #1e293b; letter-spacing: -1px; margin: 0;}
.print-logo-sub { font-size: 14px; color: #f59e0b; font-weight: bold; margin: 0; text-transform: uppercase;}
.print-meta { text-align: right; font-size: 11px; color: #333; line-height: 1.5; }

.print-address { margin-bottom: 50px; font-size: 14px; line-height: 1.6; }

.print-subject { font-size: 16px; font-weight: bold; margin-bottom: 30px; }
.print-body { font-size: 14px; line-height: 1.6; text-align: justify; font-family: 'IBM Plex Serif', serif;}

.print-section-title { font-family: 'Inter', sans-serif; font-weight: bold; font-size: 15px; margin: 25px 0 10px 0; text-decoration: underline; }

.print-signature { margin-top: 60px; }
.signature-line { width: 250px; border-top: 1px solid #000; margin-top: 50px; padding-top: 5px; font-size: 12px; }

/* Print Controls (Wird beim echten Drucken ausgeblendet) */
.print-controls { text-align: center; margin-bottom: 30px; position: sticky; top: 20px; z-index: 100;}
.btn-print { background: #10b981; color: white; border: none; padding: 15px 30px; font-size: 16px; font-weight: bold; border-radius: 30px; cursor: pointer; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4); transition: 0.2s;}
.btn-print:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6); }

/* WICHTIG: Das echte Print-Stylesheet (Wenn STRG+P gedrückt wird) */
@media print {
    body.print-mode { background: white; padding: 0; }
    .a4-paper { width: 100%; height: auto; margin: 0; padding: 15mm; box-shadow: none; border: none; }
    .print-controls, .print-hide { display: none !important; }
    @page { margin: 10mm; }
}

/* Kassenprüfung & EÜR Bericht (Versteckt Menüs und zeigt nur den Bericht auf A4) */
.report-card { box-shadow: none; border: none; padding: 0; max-width: 100%; }
.tabs, .filter-bar { display: none !important; }

/* DSGVO Auskunft Druck (Versteckt alles außer dem speziellen Print-Area DIV) */
body.dsgvo-print-mode * { visibility: hidden; }
body.dsgvo-print-mode #dsgvo-print-area, body.dsgvo-print-mode #dsgvo-print-area * { visibility: visible; }
body.dsgvo-print-mode #dsgvo-print-area { position: absolute; left: 0; top: 0; width: 100%; padding: 40px; font-family: Arial, sans-serif;}

/* Chamäleon-Druck-Modus: Sekretariats-Editor wird zum echten A4-Briefbogen */
.print-only-header, .print-only-footer, .print-only-marks { display: none; }

@media print {
    body { background: white; margin: 0; padding: 0; }
    .print-hide { display: none !important; }
    
    .composer-grid { display: block; margin: 0; }
    .main-editor { box-shadow: none; padding: 0; border: none; min-height: auto;}
    .editor-wrapper { border: none; }
    
    /* Offizieller Briefbogen (getriggert via body.print-official Klasse) */
    body.print-official .print-only-header { display: flex; justify-content: space-between; margin-bottom: 20mm; }
    body.print-official .print-only-footer { display: flex; justify-content: space-between; position: fixed; bottom: 15mm; left: 25mm; right: 20mm; border-top: 1px solid #bf111b; padding-top: 5mm; font-size: 8pt; color: #555; }
    body.print-official .print-only-marks { display: block; }
    body.print-official .content-area { padding-left: 25mm; padding-right: 20mm; padding-top: 20mm; }
    
    /* Faltmarken & Lochermarke */
    .fold-mark-1 { position: absolute; left: 0; top: 105mm; width: 5mm; border-top: 1px solid #ccc; }
    .fold-mark-2 { position: absolute; left: 0; top: 210mm; width: 5mm; border-top: 1px solid #ccc; }
    .punch-hole { position: absolute; left: 0; top: 148.5mm; width: 7mm; border-top: 1px solid #999; }
    
    /* Adress-Fenster & Briefkopf */
    .sender-small { font-size: 8pt; color: #555; text-decoration: underline; margin-bottom: 5mm; }
    .address-window { width: 85mm; height: 45mm; font-size: 11pt; line-height: 1.4; }
    .date-right { text-align: right; font-size: 11pt; margin-top: -15mm; margin-bottom: 15mm; }
    .cdu-logo { max-width: 45mm; }
}