<!DOCTYPE html>
<html lang="en">

    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Transfer Completed – {{ config('app.name') }}</title>
        <link
            href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600&family=Source+Sans+3:wght@300;400;600&display=swap"
            rel="stylesheet" />
        <style>
            *,
            *::before,
            *::after {
                box-sizing: border-box;
                margin: 0;
                padding: 0;
            }

            body {
                background: #e8ecf0;
                font-family: 'Source Sans 3', sans-serif;
                color: #1a2332;
                min-height: 100vh;
                display: flex;
                align-items: flex-start;
                justify-content: center;
                padding: 40px 16px;
            }

            .email-wrapper {
                background: #ffffff;
                width: 100%;
                max-width: 680px;
                border-radius: 2px;
                box-shadow: 0 4px 32px rgba(0, 0, 0, 0.12);
                overflow: hidden;
            }

            /* ── Header ── */
            .header {
                background: #ffffff;
                padding: 28px 36px 24px;
                display: flex;
                align-items: center;
                gap: 12px;
                border-bottom: 1px solid #dde3ea;
            }

            .logo-icon {
                width: 44px;
                height: 44px;
                border-radius: 50%;
                border: 2.5px solid #2f5597;
                display: flex;
                align-items: center;
                justify-content: center;
                flex-shrink: 0;
            }

            .logo-icon svg {
                width: 26px;
                height: 26px;
            }

            .logo-text {
                font-family: 'Source Sans 3', sans-serif;
                font-size: 1.35rem;
                font-weight: 600;
                color: #1a2332;
                letter-spacing: 0.01em;
            }

            /* ── Hero Banner ── */
            .hero-banner {
                background: linear-gradient(135deg, #2f5597 0%, #3a6ab8 60%, #4a7fc9 100%);
                padding: 18px 36px;
            }

            .hero-banner h1 {
                font-family: 'Source Sans 3', sans-serif;
                font-size: 1.15rem;
                font-weight: 600;
                color: #ffffff;
                letter-spacing: 0.02em;
            }

            /* ── Disclaimer bar ── */
            .disclaimer-bar {
                background: #f4f6f9;
                border-bottom: 1px solid #dde3ea;
                padding: 10px 36px;
                font-size: 0.8rem;
                color: #5c6b7d;
                font-style: italic;
            }

            /* ── Body ── */
            .body-content {
                padding: 32px 36px;
            }

            .section-title {
                font-family: 'Playfair Display', serif;
                font-size: 1.4rem;
                font-weight: 600;
                color: #1a2332;
                margin-bottom: 10px;
            }

            .intro-text {
                font-size: 0.92rem;
                color: #4a5568;
                line-height: 1.6;
                margin-bottom: 24px;
            }

            /* ── Tables ── */
            .info-table {
                width: 100%;
                border-collapse: collapse;
                margin-bottom: 28px;
                font-size: 0.9rem;
                border: 1px solid #d0d7e2;
                border-radius: 2px;
                overflow: hidden;
            }

            .info-table tr {
                border-bottom: 1px solid #d0d7e2;
            }

            .info-table tr:last-child {
                border-bottom: none;
            }

            .info-table td {
                padding: 10px 14px;
                vertical-align: top;
            }

            .info-table td:first-child {
                font-weight: 600;
                color: #1a2332;
                width: 38%;
                background: #f7f9fc;
            }

            .info-table td:last-child {
                color: #2d3a4a;
            }

            .amount-value {
                font-weight: 700;
                font-size: 1rem;
                color: #1a2332;
            }

            /* ── Sub-section headings ── */
            .sub-heading {
                font-family: 'Source Sans 3', sans-serif;
                font-size: 0.95rem;
                font-weight: 700;
                color: #2f5597;
                text-transform: uppercase;
                letter-spacing: 0.06em;
                margin-bottom: 10px;
                padding-bottom: 4px;
                border-bottom: 2px solid #d6e0f0;
            }

            /* ── Important Note ── */
            .important-note {
                background: #f4f6f9;
                border-left: 4px solid #2f5597;
                border-radius: 2px;
                padding: 16px 20px;
                margin-bottom: 28px;
            }

            .important-note h4 {
                font-size: 0.88rem;
                font-weight: 700;
                color: #1a2332;
                margin-bottom: 8px;
            }

            .important-note p {
                font-size: 0.84rem;
                color: #4a5568;
                line-height: 1.65;
            }

            .important-note a {
                color: #2f5597;
                text-decoration: underline;
            }

            /* ── Footer disclaimer ── */
            .footer-disclaimer {
                font-size: 0.78rem;
                color: #6b7a8d;
                line-height: 1.6;
                border-top: 1px solid #dde3ea;
                padding: 20px 36px 0;
                margin: 0 0 0 0;
            }

            .footer-disclaimer strong {
                color: #1a2332;
            }

            /* ── Footer bar ── */
            .footer-bar {
                background: #1a2332;
                padding: 16px 36px;
                display: flex;
                align-items: center;
                justify-content: space-between;
                flex-wrap: wrap;
                gap: 10px;
                margin-top: 20px;
            }

            .footer-bar .copy {
                font-size: 0.75rem;
                color: #8a99ad;
            }

            .footer-bar .copy strong {
                color: #c5cdd8;
            }

            .social-icons {
                display: flex;
                gap: 8px;
            }

            .social-icons a {
                display: flex;
                align-items: center;
                justify-content: center;
                width: 28px;
                height: 28px;
                background: #2f5597;
                border-radius: 4px;
                text-decoration: none;
                transition: background 0.2s;
            }

            .social-icons a:hover {
                background: #3a6ab8;
            }

            .social-icons svg {
                width: 14px;
                height: 14px;
                fill: #ffffff;
            }
        </style>
    </head>

    <body>

        <div class="email-wrapper">

            <!-- Header -->
            <div class="header">
                <img src="{{ asset(config('app.assets.logo')) }}" alt="{{ config('app.name') }} Logo"
                    style="width:200px; display:block;" />
            </div>

            <!-- Hero Banner -->
            <div class="hero-banner">
                <h1>Debit Notification</h1>
            </div>

            <!-- Disclaimer bar -->
            <div class="disclaimer-bar">
                Do not reply to this email. For verification, please review this notification in your online banking.
            </div>

            <!-- Body -->
            <div class="body-content">

                <h2 class="section-title">New Debit Transaction</h2>
                <p class="intro-text">A new debit transaction has been <strong>successfully</strong> completed on your
                    account. Details are listed below.
                </p>

                <!-- Transaction table -->
                <table class="info-table">
                    <tr>
                        <td>Date/Time:</td>
                        <td>{{ date('M jS, Y g:i A', strtotime($transfer->created_at)) }}</td>
                    </tr>
                    <tr>
                        <td>Type:</td>
                        <td>{{ strtoupper($transfer->transfer_type->fullLabel()) }}</td>
                    </tr>
                    <tr>
                        <td>Amount:</td>
                        <td><span class="amount-value">{{ currency($user->currency, 'code') }}
                                {{ formatAmount($transfer->amount) }}</span></td>
                    </tr>
                    <tr>
                        <td>Reference #:</td>
                        <td>{{ $transfer->reference_id }}</td>
                    </tr>
                    <tr>
                        <td>Description:</td>
                        <td>{{ $transfer->description }}</td>
                    </tr>
                </table>

                <!-- Recipient Details -->
                <p class="sub-heading">Recipient Details</p>
                <table class="info-table">
                    <tr>
                        <td>Recipient:</td>
                        <td>{{ $transfer->recipient_name }}</td>
                    </tr>
                    <tr>
                        <td>Recipient Bank:</td>
                        <td>{{ $transfer->recipient_bank }}</td>
                    </tr>
                    <tr>
                        <td>Recipient Account:</td>
                        <td>{{ $transfer->recipient_account_number }}</td>
                    </tr>
                </table>

                <!-- Transaction Status -->
                <p class="sub-heading">Transaction Status</p>
                <table class="info-table">
                    <tr>
                        <td>Status:</td>
                        <td>{{ $transfer->status->label() }}</td>
                    </tr>
                    <tr>
                        <td>Your Account:</td>
                        <td>{{ $user->account_type }} {{ maskAccountNumber($user->account_number) }}</td>
                    </tr>
                    <tr>
                        <td>Current Balance:</td>
                        <td>{{ currency($user->currency, 'code') }} {{ formatAmount($user->account_balance) }}</td>
                    </tr>
                </table>

                <!-- Important Note -->
                <div class="important-note">
                    <h4>Important Note</h4>
                    <p>This transaction has been verified and completed in accordance with bank and regulatory
                        compliance requirements. For your security, please <a href="#">log in</a> to your online
                        banking to review your updated balance and further details. Keep this information confidential
                        and never share your banking details with anyone.</p>
                </div>

                <!-- Footer disclaimer text -->
                <p class="footer-disclaimer">
                    <strong>Disclaimer:</strong>&nbsp; This automated message is for notification purposes only. Please
                    do not reply to this email. To ensure the security of your account, all transactions are subject to
                    our fraud monitoring systems. This notification does not contain your full account number.
                </p>

            </div><!-- /body-content -->

            <!-- Footer bar -->
            <div class="footer-bar">
                <span class="copy">© {{ date('Y') }} <strong>{{ config('app.name') }}</strong>
                    @if (config('app.address'))
                        <strong>:</strong>{{ config('app.address') }}
                        &nbsp;
                    @endif
                    @if (config('app.phone'))
                        |&nbsp; 📞 {{ config('app.phone') }}
                    @endif
                </span>
                {{-- <div class="social-icons">
                    <!-- Facebook -->
                    <a href="#" title="Facebook">
                        <svg viewBox="0 0 24 24">
                            <path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z" />
                        </svg>
                    </a>
                    <!-- Twitter/X -->
                    <a href="#" title="Twitter">
                        <svg viewBox="0 0 24 24">
                            <path
                                d="M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z" />
                        </svg>
                    </a>
                    <!-- LinkedIn -->
                    <a href="#" title="LinkedIn">
                        <svg viewBox="0 0 24 24">
                            <path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z" />
                            <rect x="2" y="9" width="4" height="12" />
                            <circle cx="4" cy="4" r="2" />
                        </svg>
                    </a>
                </div> --}}
            </div>

        </div><!-- /email-wrapper -->

    </body>

</html>
