<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    <meta charset="utf-8">
    <title>{{ $offer->reference_code }}</title>
    <style>
        body { font-family: DejaVu Sans, sans-serif; color: #222; font-size: 13px; }
        h1 { font-size: 20px; margin-bottom: 4px; }
        .meta { color: #666; margin-bottom: 20px; }
        table { width: 100%; border-collapse: collapse; margin-top: 12px; }
        th, td { text-align: left; padding: 6px 4px; border-bottom: 1px solid #ddd; vertical-align: top; }
        th { width: 35%; color: #555; font-weight: 600; }
    </style>
</head>
<body>
    <h1>{{ __('recruitment.offer_letters.pdf_title') }}</h1>
    <div class="meta">{{ $offer->reference_code }} · v{{ $offer->version }}</div>
    <table>
        <tr><th>{{ __('recruitment.offer_letters.fields.candidate') }}</th><td>{{ $offer->candidate?->full_name }}</td></tr>
        <tr><th>{{ __('recruitment.offer_letters.fields.vacancy') }}</th><td>{{ $offer->vacancy?->title }}</td></tr>
        <tr><th>{{ __('recruitment.offer_letters.fields.department') }}</th><td>{{ $offer->department?->name }}</td></tr>
        <tr><th>{{ __('recruitment.offer_letters.fields.position') }}</th><td>{{ $offer->position?->name }}</td></tr>
        <tr><th>{{ __('recruitment.offer_letters.fields.employment_type') }}</th><td>{{ __('recruitment.offer_letters.employment_type.'.$offer->employment_type) }}</td></tr>
        <tr><th>{{ __('recruitment.offer_letters.fields.start_date') }}</th><td>{{ $offer->start_date?->format('Y-m-d') }}</td></tr>
        <tr><th>{{ __('recruitment.offer_letters.fields.probation_period') }}</th><td>{{ $offer->probation_period_days }}</td></tr>
        <tr><th>{{ __('recruitment.offer_letters.fields.salary') }}</th><td>{{ number_format((float) $offer->salary, 2) }} {{ $offer->currency }}</td></tr>
        <tr><th>{{ __('recruitment.offer_letters.fields.working_hours') }}</th><td>{{ $offer->working_hours }}</td></tr>
        <tr><th>{{ __('recruitment.offer_letters.fields.allowances') }}</th><td>{{ $offer->allowances }}</td></tr>
        <tr><th>{{ __('recruitment.offer_letters.fields.benefits') }}</th><td>{{ $offer->benefits }}</td></tr>
        <tr><th>{{ __('recruitment.offer_letters.fields.notes') }}</th><td>{{ $offer->notes }}</td></tr>
        <tr><th>{{ __('recruitment.offer_letters.fields.acceptance_deadline') }}</th><td>{{ $offer->acceptance_deadline_at?->format('Y-m-d H:i') }}</td></tr>
    </table>
</body>
</html>
