* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
}

:root {
    --primary-color: #3B82F6;
    --secondary-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --dark-color: #1F2937;
    --light-color: #F3F4F6;
    --border-color: #E5E7EB;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #F9FAFB;
    color: var(--dark-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

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

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2563EB;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

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

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid #EEF2F7;
    padding: 12px 0;
    margin: 0 0 30px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.navbar-main {
    min-height: 48px;
}

.navbar-collapse {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.navbar-brand {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    white-space: nowrap;
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: white;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    background: #374151;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.navbar-nav {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 8px;
}

.navbar-nav li {
    position: relative;
}

.navbar-nav a,
.navbar-nav .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.navbar-nav a:hover,
.navbar-nav .dropdown-toggle:hover {
    color: var(--primary-color);
    background: #EFF6FF;
}

.navbar-nav a.active,
.navbar-nav a[style*="var(--primary-color)"] {
    color: var(--primary-color) !important;
    background: #EFF6FF;
    font-weight: 600 !important;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    z-index: 1001;
    min-width: 180px;
    overflow: hidden;
}

.dropdown-menu a {
    display: block;
    height: auto;
    border-radius: 0;
    padding: 10px 14px;
    color: var(--dark-color);
}

.dropdown-menu a:hover {
    background: #F3F4F6;
    color: var(--primary-color);
}

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

.user-info .btn {
    padding: 6px 14px !important;
    border-radius: 999px;
    margin-left: 0 !important;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    object-fit: cover;
}

.calendar {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.calendar-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-title {
    font-size: 20px;
    font-weight: bold;
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-nav button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.calendar-nav button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day-header {
    padding: 15px;
    text-align: center;
    font-weight: 600;
    background: var(--light-color);
    border-bottom: 1px solid var(--border-color);
}

.calendar-day {
    min-height: 100px;
    border: 1px solid var(--border-color);
    padding: 10px;
    cursor: pointer;
    transition: background 0.3s;
}

.calendar-day:hover {
    background: #F9FAFB;
}

.calendar-day.other-month {
    background: #F9FAFB;
    color: #9CA3AF;
}

.calendar-day.today {
    background: #EFF6FF;
}

.calendar-day.has-events {
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
}

.calendar-day.has-events:hover {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.day-number {
    font-weight: bold;
    margin-bottom: 5px;
}

.event-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.event-material { background: var(--secondary-color); }
.event-task { background: var(--warning-color); }
.event-inspiration { background: var(--primary-color); }

.event-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-badge-material {
    background: #D1FAE5;
    color: #065F46;
}

.event-badge-task {
    background: #FEF3C7;
    color: #92400E;
}

.event-badge-inspiration {
    background: #DBEAFE;
    color: #1E40AF;
}

.day-events {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stats-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.stats-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 12px;
}

.stats-icon-material {
    background: #D1FAE5;
}

.stats-icon-task {
    background: #FEF3C7;
}

.stats-icon-inspiration {
    background: #DBEAFE;
}

.stats-item {
    padding: 12px;
    background: #F9FAFB;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: background 0.2s;
}

.stats-item:hover {
    background: #F3F4F6;
}

.stats-item:last-child {
    margin-bottom: 0;
}

.stats-empty {
    padding: 20px;
    text-align: center;
    color: #9CA3AF;
    font-size: 14px;
}

.calendar-header button {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.calendar-header button:hover {
    background: rgba(255,255,255,0.25);
}

.calendar-day.today .day-number {
    background: var(--primary-color);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
}

.tab {
    padding: 15px 25px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-weight: 500;
    transition: all 0.3s;
}

.tab:hover {
    color: var(--primary-color);
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 事件时间显示样式 */
.event-time {
    font-size: 11px;
    opacity: 0.85;
    background: rgba(255,255,255,0.4);
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 6px;
    font-weight: 500;
}

/* 事件小圆点 */
.event-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* 事件徽章优化 */
.event-badge {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

/* 日历事件容器优化 */
.day-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

/* 小圆点容器 */
.day-events-dots {
    flex-direction: row;
    flex-wrap: wrap;
}

.day-events-dots .event-dot {
    margin: 2px;
}

/* 事件详情弹窗中的时间显示 */
.event-detail-time {
    font-size: 13px;
    color: #6B7280;
    background: #F3F4F6;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.event-detail-time::before {
    content: '⏰';
    font-size: 14px;
}

.file-browser {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.file-item {
    width: 150px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.file-item:hover {
    border-color: var(--primary-color);
    background: #EFF6FF;
}

.file-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.file-name {
    font-size: 14px;
    word-break: break-all;
}

.task-list, .inspiration-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.task-item, .inspiration-item {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
}

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

.task-title, .inspiration-title {
    font-size: 18px;
    font-weight: 600;
}

.task-meta, .inspiration-meta {
    color: #6B7280;
    font-size: 14px;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-low { background: #DBEAFE; color: #1E40AF; }
.badge-medium { background: #FEF3C7; color: #92400E; }
.badge-high { background: #FEE2E2; color: #991B1B; }
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-in-progress { background: #DBEAFE; color: #1E40AF; }
.badge-completed { background: #D1FAE5; color: #065F46; }

@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    .navbar {
        padding: 8px 0;
    }

    .navbar-main {
        min-height: 44px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .navbar-collapse {
        display: none !important;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 10px 0 4px;
    }

    .navbar-collapse.open {
        display: flex !important;
    }

    .navbar-nav {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .navbar-nav a,
    .navbar-nav .dropdown-toggle {
        width: 100%;
        height: 40px;
        justify-content: flex-start;
        border-radius: 10px;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border-radius: 8px;
        margin-top: 6px;
    }

    .dropdown.open .dropdown-menu {
        display: block !important;
    }

    .user-info {
        width: 100%;
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 8px 10px;
        align-items: center;
        padding-top: 6px;
        border-top: 1px solid #EEF2F7;
    }

    .user-info > div:nth-child(2) {
        min-width: 0;
    }

    .user-info .btn {
        grid-column: 1 / -1;
        width: 100%;
        text-align: center;
    }
    
    .calendar-grid {
        font-size: 12px;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 5px;
    }
    
    .file-item {
        width: 100%;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab {
        flex: 1;
        min-width: 100px;
        text-align: center;
    }
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* 页面头部 */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

/* 记事本样式 */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.note-card {
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

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

.note-card.pinned {
    border: 2px solid #F59E0B;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

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

.note-title {
    font-weight: 600;
    font-size: 16px;
    margin: 0;
    color: #333;
    flex: 1;
}

.note-actions {
    display: flex;
    gap: 5px;
}

.note-action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
    font-size: 16px;
}

.note-action-btn:hover {
    opacity: 1;
}

.note-content {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 12px;
    max-height: 80px;
    overflow: hidden;
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
    border-top: 1px solid rgba(0,0,0,0.08);
    padding-top: 12px;
}

.pinned-badge {
    background: #F59E0B;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
}

/* 颜色选择器 */
.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.2s;
}

.color-option:hover {
    border-color: #333;
}

.color-option.selected {
    border-color: #3B82F6;
}

/* 用户列表 */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.user-card {
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-card:hover {
    background: #f8f9fa;
    border-color: #ddd;
}

.user-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #3B82F6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-info h4 {
    margin: 0;
    font-size: 15px;
}

.user-info p {
    margin: 0;
    font-size: 12px;
    color: #999;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 15px;
}
