<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <style>
        body { font-family: DejaVu Sans, sans-serif; font-size: 12px; color: #1e293b; }
        .header { text-align: center; border-bottom: 3px solid #1a7f5a; padding-bottom: 16px; margin-bottom: 20px; }
        .header h1 { font-size: 20px; color: #1a7f5a; margin: 0; }
        .header p { margin: 4px 0; color: #64748b; }
        .student-info { display: flex; justify-content: space-between; background: #f8fafc; padding: 12px; border-radius: 8px; margin-bottom: 20px; }
        .info-item { margin-bottom: 6px; }
        .info-label { font-weight: bold; color: #64748b; font-size: 11px; text-transform: uppercase; }
        table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
        th { background: #1a7f5a; color: #fff; padding: 10px 12px; text-align: left; font-size: 11px; text-transform: uppercase; }
        td { padding: 9px 12px; border-bottom: 1px solid #e2e8f0; }
        tr:nth-child(even) td { background: #f8fafc; }
        .grade-a { color: #065f46; font-weight: bold; }
        .grade-b { color: #1e40af; font-weight: bold; }
        .grade-c { color: #92400e; font-weight: bold; }
        .grade-d { color: #991b1b; font-weight: bold; }
        .summary { background: #1a7f5a; color: #fff; padding: 16px; border-radius: 8px; text-align: center; }
        .summary h2 { font-size: 28px; margin: 0; }
        .footer { text-align: center; margin-top: 30px; color: #64748b; font-size: 11px; border-top: 1px solid #e2e8f0; padding-top: 12px; }
    </style>
</head>
<body>
<div class="header">
    <h1><?php echo e($student->school->name ?? 'EduSmart High School'); ?></h1>
    <p>Student Report Card &mdash; <?php echo e($exam->name); ?></p>
    <p><?php echo e($exam->term->academicYear->name); ?> &mdash; <?php echo e($exam->term->name); ?></p>
</div>

<table style="margin-bottom:16px;border:none;">
    <tr>
        <td style="border:none;"><span class="info-label">Name:</span> <?php echo e($student->user->name); ?></td>
        <td style="border:none;"><span class="info-label">Adm No:</span> <?php echo e($student->admission_no); ?></td>
        <td style="border:none;"><span class="info-label">Class:</span> <?php echo e($student->stream?->schoolClass->name); ?> <?php echo e($student->stream?->name); ?></td>
        <td style="border:none;"><span class="info-label">Gender:</span> <?php echo e(ucfirst($student->gender)); ?></td>
    </tr>
</table>

<table>
    <thead>
        <tr>
            <th>#</th>
            <th>Subject</th>
            <th>Score</th>
            <th>Grade</th>
            <th>Points</th>
            <th>Remarks</th>
        </tr>
    </thead>
    <tbody>
        <?php $__currentLoopData = $marks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $mark): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <tr>
            <td><?php echo e($i + 1); ?></td>
            <td><?php echo e($mark->subject->name); ?></td>
            <td><?php echo e($mark->score); ?>/<?php echo e($mark->out_of); ?></td>
            <td class="grade-<?php echo e(strtolower(substr($mark->grade, 0, 1))); ?>"><?php echo e($mark->grade); ?></td>
            <td><?php echo e($mark->points); ?></td>
            <td><?php echo e($mark->remarks); ?></td>
        </tr>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </tbody>
</table>

<div class="summary">
    <p style="margin:0 0 4px;font-size:13px;opacity:.8;">MEAN GRADE</p>
    <h2><?php echo e($meanGrade); ?></h2>
    <p style="margin:4px 0 0;font-size:13px;opacity:.8;">Total Points: <?php echo e($totalPoints); ?> | Subjects: <?php echo e($marks->count()); ?></p>
</div>

<div class="footer">
    <p>Generated on <?php echo e(now()->format('d F Y, H:i')); ?> &mdash; EduSmart School Management System</p>
    <p>This is a computer-generated document.</p>
</div>
</body>
</html>
<?php /**PATH C:\xampp\htdocs\cbe\resources\views\pdf\report-card.blade.php ENDPATH**/ ?>