<?php

function grade_cal($obtained, $total)
{
    if (!is_numeric($obtained)) {
        $obtained = 0;
    }

    if (!is_numeric($total) || $total <= 0) {
        return '';
    }

    $obtained = (float)$obtained;
    $total = (float)$total;

    $p = ($obtained / $total) * 100;

    if ($p >= 91) return 'A1';
    if ($p >= 81) return 'A2';
    if ($p >= 71) return 'B1';
    if ($p >= 61) return 'B2';
    if ($p >= 51) return 'C1';
    if ($p >= 41) return 'C2';
    if ($p >= 33) return 'D';
    if ($p >= 21) return 'E1';
    return 'E2';
}


function show_val($val)
{
    return ($val === 0 || $val === '0') ? '-' : ($val ?? '');
}
function template31($institutions, $branch, $students_array, $examination, $array, $result, $class_id, $section_id)
{
?>
    <!DOCTYPE html>
    <html lang="en">

    <head>
        <meta charset="UTF-8">
        <title>Holistic Progress Report</title>
        <link href="https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600;700&display=swap" rel="stylesheet">
        <style>
            /* =====================================================
               GLOBAL COMMON CSS (All Pages)
            ===================================================== */
            @page {
                size: A4 landscape;
                margin: 0;
            }

            * {
                margin: 0;
                padding: 0;
                box-sizing: border-box;
            }

            body {
                font-family: Arial, Helvetica, sans-serif;
                background: #fff;
                padding: 20px;
            }

            .wrapper {
                display: flex;
                width: 100%;
                gap: 20px;
            }

            .page,
            .left-section,
            .right-section {
                flex: 1;
                width: 50%;
                border: 3px solid #c4161c;
                padding: 18px;
                box-sizing: border-box;
                background: #fff;
                display: flex;
                flex-direction: column;
            }

            table {
                width: 100%;
                border-collapse: collapse;
                font-size: 11pt;
            }

            th,
            td {
                border: 1px solid #000;
                padding: 6px;
                text-align: center;
                vertical-align: middle;
            }

            th {
                font-weight: bold;
            }

            .left {
                text-align: left;
                padding-left: 8px;
            }

            .center {
                text-align: center;
            }

            .diamond::before {
                content: "◆ ";
            }

            .page-break {
                page-break-after: always;
            }

            /* PAGE 1 LEFT — INCREASED */
            .p1-title {
                text-align: center;
                font-size: 30px;
                font-weight: bold;
                color: #c4161c;
                margin-bottom: 22px;
            }

            .paragraph {
                font-size: 16px;
                line-height: 1.6;
                color: #000;
                text-align: justify;
                margin-bottom: 26px;
            }

            .sub-title {
                text-align: center;
                font-size: 22px;
                color: #c4161c;
                font-weight: bold;
                margin-bottom: 12px;
            }

            .grading-note {
                text-align: center;
                margin-bottom: 16px;
                font-size: 11pt;
            }

            .grading-table {
                width: 65%;
                margin: 0 auto 16px auto;
                font-size: 16px;
            }

            .grading-table th {
                background: #c4161c;
                color: #fff;
                padding: 7px;
            }

            .grading-table td {
                padding: 6px;
                background: #f6e7b0;
                font-weight: bold;
            }

            .grading-table td.range {
                background: #fff;
                color: #0066cc;
                font-weight: normal;
            }

            .min-note {
                text-align: center;
                margin-bottom: 16px;
                font-size: 11pt;
            }

            .blue-note {
                color: #00a2e8;
                margin-bottom: 12px;
                font-size: 11pt;
            }

            .rules {
                border: 2px solid #9bbad1;
                font-size: 13pt;
                border-radius: 10px;
                padding: 12px;
                line-height: 1.6;
                color: #1b3c73;
                margin-bottom: 20px;
            }

            .footer-note {
                margin-top: auto;
                padding: 12px 14px;
                font-size: 14px;
                text-align: center;
                background: #f1f1f1;
                border: 1px solid #cfcfcf;
                line-height: 1.4;
            }

            /* PAGE 1 RIGHT — INCREASED */
            .school-header {
                text-align: center;
                margin-top: 3px;
            }

            .school-logo {
                text-align: center;
                margin-bottom: 3px;
            }

            .school-logo img {
                width: 210px;
                height: 120px;
                object-fit: contain;
            }

            .school-name {
                font-family: 'Cinzel', serif;
                font-size: 46px;
                font-weight: 700;
                color: #2c2f83;
                letter-spacing: 1.5px;
                margin-top: 2px;
            }

            /* Address line */
            .school-address {
                font-size: 20px;
                line-height: 1.3;
                text-align: center;
            }

            /* Second line: contact + email + city + pincode */
            .school-meta-main {
                font-size: 20px;
                white-space: nowrap;
                /* stay on ONE line */
                text-align: center;
            }

            /* Third line: affiliation only */
            .school-meta-aff {
                font-size: 20px;
                text-align: center;
            }

            .photo-box {
                width: 185px;
                height: 220px;
                border: 3px solid #c4161c;
                border-radius: 18px;
                margin: 16px auto 10px auto;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            .student-photo {
                width: 92%;
                height: 92%;
                object-fit: cover;
                border-radius: 12px;
            }

            .report-title {
                text-align: center;
                font-size: 24pt;
                font-weight: 900;
                margin: 10px 0 4px 0;
                letter-spacing: 0.5px;
            }

            .year {
                text-align: center;
                font-size: 32px;
                color: #c4161c;
                font-weight: 900;
                margin-bottom: 22px;
            }

            .info-table {
                width: 85%;
                margin: 0 auto;
                border-collapse: collapse;
                font-family: 'Jost', sans-serif !important;
            }

            .info-table td {
                border: none;
                background: transparent;
                padding: 13px 2px;
                text-align: left;
                /*font-size: 16px;*/
                font-size: 12pt;
                vertical-align: middle;
                font-family: 'Jost', sans-serif !important;
                
            }

            .info-table td:first-child {
                width: 30%;
                font-weight: 600;
            }

            .line {
                display: inline-block;
                width: 340px;
                /*height: 18px;*/
                font-family: 'Jost', sans-serif;
                letter-spacing: 1px;
                border-bottom: 3px dotted rgba(0, 0, 0, 0.5);
                vertical-align: middle;
            }

            /* PAGE 2 LEFT */
            .header {
                background: #fff;
                padding: 0;
            }

            .p2-title {
                background: #c41e3a;
                color: #fff;
                padding: 10px 15px;
                text-align: center;
                font-size: 22px;
                font-weight: bold;
                letter-spacing: 2px;
                margin-bottom: 8px;
            }

            .content {
                padding: 0;
                flex: 1;
                display: flex;
                flex-direction: column;
            }

            .description {
                font-size: 11pt;
                line-height: 1.6;
                margin-bottom: 10px;
            }

            .diagram {
                width: 100%;
                flex: 1;
                min-height: 0;
                margin: 6px 0 10px 0;
                text-align: center;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            .mi-diagram {
                width: 100%;
                max-width: 100%;
                height: 100%;
                max-height: 100%;
                display: block;
                margin: 0 auto;
                object-fit: contain;
            }

            .subject-title {
                background: #c41e3a;
                color: #fff;
                padding: 10px 12px;
                text-align: center;
                font-size: 18px;
                font-weight: bold;
                letter-spacing: 1px;
                margin: 10px 0 8px 0;
            }

            .levels-title {
                color: #c41e3a;
                font-size: 17px;
                font-weight: bold;
                margin: 0 0 8px 0;
            }

            .levels-table td {
                border: 1px solid #333;
                padding: 10px 12px;
                font-size: 14px;
            }

            .levels-table td:first-child {
                font-weight: bold;
                width: 75px;
            }

            /* PAGE 2 RIGHT */
            .p2-right-title {
                font-weight: bold;
                font-size: 15px;
                 text-align: center;
            }

            .bar-title {
                background: #9fa8d4;
                border: 1px solid #000;
                font-weight: bold;
                font-size: 15px;
                text-align: center;
                padding: 9px 0;
                margin: 0;
                 margin-top: 6px; /* 👈 adjust: 5px–10px as you like */
            }

            .marks-table {
                width: 100%;
                border-collapse: collapse;
                table-layout: fixed;
                margin-top: 0;
                font-family: 'Jost', sans-serif;
                font-size: 11pt;
            }

            .marks-table th,
            .marks-table td {
                border: 1px solid #000;
                text-align: center;
                vertical-align: middle;
            }

            .marks-table thead tr:first-child th {
                background: #9fa8d4;
                /*font-size: 14px;*/
                font-weight: bold;
                padding: 2px 0;

            }

            .marks-table thead tr:nth-child(2) th {
                background: #c8d3e8;
                /*font-size: 13px;*/
                padding: 2px;
                font-family: 'Arial';
                font-weight: bold;
                /*line-height: 1.3;*/
            }

            .marks-table tbody td {
                /*font-size: 13px;*/
                padding: 2px;
            }

            /* LEFT ALIGN FIRST COLUMN (ALL ROWS, INCLUDING PERCENTAGE) */
            .marks-table th:first-child,
            .marks-table td:first-child {
                /*text-align: left !important;*/
                padding-left: 2px !important;
            }

            .support-table,
            .assessment-table {
                width: 100%;
                border-collapse: collapse;
                table-layout: fixed;
                margin-top: 0;
            }

            .support-table td,
            .assessment-table td {
                border: 1px solid #000;
                font-size: 14px;
                padding: 9px 10px;
                vertical-align: middle;
            }

            .support-table td:first-child,
            .assessment-table td:first-child {
                background: #e9e9e9;
                /*font-weight: bold;*/
                text-align: left;
                width: 45%;
            }

            .support-legend {
                background: #c4161c;
                color: #fff;
                font-weight: bold;
                font-size: 9pt !important;
                text-align: center;
                padding: 8px 10px;
                margin: 8px 0 8px;
                border: 1px solid #c4161c;
            }

            .remarks-box {
                border: 1px solid #000;
                padding: 8px;
                /*min-height: 45px;*/
                height: 153px;
                margin-top: 8px;
                font-size: 14px;
            }


            .promotion-section {
                margin: 9px 0px 35px;
                font-size: 15px;
                font-weight: bold;
            }

            .signature-section {
                display: flex;
                justify-content: space-between;
                margin-top: auto;
                padding-top: 10px;
                font-size: 15px;
                font-weight: bold;
            }

            .signature-item {
                flex: 1;
                text-align: center;
            }

            /* PAGE 3 + 4 */
            .page-title {
                font-weight: bold;
                font-size: 11pt;
                 text-align: center;
            }

            .term-head {
                background: #b4b4d6;
                font-weight: bold;
            }

            .sub-head {
                font-weight: bold;
                font-size: 11pt;
                margin: 15px 0 6px;
            }

            .health th,
            .attendance th {
                background: #b4b4d6;
            }

            .blank-box {
                height: 70px;
            }

            .portfolio-title {
                font-weight: bold !important;
                font-size: 18px;
                margin-bottom: 6px !important;
            }

            .remarks-line {
                height: 30px;
            }

            .remarks-heading {
                margin-top: 6px !important;
                margin-bottom: 4px !important;
                display: block !important;
                font-weight: bold;
                font-size: 11pt;
            }


            .skill-table,
            .rounded {
                width: 100%;
                border-collapse: separate !important;
                border-spacing: 0 !important;
                table-layout: fixed;
                margin: 10px 0 10px;
                border: 1px solid #000;
                border-radius: 12px;
                overflow: hidden;
                background: #fff;
            }

            .skill-table th,
            .rounded th {
                background: #ffffff !important;
                color: #000 !important;
                font-weight: bold;
                font-size: 13px;
                text-transform: uppercase;
                padding: 3px 6px !important;
                border-bottom: 1px solid #000 !important;
                line-height: 1 !important;
            }

            .skill-table td,
            .rounded td {
                font-size: 11pt;
                font-family: 'Jost', sans-serif;
                padding: 1px 8px !important;
                vertical-align: middle !important;
                border-top: 1px solid #000 !important;
            }

            .skill-table th,
            .skill-table td,
            .rounded th,
            .rounded td {
                border-right: 1px solid #000;
            }

            .skill-table th:last-child,
            .skill-table td:last-child,
            .rounded th:last-child,
            .rounded td:last-child {
                border-right: none;
            }

            .skill-table th:nth-child(1),
            .skill-table td:nth-child(1),
            .rounded th:nth-child(1),
            .rounded td:nth-child(1) {
                width: 72%;
                text-align: left !important;
                padding-left: 12px !important;
            }

            .skill-table th:nth-child(2),
            .skill-table td:nth-child(2),
            .skill-table th:nth-child(3),
            .skill-table td:nth-child(3),
            .rounded th:nth-child(2),
            .rounded td:nth-child(2),
            .rounded th:nth-child(3),
            .rounded td:nth-child(3) {
                width: 14%;
                text-align: center !important;
                white-space: nowrap;
            }

            .skill-table tr,
            .rounded tr {
                /*height: 28px;*/
            }

            .skill-table td.left.diamond,
            .rounded td.left.diamond {
                padding-left: 12px !important;
            }

            .p4-photo-box {
                width: 120px;
                height: 150px;
                border: 1px solid #000;
                display: flex;
                align-items: center;
                justify-content: center;
            }
        
            .section-title {
                font-size: 12pt !important;
                margin: 2px 0 3px !important;
                font-weight: bold !important;
            }
            
            .flex-column {
                flex-direction: column !important;
                justify-content: space-between !important;
            }


            /* =====================================================
               PRINT — NO EMPTY PAGES, FULL A4 LANDSCAPE
            ===================================================== */
            @media print {

                @page {
                    size: 297mm 210mm landscape;
                    margin: 0;
                }

                html,
                body {
                    margin: 0 !important;
                    padding: 0 !important;
                    width: 297mm !important;
                    -webkit-print-color-adjust: exact !important;
                    print-color-adjust: exact !important;
                    color-adjust: exact !important;
                    font-family: 'Arial' !important;
                    font-size: 11pt !important;
                }


                .wrapper {
                    display: flex !important;
                    flex-direction: row !important;
                    /*width: 297mm !important;*/
                    /*height: 210mm !important;*/
                    /*min-height: 210mm !important;*/
                    /*max-height: 210mm !important;*/
                    /*padding: 4mm !important;*/
                    /*gap: 4mm !important;*/
                    width: 100% !important;
                    height: 100% !important;
                    padding: 6mm !important;
                    /* equal margin from all sides */
                    gap: 6mm !important;

                    margin: 0 !important;
                    box-sizing: border-box !important;
                    overflow: hidden !important;
                    page-break-inside: avoid !important;
                    break-inside: avoid !important;
                }

                .page-break {
                    display: block !important;
                    height: 0 !important;
                    margin: 0 !important;
                    padding: 0 !important;
                    page-break-after: always !important;
                    break-after: page !important;
                    page-break-before: avoid !important;
                    break-before: avoid !important;
                }

                .page,
                .left-section,
                .right-section {
                    flex: 1 !important;
                    width: calc(50% - 3mm) !important;
                    /*height: 202mm !important;*/
                    /*height: 100% !important;*/
                    height: 198mm !important;
                    /* key line */
                    /*min-height: 202mm !important;*/
                    /*max-height: 202mm !important;*/
                    padding: 8px 10px !important;
                    border: 2px solid #c4161c !important;
                    box-sizing: border-box !important;
                    overflow: hidden !important;
                    display: flex !important;
                    flex-direction: column !important;
                    page-break-inside: avoid !important;
                    break-inside: avoid !important;
                }


                th,
                td {
                    padding: 1px 4px !important;
                    /*line-height: 1.2 ;*/
                    font-size: 10pt !important;
                }

                /* PAGE 1 LEFT — PRINT */
                .p1-title {
                    font-size: 20px !important;
                    margin-bottom: 10px !important;
                    color: #c4161c !important;
                }

                .paragraph {
                    font-size: 15px !important;
                    line-height: 1.5 !important;
                    margin-bottom: 12px !important;
                    color: #000 !important;
                }

                .sub-title {
                    font-size: 15px !important;
                    margin-bottom: 8px !important;
                    color: #c4161c !important;
                }

                .grading-note {
                    margin-bottom: 8px !important;
                    font-size: 11pt !important;
                }

                .grading-table {
                    width: 72% !important;
                    margin: 0 auto 10px auto !important;
                }

                .grading-table th {
                    background: #c4161c !important;
                    color: #fff !important;
                    padding: 5px 6px !important;
                    font-size: 15px !important;
                }

                .grading-table td {
                    padding: 5px 6px !important;
                    font-size: 15px !important;
                    background: #f6e7b0 !important;
                    font-weight: bold !important;
                }

                .grading-table td.range {
                    background: #fff !important;
                    color: #0066cc !important;
                    font-weight: normal !important;
                }

                .min-note {
                    font-size: 11pt !important;
                    margin-bottom: 8px !important;
                }

                .blue-note {
                    font-size: 11pt !important;
                    margin-bottom: 7px !important;
                    color: #00a2e8 !important;
                    padding-left: 55px;
                    /* space for "Note :" */
                    text-indent: -55px;
                    /* pull first line back */
                }

                .blue-note .label {
                    font-size: 11pt !important;
                    margin-bottom: 7px !important;
                    color: #00a2e8 !important;
                    font-weight: bold;
                }

                .rules {
                    font-size: 11pt !important;
                    padding: 8px 10px !important;
                    line-height: 1.45 !important;
                    margin-bottom: 10px !important;
                    border: 2px solid #9bbad1 !important;
                    color: #1b3c73 !important;
                }

                .footer-note {
                    padding: 6px 8px !important;
                    margin-top: auto !important;
                    background: #f1f1f1 !important;
                    border: 1px solid #cfcfcf !important;
                }

                /* PAGE 1 RIGHT — PRINT */
                .school-logo img {
                    width: 120px !important;
                    height: 65px !important;
                }

                .school-name {
                    font-size: 24pt !important;
                    color: #2c2f83 !important;
                    margin-bottom: 10px;
                }

                /* SCHOOL ADDRESS & META — INCREASED */
                .school-address {
                    font-size: 11pt !important;
                    margin-top: 2px !important;
                }

                .school-meta-main {
                    font-size: 11pt !important;
                }

                .school-meta-aff {
                    font-size: 11pt !important;
                    margin-top: 10px;
                }

                .school-meta {
                    font-size: 11pt !important;
                }

                .photo-box {
                    width: 37mm !important;
                    height: 42mm !important;
                    margin: 15px auto 6px auto !important;
                    border-radius: 10px !important;
                    border: 2px solid #c4161c !important;
                }

                .report-title {
                    font-size: 20pt !important;
                    margin: 5px 0 3px !important;
                }

                .year {
                    font-size: 18px !important;
                    margin-bottom: 10px !important;
                    color: #c4161c !important;
                }

                .info-table {
                    width: 98% !important;
                }

                .info-table td {
                    padding: 8px 2px !important;
                    font-size: 11pt !important;
                    /*font-size: 20px !important;*/
                }

                .info-table td:first-child {
                    width: 32% !important;
                }

                .line {
                    display: inline-block;
                    width: 260px !important;
                    /* ⬅ longer line */
                    /*height: 20px !important;*/
                    /* ⬅ taller */
                    border-bottom: 1.5px dotted #888 !important;
                    vertical-align: middle;
                    margin-left: 6px;
                    font-size: 11pt !important;

                    /*font-size: 20px !important;*/
                    /* text sits nicely on line 
                }

                /* PAGE 2 LEFT — PRINT */
                    .p2-title {
                        font-size: 14px !important;
                        padding: 6px 8px !important;
                        letter-spacing: 1px !important;
                        background: #c41e3a !important;
                        color: #fff !important;
                        margin-bottom: 5px !important;
                    }

                    .content {
                        padding: 0 !important;
                        flex: 1 !important;
                        display: flex !important;
                        flex-direction: column !important;
                        min-height: 0 !important;
                    }

                    .description {
                        font-size: 11pt !important;
                        line-height: 1.5 !important;
                        margin-bottom: 6px !important;
                    }

                    .diagram {
                        flex: 1 !important;
                        min-height: 0 !important;
                        width: 100% !important;
                        margin: 4px 0 6px 0 !important;
                        display: flex !important;
                        align-items: center !important;
                        justify-content: center !important;
                    }

                    .mi-diagram {
                        width: 100% !important;
                        height: 100% !important;
                        max-width: 100% !important;
                        display: block !important;
                        margin: 0 auto !important;
                        object-fit: contain !important;
                    }

                    .subject-title {
                        font-size: 12px !important;
                        padding: 6px 8px !important;
                        margin: 5px 0 4px 0 !important;
                        background: #c41e3a !important;
                        color: #fff !important;
                        flex-shrink: 0 !important;
                    }

                    .levels-title {
                        font-size: 12px !important;
                        margin: 0 0 4px 0 !important;
                        color: #c41e3a !important;
                        flex-shrink: 0 !important;
                    }

                    .levels-table td {
                        padding: 5px 8px !important;
                        font-size: 12px !important;
                        border: 1px solid #333 !important;
                    }

                    .levels-table td:first-child {
                        width: 60px !important;
                        font-weight: bold !important;
                    }

                    /* PAGE 2 RIGHT — unchanged except marks table */
                    .p2-right-title {
                        font-size: 12px !important;
                        margin-bottom: 3px !important;
                    }

                    .bar-title {
                        font-size: 11pt !important;
                        padding: 3px 0 !important;
                        margin: 0 !important;
                        background: #9fa8d4 !important;
                    }

                    /* ── ONLY MARKS TABLE: slightly bigger than before ── */
                    /* before: height 17px / font 12.5px / padding 2px  */
                    /* now:    height 20px / font 13px   / padding 3px  */



                    /* support & assessment — unchanged from last version */
                    .support-table td,
                    .assessment-table td {
                        padding: 4px 5px !important;
                        font-size: 12px !important;
                        line-height: 1.2 !important;
                    }

                    .support-table td:first-child,
                    .assessment-table td:first-child {
                        width: 45% !important;
                        background: #e9e9e9 !important;
                    }

                    .support-legend {
                        padding: 4px 5px !important;
                        font-size: 10px !important;
                        margin: 3px 0 5px !important;
                        background: #c4161c !important;
                        color: #fffff !important;
                    }

                    /* remarks — unchanged */
                    /*.remarks-box {*/
                    /*    min-height: 20px !important;*/
                    /*    max-height: 42px !important;*/
                    /*    padding: 4px 6px !important;*/
                    /*    margin-top: 5px !important;*/
                    /*    font-size: 11pt !important;*/
                    /*    border: 1px solid #000 !important;*/
                    /*    flex-shrink: 0 !important;*/
                    /*}*/

                    .promotion-section {
                        margin: 5px 0px 5px !important;
                        font-size: 11pt !important;
                        font-family: 'arial' !important;
                        flex-shrink: 0 !important;
                    }

                    .signature-section {
                        margin-top: auto !important;
                        padding-top: 6px !important;
                        font-size: 11pt !important;
                        font-family: 'arial' !important;
                        flex-shrink: 0 !important;
                    }

                    /* PAGE 3 + 4 */
                    .page-title {
                        margin-bottom: 6px !important;
                    }


                    .sub-head {
                        margin: 7px 0 5px !important;
                    }

                    .blank-box {
                        height: 44px !important;
                    }

                    .remarks-line {
                        font-size: 11pt !important;
                        height: 22px !important;
                    }

                    .remarks-heading {
                        font-size: 11pt !important;
                        font-weight: bold !important;
                        margin-top: 6px !important;
                        margin-bottom: 4px !important;
                        display: block !important;
                    }


                    .p4-photo-box {
                        width: 78px !important;
                        height: 95px !important;
                    }

                    .portfolio-title {
                        font-weight: bold !important;
                        font-size: 11pt !important;
                        margin-bottom: 6px !important;
                    }

                    .term-head {
                        background: #b4b4d6 !important;
                    }

                    .health th,
                    .attendance th {
                        background: #b4b4d6 !important;
                    }

                    .skill-table,
                    .rounded {
                        margin: 6px 0 9px !important;
                        border-radius: 8px !important;
                    }

                    .skill-table th,
                    .rounded th {
                        font-size: 11px !important;
                        padding: 3px 4px !important;
                        line-height: 1.3 !important;
                        background: #ffffff !important;
                        color: #000 !important;
                        line-height: 1 !important;
                    }

                    .skill-table td,
                    .rounded td {
                        font-size: 11px !important;
                        padding: 2px 5px !important;
                        line-height: 1 !important;
                    }

                    /*.skill-table tr,*/
                    /*.rounded tr {*/
                    /*    height: 24px !important;*/
                    /*}*/

                    .skill-table td.left.diamond,
                    .rounded td.left.diamond {
                        padding-left: 14px !important;
                    }

                    .skill-table th:nth-child(1),
                    .skill-table td:nth-child(1),
                    .rounded th:nth-child(1),
                    .rounded td:nth-child(1) {
                        width: 72% !important;
                    }

                    /* NO BREAKS INSIDE ELEMENTS */
                    .page,
                    .left-section,
                    .right-section,
                    table,
                    thead,
                    tbody,
                    tr,
                    td,
                    th,
                    .diagram,
                    .remarks-box,
                    .signature-section,
                    .skill-table,
                    .rounded,
                    .marks-table,
                    .support-table,
                    .assessment-table {
                        page-break-inside: avoid !important;
                        break-inside: avoid !important;
                    }


                }
        </style>

    </head>

    <body>

        <!-- ================= PAGE 1 ================= -->
        <div class="wrapper">

            <!-- LEFT PAGE -->
            <div class="page">
                <div class="p1-title">PERIOD ASSESSMENT</div>

                <div class="paragraph">
                    The report card is designed to assess the various areas of ability of the student.
                    Apart from his/her academic achievements, behavioural, mental and physical skills
                    are minutely examined for the overall holistic development of the students.
                </div>

                <div class="sub-title">Grading Scale</div>

                <div class="grading-note">
                    The nine point grading scale for measuring Scholastic achievements
                </div>

                <table class="grading-table">
                    <tr>
                        <th>GRADE</th>
                        <th>MARKS RANGE</th>
                    </tr>
                    <tr>
                        <td>A1</td>
                        <td class="range">91 - 100</td>
                    </tr>
                    <tr>
                        <td>A2</td>
                        <td class="range">81 - 90</td>
                    </tr>
                    <tr>
                        <td>B1</td>
                        <td class="range">71 - 80</td>
                    </tr>
                    <tr>
                        <td>B2</td>
                        <td class="range">61 - 70</td>
                    </tr>
                    <tr>
                        <td>C1</td>
                        <td class="range">51 - 60</td>
                    </tr>
                    <tr>
                        <td>C2</td>
                        <td class="range">41 - 50</td>
                    </tr>
                    <tr>
                        <td>D</td>
                        <td class="range">33 - 40</td>
                    </tr>
                    <tr>
                        <td>E1</td>
                        <td class="range">21 - 32</td>
                    </tr>
                    <tr>
                        <td>E2</td>
                        <td class="range">00 - 20</td>
                    </tr>
                </table>

                <div class="min-note">
                    Minimum qualifying grade in all subjects under Scholastic Domain is D<br>
                    and minimum qualifying marks are 33
                </div>

                <div class="blue-note">
                    <b>Note :</b> All assessment with regard to the academic status of the students
                    shall be done in marks and the
                </div>

                <div class="rules">
                    1. If a student is absent for an assessment whether Examination/Unit Test/Evaluation/Project,
                    he or she cannot appear for it at a later date.<br>
                    2. Promotion depends on the student's performance throughout the year.<br>
                    3. The decision of the Principal with regard to promotion is final.
                </div>

                <div class="footer-note">
                    <b>Note:</b> This Progress Report is the property of the school. Any tear,
                    mutilation or unauthorized alteration of this Report could lead to serious consequences.
                </div>
            </div>

            <!-- RIGHT PAGE -->
            <div class="page">

                <div class="school-header">

                    <div class="school-logo">
                        <?php if (!empty($institutions['logo'])): ?>
                            <img src="<?= htmlspecialchars($institutions['logo']) ?>" alt="School Logo">
                        <?php endif; ?>
                    </div>

                    <div class="school-name">
                        <?= strtoupper(htmlspecialchars($institutions['institution_name'] ?? '')) ?>
                    </div>

                    <!-- LINE 1 : ADDRESS -->
                    <div class="school-address">
                        <?= !empty($branch['address'])
                            ? ucfirst(htmlspecialchars($branch['address']))
                            : '' ?>
                    </div>

                    <!-- LINE 2 : CONTACT + EMAIL + CITY + PINCODE -->
                    <div class="school-meta school-meta-main">

                        <?php if (!empty($branch['city'])): ?>
                            <?= htmlspecialchars($branch['city']) ?>
                        <?php endif; ?>

                        <?php if (!empty($branch['pincode'])): ?>
                            - <?= htmlspecialchars($branch['pincode']) ?>
                        <?php endif; ?>

                        <?php if (!empty($branch['contact_number'])): ?>
                            &nbsp; | ☎ <?= htmlspecialchars($branch['contact_number']) ?>
                        <?php endif; ?>

                        <?php if (!empty($branch['email'])): ?>
                            &nbsp; | ✉ <?= htmlspecialchars($branch['email']) ?>
                        <?php endif; ?>

                    </div>

                    <!-- LINE 3 : AFFILIATION ONLY -->
                    <div class="school-meta school-meta-aff">
                        Affiliation No:
                        <?php if (!empty($branch['affiliation_code'])): ?>
                            <?= htmlspecialchars($branch['affiliation_code']) ?>
                        <?php endif; ?>
                    </div>
                </div>


                <div class="photo-box">
                    <?php if (!empty($students_array[0]['student_image']['filepath'])): ?>
                        <img src="<?= htmlspecialchars($students_array[0]['student_image']['filepath']) ?>" class="student-photo" alt="Student Photo">
                    <?php else: ?>
                        <span>No Photo</span>
                    <?php endif; ?>
                </div>

                <div class="report-title">HOLISTIC PROGRESS REPORT</div>
                <div class="year">2025-2026</div>

                <table class="info-table">
                    <tr>
                        <td width="35%">Name</td>
                        <td>: <span class="line"><?= $students_array[0]['name'] ?? '' ?></span></td>
                    </tr>
                    <tr>
                        <td>Class & Sec.</td>
                        <td>: <span class="line"><?= ($class_id ?? '') . ' ' . ($section_id ?? '') ?></span></td>
                    </tr>
                    <tr>
                        <td>PEN No.</td>
                        <td>: <span class="line"><?= $students_array[0]['penn'] ?? '' ?></span></td>
                    </tr>
                    <tr>
                        <td>Admission No.</td>
                        <td>: <span class="line"><?= $students_array[0]['admission_number'] ?? '' ?></span></td>
                    </tr>
                    <tr>
                        <td>Date of Birth</td>
                        <td>: <span class="line">
                                <?= !empty($students_array[0]['dob'])
                                    ? date('d-m-Y', strtotime($students_array[0]['dob']))
                                    : '' ?>
                            </span></td>
                    </tr>
                    <tr>
                        <td>Father’s Name</td>
                        <td>: <span class="line"><?= $students_array[0]['fathername'] ?? '' ?></span></td>
                    </tr>
                    <tr>
                        <td>Mother’s Name</td>
                        <td>: <span class="line"><?= $students_array[0]['mothername'] ?? '' ?></span></td>
                    </tr>
                </table>

            </div>
        </div>

        <!-- ================= PAGE 2 ================= -->
        <div class="wrapper">

            <!-- LEFT SECTION -->
            <div class="left-section">
                <div class="header"></div>
                <div class="p2-title">HOLISTIC LEARNING</div>

                <div class="content">
                    <div class="description">
                        An approach that seeks to fully activate all aspects of the learner's personality (intellect, emotions, imaginations, body) for more effective and comprehensive learning. It includes the following:
                    </div>

                    <div class="diagram">
                        <img
                            src="https://rejoicebilldesk.in/rjllearning_development/resources/assets/Multiple_Intelligence_Model.svg"
                            alt="Multiple Intelligence Model"
                            class="mi-diagram">
                    </div>


                    <div class="subject-title">SUBJECT WISE PERFORMANCE</div>

                    <div class="levels-title">Levels of performance</div>

                    <table class="levels-table">
                        <tr>
                            <td class="left">Level 1</td>
                            <td class="left">Needs a lot of support of teacher and peers.</td>
                        </tr>
                        <tr>
                            <td class="left">Level 2</td>
                            <td class="left">Able to do with support of teacher/peers.</td>
                        </tr>
                        <tr>
                            <td class="left">Level 3</td>
                            <td class="left">Able to perform expected skills</td>
                        </tr>
                    </table>
                </div>
            </div>

            <!-- RIGHT SECTION -->
            <!-- Right Section -->
            <div class="right-section">
                <div class="header"></div>

                <div class="content">

                    <!-- ✅ MAIN TITLE LIKE PDF -->
                    <div class="p2-right-title">ACADEMIC PERFORMANCE: SCHOLASTIC AREAS</div>
<?php
$late_term2 = strtolower(trim($array[1] ?? '')) == 'lt';
?>

<table class="marks-table">

<thead>
<tr>
<th colspan="6">TERM -II (100 MARKS)</th>
</tr>

<tr>
<th>PT<br>40/4=10</th>
<th>Subject<br>Enrichment<br>5</th>
<th>Note<br>Book<br>5</th>
<th>Half<br>Yearly<br>80</th>
<th>Grand<br>Total<br>100</th>
<th>GRADE</th>
</tr>
</thead>

<tbody>

<?php if($late_term2): ?>

<tr>
<td colspan="6" style="height:220px; position:relative;">

<div style="
position:absolute;
top:50%;
left:50%;
transform:translate(-50%,-80%) rotate(0deg);
font-size:35px;
font-weight:900;
color:rgba(0,0,0,0.25);
letter-spacing:4px;
">
LATE ADMISSION
</div>

</td>
</tr>

<?php else: ?>

<tr>
<td><?= show_val($array[1] ?? null) ?></td>
<td><?= show_val($array[2] ?? null) ?></td>
<td><?= show_val($array[3] ?? null) ?></td>
<td><?= show_val($array[4] ?? null) ?></td>
<td><?= show_val($array[5] ?? null) ?></td>
<td><?= show_val($array[6] ?? null) ?></td>
</tr>

<tr>
<td><?= show_val($array[7] ?? null) ?></td>
<td><?= show_val($array[8] ?? null) ?></td>
<td><?= show_val($array[9] ?? null) ?></td>
<td><?= show_val($array[10] ?? null) ?></td>
<td><?= show_val($array[11] ?? null) ?></td>
<td><?= show_val($array[12] ?? null) ?></td>
</tr>

<tr>
<td><?= show_val($array[13] ?? null) ?></td>
<td><?= show_val($array[14] ?? null) ?></td>
<td><?= show_val($array[15] ?? null) ?></td>
<td><?= show_val($array[16] ?? null) ?></td>
<td><?= show_val($array[17] ?? null) ?></td>
<td><?= show_val($array[18] ?? null) ?></td>
</tr>

<tr>
<td><?= show_val($array[19] ?? null) ?></td>
<td><?= show_val($array[20] ?? null) ?></td>
<td><?= show_val($array[21] ?? null) ?></td>
<td><?= show_val($array[22] ?? null) ?></td>
<td><?= show_val($array[23] ?? null) ?></td>
<td><?= show_val($array[24] ?? null) ?></td>
</tr>

<tr>
<td><?= show_val($array[25] ?? null) ?></td>
<td><?= show_val($array[26] ?? null) ?></td>
<td><?= show_val($array[27] ?? null) ?></td>
<td><?= show_val($array[28] ?? null) ?></td>
<td><?= show_val($array[29] ?? null) ?></td>
<td><?= show_val($array[30] ?? null) ?></td>
</tr>

<tr>
<td><?= show_val($array[31] ?? null) ?></td>
<td><?= show_val($array[32] ?? null) ?></td>
<td><?= show_val($array[33] ?? null) ?></td>
<td><?= show_val($array[34] ?? null) ?></td>
<td><?= show_val($array[35] ?? null) ?></td>
<td><?= show_val($array[36] ?? null) ?></td>
</tr>

<tr>
<td colspan="3"></td>
<td><strong><?= show_val($array[38] ?? null) ?></strong></td>
<td><strong><?= show_val($array[39] ?? null) ?></strong></td>
<td><strong><?= show_val($array[40] ?? null) ?></strong></td>
</tr>

<tr>
<td colspan="5"></td>
<td><?= show_val($array[46] ?? null) ?></td>
</tr>

<tr>
<td colspan="5"></td>
<td><?= show_val($array[52] ?? null) ?></td>
</tr>

<tr>
<td colspan="5"></td>
<td><?= show_val($array[58] ?? null) ?></td>
</tr>

<tr>
<td colspan="4"></td>
<td><?= ($array[59] ?? 0)==0 ? '-' : round($array[59]).'%' ?></td>
<td></td>
</tr>

<?php endif; ?>

</tbody>
</table>


                    <!-- ✅ PARENTAL SUPPORT BAR -->
                    <div class="bar-title">PARENTAL SUPPORT</div>
                    <table class="support-table">
                        <tr>
                            <td>Uniform</td>
                            <td><?= $array[60] ?? '' ?></td>
                            <td><?= $array[61] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td>Circular Follow Up</td>
                            <td><?= $array[62] ?? '' ?></td>
                            <td><?= $array[63] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td>Home Work/Act. Submission</td>
                            <td><?= $array[64] ?? '' ?></td>
                            <td><?= $array[65] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td>PTM/Attendance</td>
                            <td><?= $array[66] ?? '' ?></td>
                            <td><?= $array[67] ?? '' ?></td>
                        </tr>
                    </table>



                    <div class="support-legend">
                        A - Very Supportive | B - Show Support in Some Areas | C - Need to be involved
                    </div>

                    <!-- ✅ TEACHERS ASSESSMENT BAR -->
                    <div class="bar-title">TEACHERS ASSESSMENT</div>
                    <table class="assessment-table">
                        <tr>
                            <td>Personal Hygiene</td>
                            <td><?= $array[68] ?? '' ?></td>
                            <td><?= $array[69] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td>Punctuality</td>
                            <td><?= $array[70] ?? '' ?></td>
                            <td><?= $array[71] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td>Value System</td>
                            <td><?= $array[72] ?? '' ?></td>
                            <td><?= $array[73] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td>Self-confidence</td>
                            <td><?= $array[74] ?? '' ?></td>
                            <td><?= $array[75] ?? '' ?></td>
                        </tr>
                    </table>



                    <!-- ✅ REMARKS BOX LIKE PDF -->
                    <div class="remarks-box">
                        <div class="remarks-heading">Class Teacher's Remarks:</div>
                        <div class="remarks-line"><?= ucwords($array[76]) ?? '' ?></div>
                        
                        <div class="promotion-section">
                            Promoted to Class: <?= $array[77] ?? '' ?>
                        </div>
    
    
                        <div class="signature-section">
                            <div class="signature-item">Class Teacher Signature</div>
                            <div class="signature-item">Headmistress Signature</div>
                            <div class="signature-item">Parents Signature</div>
                        </div>
                        
                    </div>


                </div>
            </div>

        </div>


        <!-- ================= PAGE 3 ================= -->
        <div class="wrapper">

            <!-- LEFT PAGE -->
            <div class="page">

                <div class="page-title">ACADEMIC PERFORMANCE: SCHOLASTIC AREAS</div>

               <?php
$late_term1 = strtolower(trim($array[78] ?? '')) == 'lt';
?>

<table class="marks-table">

<thead>
<tr>
<th colspan="7">TERM - I (100 MARKS)</th>
</tr>

<tr>
<th style="text-align:left !important;">Subject</th>
<th>PT<br>40/4=10</th>
<th>Subject<br>Enrichment<br>5</th>
<th>Note<br>Book<br>5</th>
<th>Half<br>Yearly<br>80</th>
<th>Grand<br>Total<br>100</th>
<th>GRADE</th>
</tr>
</thead>

<tbody>

<?php if($late_term1): ?>

<tr>
<td colspan="7" style="height:240px; position:relative;">

<div style="
position:absolute;
top:50%;
left:50%;
transform:translate(-50%,-80%) rotate(0deg);
font-size:35px;
font-weight:900;
color:rgba(0,0,0,0.25);
letter-spacing:4px;
">
LATE ADMISSION
</div>

</td>
</tr>

<?php else: ?>

<tr>
<td style="text-align:left !important;">English</td>
<td><?= show_val($array[78] ?? null) ?></td>
<td><?= show_val($array[79] ?? null) ?></td>
<td><?= show_val($array[80] ?? null) ?></td>
<td><?= show_val($array[81] ?? null) ?></td>
<td><?= show_val($array[82] ?? null) ?></td>
<td><?= show_val($array[83] ?? null) ?></td>
</tr>

<tr>
<td style="text-align:left !important;">Hindi</td>
<td><?= show_val($array[84] ?? null) ?></td>
<td><?= show_val($array[85] ?? null) ?></td>
<td><?= show_val($array[86] ?? null) ?></td>
<td><?= show_val($array[87] ?? null) ?></td>
<td><?= show_val($array[88] ?? null) ?></td>
<td><?= show_val($array[89] ?? null) ?></td>
</tr>

<tr>
<td style="text-align:left !important;">Punjabi</td>
<td><?= show_val($array[90] ?? null) ?></td>
<td><?= show_val($array[91] ?? null) ?></td>
<td><?= show_val($array[92] ?? null) ?></td>
<td><?= show_val($array[93] ?? null) ?></td>
<td><?= show_val($array[94] ?? null) ?></td>
<td><?= show_val($array[95] ?? null) ?></td>
</tr>

<tr>
<td style="text-align:left !important;">Maths</td>
<td><?= show_val($array[96] ?? null) ?></td>
<td><?= show_val($array[97] ?? null) ?></td>
<td><?= show_val($array[98] ?? null) ?></td>
<td><?= show_val($array[99] ?? null) ?></td>
<td><?= show_val($array[100] ?? null) ?></td>
<td><?= show_val($array[101] ?? null) ?></td>
</tr>

<tr>
<td style="text-align:left !important;">Science</td>
<td><?= show_val($array[102] ?? null) ?></td>
<td><?= show_val($array[103] ?? null) ?></td>
<td><?= show_val($array[104] ?? null) ?></td>
<td><?= show_val($array[105] ?? null) ?></td>
<td><?= show_val($array[106] ?? null) ?></td>
<td><?= show_val($array[107] ?? null) ?></td>
</tr>

<tr>
<td style="text-align:left !important;">S.st</td>
<td><?= show_val($array[108] ?? null) ?></td>
<td><?= show_val($array[109] ?? null) ?></td>
<td><?= show_val($array[110] ?? null) ?></td>
<td><?= show_val($array[111] ?? null) ?></td>
<td><?= show_val($array[112] ?? null) ?></td>
<td><?= show_val($array[113] ?? null) ?></td>
</tr>

<tr>
<td style="text-align:left !important;"><strong>G.Total</strong></td>
<td colspan="3"></td>
<td><strong><?= show_val($array[115] ?? null) ?></strong></td>
<td><strong><?= show_val($array[116] ?? null) ?></strong></td>
<td><strong><?= show_val($array[117] ?? null) ?></strong></td>
</tr>

<tr>
<td style="text-align:left !important;" colspan="6">Drawing</td>
<td><?= show_val($array[123] ?? null) ?></td>
</tr>

<tr>
<td style="text-align:left !important;" colspan="6">Computer</td>
<td><?= show_val($array[129] ?? null) ?></td>
</tr>

<tr>
<td style="text-align:left !important;" colspan="6">Phy.Edu. / Apt.</td>
<td><?= show_val($array[135] ?? null) ?></td>
</tr>

<tr>
<td style="text-align:left !important;" colspan="5">Percentage</td>
<td><?= ($array[136] ?? 0)==0 ? '-' : round($array[136]).'%' ?></td>
<td></td>
</tr>

<?php endif; ?>

</tbody>
</table>



                <div style="height:18px;"></div>

                <div class="sub-head">CO-SCHOLASTICS AREAS</div>

                <table class="health">
                    <tr>
                        <th colspan="4" class="left">HEALTH STATUS</th>
                    </tr>
                    <tr>
                        <td class="left">Height</td>
                        <td><?= $array[137] ?? '' ?></td>
                        <td class="left">Weight</td>
                        <td><?= $array[138] ?? '' ?></td>
                    </tr>
                    <tr>
                        <td class="left">Blood Group</td>
                        <td colspan="3"><?= $array[139] ?? '' ?></td>
                    </tr>
                </table>


                <div style="height:18px;"></div>

                <table class="attendance">
                    <tr>
                        <th class="left">ATTENDANCE</th>
                        <th>TERM I</th>
                        <th>TERM II</th>
                        <th>TOTAL</th>
                    </tr>
                    <tr>
                        <td class="left">No of Working Days</td>
                        <td><?= $array[140] ?? '' ?></td>
                        <td><?= $array[141] ?? '' ?></td>
                        <td><?= $array[142] ?? '' ?></td>
                    </tr>
                    <tr>
                        <td class="left">Days Attended</td>
                        <td><?= $array[143] ?? '' ?></td>
                        <td><?= $array[144] ?? '' ?></td>
                        <td><?= $array[145] ?? '' ?></td>
                    </tr>
                    <tr>
                        <td class="left">Attendance %</td>
                        <td><?= $array[146] ?? '' ?></td>
                        <td><?= $array[147] ?? '' ?></td>
                        <td><?= $array[148] ?? '' ?></td>
                    </tr>
                </table>



                <div style="height:18px;"></div>


<table>
    <tr>
        <th class="left">Competition</th>
    </tr>
    <tr>
        <td class="blank-box" style="text-align:left !important;">
            <?= nl2br($array[149]) ?? '' ?>
            <?php if ($array[150] != '' && $array[150] != null) echo '<br>' . $array[150]; ?>
        </td>
    </tr>
</table>

                <div class="remarks-box">
                    <div class="remarks-heading">Class Teacher's Remarks:</div>
                    <div class="remarks-line"><?= ucwords($array[151]) ?? '' ?></div>
                </div>

            </div>

            <!-- RIGHT PAGE -->
            <!-- RIGHT PAGE -->
            <div class="page flex-column">

                <div class="portfolio-title">
                    BASED ON PORTFOLIO, SUBJECT ENRICHMENT<br>
                    Activities and Class Activities
                </div>

                <div>
                    <div class="section-title">1. Linguistic Intelligence</div>
                    <!-- ENGLISH -->
                    <table class="skill-table">
                        <tr>
                            <th class="left">ENGLISH</th>
                            <th>TERM I</th>
                            <th>TERM II</th>
                        </tr>
                        <tr>
                            <td class="left diamond">Able to read and understand the text easily.</td>
                            <td><?= $array[152] ?? '' ?></td>
                            <td><?= $array[153] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td class="left diamond">Remember written and spoken Information.</td>
                            <td><?= $array[154] ?? '' ?></td>
                            <td><?= $array[155] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td class="left diamond">Able to write grammatically correct sentences.</td>
                            <td><?= $array[156] ?? '' ?></td>
                            <td><?= $array[157] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td class="left diamond">Is able to explain text well.</td>
                            <td><?= $array[158] ?? '' ?></td>
                            <td><?= $array[159] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td class="left diamond">Can comprehend and extract relevant information using reading skills</td>
                            <td><?= $array[160] ?? '' ?></td>
                            <td><?= $array[161] ?? '' ?></td>
                        </tr>
                    </table>
                </div>

                <!-- HINDI -->
                <table class="skill-table">
                    <tr>
                        <th class="left">HINDI</th>
                        <th>TERM I</th>
                        <th>TERM II</th>
                    </tr>
                    <tr>
                        <td class="left diamond">Able to read and understand the text easily.</td>
                        <td><?= $array[162] ?? '' ?></td>
                        <td><?= $array[163] ?? '' ?></td>
                    </tr>
                    <tr>
                        <td class="left diamond">Remember written and spoken Information.</td>
                        <td><?= $array[164] ?? '' ?></td>
                        <td><?= $array[165] ?? '' ?></td>
                    </tr>
                    <tr>
                        <td class="left diamond">Able to write grammatically correct sentences.</td>
                        <td><?= $array[166] ?? '' ?></td>
                        <td><?= $array[167] ?? '' ?></td>
                    </tr>
                    <tr>
                        <td class="left diamond">Is able to explain text well.</td>
                        <td><?= $array[168] ?? '' ?></td>
                        <td><?= $array[169] ?? '' ?></td>
                    </tr>
                    <tr>
                        <td class="left diamond">Can comprehend and extract relevant information using reading skills</td>
                        <td><?= $array[170] ?? '' ?></td>
                        <td><?= $array[171] ?? '' ?></td>
                    </tr>
                </table>

                <!-- PUNJABI -->
                <table class="skill-table">
                    <tr>
                        <th class="left">PUNJABI</th>
                        <th>TERM I</th>
                        <th>TERM II</th>
                    </tr>
                    <tr>
                        <td class="left diamond">Able to read and understand the text easily.</td>
                        <td><?= $array[172] ?? '' ?></td>
                        <td><?= $array[173] ?? '' ?></td>
                    </tr>
                    <tr>
                        <td class="left diamond">Remember written and spoken Information.</td>
                        <td><?= $array[174] ?? '' ?></td>
                        <td><?= $array[175] ?? '' ?></td>
                    </tr>
                    <tr>
                        <td class="left diamond">Able to write grammatically correct sentences.</td>
                        <td><?= $array[176] ?? '' ?></td>
                        <td><?= $array[177] ?? '' ?></td>
                    </tr>
                    <tr>
                        <td class="left diamond">Is able to explain text well.</td>
                        <td><?= $array[178] ?? '' ?></td>
                        <td><?= $array[179] ?? '' ?></td>
                    </tr>
                    <tr>
                        <td class="left diamond">Can comprehend and extract relevant information using reading skills</td>
                        <td><?= $array[180] ?? '' ?></td>
                        <td><?= $array[181] ?? '' ?></td>
                    </tr>
                </table>
                
                <div>
                    <div class="section-title">2. Logical Mathematical Intelligence</div>
    
                    <!-- MATHEMATICS -->
                    <table class="skill-table">
                        <tr>
                            <th class="left">MATHEMATICS</th>
                            <th>TERM I</th>
                            <th>TERM II</th>
                        </tr>
                        <tr>
                            <td class="left diamond">Enjoy working with numbers, has number sense.</td>
                            <td><?= $array[182] ?? '' ?></td>
                            <td><?= $array[183] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td class="left diamond">Able to do accurate calculation.</td>
                            <td><?= $array[184] ?? '' ?></td>
                            <td><?= $array[185] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td class="left diamond">Ability to think conceptually.</td>
                            <td><?= $array[186] ?? '' ?></td>
                            <td><?= $array[187] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td class="left diamond">Application of the concept in the real life situation</td>
                            <td><?= $array[188] ?? '' ?></td>
                            <td><?= $array[189] ?? '' ?></td>
                        </tr>
                    </table>
                </div>


            </div>

        </div>

        <!-- ================= PAGE 4 ================= -->
        <!-- ================= PAGE 4 ================= -->
        <div class="wrapper">

            <!-- LEFT PAGE -->
            <div class="page flex-column">

                <table class="rounded">
                    <tr>
                        <th class="left">SCIENCE</th>
                        <th>TERM I</th>
                        <th>TERM II</th>
                    </tr>
                    <tr>
                        <td class="left diamond">Is Curious to discover facts .</td>
                        <td><?= $array[190] ?? '' ?></td>
                        <td><?= $array[191] ?? '' ?></td>
                    </tr>
                    <tr>
                        <td class="left diamond">Able to analyze and interpret experiments and demonstration.</td>
                        <td><?= $array[192] ?? '' ?></td>
                        <td><?= $array[193] ?? '' ?></td>
                    </tr>
                    <tr>
                        <td class="left diamond">Can draw conclusion from what he observes..</td>
                        <td><?= $array[194] ?? '' ?></td>
                        <td><?= $array[195] ?? '' ?></td>
                    </tr>
                </table>

                <table class="rounded">
                    <tr>
                        <th class="left">SOCIAL STUDIES</th>
                        <th>TERM I</th>
                        <th>TERM II</th>
                    </tr>
                    <tr>
                        <td class="left diamond">Show interest in knowing facts .</td>
                        <td><?= $array[196] ?? '' ?></td>
                        <td><?= $array[197] ?? '' ?></td>
                    </tr>
                    <tr>
                        <td class="left diamond">Enthusiastically participates in all activities.</td>
                        <td><?= $array[198] ?? '' ?></td>
                        <td><?= $array[199] ?? '' ?></td>
                    </tr>
                    <tr>
                        <td class="left diamond">Like interpretation and case studies. </td>
                        <td><?= $array[200] ?? '' ?></td>
                        <td><?= $array[201] ?? '' ?></td>
                    </tr>
                    <tr>
                        <td class="left diamond">Enjoy doing map work. accurately and neatly</td>
                        <td><?= $array[202] ?? '' ?></td>
                        <td><?= $array[203] ?? '' ?></td>
                    </tr>
                </table>

                <table class="rounded">
                    <tr>
                        <th class="left">COMPUTER EDUCATION</th>
                        <th>TERM I</th>
                        <th>TERM II</th>
                    </tr>
                    <tr>
                        <td class="left diamond">Have excellent problem solving skill.</td>
                        <td><?= $array[204] ?? '' ?></td>
                        <td><?= $array[205] ?? '' ?></td>
                    </tr>
                    <tr>
                        <td class="left diamond">Understanding of Concept.</td>
                        <td><?= $array[206] ?? '' ?></td>
                        <td><?= $array[207] ?? '' ?></td>
                    </tr>
                    <tr>
                        <td class="left diamond">Able to do creative work and designs documents well.</td>
                        <td><?= $array[208] ?? '' ?></td>
                        <td><?= $array[209] ?? '' ?></td>
                    </tr>
                </table>

                <div>
                    <div class="section-title">3. Visual - Spatial Intelligence</div>
                    <table class="rounded">
                        <tr>
                            <th class="left">DRAWING / ART & CRAFT</th>
                            <th>TERM I</th>
                            <th>TERM II</th>
                        </tr>
                        <tr>
                            <td class="left diamond">Enjoy Drawing, painting and visual Art.</td>
                            <td><?= $array[210] ?? '' ?></td>
                            <td><?= $array[211] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td class="left diamond">Participation in Art and Craft work.</td>
                            <td><?= $array[212] ?? '' ?></td>
                            <td><?= $array[213] ?? '' ?></td>
                        </tr>
                    </table>
                </div>


                <div>
                    <div class="section-title">4. Bodily Kinesthetics Intelligence</div>
                    <table class="rounded">
                        <tr>
                            <th class="left">HEALTH AND FITNESS</th>
                            <th>TERM I</th>
                            <th>TERM II</th>
                        </tr>
                        <tr>
                            <td class="left diamond">Actively participates in sports.</td>
                            <td><?= $array[214] ?? '' ?></td>
                            <td><?= $array[215] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td class="left diamond">Ability to co-ordinates physical movements.</td>
                            <td><?= $array[216] ?? '' ?></td>
                            <td><?= $array[217] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td class="left diamond">Have a good sense of timing.</td>
                            <td><?= $array[218] ?? '' ?></td>
                            <td><?= $array[219] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td class="left diamond">Understands and follow instruction</td>
                            <td><?= $array[220] ?? '' ?></td>
                            <td><?= $array[221] ?? '' ?></td>
                        </tr>
                    </table>
                </div>

            </div>


            <!-- RIGHT PAGE -->
            <div class="page flex-column">
                
                <div>
                    
                    <div class="section-title">5. Musical Rhythmic Intelligence</div>

                    <table class="rounded">
                    <tr>
                        <th class="left">MUSIC / DANCE</th>
                        <th>TERM I</th>
                        <th>TERM II</th>
                    </tr>
                    <tr>
                        <td class="left diamond">Enjoy singing and playing musical instruments.</td>
                        <td><?= $array[222] ?? '' ?></td>
                        <td><?= $array[223] ?? '' ?></td>
                    </tr>
                    <tr>
                        <td class="left diamond">Remember songs and melodies.</td>
                        <td><?= $array[224] ?? '' ?></td>
                        <td><?= $array[225] ?? '' ?></td>
                    </tr>
                    <tr>
                        <td class="left diamond">Follow dance steps well.</td>
                        <td><?= $array[226] ?? '' ?></td>
                        <td><?= $array[227] ?? '' ?></td>
                    </tr>
                    <tr>
                        <td class="left diamond">Is compatible with other dancers</td>
                        <td><?= $array[228] ?? '' ?></td>
                        <td><?= $array[229] ?? '' ?></td>
                    </tr>
                </table>
                    
                </div>
                
                <div>
                    <div class="section-title">6. Naturalistic Intelligence</div>
                    <table class="rounded">
                        <tr>
                            <th class="left"></th>
                            <th>TERM I</th>
                            <th>TERM II</th>
                        </tr>
                        <tr>
                            <td class="left diamond">Categorize information easily.</td>
                            <td><?= $array[230] ?? '' ?></td>
                            <td><?= $array[231] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td class="left diamond">Enjoy camping, exploring the outdoor trips.</td>
                            <td><?= $array[232] ?? '' ?></td>
                            <td><?= $array[233] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td class="left diamond">Has ability to adapt a changing environment.</td>
                            <td><?= $array[234] ?? '' ?></td>
                            <td><?= $array[235] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td class="left diamond">Likes to keep the environment clean</td>
                            <td><?= $array[236] ?? '' ?></td>
                            <td><?= $array[237] ?? '' ?></td>
                        </tr>
                    </table>
                </div>
                
                <div>
                    <div class="section-title">7. Interpersonal Intelligence</div>
                    <table class="rounded">
                        <tr>
                            <th class="left"></th>
                            <th>TERM I</th>
                            <th>TERM II</th>
                        </tr>
                        <tr>
                            <td class="left diamond">Follow self discipline.</td>
                            <td><?= $array[238] ?? '' ?></td>
                            <td><?= $array[239] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td class="left diamond">See situation from different perspective.</td>
                            <td><?= $array[240] ?? '' ?></td>
                            <td><?= $array[241] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td class="left diamond">Can deal with distractions.</td>
                            <td><?= $array[242] ?? '' ?></td>
                            <td><?= $array[243] ?? '' ?></td>
                        </tr>
                    </table>
                </div>

                <div>
                    <div class="section-title">8. Intrapersonal Intelligence</div>
                    <table class="rounded">
                        <tr>
                            <th class="left"></th>
                            <th>TERM I</th>
                            <th>TERM II</th>
                        </tr>
                        <tr>
                            <td class="left diamond">Communicate well verbally.</td>
                            <td><?= $array[244] ?? '' ?></td>
                            <td><?= $array[245] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td class="left diamond">Create positive relationship with others</td>
                            <td><?= $array[246] ?? '' ?></td>
                            <td><?= $array[247] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td class="left diamond">Accomplishes small task well</td>
                            <td><?= $array[248] ?? '' ?></td>
                            <td><?= $array[249] ?? '' ?></td>
                        </tr>
                    </table>
                </div>
                
                <div>
                    <div class="section-title">9. Existential Intelligence</div>
                    <table class="rounded">
                        <tr>
                            <th class="left">Value Education/Yoga and Meditation</th>
                            <th>TERM I</th>
                            <th>TERM II</th>
                        </tr>
                        <tr>
                            <td class="left diamond">Observes values taught in the class.</td>
                            <td><?= $array[250] ?? '' ?></td>
                            <td><?= $array[251] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td class="left diamond">Meditates regularly and enjoys Yoga practice.</td>
                            <td><?= $array[252] ?? '' ?></td>
                            <td><?= $array[253] ?? '' ?></td>
                        </tr>
                        <tr>
                            <td class="left diamond">Can think critically and objectively</td>
                            <td><?= $array[254] ?? '' ?></td>
                            <td><?= $array[255] ?? '' ?></td>
                        </tr>
                    </table>
                </div>


            </div>

        </div>



    </body>

    </html>
<?php
}
?>