/* Print styles for Financial Statements */
@media print {
    body {
        font-family: Arial, sans-serif !important;
        color: #000 !important;
        background: white !important;
    }

    /* Hide non-printable elements */
    .no-print,
    .btn,
    button,
    .dropdown,
    .navbar,
    .sidebar,
    nav,
    .breadcrumb,
    .alert,
    .toast,
    .modal,
    header,
    footer,
    .top-row {
        display: none !important;
    }

    /* Ensure print area takes full width */
    .print-area {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Main content adjustments */
    main {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .container-fluid {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Table styling for print */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin-bottom: 20px !important;
        font-size: 12px !important;
    }

    th, td {
        padding: 8px !important;
        border: 1px solid #000 !important;
        text-align: left !important;
        vertical-align: top !important;
    }

    th {
        background-color: #f5f5f5 !important;
        font-weight: bold !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Card styling for print */
    .card {
        border: 2px solid #000 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin-bottom: 20px !important;
        background: white !important;
    }

    .card-header {
        background-color: #f8f9fa !important;
        border-bottom: 1px solid #000 !important;
        padding: 10px !important;
        font-weight: bold !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .card-body {
        padding: 15px !important;
        background: white !important;
    }

    /* Financial statement specific styling */
    .text-success {
        color: #000 !important;
        font-weight: bold !important;
    }

    .text-danger {
        color: #000 !important;
        font-weight: bold !important;
    }

    .text-muted {
        color: #666 !important;
    }

    /* Balance totals */
    .fw-bold {
        font-weight: bold !important;
        border-top: 2px solid #000 !important;
    }

    /* Page breaks */
    .page-break {
        page-break-before: always !important;
    }

    /* Header information */
    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
        margin-bottom: 10px !important;
    }

    /* Hide chart canvas elements in print */
    canvas {
        display: none !important;
    }

    /* Ensure proper spacing */
    .row {
        margin-bottom: 15px !important;
    }

    .col-md-6, .col-lg-6 {
        width: 48% !important;
        float: left !important;
        margin-right: 2% !important;
    }

    /* Financial totals styling */
    .bg-success, .bg-primary, .bg-warning {
        background-color: #f8f9fa !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Summary sections */
    .badge {
        border: 1px solid #000 !important;
        background-color: white !important;
        color: #000 !important;
        padding: 3px 6px !important;
        font-size: 11px !important;
    }

    /* Icons - convert to text or hide */
    .fas, .fa {
        display: none !important;
    }
}

/* Screen-only styles for enhanced UI */
@media screen {
    /* Chart containers */
    .chart-container {
        position: relative;
        height: 300px;
        margin-bottom: 20px;
    }

    /* Export button styling */
    .dropdown-toggle {
        border-top-right-radius: 0.375rem;
        border-bottom-right-radius: 0.375rem;
    }

    /* Enhanced cards */
    .card {
        border: none;
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
        transition: all 0.15s ease-in-out;
    }

    .card:hover {
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }

    /* Animation for chart toggle */
    .chart-fade-in {
        animation: fadeIn 0.3s ease-in;
    }

    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* Loading states */
    .btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    /* Enhanced table styling */
    .table-hover tbody tr:hover {
        background-color: rgba(0, 123, 255, 0.075);
    }

    /* Financial statement specific enhancements */
    .balance-positive {
        color: #28a745;
        font-weight: 600;
    }

    .balance-negative {
        color: #dc3545;
        font-weight: 600;
    }

    .balance-zero {
        color: #6c757d;
        font-style: italic;
    }
}