/* 문서 목록 페이지 스타일 */
.document-list-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 페이지 헤더 */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* 문서 상세 페이지 */
.document-detail-page {
    /* 제거: max-width 제한 제거하여 메인 콘텐츠 영역과 일치 */
    padding: 0;
}

/* 에디터 */
.editor-page {
    max-width: 1000px;
    margin: 0 auto;
}

/* 인증 페이지 */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 2rem 0;
}

/* 문서 목록 페이지 스타일 */
.document-list-page {
    /* 문서 상세 페이지와 동일한 레이아웃 유지 */
    padding: 0;
}

/* 심플하고 모던한 문서 목록 페이지 스타일 */
/* CSS 우선순위를 높이기 위해 일부 중요 스타일에 !important 적용 */

/* 기존 스타일 재정의 */
.main-content .content .document-list-page {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 1.5rem !important;
    background: #fff !important;
    color: #333 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

/* 페이지 레이아웃 */
.document-list-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    background: #fff;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* 헤더 영역 */
.document-list-page .page-header {
    margin-bottom: 1.5rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    padding-bottom: 1rem !important;
    border-bottom: 1px solid #e9ecef !important;
    background: transparent !important;
}

.document-list-page .page-title {
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    color: #2c3e50 !important;
    text-shadow: none !important;
    flex: 1 !important;
}

.document-list-page .category-title {
    font-weight: 400 !important;
    color: #667eea !important;
    font-size: 1rem !important;
    margin-left: 0.75rem !important;
    display: inline-block !important;
}

.document-list-page .stat-text {
    color: #6c757d !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
}

/* 브레드크럼 */
.document-list-page .breadcrumb {
    margin-bottom: 1rem !important;
    padding: 0.6rem 0.8rem !important;
    background: #f8f9fa !important;
    border-radius: 4px !important;
    font-size: 0.85rem !important;
    color: #6c757d !important;
}

.document-list-page .breadcrumb a {
    color: #667eea !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.document-list-page .breadcrumb a:hover {
    color: #764ba2 !important;
}

.document-list-page .breadcrumb strong {
    color: #333 !important;
    font-weight: 500 !important;
}

/* 필터 영역 */
.document-list-page .document-filters {
    background: #f8f9fa !important;
    border-radius: 6px !important;
    padding: 1rem !important;
    margin-bottom: 1.5rem !important;
    display: flex !important;
    gap: 0.75rem !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
}

.document-list-page .filter-select {
    padding: 0.6rem 0.8rem !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 4px !important;
    font-size: 0.85rem !important;
    background: white !important;
    transition: border-color 0.2s ease !important;
    min-width: 140px !important;
    flex-shrink: 0 !important;
}

.document-list-page .filter-select:focus {
    outline: none !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2) !important;
}

.document-list-page .btn {
    padding: 0.6rem 1rem !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    flex-shrink: 0 !important;
}

.document-list-page .btn-primary {
    background: #667eea !important;
    color: white !important;
}

.document-list-page .btn-primary:hover {
    background: #5a6fd8 !important;
}

.document-list-page .btn-secondary {
    background: #6c757d !important;
    color: white !important;
}

.document-list-page .btn-secondary:hover {
    background: #5a6268 !important;
}

/* 문서 목록 */
.document-list-page .document-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
    margin-bottom: 1.5rem !important;
}

.document-list-page .document-item {
    background: white !important;
    border: 1px solid #e9ecef !important;
    border-radius: 4px !important;
    padding: 0.9rem !important;
    transition: all 0.3s ease !important;
    overflow: hidden !important;
}

.document-list-page .document-item:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    border-color: #dee2e6 !important;
}

