/* 첨부파일/증빙자료 스타일 */

/* 첨부파일 섹션 */
.artifacts-section {
    margin-top: 16px;
}

.artifacts-section .card-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    margin: 0;
}

/* 첨부파일 그리드 */
.artifacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.artifact-item {
    cursor: pointer;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--gray-50);
    transition: transform 0.2s;
}

.artifact-item:active {
    transform: scale(0.95);
}

/* 썸네일 */
.artifact-thumbnail {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
}

.artifact-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artifact-icon {
    font-size: 48px;
    color: var(--gray-400);
}

/* 날짜 오버레이 (좌상단, 필수) */
.artifact-date-overlay {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    z-index: 10;
}

/* 파일 정보 */
.artifact-info {
    padding: 8px;
}

.artifact-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.artifact-meta {
    font-size: 11px;
    color: var(--gray-600);
}

/* 빈 상태 */
.empty-artifacts {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--gray-500);
}

.empty-artifacts i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-artifacts p {
    font-size: 14px;
    margin-bottom: 4px;
}

/* 업로드 모달 */
.upload-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.upload-modal .modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.upload-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.upload-modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.btn-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray-500);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    color: var(--gray-700);
}

.upload-modal .modal-body {
    padding: 20px;
}

/* 업로드 옵션 버튼 */
.upload-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.upload-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-option-btn:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.upload-option-btn i {
    font-size: 32px;
    color: var(--primary);
}

.upload-option-btn span {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-900);
}

/* 업로드 진행률 */
.upload-progress {
    margin-top: 20px;
    text-align: center;
}

.upload-progress.hidden {
    display: none;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

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

.upload-progress p {
    font-size: 14px;
    color: var(--gray-600);
}

/* 파일 상세 모달 */
.artifact-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.artifact-modal .modal-content {
    max-width: 600px;
}

/* 메타정보 (상단 고정) */
.artifact-meta-info {
    background: var(--gray-50);
    padding: 16px;
    border-radius: var(--border-radius);
    margin-bottom: 16px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

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

.meta-label {
    color: var(--gray-600);
    font-weight: 500;
}

.meta-value {
    color: var(--gray-900);
}

/* 미리보기 */
.artifact-preview {
    width: 100%;
    border-radius: var(--border-radius);
}

.artifact-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    color: var(--gray-500);
}

.artifact-preview-placeholder i {
    font-size: 64px;
    margin-bottom: 16px;
}

.artifact-modal .modal-footer {
    display: flex;
    gap: 8px;
    padding: 20px;
    border-top: 1px solid var(--gray-200);
}

.artifact-modal .modal-footer .btn {
    flex: 1;
}

/* 회원 상세 추가 스타일 */
.member-detail-page .page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.btn-back {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray-700);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-content {
    flex: 1;
}

.member-summary {
    margin-bottom: 16px;
}

.member-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.member-header .member-name {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.member-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

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

.info-item .label {
    font-size: 12px;
    color: var(--gray-600);
}

.info-item .value {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-900);
}

.member-notes {
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.member-notes strong {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--gray-700);
}

.member-notes p {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.6;
}

/* 타임라인 */
.timeline-section {
    margin-top: 16px;
}

.timeline {
    position: relative;
}

.timeline-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    margin-top: 4px;
    position: relative;
}

.timeline-item:not(:last-child) .timeline-marker::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: calc(100% + 24px);
    background: var(--gray-200);
}

.timeline-content {
    flex: 1;
    padding-bottom: 8px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.timeline-type {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

.timeline-date {
    font-size: 12px;
    color: var(--gray-500);
}

.timeline-body {
    font-size: 14px;
    color: var(--gray-700);
}

/* Artifact Detail (Bottom Sheet 내부) */
.artifact-detail-content {
    padding: 0;
}

.artifact-meta-section,
.artifact-preview-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.artifact-preview-section:last-child {
    border-bottom: none;
}

.artifact-detail-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--gray-800);
}

.meta-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--gray-50);
    border-radius: var(--border-radius);
}

.meta-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
}

.meta-label i {
    font-size: 14px;
    width: 16px;
    text-align: center;
    color: var(--primary);
}

.meta-value {
    font-size: 14px;
    color: var(--gray-900);
    text-align: right;
}

/* 파일 미리보기 */
.artifact-preview-image img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.artifact-preview-pdf {
    width: 100%;
    height: 500px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.artifact-preview-pdf iframe {
    width: 100%;
    height: 100%;
}

.artifact-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    color: var(--gray-500);
    text-align: center;
}

.artifact-preview-placeholder i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.artifact-preview-placeholder p {
    margin: 4px 0;
}

@media (max-width: 480px) {
    .member-info-grid {
        grid-template-columns: 1fr;
    }
    
    .artifacts-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    /* Artifact Detail 모바일 */
    .artifact-preview-pdf {
        height: 400px;
    }
    
    .meta-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .meta-value {
        text-align: left;
    }
}
