@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    /* Premium Color Palette */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.5);
    
    --secondary: #ec4899;
    --secondary-hover: #db2777;
    
    --accent: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.5);

    /* Backgrounds */
    --bg-dark: #f8fafc; /* Slate 50 */
    --bg-darker: #f1f5f9;
    
    /* Surfaces */
    --surface-0: rgba(255, 255, 255, 0.85);
    --surface-1: rgba(255, 255, 255, 0.95);
    --surface-2: #ffffff;
    
    /* UI Elements */
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(15, 23, 42, 0.08); /* Slate 900 small opacity */
    --input-bg: rgba(248, 250, 252, 0.8);
    
    /* Text */
    --text-main: #0f172a; /* Slate 900 */
    --text-muted: #475569; /* Slate 600 */
    --text-subtle: #94a3b8; /* Slate 400 */
    
    /* Effects */
    --glass-blur: blur(20px);
    --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-sm: 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 12px 30px -4px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255,255,255,1);
    --shadow-lg: 0 20px 50px -12px rgba(15, 23, 42, 0.12);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    /* Ultra-premium light ambient mesh background */
    background: 
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.05), transparent 25%),
        radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.08), transparent 25%),
        var(--bg-dark);
    background-attachment: fixed;
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--surface-2);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-subtle);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-weight: 600;
}
h1 { font-size: 2.25rem; letter-spacing: -0.04em; }
h2 { font-size: 1.75rem; letter-spacing: -0.03em; }
h3 { font-size: 1.5rem; }
p { color: var(--text-muted); }

/* Premium Mesh Gradients & Text */
.text-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mesh-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    position: relative;
    overflow: hidden;
}
.mesh-green::before {
    content: ''; position: absolute; top: -50%; left: -20%; width: 200px; height: 200px;
    background: rgba(255,255,255,0.2); border-radius: 50%; filter: blur(40px);
}
.mesh-indigo {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    position: relative;
    overflow: hidden;
}
.mesh-indigo::before {
    content: ''; position: absolute; top: 10%; right: -10%; width: 150px; height: 150px;
    background: rgba(255,255,255,0.15); border-radius: 50%; filter: blur(35px);
}

/* Premium Glassmorphism */
.glass {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.glass-card {
    background: var(--surface-0);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: var(--transition);
}

.glass-card:hover {
    background: var(--surface-1);
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: var(--shadow-lg);
}
.glass-card:hover::before { opacity: 1; }

/* ══ Designer Admin Utilities ══ */
.admin-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.admin-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.admin-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.admin-title-group h1 {
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.2rem;
}

.admin-title-group p {
    font-size: 0.95rem;
    font-weight: 500;
}

.user-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar-styled {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.search-container {
    position: relative;
    max-width: 400px;
    width: 100%;
}

.search-container i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-subtle);
    font-size: 1.2rem;
}

.search-container .form-control {
    padding-left: 3.5rem;
}

.pagination-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--card-border);
}

/* ══ Action Buttons ══ */
.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-view { background: rgba(99, 102, 241, 0.1); color: var(--primary); }
.btn-view:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }

.btn-edit { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.btn-edit:hover { background: #f59e0b; color: #fff; transform: translateY(-2px); }

.btn-delete { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.btn-delete:hover { background: #ef4444; color: #fff; transform: translateY(-2px); }

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,0.3);
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    backdrop-filter: blur(8px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

/* Form Controls */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1.2rem;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.form-control::placeholder {
    color: var(--text-subtle);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), inset 0 2px 4px rgba(0,0,0,0.2);
}

/* Dashboard Layout Structure */
/* Dashboard Layout Base (Unified) */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: var(--bg-main);
}


.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 10px;
}

.sidebar-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    padding: 0 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-weight: 500;
}

.sidebar-link i {
    font-size: 1.2rem;
    transition: var(--transition);
}