.document-list-page .document-title {
    margin: 0 0 0.4rem 0 !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.document-list-page .document-title a {
    color: #2c3e50 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    flex: 1 !important;
}

.document-list-page .document-title a:hover {
    color: #667eea !important;
}

.document-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.document-list-page .badge {
    padding: 0.15rem 0.4rem !important;
    border-radius: 8px !important;
    font-size: 0.65rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.2px !important;
}

.document-list-page .badge-new {
    background: #e3f2fd !important;
    color: #1976d2 !important;
}

.document-list-page .badge-hot {
    background: #ffebee !important;
    color: #d32f2f !important;
}

.document-list-page .document-meta {
    font-size: 0.8rem !important;
    color: #6c757d !important;
    margin-bottom: 0.4rem !important;
    font-weight: 500 !important;
}

.document-list-page .document-category {
    background: #f1f3f4 !important;
    padding: 0.3rem 0.6rem !important;
    border-radius: 3px !important;
    font-size: 0.75rem !important;
    display: inline-block !important;
    margin-bottom: 0.4rem !important;
}

.document-list-page .document-category .category-link {
    color: #28a745 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    padding: 1px 3px !important;
    border-radius: 2px !important;
}

.document-list-page .document-category .category-link:hover {
    background-color: #28a745 !important;
    color: white !important;
    text-decoration: none !important;
}

.document-list-page .category-item {
    font-weight: 500 !important;
    color: #495057 !important;
}

.document-list-page .category-separator {
    color: #6c757d !important;
    margin: 0 0.25rem !important;
    font-weight: normal !important;
}

.document-list-page .document-excerpt {
    color: #495057 !important;
    line-height: 1.5 !important;
    font-size: 0.85rem !important;
    margin: 0 0 0.5rem 0 !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

.document-list-page .document-tags {
    display: flex !important;
    gap: 0.3rem !important;
    flex-wrap: wrap !important;
    margin-top: auto !important;
}

.document-list-page .tag {
    background: #e9ecef !important;
    color: #495057 !important;
    padding: 0.2rem 0.5rem !important;
    border-radius: 10px !important;
    font-size: 0.7rem !important;
    font-weight: 500 !important;
    transition: background 0.2s ease !important;
}

.document-list-page .tag:hover {
    background: #dee2e6 !important;
}

.document-list-page .tag-more {
    background: #6c757d !important;
    color: white !important;
    padding: 0.2rem 0.5rem !important;
    border-radius: 10px !important;
    font-size: 0.7rem !important;
    font-weight: 500 !important;
}

/* 빈 문서 상태 */
.document-list-page .no-documents {
    text-align: center !important;
    padding: 3rem 2rem !important;
    color: #6c757d !important;
}

.document-list-page .no-documents h3 {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    margin-bottom: 1rem !important;
    color: #495057 !important;
}

.document-list-page .no-documents p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    margin-bottom: 2rem !important;
}

.document-list-page .no-documents .btn {
    margin: 0 0.5rem !important;
}

/* 페이지네이션 */
.document-list-page .pagination {
    display: flex !important;
    gap: 0.5rem !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1.5rem 0 !important;
    border-top: 1px solid #e9ecef !important;
    margin-top: 1rem !important;
}

.document-list-page .pagination .btn {
    padding: 0.5rem 0.75rem !important;
    border: 1px solid #dee2e6 !important;
    background: white !important;
    color: #495057 !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    font-size: 0.9rem !important;
    transition: all 0.2s ease !important;
}

.document-list-page .pagination .btn:hover {
    background: #f8f9fa !important;
    border-color: #adb5bd !important;
}

.document-list-page .pagination .btn.active {
    background: #667eea !important;
    color: white !important;
    border-color: #667eea !important;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .document-list-page {
        padding: 1rem;
    }
    
    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .filter-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select {
        min-width: auto;
    }
    
    .document-card {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .document-header {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .document-title {
        font-size: 1rem;
    }
    
    .document-excerpt {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .no-documents-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .document-list {
        gap: 0.5rem;
    }
}

/* 유틸리티 클래스 */
.text-center { text-align: center; }
.text-muted { color: #6c757d; }
.text-primary { color: #667eea; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }


/* 푸터 */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    margin-top: 4rem;
    width: 100%;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-info {
    flex: 1;
}

.footer-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

.footer-copyright {
    text-align: right;
}

.footer-copyright p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: 0;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .footer-container {
        padding: 0 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem 0;
    }
    
    .footer-info {
        text-align: center;
    }
    
    .footer-copyright {
        text-align: center;
    }
    
    .footer-title {
        font-size: 1.3rem;
    }
    
    .footer-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .footer-container {
        padding: 0 0.5rem;
    }
    
    .footer-content {
        padding: 1rem 0;
    }
    
    .footer-title {
        font-size: 1.2rem;
    }
    
    .footer-description {
        font-size: 0.85rem;
    }
}