<div style="

    width:330px;
    height:190px;
    background:#ffffff;
    border-radius:14px;
    overflow:hidden;
    position:relative;
    border-left:10px solid #198754;
    box-shadow:0 4px 12px rgba(0,0,0,0.12);
    font-family:Arial,sans-serif;

">

    <!-- Header -->

    <div style="

        padding:12px 15px;
        border-bottom:1px solid #e5e5e5;

    ">

        <div style="
            font-size:18px;
            font-weight:bold;
            color:#198754;
        ">

            <?= htmlspecialchars($school['school_name'] ?? 'School Name') ?>

        </div>

        <div style="
            font-size:11px;
            color:#666;
            margin-top:2px;
        ">

            OFFICIAL STUDENT IDENTITY CARD

        </div>

    </div>

    <!-- Body -->

    <div style="
        display:flex;
        padding:12px 15px;
    ">

        <!-- Left Details -->

        <div style="
            flex:1;
            font-size:13px;
            line-height:1.8;
            color:#222;
        ">

            <div>

                <strong>Name:</strong>

                <?= htmlspecialchars($student['name']) ?>

            </div>

            <div>

                <strong>Class:</strong>

                <?= htmlspecialchars($student['class_name']) ?>

            </div>

            <div>

                <strong>Section:</strong>

                <?= htmlspecialchars($student['section']) ?>

            </div>

            <div>

                <strong>Roll No:</strong>

                <?= htmlspecialchars($student['roll_no']) ?>

            </div>

            <div>

                <strong>Admission No:</strong>

                <?= htmlspecialchars($student['admission_no']) ?>

            </div>

            <div>

                <strong>Phone:</strong>

                <?= htmlspecialchars($student['phone']) ?>

            </div>

        </div>

        <!-- Photo -->

        <div style="
            width:100px;
            text-align:center;
        ">

            <?php if(!empty($student['photo'])): ?>

                <img
                    src="../uploads/students/<?= htmlspecialchars($student['photo']) ?>"
                    style="
                        width:85px;
                        height:95px;
                        object-fit:cover;
                        border-radius:10px;
                        border:2px solid #198754;
                    ">

            <?php else: ?>

                <div style="

                    width:85px;
                    height:95px;
                    border-radius:10px;
                    border:2px solid #198754;
                    background:#f1f1f1;
                    display:flex;
                    align-items:center;
                    justify-content:center;
                    font-size:12px;
                    color:#666;

                ">

                    No Photo

                </div>

            <?php endif; ?>

        </div>

    </div>

    <!-- Footer -->

    <div style="

        position:absolute;
        bottom:0;
        width:100%;
        background:#198754;
        color:#ffffff;
        text-align:center;
        font-size:11px;
        padding:7px;

    ">

        Academic Session :
        <?= htmlspecialchars($student['session_name']) ?>

    </div>

</div>