<div style="

    width:250px;
    height:380px;
    background:#ffffff;
    border-radius:18px;
    overflow:hidden;
    position:relative;
    border:3px solid #fd7e14;
    box-shadow:0 5px 15px rgba(0,0,0,0.15);
    font-family:Arial,sans-serif;

">

    <!-- Header -->

    <div style="

        background:#fd7e14;
        color:#ffffff;
        text-align:center;
        padding:16px 10px;

    ">

        <div style="
            font-size:20px;
            font-weight:bold;
            line-height:1.3;
        ">

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

        </div>

        <div style="
            margin-top:6px;
            font-size:12px;
            letter-spacing:1px;
        ">

            STUDENT ID CARD

        </div>

    </div>

    <!-- Photo -->

    <div style="
        text-align:center;
        margin-top:18px;
    ">

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

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

        <?php else: ?>

            <div style="

                width:110px;
                height:120px;
                margin:auto;
                border-radius:12px;
                border:3px solid #fd7e14;
                background:#f1f1f1;
                display:flex;
                align-items:center;
                justify-content:center;
                color:#777;
                font-size:13px;

            ">

                No Photo

            </div>

        <?php endif; ?>

    </div>

    <!-- Details -->

    <div style="
        padding:18px;
        font-size:14px;
        line-height:2;
        color:#222;
    ">

        <div>

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

            <?= 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>

    <!-- Footer -->

    <div style="

        position:absolute;
        bottom:0;
        width:100%;
        background:#fff3e8;
        border-top:1px solid #f5c9a5;
        text-align:center;
        padding:10px;
        font-size:11px;
        color:#444;

    ">

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

    </div>

</div>