/* 任务登记系统 - 现代简约风格 */

:root {
    --primary-color: #FF6B35;        /* 橙色 */
    --secondary-color: #00B4D8;      /* 蓝绿色 */
    --success-color: #06D6A0;        /* 绿色 */
    --danger-color: #EF476F;         /* 红色 */
    --warning-color: #FFB627;        /* 黄色 */

    --text-primary: #2D3748;
    --text-secondary: #718096;
    --text-light: #A0AEC0;

    --bg-primary: #FFFFFF;
    --bg-secondary: #F7FAFC;
    --bg-tertiary: #EDF2F7;

    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --sidebar-width: 260px;
    --sidebar-collapsed-width: 88px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background: var(--bg-secondary);
    line-height: 1.6;
}

/* 应用容器 */
.app-container {
    --sidebar-current-width: var(--sidebar-width);
    display: flex;
    min-height: 100vh;
}

.app-container.sidebar-collapsed {
    --sidebar-current-width: var(--sidebar-collapsed-width);
}

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-current-width);
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.25s ease;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    transition: padding 0.25s ease;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 16px;
    transition: padding 0.25s ease;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(0, 180, 216, 0.1));
    color: var(--primary-color);
    font-weight: 600;
}

.nav-icon {
    font-size: 20px;
}

.sidebar-footer {
    padding: 16px 16px 54px;
    border-top: 1px solid var(--border-color);
    transition: padding 0.25s ease;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.user-department {
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-logout {
    width: 100%;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--bg-secondary);
    color: var(--danger-color);
}

.sidebar-toggle-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.sidebar-toggle-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.app-container.sidebar-collapsed .sidebar-header {
    padding: 20px 12px;
}

.app-container.sidebar-collapsed .sidebar-header h2 {
    display: none;
}

.app-container.sidebar-collapsed .sidebar-header::after {
    content: '📋';
    display: block;
    text-align: center;
    font-size: 22px;
}

.app-container.sidebar-collapsed .sidebar-nav {
    padding: 12px 8px;
}

.app-container.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 12px 0;
}

.app-container.sidebar-collapsed .nav-item span:not(.nav-icon) {
    display: none;
}

.app-container.sidebar-collapsed .sidebar-footer {
    padding: 12px 8px 46px;
}

.app-container.sidebar-collapsed .user-info {
    justify-content: center;
    padding: 10px 0;
}

.app-container.sidebar-collapsed .user-details {
    display: none;
}

