@media print {
    /* Hide the app container completely */
    body * {
        visibility: hidden;
    }

    /* Print page setups */
    @page {
        size: A4 portrait;
        margin: 15mm; /* Professional margin for full A4 document */
    }

    body {
        margin: 0;
        padding: 0;
        background: white !important;
    }

    /* Make print area visible */
    #print-area {
        visibility: visible;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        display: block !important;
    }

    #print-area * {
        visibility: visible;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* EACH SLIP NOW BECOMES A FULL, PROFESSIONAL A4 PAGE */
    #print-area .slip {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 260mm; /* Exactly fills printable area height */
        margin: 0 0 10mm 0 !important;
        padding: 10mm; /* Large, comfortable padding */
        border: 4px solid #1e7b38 !important;
        box-shadow: none !important;
        border-radius: 6px; 
        background: white !important;
        page-break-after: always; /* 1 Slip Per Page */
        box-sizing: border-box;
    }

    /* Strip background from weight-box but keep it looking clean */
    .weight-box { border: none !important; background-color: transparent !important; padding: 0; margin: 0; }

    /* Elegant typography tuned for standard elegant A4 reading, not excessively large */
    #print-area .slip-super-header { font-size: 11pt; padding: 5px 0; font-weight: bold; text-align: center; color: #1e7b38; }
    
    #print-area .slip-main-title { padding: 12px 0; margin: 0; background: #1e7b38 !important; border-radius: 4px; text-align: center; }
    #print-area .slip-main-title h2 { font-size: 24pt; margin: 0; letter-spacing: 1px; color: white !important; text-shadow: 1px 1px 2px rgba(0,0,0,0.2); }
    
    #print-area .slip-address { font-size: 12pt; padding: 10px 0 15px 0; line-height: 1.4; border-bottom: 2px solid #1e7b38; text-align: center; color: #1e7b38; font-weight: bold; }
    
    #print-area .slip-sub-header { border-bottom: 2px solid #1e7b38; padding: 0; margin: 0; display: flex; align-items: stretch; margin-bottom: 10px; }
    
    /* Reduced TON BOX */
    #print-area .ton-box { width: 100px; border-right: 2px solid #1e7b38; padding: 10px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #1e7b38 !important; color: white !important; }
    #print-area .ton-number { font-size: 28pt; margin: 0; line-height: 1; color: white !important; font-weight: 900; }
    #print-area .ton-text { font-size: 14pt; margin: 0; color: white !important; font-weight: bold; }
    
    #print-area .gov-approved { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 18pt; padding: 10px; font-weight: bold; color: #1e7b38; letter-spacing: 1px; }

    #print-area .slip-fields { 
        flex: 1; /* Keep flexing to fill the page, leaving nice huge white space below text */
        display: flex; 
        flex-direction: column; 
    }
    
    #print-area .field-row {
        flex: 1; 
        display: flex;
        align-items: stretch; 
        border-bottom: 1.5px solid #1e7b38;
    }
    #print-area .nett-row { border-bottom: 3px solid #1e7b38; background: #f0fdf4 !important; }
    
    #print-area .field-label {
        width: 250px; /* Reduced width */
        padding: 5px 20px;
        font-size: 13pt;
        border-right: 1.5px solid #1e7b38;
        display: flex;
        flex-direction: column;
        justify-content: center;
        line-height: 1.3;
        color: #1e7b38;
        font-weight: bold;
    }
    #print-area .field-label small { font-size: 10pt; color: #15803d; margin: 0; }
    
    #print-area .field-value {
        flex: 1;
        padding: 5px 20px;
        font-size: 14pt;
        font-weight: bold;
        color: #000;
        display: flex;
        align-items: center;
    }

    #print-area .slip-footer {
        height: 100px; /* Slightly reduced */
        display: flex;
        align-items: stretch;
        margin-top: 15px;
    }
    
    #print-area .hours-24 {
        width: 250px;
        font-size: 13pt;
        border-right: 1.5px solid #1e7b38;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        line-height: 1.4;
        color: #1e7b38;
        font-weight: bold;
    }
    
    #print-area .footer-center { flex: 1; display: flex; justify-content: center; align-items: center; }
    #print-area .copy-type { font-size: 18pt; border: 2px solid #1e293b; padding: 8px 25px; font-weight: bold; letter-spacing: 2px; }
    
    #print-area .footer-right { width: 250px; display: flex; justify-content: center; align-items: flex-end; padding: 10px; }
    #print-area .signature { font-size: 14pt; border-top: 2px solid #1e293b; padding-top: 5px; font-weight: bold; width: 100%; text-align: center; }

    #print-area .developer-credit {
        text-align: center;
        font-size: 10pt;
        margin-top: 10px;
        padding-top: 5px;
        border-top: 1px dashed #1e7b38;
        color: #1e7b38;
        font-weight: bold;
    }
    #print-area .developer-credit a {
        color: #1e7b38;
        text-decoration: none;
    }
}
