
    <!-- Template for JAWAHARLAL COLLEGE PG-->
<style>
    .font-1 {
        font-family: 'Times New Roman', serif !important;
    }

    @font-face {
        font-family: "Algerian";
        font-style: normal;
        font-weight: 400;
        src: local("Algerian"), url("../libcommon/font/ALGERIA.ttf") format("truetype");
    }

    .banner-container {
        text-align: center;
    }

    .banner-img {
        height: 35mm;
        width: auto;
        display: inline-block;
    }

    .date-line {
        text-align: right;
        font-weight: bold;
        font-size: 11pt;
        margin-top: 6mm;
        margin-bottom: 4mm;
    }

    .cert-title {
        text-align: center;
        font-size: 14pt;
        font-weight: bold;
        margin-top: 8mm;
        margin-bottom: 8mm;
    }

    .intro-text {
        font-size: 11pt;
        margin-bottom: 6mm;
        line-height: 150%;
    }

    .fields-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 11pt;
        margin-bottom: 4mm;
    }

    .fields-table td {
        padding: 4px 6px;
        vertical-align: top;
        border: none;
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .field-label {
        width: 45%;
        font-style: italic;
    }

    .field-value {
        width: 55%;
        font-weight: bold;
        font-style: italic;
    }

    .watermark {
        opacity: 0.15;
        position: absolute;
        left: 50%;
        top: 45%;
        transform: translate(-50%, -50%);
        pointer-events: none;
        object-fit: contain;
    }

    .cert-bottom-section {
        margin-top: 10mm;
        display: table;
        width: 100%;
    }

    .cert-bottom-left {
        display: table-cell;
        vertical-align: bottom;
        width: 35%;
    }

    .cert-bottom-right {
        display: table-cell;
        vertical-align: bottom;
        text-align: right;
        font-size: 11pt;
        font-weight: bold;
        padding-bottom: 5mm;
    }

    .cert-footer-line {
        margin-top: 4mm;
        padding-top: 2mm;
        display: table;
        width: 100%;
        font-size: 9pt;
    }

    .cert-footer-left {
        display: table-cell;
        text-align: left;
    }

    .cert-footer-right {
        display: table-cell;
        text-align: right;
    }

    @media print {
        html, body {
            margin: 0 !important;
        }
    }
</style>

{% for student in data.studentData %}
    {% if student.failedStatus == 'PASSED' %}
    <div class="inline font-1" style="font-size:12pt; page-break-before:always; width:210mm; height:297mm; border:1px solid transparent; margin:auto auto 5px auto !important;">
        <div class="outer-border" style="position: relative;">

            <!-- BANNER -->
            {% if data.additionalInfo.displayBanner %}
            <div class="banner-container">
                <img src="{{data.collegeData.collegeHeader}}" class="banner-img">
            </div>
            {% endif %}

            <!-- DATE -->
            <div class="date-line">{{data.additionalInfo.currentDate}}</div>

            <!-- TITLE -->
            <div class="cert-title">PROVISIONAL DEGREE CERTIFICATE</div>

            <!-- INTRO -->
            <div class="intro-text">
                This is to certify that the following candidate has qualified for the award of the degree as detailed below:
            </div>

            <!-- FIELDS TABLE -->
            <table class="fields-table">
                <tr>
                    <td class="field-label">Name</td>
                    <td style="width:3%">:</td>
                    <td class="field-value">{{student.name}}</td>
                </tr>
                <tr>
                    <td class="field-label">Register Number</td>
                    <td>:</td>
                    <td class="field-value">{{student.regNo}}</td>
                </tr>
                <tr>
                    <td class="field-label">Department</td>
                    <td>:</td>
                    <td class="field-value">{{student.departmentDesc}}</td>
                </tr>
                <tr>
                    <td class="field-label">Degree</td>
                    <td>:</td>
                    {% if student.degreeName == 'MCA' or student.degreeName == 'MBA' %}
                        <td class="field-value">{{student.subsidiaryCourseName ?: student.streamDesc}}</td>
                    {% else %}
                        <td class="field-value">{{student.degreeName}} in {{student.subsidiaryCourseName ?: student.streamDesc}}</td>
                    {% endif %}
                </tr>
                <tr>
                    <td class="field-label">Month &amp; Year of Passing</td>
                    <td>:</td>
                    <td class="field-value">{{student.latestMonthYear}}</td>
                </tr>
                <tr>
                    <td class="field-label">Affiliating University</td>
                    <td>:</td>
                    <td class="field-value">
                        APJ Abdul Kalam Technological University<br>
                        Thiruvananthapuram, Kerala
                    </td>
                </tr>
                <tr>
                    <td class="field-label">Cumulative Grade Point Average (CGPA)</td>
                    <td>:</td>
                    <td class="field-value">{{student.cgpa}}</td>
                </tr>
                <tr>
                    <td class="field-label">Class Obtained</td>
                    <td>:</td>
                    <td class="field-value">{{student.markDetails.class}}</td>
                </tr>
                <tr>
                    <td class="field-label">Percentage of Marks Obtained</td>
                    <td>:</td>
                    <td class="field-value">{{student.percentage}}</td>
                </tr>
            </table>

            <!-- WATERMARK -->
            {% if data.additionalInfo.displayWatermark %}
            <img class="watermark" src="{{data.collegeData.waterMarkFcm}}" />
            {% endif %}

            <!-- BOTTOM: QR + CONTROLLER -->
            <div class="cert-bottom-section">
                <div class="cert-bottom-left">
                    <img style="width:25mm; height:25mm;" src="{{ getQr(student.qrData, 250, 0, 'L') }}"/>
                </div>
                <div class="cert-bottom-right">
                    Controller of Examinations
                </div>
            </div>

            <!-- FOOTER -->
            <div class="cert-footer-line">
                <div class="cert-footer-left">Certificate Number: {{student.admissionYear}}/PG/PC/{{student.slNo}}</div>
                <div class="cert-footer-right">Generated on: {{data.additionalInfo.generatedOn}}</div>
            </div>

        </div>
    </div>
    {% endif %}
{% endfor %}
