/**
 * Demo 2: Enterprise Internal Project - Styles
 * 企业内部项目协作样式
 */

/* ========== Project Request Card ========== */
.project-request-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    overflow: hidden;
}

.project-request-card .request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.requester-info .avatar {
    font-size: 32px;
}

.requester-info h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.requester-info p {
    margin: 4px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
}

.request-badge {
    padding: 6px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.25);
    font-size: 14px;
    font-weight: 500;
}

/* Legacy compatibility: ensure right-side metric chips in purple headers stay readable */
.project-request-card .request-header .header-metrics,
.team-plan-card .plan-header .header-metrics,
.progress-overview-card .overview-header .header-metrics {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.project-request-card .request-header .metric-chip,
.team-plan-card .plan-header .metric-chip,
.progress-overview-card .overview-header .metric-chip,
.project-request-card .request-header .header-metrics > span,
.team-plan-card .plan-header .header-metrics > span,
.progress-overview-card .overview-header .header-metrics > span,
.project-request-card .request-header .header-metrics > div,
.team-plan-card .plan-header .header-metrics > div,
.progress-overview-card .overview-header .header-metrics > div {
    background: rgba(255, 255, 255, 0.92);
    color: #24324a !important;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 1px 2px rgba(21, 33, 62, 0.18);
    font-weight: 700;
    line-height: 1.2;
    padding: 6px 12px;
    text-shadow: none;
}

/* Fallback for old inline white chips without classes */
.project-request-card .request-header [style*="background: #f"],
.project-request-card .request-header [style*="background:#f"],
.project-request-card .request-header [style*="background: white"],
.project-request-card .request-header [style*="background:white"],
.team-plan-card .plan-header [style*="background: #f"],
.team-plan-card .plan-header [style*="background:#f"],
.team-plan-card .plan-header [style*="background: white"],
.team-plan-card .plan-header [style*="background:white"],
.progress-overview-card .overview-header [style*="background: #f"],
.progress-overview-card .overview-header [style*="background:#f"],
.progress-overview-card .overview-header [style*="background: white"],
.progress-overview-card .overview-header [style*="background:white"] {
    color: #24324a !important;
    font-weight: 700 !important;
    text-shadow: none !important;
}

.request-body {
    padding: 24px;
}

.project-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
}

.requirement-section h5 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
}

.requirement-desc {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.requirement-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.detail-item {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

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

.detail-item .value {
    color: #333;
}

/* ========== Team Plan Card ========== */
.team-plan-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    overflow: hidden;
}

.plan-header {
    padding: 20px 24px;
}

.team-plan-card .plan-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b !important;
}

.team-plan-card .plan-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0;
}

.plan-summary {
    display: flex;
    gap: 24px;
}

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

.summary-item .label {
    font-size: 13px;
    opacity: 0.9;
}

.summary-item .value {
    font-size: 18px;
    font-weight: 700;
}

.plan-body {
    padding: 24px;
}

.plan-body h5 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 16px 0;
}

.team-roles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.role-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    border-left: 4px solid #667eea;
}

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

.role-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.role-cost {
    font-size: 16px;
    font-weight: 700;
    color: #667eea;
}

.role-details .department {
    font-size: 13px;
    color: #666;
    margin: 0 0 8px 0;
}

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

.responsibilities li {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.5;
}

/* ========== Team Members Section ========== */
.team-members-section {
    margin-bottom: 24px;
}

.team-members-section h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 16px 0;
}

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

.member-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid #e9ecef;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.member-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.member-card:hover::before {
    opacity: 1;
}

.member-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
    border-color: #667eea;
}

.member-header {
    padding: 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    gap: 12px;
}

.member-avatar {
    font-size: 32px;
    flex-shrink: 0;
}

.member-info {
    flex: 1;
}

.member-info h5 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.member-role {
    margin: 0 0 2px 0;
    font-size: 14px;
    color: #666;
}

.member-dept {
    margin: 0;
    font-size: 12px;
    color: #999;
}

