/* ==========================================================================
   SIDEBAR & NAVBAR - CLEAN APPLE STYLE
   Complete Rewrite for Desktop & Mobile
   ========================================================================== */

/* ==========================================================================
   SIDEBAR - DESKTOP & MOBILE
   ========================================================================== */

/* Base Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: #ffffff;
    border-right: 1px solid #E5E7EB;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Header (Logo) */
.sidebar-header {
    height: 64px;
    padding: 0 1.5rem;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    background: #ffffff;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #111827;
    font-weight: 600;
    font-size: 1.125rem;
}

.logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.logo-text {
    color: #10B981;
    font-weight: 700;
}

/* Sidebar Menu */
.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

/* Menu Section */
.menu-section {
    margin-bottom: 1.5rem;
}

.menu-section-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9CA3AF;
    padding: 0 1.5rem;
    margin-bottom: 0.5rem;
}

/* Menu Item */
.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #4B5563;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.menu-item .material-icons {
    font-size: 1.25rem;
    color: #6B7280;
}

.menu-item:hover {
    background: #F3F4F6;
    color: #374151;
}

.menu-item:hover .material-icons {
    color: #10B981;
}

/* Active Menu Item */
.menu-item.active {
    background: #ECFDF5;
    color: #10B981;
    font-weight: 600;
    border-left-color: #10B981;
}

.menu-item.active .material-icons {
    color: #10B981;
}

/* Sidebar Overlay (Mobile) */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.sidebar-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================================================
   MOBILE NAVBAR
   ========================================================================== */

.mobile-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid #E5E7EB;
    z-index: 900;
    display: none;
    /* Hidden on desktop */
}

.navbar-container {
    height: 100%;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Menu Toggle Button */
.menu-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.menu-toggle:hover {
    background: #F3F4F6;
}

.menu-toggle .material-icons {
    font-size: 1.5rem;
    color: #374151;
}

/* Navbar Logo */
.navbar-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.navbar-logo-img {
    height: 32px;
    width: auto;
}

/* Navbar User */
.navbar-user {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #10B981;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-text {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.875rem;
}

/* ==========================================================================
   RESPONSIVE - MOBILE & TABLET
   ========================================================================== */

@media (max-width: 1023.98px) {

    /* Show mobile navbar */
    .mobile-navbar {
        display: block;
    }

    /* Hide sidebar by default */
    .sidebar {
        transform: translateX(-100%);
        z-index: 1050;
    }

    /* Show sidebar when active */
    .sidebar.show {
        transform: translateX(0);
    }

    /* Add top padding to main content for navbar */
    .main-content {
        padding-top: 64px;
    }
}

/* ==========================================================================
   DESKTOP
   ========================================================================== */

@media (min-width: 1024px) {

    /* Sidebar always visible */
    .sidebar {
        transform: translateX(0);
    }

    /* Hide mobile navbar */
    .mobile-navbar {
        display: none;
    }

    /* Main content offset for sidebar */
    .main-content {
        margin-left: 260px;
    }
}