<header id="page-topbar" style="background-color: #48773D;">
				<div class="navbar-header">
					<div class="d-flex">
						<!-- LOGO -->
						<div class="navbar-brand-box">
							<a href="<?php echo e(route('dashboard')); ?>" class="logo logo-dark">
								<span class="logo-sm">
									<img src="<?php echo e(asset('assets/images/logo.png')); ?>" alt="logo-sm" height="64">
								</span>
								<span class="logo-lg">
									<img src="<?php echo e(asset('assets/images/logo.png')); ?>" alt="logo-dark" height="64">
								</span>
							</a>

							<a href="<?php echo e(route('dashboard')); ?>" class="logo logo-light">
								<span class="logo-sm">
									<img src="<?php echo e(asset('assets/images/logo.png')); ?>"  height="64">
								</span>
								<span class="logo-lg">
									<img src="<?php echo e(asset('assets/images/logo.png')); ?>" alt="logo-light" height="64">
								</span>
							</a>
						</div>

						<button type="button" class="btn btn-sm px-3 font-size-24 header-item waves-effect" id="vertical-menu-btn">
							<i class="ri-menu-2-line align-middle"><span class="logo-sm">
                                   
								</span></i>
						</button>

						<!-- App Search-->
					   <!--  <form class="app-search d-none d-lg-block">
							<div class="position-relative">
								<input type="text" class="form-control" placeholder="Search...">
								<span class="ri-search-line"></span>
							</div>
						</form>-->
                            
                        
 
					</div>

					<div class="d-flex">
                    
                      
						<div class="dropdown d-none d-lg-inline-block ms-1">
							<button type="button" class="btn header-item noti-icon waves-effect" data-toggle="fullscreen">
								<i class="ri-fullscreen-line"></i>
							</button>
						</div> 


   <div class="relative d-inline-block">
	   <?php $hasUnread = auth()->user()->unreadNotifications->count() > 0; ?>
	   <button type="button" class="relative btn header-item noti-icon waves-effect" id="page-header-notifications-dropdown"
		   data-bs-toggle="dropdown" aria-expanded="false">
		   <i id="notification-bell" class="ri-notification-3-line"></i>
		   <span id="notification-dot" class="absolute top-1 right-1 inline-block w-2 h-2 bg-red-600 rounded-full animate-pulse" style="display: none;"></span>
	   </button>
	</style>
	<script>
	function updateNotificationBell() {
		fetch('/spga/public/notifications/unread-count', {headers: {'Accept': 'application/json'}})
			.then(response => response.json())
			.then(data => {
				console.log('Unread notifications:', data.unread);
				var bell = document.getElementById('notification-bell');
				var dot = document.getElementById('notification-dot');
				if (data.unread > 0) {
					bell.classList.add('animate-shake', 'text-red-500');
					dot.style.display = 'inline-block';
				} else {
					bell.classList.remove('animate-shake', 'text-red-500');
					dot.style.display = 'none';
				}
			})
			.catch(function(error) {
				console.error('Notification fetch error:', error);
			});
	}
	// Call once on page load
	updateNotificationBell();
	// Then poll every 30 seconds
	setInterval(updateNotificationBell, 30000);
	</script>
	</style>
	<style>
	@keyframes shake {
		0% { transform: rotate(0deg); }
		20% { transform: rotate(-15deg); }
		40% { transform: rotate(10deg); }
		60% { transform: rotate(-10deg); }
		80% { transform: rotate(5deg); }
		100% { transform: rotate(0deg); }
	}
	.animate-shake {
		animation: shake 0.7s cubic-bezier(.36,.07,.19,.97) both infinite;
	}
	</style>
	   <div class="dropdown-menu dropdown-menu-lg dropdown-menu-end p-0 shadow-2xl rounded-2xl border border-gray-200 mt-2"
		   aria-labelledby="page-header-notifications-dropdown" style="min-width: 370px; background: #fff;">
		   <div class="px-3 py-2 border-b border-gray-100 modal-notification-header">
			   <span class="font-semibold text-lg tracking-tight w-100" style="color: #fff;">Notifications</span>
		   </div>
		   <div class="overflow-y-auto" style="max-height: 340px; margin-left: 12px;">
			   <?php $__empty_1 = true; $__currentLoopData = auth()->user()->unreadNotifications; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $notification): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
				 <a href="<?php echo e(route('notifications.read', $notification->id)); ?>" class="text-reset notification-item">	   <div class="flex-shrink-0 w-11 h-11 rounded-full bg-blue-100 flex items-center justify-center mt-1 shadow-sm">
						   <i class="ri-user-3-line text-blue-600 text-xl"></i>
					   </div>
					   <div class="flex-1 min-w-0">
						<div class="font-semibold text-gray-900 text-sm leading-tight mb-0.5 group-hover:text-blue-700" style="font-size: 1rem;"><?php echo e($notification->data['title'] ?? 'Notification'); ?></div>
						<div class="text-gray-700 text-xs mb-1 leading-snug" style="font-size: 1rem;"><?php echo e($notification->data['body'] ?? ''); ?></div>
						<div class="flex items-center gap-1 text-xs text-gray-400 mt-1" style="font-size: 0.75rem;">
							<i class="mdi mdi-clock-outline"></i>
							<span><?php echo e($notification->created_at->diffForHumans()); ?></span>
						</div>
					   </div>
			 </a>
			   <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
				   <div class="text-center text-gray-400 py-8 text-base">No new notifications</div>
			   <?php endif; ?>
		   </div>
		   <div class="px-5 py-3 border-t border-gray-100 bg-gray-50 rounded-b-2xl">
			   <a class="block text-center text-blue-600 text-base font-semibold hover:underline" href="<?php echo e(route('notifications.index')); ?>">
				   <i class="mdi mdi-arrow-right-circle mr-1"></i> View More..
			   </a>
		   </div>
	   </div>
   </div>

                      
