<!DOCTYPE html>
<html lang="en" class="h-full bg-slate-900">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Certificate Verification - Humanity Welfare Society</title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet">
    <script src="https://unpkg.com/@lucide/web@latest"></script>
    <script src="https://cdn.tailwindcss.com"></script>
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    fontFamily: { sans: ['"Plus Jakarta Sans"', 'sans-serif'] }
                }
            }
        }
    </script>
</head>
<body class="min-h-full font-sans antialiased text-slate-800 bg-slate-950 p-4 md:p-8 flex items-center justify-center">

    <div class="w-full max-w-3xl bg-white rounded-3xl shadow-2xl overflow-hidden border border-slate-800">
        
        <!-- Header Banner -->
        <div class="bg-gradient-to-r from-slate-900 via-emerald-950 to-slate-900 p-8 text-white text-center relative overflow-hidden">
            <div class="absolute -top-20 -left-20 w-64 h-64 bg-emerald-500/20 rounded-full blur-3xl"></div>
            
            <div class="relative z-10 flex flex-col items-center gap-3">
                <div class="w-16 h-16 rounded-2xl bg-emerald-600 text-white flex items-center justify-center font-extrabold text-2xl shadow-xl shadow-emerald-600/50 border-2 border-emerald-400/40">
                    HWS
                </div>
                <h1 class="text-2xl font-extrabold tracking-tight">HUMANITY WELFARE SOCIETY</h1>
                <p class="text-xs font-semibold text-emerald-400 tracking-wider uppercase">Official Online Certificate Verification Portal</p>
            </div>
        </div>

        <!-- Verification Status Result -->
        <div class="p-6 md:p-10 space-y-8">
            
            <?php if($certificate && $certificate->status === 'active'): ?>
            <!-- VALID CERTIFICATE -->
            <div class="bg-emerald-50 border-2 border-emerald-500/40 rounded-2xl p-6 text-center space-y-3 relative overflow-hidden shadow-sm">
                <div class="w-16 h-16 bg-emerald-600 text-white rounded-full flex items-center justify-center mx-auto shadow-lg shadow-emerald-600/30 animate-bounce">
                    <i data-lucide="shield-check" class="w-10 h-10"></i>
                </div>
                <div class="space-y-1">
                    <h2 class="text-xl font-extrabold text-emerald-900 uppercase tracking-wide">Official & Authentic Certificate</h2>
                    <p class="text-xs font-semibold text-emerald-700">Verified Authentic Document Issued by Humanity Welfare Society (NGO)</p>
                </div>
                <div class="inline-block bg-emerald-600 text-white text-xs font-bold px-4 py-1.5 rounded-full tracking-wider uppercase shadow">
                    Status: VERIFIED & ACTIVE
                </div>
            </div>

            <!-- Student Metadata Card -->
            <div class="bg-slate-50 rounded-2xl p-6 border border-slate-200 space-y-6">
                <div class="flex items-center justify-between border-b border-slate-200 pb-4">
                    <span class="text-xs font-bold uppercase text-slate-500 tracking-wider">Certificate Serial ID</span>
                    <span class="font-mono text-sm font-extrabold text-emerald-700 bg-emerald-100/80 px-3 py-1 rounded-lg border border-emerald-200">
                        <?php echo e($certificate->certificate_uuid); ?>

                    </span>
                </div>

                <div class="grid grid-cols-1 md:grid-cols-2 gap-6 text-sm">
                    <div>
                        <span class="block text-xs font-semibold text-slate-400 uppercase tracking-wider mb-1">Student Full Name</span>
                        <p class="font-extrabold text-slate-900 text-lg"><?php echo e($certificate->student->full_name); ?></p>
                    </div>

                    <div>
                        <span class="block text-xs font-semibold text-slate-400 uppercase tracking-wider mb-1">College / Institution</span>
                        <p class="font-bold text-slate-800"><?php echo e($certificate->student->college->name ?? 'Direct Applicant'); ?></p>
                        <?php if($certificate->student->college && $certificate->student->college->city_state): ?>
                            <span class="text-xs text-slate-500"><?php echo e($certificate->student->college->city_state); ?></span>
                        <?php endif; ?>
                    </div>

                    <div>
                        <span class="block text-xs font-semibold text-slate-400 uppercase tracking-wider mb-1">Internship Course / Domain</span>
                        <p class="font-bold text-emerald-800"><?php echo e($certificate->course->title ?? 'Internship Program'); ?></p>
                    </div>

                    <div>
                        <span class="block text-xs font-semibold text-slate-400 uppercase tracking-wider mb-1">Internship Mode & Nature</span>
                        <p class="font-semibold text-slate-800"><?php echo e($certificate->internship_mode); ?> • <?php echo e($certificate->internship_nature); ?></p>
                    </div>

                    <div>
                        <span class="block text-xs font-semibold text-slate-400 uppercase tracking-wider mb-1">Internship Period</span>
                        <p class="font-semibold text-slate-800">
                            <?php echo e(date('d M Y', strtotime($certificate->start_date))); ?> — <?php echo e(date('d M Y', strtotime($certificate->end_date))); ?>

                            <span class="text-xs font-bold text-emerald-600 bg-emerald-50 px-2 py-0.5 rounded border border-emerald-200 ml-1">(<?php echo e($certificate->duration); ?>)</span>
                        </p>
                    </div>

                    <div>
                        <span class="block text-xs font-semibold text-slate-400 uppercase tracking-wider mb-1">Certificate Issue Date</span>
                        <p class="font-semibold text-slate-800"><?php echo e(date('d F Y', strtotime($certificate->issue_date))); ?></p>
                    </div>
                </div>
            </div>

            <!-- Download Authentic PDF Action -->
            <div class="text-center pt-2">
                <a href="<?php echo e(route('public.verify.download', $certificate->certificate_uuid)); ?>" 
                   class="inline-flex items-center gap-3 bg-gradient-to-r from-emerald-600 to-teal-600 hover:from-emerald-700 hover:to-teal-700 text-white font-bold text-base px-8 py-4 rounded-2xl shadow-xl shadow-emerald-600/30 transition-all duration-200 hover:scale-105">
                    <i data-lucide="file-down" class="w-6 h-6"></i>
                    <span>Download Official Verified PDF Certificate</span>
                </a>
            </div>

            <?php elseif($certificate && $certificate->status === 'revoked'): ?>
            <!-- REVOKED CERTIFICATE -->
            <div class="bg-rose-50 border-2 border-rose-500/40 rounded-2xl p-6 text-center space-y-3 relative overflow-hidden shadow-sm">
                <div class="w-16 h-16 bg-rose-600 text-white rounded-full flex items-center justify-center mx-auto shadow-lg shadow-rose-600/30">
                    <i data-lucide="alert-octagon" class="w-10 h-10"></i>
                </div>
                <div class="space-y-1">
                    <h2 class="text-xl font-extrabold text-rose-900 uppercase tracking-wide">WARNING: CERTIFICATE REVOKED</h2>
                    <p class="text-xs font-semibold text-rose-700">This certificate has been officially CANCELLED / REVOKED by Humanity Welfare Society.</p>
                </div>
                <?php if($certificate->revocation_reason): ?>
                <div class="bg-white/80 p-4 rounded-xl border border-rose-200 text-xs font-medium text-rose-800 text-left max-w-lg mx-auto">
                    <strong>Revocation Reason:</strong> <?php echo e($certificate->revocation_reason); ?>

                </div>
                <?php endif; ?>
            </div>

            <?php else: ?>
            <!-- INVALID UUID -->
            <div class="bg-slate-50 border-2 border-slate-300 rounded-2xl p-8 text-center space-y-4">
                <div class="w-16 h-16 bg-slate-400 text-white rounded-full flex items-center justify-center mx-auto">
                    <i data-lucide="file-x" class="w-8 h-8"></i>
                </div>
                <div class="space-y-1">
                    <h2 class="text-lg font-bold text-slate-800">Certificate Not Found or Invalid</h2>
                    <p class="text-xs text-slate-500">The certificate ID <span class="font-mono font-bold text-slate-700"><?php echo e($uuid); ?></span> does not match any official record in our database.</p>
                </div>
            </div>
            <?php endif; ?>

            <!-- Footer Notes -->
            <div class="border-t border-slate-200 pt-6 text-center text-xs text-slate-500 space-y-1">
                <p>Humanity Welfare Society (NGO) Verification System</p>
                <p>For support or verification queries, contact <a href="mailto:verify@humanitywelfare.org" class="text-emerald-600 font-semibold underline">verify@humanitywelfare.org</a></p>
            </div>
        </div>
    </div>

    <script>lucide.createIcons();</script>
</body>
</html>
<?php /**PATH D:\ItsAfaqtive\Certificates Management System\resources\views/public/verification.blade.php ENDPATH**/ ?>