<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Membership Application Approved</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: #16a34a; 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; }
        .code-box { background: #f0fdf4; border: 2px dashed #16a34a; border-radius: 6px; padding: 16px 24px; text-align: center; margin: 20px 0; font-size: 22px; font-weight: bold; letter-spacing: 2px; color: #16a34a; }
        .footer { background: #f9f9f9; padding: 20px 40px; font-size: 12px; color: #999; text-align: center; }
    </style>
</head>
<body>
<div class="container">
    <div class="header">
        <h1>Application Approved!</h1>
    </div>
    <div class="body">
        <p>Dear {{ $name }},</p>
        <p>Congratulations! Your membership application has been <strong>approved</strong>. Welcome to <strong>{{ config('app.name') }}</strong>!</p>

        <div class="detail-row">
            <span class="detail-label">Reference Number</span>
            <span class="detail-value">{{ $reference_number }}</span>
        </div>

        <p>Your membership code is:</p>
        <div class="code-box">{{ $membership_code }}</div>

        <p>Please keep this code safe — you will need it to access member-only features and services.</p>
        <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>
