/* PREMIUM FINANCIAL REPORT PRINT ENGINE */
@media print {
    @page {
        margin: 15mm 10mm;
        size: A4 portrait;
    }

    /* Base Reset */
    body {
        background: white !important;
        color: #1a1a1a !important;
        font-family: 'Inter', 'Segoe UI', serif !important;
        font-size: 10pt !important;
        line-height: 1.4 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Hide Navigation & Interactive Elements */
    nav,
    button,
    .no-print,
    .print\:hidden,
    #month-picker-input,
    .fixed,
    .toast-notification,
    header select,
    header button {
        display: none !important;
    }

    /* Premium Header for Print */
    header {
        position: static !important;
        background: #0f172a !important;
        padding: 20px !important;
        margin-bottom: 30px !important;
        border-radius: 8px !important;
    }

    header * {
        color: white !important;
    }

    /* Performance & Spacing */
    .container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Avoid breaking cards across pages */
    .bg-white,
    .rounded-xl,
    section,
    .transaction-section {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        margin-bottom: 25px !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: none !important;
        padding: 15px !important;
        border-radius: 6px !important;
    }

    /* Better Table Display */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    th {
        background-color: #f1f5f9 !important;
        color: #475569 !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        font-size: 8pt !important;
    }

    td,
    th {
        border-bottom: 1px solid #f1f5f9 !important;
        padding: 8px !important;
    }

    /* Transform Inputs into Text */
    input,
    textarea,
    select {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        font-weight: 600 !important;
        color: #1a1a1a !important;
        box-shadow: none !important;
        appearance: none !important;
    }

    /* Dashboards & Charts */
    .recharts-responsive-container {
        height: 350px !important;
        width: 100% !important;
        page-break-inside: avoid !important;
    }

    /* Typography */
    h1 {
        font-size: 24pt !important;
        font-weight: 800 !important;
    }

    h2 {
        font-size: 18pt !important;
        font-weight: 700 !important;
        margin-top: 20px !important;
    }

    h3 {
        font-size: 14pt !important;
        font-weight: 600 !important;
    }

    /* Layout specific columns for print */
    .grid {
        display: block !important;
    }

    .print\:grid-cols-2 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }

    /* Indicators */
    .text-green-600 {
        color: #166534 !important;
    }

    .text-red-600 {
        color: #991b1b !important;
    }

    .bg-blue-600 {
        background: #2563eb !important;
    }

    .bg-orange-500 {
        background: #f97316 !important;
    }

    /* Footer for Report */
    footer::after {
        content: "Relatório Financeiro Confidencial - Gerado automaticamente pelo Sistema DRE Farma Praia";
        display: block;
        text-align: center;
        font-size: 8pt;
        color: #94a3b8;
        margin-top: 40px;
        border-top: 1px solid #e2e8f0;
        padding-top: 10px;
    }
}