/* =======================================
   PROJECT DETAIL PAGE
   ======================================= */
.project-page {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

/* ---- Project Header ---- */
.project-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.project-header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.project-header__left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    min-width: 0;
}

.project-header__back {
    flex-shrink: 0;
}

.project-header__info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    min-width: 0;
}

.project-header__title {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-header__meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.project-header__meta-divider {
    width: 4px;
    height: 4px;
    border-radius: var(--radius-full);
    background: var(--text-tertiary);
}

.project-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

/* ---- Stages Pipeline ---- */
.stages-pipeline {
    display: flex;
    align-items: center;
    gap: 0;
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

.stages-pipeline__stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.stages-pipeline__dot {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-subtle);
    color: var(--text-tertiary);
    transition: all var(--transition-base);
    position: relative;
}

.stages-pipeline__dot svg {
    width: 16px;
    height: 16px;
}

/* Stage States */
.stages-pipeline__stage--completed .stages-pipeline__dot {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: white;
}

.stages-pipeline__stage--active .stages-pipeline__dot {
    border-color: var(--brand-purple);
    background: rgba(139, 92, 246, 0.15);
    color: var(--brand-purple);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.stages-pipeline__stage--pre-production.stages-pipeline__stage--active .stages-pipeline__dot {
    border-color: var(--stage-pre-production);
    background: rgba(6, 182, 212, 0.15);
    color: var(--stage-pre-production);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
}

.stages-pipeline__stage--production.stages-pipeline__stage--active .stages-pipeline__dot {
    border-color: var(--stage-production);
    background: rgba(139, 92, 246, 0.15);
    color: var(--stage-production);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.stages-pipeline__stage--post-production.stages-pipeline__stage--active .stages-pipeline__dot {
    border-color: var(--stage-post-production);
    background: rgba(217, 70, 239, 0.15);
    color: var(--stage-post-production);
    box-shadow: 0 0 0 4px rgba(217, 70, 239, 0.1);
}

.stages-pipeline__stage--review.stages-pipeline__stage--active .stages-pipeline__dot {
    border-color: var(--stage-review);
    background: rgba(245, 158, 11, 0.15);
    color: var(--stage-review);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.stages-pipeline__stage--delivery.stages-pipeline__stage--active .stages-pipeline__dot {
    border-color: var(--stage-delivery);
    background: rgba(16, 185, 129, 0.15);
    color: var(--stage-delivery);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.stages-pipeline__label {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-tertiary);
    white-space: nowrap;
    transition: color var(--transition-fast);
}

.stages-pipeline__stage--active .stages-pipeline__label {
    color: var(--text-primary);
    font-weight: 600;
}

.stages-pipeline__stage--completed .stages-pipeline__label {
    color: var(--accent-green);
}

/* Connector Line */
.stages-pipeline__connector {
    flex: 1;
    height: 2px;
    min-width: 40px;
    background: var(--border-subtle);
    position: relative;
    margin: 0 -2px;
    margin-bottom: var(--space-lg);
}

.stages-pipeline__connector--completed {
    background: var(--accent-green);
}

.stages-pipeline__connector--active {
    background: linear-gradient(90deg, var(--accent-green), var(--border-subtle));
}

/* ---- Project Tabs ---- */
.project-tabs {
    display: flex;
    gap: var(--space-xs);
    border-bottom: 1px solid var(--border-subtle);
}

.project-tabs .tabs__item {
    padding: var(--space-sm) var(--space-md);
}

/* ---- Project Overview ---- */
.project-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.project-overview__card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.project-overview__card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-overview__card-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.project-overview__card-icon {
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
}

.project-overview__detail {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.project-overview__detail-label {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-overview__detail-value {
    font-size: var(--text-sm);
    color: var(--text-primary);
}

/* ---- File Manager ---- */
.file-manager {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.file-manager__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.file-manager__title {
    font-size: var(--text-lg);
    font-weight: 600;
}

.file-manager__actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    background: transparent;
    min-height: 160px;
}

.upload-zone:hover {
    border-color: var(--brand-purple);
    background: rgba(139, 92, 246, 0.03);
}

.upload-zone--dragging {
    border-color: var(--brand-cyan);
    background: rgba(6, 182, 212, 0.05);
    border-style: solid;
}

.upload-zone__icon {
    width: 48px;
    height: 48px;
    color: var(--text-tertiary);
    opacity: 0.6;
    transition: all var(--transition-base);
}

.upload-zone:hover .upload-zone__icon {
    color: var(--brand-purple);
    opacity: 1;
}

.upload-zone--dragging .upload-zone__icon {
    color: var(--brand-cyan);
    opacity: 1;
    transform: scale(1.1);
}

.upload-zone__text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.upload-zone__text strong {
    color: var(--brand-purple);
    font-weight: 600;
}

.upload-zone__hint {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

/* File Grid */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
}

/* File Card */
.file-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
}

.file-card:hover {
    border-color: var(--border-default);
    box-shadow: var(--shadow-md);
}

.file-card__icon {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    position: relative;
}

.file-card__icon svg {
    width: 40px;
    height: 40px;
    opacity: 0.6;
}

/* File type color coding */
.file-card__icon--video {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.05));
}

.file-card__icon--video svg {
    color: var(--brand-purple);
}

.file-card__icon--audio {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(6, 182, 212, 0.05));
}

.file-card__icon--audio svg {
    color: var(--brand-cyan);
}

.file-card__icon--image {
    background: linear-gradient(135deg, rgba(217, 70, 239, 0.1), rgba(217, 70, 239, 0.05));
}

.file-card__icon--image svg {
    color: var(--brand-magenta);
}

.file-card__icon--document {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
}

.file-card__icon--document svg {
    color: #F59E0B;
}

.file-card__icon--other {
    background: linear-gradient(135deg, rgba(107, 103, 128, 0.1), rgba(107, 103, 128, 0.05));
}

.file-card__icon--other svg {
    color: var(--text-tertiary);
}

.file-card__icon-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-card__type-badge {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    color: #fff;
}

.file-card__info {
    padding: var(--space-sm) var(--space-md);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.file-card__name {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-card__details {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.file-card__size {
    font-family: var(--font-mono);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .project-overview {
        grid-template-columns: 1fr;
    }

    .stages-pipeline {
        padding: var(--space-md);
    }
}

@media (max-width: 768px) {
    .project-header__top {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-header__actions {
        width: 100%;
        justify-content: flex-end;
    }

    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 640px) {
    .stages-pipeline {
        gap: 0;
        justify-content: flex-start;
        padding: var(--space-md) var(--space-sm);
    }

    .stages-pipeline__connector {
        min-width: 24px;
    }
}
