<!DOCTYPE html>
<html lang="tr">
<head>
    <meta charset="utf-8">
    <style>
        * { font-family: DejaVu Sans, sans-serif; }
        body { margin: 0; padding: 18px; color: #1e293b; }
        h1 { font-size: 15px; margin: 0 0 2px; }
        .sub { font-size: 10px; color: #64748b; margin-bottom: 12px; }
        table { width: 100%; border-collapse: collapse; }
        th { background: #334155; color: #fff; font-size: 9px; text-align: left; padding: 6px 7px; text-transform: uppercase; }
        td { font-size: 9.5px; padding: 5px 7px; border-bottom: 1px solid #e2e8f0; }
        tr:nth-child(even) td { background: #f8fafc; }
        .num { text-align: right; }
        .foot { margin-top: 10px; font-size: 8px; color: #94a3b8; }
    </style>
</head>
<body>
    <h1>Yolcu Listesi</h1>
    <div class="sub">{{ $title }} · {{ count($rows) }} yolcu · {{ now()->format('d.m.Y H:i') }}</div>
    <table>
        <thead>
            <tr>@foreach($headings as $h)<th>{{ $h }}</th>@endforeach</tr>
        </thead>
        <tbody>
            @foreach($rows as $r)
                <tr>
                    @foreach($r as $ci => $cell)
                        <td class="{{ in_array($ci, [8,9,10]) ? 'num' : '' }}">{{ in_array($ci, [8,9,10]) && is_numeric($cell) ? number_format((float) $cell, 0, ',', '.') . '₺' : $cell }}</td>
                    @endforeach
                </tr>
            @endforeach
        </tbody>
    </table>
    <div class="foot">Bu belge {{ now()->format('d.m.Y H:i') }} tarihinde otomatik oluşturulmuştur.</div>
</body>
</html>
