@section('header')
	@include('common.header')
@stop

@section('content')
<div class="row">
    <div class="col-md-8 col-md-offset-2">
        <div class="panel panel-warning">
            <div class="panel-heading">
                <h3 class="panel-title">
                    <i class="fa fa-lock"></i> Access Denied - {{ $feature }}
                </h3>
            </div>
            <div class="panel-body">
                <div class="text-center" style="padding: 20px;">
                    <i class="fa fa-lock" style="font-size: 64px; color: #f0ad4e; margin-bottom: 20px;"></i>
                    
                    <h4>You don't have permission to access this feature</h4>
                    
                    <p class="text-muted" style="margin: 20px 0;">
                        {{ $description }}
                    </p>
                    
                    <div class="well well-sm">
                        <strong>Required Permission:</strong> <code>{{ $required_permission }}</code>
                    </div>
                    
                    <div style="margin-top: 30px;">
                        <a href="{{ URL::previous() }}" class="btn btn-default">
                            <i class="fa fa-arrow-left"></i> Go Back
                        </a>
                        <a href="/admin" class="btn btn-primary">
                            <i class="fa fa-home"></i> Admin Dashboard
                        </a>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="panel panel-info">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <i class="fa fa-info-circle"></i> Need Access?
                </h4>
            </div>
            <div class="panel-body">
                <p>If you believe you should have access to this feature, please contact your system administrator to:</p>
                <ul>
                    <li>Grant you the required permission: <strong>{{ $required_permission }}</strong></li>
                    <li>Add you to the appropriate user group</li>
                    <li>Review your current permissions and group memberships</li>
                </ul>
                
                <div class="alert alert-info">
                    <strong>Your Current Groups:</strong>
                    @if(Auth::user()->groups()->count() > 0)
                        @foreach(Auth::user()->groups as $group)
                            <span class="label label-info">{{ $group->name }}</span>
                        @endforeach
                    @else
                        <em>No groups assigned</em>
                    @endif
                </div>
            </div>
        </div>
    </div>
</div>
@stop 