/* 项目详情页面样式 - Mira Villa */

/* ===== 项目详情容器 ===== */
#project-detail-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f8fafc;
}

/* ===== 项目头部 ===== */
.project-detail-header {
    background: white;
    padding: 1.25rem 2rem;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-back {
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-back:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.btn-back span:first-child {
    font-size: 1.25rem;
}

.project-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e3a8a;
    margin: 0;
    line-height: 1.3;
}

.project-location {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0.25rem 0 0 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.project-progress-mini {
    font-size: 0.875rem;
    color: #4b5563;
}

.project-progress-mini strong {
    font-size: 1.125rem;
    color: #1e3a8a;
    font-weight: 700;
}

/* ===== 项目导航栏 ===== */
.project-nav {
    background: white;
    padding: 0 2rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.project-nav::-webkit-scrollbar {
    height: 3px;
}

.project-nav::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.project-nav::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.nav-item {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.nav-item:hover {
    color: #1e3a8a;
    background: #f9fafb;
}

.nav-item.active {
    color: #0891b2;
    border-bottom-color: #0891b2;
    background: #f0fdfa;
}

.nav-icon {
    font-size: 1.125rem;
}

.nav-label {
    font-size: 0.875rem;
}

/* ===== 子视图容器 ===== */
.project-subview-container {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* ===== 项目概览 ===== */
.project-overview {
    max-width: 1200px;
    margin: 0 auto;
}

.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.overview-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.overview-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.card-content {
    flex: 1;
}

.card-content h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    margin: 0 0 0.5rem 0;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e3a8a;
    margin: 0;
}

/* ===== 概览详情 ===== */
.overview-details {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.detail-section {
    padding: 1.5rem 2rem;
}

.detail-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1.5rem 0;
}

.info-table {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
}

.info-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    text-align: right;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-planning {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.status-completed {
    background: #e0e7ff;
    color: #4338ca;
}

.status-badge.status-on-hold {
    background: #fef3c7;
    color: #92400e;
}

/* ===== 项目设置 ===== */
.project-settings {
    max-width: 800px;
    margin: 0 auto;
}

.project-settings h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 2rem 0;
}

.settings-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.settings-section .btn {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .overview-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .project-detail-header {
        padding: 1rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .header-left {
        width: 100%;
    }

    .header-right {
        width: 100%;
        justify-content: flex-end;
    }

    .project-title h2 {
        font-size: 1.25rem;
    }

    .project-nav {
        padding: 0 1rem;
    }

    .nav-item {
        padding: 0.875rem 1rem;
    }

    .project-subview-container {
        padding: 1.5rem 1rem;
    }

    .overview-cards {
        grid-template-columns: 1fr;
    }

    .detail-section {
        padding: 1.25rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .project-detail-header {
        padding: 0.875rem 1rem;
    }

    .btn-back {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }

    .project-title h2 {
        font-size: 1.125rem;
    }

    .nav-item {
        flex-direction: column;
        padding: 0.75rem;
        gap: 0.25rem;
    }

    .nav-icon {
        font-size: 1.5rem;
    }

    .nav-label {
        font-size: 0.6875rem;
    }

    .overview-card {
        flex-direction: column;
        text-align: center;
    }

    .card-value {
        font-size: 1.75rem;
    }
}

/* ===== 加载和过渡动画 ===== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.project-subview-container > * {
    animation: slideIn 0.3s ease;
}

.overview-cards .overview-card:nth-child(1) { animation-delay: 0s; }
.overview-cards .overview-card:nth-child(2) { animation-delay: 0.05s; }
.overview-cards .overview-card:nth-child(3) { animation-delay: 0.1s; }
.overview-cards .overview-card:nth-child(4) { animation-delay: 0.15s; }
