:root {
    --primary-color: #1e40af;
    --secondary-color: #475569;
    --accent-color: #0ea5e9;
    --success-color: #059669;
    --warning-color: #d97706;
    --background-color: #f8fafc;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.08);
    --hover-shadow: 0 8px 25px rgba(0,0,0,0.12);
    --border-radius: 8px;
    --border-color: #e2e8f0;
}

body {
    background-color: var(--background-color);
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1e293b;
    line-height: 1.6;
    padding-top: 0;
    padding-bottom: 0;
}

/* 네비게이션 바 스타일 */
.navbar {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--primary-color) !important;
    letter-spacing: -0.025em;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0.6rem !important;
    margin: 0 0.15rem;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    color: var(--secondary-color) !important;
    white-space: nowrap;
}

.nav-link:hover {
    background: #f1f5f9;
    color: var(--primary-color) !important;
}

/* 네비게이션 검색 폼 스타일 */
.navbar .form-control {
    border-radius: 20px 0 0 20px;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: 200px;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

.navbar .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.1);
    background-color: #ffffff;
}

.navbar .btn-outline-primary {
    border-radius: 0 20px 20px 0;
    border: 1px solid #e2e8f0;
    border-left: none;
    padding: 0.5rem 0.8rem;
    background-color: #f8fafc;
    color: var(--primary-color);
    transition: all 0.2s ease;
}

.navbar .btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.navbar .input-group {
    width: auto;
}

/* 모바일 반응형 */
@media (max-width: 991.98px) {
    .navbar .form-control {
        width: 100%;
        margin-top: 0.5rem;
        border-radius: 20px;
        border-right: 1px solid #e2e8f0;
    }
    
    .navbar .btn-outline-primary {
        border-radius: 20px;
        border: 1px solid #e2e8f0;
        margin-top: 0.5rem;
        width: 100%;
    }
    
    .navbar .input-group {
        flex-direction: column;
        width: 100%;
    }
    
    .navbar form.d-flex {
        width: 100%;
        margin: 0.5rem 0;
    }
}

/* 네비게이션 링크 호버 효과 */
.nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-1px);
}

.nav-link.active {
    color: var(--primary-color) !important;
    background: #eff6ff;
    font-weight: 600;
}

/* 카드 스타일 */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: all 0.2s ease;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hover-shadow);
    border-color: var(--accent-color);
}

.card-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-footer {
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

/* 배지 스타일 */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 0.5rem;
}

/* 버튼 스타일 */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #1e3a8a;
    border-color: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

