/* 公司内部项目管理系统样式表 */

/* 全局样式 */
body {
    display: flex;
    min-height: 100vh;
    flex-direction: row;
}

.container {
    flex: 1;
    margin-left: 250px; /* 为左侧菜单留出空间 */
    width: calc(100% - 250px);
    transition: margin-left 0.3s;
    padding-top: 20px;
}

/* 左侧菜单 */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    flex-direction: column;
    background-color: #0275d8; /* 更改为蓝色主题，与截图一致 */
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow-y: auto;
    padding: 0;
}

.navbar-brand {
    font-weight: bold;
    padding: 1.2rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    width: 100%;
    text-align: left;
    color: white;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.navbar-collapse {
    width: 100%;
}



.navbar-nav .nav-item {
    width: 100%;
    margin: 2px 0;
}

.navbar-nav .nav-link {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
}

.navbar-nav .nav-item.active .nav-link {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 500;
}

/* 左侧导航栏中的下拉菜单 */
.navbar.sidebar .dropdown-menu {
    position: absolute;
    left: 100%;
    top: 0;
    margin-top: 0;
    border-radius: 0 4px 4px 0;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    border: none;
    padding: 0.5rem 0;
}

.navbar.sidebar .nav-item.dropdown {
    position: relative;
}

/* 用户菜单特殊处理 */
.navbar.sidebar .navbar-nav.mt-auto .dropdown-menu {
    top: auto;
    bottom: 0;
}

/* 导航图标样式 */
.navbar.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* 导航项的徽章样式 */
.navbar.sidebar .nav-link .badge {
    margin-left: auto;
    background-color: #dc3545;
    color: white;
    font-weight: 400;
    padding: 0.25rem 0.5rem;
}

/* 用户头像 - 已移除显示 */
.avatar-small {
    display: none;
}

.avatar-medium {
    width: 64px;
    height: 64px;
    object-fit: cover;
}

.avatar-large {
    width: 128px;
    height: 128px;
    object-fit: cover;
}

/* 卡片样式 */
.card {
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card-header {
    font-weight: bold;
    background-color: #f8f9fa;
}

/* 仪表盘样式 */
.dashboard-stats {
    text-align: center;
    padding: 20px;
}

.dashboard-stats i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #007bff;
}

.dashboard-stats .stats-number {
    font-size: 1.5rem;
    font-weight: bold;
}

/* 项目和任务列表 */
.project-item, .task-item {
    border-left: 4px solid #ddd;
    transition: all 0.2s ease;
}

.project-item:hover, .task-item:hover {
    border-left-color: #007bff;
    background-color: #f8f9fa;
}

.project-item.priority-high, .task-item.priority-high {
    border-left-color: #dc3545;
}

.project-item.priority-medium, .task-item.priority-medium {
    border-left-color: #ffc107;
}

.project-item.priority-low, .task-item.priority-low {
    border-left-color: #28a745;
}

/* 进度条样式 */
.progress {
    height: 10px;
    margin-top: 5px;
    margin-bottom: 10px;
}

/* 状态标签 */
.badge {
    font-size: 85%;
}

/* 文档库样式 */
.document-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.document-item:last-child {
    border-bottom: none;
}

.document-icon {
    font-size: 2rem;
    margin-right: 10px;
}

/* 消息样式 */
.message-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.message-item.unread {
    background-color: #f0f7ff;
}

.message-sender {
    font-weight: bold;
}

.message-time {
    color: #6c757d;
    font-size: 0.85rem;
}

/* 通知样式 */
.notification-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item.unread {
    background-color: #f0f7ff;
}

.notification-time {
    color: #6c757d;
    font-size: 0.85rem;
}

/* 表单样式 */
.form-group label {
    font-weight: 500;
}

.required-field::after {
    content: '*';
    color: #dc3545;
    margin-left: 4px;
}

/* 看板样式 */
.kanban-board {
    display: flex;
    overflow-x: auto;
    padding-bottom: 10px;
}

.kanban-column {
    min-width: 250px;
    max-width: 250px;
    margin-right: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 10px;
}

.kanban-column-header {
    font-weight: bold;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
}

.kanban-item {
    background-color: white;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

/* 甘特图样式 */
.gantt-chart {
    margin-top: 20px;
    overflow-x: auto;
}

.gantt-row {
    display: flex;
    height: 40px;
    margin-bottom: 5px;
    align-items: center;
}

.gantt-row-header {
    width: 200px;
    padding-right: 15px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gantt-row-bars {
    flex-grow: 1;
    position: relative;
    height: 100%;
    background-color: #f8f9fa;
}

.gantt-bar {
    position: absolute;
    height: 70%;
    top: 15%;
    background-color: #007bff;
    border-radius: 4px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .navbar.sidebar {
        width: 200px;
    }
    
    .container {
        margin-left: 200px;
        width: calc(100% - 200px);
    }
    
    .kanban-column {
        min-width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .kanban-board {
        flex-direction: column;
    }
    
    .dashboard-stats {
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .navbar.sidebar {
        width: 60px;
    }
    
    .container {
        margin-left: 60px;
        width: calc(100% - 60px);
    }
    
    .navbar-brand {
        font-size: 0.8rem;
        padding: 0.5rem;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    
    .navbar.sidebar .nav-link span {
        display: none;
    }
    
    .navbar.sidebar .nav-link i {
        font-size: 1.2rem;
        margin-right: 0;
        width: 100%;
        text-align: center;
    }
    
    .navbar.sidebar .nav-link {
        padding: 0.75rem 0.5rem;
        justify-content: center;
    }
    
    .navbar.sidebar .nav-link .badge {
        position: absolute;
        top: 5px;
        right: 5px;
        padding: 0.15rem 0.35rem;
        font-size: 0.7rem;
    }
}

/* 打印样式 */
@media print {
    .navbar, .footer, .no-print {
        display: none !important;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
    
    body {
        font-size: 12pt;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}