<!doctype html>
<html lang="tr">
<head><meta charset="utf-8"><title>{{ $report->client?->company_name }} Raporu</title></head>
<body style="margin:0;padding:0;background:#f4f6f8;font-family:Arial,Helvetica,sans-serif;color:#111827;">
<table width="100%" cellpadding="0" cellspacing="0" style="background:#f4f6f8;padding:24px 0;"><tr><td align="center">
<table width="680" cellpadding="0" cellspacing="0" style="background:#ffffff;border-radius:14px;overflow:hidden;border:1px solid #e5e7eb;">
<tr><td style="padding:28px 32px;background:#111827;color:#ffffff;"><div style="font-size:13px;opacity:.75;">DW Ads Reporter</div><h1 style="margin:6px 0 0;font-size:24px;line-height:1.35;">{{ $client?->company_name }} reklam raporu hazır</h1><div style="margin-top:8px;font-size:14px;opacity:.85;">{{ $report->date_from?->format('d.m.Y') }} - {{ $report->date_to?->format('d.m.Y') }}</div></td></tr>
<tr><td style="padding:28px 32px;">
@if($customNote)<p style="padding:14px 16px;background:#f9fafb;border-left:4px solid #2563eb;border-radius:8px;">{{ $customNote }}</p>@endif
<p style="font-size:15px;line-height:1.7;margin:0 0 18px;">Merhaba, ilgili dönem için otomatik oluşturulan rapor ekte yer almaktadır. Kısa özet aşağıdadır.</p>
<table width="100%" cellpadding="0" cellspacing="0" style="border-collapse:collapse;margin:18px 0;">
@foreach([
    'total_ad_spend' => 'Toplam Reklam Harcaması',
    'total_ad_clicks' => 'Reklam Tıklaması',
    'total_ad_impressions' => 'Reklam Gösterimi',
    'total_conversions' => 'Toplam Dönüşüm',
    'organic_clicks' => 'Organik Tıklama',
    'ga4_sessions' => 'GA4 Oturum',
] as $key => $label)
<tr><td style="padding:10px 12px;border-bottom:1px solid #eef2f7;color:#6b7280;">{{ $label }}</td><td align="right" style="padding:10px 12px;border-bottom:1px solid #eef2f7;font-weight:bold;">{{ is_numeric($overview[$key] ?? null) ? number_format((float) $overview[$key], 2, ',', '.') : ($overview[$key] ?? '-') }}</td></tr>
@endforeach
</table>
@if(!empty($notes))
<h3 style="font-size:16px;margin:22px 0 10px;">Otomatik Notlar</h3>
<ul style="margin:0 0 18px;padding-left:18px;line-height:1.7;">@foreach($notes as $note)<li>{{ $note }}</li>@endforeach</ul>
@endif
<p style="font-size:13px;color:#6b7280;line-height:1.6;margin:22px 0 0;">Bu mail sistem tarafından otomatik oluşturulmuştur. Detaylı dosyalar ektedir.</p>
</td></tr>
</table>
</td></tr></table>
</body>
</html>
