/* ============================================
   사이드바 네비게이션 스타일
   ============================================ */

/* 사이드바 컨테이너 */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: #ffffff;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar.collapsed {
    transform: translateX(-280px);
}

/* 사이드바 헤더 */
.sidebar-header {
    padding: 18px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h1 {
    font-size: 16px;
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-header h1 i {
    font-size: 18px;
}

/* 사이드바 메뉴 */
.sidebar-menu {
    padding: 15px 0;
}

.menu-section {
    margin-bottom: 15px;
}

.menu-section-title {
    padding: 6px 20px;
    font-size: 10px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

/* 메뉴 아이템 */
.menu-item {
    display: flex;
    align-items: center;
    padding: 8px 20px;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
    font-size: 13px;
    font-weight: 500;
}

.menu-item i {
    width: 20px;
    font-size: 14px;
    margin-right: 10px;
}

.menu-item:hover {
    background: #f3f4f6;
    color: #667eea;
    border-left-color: #667eea;
}

.menu-item.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, rgba(102, 126, 234, 0.05) 100%);
    color: #667eea;
    border-left-color: #667eea;
    font-weight: 600;
}

/* 서브메뉴 */
.submenu {
    display: none;
    padding-left: 15px;
    margin-top: 2px;
    margin-bottom: 2px;
}

.submenu.show {
    display: block;
}

.submenu-item {
    display: flex;
    align-items: center;
    padding: 7px 20px;
    padding-left: 50px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 12px;
}

.submenu-item i {
    width: 18px;
    font-size: 11px;
    margin-right: 8px;
}

.submenu-item:hover {
    background: #f9fafb;
    color: #667eea;
}

.submenu-item.active {
    color: #667eea;
    font-weight: 600;
}

/* 펼침/접힘 아이콘 */
.menu-item.has-submenu::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.menu-item.has-submenu.open::after {
    transform: rotate(-180deg);
}

/* 메인 컨텐츠 영역 */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    background: #f9fafb;
    transition: margin-left 0.3s ease;
}

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

/* 상단 헤더 (메인 컨텐츠 내부) */
.main-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sidebar-toggle:hover {
    background: #f3f4f6;
    color: #667eea;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 10px;
}

.header-user-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.header-user-dept {
    font-size: 12px;
    color: #6b7280;
}

/* 컨텐츠 컨테이너 */
.content-container {
    padding: 15px 30px 30px 30px; /* 상단만 15px로 축소 */
}

/* 배지 (알림 카운트 등) */
.menu-badge {
    margin-left: auto;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

/* 다크모드 토글 */
.dark-mode-toggle {
    background: #f3f4f6;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
}

.dark-mode-toggle:hover {
    background: #e5e7eb;
    color: #667eea;
}

/* 반응형 (모바일) */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-280px);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    .header-user-info {
        display: none;
    }
}

/* 스크롤바 스타일 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ============================================
   뷰 컨텐츠 스타일
   ============================================ */

.view-content {
    display: none;
}

.view-content.active {
    display: block;
}

/* 뷰 컨텐츠의 첫 번째 제목 상단 여백 제거 */
.view-content > h2:first-child {
    margin-top: 0;
}

/* 통계 카드 추가 색상 */
.card-icon.purple {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
}

.card-icon.indigo {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.card-icon.teal {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.card-icon.amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.card-icon.red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* ============================================
   기존 요소 숨기기
   ============================================ */

/* 기존 헤더 숨기기 */
#dashboardPage > .header {
    display: none !important;
}

/* 기존 탭 메뉴 숨기기 */
#dashboardPage > .tab-menu {
    display: none !important;
}

/* 기존 컨테이너 스타일 조정 */
#dashboardPage > .container {
    margin-left: 0 !important;
    padding: 0 !important;
    max-width: none !important;
}