.app-container.sidebar-collapsed .btn-logout {
    font-size: 0;
    padding: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-container.sidebar-collapsed .btn-logout::before {
    content: '⎋';
    font-size: 18px;
}

.app-container.sidebar-collapsed .sidebar-toggle-btn {
    right: 50%;
    transform: translateX(50%);
}

/* 主内容区 */
.main-content {
    margin-left: var(--sidebar-current-width);
    flex: 1;
    padding: 25px;
    transition: margin-left 0.25s ease;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header > div {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 0;
}

/* 按钮 */
.btn-primary {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    background: #E85D2A;
}

.btn-secondary {
    padding: 10px 20px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-danger {
    padding: 10px 20px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    filter: brightness(0.95);
}

.btn-warning {
    padding: 10px 20px;
    background: #FF6B35;
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-warning:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    filter: brightness(0.95);
}

.btn-text {
    padding: 10px 16px;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-text:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.filter-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.input,
.textarea,
.select {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: all 0.2s;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.input:focus,
.textarea:focus,
.select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* 任务列表 */
.tasks-container {
    min-height: 400px;
    max-height: calc(100vh - 320px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

/* 任务容器滚动条样式 */
.tasks-container::-webkit-scrollbar {
    width: 8px;
}

.tasks-container::-webkit-scrollbar-track {
    background: transparent;
}

.tasks-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.tasks-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.task-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.task-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.task-date {
    font-size: 13px;
    color: var(--text-secondary);
}

.task-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
}

.task-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.task-participants {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
}

.task-time {
    font-size: 13px;
    color: var(--text-light);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 15px;
}

/* 加载状态 */
.loading-state {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.modal-content {
    position: relative;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.modal.is-open,
.modal.is-closing {
    display: flex;
}

.modal.is-open {
    opacity: 1;
}

.modal.is-open .modal-overlay {
    opacity: 1;
}

.modal.is-open .modal-content {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.modal.is-closing .modal-overlay {
    opacity: 0;
}

.modal.is-closing .modal-content {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
}

/* 模态框滚动条样式 */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.modal-large {
    max-width: 900px;
}

.modal-xlarge {
    max-width: 1200px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--bg-primary);
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.modal-body .form-actions,
.modal-body .detail-actions,
.modal-body .pagination {
    position: sticky;
    bottom: -24px;
    z-index: 3;
    margin-left: -24px;
    margin-right: -24px;
    margin-bottom: -24px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.logout-confirm-note {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 14px;
}

.delete-confirm-note {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 14px;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.required {
    color: var(--danger-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.textarea {
    width: 100%;
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* 参与人员选择 */
.participants-section {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    background: var(--bg-secondary);
}

.search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.members-list {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 16px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

/* 确保滚动容器保持圆角 */
.members-list::-webkit-scrollbar {
    width: 8px;
}

.members-list::-webkit-scrollbar-track {
    background: transparent;
    border-radius: var(--radius-md);
}

.members-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.members-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.member-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.member-item:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

.member-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.member-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
}

.member-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
    white-space: nowrap;
}

.member-meta {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.selected-members {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 12px;
}

.section-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.selected-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selected-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.tag-remove {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tag-remove:hover {
    opacity: 0.7;
}

/* 任务详情 */
.detail-section {
    margin-bottom: 24px;
}

.detail-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item .label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item .value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.detail-description h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-description p {
    color: var(--text-primary);
    line-height: 1.6;
}

.participants-detail {
    margin-bottom: 24px;
}

.participants-detail h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.participants-table {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.participant-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.participant-row:last-child {
    border-bottom: none;
}

.participant-row:nth-child(even) {
    background: var(--bg-secondary);
}

.participant-name {
    font-weight: 500;
    color: var(--text-primary);
}

.participant-meta {
    font-size: 13px;
    color: var(--text-secondary);
}

.detail-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* 统计分析页面样式 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stats-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stats-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stats-content {
    flex: 1;
}

.stats-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
}

.stats-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

/* 图表容器 */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.chart-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.chart-header {
    margin-bottom: 20px;
}

.chart-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.chart-header p {
    font-size: 13px;
    color: var(--text-secondary);
}

.chart-wrapper {
    position: relative;
    height: 300px;
}

.chart-wrapper canvas {
    max-height: 300px;
}

/* 数据表格 */
.data-table-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.table-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.table-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

/* 表格滚动条样式 */
.table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--bg-secondary);
}

.data-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
    background: var(--bg-secondary);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 600;
    font-size: 13px;
}

.rank-1 {
    background: rgba(255, 182, 39, 0.15);
    color: var(--warning-color);
}

.rank-2 {
    background: rgba(0, 180, 216, 0.15);
    color: var(--secondary-color);
}

.rank-3 {
    background: rgba(6, 214, 160, 0.15);
    color: var(--success-color);
}

.rank-other {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.action-btn {
    padding: 6px 14px;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: static;
        height: auto;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .sidebar-toggle-btn {
        display: none;
    }

    .app-container.sidebar-collapsed .sidebar {
        width: 100%;
    }

    .app-container.sidebar-collapsed .main-content {
        margin-left: 0;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .page-header > div {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .subtitle {
        font-size: 14px;
    }

    .tasks-container {
        max-height: calc(100vh - 400px);
    }

    .members-container {
        max-height: calc(100vh - 400px);
    }

    .tasks-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .detail-info {
        grid-template-columns: 1fr;
    }

    .participant-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .stats-cards {
        grid-template-columns: 1fr;
    }

    .charts-container {
        grid-template-columns: 1fr;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .table-actions {
        width: 100%;
        flex-direction: column;
    }

    .table-actions .input {
        width: 100%;
    }
}

/* 成员列表页面样式 */
.members-container {
    min-height: 400px;
    max-height: calc(100vh - 320px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

/* 成员容器滚动条样式 */
.members-container::-webkit-scrollbar {
    width: 8px;
}

.members-container::-webkit-scrollbar-track {
    background: transparent;
}

.members-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.members-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.member-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    cursor: pointer;
    text-align: center;
    position: relative;
}

.member-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

/* 成员状态标签 */
.member-status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.member-status-badge.status-active {
    background: var(--success-color);  /* 绿色 */
}

.member-status-badge.status-honored {
    background: var(--warning-color);  /* 金色 */
}

.member-status-badge.status-other {
    background: var(--text-secondary);
}

.member-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(0, 180, 216, 0.1));
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
    border: 3px solid var(--bg-secondary);
}

.member-card-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.member-card-id {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.member-card-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.member-card-info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.member-card-info-item .label {
    color: var(--text-secondary);
}

.member-card-info-item .value {
    color: var(--text-primary);
    font-weight: 500;
}

.member-task-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: rgba(255, 107, 53, 0.1);
    border-radius: var(--radius-md);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
}

/* 统计摘要 */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 任务历史 */
.task-history {
    margin-bottom: 24px;
}

.history-list {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 任务历史滚动条样式 */
.history-list::-webkit-scrollbar {
    width: 8px;
}

.history-list::-webkit-scrollbar-track {
    background: transparent;
}

.history-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.history-item {
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    transition: all 0.2s;
}

.history-item:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
}

.history-item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.history-item-date {
    font-size: 13px;
    color: var(--text-secondary);
}

.history-item-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.history-item-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-light);
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.status-badge.status-active {
    background: var(--success-color);  /* 绿色 */
}

.status-badge.status-honored {
    background: var(--warning-color);  /* 金色 */
}

.status-badge.status-other {
    background: var(--text-secondary);
}

.status-completed {
    background: rgba(6, 214, 160, 0.15);
    color: var(--success-color);
}

.status-progress {
    background: rgba(0, 180, 216, 0.15);
    color: var(--secondary-color);
}

.status-pending {
    background: rgba(255, 182, 39, 0.15);
    color: var(--warning-color);
}

@media (max-width: 1024px) {
    .members-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .members-container {
        max-height: calc(100vh - 450px);
    }

    .members-grid {
        grid-template-columns: 1fr;
    }

    .stats-summary {
        grid-template-columns: 1fr;
    }
}

/* 部门选择弹窗 */
.department-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 部门列表滚动条样式 */
.department-list::-webkit-scrollbar {
    width: 8px;
}

.department-list::-webkit-scrollbar-track {
    background: transparent;
}

.department-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.department-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.department-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: all 0.2s;
    cursor: pointer;
}

.department-item:hover {
    background: var(--bg-tertiary);
}

.department-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.department-info {
    flex: 1;
}

.department-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 2px;
}

.department-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 视图切换 */
.view-content {
    display: none;
}

.view-content.active {
    display: block;
}

/* 历史任务网格 */
.all-tasks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    min-height: 400px;
}

.all-tasks-grid .history-item {
    margin-bottom: 0;
}

/* 分页器 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
}

body.modal-open {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .modal-overlay,
    .modal-content {
        transition: none;
    }
}

.pagination-btn {
    padding: 8px 16px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 0 16px;
}

@media (max-width: 1024px) {
    .all-tasks-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .all-tasks-grid {
        grid-template-columns: 1fr;
    }
}