.sidebar-link:hover, .sidebar-link.active {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
}
.sidebar-link.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), transparent);
    border-left: 3px solid var(--primary);
}
.sidebar-link:hover i, .sidebar-link.active i {
    color: var(--primary);
}

/* Sidebar Toggle (Mobile) */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 1000;
    width: 45px;
    height: 45px;
    background: var(--surface-2);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    color: var(--primary);
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .sidebar-toggle {
        display: flex;
    }
}

/* Mobile Bottom Navigation - Hidden on Desktop */
.mobile-bottom-nav {
    display: none !important;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--card-border);
    z-index: 1000;
    padding: 0.5rem 1rem;
    padding-bottom: env(safe-area-inset-bottom, 1rem);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex !important;
        justify-content: space-around;
        align-items: center;
    }
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-subtle);
    gap: 0.25rem;
    padding: 0.5rem;
    flex: 1;
    transition: var(--transition);
    border-radius: var(--radius-md);
}

.mobile-bottom-nav .nav-item i {
    font-size: 1.75rem; /* Slightly larger for icon-only look */
    transition: var(--transition);
}

.mobile-bottom-nav .nav-item span {
    display: none; /* Removed text as per user request */
}

.mobile-bottom-nav .nav-item.active {
    color: var(--primary);
}

.mobile-bottom-nav .nav-item.active i {
    transform: translateY(-2px);
    text-shadow: 0 4px 10px var(--primary-glow);
}

.mobile-bottom-nav .nav-item:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

/* Main Content Base */
.main-content {
    flex: 1;
    min-width: 0;
    padding: 2rem;
    transition: var(--transition);
}

/* Top Navbar inside Dashboard */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--surface-0);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    position: relative;
    z-index: 1000;
}

/* Badges */
.badge {
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.badge-pending { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-approved { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-rejected { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    background: var(--surface-0);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 1rem 1.5rem;
    background: rgba(255,255,255,0.02);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--card-border);
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-main);
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255,255,255,0.02);
}

/* Notifications Dropdown */
.notif-wrapper { 
    position: relative; 
    cursor: pointer; 
    z-index: 1001; 
}
.notif-badge { 
    position: absolute; top: -5px; right: -5px; 
    background: #ef4444; color: white; 
    font-size: 0.65rem; padding: 2px 6px; border-radius: 99px;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes pulse-badge {
    0% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(236, 72, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0); }
}

.notif-dropdown {
    position: absolute; top: calc(100% + 1rem); right: -10px;
    width: 360px; background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px); border: 1px solid rgba(0,0,0,0.08);
    border-radius: 20px; display: none;
    z-index: 5000; box-shadow: 0 20px 40px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.02);
    overflow: hidden;
    transform-origin: top right;
    animation: dropdown-entry 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.notif-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255,255,255,0.4);
}

.notif-item {
    padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(0, 0, 0, 0.02); }
