/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: #4a5568;
    font-size: 2rem;
    font-weight: 600;
}

.header h1 i {
    color: #667eea;
    margin-right: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-details {
    display: flex;
    align-items: center;
    gap: 5px;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 用户管理按钮样式 */
.user-mgmt-btn {
    margin-left: auto;
    white-space: nowrap;
}

.logout-btn {
    padding: 8px 16px;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #c53030;
    transform: translateY(-1px);
}

.user-name {
    color: #666;
    font-size: 0.9rem;
}

/* 主要内容区域 */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* 任务操作栏 */
.task-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

/* 操作按钮区域 */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* 搜索控件样式 */
.search-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
}

.search-controls input {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #4a5568;
    font-size: 0.9rem;
    width: 200px;
    transition: all 0.3s ease;
}

.search-controls input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-controls input::placeholder {
    color: #a0aec0;
}

/* 确保新建任务按钮始终可见 */
#addTaskBtn {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.filter-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-controls select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #4a5568;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-controls select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-1px);
}

.btn-warning {
    background: #ed8936;
    color: white;
}

.btn-warning:hover {
    background: #dd6b20;
    transform: translateY(-1px);
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
    transform: translateY(-1px);
}

/* 任务列表 */
.task-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px;
}

.task-card {
    background: white;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #e2e8f0;
    cursor: pointer;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.task-card.priority-urgent {
    border-left-color: #e53e3e;
}

.task-card.priority-high {
    border-left-color: #ed8936;
}

.task-card.priority-medium {
    border-left-color: #3182ce;
}

.task-card.priority-low {
    border-left-color: #38a169;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.task-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 3px;
    line-height: 1.3;
}

.task-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 80px;
    text-align: center;
}

.status-pending {
    background: #fed7d7;
    color: #c53030;
}

.status-in_progress {
    background: #bee3f8;
    color: #2b6cb0;
}

.status-review {
    background: #faf089;
    color: #975a16;
}

.status-completed {
    background: #c6f6d5;
    color: #276749;
}

.status-cancelled {
    background: #e2e8f0;
    color: #4a5568;
}

.task-description {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 8px;
}

.task-assignee {
    display: flex;
    align-items: center;
    gap: 5px;
}

