:root {
    --sidebar-width: 280px;
    --header-height: 60px;
}

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background-color: #212529;
    padding-top: var(--header-height);
    transition: all 0.3s ease;
    z-index: 1100;
}

.main-content {
    padding-top: calc(var(--header-height) + 20px);
    margin-left: var(--sidebar-width);
    transition: all 0.3s ease;
    min-height: 100vh;
}

.navbar {
    position: fixed;
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    z-index: 1000;
    transition: all 0.3s ease;
    top: 0;
    background-color: #1a1f24 !important;
    height: var(--header-height);
}

.nav-link {
    color: rgba(255,255,255,.8);
    padding: 0.8rem 1.5rem;
}

.nav-link:hover {
    color: #fff;
    background-color: rgba(255,255,255,.1);
}

.nav-link.active {
    color: #fff;
    background-color: rgba(255,255,255,.1);
}

.sidebar-header {
    padding: 1rem 1.5rem;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.1);
    display: flex;
    align-items: center;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.sidebar.collapsed {
    margin-left: calc(-1 * var(--sidebar-width));
}

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

.navbar.expanded {
    width: 100%;
    margin-left: 0;
}

/* 오버레이 스타일 추가 */
.sidebar-overlay {
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1050;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease;
}

/* 모바일에서 사이드바가 보일 때 오버레이 표시 */
@media (max-width: 768px) {
    .sidebar-overlay.show {
        display: block;
    }
    
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    
    .sidebar.show {
        margin-left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .navbar {
        width: 100%;
        margin-left: 0;
    }
}

/* Footer 스타일 */
.footer {
    background-color: #1a1f24;
    position: relative;
    margin-top: 3rem;
}

.footer-links li a {
    transition: color 0.3s ease;
    position: relative;
    display: inline-block;
}

.footer-links li a:hover {
    color: #fff !important;
    text-decoration: none;
}

.footer .social-links .btn-dark {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    padding: 0;
    line-height: 36px;
    text-align: center;
    transition: all 0.3s ease;
}

.footer .social-links .btn-dark:hover {
    background-color: var(--bs-primary);
    color: #fff;
}

.footer .input-group .form-control {
    padding: 0.75rem 1.2rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.footer .input-group .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.footer .input-group .form-control:focus {
    box-shadow: none;
    border-color: var(--bs-primary);
}

.footer .input-group .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

.footer-bottom-links a {
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: #fff !important;
}

@media (max-width: 768px) {
    .footer {
        text-align: center;
    }
    
    .footer .social-links {
        justify-content: center;
        margin-bottom: 2rem;
    }
    
    .footer-links {
        margin-bottom: 2rem;
    }
    
    .footer .input-group {
        max-width: 80%;
        margin: 0 auto;
    }
}

/* 프로필 이미지 wrapper 스타일 수정 */
.profile-img-wrapper {
    width: 32px;
    height: 32px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 네비게이션 바 아이템 스타일 수정 */
.navbar .nav-link {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.85) !important;
    height: 100%;
}

.navbar .dropdown-toggle::after {
    margin-left: 0.5rem;
}

/* 알림 아이콘 스타일 */
.navbar .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    transform: none;
    background-color: #dc3545 !important;
}

.navbar .dropdown:first-child .nav-link {
    position: relative;
    padding-right: 0.5rem;
}

/* 토글러 아이콘 색상 변경 */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* 드롭다운 메뉴 스타일 수정 */
.navbar .dropdown-menu {
    background-color: #242a30;
    border-color: rgba(255, 255, 255, 0.1);
}

.navbar .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
}

.navbar .dropdown-item:hover {
    background-color: #2d353d;
    color: #ffffff;
}

.navbar .dropdown-divider {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* 모바일 대응 스타일 */
@media (max-width: 768px) {
    .navbar {
        width: 100%;
        margin-left: 0;
        padding: 0.5rem 1rem;
    }

    .container-fluid {
        padding: 0;
    }

    /* 관리자 텍스트 숨김 (선택적) */
    .profile-text {
        display: none;
    }
}

/* 햄버거 버튼 항상 표시 */
@media (min-width: 992px) {
    .navbar-expand-lg .navbar-toggler {
        display: block !important;
    }
    
    /* 기존 부트스트랩 확장 스타일 제거 */
    .navbar-expand-lg {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
}

/* 드롭다운 메뉴 위치 조정 */
.dropdown-menu {
    margin-top: 0.5rem;
}

/* 네비게이션 링크 호버 효과 */
.navbar .nav-link:hover {
    color: #ffffff !important;
}

/* 숫자 원형 스타일 */
.number-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

/* 카드 호버 효과 */
.card {
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

/* 특징 아이콘 */
.feature-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 부드러운 전환 효과 */
.sidebar,
.main-content,
.navbar,
.sidebar-overlay {
    transition: all 0.3s ease-in-out;
}