.notif-item.unread { background: rgba(99, 102, 241, 0.04); border-left: 3px solid var(--primary); }
.notif-item .message { font-size: 0.9rem; color: #475569; line-height: 1.5; padding-right: 1.5rem; }
.notif-item.unread .message { color: #1e293b; font-weight: 500; }
.notif-item .time { font-size: 0.7rem; color: #94a3b8; font-weight: 500; display: flex; align-items: center; gap: 0.3rem; }
.notif-item .delete-notif { 
    position: absolute; right: 1rem; top: 1.25rem; 
    color: #cbd5e1; cursor: pointer; font-size: 1rem; 
    transition: all 0.2s; 
}
.notif-item .delete-notif:hover { color: #ef4444; transform: scale(1.1); }

/* Grid Utilities */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

@media (max-width: 480px) {
    .main-content {
        padding: 1rem !important;
        padding-top: 4.5rem !important;
        padding-bottom: 6rem !important; /* Make room for bottom nav */
    }
    h1 { font-size: 1.75rem; }
    .glass-card { padding: 1.25rem; }
    
    .mobile-bottom-nav {
        padding-bottom: env(safe-area-inset-bottom, 0.5rem);
    }
    
    /* Product Grid - Ensure 2 columns on small mobile */
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    
    /* Products Grid Admin/Agent - 2 columns */
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    
    /* Seller Products Grid - 2 columns */
    div[style*="grid-template-columns: repeat(auto-fill"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Category Selector Premium Styles */
.category-selector-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.85rem 1.2rem;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-main);
    font-size: 0.95rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.category-selector-trigger:hover {
    border-color: var(--primary);
    background: var(--surface-2);
}

.category-selector-trigger i {
    color: var(--text-subtle);
    font-size: 1.2rem;
}

.category-selector-trigger.placeholder {
    color: var(--text-subtle);
}

/* Modal Overlay */
.category-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.category-modal-overlay.active {
    display: flex;
    animation: fadeInModal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.category-modal-container {
    background: var(--surface-2);
    width: 100%;
    max-width: 450px;
    max-height: 80vh;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(0);
    transition: var(--transition);
}

.category-modal-overlay.active .category-modal-container {
    animation: slideUpModal 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpModal {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.category-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-modal-header h3 {
    font-size: 1.25rem;
    margin: 0;
}

.category-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--input-bg);
    color: var(--text-main);
    transition: var(--transition);
}

.category-modal-close:hover {
    background: #fee2e2;
    color: #ef4444;
}

.category-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

/* ══ Sidebar Links ══ */
.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    border: 1px solid transparent;
}

.sidebar-link i {
    font-size: 1.25rem;
    transition: var(--transition);
}

.sidebar-link:hover {
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary);
    transform: translateX(5px);
}

.sidebar-link.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 8px 20px var(--primary-glow);
    border-color: rgba(255, 255, 255, 0.2);
}

.sidebar-link.active i {
    transform: scale(1.1);
}

/* ══ Mobile Bottom Navigation Styles ══ */
.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-subtle);
    transition: var(--transition);
    min-width: 60px;
}

.nav-item i {
    font-size: 1.5rem;
}

.nav-item span {
    display: none; /* Removed text as per user request */
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active i {
    transform: translateY(-5px);
    text-shadow: 0 4px 10px var(--primary-glow);
}

/* Sidebar Toggle Redesign */
.sidebar-toggle {
    display: none !important;
    position: fixed;
    top: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
    background: var(--surface-2);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-main);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    z-index: 1001;
    transition: var(--transition);
}

.sidebar-toggle:active {
    transform: scale(0.9);
}

/* Mobile Top Header - Hidden on Desktop */
.mobile-header {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    z-index: 999;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.mobile-header-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mobile-user-hub {
    position: relative;
}

.mobile-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid var(--surface-2);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
}

.mobile-user-avatar:active {
    transform: scale(0.9);
}

.mobile-logout-pop {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: white;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    display: none;
    z-index: 1000;
    flex-direction: column;
    gap: 2px;
    animation: dropdown-entry 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-logout-pop.active {
    display: flex;
}

.mobile-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    text-decoration: none;
    font-size: 1.25rem;
    border-radius: 10px;
    transition: var(--transition);
}

.mobile-logout-btn:active {
    background: #f1f5f9;
}

@media (max-width: 768px) {
    .mobile-header {
        display: flex !important;
    }
    .sidebar-toggle {
        top: 10px; /* Adjusting original toggle position */
        left: 10px;
        z-index: 1000;
        background: transparent;
        border: none;
        box-shadow: none;
    }
    
    /* Product Grid - 2 columns on tablet/mobile */
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    
    /* Seller Products Grid - 2 columns on tablet/mobile */
    div[style*="grid-template-columns: repeat(auto-fill"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
}

/* ══ Premium Dashboard & Mobile Design System ══ */

/* Mobile Sidebar Toggle (Floating Button) */
.mobile-toggle {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 20px;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.4);
    z-index: 1000;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.mobile-toggle:active {
    transform: scale(0.9);
}

/* Base Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 1.5rem 2rem;
    max-width: 1400px;
    transition: var(--transition);
}

/* Refined Sidebar */
.sidebar {
    width: 240px;
    background: var(--surface-1);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--card-border);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
    flex-shrink: 0; /* Prevents sidebar from collapsing */
}

.sidebar-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    padding-left: 0.5rem;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -320px;
        transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 20px 0 60px rgba(0,0,0,0.1);
    }
    .sidebar.active {
        left: 0;
    }
    .main-content {
        padding: 1.5rem;
    }
    .mobile-toggle {
        display: flex;
    }
}

