/* =================================
   Global Styles
   ================================= */
:root {
    --primary-color: #4a90e2;
    --dark-blue: #2c3e50;
    --light-gray: #f8f9fa;
    --text-color: #333;
    --label-color: #888;
    --white: #fff;
    --border-color: #e9eef2;
}

body {
    font-family: 'Roboto', 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    margin: 0;
    background-color: #f4f7fa;
    color: var(--text-color);
}

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

/* =================================
   Header & Toolbar
   ================================= */
.header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: var(--text-color);
    padding: 15px 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    border-radius: 0 0 12px 12px;
    margin-bottom: 10px;
    font-size: 16px;
}

.header .header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

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

.user-name {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #d32f2f;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.logout-btn .material-icons {
    font-size: 16px;
}

.search-box {
    display: flex;
    align-items: center;
}

.search-box .search-input {
    width: 250px;
    font-size: 14px;
    padding: 10px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 25px 0 0 25px;
    background-color: white;
    color: var(--text-color);
    outline: none;
    transition: all 0.3s ease;
}

.search-box .search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1);
}

.search-box .search-input::placeholder {
    color: #9ca3af;
}

.search-box .search-btn {
    font-size: 18px;
    padding: 10px 16px;
    border: 2px solid var(--primary-color);
    border-left: none;
    border-radius: 0 25px 25px 0;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box .search-btn:hover {
    background-color: #303f9f;
    transform: translateY(-1px);
}

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

.view-switcher, .filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.view-btn, .btn-sort {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-size: 12px;
}
.view-btn.active, .btn-sort:hover, .view-btn:hover {
    background-color: #e9eef2;
}

.filter-select {
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    min-width: 100px;
}


/* =================================
   Table View
   ================================= */
.projects-table-container {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow-x: auto;
    max-width: 1400px;
    margin: 0 auto;
}
.projects-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.projects-table th, .projects-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.projects-table th {
    background-color: #f8f9fa;
    font-weight: 500;
}
.projects-table tbody tr:nth-child(even) {
    background-color: var(--light-gray);
}
.projects-table tbody tr:hover {
    background-color: #e9eef2;
}
.project-name-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
}
.project-name-link:hover {
    color: var(--primary-color);
}

/* 未完成项目数量为0时的红色样式 */
.projects-table .uncompleted-zero {
    color: #dc3545;
    font-weight: bold;
}

