    /* =========================================
       1. GLOBAL VARIABLES & RESET
       ========================================= */
    :root { 
        --primary: #1a237e; 
        --secondary: #303f9f; 
        --accent: #ff6f00; 
        --light: #f5f5f5; 
        --white: #fff; 
        --text: #333; 
    }
    
    body { 
        font-family: 'Mandali', sans-serif; 
        background: #e8eaf6; 
        margin: 0; 
        padding: 20px; 
        color: var(--text); 
    }

    /* =========================================
       2. MAIN LAYOUT & HEADERS
       ========================================= */
    .container { 
        max-width: 98%; 
        margin: 0 auto; 
        background: var(--white); 
        box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
        border-radius: 12px; 
        overflow: hidden; 
    }
    
    .head-title { 
        text-align: center; 
        background: linear-gradient(135deg, var(--primary), var(--secondary)); 
        color: white; 
        padding: 25px; 
        margin: 20px; 
        font-family: 'Ramabhadra', sans-serif; 
        font-size: 26px; 
        border-radius: 15px; 
        box-shadow: 0 5px 15px rgba(0,0,0,0.2); 
        text-transform: uppercase; 
    }
    
    .ad-slot { 
        text-align: center; 
        margin: 15px auto; 
        padding: 10px; 
        background: #fafafa; 
        border: 1px dashed #ccc; 
        border-radius: 8px; 
    }

    /* =========================================
       3. FORMS & INPUTS
       ========================================= */
    .form-section { 
        background: #fff; 
        border: 1px solid #e0e0e0; 
        margin-bottom: 15px; 
        border-radius: 10px; 
        overflow: hidden; 
        box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
    }
    
    .sec-head { 
        background: #3949ab; 
        color: white; 
        padding: 15px 20px; 
        font-family: 'Ramabhadra', sans-serif; 
        font-size: 16px; 
        cursor: pointer; 
        display: flex; 
        justify-content: space-between; 
        align-items: center; 
        transition: 0.3s; 
    }
    .sec-head:hover { background: #283593; }
    
    .sec-content { 
        display: none; 
        padding: 25px; 
        background: #fff; 
        animation: fade 0.3s; 
    }
    @keyframes fade { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

    .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
    
    .sub-header { 
        grid-column: 1 / -1; 
        font-family: 'Ramabhadra', sans-serif; 
        color: var(--accent); 
        font-size: 16px; 
        border-bottom: 2px solid #ffe0b2; 
        padding-bottom: 5px; 
        margin-top: 15px; 
    }
    
    label { font-weight: 600; font-size: 13px; display: block; margin-bottom: 8px; color: #546e7a; }
    
    input, select { 
        width: 100%; 
        padding: 12px; 
        border: 1px solid #cfd8dc; 
        border-radius: 8px; 
        font-family: 'Mandali', sans-serif; 
        font-size: 15px; 
        background: #fafafa; 
        transition: 0.3s; 
        box-sizing: border-box; 
    }

    /* --- SPECIAL INPUT BOXES FOR SALARY TABLE --- */
    .manual-input { 
        width: 85px !important;       
        padding: 8px 5px !important;  
        border: 1px solid #90a4ae !important; 
        border-radius: 4px; 
        font-size: 14px !important;   
        font-weight: bold;            
        text-align: right; 
        color: #000;                  
        background: #fff; 
        box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
        display: inline-block; /* Screen Only */
    }
    .manual-input:focus { border-color: #1a237e !important; background: #e8eaf6; outline: none; }
    
    /* PRINT VALUE TEXT (Hidden on Screen) */
    .print-val { display: none; }

    /* =========================================
       4. BUTTONS
       ========================================= */
    .btn-calc { 
        width: 100%; 
        padding: 18px; 
        background: linear-gradient(45deg, #11998e, #38ef7d); 
        color: white; 
        font-family: 'Ramabhadra', sans-serif; 
        font-size: 18px; 
        border: none; 
        cursor: pointer; 
        border-radius: 50px; 
        margin-top: 25px; 
        box-shadow: 0 5px 15px rgba(56, 239, 125, 0.4); 
        transition: transform 0.2s; 
    }
    .btn-calc:hover { transform: scale(1.02); }

    .btn-update { 
        padding: 12px 30px; 
        background: linear-gradient(45deg, #ff6f00, #ff8f00); 
        color: white; 
        border: none; 
        border-radius: 50px;       
        cursor: pointer; 
        font-weight: bold; 
        font-family: 'Ramabhadra', sans-serif; 
        font-size: 16px; 
        box-shadow: 0 4px 15px rgba(255, 111, 0, 0.4); 
        transition: all 0.3s ease; 
        letter-spacing: 0.5px;
    }
    .btn-update:hover { 
        background: linear-gradient(45deg, #e65100, #f57c00); 
        transform: translateY(-2px); 
        box-shadow: 0 6px 20px rgba(255, 111, 0, 0.6); 
    }

    /* Comment Button Styles */
    .comment-link-container { text-align: center; margin: 30px 0; }
    .comment-btn-span { 
        display: inline-block; background: #1877f2; padding: 12px 25px; 
        border-radius: 30px; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(24, 119, 242, 0.2); 
    }
    .comment-btn-span:hover { background: #166fe5; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(24, 119, 242, 0.3); }
    .comment-btn-span a { text-decoration: none; color: white !important; font-weight: bold; font-size: 16px; display: flex; align-items: center; gap: 10px; }
    
    @media (max-width: 480px) {
        .comment-btn-span { padding: 10px 20px; }
        .comment-btn-span a { font-size: 14px; }
    }

    /* =========================================
       5. TABS & REPORTS
       ========================================= */
    .tabs { display: flex; flex-wrap: wrap; gap: 10px; padding: 20px; background: #263238; justify-content: center; border-radius: 0 0 12px 12px; }
    .tab-btn { flex: 1; min-width: 140px; padding: 12px; background: #455a64; color: white; border: none; cursor: pointer; font-family: 'Ramabhadra', sans-serif; border-radius: 30px; font-size: 14px; transition: 0.3s; }
    .tab-btn.active { background: var(--accent); color: #000; box-shadow: 0 0 15px rgba(255,111,0,0.4); }
    
    .report-page { display: none; background: white; padding: 40px; margin: 30px auto; border: 1px solid #ddd; width: 100%; box-sizing: border-box; box-shadow: 0 10px 30px rgba(0,0,0,0.1); position: relative; }
    .report-page.active { display: block; }
    
    .report-actions { text-align: center; margin-bottom: 25px; }
    .action-btn { display: inline-flex; align-items: center; padding: 10px 20px; background: #1976d2; color: white; text-decoration: none; border-radius: 50px; font-weight: bold; font-size: 14px; cursor: pointer; border: none; font-family: 'Mandali', sans-serif; box-shadow: 0 3px 6px rgba(0,0,0,0.2); transition: 0.2s; }
    .btn-pdf { background: #f44336; margin-left: 10px; }

    /* =========================================
       6. TABLES
       ========================================= */
    .table-scroll { overflow-x: auto; border: 1px solid #eee; margin-bottom: 20px; border-radius: 8px; }
    table { width: 100%; border-collapse: collapse; margin-bottom: 15px; font-size: 12px; font-family: 'Arial', sans-serif; }
    th, td { border: 1px solid #444; padding: 8px; vertical-align: middle; }
    th { background: #eceff1; text-align: center; font-weight: 700; color: #000; }
    .text-right { text-align: right; } .text-center { text-align: center; } .bold { font-weight: bold; } 
    .bg-light { background: #f9f9f9; } .text-red { color: #d32f2f; } .text-blue { color: #1976d2; }
    
    .salary-header { display: flex; justify-content: space-between; border: 2px solid #000; padding: 12px; margin-bottom: 20px; font-weight: bold; font-size: 13px; text-transform: uppercase; background: #fff; }
    .split-layout { display: flex; gap: 20px; } .half { width: 50%; }
    
    .seo-content { padding: 30px; background: #fff; border-top: 1px solid #eee; margin-top: 30px; }
    .footer { background: #1c1c1c; color: #9e9e9e; padding: 25px; text-align: center; font-size: 14px; margin-top: 20px; }
    .footer a { color: #fff; text-decoration: none; margin: 0 15px; font-weight: bold; }
    .print-footer { 
            display: block !important; 
            margin-top: 20px; 
            padding-top: 10px;
            border-top: none !important; 
            font-size: 10px;
            text-align: center;
            color: #000 !important; 
        }
    /* =========================================
       7. PERFECT PRINT STYLES (SINGLE PAGE + ORIENTATION)
       ========================================= */
       
    /* Orientation Definitions */
    @page { size: A4 portrait; margin: 0.5cm; } /* Default is Portrait */
    @page salary-page { size: A4 landscape; margin: 0.5cm; } /* Custom Named Page for Landscape */

    /* --- FINAL PERFECT PRINT STYLES --- */
    @media print {
        @page { margin: 0.5cm; } 
        
        /* 1. GLOBAL RESET FOR PRINT */
        * { 
            box-shadow: none !important; 
            text-shadow: none !important; 
            background-image: none !important; 
        }

        html, body { 
            background: white !important; 
            height: 100%; 
            margin: 0; padding: 0; 
            font-family: 'Arial', sans-serif; 
            font-size: 9pt;
        }

        /* 2. HIDE EVERYTHING FIRST */
        body > * { display: none !important; }

        /* 3. SHOW CONTAINER & ACTIVE REPORT */
        .container { 
            display: block !important; 
            background: white !important; 
            border: none !important; 
            width: 100% !important; 
            margin: 0 !important; 
            padding: 0 !important;
        }

        
        .report-page.active { 
            display: block !important; 
            position: absolute; 
            top: 0; left: 0; 
            width: 100% !important; 
            margin: 0 !important; padding: 0 !important; 
            background: white !important; 
            border: none !important; 
        }

        
        .report-page.active * { visibility: visible !important; }

        /* 4. PAGE ORIENTATION LOGIC */
        #salary { page: salary-page; } 
        #annexure, #form16_f, #form16_b { page: portrait; } 

        /* 5. HIDE UNWANTED ELEMENTS */
        .no-print, .tabs, .ad-slot, .seo-content, .footer, .report-actions, .head-title, .form-section, .btn-update, .btn-calc, .comment-link-container { 
            display: none !important; 
        }

        /* 6. INPUT BOXES -> TEXT CONVERSION */
        .manual-input { display: none !important; } 
        .print-val { display: inline-block !important; }

        /* 7. TABLE STYLES */
        .table-scroll { overflow: visible !important; border: none !important; }
        table { 
            width: 100% !important; 
            font-size: 8pt !important; 
            table-layout: fixed; 
            border-collapse: collapse; 
            border: 1px solid #000 !important;
        }
        th, td { 
            padding: 4px 2px !important; 
            border: 1px solid #000 !important; 
            word-wrap: break-word; 
        }
        
        /* 8. FOOTER STYLES */
        .print-footer { 
            display: block !important; 
            margin-top: 20px; 
            padding-top: 10px;
            border-top: 1px solid #000; 
            font-size: 10px;
            text-align: center;
            color: #000 !important; 
        }
    }