                
<div class="vertical-menu" style="background-color: #e6efe2;">
    <!-- User Email at Top -->
    <?php if(Auth::check()): ?>
    <div style="padding: 1.2rem 1rem 0.5rem 1rem; display: flex; align-items: center; gap: 0.7rem; border-bottom: 1px solid #e0e0e0; background: #e6efe2;">
        <div style="background: #6F8E6A; color: #fff; border-radius: 50%; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.1rem;">
            <?php echo e(strtoupper(substr(Auth::user()->name,0,1))); ?>

        </div>
        <div style="display: flex; flex-direction: column;">
            <span style="font-size: 0.98rem; color: #48773D; font-weight: bold;"><?php echo e(Auth::user()->name); ?></span>
            <span style="font-size: 0.92rem; color: #48773D; opacity: 0.85;"><?php echo e(Auth::user()->email); ?></span>
        </div>
    </div>
    <?php endif; ?>
    <div data-simplebar class="h-100">
        <!--- Sidemenu -->
        <div id="sidebar-menu">
            <!-- Left Menu Start -->
            <ul class="metismenu list-unstyled" id="side-menu">
                <li class="menu-title"></li> <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Access Dashboard')): ?>
                <li>
                    <a href="<?php echo e(route('dashboard')); ?>" class="waves-effect">
                        <i class="ri-home-4-line"></i>
                        <span>Dashboard</span>
                    </a>
                </li>               
                <?php endif; ?>

                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('Access Shared Folders')): ?>
                <li>
                    <a href="<?php echo e(route('folders.my')); ?>" class="waves-effect">
                        <i class="ri-folder-3-line"></i>
                        <span>My Folders</span>
                    </a>      
                </li>
                <?php endif; ?>
 <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('My Workflows')): ?>
                        <li>
                            <a href="<?php echo e(route('workflow.myworkflow')); ?>">
                                <i class="ri-user-settings-line"></i>
                                My Workflows
                            </a>
                        </li>
                        <?php endif; ?>

                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('View Workflows')): ?>
                <li>
                    <a href="javascript: void(0);" class="has-arrow waves-effect" data-title="Workflows">
                        <i class="ri-git-merge-line"></i>
                        <span>Workflows</span>
                    </a>
                    <ul class="sub-menu" aria-expanded="false">
                       
                        <li>
                            <a href="<?php echo e(route('workflow.index')); ?>">
                                <i class="ri-list-check-2"></i>
                                All Workflows
                            </a>
                        </li>
                    </ul>
                </li>
                <?php endif; ?>

           

                 <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('View Folder')): ?>
                 <li>
                    <a href="<?php echo e(route('folders.index')); ?>" class="waves-effect" data-title="Folders & Files">
                        <i class="ri-folders-line"></i>
                        <span>Folder Mgt</span>
                    </a>
                </li>
                <?php endif; ?>

                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->any(['View Users', 'View Roles'])): ?>
                <li>
                    <a href="javascript: void(0);" class="has-arrow waves-effect" data-title="User Management">
                        <i class="ri-group-line"></i>
                        <span>User Management</span>
                    </a>

                 <ul class="sub-menu" aria-expanded="false">
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('View Users')): ?>
                    <li>
                        <a href="<?php echo e(route('users.index')); ?>">
                            <i class="ri-user-line"></i>
                            Users
                        </a>
                    </li>
                    <?php endif; ?>
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('View Roles')): ?>
                    <li>
                        <a href="<?php echo e(route('roles.index')); ?>">
                            <i class="ri-shield-user-line"></i>
                            User Roles
                        </a>
                    </li>
                    <?php endif; ?>
                </ul>   
                </li>
                <?php endif; ?>

                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('View Reports')): ?>
                <li>
                    <a href="javascript: void(0);" class="has-arrow waves-effect<?php echo e(request()->routeIs('reports.*') ? ' active' : ''); ?>" data-title="Reports">
                        <i class="ri-file-chart-line"></i>
                        <span>Reports</span>
                    </a>
                    <ul class="sub-menu" aria-expanded="false">
                        <li>
                            <a href="<?php echo e(route('reports.workflow-report')); ?>">
                                <i class="ri-bar-chart-line"></i>
                                WF Summary
                            </a>
                        </li>
                        <li>
                            <a href="<?php echo e(route('reports.task-report')); ?>">
                                <i class="ri-time-line"></i>
                                Task Status
                            </a>
                        </li>
                        <li>
                            <a href="<?php echo e(route('reports.user-report')); ?>">
                                <i class="ri-user-line"></i>
                                User Activity
                            </a>
                        </li>
                        <li>
                            <a href="<?php echo e(route('reports.folder-file-stats')); ?>">
                                <i class="ri-archive-line"></i>
                                Folder & File Stats
                            </a>
                        </li>
                    </ul>
                </li>
                <?php endif; ?>

                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('View System Logs')): ?>
    <li>
                    <a href="javascript: void(0);" class="has-arrow waves-effect" data-title="Workflows">
                         <i class="ri-file-warning-line"></i>
                        <span>System Logs</span>
                    </a>
                    <ul class="sub-menu" aria-expanded="false">
                       
                        <li>
                            <a href="<?php echo e(route('workflow.audit')); ?>">
                                <i class="ri-file-warning-line"></i>
                               Activity Logs
                            </a>
                        </li>
                      
                    </ul>
                </li>
                <?php endif; ?>
            </ul>
        </div>
        <!-- Sidebar -->
    </div>
</div><?php /**PATH /Applications/XAMPP/xamppfiles/htdocs/spga/resources/views/admin/body/sidebar.blade.php ENDPATH**/ ?>