/* Print Styles for Reports */
@media print {
    /* General Reset for Print */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    /* Hide non-printable elements */
    .glass-nav,
    .date-filter-bar,
    .nav-btn,
    .nav-btn-icon,
    .btn-primary,
    .btn-secondary,
    .format-selector,
    .report-actions,
    .trans-actions,
    .export-btn,
    .filter-actions,
    .loading-overlay,
    .notification,
    button {
        display: none !important;
    }

    /* Page Setup */
    @page {
        size: A4;
        margin: 15mm 10mm;
    }

    @page :first {
        margin-top: 10mm;
    }

    /* Body and Container */
    body {
        background: white !important;
        color: black !important;
        font-family: Arial, sans-serif !important;
        font-size: 11pt !important;
        line-height: 1.5 !important;
    }

    .content-area {
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Headers */
    h1, h2, h3 {
        color: black !important;
        page-break-after: avoid;
        break-after: avoid;
    }

    .report-header {
        text-align: center;
        margin-bottom: 20px;
        border-bottom: 2px solid #000;
        padding-bottom: 10px;
    }

    .report-header h2 {
        font-size: 18pt !important;
        margin-bottom: 5px;
    }

    .report-header p {
        font-size: 12pt !important;
        color: #333 !important;
    }

    /* Tables */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        page-break-inside: auto;
        font-size: 10pt !important;
    }

    thead {
        display: table-header-group;
    }

    tfoot {
        display: table-footer-group;
    }

    tr {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    th, td {
        border: 1px solid #ccc !important;
        padding: 6px 8px !important;
        text-align: left;
    }

    th {
        background-color: #f0f0f0 !important;
        font-weight: bold !important;
        color: black !important;
    }

    .report-total td,
    .grand-total td,
    .day-total td {
        background-color: #e0e0e0 !important;
        font-weight: bold !important;
    }

    /* Remove hover effects */
    tr:hover {
        background-color: transparent !important;
    }

    /* Glass panels for print */
    .glass-panel {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    /* Daybook Specific Styles */
    .daybook-two-column table,
    .daybook-four-column table {
        margin-top: 10px;
    }

    .daybook-modern .day-header {
        background-color: #f5f5f5 !important;
        border: 1px solid #ccc !important;
        margin-bottom: 10px;
        padding: 10px !important;
    }

    .transaction-card {
        border: 1px solid #ccc !important;
        margin-bottom: 8px !important;
        padding: 10px !important;
        page-break-inside: avoid;
    }

    .trans-header {
        border-bottom: 1px solid #ddd !important;
        margin-bottom: 8px !important;
        padding-bottom: 8px !important;
    }

    /* Balance Sheet */
    .balance-sheet-container {
        display: block !important;
    }

    .balance-sheet-section {
        margin-bottom: 20px !important;
        page-break-inside: avoid;
    }

    .balance-sheet-section h3 {
        background-color: #f0f0f0 !important;
        padding: 8px !important;
        margin-bottom: 10px !important;
    }

    /* Profit & Loss */
    .profit-loss-container {
        padding: 0 !important;
    }

    .net-profit-section {
        border: 2px solid #000 !important;
        padding: 15px !important;
        margin-top: 20px !important;
        text-align: center !important;
        page-break-inside: avoid;
    }

    .net-profit-section.profit {
        background-color: #f0fff0 !important;
    }

    .net-profit-section.loss {
        background-color: #fff0f0 !important;
    }

    .net-amount {
        font-size: 16pt !important;
        font-weight: bold !important;
        color: black !important;
    }

    /* Ledger */
    .ledger-selection {
        display: none !important;
    }

    /* Colors for print */
    .debit-total,
    .credit-total {
        color: black !important;
        font-weight: bold !important;
    }

    /* Page numbers */
    .page-number {
        position: fixed;
        bottom: 0;
        right: 0;
        font-size: 10pt;
        color: #666;
    }

    /* Footer for all pages */
    .print-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 9pt;
        color: #666;
        border-top: 1px solid #ccc;
        padding-top: 5px;
    }

    /* Ensure proper spacing */
    .report-warning {
        background-color: #fffacd !important;
        border: 1px solid #ff0000 !important;
        color: black !important;
        padding: 10px !important;
        margin-top: 10px !important;
        text-align: center !important;
    }

    /* Account items in reports */
    .account-item {
        border: none !important;
        padding: 5px 0 !important;
    }

    /* Remove animations and transitions */
    * {
        animation: none !important;
        transition: none !important;
    }

    /* Specific number formatting */
    td[style*="text-align: right"] {
        text-align: right !important;
    }

    /* Group headers in reports */
    .group-header td {
        background-color: #e8e8e8 !important;
        font-weight: bold !important;
        padding-top: 10px !important;
    }

    .group-total td {
        background-color: #f5f5f5 !important;
        font-weight: 600 !important;
    }

    /* Analytics placeholder */
    .analytics-container {
        text-align: center;
        padding: 20px;
    }

    .metric-card,
    .coming-soon {
        display: none !important;
    }

    /* Modal and overlays */
    .modal-overlay,
    #modalContainer {
        display: none !important;
    }
}

/* Additional print helper classes */
.print-only {
    display: none;
}

@media print {
    .print-only {
        display: block !important;
    }
    
    .no-print {
        display: none !important;
    }
}