<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo $__env->yieldContent('title', 'Buyer Dashboard'); ?> - The Mini Port</title>
    
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Bootstrap Icons -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
    <!-- Google Fonts -->
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
    
    <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">
    
    <style>
        :root {
            --sidebar-width: 280px;
            --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); /* Blue for Buyer */
            --dark-gradient: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
            --card-shadow: 0 4px 20px rgba(0,0,0,0.08);
            --hover-shadow: 0 8px 30px rgba(0,0,0,0.12);
        }
        
        * { box-sizing: border-box; }
        
        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
            min-height: 100vh;
            font-size: 14px;
        }
        
        /* Premium Sidebar */
        .admin-sidebar {
            position: fixed;
            top: 0;
            left: 0;
            width: var(--sidebar-width);
            height: 100vh;
            background: var(--dark-gradient);
            z-index: 1000;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            overflow-y: auto;
            overflow-x: hidden;
        }
        
        .admin-sidebar::-webkit-scrollbar { width: 4px; }
        .admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }
        
        .sidebar-brand {
            padding: 1.5rem;
            background: rgba(255,255,255,0.03);
            border-bottom: 1px solid rgba(255,255,255,0.06);
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .sidebar-brand-logo {
            width: 44px;
            height: 44px;
            border-radius: 12px;
            background: var(--primary-gradient);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            color: #fff;
            font-size: 1.2rem;
            flex-shrink: 0;
        }
        .sidebar-brand-text h6 {
            color: #fff;
            margin: 0;
            font-weight: 600;
            font-size: 0.95rem;
        }
        .sidebar-brand-text small {
            color: rgba(255,255,255,0.5);
            font-size: 0.7rem;
        }
        
        /* Navigation */
        .nav-section {
            padding: 1rem 0;
        }
        .nav-section-title {
            color: rgba(255,255,255,0.35);
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            font-weight: 600;
            padding: 0.5rem 1.5rem;
            margin-bottom: 0.25rem;
        }
        .nav-link {
            color: rgba(255,255,255,0.65);
            padding: 0.7rem 1.5rem;
            display: flex;
            align-items: center;
            gap: 12px;
            transition: all 0.2s ease;
            text-decoration: none;
            font-size: 0.85rem;
            font-weight: 500;
            border-left: 3px solid transparent;
        }
        .nav-link i {
            font-size: 1.1rem;
            width: 22px;
            text-align: center;
            transition: transform 0.2s;
        }
        .nav-link:hover {
            color: #fff;
            background: rgba(255,255,255,0.05);
        }
        .nav-link:hover i {
            transform: scale(1.1);
        }
        .nav-link.active {
            color: #fff;
            background: linear-gradient(90deg, rgba(59,130,246,0.2) 0%, transparent 100%);
            border-left-color: #3b82f6;
        }
        
        /* Main Content */
        .admin-main {
            margin-left: var(--sidebar-width);
            min-height: 100vh;
            transition: margin-left 0.3s;
        }
        
        /* Premium Topbar */
        .admin-topbar {
            background: rgba(255,255,255,0.95);
            backdrop-filter: blur(20px);
            padding: 0.75rem 1.5rem;
            box-shadow: 0 1px 3px rgba(0,0,0,0.03);
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 100;
            border-bottom: 1px solid rgba(0,0,0,0.04);
        }
        
        .topbar-icon {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #f1f5f9;
            color: #64748b;
            transition: all 0.2s;
            border: none;
            cursor: pointer;
        }
        .topbar-icon:hover { background: #e2e8f0; color: #334155; }
        
        /* Profile Dropdown */
        .profile-dropdown {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 6px 12px 6px 6px;
            border-radius: 50px;
            background: #f1f5f9;
            cursor: pointer;
            transition: all 0.2s;
            border: none;
        }
        .profile-dropdown:hover { background: #e2e8f0; }
        .profile-avatar {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            background: var(--primary-gradient);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-weight: 600;
        }
        
        /* Mobile Toggle */
        .sidebar-toggle {
            display: none;
            width: 40px;
            height: 40px;
            border-radius: 12px;
            background: #f1f5f9;
            border: none;
            color: #64748b;
        }
        
        @media (max-width: 991px) {
            .admin-sidebar { transform: translateX(-100%); }
            .admin-sidebar.show { transform: translateX(0); }
            .admin-main { margin-left: 0; }
            .sidebar-toggle { display: flex; align-items: center; justify-content: center; }
            .sidebar-overlay {
                position: fixed;
                top: 0; left: 0; width: 100%; height: 100%;
                background: rgba(0,0,0,0.5);
                z-index: 999;
                opacity: 0;
                visibility: hidden;
                transition: all 0.3s;
            }
            .sidebar-overlay.show { opacity: 1; visibility: visible; }
        }
        
        /* Content Wrapper */
        .content-wrapper { padding: 1.5rem; }
        
        /* Global Premium Styles */
        .card {
            border: none;
            border-radius: 16px;
            box-shadow: var(--card-shadow);
            transition: all 0.3s ease;
        }
        .card:hover { box-shadow: var(--hover-shadow); transform: translateY(-2px); }
        .card-header {
            background: transparent;
            border-bottom: 1px solid rgba(0,0,0,0.05);
            padding: 1rem 1.25rem;
        }
        
        .btn-primary-gradient {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            border: none;
            color: #fff;
            padding: 0.6rem 1.5rem;
            border-radius: 10px;
            font-weight: 500;
            transition: all 0.3s;
        }
        .btn-primary-gradient:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(59,130,246,0.4);
            color: #fff;
        }

        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
            gap: 1rem;
        }
        .page-title { font-weight: 700; color: #1e293b; margin-bottom: 0; }
        
        /* Stat Cards */
        .stat-card {
            border-radius: 16px;
            padding: 1.25rem;
            color: #fff;
            display: flex;
            align-items: flex-start;
            gap: 1rem;
            transition: all 0.3s;
            height: 100%;
        }
        .stat-card:hover { transform: translateY(-4px); }
        .stat-card-primary { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
        .stat-card-success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
        .stat-card-warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
        .stat-card-info { background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%); }
        .stat-card-purple { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }
        
        .stat-icon {
            width: 48px;
            height: 48px;
            background: rgba(255,255,255,0.2);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.4rem;
            flex-shrink: 0;
        }
        .stat-value { font-size: 1.8rem; font-weight: 700; display: block; line-height: 1; }
        .stat-label { font-size: 0.8rem; opacity: 0.9; display: block; margin-bottom: 0.25rem; }
        
        /* Table Styling */
        .table-hover tbody tr:hover { background-color: rgba(59,130,246,0.02); }
        .table thead th {
            font-weight: 600;
            text-transform: uppercase;
            font-size: 0.75rem;
            letter-spacing: 0.5px;
            color: #64748b;
            background: #f8fafc;
            border-bottom: 1px solid #e2e8f0;
            padding: 1rem;
        }
        .table td { padding: 1rem; vertical-align: middle; color: #334155; }
    </style>
    <?php echo $__env->yieldPushContent('styles'); ?>
</head>
<body>
    <?php $currentRoute = Route::currentRouteName(); ?>

    <!-- Sidebar Overlay -->
    <div class="sidebar-overlay" id="sidebarOverlay"></div>

    <!-- Sidebar -->
    <nav class="admin-sidebar" id="adminSidebar">
        <div class="sidebar-brand">
            <div class="sidebar-brand-logo">MP</div>
            <div class="sidebar-brand-text">
                <h6>The Mini Port</h6>
                <small>Buyer Panel</small>
            </div>
        </div>
        
        <div class="nav-section">
            <div class="nav-section-title">Main Menu</div>
            <a href="<?php echo e(route('buyer.dashboard')); ?>" class="nav-link <?php echo e($currentRoute == 'buyer.dashboard' ? 'active' : ''); ?>">
                <i class="bi bi-speedometer2"></i> Dashboard
            </a>
            <a href="<?php echo e(route('buyer.rfqs.index')); ?>" class="nav-link <?php echo e(str_contains($currentRoute, 'buyer.rfqs') ? 'active' : ''); ?>">
                <i class="bi bi-megaphone"></i> My Requirements
            </a>
            <a href="<?php echo e(route('buyer.inquiries.index')); ?>" class="nav-link <?php echo e(str_contains($currentRoute, 'buyer.inquiries') ? 'active' : ''); ?>">
                <i class="bi bi-chat-dots"></i> Inquiries
            </a>
            <a href="<?php echo e(route('buyer.quotes.index')); ?>" class="nav-link <?php echo e(str_contains($currentRoute, 'buyer.quotes') ? 'active' : ''); ?>">
                <i class="bi bi-inbox"></i> Quotes
            </a>
        </div>
        
        <div class="nav-section">
            <div class="nav-section-title">Tools</div>
            <a href="<?php echo e(route('buyer.favorites')); ?>" class="nav-link <?php echo e(str_contains($currentRoute, 'buyer.favorites') ? 'active' : ''); ?>">
                <i class="bi bi-heart"></i> Favorites
            </a>
            <a href="<?php echo e(route('buyer.saved-searches')); ?>" class="nav-link <?php echo e(str_contains($currentRoute, 'buyer.saved-searches') ? 'active' : ''); ?>">
                <i class="bi bi-search"></i> Saved Searches
            </a>
        </div>
        
        <div class="nav-section">
            <div class="nav-section-title">Account</div>
            <a href="<?php echo e(route('buyer.profile')); ?>" class="nav-link <?php echo e(str_contains($currentRoute, 'buyer.profile') ? 'active' : ''); ?>">
                <i class="bi bi-person-gear"></i> Profile Settings
            </a>
        </div>
        
        <div class="nav-section" style="margin-top: auto; padding-bottom: 1.5rem;">
            <a href="<?php echo e(route('logout')); ?>" class="nav-link text-danger" 
               onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
                <i class="bi bi-box-arrow-left"></i> Logout
            </a>
            <form id="logout-form" action="<?php echo e(route('logout')); ?>" method="POST" class="d-none"><?php echo csrf_field(); ?></form>
        </div>
    </nav>

    <!-- Main Content -->
    <div class="admin-main">
        <!-- Topbar -->
        <div class="admin-topbar">
            <div class="d-flex align-items-center gap-3">
                <button class="sidebar-toggle" id="sidebarToggle">
                    <i class="bi bi-list fs-5"></i>
                </button>
                <div class="d-none d-md-block text-muted small">
                    <a href="<?php echo e(route('buyer.dashboard')); ?>" class="text-decoration-none text-muted">Buyer</a> / <?php echo $__env->yieldContent('title', 'Dashboard'); ?>
                </div>
            </div>
            
            <div class="d-flex align-items-center gap-3">
                <a href="<?php echo e(route('home')); ?>" class="btn btn-sm btn-light rounded-pill border">
                    <i class="bi bi-globe me-1"></i> Visit Site
                </a>
                
                <!-- Notification Bell -->
                <?php echo $__env->make('partials.notification-bell', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                
                <div class="dropdown">
                    <button class="profile-dropdown" type="button" data-bs-toggle="dropdown">
                        <div class="profile-avatar">
                            <?php echo e(strtoupper(substr(Auth::user()->name, 0, 1))); ?>

                        </div>
                        <div class="d-none d-md-block text-start" style="line-height: 1.2;">
                            <strong class="d-block text-dark" style="font-size: 0.85rem;"><?php echo e(Auth::user()->name); ?></strong>
                            <small class="text-muted" style="font-size: 0.7rem;">Buyer Account</small>
                        </div>
                        <i class="bi bi-chevron-down text-muted ms-1" style="font-size: 0.7rem;"></i>
                    </button>
                    <ul class="dropdown-menu dropdown-menu-end shadow-lg border-0">
                        <li><a class="dropdown-item" href="<?php echo e(route('buyer.profile')); ?>"><i class="bi bi-person me-2"></i>Profile</a></li>
                        <li><hr class="dropdown-divider"></li>
                        <li>
                            <a class="dropdown-item text-danger" href="<?php echo e(route('logout')); ?>"
                               onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
                                <i class="bi bi-box-arrow-left me-2"></i>Logout
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        
        <!-- Content -->
        <div class="content-wrapper">
            <?php if(session('success')): ?>
                <div class="alert alert-success alert-dismissible fade show border-0 shadow-sm" role="alert">
                    <i class="bi bi-check-circle-fill me-2"></i><?php echo e(session('success')); ?>

                    <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
                </div>
            <?php endif; ?>
            <?php if(session('error')): ?>
                <div class="alert alert-danger alert-dismissible fade show border-0 shadow-sm" role="alert">
                    <i class="bi bi-x-circle-fill me-2"></i><?php echo e(session('error')); ?>

                    <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
                </div>
            <?php endif; ?>
            
            <?php echo $__env->yieldContent('buyer-content'); ?>
        </div>
    </div>

    <!-- Scripts -->
    <script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        document.getElementById('sidebarToggle')?.addEventListener('click', function() {
            document.getElementById('adminSidebar').classList.toggle('show');
            document.getElementById('sidebarOverlay').classList.toggle('show');
        });
        document.getElementById('sidebarOverlay')?.addEventListener('click', function() {
            document.getElementById('adminSidebar').classList.remove('show');
            this.classList.remove('show');
        });
    </script>
    
    <?php echo $__env->yieldPushContent('scripts'); ?>
</body>
</html>
<?php /**PATH /home/u281583269/domains/theminiport.com/public_html/resources/views/layouts/buyer.blade.php ENDPATH**/ ?>