{# <!--
    College header SEC(St edmund's college) UG
--> #}
{% set markDivwidth = 50  %}
{% if ('eleventhMarkEntry' in allFormFields or 'ELEVENTH' in allFormFields) %}
    {% set markDivwidth = 33.33  %}
{% endif %}
<html>
    <head>
    <style>
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        body {
            font-family: 'Times New Roman', Times, serif;
            font-size: 13px;
            color: #000;
            background: #fff;
        }
        .page-wrapper {
            width: 100%;
            max-width: 820px;
            margin: 0 auto;
            padding: 16px;
        }

        /* ── Header ── */
        .header-table {
            width: 100%;
            border-collapse: collapse;
            padding-bottom: 8px;
            margin-bottom: 10px;
        }
        .header-table td {
            vertical-align: middle;
            padding: 4px 6px;
        }
        .college-logo {
            width: 80px;
            height: auto;
        }
        .college-name {
            font-size: 20px;
            font-weight: bold;
            text-align: center;
            letter-spacing: 0.5px;
            margin-bottom: 3px;
        }
        .college-info {
            font-size: 11.5px;
            text-align: center;
            line-height: 1.5;
            color: #222;
        }
        .form-title {
            font-size: 13px;
            font-weight: bold;
            text-align: center;
            margin-top: 5px;
            display: inline-block;
        }
        .app-no-badge {
            font-size: 13px;
            font-weight: bold;
            color: #c00;
            text-align: center;
            margin-top: 4px;
            letter-spacing: 0.5px;
        }
        .student-photo {
            width: 90px;
            height: 110px;
            border: 1px solid #555;
            display: block;
            margin-left: auto;
            object-fit: cover;
        }

        /* ── Student Details Card ── */
        .details-card {
            width: 100%;
            border-collapse: collapse;
            border: 1.5px solid #5c5c5c;
            border-top: none;
            margin-top: 8px;
        }
        .details-card .section-header {
            background-color: #e0e0e0;
            font-size: 12px;
            font-weight: bold;
            text-align: center;
            padding: 5px 8px;
        }
        .details-card td {
            vertical-align: top;
            padding: 5px 8px;
            line-height: 1.5;
            border: 1px solid #5c5c5c;
            font-size: 12.5px;
        }
        .label-cell {
            width: 30%;
            font-weight: bold;
            color: #111;
            white-space: nowrap;
        }
        .colon-cell {
            width: 3%;
            text-align: center;
            font-weight: bold;
            color: #111;
        }
        .value-cell {
            width: 67%;
        }

        /* ── Disclaimer ── */
        .disclaimer-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
            border: 1px solid #5c5c5c;
        }
        .disclaimer-table thead tr th {
            background-color: #e0e0e0;
            font-size: 12px;
            font-weight: bold;
            text-align: center;
            padding: 5px 8px;
            border: 1px solid #5c5c5c;
        }
        .disclaimer-table tbody tr td {
            font-size: 12.5px;
            line-height: 1.7;
            text-align: justify;
            padding: 10px 14px;
            border: 1px solid #5c5c5c;
        }

        /* ── Signature Fields ── */
        .signature-section {
            margin-top: 30px;
            width: 100%;
            border-collapse: collapse;
        }
        .signature-section td {
            width: 50%;
            padding: 0 10px;
            vertical-align: bottom;
            font-size: 12.5px;
        }
        .signature-line {
            border-top: 1px solid #000;
            margin-top: 40px;
            padding-top: 4px;
            text-align: center;
        }
    </style>
    </head>
    <body>
        <div class='page-wrapper'>

            {# ── College Header ── #}
            <table class='header-table'>
                <tr>
                    <td width='10%' align='center'>
                        <img class='college-logo' src="{{college.url}}/libcommon/images/college/{{college.collegeCode}}/logo.png" alt=''>
                        <div class='app-no-badge'>{{student.applicationNo}}</div>
                    </td>
                    <td width='78%' align='center'>
                        <div class='college-name'>
                            {{college.collegeName|upper}}
                            {{college.autonomous ? (college.autonomous|slice(0,2)|upper ~ college.autonomous|slice(2)|lower) : ''}}
                        </div>
                        <div class='college-info'>
                            {{college.collegeAddress}} {{college.collegeAddress1}} {{college.collegeAddress2}}<br>
                            {{college.collegePhone}} &nbsp;|&nbsp; {{college.collegeWebsite}}<br>
                            {{college.collegeEmail}}
                        </div>
                        <div style='text-align:center; margin-top:6px;'>
                            <span class='form-title'>{{form.name|upper}}</span>
                        </div>
                    </td>
                    <td width='12%' align='right'>
                        <img class='student-photo' src="{{student.studentPhoto}}" alt=''>
                    </td>
                </tr>
            </table>
            <br><br><br><br><br>
            {# ── Student Details ── #}
            <table class='details-card'>
                <tr>
                    <td colspan='3' class='section-header'>STUDENT DETAILS</td>
                </tr>
                <tr>
                    <td class='label-cell'>Name</td>
                    <td class='colon-cell'>:</td>
                    <td class='value-cell'><b>{{student.studentFirstName|upper}}</b></td>
                </tr>
                <tr>
                    <td class='label-cell'>College Roll No</td>
                    <td class='colon-cell'>:</td>
                    <td class='value-cell'>{{student.academicsRollNo}}</td>
                </tr>
                <tr>
                    <td class='label-cell'>Email</td>
                    <td class='colon-cell'>:</td>
                    <td class='value-cell'>{{student.studentEmail}}</td>
                </tr>
                <tr>
                    <td class='label-cell'>Mobile No</td>
                    <td class='colon-cell'>:</td>
                    <td class='value-cell'>{{student.studentMobile}}</td>
                </tr>
                <tr>
                    <td class='label-cell'>Major</td>
                    <td class='colon-cell'>:</td>
                    <td class='value-cell'>{{student.major}}</td>
                </tr>
                <tr>
                    <td class='label-cell'>Minor</td>
                    <td class='colon-cell'>:</td>
                    <td class='value-cell'>{{student.mINOR}}</td>
                </tr>
                <tr>
                    <td class='label-cell'>Back Paper</td>
                    <td class='colon-cell'>:</td>
                    <td class='value-cell'>{{student.backPaper}}</td>
                </tr>
                <tr>
                    <td class='label-cell'>No of Back Papers</td>
                    <td class='colon-cell'>:</td>
                    <td class='value-cell'>{{student.specifyNoOfBackPaper}}</td>
                </tr>
            </table>

            {# ── Disclaimer ── #}
            <table class='disclaimer-table'>
                <thead>
                    <tr>
                        <th>DECLARATION</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>I, the undersigned, formally declare that I wish to take provisional admission in the fourth-year UG Honours programme. If the department I am applying to does not receive the required number of students, I understand that the College will refund the amount after officially declaring the same.</td>
                    </tr>
                </tbody>
            </table>

            {# ── Signature Fields ── #}
            <table class='signature-section'>
                <tr>
                    <td>
                        <div class='signature-line'>Signature of the Student</div>
                    </td>
                    <td>
                        <div class='signature-line'>Signature of the Parent / Guardian</div>
                    </td>
                </tr>
            </table>

        </div>
    </body>
</html>
