/* Sidebar Component Styles */

/* Sidebar Container */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background-color: transparent; /* 去掉背景色 */
    color: #333; /* 修改文字颜色为深色 */
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px;
    border-bottom: none; /* 去掉横线 */
    background-color: transparent; /* 去掉背景色 */
}

.sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333; /* 修改文字颜色为深色 */
}

/* Sidebar Content */
.sidebar-content {
    padding: 0;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Task List */
.task-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

.task-item {
    padding: 15px 20px;
    border-bottom: none; /* 去掉横线 */
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333; /* 修改文字颜色为深色 */
}

.task-item:hover {
    background-color: #e0e0e0; /* 修改悬停背景色 */
}

.task-item.active {
    background-color: transparent; /* 移除背景色 */
}

.task-item.active:hover {
    background-color: #e0e0e0; /* 与普通悬停背景色一致 */
}

.task-item.active .task-item-text {
    font-weight: 700; /* 活动项文字加粗 */
}

.task-item-icon {
    font-size: 14px;
    color: #666; /* 修改图标颜色 */
}

.task-item-text {
    font-size: 14px;
    font-weight: 500;
    color: #333; /* 修改文字颜色 */
}

/* Create Task Button */
.create-task-btn-container {
    padding: 15px 20px;
    border-top: none; /* 去掉横线 */
}

.create-task-btn {
    width: 100%;
    padding: 10px;
    background-color: #37c856; /* 修改按钮背景色为绿色 */
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.create-task-btn:hover {
    background-color: #2ba347; /* 修改悬停背景色为深绿色 */
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* User Info Section */
.user-info {
    padding: 20px;
    background-color: transparent; /* 去掉背景色 */
    border-top: none; /* 去掉横线 */
    min-height: 80px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.user-info-content {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.user-info .sidebar-logo {
    margin-right: 10px;
    flex-shrink: 0;
}

.logo-image {
    width: 50px;
    height: auto;
    object-fit: contain;
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #37c856; /* 修改为绿色 */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: #333; /* 修改文字颜色 */
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 12px;
    color: #666; /* 修改文字颜色 */
    margin: 2px 0 0 0;
}

/* Main Content Adjustment */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* Login Prompt Styles (for user authentication) */
.login-prompt {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 10px 20px;
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    bottom: 0;
    background-color: #f8f9fa;
}

.login-prompt-content {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e8ed;
    max-width: 400px;
    width: 100%;
}

.login-icon {
    width: 60px;
    height: 60px;
    background: #666; /* 修改为灰色 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 24px;
}

.login-prompt h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
}

.login-prompt p {
    margin: 0 0 30px 0;
    color: #7f8c8d;
    font-size: 16px;
    line-height: 1.5;
}

.login-btn {
    background: #666; /* 修改为灰色 */
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.login-btn:hover {
    background: #555; /* 修改悬停背景色 */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}