.member-badges {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.member-badges .badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.member-badges .badge.ai-recommended {
    background: #667eea;
    color: white;
}

.member-badges .badge.match-score {
    background: #e9ecef;
    color: #333;
}

.member-body {
    padding: 16px;
}

.member-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.skill-tag {
    padding: 4px 12px;
    background: #e7f3ff;
    color: #0066cc;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.member-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-stars {
    font-size: 14px;
}

.rating-value {
    font-size: 16px;
    font-weight: 700;
    color: #667eea;
}

/* ========== Kickoff Card ========== */
.kickoff-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    padding: 24px;
}

.kickoff-header {
    text-align: center;
    margin-bottom: 24px;
}

.kickoff-header h4 {
    font-size: 24px;
    font-weight: 600;
    color: #28a745;
    margin: 0 0 8px 0;
}

.kickoff-header p {
    font-size: 15px;
    color: #666;
    margin: 0;
}

.team-status h5 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.status-avatar {
    font-size: 28px;
}

.status-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.confirmed {
    background: #28a745;
    color: white;
}

.next-steps h5 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
}

.next-steps ul {
    margin: 0;
    padding-left: 20px;
}

.next-steps li {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.5;
}

/* ========== Progress Overview Card ========== */
.progress-overview-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    overflow: hidden;
}

.overview-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.overview-header h4 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
}

.week-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.week-selector button {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.week-selector button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.week-selector button.active {
    background: white;
    color: #667eea;
    border-color: white;
}

.overview-body {
    padding: 24px;
}

.progress-bar-container {
    margin-bottom: 16px;
}

.progress-bar {
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    transition: width 0.6s ease;
}

.progress-text {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

.week-info {
    display: flex;
    gap: 24px;
    margin-top: 16px;
}

.week-info .info-item {
    display: flex;
    gap: 8px;
}

.week-info .label {
    font-weight: 600;
    color: #666;
}

.week-info .value {
    color: #333;
}

.week-info .status-badge {
    padding: 4px 12px;
    background: #e7f3ff;
    color: #0066cc;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
}

/* ========== Communications Section ========== */
.communications-section {
    margin-bottom: 24px;
}

.communications-section h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 16px 0;
}

.communications-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comm-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    padding: 16px;
    border-left: 4px solid #e9ecef;
    transition: all 0.3s ease;
}

.comm-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.comm-item.milestone {
    border-left-color: #28a745;
    background: #f0f9f4;
}

.comm-item.code {
    border-left-color: #667eea;
}

.comm-item.review {
    border-left-color: #ffc107;
}

.comm-item.meeting {
    border-left-color: #dc3545;
}

.comm-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.comm-avatar {
    font-size: 28px;
}

.comm-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.comm-member {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.comm-time {
    font-size: 12px;
    color: #999;
}

.comm-type-icon {
    font-size: 20px;
}

.comm-body {
    padding-left: 36px;
}

.comm-message {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    margin: 0 0 8px 0;
}

.comm-attachment {
    display: inline-block;
    padding: 4px 12px;
    background: #e7f3ff;
    color: #0066cc;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* ========== Completion Card ========== */
.completion-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    overflow: hidden;
}

.completion-header {
    text-align: center;
    padding: 32px 24px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.completion-header h4 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
}

.completion-time {
    font-size: 15px;
    opacity: 0.9;
    margin: 0;
}

.completion-body {
    padding: 24px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.result-item {
    text-align: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.result-item.success {
    background: #d4edda;
}

.result-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.result-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.result-value.large {
    font-size: 32px;
    color: #28a745;
}

.feedback-section {
    margin-bottom: 24px;
    padding: 16px;
    background: #fff3cd;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.feedback-section h5 {
    font-size: 16px;
    font-weight: 600;
    color: #856404;
    margin: 0 0 8px 0;
}

.feedback-text {
    font-size: 15px;
    color: #856404;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

.achievements-section h5 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
}

.achievements-list {
    margin: 0;
    padding-left: 20px;
}

.achievements-list li {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.5;
}

/* ========== Responsive Design ========== */
@media (max-width: 768px) {
    .requirement-details {
        grid-template-columns: 1fr;
    }
    
    .team-roles {
        grid-template-columns: 1fr;
    }
    
    .members-grid {
        grid-template-columns: 1fr;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .week-selector {
        justify-content: center;
    }
    
    .plan-summary {
        flex-direction: column;
        gap: 12px;
    }
}