<button type="button" class="btn header-item waves-effect" id="page-header-user-dropdown"
	data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
	<span class="d-flex align-items-center">
		<div class="rounded-circle header-profile-user bg-primary d-flex align-items-center justify-content-center" style="width:32px; height:32px;">
			<i class="ri-user-3-line text-white" style="font-size: 1.2rem;"></i>
		</div>
		<span class="d-none d-xl-inline-block ms-2 text-white" style="font-weight: 400;">
			<?php echo e(auth()->user()->first_name ?? ''); ?> <?php echo e(auth()->user()->last_name ?? ''); ?>

		</span>
								<i class="mdi mdi-chevron-down d-none d-xl-inline-block"></i>
							</button>
							<div class="dropdown-menu dropdown-menu-end">
								<!-- item-->
							   <a class="dropdown-item" href="<?php echo e(route('profile.update')); ?>"><i class="ri-user-line align-middle me-1"></i> Profile</a>

								<div class="dropdown-divider"></div>
								  <!-- Authentication -->
						<form method="POST" action="<?php echo e(route('logout')); ?>">
							<?php echo csrf_field(); ?>

							<?php if (isset($component)) { $__componentOriginal68cb1971a2b92c9735f83359058f7108 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal68cb1971a2b92c9735f83359058f7108 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.dropdown-link','data' => ['href' => route('logout'),'onclick' => 'event.preventDefault();
												this.closest(\'form\').submit();','class' => 'dropdown-item text-danger']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('dropdown-link'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['href' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(route('logout')),'onclick' => 'event.preventDefault();
												this.closest(\'form\').submit();','class' => 'dropdown-item text-danger']); ?><i class="ri-shut-down-line align-middle me-1 text-danger"></i>
								<?php echo e(__('Log Out')); ?>

							 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $attributes = $__attributesOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__attributesOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal68cb1971a2b92c9735f83359058f7108)): ?>
<?php $component = $__componentOriginal68cb1971a2b92c9735f83359058f7108; ?>
<?php unset($__componentOriginal68cb1971a2b92c9735f83359058f7108); ?>
<?php endif; ?>
						</form>
								 </div>
						</div>


            
					</div>
				</div> 
			</header><?php /**PATH /Applications/XAMPP/xamppfiles/htdocs/spga/resources/views/admin/body/header.blade.php ENDPATH**/ ?>