{{-- Account Navigation Sidebar --}}
<nav class="w-full lg:w-64 flex-shrink-0">
    @if(auth()->user()->hasRole('administrator'))
        <a class="flex items-center gap-3 px-4 py-3 text-sm font-medium text-text-muted hover:text-primary hover:bg-white dark:hover:bg-surface-dark rounded-lg transition-all"
           href="{{ route('ch-admin.ch_admin_dashboard') }}">
            <span class="material-symbols-outlined text-[22px]">admin_panel_settings</span>
            Admin Panel
        </a>
    @endif
    <a class="flex items-center gap-3 px-4 py-3 text-sm font-medium {{ request()->routeIs('frontend.account.downloads*') ? 'text-primary bg-white dark:bg-surface-dark shadow-sm border border-gray-100 dark:border-gray-800 rounded-lg transition-all font-semibold' : 'text-text-muted hover:text-primary hover:bg-white dark:hover:bg-surface-dark rounded-lg transition-all' }}"
       href="{{ route('frontend.account.downloads') }}">
        <span class="material-symbols-outlined text-[22px]">download</span>
        {{ __('account.My Downloads') }}
    </a>
    <a class="flex items-center gap-3 px-4 py-3 text-sm font-medium {{ request()->routeIs('ch_user_orders') ? 'text-primary bg-white dark:bg-surface-dark shadow-sm border border-gray-100 dark:border-gray-800 rounded-lg transition-all font-semibold' : 'text-text-muted hover:text-primary hover:bg-white dark:hover:bg-surface-dark rounded-lg transition-all' }}"
        href="{{ route('ch_user_orders') }}">
        <span class="material-symbols-outlined text-[22px]">shopping_cart</span>
        {{ __('account.My Orders') }}
    </a>
    <a class="flex items-center gap-3 px-4 py-3 text-sm font-medium {{ in_array(Route::currentRouteName(), ['frontend.subscriptions.index', 'frontend.subscriptions.show', 'frontend.subscriptions.orders.show']) ? 'font-semibold text-primary bg-white dark:bg-surface-dark shadow-sm border border-gray-100 dark:border-gray-800' : 'text-text-muted hover:text-primary hover:bg-white dark:hover:bg-surface-dark' }} rounded-lg transition-all"
       href="{{ route('frontend.subscriptions.index') }}">
        <span class="material-symbols-outlined text-[22px]">card_membership</span>
        {{ __('account.My Subscriptions') }}
    </a>
    <a class="flex items-center gap-3 px-4 py-3 text-sm font-medium {{ request()->routeIs('frontend.account.licenses*') ? 'text-primary bg-white dark:bg-surface-dark shadow-sm border border-gray-100 dark:border-gray-800 rounded-lg transition-all font-semibold' : 'text-text-muted hover:text-primary hover:bg-white dark:hover:bg-surface-dark rounded-lg transition-all' }}"
        href="{{ route('frontend.account.licenses') }}">
        <span class="material-symbols-outlined text-[22px]">key</span>
        {{ __('account.Licenses') }}
    </a>
    <a class="flex items-center gap-3 px-4 py-3 text-sm font-medium {{ request()->routeIs('frontend.account.reviews') ? 'text-primary bg-white dark:bg-surface-dark shadow-sm border border-gray-100 dark:border-gray-800 rounded-lg transition-all font-semibold' : 'text-text-muted hover:text-primary hover:bg-white dark:hover:bg-surface-dark rounded-lg transition-all' }}"
        href="{{ route('frontend.account.reviews') }}">
        <span class="material-symbols-outlined text-[22px]">reviews</span>
        {{ __('account.My Reviews') }}
    </a>
    <a class="flex items-center gap-3 px-4 py-3 text-sm font-medium {{ in_array(Route::currentRouteName(), ['helpdesk.tickets.index', 'helpdesk.tickets.create', 'helpdesk.tickets.show']) ? 'font-semibold text-primary bg-white dark:bg-surface-dark shadow-sm border border-gray-100 dark:border-gray-800' : 'text-text-muted hover:text-primary hover:bg-white dark:hover:bg-surface-dark' }} rounded-lg transition-all"
       href="{{ route('helpdesk.tickets.index') }}">
        <span class="material-symbols-outlined text-[22px]">contact_support</span>
        Support Tickets
    </a>
    <a class="flex items-center gap-3 px-4 py-3 text-sm font-medium {{ Route::currentRouteName() == 'frontend.user.account' ? 'font-semibold text-primary bg-white dark:bg-surface-dark shadow-sm border border-gray-100 dark:border-gray-800' : 'text-text-muted hover:text-primary hover:bg-white dark:hover:bg-surface-dark' }} rounded-lg transition-all"
        href="{{ route('frontend.user.account') }}">
        <span class="material-symbols-outlined text-[22px]">settings</span>
        {{ __('account.My Account') }}
    </a>
    <form id="logout-form-account" action="{{ route('logout') }}" method="POST" style="display: none;">
        @csrf
    </form>
    <a class="flex items-center gap-3 px-4 py-3 text-sm font-medium text-text-muted hover:text-red-600 hover:bg-white dark:hover:bg-surface-dark rounded-lg transition-all"
       href="{{ route('logout') }}" onclick="event.preventDefault(); document.getElementById('logout-form-account').submit();">
        <span class="material-symbols-outlined text-[22px]">logout</span>
        {{ __('account.Logout') }}
    </a>
</nav>
