<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Pembayaran Berhasil</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            font-family: 'Arial', sans-serif;
            background: linear-gradient(135deg, #000000 0%, #0a0a1f 100%);
        }
        .container {
            max-width: 600px;
            margin: 40px auto;
            background: rgba(17, 24, 39, 0.95);
            border: 2px solid rgba(34, 211, 238, 0.3);
            border-radius: 16px;
            overflow: hidden;
        }
        .header {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            padding: 30px;
            text-align: center;
        }
        .header h1 {
            margin: 0;
            color: #ffffff;
            font-size: 28px;
            font-weight: bold;
        }
        .content {
            padding: 30px;
            color: #e5e7eb;
        }
        .success-icon {
            text-align: center;
            font-size: 64px;
            margin: 20px 0;
        }
        .info-box {
            background: rgba(16, 185, 129, 0.1);
            border: 1px solid rgba(16, 185, 129, 0.3);
            border-radius: 12px;
            padding: 20px;
            margin: 20px 0;
        }
        .info-row {
            display: flex;
            justify-content: space-between;
            padding: 12px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        .info-row:last-child {
            border-bottom: none;
        }
        .label {
            color: #9ca3af;
            font-size: 14px;
        }
        .value {
            color: #ffffff;
            font-weight: bold;
            font-size: 14px;
        }
        .status-box {
            background: rgba(16, 185, 129, 0.2);
            border: 2px solid rgba(16, 185, 129, 0.5);
            padding: 16px;
            border-radius: 8px;
            margin-top: 20px;
            text-align: center;
        }
        .status-text {
            color: #10b981;
            font-size: 18px;
            font-weight: bold;
        }
        .footer {
            background: rgba(0, 0, 0, 0.3);
            padding: 20px;
            text-align: center;
            color: #9ca3af;
            font-size: 12px;
        }
    </style>
</head>
<body>
    <div class="container">
        <!-- Header -->
        <div class="header">
            <h1>✅ PEMBAYARAN BERHASIL!</h1>
        </div>

        <!-- Content -->
        <div class="content">
            <div class="success-icon">🎉</div>

            <p style="text-align: center; font-size: 18px;">
                Halo, <strong>{{ $transaction->customer_name }}</strong>!
            </p>
            <p style="text-align: center;">
                Pembayaran Anda telah berhasil dikonfirmasi. Pesanan sedang diproses dan akan segera dikirim ke akun Anda.
            </p>

            <!-- Order Details -->
            <div class="info-box">
                <div class="info-row">
                    <span class="label">Invoice</span>
                    <span class="value">{{ $transaction->invoice_number }}</span>
                </div>
                <div class="info-row">
                    <span class="label">Produk</span>
                    <span class="value">{{ $transaction->product_name }}</span>
                </div>
                <div class="info-row">
                    <span class="label">ID Akun</span>
                    <span class="value">{{ $transaction->customer_data }}</span>
                </div>
                <div class="info-row">
                    <span class="label">Total Dibayar</span>
                    <span class="value">Rp {{ number_format($transaction->total_amount, 0, ',', '.') }}</span>
                </div>
                <div class="info-row">
                    <span class="label">Waktu Pembayaran</span>
                    <span class="value">{{ \Carbon\Carbon::parse($transaction->paid_at)->format('d M Y, H:i') }} WIB</span>
                </div>
            </div>

            <!-- Status -->
            <div class="status-box">
                <div class="status-text">🔄 SEDANG DIPROSES</div>
                <p style="margin: 10px 0 0 0; color: #9ca3af; font-size: 14px;">
                    Estimasi: 1-5 menit
                </p>
            </div>

            <!-- Info -->
            <p style="margin-top: 30px; color: #9ca3af; font-size: 14px; text-align: center;">
                Anda akan menerima email lagi setelah pesanan berhasil diproses.
            </p>
        </div>

        <!-- Footer -->
        <div class="footer">
            <p>Email ini dikirim otomatis, mohon tidak membalas.</p>
            <p>Jika ada kendala, hubungi CS kami.</p>
            <p style="margin-top: 10px;">© 2026 Ryll Store - All Rights Reserved</p>
        </div>
    </div>
</body>
</html>