.task-dates {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.8rem;
    font-weight: 500;
    color: #4a5568;
    min-width: 35px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-content.large {
    max-width: 900px;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #2d3748;
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f7fafc;
    color: #2d3748;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
    font-size: 0.9rem;
}

/* 必填项样式 */
.required {
    color: #e53e3e;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* 任务详情样式 */
.task-detail-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.task-info-section h4,
.status-update-section h4,
.file-upload-section h4,
.timeline-section h4 {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.task-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-item label {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.9rem;
}

.info-item span,
.info-item p {
    color: #2d3748;
    font-size: 0.95rem;
}

/* 状态更新表单 */
.status-update-form {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

/* 文件上传区域 */
.upload-area {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    border: 2px dashed #cbd5e0;
    border-radius: 10px;
    background: #f7fafc;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon {
    color: #667eea;
    font-size: 1.2rem;
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.file-name {
    font-weight: 500;
    color: #2d3748;
}

.file-meta {
    font-size: 0.8rem;
    color: #666;
}

/* 时间线样式 */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -37px;
    top: 20px;
    width: 12px;
    height: 12px;
    background: #667eea;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #e2e8f0;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.timeline-status {
    font-weight: 600;
    color: #2d3748;
}

.timeline-user {
    font-size: 0.9rem;
    color: #666;
}

.timeline-time {
    font-size: 0.8rem;
    color: #999;
}

.timeline-comment {
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: 8px;
}

.timeline-progress {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 500;
}

/* 用户列表 */
.user-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.user-item {
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.user-item:hover {
    border-color: #667eea;
    background: #f7fafc;
    transform: translateY(-2px);
}

.user-item.active {
    border-color: #667eea;
    background: #edf2f7;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 auto 10px;
}

.user-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.user-role {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 加载和消息提示 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: #48bb78;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideInRight 0.3s ease;
}

.message.error {
    background: #e53e3e;
}

.message button {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.hidden {
    display: none !important;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    /* Header 优化 */
    .header {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .header h1 {
        font-size: 1.25rem;
        white-space: nowrap;
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 5px;
    }

    .header h1 i {
        font-size: 1.1rem;
        margin-right: 6px;
    }

    .user-info {
        width: 100%;
        justify-content: center;
        gap: 10px;
        flex-direction: column;
    }

    .user-details {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 100%;
        flex-wrap: nowrap;
    }

    .user-actions {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    .user-name, .user-role {
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .user-mgmt-btn {
        margin-left: 0;
    }
    
    .logout-btn, .user-mgmt-btn {
        padding: 5px 12px;
        font-size: 0.8rem;
    }
    
    /* 操作栏优化 */
    .task-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .action-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    #addTaskBtn, #exportSummaryBtn {
        width: 100%;
        justify-content: center;
    }

    .search-controls {
        grid-column: 1 / -1;
        margin-left: 0;
        width: 100%;
        display: flex;
    }

    .search-controls input {
        flex: 1;
        width: auto;
    }
    
    .filter-controls {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        justify-content: stretch;
    }
    
    .filter-controls select {
        width: 100%;
    }
    
    /* 其他响应式样式 */
    .task-list {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .task-info-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .timeline {
        padding-left: 20px;
    }
    
    .timeline::before {
        left: 10px;
    }
    
    .timeline-item::before {
        left: -32px;
    }
    
    /* 模态框底部按钮优化 */
    .modal-footer {
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
        padding: 15px;
    }
    
    .modal-footer .btn {
        flex: 1;
        justify-content: center;
        padding: 12px;
    }
}

/* 必填项样式 */
.required {
    color: #e53e3e;
    font-weight: bold;
    margin-left: 2px;
}

.form-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 4px;
    display: block;
}

/* 标签输入样式 */
.tags-input-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    min-height: 40px;
    background: white;
}

.tags-input-container input {
    border: none;
    outline: none;
    width: 100%;
    padding: 0;
    margin: 0;
    background: transparent;
}

.tags-display {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.tag-item:hover {
    background: #0056b3;
}

.tag-item .tag-remove {
    margin-left: 5px;
    cursor: pointer;
    font-weight: bold;
}

/* 任务类型选择样式 */
.task-type-container {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    transition: all 0.2s;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #007bff;
    background: #007bff;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

/* 周期设置选项样式 */
.recurring-options {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 16px;
    margin-top: 12px;
}

/* 周期性任务标识 */
.recurring-badge {
    display: inline-block;
    background-color: #17a2b8;
    color: white;
    font-size: 0.75em;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
    vertical-align: middle;
}

.recurring-badge i {
    margin-right: 3px;
}

.recurring-options .form-row {
    margin-bottom: 12px;
}

.recurring-options .form-row:last-child {
    margin-bottom: 0;
}

.task-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

.task-tag {
    background: #e9ecef;
    color: #495057;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.75rem;
    border: 1px solid #dee2e6;
}

input[type="file"]:invalid {
    border-color: #e53e3e;
}

input[type="file"]:invalid + .form-text {
    color: #e53e3e;
}

/* 时间线附件样式 */
.timeline-attachments {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007bff;
}

.attachments-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.attachment-item {
    margin-bottom: 8px;
}

.image-attachment {
    display: inline-block;
    margin-right: 10px;
    text-align: center;
}

.image-attachment img {
    display: block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.image-attachment img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.attachment-name {
    font-size: 0.8em;
    color: #6c757d;
    margin-top: 4px;
    word-break: break-all;
}

.file-attachment {
    display: inline-block;
    margin-right: 15px;
}

.file-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    color: #495057;
    transition: all 0.2s ease;
}

.file-link:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    text-decoration: none;
    color: #495057;
}

/* 用户信息样式 */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-weight: 600;
    color: #2d3748;
}

.user-role {
    font-size: 0.9em;
    color: #718096;
}

.logout-btn {
    padding: 6px 12px;
    background-color: #e53e3e;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
}

.logout-btn:hover {
    background-color: #c53030;
}

/* 任务操作按钮样式 */
.task-card .task-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.task-card:hover .task-actions {
    opacity: 1;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    background-color: #f8f9fa;
    color: #6c757d;
}

.btn-icon:hover {
    background-color: #e9ecef;
    color: #495057;
}

.btn-icon.btn-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.btn-icon.btn-danger:hover {
    background-color: #f5c6cb;
    color: #491217;
}

/* 用户管理样式 */
.user-management-toolbar {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.user-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-item-mgmt {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background-color: #fff;
    transition: all 0.2s ease;
    width: 100%;
}

.user-item-mgmt:hover {
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0,123,255,0.1);
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 1.1em;
    color: #2d3748;
    margin-bottom: 5px;
}

.user-details {
    display: flex;
    gap: 15px;
    align-items: center;
}

.user-username {
    color: #718096;
    font-size: 0.9em;
}

.user-email {
    color: #4a5568;
    font-size: 0.9em;
}

.user-role {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
}

.role-admin {
    background-color: #fed7d7;
    color: #9b2c2c;
}

.role-manager {
    background-color: #feebc8;
    color: #c05621;
}

.role-member {
    background-color: #c6f6d5;
    color: #276749;
}

.user-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* 任务卡片位置调整 */
.task-card {
    position: relative;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .user-info {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .user-item-mgmt {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .user-details {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }
    
    .user-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

.file-link i {
    margin-right: 6px;
    color: #6c757d;
}

/* 多选分配者样式 */
.assignees-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: #f9f9f9;
    max-height: 200px;
    overflow-y: auto;
}

.assignees-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}

.assignee-item {
    display: flex;
    align-items: center;
    padding: 8px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
    /* 两列横排：每个卡片占半行，随容器宽度自适应 */
    box-sizing: border-box;
    flex: 1 1 calc(50% - 8px);
    width: calc(50% - 8px);
}

.assignee-item:hover {
    background: #f0f8ff;
    border-color: #667eea;
}

.assignee-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.assignee-item label {
    cursor: pointer;
    flex: 1;
    margin: 0;
    font-weight: 500;
    display: flex;
    flex-direction: row; /* 横向并排两列 */
    gap: 2px;
    align-items: flex-start;
    line-height: 1.1;
}

.assignee-item label .name-col {
    display: inline-block;
    /* 每列内部竖排显示 */
    writing-mode: vertical-rl;
    text-orientation: upright;
}

.assignee-item.selected {
    background: #e8f2ff;
    border-color: #667eea;
}

.assignee-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-left: 10px;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}