/* Column Widths */
.projects-table .col-code { width: 100px; }
.projects-table .col-name { width: 300px; }
.projects-table .col-manager { width: 80px; }
.projects-table .col-dev-manager { width: 80px; }
.projects-table .col-task-count { width: 40px; text-align: left; font-weight: 300; }
.projects-table .col-task-count .loading-dot { color: #999; font-weight: normal; }
.projects-table .col-date { width: 80px; }
.projects-table .col-status { width: 70px; }
.projects-table .col-actions { width: 80px; text-align: center; }

.action-buttons .material-icons {
    cursor: pointer;
    margin: 0 4px;
    color: #666;
    transition: color 0.2s;
}
.action-buttons .material-icons:hover {
    color: var(--primary-color);
}


/* =================================
   Card View
   ================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 20px;
}
.project-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.project-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}
.project-card .project-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    color: var(--text-color);
}
.project-card .project-code {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-color);
}
.project-card .project-info { margin-bottom: 16px; }
.project-card .info-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}
.project-card .info-label { color: var(--label-color); }
.project-card .info-value { font-weight: 500; }
.project-card .project-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    align-items: center;
}


/* =================================
   Badges
   ================================= */
.status-badge {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}
.status-0 { background-color: #e9ecef; color: #495057; }
.status-1 { background-color: #d4edda; color: #155724; }
.status-2 { background-color: #cce5ff; color: #004085; }
.status-3 { background-color: #fff3cd; color: #856404; }
.status-overdue { background-color: #f8d7da; color: #721c24; }

/* 逾期状态样式增强 */
.status-badge.status-overdue {
    background-color: #dc3545 !important;
    color: white !important;
    font-weight: bold;
    animation: pulse-overdue 2s infinite;
}

@keyframes pulse-overdue {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* 逾期项目卡片样式 */
.project-card.card-overdue {
    border-color: #dc3545;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.2);
}

.project-card.card-overdue:hover {
    box-shadow: 0 6px 12px rgba(220, 53, 69, 0.3);
}

.priority-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.priority-1 { background-color: #e6f7ff; color: #1890ff; }
.priority-2 { background-color: #fffbe6; color: #faad14; }
.priority-3 { background-color: #fff1f0; color: #f5222d; }
.priority-4 { background-color: #f5222d; color: var(--white); }

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

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

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background: #3f51b5;
    color: white;
    box-shadow: 0 2px 4px rgba(63,81,181,0.3);
}

.btn-primary:hover {
    background: #303f9f;
}

.btn-outline {
    background: transparent;
    border: 1px solid #3f51b5;
    color: #3f51b5;
}

.btn-outline:hover {
    background: rgba(63,81,181,0.1);
}

.btn-back { 
    background: #607d8b; 
    color: white; 
}
.btn-back:hover { 
    background: #546e7a; 
}


/* 视图切换和筛选 */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.view-toggle {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    width: fit-content;
    border: 1px solid #3f51b5;
}

.view-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s;
    color: #3f51b5;
}

.view-btn.active {
    background: #3f51b5;
    color: white;
}

.status-filter {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    background: #fff;
    color: #616161;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
    font-weight: 500;
}

.filter-btn:hover, .filter-btn.active {
    background: #3f51b5;
    color: white;
    box-shadow: 0 2px 6px rgba(63,81,181,0.3);
    border-color: #3f51b5;
}

/* 表格通用样式 */
.projects-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
    vertical-align: middle;
}

th {
    font-weight: 500;
    color: #757575;
    background: #f5f7fa;
    text-transform: uppercase;
    font-size: 12px;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: #f5f7fa;
}

/* 列表视图特定样式 */
.project-name-link {
    font-weight: 500;
    color: #3f51b5;
    cursor: pointer;
    transition: color 0.2s;
}

.project-name-link:hover {
    color: #303f9f;
    text-decoration: underline;
}

/* 卡片视图特定样式 */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 24px;
}

.project-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    padding: 24px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}
.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}

/* 卡片头部 */
.project-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f5f5f5;
}

.project-card .project-title {
    font-size: 18px;
    font-weight: 500;
    color: #3f51b5;
    margin: 0;
    flex: 1;
    margin-right: 15px;
}

.project-card .card-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.project-card .project-code-large {
    font-size: 24px;
    font-weight: 700;
    color: #2196F3;
    letter-spacing: 1px;
}

/* 时间状态显示 */
.time-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    min-width: 100px;
}

.time-status-completed {
    background: #e8f5e8;
    color: #2e7d32;
}

.time-status-remaining {
    background: #fff3e0;
    color: #f57c00;
}

.time-status-today {
    background: #ffebee;
    color: #d32f2f;
}

.time-status-overdue {
    background: #ffcdd2;
    color: #c62828;
    font-weight: 700;
}

.time-status-no-deadline {
    background: #f5f5f5;
    color: #666;
}

/* 信息组样式 */
.info-group {
    margin-bottom: 20px;
    background: #fafafa;
    border-radius: 8px;
    padding: 16px;
}

.info-group .group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    font-size: 14px;
}

.info-group .group-title .material-icons {
    font-size: 18px;
    color: #2196F3;
}

/* 带状态的组标题样式 */
.group-title-with-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.group-title-with-status .group-title {
    margin-bottom: 0;
}

.group-title-with-status .time-status {
    margin-left: 10px;
}

.info-group .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.info-group .info-row:last-child {
    margin-bottom: 0;
}

.info-group .info-label {
    color: #666;
    font-weight: 500;
}

.info-group .info-value {
    font-weight: 500;
    color: #333;
}

/* 经理徽章样式 */
.manager-badge {
    background: #e0e0e0;
    color: #333;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 项目底部 */
.project-card .project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    margin-top: 15px;
}

/* 详情视图特定样式 */
.project-overview-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    padding: 24px;
    margin-bottom: 24px;
}
.project-overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.project-overview-title {
    font-size: 24px;
    font-weight: 500;
    color: #3f51b5;
}
.task-table-actions {
    margin: 20px 0;
}

/* 树状任务表格样式 */
.task-row.parent > td:first-child {
    cursor: pointer;
    font-weight: 500;
}
.task-row.parent > td:first-child:hover {
    color: #3f51b5;
}
.task-row.child > td:first-child {
    padding-left: 40px;
    position: relative;
}
.task-row.child > td:first-child::before {
    content: '';
    position: absolute;
    left: 20px;
    top: -16px;
    width: 1px;
    height: 100%;
    background-color: #e0e0e0;
}
.task-row.child > td:first-child::after {
    content: '';
    position: absolute;
    left: 20px;
    top: 24px;
    width: 10px;
    height: 1px;
    background-color: #e0e0e0;
}
.task-row .toggle-icon {
    display: inline-block;
    vertical-align: middle;
    width: 20px;
    transition: transform 0.2s;
}

/* 辅助类 */
.hidden { display: none !important; }

/* 新增的动态交互样式 */

/* 加载状态 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3f51b5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

/* 项目网格布局 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

/* 项目卡片样式 */
.project-card {
    background-color: #fff;
    border: 1px solid #e9eef2;
    border-radius: 8px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.project-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.project-card .project-title {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    text-decoration: underline;
    color: #333;
}

.project-card .project-code {
    font-size: 14px;
    font-weight: 500;
    color: #4a90e2;
}

.project-card .project-info {
    margin-bottom: 16px;
}

.project-card .info-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

.project-card .info-label {
    color: #888;
}

.project-card .info-value {
    font-weight: 500;
    color: #333;
}

.project-card .project-footer {
    margin-top: auto; /* Pushes footer to the bottom */
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.priority-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.priority-1 { background-color: #e6f7ff; color: #1890ff; } /* Low */
.priority-2 { background-color: #fffbe6; color: #faad14; } /* Medium */
.priority-3 { background-color: #fff1f0; color: #f5222d; } /* High */
.priority-4 { background-color: #f5222d; color: #fff; }    /* Urgent */

/* 搜索和筛选样式 */
.header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: all 0.3s;
}

.search-box:focus-within {
    border-color: #3f51b5;
    box-shadow: 0 0 0 2px rgba(63, 81, 181, 0.1);
}

.search-input {
    border: none;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    min-width: 200px;
}

.search-btn {
    background: #3f51b5;
    color: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #303f9f;
}

.filter-select {
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s;
}

.filter-select:focus {
    border-color: #3f51b5;
}

/* 详情页面样式 */
.project-detail {
    padding: 24px 0;
}

.detail-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.detail-section h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.detail-item .label {
    font-weight: 500;
    color: #666;
}

.detail-item .value {
    color: #333;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.description-content {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
}

/* 成员网格 */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.member-card {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.member-info {
    margin-bottom: 8px;
}

.member-name {
    font-weight: 600;
    color: #2c3e50;
    display: block;
}

.member-account {
    font-size: 12px;
    color: #666;
}

.member-contact {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-item {
    font-size: 12px;
    color: #666;
}

/* 任务列表样式 */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

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

.task-name {
    font-weight: 600;
    color: #2c3e50;
}

.task-info {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #666;
}

.task-description {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    background: white;
    padding: 8px;
    border-radius: 4px;
    margin-top: 8px;
}

/* 返回按钮 */
.back-btn {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.back-btn:hover {
    background: #e0e0e0;
}

/* 视图统计 */
.view-stats {
    color: #666;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .search-input {
        min-width: 150px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .members-grid {
        grid-template-columns: 1fr;
    }
    
    .toolbar {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    
    .filters {
        justify-content: center;
        gap: 6px;
    }
    
    .btn-sort {
        font-size: 11px;
        padding: 4px 6px;
    }
    
    .filter-select {
        min-width: 80px;
        font-size: 11px;
    }
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
    flex-wrap: wrap;
    background-color: #fff;
    color: #333;
    border-bottom: 1px solid #ddd;
}

.view-switcher, .filters {
    display: flex;
    align-items: center;
    gap: 15px;
}

.view-btn, .btn-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    background-color: transparent;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn.active, .view-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-sort {
    background-color: var(--white);
}
.btn-sort:hover {
    background-color: #f0f0f0;
}
.btn-sort .material-icons {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.filter-select {
    padding: 8px 12px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background-color: var(--white);
}

.main-content {
    padding-top: 20px;
}

/* Table View Styles */
.projects-table-container {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow-x: auto;
    max-width: 1400px;
    margin: 0 auto;
}

.projects-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.projects-table th, .projects-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.projects-table th {
    background-color: #f8f9fa;
    font-weight: 500;
    color: var(--text-secondary);
}

.projects-table tbody tr:hover {
    background-color: var(--background-light);
}

.projects-table .project-name-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
.projects-table .project-name-link:hover {
    text-decoration: underline;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-buttons button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
}

.action-buttons button:hover {
    color: var(--primary-color);
}

.project-card {
    background-color: var(--white);
}

.header .logo {
    color: white;
}

.search-box .search-input {
    width: 200px; /* Smaller width */
    font-size: 14px;
    padding: 6px 12px;
}

.search-box .search-btn {
    font-size: 20px; /* Smaller icon */
    padding: 6px;
}

.projects-table tbody tr:nth-child(even) {
    background-color: #f8f9fa; /* Light gray for striped effect */
}

/* =================================
   Card View
   ================================= */
.projects-grid {
    display: grid;
    /* On large screens, creates 3 columns. On smaller screens, it will wrap automatically. */
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 20px;
}

.project-card {
    background-color: #fff;
    border: 1px solid #e9eef2;
    border-radius: 8px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.project-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.project-card .project-title {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    text-decoration: underline;
    color: #333;
}

.project-card .project-code {
    font-size: 14px;
    font-weight: 500;
    color: #4a90e2;
}

.project-card .project-info {
    margin-bottom: 16px;
}

.project-card .info-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

.project-card .info-label {
    color: #888;
}

.project-card .info-value {
    font-weight: 500;
    color: #333;
}

.project-card .project-footer {
    margin-top: auto; /* Pushes footer to the bottom */
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.priority-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.priority-1 { background-color: #e6f7ff; color: #1890ff; } /* Low */
.priority-2 { background-color: #fffbe6; color: #faad14; } /* Medium */
.priority-3 { background-color: #fff1f0; color: #f5222d; } /* High */
.priority-4 { background-color: #f5222d; color: #fff; }    /* Urgent */

/* =================================
   现代感Banner样式
   ================================= */
.modern-banner {
    position: relative;
    height: 160px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-image: url('banner.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 16px;
    margin: 20px 0;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 
                0 10px 20px rgba(0, 0, 0, 0.08),
                0 4px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modern-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 
                0 15px 30px rgba(0, 0, 0, 0.12),
                0 8px 16px rgba(0, 0, 0, 0.1);
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
                rgba(102, 126, 234, 0.8) 0%, 
                rgba(118, 75, 162, 0.7) 50%,
                rgba(67, 56, 202, 0.6) 100%);
    backdrop-filter: blur(1px);
}

.banner-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 40px;
}

.logo-section {
    flex: 0 0 25%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.animated-logo {
    width: 200px;
    height: 200px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
    animation: breathe 5s ease-in-out infinite;
    transition: transform 0.5s ease;
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
        opacity: 0.85;
        filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
        filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
    }
}

.title-section {
    flex: 0 0 75%;
    padding-left: 40px;
    color: white;
}

.banner-title {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.banner-subtitle {
    font-size: 16px;
    font-weight: 400;
    margin: 0;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modern-banner {
        height: 120px;
        margin: 15px 0;
        border-radius: 12px;
    }
    
    .banner-content {
        padding: 0 20px;
    }
    
    .logo-section {
        flex: 0 0 30%;
    }
    
    .animated-logo {
        width: 120px;
        height: 120px;
    }
    
    .title-section {
        flex: 0 0 70%;
        padding-left: 20px;
    }
    
    .banner-title {
        font-size: 24px;
    }
    
    .banner-subtitle {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .modern-banner {
        height: 120px;
    }
    
    .banner-content {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 20px;
    }
    
    .logo-section {
        flex: none;
        margin-bottom: 10px;
    }
    
    .animated-logo {
        width: 70px;
        height: 70px;
    }
    
    .title-section {
        flex: none;
        padding-left: 0;
    }
    
    .banner-title {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .banner-subtitle {
        font-size: 12px;
    }
}

/* 添加成员弹窗美化样式 */
.modal-overlay {
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-dialog {
  background: #fff;
  border-radius: 16px;
  width: 50%; /* 宽度缩小一半 */
  max-width: 500px;
  min-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  animation: modalSlideIn 0.3s ease-out forwards;
}
@keyframes modalSlideIn {
  to {
    transform: scale(1);
  }
}
.modal-header, .modal-footer {
  padding: 20px 24px;
  background: #f8f9fa;
}
.modal-header {
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 18px;
  color: #333;
}
.modal-footer {
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.modal-content {
  padding: 24px;
  flex: 1;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
  font-size: 14px;
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: #fff;
}
.form-control:focus {
  outline: none;
  border-color: #1976d2;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}
/* Material Design风格的用户选择列表 */
#userSelect {
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  background: #fafafa;
  max-height: 200px;
  overflow-y: auto;
}
#userSelect option {
  padding: 12px 16px;
  margin: 2px 8px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e1e5e9;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}
#userSelect option:hover {
  background: #e3f2fd;
  border-color: #1976d2;
  transform: translateX(4px);
}
#userSelect option:checked {
  background: #1976d2;
  color: #fff;
  border-color: #1976d2;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}
.selected-member {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border: 1px solid #90caf9;
  border-radius: 20px;
  padding: 6px 12px;
  margin: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #1976d2;
  box-shadow: 0 2px 4px rgba(25, 118, 210, 0.1);
  transition: all 0.2s ease;
}
.selected-member:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(25, 118, 210, 0.2);
}
.selected-member button {
  background: none;
  border: none;
  color: #f44336;
  margin-left: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  padding: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.selected-member button:hover {
  background: #f44336;
  color: #fff;
  transform: scale(1.1);
}
.btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-primary {
  background: linear-gradient(135deg, #1976d2, #1565c0);
  color: #fff;
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1565c0, #0d47a1);
  box-shadow: 0 6px 16px rgba(25, 118, 210, 0.4);
  transform: translateY(-1px);
}
.btn-secondary {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #e0e0e0;
}
.btn-secondary:hover {
  background: #eeeeee;
  color: #333;
  transform: translateY(-1px);
}
.modal-close-btn {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close-btn:hover {
  background: #f5f5f5;
  color: #333;
  transform: rotate(90deg);
} 