/* ==================== SIDEBAR STYLING ==================== */
:root {
    --sidebar-width: 250px;
    --sidebar-bg: #f8fafc;
    --sidebar-border: #e2e8f0;
    --sidebar-text: #334155;
    --sidebar-hover: #e2e8f0;
    --sidebar-active: #3b82f6;
    --sidebar-icon-size: 1.25rem;
}

/* Sidebar Container */
.sidebar {
    position: fixed;
    left: 0;
    top: 150px; /* Fixed position from top */
    height: calc(100vh - 135px); /* Adjust height according to top position */
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease-in-out, width 0.3s ease;
    bottom: 10px;
}

/* Sidebar Header */
.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-header .mainu {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.close-sidebar {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #64748b;
    cursor: pointer;
    display: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-sidebar:hover {
    background: #e2e8f0;
    color: #334155;
}

/* Menu Sections */
.menu-section {
    padding: 0.75rem 1rem 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    font-weight: 600;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f1f5f9;
    margin-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

/* Menu Items */
.menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu li {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 0.9375rem;
    font-weight: 400;
}

.menu li:hover {
    background: var(--sidebar-hover);
    border-left-color: var(--sidebar-active);
}

.menu li.active {
    background: var(--sidebar-hover);
    border-left-color: var(--sidebar-active);
    color: var(--sidebar-active);
    font-weight: 500;
}

.menu a {
    color: inherit;
    text-decoration: none;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.menu i {
    width: 1.25rem;
    font-size: 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icon Colors with better contrast */
.profile-icon { color: #3b82f6; } /* Blue */
.category-icon { color: #8b5cf6; } /* Purple */
.purchase-icon { color: #10b981; } /* Green */
.feedback-icon { color: #f59e0b; } /* Amber */
.refund-icon { color: #ef4444; } /* Red */
.privacy-icon { color: #6b7280; } /* Gray */
.terms-icon { color: #9ca3af; } /* Light Gray */
.rate-icon { color: #f97316; } /* Orange */
.logout-icon { color: #dc2626; } /* Dark Red */

/* Job related icons */
.briefcase-icon { color: #6366f1; } /* Indigo */
.female-icon { color: #ec4899; } /* Pink */
.landmark-icon { color: #14b8a6; } /* Teal */
.laptop-icon { color: #8b5cf6; } /* Purple */
.comments-icon { color: #3b82f6; } /* Blue */
.question-icon { color: #f59e0b; } /* Amber */

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: 140px; /* Adjusted to match sidebar top */
    left: 1rem;
    width: 40px;
    height: 40px;
    background: var(#f8fafc00);
    color: #2d3748;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.sidebar-toggle:hover {
    background: #f8fafc00;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Responsive Design */

/* Tablet */
@media (max-width: 992px) {
    .sidebar {
        width: 240px;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }

    .sidebar-toggle {
        display: flex;
        top: 140px;
    }

    .close-sidebar {
        display: flex;
    }

    .menu li {
        padding: 0.6875rem 0.875rem;
        font-size: 0.875rem;
    }

    .menu i {
        font-size: 0.9375rem;
    }

    .menu-section {
        padding: 0.625rem 0.875rem 0.375rem;
        font-size: 0.6875rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .sidebar {
        top: 120px; /* Adjust for smaller header */
        height: calc(100vh - 120px);
        width: 260px;
    }

    .sidebar-toggle {
        top: 125px;
    }

    .sidebar-header {
        padding: 1rem 0.875rem;
    }

    .sidebar-header .mainu {
        font-size: 1rem;
    }

    .menu li {
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
    }

    .menu i {
        font-size: 0.875rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .sidebar {
        top: 110px;
        height: calc(100vh - 110px);
        width: 280px;
    }

    .sidebar-toggle {
        top: 115px;
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .sidebar-header {
        padding: 0.875rem 0.75rem;
    }

    .menu li {
        padding: 0.5625rem 0.625rem;
        font-size: 0.75rem;
    }

    .menu i {
        font-size: 0.8125rem;
    }

    .menu-section {
        padding: 0.5625rem 0.625rem 0.3125rem;
        font-size: 0.625rem;
    }
}

/* Desktop Large */
@media (min-width: 1200px) {
    .sidebar {
        width: 260px;
    }

    .menu li {
        padding: 0.8125rem 1.125rem;
        font-size: 0.96875rem;
    }

    .menu i {
        font-size: 1.0625rem;
    }

    .menu-section {
        padding: 0.8125rem 1.125rem 0.5625rem;
        font-size: 0.8125rem;
    }
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}