<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Certificate Issued</title>
</head>
<body style="margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f3f4f6;">
    <table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="max-width: 600px; margin: 0 auto; background-color: #ffffff;">
        <!-- Header -->
        <tr>
            <td style="background: linear-gradient(135deg, #059669 0%, #047857 100%); padding: 40px 30px; text-align: center;">
                <div style="width: 70px; height: 70px; background-color: rgba(255,255,255,0.2); border-radius: 50%; margin: 0 auto 15px; display: flex; align-items: center; justify-content: center;">
                    <span style="font-size: 35px;">🏆</span>
                </div>
                <h1 style="margin: 0; color: #ffffff; font-size: 28px; font-weight: 600;">
                    Certificate Issued!
                </h1>
            </td>
        </tr>
        
        <!-- Body -->
        <tr>
            <td style="padding: 40px 30px;">
                <p style="margin: 0 0 20px; font-size: 16px; color: #374151; line-height: 1.6;">
                    Dear {{ $userName }},
                </p>
                
                <p style="margin: 0 0 20px; font-size: 16px; color: #374151; line-height: 1.6;">
                    Congratulations! You have successfully completed <strong>{{ $trainingName }}</strong> and your certificate has been issued.
                </p>
                
                <!-- Achievement Banner -->
                <table role="presentation" width="100%" style="background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%); border-radius: 8px; margin: 30px 0;">
                    <tr>
                        <td style="padding: 30px; text-align: center;">
                            <h2 style="margin: 0 0 10px; color: #065f46; font-size: 22px;">
                                🎓 Achievement Unlocked!
                            </h2>
                            <p style="margin: 0; color: #047857; font-size: 14px;">
                                You have demonstrated excellence in your training.
                            </p>
                        </td>
                    </tr>
                </table>
                
                <!-- Certificate Details Card -->
                <table role="presentation" width="100%" style="background-color: #f9fafb; border: 2px solid #10b981; border-radius: 8px; margin: 30px 0;">
                    <tr>
                        <td style="padding: 25px;">
                            <h3 style="margin: 0 0 20px; color: #111827; font-size: 18px; border-bottom: 2px solid #10b981; padding-bottom: 10px;">
                                Certificate Details
                            </h3>
                            <table role="presentation" width="100%" cellspacing="0" cellpadding="10">
                                <tr>
                                    <td style="color: #6b7280; font-size: 14px; width: 35%;">Certificate No:</td>
                                    <td style="color: #111827; font-size: 14px; font-weight: 600; font-family: monospace;">{{ $certificateNumber }}</td>
                                </tr>
                                <tr>
                                    <td style="color: #6b7280; font-size: 14px;">Training:</td>
                                    <td style="color: #111827; font-size: 14px; font-weight: 500;">{{ $trainingName }}</td>
                                </tr>
                                <tr>
                                    <td style="color: #6b7280; font-size: 14px;">Issue Date:</td>
                                    <td style="color: #111827; font-size: 14px; font-weight: 500;">{{ $issueDate }}</td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                
                <!-- Verification Info -->
                <table role="presentation" width="100%" style="background-color: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; margin: 30px 0;">
                    <tr>
                        <td style="padding: 20px;">
                            <h4 style="margin: 0 0 10px; color: #1e40af; font-size: 15px;">
                                🔍 Verify Your Certificate
                            </h4>
                            <p style="margin: 0 0 15px; color: #1e3a8a; font-size: 13px; line-height: 1.6;">
                                Employers and organizations can verify your certificate using the link below:
                            </p>
                            <p style="margin: 0; color: #2563eb; font-size: 13px; font-family: monospace; background-color: #dbeafe; padding: 10px; border-radius: 4px; word-break: break-all;">
                                {{ $verificationUrl }}
                            </p>
                        </td>
                    </tr>
                </table>
                
                <!-- What You Can Do -->
                <table role="presentation" width="100%" style="background-color: #f9fafb; border-radius: 8px; margin: 30px 0;">
                    <tr>
                        <td style="padding: 25px;">
                            <h3 style="margin: 0 0 15px; color: #111827; font-size: 16px;">
                                What You Can Do Now:
                            </h3>
                            <ul style="margin: 0; padding-left: 20px; color: #374151; font-size: 14px; line-height: 2;">
                                <li>Download your certificate in PDF format</li>
                                <li>Share your achievement on LinkedIn</li>
                                <li>Add the certificate to your professional portfolio</li>
                                <li>Use the verification link for employer verification</li>
                            </ul>
                        </td>
                    </tr>
                </table>
                
                <!-- Call to Action -->
                <table role="presentation" width="100%" style="margin: 30px 0;">
                    <tr>
                        <td align="center">
                            <a href="{{ route('training.certificates.my') }}" style="display: inline-block; background: linear-gradient(135deg, #059669 0%, #047857 100%); color: #ffffff; padding: 14px 32px; text-decoration: none; border-radius: 6px; font-size: 15px; font-weight: 500;">
                                Download Certificate
                            </a>
                        </td>
                    </tr>
                </table>
                
                <p style="margin: 0; font-size: 14px; color: #6b7280; line-height: 1.6;">
                    Well done on completing your training!<br><br>
                    Best regards,<br>
                    <strong>{{ config('app.name') }}</strong> Training Team
                </p>
            </td>
        </tr>
        
        <!-- Footer -->
        <tr>
            <td style="background-color: #f3f4f6; padding: 30px; text-align: center; border-top: 1px solid #e5e7eb;">
                <p style="margin: 0 0 10px; font-size: 13px; color: #6b7280;">
                    &copy; {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
                </p>
                <p style="margin: 0; font-size: 12px; color: #9ca3af;">
                    Congratulations on your achievement!
                </p>
            </td>
        </tr>
    </table>
</body>
</html>
