<!doctype html>
<html lang="tr">
<head>
    <meta charset="utf-8">
    <title>{{ $alertLog->title }}</title>
</head>
<body style="font-family: Arial, sans-serif; background:#f5f6fa; margin:0; padding:24px; color:#202124;">
    <table width="100%" cellpadding="0" cellspacing="0" style="max-width:720px;margin:0 auto;background:#ffffff;border-radius:14px;overflow:hidden;border:1px solid #e8eaf0;">
        <tr>
            <td style="padding:24px 28px;background:#111827;color:#fff;">
                <div style="font-size:13px;opacity:.75;">DW Ads Reporter</div>
                <h1 style="font-size:22px;margin:8px 0 0;">{{ $alertLog->title }}</h1>
            </td>
        </tr>
        <tr>
            <td style="padding:24px 28px;">
                <p style="font-size:15px;line-height:1.6;margin-top:0;">{{ $alertLog->message }}</p>
                <table width="100%" cellpadding="8" cellspacing="0" style="border-collapse:collapse;font-size:14px;">
                    <tr><td style="border-bottom:1px solid #edf0f5;color:#6b7280;">Müşteri</td><td style="border-bottom:1px solid #edf0f5;text-align:right;">{{ $alertLog->client?->company_name }}</td></tr>
                    <tr><td style="border-bottom:1px solid #edf0f5;color:#6b7280;">Platform</td><td style="border-bottom:1px solid #edf0f5;text-align:right;">{{ strtoupper(str_replace('_',' ', $alertLog->platform)) }}</td></tr>
                    <tr><td style="border-bottom:1px solid #edf0f5;color:#6b7280;">Metrik</td><td style="border-bottom:1px solid #edf0f5;text-align:right;">{{ $alertLog->metric }}</td></tr>
                    <tr><td style="border-bottom:1px solid #edf0f5;color:#6b7280;">Koşul</td><td style="border-bottom:1px solid #edf0f5;text-align:right;">{{ $alertLog->operator }} {{ $alertLog->threshold }}</td></tr>
                    <tr><td style="border-bottom:1px solid #edf0f5;color:#6b7280;">Güncel Değer</td><td style="border-bottom:1px solid #edf0f5;text-align:right;"><strong>{{ $alertLog->current_value }}</strong></td></tr>
                    <tr><td style="border-bottom:1px solid #edf0f5;color:#6b7280;">Dönem</td><td style="border-bottom:1px solid #edf0f5;text-align:right;">{{ $alertLog->period_start?->format('d.m.Y') }} - {{ $alertLog->period_end?->format('d.m.Y') }}</td></tr>
                    <tr><td style="border-bottom:1px solid #edf0f5;color:#6b7280;">Önem</td><td style="border-bottom:1px solid #edf0f5;text-align:right;">{{ ucfirst($alertLog->severity) }}</td></tr>
                </table>
                <p style="font-size:12px;color:#6b7280;margin-top:22px;">Bu e-posta otomatik uyarı motoru tarafından gönderilmiştir.</p>
            </td>
        </tr>
    </table>
</body>
</html>
