<x-app-layout>
    <x-slot name="header">
        <h2 class="font-semibold text-xl text-gray-800 leading-tight">
            {{ __('Detail nilai santri') }}
        </h2>
    </x-slot>

    <div class="py-12">
        <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
            <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
                <div class="p-6">


    <h2>Rekap Nilai: {{ $santri->nama }}</h2>
    <a href="{{ url()->previous() }}" class="inline-flex items-center px-6 py-3 text-sm font-medium text-gray-700 bg-gray-100 rounded-lg hover:bg-gray-200 transition-colors mb-3">
        <i class="fas fa-arrow-left mr-2"></i>
        Kembali
    </a>
    <table class="w-full border border-gray-200 rounded-lg overflow-hidden">
        <thead class="bg-gradient-to-r from-green-600 to-yellow-400 text-white">
            <tr>
                <th class="px-6 py-4 text-left text-sm font-semibold">No</th>
                <th class="px-6 py-4 text-left text-sm font-semibold">Tanggal</th>
                <th class="px-6 py-4 text-left text-sm font-semibold">Mata Pelajaran</th>
                <th class="px-6 py-4 text-left text-sm font-semibold">Nilai</th>
                <th class="px-6 py-4 text-left text-sm font-semibold">Keterangan</th>
            </tr>
        </thead>
        <tbody class="divide-y divide-gray-200">
            @foreach($nilaiList as $i => $nilai)
            <tr class="hover:bg-green-50 transition-colors">
                <td class="px-6 py-4">{{ $i+1 }}</td>
                <td class="px-6 py-4">{{ $nilai->tanggal }}</td>
                <td class="px-6 py-4">{{ $nilai->mapel->nama_mapel ?? '-' }}</td>
                <td class="px-6 py-4">{{ $nilai->nilai }}</td>
                <td class="px-6 py-4">{{ $nilai->keterangan }}</td>
            </tr>
            @endforeach
        </tbody>
    </table>

        </div>
    </div>
</x-app-layout> 
