/* ArtBank 스타일시트 */

:root {
    --sidebar-width: 260px;
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light-bg);
    min-height: 100vh;
}

/* 로그인 페이지 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
}

.login-card h1 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-card .subtitle {
    color: #6c757d;
    margin-bottom: 2rem;
}

/* 사이드바 */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--primary-color);
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    margin: 0;
    font-weight: 700;
}

.sidebar .nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    border-left-color: var(--accent-color);
}

.sidebar .nav-link i {
    font-size: 1.1rem;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sidebar-footer .user-info i {
    font-size: 1.5rem;
}

/* 메인 컨텐츠 */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 2rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    color: var(--primary-color);
}

/* 카드 스타일 */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-card .stat-label {
    color: #6c757d;
    font-size: 0.9rem;
}

/* 테이블 스타일 */
.table {
    margin-bottom: 0;
}

.table th {
    background: var(--light-bg);
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

/* 이미지 썸네일 */
.artwork-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    background: #eee;
}

.artwork-thumbnail-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
}

/* 상태 배지 */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
}

.status-on_display { background-color: var(--success-color); }
.status-in_storage { background-color: #6c757d; }
.status-on_loan { background-color: var(--warning-color); }
.status-conservation { background-color: var(--accent-color); }
.status-deaccessioned { background-color: var(--danger-color); }

/* 검색 및 필터 */
.search-filter-bar {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 폼 스타일 */
.form-label {
    font-weight: 500;
    color: var(--primary-color);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* 버튼 스타일 */
.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

/* 페이지네이션 */
.pagination {
    margin-bottom: 0;
}

.page-link {
    color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

/* 이미지 갤러리 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.image-gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #eee;
}

.image-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-gallery-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.image-gallery-item:hover .overlay {
    opacity: 1;
}

/* 공개 컬렉션 페이지 */
.public-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 0;
}

.public-header .navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.collection-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.collection-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.collection-card-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #eee;
}

.collection-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collection-card-body {
    padding: 1.25rem;
}

.collection-card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.collection-card-artist {
    color: #6c757d;
    font-size: 0.9rem;
}

/* 반응형 */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

/* 알림 메시지 */
.alert {
    border: none;
    border-radius: 8px;
}

/* 모달 */
.modal-content {
    border: none;
    border-radius: 12px;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}
