export function forgotPasswordTemplate(
    name: string,
    otp: string,
    appName: string = "AVS Enterprises"
): string {
    return `
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Password Reset OTP</title>
    </head>

    <body style="margin:0; padding:0; background-color:#f5f7f5; font-family:Arial, Helvetica, sans-serif;">
        <table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="background-color:#f5f7f5; padding:40px 0;">
            <tr>
                <td align="center">
                    <table role="presentation" width="480" cellpadding="0" cellspacing="0" style="background-color:#ffffff; border-radius:12px; overflow:hidden; box-shadow:0 2px 8px rgba(0,0,0,0.06);">

                        <!-- Header -->
                        <tr>
                            <td style="padding:32px 40px 20px 40px; text-align:center; border-bottom:1px solid #f0f0f0;">
                                <h1 style="margin:0; color:#1f2937; font-size:20px; font-weight:700; letter-spacing:0.2px;">
                                    ${appName}
                                </h1>
                            </td>
                        </tr>

                        <!-- Body -->
                        <tr>
                            <td style="padding:32px 40px 24px 40px;">
                                <h2 style="margin:0 0 16px 0; color:#1f2937; font-size:18px; font-weight:600;">
                                    Hello ${name},
                                </h2>

                                <p style="margin:0 0 8px 0; color:#4b5563; font-size:14px; line-height:22px;">
                                    We received a request to reset the password for your account.
                                </p>
                                <p style="margin:0 0 24px 0; color:#4b5563; font-size:14px; line-height:22px;">
                                    Use the One-Time Password (OTP) below to continue. This code is valid for a limited time only.
                                </p>

                                <!-- OTP Box -->
                                <table role="presentation" width="100%" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td align="center" style="padding:8px 0 24px 0;">
                                            <div style="display:inline-block; background-color:#f9fafb; border:1px solid #e5e7eb; border-radius:8px; padding:12px 28px;">
                                                <span style="font-size:18px; font-weight:700; letter-spacing:4px; color:#111827; font-family:'Courier New', monospace;">
                                                    ${otp}
                                                </span>
                                            </div>
                                        </td>
                                    </tr>
                                </table>

                                <table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="background-color:#fffbeb; border-radius:8px; border:1px solid #fde68a;">
                                    <tr>
                                        <td style="padding:12px 16px;">
                                            <p style="margin:0; color:#92400e; font-size:13px; line-height:20px;">
                                                ⏱ This OTP expires in <strong>15 minutes</strong>. Do not share it with anyone.
                                            </p>
                                        </td>
                                    </tr>
                                </table>

                                <p style="margin:24px 0 0 0; color:#6b7280; font-size:13px; line-height:20px;">
                                    If you didn't request a password reset, you can safely ignore this email — your account remains secure.
                                </p>
                            </td>
                        </tr>

                        <!-- Divider -->
                        <tr>
                            <td style="padding:0 40px;">
                                <hr style="border:none; border-top:1px solid #e5e7eb; margin:0;" />
                            </td>
                        </tr>

                        <!-- Footer -->
                        <tr>
                            <td style="padding:24px 40px 32px 40px; text-align:center;">
                                <p style="margin:0; color:#9ca3af; font-size:12px; line-height:18px;">
                                    This is an automated message, please do not reply to this email.
                                </p>
                                <p style="margin:8px 0 0 0; color:#9ca3af; font-size:12px;">
                                    © ${new Date().getFullYear()} ${appName}. All rights reserved.
                                </p>
                            </td>
                        </tr>

                    </table>
                </td>
            </tr>
        </table>
    </body>
    </html>
    `;
}