<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <title>❌ Peminjaman Buku Ditolak</title>
    <style>
        body {
            font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            background-color: #f9fafb;
            color: #333;
            margin: 0;
            padding: 0;
        }
        .email-container {
            max-width: 600px;
            margin: 40px auto;
            background: #ffffff;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
            border: 1px solid #f3f4f6;
        }
        .email-header {
            background-color: #f97316; 
            color: white;
            padding: 20px 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
        }
        .email-header img {
            width: 42px;
            height: 42px;
            border-radius: 8px;
            object-fit: contain;
            background: white;
            padding: 4px;
        }
        .email-header h1 {
            font-size: 22px;
            margin: 0;
            letter-spacing: 0.5px;
        }
        .email-body {
            padding: 25px 30px;
        }
        .email-body p {
            line-height: 1.6;
            margin: 8px 0;
        }
        .email-body ul {
            list-style-type: none;
            padding: 0;
            margin: 15px 0;
            background: #fff7ed;
            border: 1px solid #fed7aa;
            border-radius: 10px;
        }
        .email-body li {
            padding: 10px 15px;
            border-bottom: 1px solid #fed7aa;
        }
        .email-body li:last-child {
            border-bottom: none;
        }
        .warning {
            background-color: #fef2f2;
            border: 1px solid #fecaca;
            padding: 12px 15px;
            border-radius: 10px;
            margin: 15px 0;
            color: #b91c1c;
        }
        .email-footer {
            background: #f3f4f6;
            color: #6b7280;
            text-align: center;
            padding: 15px;
            font-size: 13px;
        }
    </style>
</head>
<body>
    <div class="email-container">
        <div class="email-header">
            <img src="{{ asset('images/kartu.png') }}" alt="Logo Pustaka Nawasena">
            <h1>Peminjaman Buku Ditolak</h1>
        </div>

        <div class="email-body">
            <h3>Halo, {{ $transaction->anggota->nama ?? 'Anggota' }} 👋</h3>

            <p>
                Mohon maaf, pengajuan peminjaman buku 
                <strong>{{ $transaction->koleksi->title ?? '-' }}</strong> 
                telah <strong>ditolak</strong> oleh pihak admin perpustakaan.
            </p>

            <div class="warning">
                ⚠️ Untuk informasi lebih lanjut, silakan menghubungi petugas atau admin 
                <strong>Pustaka Nawasena</strong> secara langsung.
            </div>

            <p>Terima kasih atas pengertiannya 🙏</p>

            <p>Hormat kami,<br>
            <strong>Tim Perpustakaan Nawasena</strong></p>
        </div>

        <div class="email-footer">
            <p>📖 Pustaka Nawasena<br>
            Sistem Manajemen Perpustakaan Digital Bakorwil III Malang</p>
            <p><small>Email ini dikirim otomatis, mohon tidak membalas pesan ini.</small></p>
        </div>
    </div>
</body>
</html>

