<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Overdue Contribution Notice</title>
    <style>
        body { font-family: Arial, sans-serif; background: #f4f4f4; margin: 0; padding: 0; }
        .container { max-width: 600px; margin: 30px auto; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
        .header { background: #dc2626; color: #fff; padding: 30px 40px; }
        .header h1 { margin: 0; font-size: 22px; }
        .body { padding: 30px 40px; color: #333; }
        .detail-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #eee; }
        .detail-label { color: #666; }
        .detail-value { font-weight: bold; }
        .alert-box { background: #fef2f2; border-left: 4px solid #dc2626; padding: 14px 18px; border-radius: 4px; margin: 20px 0; color: #7f1d1d; }
        .total-row { background: #fef2f2; }
        .footer { background: #f9f9f9; padding: 20px 40px; font-size: 12px; color: #999; text-align: center; }
    </style>
</head>
<body>
<div class="container">
    <div class="header">
        <h1>Overdue Contribution Notice</h1>
    </div>
    <div class="body">
        <p>Dear {{ $name }},</p>
        <p>Your contribution payment for <strong>{{ $period }}</strong> is now <strong>{{ $days_overdue }} day(s) overdue</strong>. A penalty has been applied to your account.</p>

        <div class="detail-row">
            <span class="detail-label">Contribution Period</span>
            <span class="detail-value">{{ $period }}</span>
        </div>
        <div class="detail-row">
            <span class="detail-label">Original Amount</span>
            <span class="detail-value">{{ $amount }}</span>
        </div>
        <div class="detail-row">
            <span class="detail-label">Penalty Amount</span>
            <span class="detail-value" style="color:#dc2626;">{{ $penalty_amount }}</span>
        </div>
        <div class="detail-row total-row">
            <span class="detail-label"><strong>Total Amount Due</strong></span>
            <span class="detail-value" style="color:#dc2626;">{{ $total_amount }}</span>
        </div>
        <div class="detail-row">
            <span class="detail-label">Days Overdue</span>
            <span class="detail-value" style="color:#dc2626;">{{ $days_overdue }} day(s)</span>
        </div>

        <div class="alert-box">
            <strong>Urgent:</strong> Please pay the total amount of <strong>{{ $total_amount }}</strong> immediately to avoid further penalties. Continued non-payment may affect your membership status.
        </div>

        <p>Best regards,<br>{{ config('app.name') }} Team</p>
    </div>
    <div class="footer">
        &copy; {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
    </div>
</div>
</body>
</html>
