<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title></title>
    <style type="text/css">
        body{ margin:0; padding:0; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%; font-family:Arial,sans-serif; background-color:#f4f4f4; }
        table{ border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt; }
        img{ border:0; height:auto; line-height:100%; outline:none; text-decoration:none; -ms-interpolation-mode:bicubic; max-width:100%; }
        .email-wrap{ width:100%; max-width:600px; margin:0 auto; background:#fff; }
        .email-header{ padding:24px 20px; text-align:center; background:#0066cc; }
        .email-header img{ max-width:144px; height:auto; display:inline-block; }
        .email-header h1{ margin:12px 0 0; font-size:20px; font-weight:bold; color:#fff; }
        .email-body{ padding:24px 20px; font-size:15px; line-height:1.6; color:#333; }
        .email-body a{ color:#0066cc; text-decoration:underline; }
        .email-footer{ padding:20px; text-align:center; background:#0066cc; color:#fff; font-size:13px; }
        .email-footer a{ color:#fff; text-decoration:underline; }
        @media only screen and (max-width:600px){ .email-wrap{ width:100% !important; } .email-body{ padding:16px !important; } }
    </style>
</head>
<body style="margin:0; padding:0;">
    <table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="background:#f4f4f4;">
        <tr>
            <td align="center" style="padding:20px 10px;">
                <table role="presentation" class="email-wrap" width="600" cellpadding="0" cellspacing="0" style="max-width:600px; background:#fff; border-radius:4px; overflow:hidden; box-shadow:0 2px 8px rgba(0,0,0,0.08);">
                    <tr>
                        <td class="email-header">
                            <?php if (!empty($logo_url)) { ?>
                            <a href="<?= $base_url ?>" target="_blank"><img src="<?= $logo_url ?>" alt="<?= htmlspecialchars($site_name) ?>" style="max-width:144px; height:auto;"></a>
                            <?php } ?>
                            <h1 style="margin:12px 0 0; font-size:20px; font-weight:bold; color:#fff;"><?= htmlspecialchars($site_name) ?></h1>
                        </td>
                    </tr>
                    <tr>
                        <td class="email-body">
                            <?= $html ?>
                        </td>
                    </tr>
                    <tr>
                        <td class="email-footer">
                            <?php if (!empty($footer)) { ?>
                            <div style="margin-bottom:12px;"><?= $footer ?></div>
                            <?php } ?>
                            <?php if (!empty($unsub_text)) { ?>
                            <div><?= $unsub_text ?></div>
                            <?php } ?>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</body>
</html>
