.sidebar {
    width: 250px;
    background: #ffffff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    position: relative;
    z-index: 1000;
}

.sidebar.collapsed {
    width: 48px;
}

/* ============================================
   SIDEBAR HEADER
   ============================================ */
.sidebar-header {
    padding: 12px 16px;
    background: #f3f2f1;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
}

.sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: #323130;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-title {
    display: none;
}

.toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #605e5c;
    font-size: 16px;
    transition: all 0.2s;
}

.toggle-btn:hover {
    background: #edebe9;
    border-radius: 2px;
}

/* ============================================
   SIDEBAR NAVIGATION
   ============================================ */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

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

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

/* ============================================
   MENU SECTIONS
   ============================================ */
.menu-section {
    border-bottom: 1px solid #edebe9;
}

.menu-section:last-child {
    border-bottom: none;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: #faf9f8;
    cursor: pointer;
    border: none;
    width: 100%;
    text-align: left;
    transition: background 0.2s;
    min-height: 36px;
}

.section-header:hover {
    background: #f3f2f1;
}

.section-header.active {
    background: #edebe9;
}

.section-icon {
    width: 16px;
    height: 16px;
    margin-right: 12px;
    color: #605e5c;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-title {
    flex: 1;
    font-size: 12px;
    font-weight: 600;
    color: #323130;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .section-title {
    display: none;
}

.section-arrow {
    width: 16px;
    height: 16px;
    color: #605e5c;
    font-size: 12px;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.sidebar.collapsed .section-arrow {
    display: none;
}

.section-header.expanded .section-arrow {
    transform: rotate(180deg);
}

/* ============================================
   MENU ITEMS
   ============================================ */
.menu-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #ffffff;
}

.menu-items.show {
    max-height: 1000px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 8px 16px 8px 44px;
    text-decoration: none;
    color: #323130;
    font-size: 14px;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
    border: none;
    width: 100%;
    text-align: left;
    background: transparent;
}

.menu-item-standalone {
    padding-left: 16px;
}

.sidebar.collapsed .menu-item {
    padding-left: 16px;
    /*justify-content: center;*/
}

.menu-item:hover {
    background: #f3f2f1;
}

.menu-item.active {
    background: #edebe9;
    border-left: 3px solid #0078d4;
    font-weight: 600;
    color: #0078d4;
}

.menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #0078d4;
}

.menu-item-icon {
    width: 16px;
    height: 16px;
    margin-right: 12px;
    color: #605e5c;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu-item.active .menu-item-icon {
    color: #0078d4;
}

.menu-item-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .menu-item-text {
    display: none;
}

.menu-item-arrow {
    width: 16px;
    height: 16px;
    color: #605e5c;
    font-size: 10px;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.sidebar.collapsed .menu-item-arrow {
    display: none;
}

.menu-item.has-submenu.expanded .menu-item-arrow {
    transform: rotate(180deg);
}

/* ============================================
   SUBMENU
   ============================================ */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #faf9f8;
}

.submenu.show {
    max-height: 500px;
}

.submenu-item {
    display: flex;
    align-items: center;
    padding: 6px 16px 6px 60px;
    text-decoration: none;
    color: #323130;
    font-size: 13px;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    width: 100%;
    text-align: left;
    background: transparent;
    position: relative;
}

.sidebar.collapsed .submenu-item {
    padding-left: 16px;
}

.submenu-item:hover {
    background: #edebe9;
}

.submenu-item.active {
    background: #e1dfdd;
    font-weight: 600;
    color: #0078d4;
    border-left: 3px solid #0078d4;
}

.submenu-item-icon {
    width: 12px;
    height: 12px;
    margin-right: 8px;
    color: #605e5c;
    font-size: 10px;
    flex-shrink: 0;
}

.submenu-item.active .submenu-item-icon {
    color: #0078d4;
}

.submenu-item-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .submenu-item-text {
    display: none;
}

/* ============================================
   BADGES
   ============================================ */
.menu-badge {
    background: #0078d4;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-left: auto;
    flex-shrink: 0;
}

.sidebar.collapsed .menu-badge {
    display: none;
}

/* ============================================
   TOOLTIPS (COLLAPSED STATE)
   ============================================ */
.sidebar.collapsed .menu-item:hover::after,
.sidebar.collapsed .submenu-item:hover::after {
    content: attr(data-title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #323130;
    color: white;
    padding: 6px 12px;
    border-radius: 2px;
    white-space: nowrap;
    font-size: 12px;
    margin-left: 8px;
    z-index: 1000;
    pointer-events: none;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    background: #faf9f8;
    padding: 24px;
    overflow-y: auto;
}

.content-header {
    margin-bottom: 24px;
}

.content-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #323130;
    margin-bottom: 8px;
}

.content-header p {
    color: #605e5c;
    font-size: 14px;
}

/* ============================================
   MOBILE MENU BUTTON
   ============================================ */
.mobile-menu-btn {
    display: none;
    position: fixed;
    left: 16px;
    top: 70px;
    background: #0078d4;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #ffffff;
    font-size: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: #106ebe;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

.mobile-menu-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ============================================
   MOBILE OVERLAY
   ============================================ */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.show {
    display: block;
}

/* ============================================
   RESPONSIVE (MOBILE)
   ============================================ */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    /* Hide desktop toggle button on mobile */
    .toggle-btn {
        display: none;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 60px;
        height: calc(100vh - 60px);
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar.collapsed {
        width: 250px;
    }

    .main-content {
        margin-left: 0;
        padding-top: 60px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        top: 55px;
    }
}

@media (max-width: 360px) {
    .sidebar {
        top: 50px;
    }
}

/* ============================================
   RESPONSIVE (DESKTOP)
   ============================================ */
@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none !important;
    }
}
