* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4f46e5;
    --secondary-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-bg: #1e293b;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    line-height: 1.6;
}

/* 侧边栏 */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: var(--dark-bg);
    color: white;
    padding: 20px 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .logo i {
    font-size: 32px;
    color: var(--primary-color);
}

.sidebar .logo h2 {
    font-size: 20px;
    font-weight: 600;
}

.nav-menu {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: rgba(79, 70, 229, 0.1);
    color: white;
    border-left-color: var(--primary-color);
}

.nav-item i {
    font-size: 18px;
    width: 20px;
}

/* 主内容区 */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
}

/* 顶部栏 */
.topbar {
    background: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-primary);
}

.topbar h1 {
    font-size: 24px;
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 15px;
    color: var(--text-secondary);
}

.search-box input {
    padding: 10px 15px 10px 45px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 300px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-icon {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--light-bg);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: var(--primary-color);
    color: white;
}

/* 页面容器 */
.page {
    display: none;
    padding: 30px;
}

.page.active {
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card.blue .stat-icon {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
}

.stat-card.green .stat-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.stat-card.orange .stat-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.stat-card.purple .stat-icon {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-info h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 快速操作 */
.quick-actions {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.quick-actions h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* 最近活动 */
.recent-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.recent-section h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: #e2e8f0;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.activity-content {
    flex: 1;
}

.activity-content h4 {
    font-size: 14px;
    margin-bottom: 3px;
}

.activity-content p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 页面头部 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.page-header h2 {
    font-size: 24px;
    font-weight: 600;
}

.btn-primary {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* 文件分类 */
.file-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.category-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.category-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 文件网格 */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.file-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.file-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 15px;
}

.file-icon.doc {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.file-icon.code {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.file-icon.image {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.file-icon.other {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.file-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
    word-break: break-word;
}

.file-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 10px;
}

.file-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-small {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.btn-edit {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.btn-small:hover {
    transform: scale(1.05);
}

/* 笔记网格 */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.note-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 4px solid var(--primary-color);
}

.note-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.note-header h3 {
    font-size: 18px;
    flex: 1;
}

.note-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.note-content {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    max-height: 100px;
    overflow: hidden;
}

.note-actions {
    display: flex;
    gap: 10px;
}

/* 任务容器 */
.tasks-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.task-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.task-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-section h3 span {
    background: var(--primary-color);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 14px;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    transition: all 0.3s ease;
}

.task-item.completed {
    opacity: 0.7;
    border-left-color: var(--success-color);
}

.task-item:hover {
    background: #e2e8f0;
}

.task-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.task-title {
    flex: 1;
    font-weight: 500;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.task-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-left: 30px;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
    padding-left: 30px;
}

.task-actions {
    display: flex;
    gap: 8px;
}

/* 时间线 */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 70px;
    margin-bottom: 30px;
}

.timeline-dot {
    position: absolute;
    left: 22px;
    top: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--border-color);
}

.timeline-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.timeline-date {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.timeline-content h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.timeline-content p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 参考资料 */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.resource-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.resource-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.resource-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.resource-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.resource-type {
    font-size: 12px;
    color: var(--text-secondary);
}

.resource-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.6;
}

.resource-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.resource-link:hover {
    gap: 12px;
}

.resource-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--danger-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

.btn-secondary {
    padding: 12px 24px;
    background: var(--light-bg);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .tasks-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .topbar {
        padding: 15px 20px;
    }

    .topbar h1 {
        font-size: 18px;
    }

    .search-box input {
        width: 200px;
    }

    .page {
        padding: 20px 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .files-grid,
    .notes-grid,
    .resources-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-btn {
        justify-content: center;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

