<div style="

    width:340px;
    height:210px;
    background:linear-gradient(135deg,#6610f2,#0dcaf0);
    border-radius:16px;
    overflow:hidden;
    position:relative;
    color:#ffffff;
    box-shadow:0 4px 12px rgba(0,0,0,0.2);

">

    <!-- Top -->

    <div style="
        padding:12px;
        text-align:center;
    ">

        <div style="
            font-size:20px;
            font-weight:bold;
            letter-spacing:1px;
        ">

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

        </div>

        <div style="
            font-size:12px;
            margin-top:3px;
        ">

            SMART STUDENT IDENTITY CARD

        </div>

    </div>

    <!-- Main -->

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

        <!-- Photo -->

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

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

                <img
                    src="../uploads/students/<?= htmlspecialchars($student['photo']) ?>"
                    style="
                        width:90px;
                        height:100px;
                        border-radius:12px;
                        border:3px solid #ffffff;
                        object-fit:cover;
                    ">

            <?php else: ?>

                <div style="

                    width:90px;
                    height:100px;
                    border-radius:12px;
                    border:3px solid #ffffff;
                    background:rgba(255,255,255,0.2);
                    display:flex;
                    align-items:center;
                    justify-content:center;
                    font-size:12px;

                ">

                    No Photo

                </div>

            <?php endif; ?>

        </div>

        <!-- Details -->

        <div style="
            flex:1;
            padding-left:15px;
            font-size:13px;
            line-height:1.8;
        ">

            <div>

                <strong>Name:</strong><br>

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

            </div>

            <div>

                <strong>Father:</strong><br>

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

            </div>

            <div>

                <strong>Class:</strong>

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

                /

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

            </div>

            <div>

                <strong>Roll:</strong>

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

            </div>

            <div>

                <strong>Admission:</strong>

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

            </div>

        </div>

    </div>

    <!-- Footer -->

    <div style="

        position:absolute;
        bottom:0;
        width:100%;
        padding:8px;
        background:rgba(0,0,0,0.2);
        text-align:center;
        font-size:11px;
        letter-spacing:0.5px;

    ">

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

    </div>

</div>