/* Glass Cards & Stat Grid */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 15px 40px -10px rgba(99, 102, 241, 0.15);
}

/* Mobile-Specific Refinements */
@media (max-width: 600px) {
    .main-content {
        padding: 1rem;
        padding-bottom: 5rem;
    }

    .dash-hero {
        padding: 1.5rem !important;
        border-radius: 20px !important;
    }

    .dash-hero h1 {
        font-size: 1.25rem !important;
    }

    .stat-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Hide scrollbars during transitions */
    .sidebar {
        overflow-x: hidden;
    }
}

/* Section Headings */
.section-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.section-header h2 {
    font-size: 1.75rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 4px;
    background: var(--primary);
    border-radius: var(--radius-full);
}
/* ══ ADMIN SECTION MOBILE RESPONSIVE STYLES ══ */

/* Admin Dashboard & Management Pages */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--card-border);
    padding-bottom: 1.5rem;
    flex-wrap: wrap;
}

.admin-header h1 {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.admin-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.admin-filters {
    display: flex;
    gap: 1rem;
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.search-input {
    flex: 1;
    position: relative;
}

.search-input i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-input input {
    padding-left: 2.5rem;
}

.status-filter {
    width: 140px;
}

/* Admin Table Responsive */
.admin-table-wrapper {
    background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-1) 100%);
    border-radius: 16px;
    border: 1px solid var(--card-border);
    padding: 1.5rem;
    overflow-x: auto;
    overflow-y: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table thead tr {
    background: rgba(99, 102, 241, 0.05);
}

.admin-table th {
    padding: 1.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    border: none;
}

.admin-table tbody tr {
    border-bottom: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.admin-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.02);
}

.admin-table td {
    padding: 1.25rem;
    font-size: 0.9rem;
    border: none;
}

/* Admin Cards & Stats */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-1) 100%);
    border-radius: 16px;
    border: 1px solid var(--card-border);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.08);
    border-color: var(--primary);
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.6rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--text-main);
}

/* User Avatar */
.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-details h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
}

.user-details p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* Admin Agent/Seller Cards */
.agent-header, .seller-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-1) 100%);
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

.agent-info, .seller-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Responsive Tables Mobile */
@media (max-width: 1024px) {
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-filters {
        width: 100%;
        max-width: 100%;
        flex-direction: column;
    }

    .status-filter {
        width: 100%;
    }

    .admin-table-wrapper {
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .admin-header {
        gap: 1rem;
        margin-bottom: 2rem;
        padding-bottom: 1.2rem;
    }

    .admin-header h1 {
        font-size: 1.5rem;
    }

    .admin-header p {
        font-size: 0.8rem;
    }

    .admin-filters {
        flex-direction: column;
        gap: 0.8rem;
    }

    .admin-filters input,
    .admin-filters select {
        width: 100%;
    }

    .admin-table-wrapper {
        padding: 1rem;
        border-radius: 12px;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.8rem;
        font-size: 0.85rem;
    }

    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.2rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .user-details h4 {
        font-size: 0.85rem;
    }

    .user-details p {
        font-size: 0.75rem;
    }

    .agent-header, .seller-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }

    .agent-info, .seller-info {
        width: 100%;
    }

    .view-all-link {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .admin-header h1 {
        font-size: 1.25rem;
    }

    .admin-table-wrapper {
        padding: 0.75rem;
        overflow-x: auto;
    }

    .admin-table {
        font-size: 0.75rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.6rem 0.5rem;
    }

    .admin-stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem !important;
    }
}

