<div style="

    width:350px;
    height:220px;
    background:linear-gradient(135deg,#212529,#343a40);
    border-radius:18px;
    overflow:hidden;
    position:relative;
    color:#ffffff;
    box-shadow:0 6px 16px rgba(0,0,0,0.25);
    font-family:Arial,sans-serif;

">

    <!-- Decorative Circle -->

    <div style="

        position:absolute;
        top:-60px;
        right:-60px;
        width:180px;
        height:180px;
        border-radius:50%;
        background:rgba(255,255,255,0.08);

    "></div>

    <!-- Header -->

    <div style="
        padding:15px 18px;
        position:relative;
        z-index:2;
    ">

        <div style="
            font-size:22px;
            font-weight:bold;
            color:#ffc107;
            line-height:1.2;
        ">

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

        </div>

        <div style="
            font-size:12px;
            margin-top:4px;
            letter-spacing:1px;
            color:#dddddd;
        ">

            PREMIUM STUDENT IDENTITY CARD

        </div>

    </div>

    <!-- Main Body -->

    <div style="
        display:flex;
        padding:5px 18px 0 18px;
        position:relative;
        z-index:2;
    ">

        <!-- Photo -->

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

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

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

            <?php else: ?>

                <div style="

                    width:95px;
                    height:110px;
                    border-radius:14px;
                    border:3px solid #ffc107;
                    background:rgba(255,255,255,0.1);
                    display:flex;
                    align-items:center;
                    justify-content:center;
                    color:#cccccc;
                    font-size:12px;

                ">

                    No Photo

                </div>

            <?php endif; ?>

        </div>

        <!-- Details -->

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

            <div>

                <strong style="color:#ffc107;">
                    Name:
                </strong><br>

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

            </div>

            <div>

                <strong style="color:#ffc107;">
                    Class:
                </strong>

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

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

            </div>

            <div>

                <strong style="color:#ffc107;">
                    Roll:
                </strong>

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

            </div>

            <div>

                <strong style="color:#ffc107;">
                    Admission:
                </strong>

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

            </div>

            <div>

                <strong style="color:#ffc107;">
                    Phone:
                </strong>

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

            </div>

        </div>

    </div>

    <!-- Footer -->

    <div style="

        position:absolute;
        bottom:0;
        width:100%;
        padding:10px;
        background:rgba(255,255,255,0.08);
        border-top:1px solid rgba(255,255,255,0.1);
        text-align:center;
        font-size:11px;
        color:#eeeeee;
        letter-spacing:0.5px;

    ">

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

    </div>

</div>