<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Payment Due Today</title>
    <style>
        body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; line-height: 1.6; color: #333; margin: 0; padding: 0; background-color: #f5f5f5; }
        .container { max-width: 600px; margin: 20px auto; background: #ffffff; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); overflow: hidden; }
        .header { background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%); color: #ffffff; padding: 30px 20px; text-align: center; }
        .header img { max-width: 200px; height: auto; margin-bottom: 10px; }
        .header h1 { margin: 0; font-size: 24px; font-weight: 600; }
        .urgent-badge { background: #fef3c7; color: #92400e; padding: 8px 16px; border-radius: 20px; font-weight: 600; display: inline-block; margin: 10px 0; }
        .content { padding: 30px 20px; }
        .greeting { font-size: 18px; font-weight: 500; margin-bottom: 20px; }
        .message { margin-bottom: 20px; }
        .invoice-details { background: #fef2f2; border-left: 4px solid #ef4444; padding: 15px; margin: 20px 0; border-radius: 4px; }
        .invoice-details table { width: 100%; }
        .invoice-details td { padding: 8px 0; }
        .invoice-details td:first-child { font-weight: 600; width: 40%; }
        .amount { font-size: 32px; font-weight: 700; color: #ef4444; }
        .button { display: inline-block; padding: 14px 35px; background: #ef4444; color: #ffffff !important; text-decoration: none; border-radius: 6px; font-weight: 600; margin: 20px 0; font-size: 16px; }
        .button:hover { background: #dc2626; }
        .footer { background: #f8f9fa; padding: 20px; text-align: center; font-size: 12px; color: #6c757d; border-top: 1px solid #e9ecef; }
        .footer a { color: #ef4444; text-decoration: none; }
        @media only screen and (max-width: 600px) {
            .container { margin: 0; border-radius: 0; }
            .content { padding: 20px 15px; }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            {{#if header_image_url}}
            <img src="{{header_image_url}}" alt="Company Logo">
            {{/if}}
            <h1>⚠️ Payment Due Today</h1>
            <div class="urgent-badge">URGENT: DUE TODAY</div>
        </div>
        
        <div class="content">
            <div class="greeting">Hi {{customer_name}},</div>
            
            <div class="message">
                <p><strong>This is an urgent reminder that your payment is due TODAY.</strong></p>
                <p>To avoid late fees and maintain uninterrupted service, please process your payment immediately.</p>
            </div>
            
            <div class="invoice-details">
                <table>
                    <tr>
                        <td>Invoice Number:</td>
                        <td><strong>{{invoice_number}}</strong></td>
                    </tr>
                    <tr>
                        <td>Amount Due:</td>
                        <td class="amount">{{currency_symbol}}{{amount_due}}</td>
                    </tr>
                    <tr>
                        <td>Due Date:</td>
                        <td><strong style="color: #ef4444;">TODAY ({{due_date}})</strong></td>
                    </tr>
                </table>
            </div>
            
            <center>
                <a href="{{payment_link}}" class="button">PAY NOW - {{currency_symbol}}{{amount_due}}</a>
            </center>
            
            <div class="message" style="margin-top: 30px;">
                <p><strong>Payment Options:</strong></p>
                <ul>
                    <li>Pay online via our secure payment portal (link above)</li>
                    <li>Bank transfer to our account</li>
                    <li>Contact us for alternative payment arrangements</li>
                </ul>
            </div>
            
            <div class="message" style="margin-top: 20px; font-size: 14px; color: #6c757d;">
                <p>If you have already made this payment, please disregard this reminder and thank you for your prompt payment!</p>
            </div>
        </div>
        
        <div class="footer">
            <p>{{footer_text}}</p>
            <p>
                <a href="{{company_website}}">Visit Our Website</a> | 
                <a href="mailto:{{support_email}}">Contact Support</a> | 
                <a href="{{unsubscribe_link}}">Unsubscribe</a>
            </p>
        </div>
    </div>
    
    <!-- Tracking Pixel -->
    <img src="{{tracking_pixel_url}}" width="1" height="1" style="display:none;" alt="">
</body>
</html>