.btn-info {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-info:hover {
    background-color: #0284c7;
    border-color: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover {
    background-color: #047857;
    border-color: #047857;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.btn-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
}

.btn-warning:hover {
    background-color: #b45309;
    border-color: #b45309;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}

/* 주요 섹션 스타일 */
.jumbotron {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    color: white;
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.jumbotron::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" fill-opacity="0.05"><polygon points="0,0 1000,100 1000,0"/></svg>');
    background-size: cover;
}

/* 리스트 그룹 스타일 */
.list-group-item {
    border-color: var(--border-color);
    transition: all 0.2s ease;
    padding: 0.75rem 1.25rem;
}

.list-group-item:hover {
    background-color: #f1f5f9;
    transform: translateY(-2px);
}

.list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 썸네일 컨테이너 스타일 */
.thumbnail-container {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.thumbnail-container img {
    max-height: 100%;
    max-width: 100%;
}

/* 파일 카드 스타일 */
.file-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.file-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* 푸터 스타일 */
footer {
    margin-top: 3rem;
    padding: 2rem 0;
    background-color: #1e293b;
    color: #e2e8f0;
}

footer p {
    margin-bottom: 0;
}

/* 폼 컨트롤 스타일 */
.form-control {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* 페이지네이션 스타일 */
.pagination {
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.page-link {
    color: var(--primary-color);
    border-color: var(--border-color);
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
}

.page-link:hover {
    background-color: #f1f5f9;
    color: var(--primary-color);
    transform: translateY(-1px);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}


/* 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 드롭다운 스타일 개선 */
.dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    color: var(--secondary-color);
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #f1f5f9;
    color: var(--primary-color);
}

/* 파일 아이콘 스타일 */
.fa-file-word-o::before, .fa-file-word::before { 
    color: #2b579a; 
}
.fa-file-excel-o::before, .fa-file-excel::before { 
    color: #217346; 
}
.fa-file-powerpoint-o::before, .fa-file-powerpoint::before { 
    color: #d24726; 
}
.fa-file-pdf-o::before, .fa-file-pdf::before { 
    color: #f40f02; 
}
.fa-file-image-o::before, .fa-file-image::before { 
    color: #f39c12; 
}
.fa-file-video-o::before, .fa-file-video::before { 
    color: #9b59b6; 
}
.fa-file-audio-o::before, .fa-file-audio::before { 
    color: #e74c3c; 
}
.fa-file-archive-o::before, .fa-file-archive::before { 
    color: #795548; 
}
.fa-file-text-o::before, .fa-file-text::before { 
    color: #34495e; 
}
.fa-file-o::before, .fa-file::before { 
    color: #95a5a6; 
}

/* 대시보드 카드 컨테이너 높이 통일 */
.row .col-lg-8 .dashboard-card,
.row .col-lg-4 .dashboard-card {
    min-height: 400px;
}

/* 카테고리 카드 개선 */
.category-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    min-height: 60px;
}

.category-card:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4f46e5 100%);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    text-decoration: none;
}

.category-card:hover .badge {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

/* 아이템 리스트 개선 */
.item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.item-list-item {
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.item-list-item:last-child {
    border-bottom: none;
}

.item-list-item:hover {
    background-color: #f8fafc;
}

.item-list-link {
    display: block;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
}

.item-list-link:hover {
    color: inherit;
    text-decoration: none;
}

.item-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.item-list-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
    margin-right: 0.5rem;
}

.item-list-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #64748b;
}

.item-list-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.item-list-meta i {
    font-size: 0.75rem;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .jumbotron {
        padding: 2rem !important;
    }
    
    .jumbotron h1 {
        font-size: 2rem !important;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.5rem !important;
    }
    
    .form-control, .form-select {
        font-size: 0.85rem;
    }
    
    .input-group {
        max-width: 180px;
    }
    
    /* 모바일에서 카드 배치 조정 */
    .row .col-lg-8,
    .row .col-lg-4 {
        margin-bottom: 1rem;
    }
    
    .row .col-lg-8 .dashboard-card,
    .row .col-lg-4 .dashboard-card {
        min-height: auto;
    }
    
    .category-card {
        min-height: 50px;
        font-size: 0.9rem;
    }
    
    .item-list-title {
        font-size: 0.9rem;
    }
    
    .item-list-meta {
        font-size: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .item-list-meta span:last-child {
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .dropdown-menu {
        min-width: 10rem;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-content {
        padding-left: 0.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

/* 모바일 디자인 (더 작은 화면) */
@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
        padding: 0.35rem 0.45rem !important;
    }
    
    .input-group {
        max-width: 150px;
    }
    
    .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.8rem;
    }
}

/* 추가 유틸리티 클래스 */
.bg-info-light {
    background-color: rgba(14, 165, 233, 0.1) !important;
}

.bg-primary-light {
    background-color: rgba(30, 64, 175, 0.1) !important;
}

.bg-success-light {
    background-color: rgba(5, 150, 105, 0.1) !important;
}

.bg-warning-light {
    background-color: rgba(217, 119, 6, 0.1) !important;
}

/* 히어로 섹션 현대화 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    padding: 4rem 0;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
    color: white;
    border-radius: 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" opacity="0.1"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="white" stroke-width="1"/></pattern></defs><rect width="1000" height="1000" fill="url(%23grid)" /></svg>');
    opacity: 0.2;
}

.hero-content {
    padding-left: 1rem;
    position: relative;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    max-width: 700px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    position: relative;
    z-index: 1;
}

.btn-hero-primary {
    background-color: white;
    color: var(--primary-color);
}

.btn-hero-primary:hover, .btn-hero-primary:focus {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    color: var(--primary-color);
    text-decoration: none;
}

.btn-hero-outline {
    background-color: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn-hero-outline:hover, .btn-hero-outline:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-3px);
    color: white;
    text-decoration: none;
}

/* 대시보드 카드 */
.dashboard-card {
    border-radius: var(--border-radius);
    background: white;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.dashboard-card:hover {
    box-shadow: var(--hover-shadow);
    transform: translateY(-3px);
}

.dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: #f8fafc;
}

.dashboard-card-header h5 {
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    margin: 0;
}

.dashboard-card-body {
    padding: 1.5rem;
}

.dashboard-card-body.no-padding {
    padding: 0;
}

/* 아이템 목록 */
.item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.item-list-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.item-list-item:last-child {
    border-bottom: none;
}

.item-list-item:hover {
    background-color: #f8fafc;
}

.item-list-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.item-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.item-list-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
    color: var(--primary-color);
}

.item-list-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

.item-list-meta span {
    display: flex;
    align-items: center;
}

.item-list-meta i {
    margin-right: 0.25rem;
}

/* 그리드 카드 */
.grid-card {
    height: 100%;
    border-radius: var(--border-radius);
    background: white;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: all 0.2s ease;
    overflow: hidden;
}

.grid-card:hover {
    box-shadow: var(--hover-shadow);
    transform: translateY(-3px);
}

.grid-card-img {
    height: 180px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
}

.grid-card-img i {
    font-size: 3rem;
    color: #94a3b8;
}

.grid-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-card-body {
    padding: 1.25rem;
}

.grid-card-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.grid-card-footer {
    padding: 1rem 1.25rem;
    background-color: #f8fafc;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 배지 개선 */
.badge-modern {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
}

/* 반응형 그리드 수정 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn-hero {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .dashboard-card-header {
        padding: 1rem;
    }
    
    .dashboard-card-body {
        padding: 1rem;
    }
    
    .item-list-item {
        padding: 0.75rem 1rem;
    }
    
    .grid-card-img {
        height: 160px;
    }
}
