/* Mini sidebar – icon + label below */
.sidebar.collapsed {
    width: 110px !important;
}

.sidebar.collapsed .sidebar-full,
.sidebar.collapsed .sidebar-mini+.sidebar-full {
    display: none !important;
}

.sidebar.collapsed .sidebar-mini {
    display: block !important;
}

/* Nav items in collapsed mode */
.sidebar.collapsed .nav-item {
    flex-direction: column !important;
    justify-content: center;
    padding: 12px 4px !important;
    gap: 6px;
}

.sidebar.collapsed .nav-item i {
    font-size: 22px;
    width: auto !important;
}

.sidebar.collapsed .sidebar-text {
    display: block !important;
    font-size: 10px;
    line-height: 1;
    text-align: center;
    margin-top: 4px;
    font-weight: 500;
}

/* Active pill */
.nav-item.active {
    background: #fff1f2 !important;
    color: #e11d48 !important;
}

.nav-item.active i,
.nav-item.active .sidebar-text {
    color: #e11d48 !important;
}

.nav-item.active .sidebar-text {
    font-weight: 600 !important;
}

/* Mobile – force collapsed */
/* Sidebar handled by main media query at bottom */

#header {
    position: fixed;
    top: 0;
    left: 260px;
    /* Aligned with sidebar width */
    right: 0;
    height: 64px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    z-index: 40;
    transition: all 0.3s ease;
}

#sidebarArea.collapsed~#mainArea #header,
#mainArea.collapsed #header {
    left: 110px;
}

/* Core Layout */
#sidebarArea {
    width: 260px;
    transition: width 0.3s ease;
}

#sidebarArea.collapsed {
    width: 110px;
}

#mainArea {
    margin-left: 260px;
    transition: margin-left 0.3s ease;
}

#mainArea.collapsed {
    margin-left: 110px;
}

/* Mobile & Tablet: Hide Sidebar & Use Dock */
@media (max-width: 1024px) {
    #sidebarArea {
        display: none !important;
    }

    #mainArea,
    #mainArea.collapsed {
        margin-left: 0 !important;
    }

    #header {
        left: 0 !important;
        width: 100% !important;
    }

    #sidebarToggle,
    #collapseSidebar {
        display: none !important;
    }

    main {
        padding-bottom: 110px !important;
        /* Space for dock */
    }
}

/* Apple Mac Dock Styles */
.mobile-dock {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    padding: 10px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 8px;
    width: auto;
    max-width: 90%;
}

.dock-item {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    color: #4b5563;
    text-decoration: none;
    font-size: 20px;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.dock-item.active {
    background: #f43f5e;
    color: white;
    box-shadow: 0 5px 15px rgba(244, 63, 94, 0.3);
}

.dock-item:active {
    transform: scale(0.85);
}

/* Mini Mode: Icon + Text Below */
#sidebarArea.collapsed .nav-item {
    flex-direction: column !important;
    padding: 14px 4px !important;
    text-align: center;
}

#sidebarArea.collapsed .nav-item i {
    font-size: 22px;
    margin-bottom: 6px;
}

#sidebarArea.collapsed .sidebar-text {
    display: block !important;
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
}

/* Hide full content in mini */
#sidebarArea.collapsed .sidebar-full {
    display: none !important;
}

#sidebarArea.collapsed .sidebar-mini {
    display: block !important;
}

/* Active Pill */
.nav-item.active {
    background: #fff1f2 !important;
    color: #e11d48 !important;
}

.nav-item.active i,
.nav-item.active .sidebar-text {
    color: #e11d48 !important;
}

main {
    padding-top: 86px !important;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 10px;
}