/* Horizontal Scroll Indicator for Tables */
@supports (overflow-x: scroll) {
    .admin-table-wrapper {
        scrollbar-width: thin;
        scrollbar-color: var(--primary) transparent;
    }

    .admin-table-wrapper::-webkit-scrollbar {
        height: 6px;
    }

    .admin-table-wrapper::-webkit-scrollbar-track {
        background: transparent;
    }

    .admin-table-wrapper::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 3px;
    }
}

/* ══ Smart Proof Viewer System ══ */
.proof-thumbnail {
    position: relative;
    width: 100%;
    max-height: 420px; /* Fixed height for uniform cards */
    min-height: 200px;
    overflow: hidden;
    border-radius: 14px;
    cursor: zoom-in;
    border: 1px solid var(--card-border);
    background: #f8fafc;
    transition: var(--transition);
}

.proof-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    object-position: top;
}

.proof-thumbnail::after {
    content: 'CLICK TO EXPAND';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 3rem 1rem 1rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.8) 0%, transparent 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-align: center;
    opacity: 0;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.proof-thumbnail:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.2);
}

.proof-thumbnail:hover::after {
    opacity: 1;
}

/* Lightbox Modal */
.image-lightbox {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    cursor: zoom-out;
}

.image-lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 95%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 25px 70px -10px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.image-lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem; right: 1.5rem;
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid rgba(255,255,255,0.1);
}

.lightbox-close:hover {
    background: #ef4444;
    transform: rotate(90deg);
}

/* Space-Saving Mobile Overrides: Hide in-page titles since they are now in the top app bar */
@media (max-width: 768px) {
    .seller-header-flex, 
    .admin-header-flex,
    .profile-header > div:first-child {
        display: none !important;
    }
    
    /* Hide the in-page edit button on profile — it's now in the top header bar */
    .profile-header .action-btns {
        display: none !important;
    }

    .profile-header {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        border-bottom: none !important;
        justify-content: flex-end !important;
    }
}

/* ══════════════════════════════════════════
   MOBILE OPTIMIZATION: ADMIN ECOSYSTEM
══════════════════════════════════════════ */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem !important;
        padding-top: 85px !important;
    }

    /* Grid & Layout Adjustments */
    .stats-summary, .stats-grid, .analytics-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        margin-bottom: 1.5rem !important;
    }

    /* Card Scaling */
    .admin-card, .stat-card, .glass-card {
        padding: 1rem !important;
        border-radius: 18px !important;
        min-height: auto !important;
    }

    .summary-mini-card {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 1.25rem 0.75rem !important;
    }

    /* Icon Scaling */
    .mini-icon, .stat-icon-wrapper, .user-avatar-styled {
        width: 38px !important;
        height: 38px !important;
        font-size: 1.1rem !important;
        border-radius: 10px !important;
        margin-bottom: 0.5rem !important;
    }

    /* Typography Scaling */
    .stat-info .value, .summary-mini-card div div:first-child {
        font-size: 1.25rem !important;
        font-weight: 800 !important;
    }

    .stat-info .label, .summary-mini-card div div:last-child {
        font-size: 0.6rem !important;
        letter-spacing: 0.02em !important;
        line-height: 1.2 !important;
    }

    /* Header & Filters */
    .admin-header-flex {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    .admin-title-group h1 {
        font-size: 1.5rem !important;
    }

    .admin-title-group p {
        font-size: 0.8rem !important;
    }

    .search-container {
        width: 100% !important;
        margin: 0 !important;
    }

    .filter-row, .view-filters {
        width: 100% !important;
        overflow-x: auto !important;
        padding-bottom: 5px !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
    }

    /* Table Responsiveness */
    .table-container {
        border-radius: 12px !important;
    }

    /* Button Scaling */
    .btn {
        padding: 0.6rem 1rem !important;
        font-size: 0.75rem !important;
    }
}