<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body style="font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; color: #333;">
    <div style="background: linear-gradient(135deg, #0B1437 0%, #1A56DB 100%); color: white; padding: 2rem; text-align: center; border-radius: 8px 8px 0 0;">
        <h1 style="margin: 0; font-size: 1.75rem; font-weight: bold;">FIN-ANALYSIS PRO</h1>
        <p style="margin: 0.5rem 0 0 0; opacity: 0.9; font-size: 0.875rem;">Laporan Analisis Keuangan</p>
    </div>

    <div style="background: white; padding: 2rem; border: 1px solid #e2e8f0;">
        <h2 style="color: #1E293B; margin-top: 0;">Laporan untuk {{ $companyName }}</h2>
        
        <div style="background: #f8faff; padding: 1rem; border-radius: 8px; margin: 1.5rem 0; border-left: 4px solid #1A56DB;">
            <p style="margin: 0 0 0.5rem 0; color: #64748B; font-size: 0.875rem; text-transform: uppercase; font-weight: 600;">Z-Score Analysis Results</p>
            <p style="margin: 0; font-size: 1.5rem; font-weight: bold; color: #1E293B;">{{ $zScore }}</p>
            <p style="margin: 0.5rem 0 0 0; font-size: 0.875rem; color: #475569;">
                Status: <span style="\n                    @if($category === 'safe')\n                        background: #D1FAE5; color: #065F46;\n                    @elseif($category === 'grey')\n                        background: #FEF3C7; color: #92400E;\n                    @else\n                        background: #FEE2E2; color: #991B1B;\n                    @endif\n                    padding: 4px 8px; border-radius: 4px; font-weight: 600;\">\n                    @if($category === 'safe')\n                        ZONA AMAN\n                    @elseif($category === 'grey')\n                        ZONA WASPADA\n                    @else\n                        ZONA BERBAHAYA\n                    @endif\n                </span>\n            </p>\n        </div>

        @if($message && !empty($message))\n        <div style=\"background: #f1f5f9; padding: 1rem; border-radius: 8px; margin: 1.5rem 0; border-left: 4px solid #60a5fa;\">\n            <p style=\"margin: 0 0 0.5rem 0; color: #1E293B; font-weight: 600;\">Pesan Tambahan:</p>\n            <p style=\"margin: 0; color: #475569; white-space: pre-line;\">{{ $message }}</p>\n        </div>\n        @endif

        <p style="color: #64748B; font-size: 0.875rem; margin: 2rem 0 0 0;">
            Laporan lengkap telah kami lampirkan dalam file PDF di email ini. Anda dapat membuka, mengunduh, atau mencetak laporan tersebut sesuai kebutuhan.
        </p>

        <hr style="border: none; border-top: 1px solid #e2e8f0; margin: 1.5rem 0;">

        <p style="color: #94A3B8; font-size: 0.75rem; margin: 0;">
            Email ini dikirim otomatis oleh sistem FIN-ANALYSIS PRO. Jika Anda tidak meminta laporan ini, abaikan email ini dan hubungi kami jika ada pertanyaan.
        </p>
    </div>

    <div style="background: #f1f5f9; padding: 1.25rem; text-align: center; border-radius: 0 0 8px 8px; border-top: 1px solid #e2e8f0;">
        <p style="margin: 0; color: #64748B; font-size: 0.75rem;">
            © {{ date('Y') }} FIN-ANALYSIS PRO. All rights reserved.
        </p>
    </div>
</body>
</html>
