/* =========================================================
   GL.CSS - Khusus untuk Laporan Kewangan (P&L, Balance Sheet)
   ========================================================= */

   .gl-container { display: flex; gap: 20px; padding: 20px; max-width: 1400px; margin: 0 auto; }
   .gl-sidebar { flex: 1; min-width: 250px; background: white; padding: 25px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); height: max-content; position: sticky; top: 80px;}
   .gl-content { flex: 3; min-width: 400px; background: white; padding: 40px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); min-height: 80vh;}
   
   .btn-active { background: var(--primary); color: white; border: none;}
   
   /* REPORT STYLES (MIMICS AUDITOR FORMAT) */
   .report-header { text-align: center; margin-bottom: 20px; font-family: Arial, sans-serif; }
   .report-header h1 { margin: 0 0 5px 0; font-size: 18px; text-transform: uppercase; }
   .report-header h2 { margin: 0 0 5px 0; font-size: 14px; color: #333; }
   .report-header p { margin: 0; font-size: 11px; color: #666; }
   
   table.report-table { width: 100%; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 12px; line-height: 2; }
   table.report-table th, table.report-table td { padding: 2px 4px; border: none; }
   table.report-table td.money { text-align: right; width: 20%; }
   table.report-table td.indent { padding-left: 20px; }
   
   /* Accounting Underlines & Spacing */
   .line-top { border-top: 1px solid #000 !important; }
   .line-bottom { border-bottom: 1px solid #000 !important; }
   .line-double { border-bottom: 3px double #000 !important; border-top: 1px solid #000 !important; font-weight: bold; }
   .total-row { font-weight: bold; }
   .spacer-row td { height: 12px; padding: 0; }
   
   /* ==========================================
   TETAPAN KERTAS CETAKAN (FORMAT AUDIT KORPORAT)
   ========================================== */
@media print {
    @page { size: portrait; margin: 15mm; }

    *, *:before, *:after, span, td, th, div, p, h1, h2, h3 {
        color: #000 !important;
        background: transparent !important;
        text-decoration: none !important;
    }

    body, html {
        background: #fff !important;
        height: auto !important;
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
        font-family: Arial, Helvetica, sans-serif !important;
    }

    .navbar, .gl-sidebar, .no-print, #authOverlay, #loadingOverlay {
        display: none !important;
    }

    .gl-container, .gl-content {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        position: static !important; 
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }

    .report-header { 
        display: block !important; 
        margin-bottom: 25px !important; 
        text-align: center !important;
    }
    .report-header h1 { font-size: 13pt !important; font-weight: bold !important; margin: 0 0 5px 0 !important; text-transform: uppercase !important; }
    .report-header h2 { font-size: 11pt !important; font-weight: bold !important; margin: 0 0 5px 0 !important; }
    .report-header p { font-size: 10pt !important; margin: 0 !important; }

    table.report-table {
        display: table !important;
        width: 100% !important;
        font-size: 9.5pt !important;
        border-collapse: collapse !important;
        line-height: 1.4 !important;
    }

    table.report-table tr { 
        page-break-inside: avoid !important; 
    }

    /* KOD DIBETULKAN: Buang "border: none" di sini supaya tak kacau garisan */
    table.report-table td, table.report-table th {
        padding: 4px 2px !important;
        vertical-align: bottom !important;
    }

    table.report-table td.indent {
        padding-left: 15px !important;
    }

    /* KOD DIBETULKAN: Paksa garisan perakaunan keluar di atas kertas */
    table.report-table td.line-top { border-top: 1px solid #000 !important; }
    table.report-table td.line-bottom { border-bottom: 1px solid #000 !important; }
    table.report-table td.line-double { 
        border-top: 1px solid #000 !important; 
        border-bottom: 3px double #000 !important; 
    }

    .spacer-row td { height: 12px !important; padding: 0 !important; }
}
   
   @media screen and (max-width: 768px) {
       .gl-container { flex-direction: column; padding: 10px; width: 100%; box-sizing: border-box; overflow: hidden; }
       .gl-sidebar { position: static; width: 100%; box-sizing: border-box; }
       .gl-content { width: 100%; min-width: 0 !important; padding: 15px; box-sizing: border-box; overflow-x: auto; -webkit-overflow-scrolling: touch; }
       table.report-table { min-width: 500px; }
       .report-header h1 { font-size: 16px; }
       .report-header h2 { font-size: 12px; }
   }