/* ============================================
   工作台页面样式
   ============================================ */

.workspace-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 侧边栏 */
.sidebar {
    width: 260px;
    background: var(--dark-color);
    color: white;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
}

.sidebar-actions {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-btn {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    text-decoration: none;
}

.sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.new-project-btn {
    background: var(--gradient-primary);
    border: none;
}

.new-project-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-icon {
    font-size: 18px;
}

.sidebar-nav {
    padding: 20px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: rgba(255, 107, 53, 0.2);
    color: white;
}

.nav-icon {
    font-size: 20px;
}

.nav-text {
    font-size: 15px;
    font-weight: 500;
}

.sidebar-filter {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-title {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
    font-weight: 600;
}

.filter-item {
    padding: 8px 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
}

.filter-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    flex: 1;
}

.help-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.help-link:hover {
    color: white;
}

/* 主内容区 */
.main-content {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-light);
    padding: 40px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

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

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-color);
}

.page-actions {
    display: flex;
    gap: 12px;
}

.btn-icon-text {
    padding: 10px 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.btn-icon-text:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.info-banner {
    background: #e6f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 32px;
    color: #0066cc;
    font-size: 15px;
}

/* 机会列表 */
.opportunities-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.opportunity-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.opportunity-card:hover {
    box-shadow: var(--shadow-hover);
}

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

.rank-badge {
    font-size: 32px;
}

.card-title {
    flex: 1;
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-color);
}

.score-badge {
    padding: 8px 16px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
}

.card-desc {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.6;
}

.card-insights {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.insight-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 12px;
}

.insight-list {
    list-style: none;
}

.insight-list li {
    padding: 8px 0;
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.6;
    border-bottom: 1px solid var(--border-color);
}

.insight-list li:last-child {
    border-bottom: none;
}

.card-scores {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.score-item {
    font-size: 14px;
    color: var(--text-light);
}

.score-item strong {
    color: var(--primary-color);
    font-weight: 700;
}

.card-actions {
    display: flex;
    gap: 12px;
}

.btn-secondary-small {
    padding: 10px 20px;
    background: transparent;
    border: 2px solid var(--dark-color);
    color: var(--dark-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-primary-small {
    padding: 10px 20px;
    background: var(--gradient-primary);
    border: none;
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* 项目列表 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.project-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.project-status {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 4px 12px;
    background: #e6f3ff;
    color: #0066cc;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.project-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 12px;
}

.project-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-meta {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 12px;
    color: var(--text-light);
}

.meta-value {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 600;
}

.project-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.3s;
}

.progress-text {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border: 2px dashed var(--border-color);
    background: var(--bg-light);
}

.empty-icon {
    font-size: 48px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.empty-text {
    font-size: 16px;
    color: var(--text-light);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-header h2 {
    font-size: 24px;
    color: var(--dark-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.modal-close:hover {
    color: var(--dark-color);
}

.modal-body {
    padding: 32px;
}

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

.form-group label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 12px;
}

.form-textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s;
}

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

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

/* 响应式 */
@media (max-width: 768px) {
    .workspace-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}
