/* ==================== 企業級側邊欄 ==================== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1998;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 380px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1999;
    overflow-y: auto;
}

.sidebar.active {
    right: 0;
}

.sidebar-header {
    padding: 28px 28px 0;
    border-bottom: 1px solid var(--gray-200);
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.sidebar-close {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    position: absolute;
    top: 24px;
    right: 24px;
    transition: all 0.2s;
}

.sidebar-close:hover {
    background: var(--gray-200);
    transform: rotate(90deg);
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-right: 50px;
}

.sidebar-user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-600), #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.sidebar-user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    object-fit: cover;
}

.sidebar-user-details h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.sidebar-user-details p {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 500;
}

.sidebar-menu {
    padding: 16px 0;
}

.sidebar-menu-item {
    padding: 16px 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: var(--gray-700);
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.sidebar-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--primary-600);
    border-radius: 0 4px 4px 0;
    transition: height 0.2s;
}

.sidebar-menu-item:hover {
    background: var(--primary-50);
    color: var(--primary-700);
}

.sidebar-menu-item:hover::before {
    height: 32px;
}


/* .sidebar-menu-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 12px 28px;
} */

.sidebar-menu-divider {
    margin: 0px 0;
    border-top: 10px solid #f8f8f8; /* 區塊間隔 */
}

.sidebar-menu-item.logout {
    color: #ef4444;
}