<style>
    .seller-sidebar .list-group-item {
        border: none;
        border-left: 3px solid transparent;
        transition: all 0.3s ease;
        font-weight: 500;
    }
    
    .seller-sidebar .list-group-item:hover:not(.disabled) {
        background-color: #f7fafc !important;
        border-left-color: #3b82f6;
        color: #2563eb !important;
        transform: translateX(3px);
    }
    
    .seller-sidebar .list-group-item.active {
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
        color: white !important;
        border-left-color: #1e40af;
        font-weight: 600;
    }
    
    .seller-sidebar .list-group-item.active:hover {
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
        transform: translateX(0);
    }
    
    .seller-sidebar .list-group-item i {
        min-width: 20px;
        text-align: center;
    }
</style>

<div class="card border-0 shadow-sm seller-sidebar">
    <div class="card-body p-0">
        <div class="p-4 border-bottom text-center">
            <div class="mb-3">
                @if(Auth::user()->seller && Auth::user()->seller->logo)
                    <img src="{{ asset('storage/' . Auth::user()->seller->logo) }}" alt="Logo" class="rounded-circle img-thumbnail" style="width: 80px; height: 80px; object-fit: cover;">
                @else
                    <div class="rounded-circle bg-light d-inline-flex align-items-center justify-content-center text-primary fw-bold" style="width: 80px; height: 80px; font-size: 2rem;">
                        {{ substr(Auth::user()->name, 0, 1) }}
                    </div>
                @endif
            </div>
            <h6 class="fw-bold mb-1">{{ Auth::user()->company_name ?? Auth::user()->name }}</h6>
            <p class="text-muted small mb-0">{{ Auth::user()->email }}</p>
            @if(Auth::user()->seller && Auth::user()->seller->is_verified)
                <span class="badge bg-success mt-2"><i class="bi bi-check-circle-fill"></i> Verified Seller</span>
            @else
                <span class="badge bg-warning text-dark mt-2"><i class="bi bi-exclamation-circle"></i> Verification Pending</span>
            @endif
        </div>
        <div class="list-group list-group-flush py-2">
            <a href="{{ route('seller.dashboard') }}" class="list-group-item list-group-item-action border-0 px-4 py-3 {{ request()->routeIs('seller.dashboard') ? 'active' : '' }}">
                <i class="bi bi-speedometer2 me-2"></i> Dashboard
            </a>
            <a href="{{ route('seller.products.index') }}" class="list-group-item list-group-item-action border-0 px-4 py-3 {{ request()->routeIs('seller.products.*') ? 'active' : '' }}">
                <i class="bi bi-box-seam me-2"></i> My Products
            </a>
            <a href="{{ route('seller.rfqs') }}" class="list-group-item list-group-item-action border-0 px-4 py-3 {{ request()->routeIs('seller.rfqs') ? 'active' : '' }}">
                <i class="bi bi-megaphone me-2"></i> Buy Leads
            </a>
            <a href="{{ route('seller.inquiries.index') }}" class="list-group-item list-group-item-action border-0 px-4 py-3 {{ request()->routeIs('seller.inquiries.*') ? 'active' : '' }}">
                <i class="bi bi-chat-dots me-2"></i> Inquiries
            </a>
            <a href="{{ route('seller.quotes.index') }}" class="list-group-item list-group-item-action border-0 px-4 py-3 {{ request()->routeIs('seller.quotes.*') ? 'active' : '' }}">
                <i class="bi bi-chat-quote me-2"></i> My Quotes
                @php
                    $acceptedQuotes = Auth::user()->seller?->quotes()->where('status', 'accepted')->count() ?? 0;
                @endphp
                @if($acceptedQuotes > 0)
                    <span class="badge bg-success rounded-pill float-end">{{ $acceptedQuotes }}</span>
                @endif
            </a>
            <a href="{{ route('seller.transactions.index') }}" class="list-group-item list-group-item-action border-0 px-4 py-3 {{ request()->routeIs('seller.transactions.*') ? 'active' : '' }}">
                <i class="bi bi-receipt me-2"></i> My Transactions
            </a>
            <a href="{{ route('seller.subscription.index') }}" class="list-group-item list-group-item-action border-0 px-4 py-3 {{ request()->routeIs('seller.subscription.*') ? 'active' : '' }}">
                <i class="bi bi-credit-card me-2"></i> Subscription
            </a>
            <a href="{{ route('seller.microsite.index') }}" class="list-group-item list-group-item-action border-0 px-4 py-3 {{ request()->routeIs('seller.microsite.*') ? 'active' : '' }}">
                <i class="bi bi-globe me-2"></i> Microsite Manager
            </a>
            <a href="{{ route('seller.analytics') }}" class="list-group-item list-group-item-action border-0 px-4 py-3 {{ request()->routeIs('seller.analytics') ? 'active' : '' }}">
                <i class="bi bi-graph-up me-2"></i> Analytics
            </a>
            
            <!-- Promotion Section -->
            <div class="mt-2 px-4 py-2 bg-light border-top border-bottom">
                <small class="text-muted fw-bold">PROMOTIONS</small>
            </div>
            <a href="{{ route('seller.promotions.index') }}" class="list-group-item list-group-item-action border-0 px-4 py-3 {{ request()->routeIs('seller.promotions.index') ? 'active' : '' }}">
                <i class="bi bi-megaphone-fill me-2"></i> My Promotions
            </a>
            <a href="{{ route('seller.promotions.packages') }}" class="list-group-item list-group-item-action border-0 px-4 py-3 {{ request()->routeIs('seller.promotions.packages') ? 'active' : '' }}">
                <i class="bi bi-star-fill me-2"></i> Promote Products
            </a>
            
            <div class="mt-2 px-4 py-2 bg-light border-top border-bottom">
                <small class="text-muted fw-bold">ACCOUNT</small>
            </div>
            <a href="{{ route('seller.profile') }}" class="list-group-item list-group-item-action border-0 px-4 py-3 {{ request()->routeIs('seller.profile') ? 'active' : '' }}">
                <i class="bi bi-person-gear me-2"></i> Company Profile
            </a>
            <form action="{{ route('logout') }}" method="POST" class="d-inline">
                @csrf
                <button type="submit" class="list-group-item list-group-item-action border-0 px-4 py-3 text-danger bg-transparent w-100 text-start">
                    <i class="bi bi-box-arrow-right me-2"></i> Logout
                </button>
            </form>
        </div>
    </div>
</div>
