/* ============================================================
   sidemenu.css - 데이터 플랫폼 스타일 사이드 네비게이션
   메인 컬러: 딥 블루, 블랙, 네이비
   포인트 컬러: 에메랄드 그린, 스카이 블루, 딥 브라운
   ============================================================ */

:root {
  /* 메인 컬러 */
  --deep-blue: #001F3F;
  --black: #000000;
  --navy: #003366;
  
  /* 포인트 컬러 */
  --emerald: #50C878;
  --sky-blue: #87CEEB;
  --deep-brown: #654321;
  
  /* 보조 컬러 */
  --light-bg: #f8fafb;
  --white: #ffffff;
  --border-color: #e8ecf1;
  --text-light: #718096;
  --text-dark: #1a202c;
}

/* ============================================================
   사이드바 메인 스타일
   ============================================================ */

.sidebar {
  width: 240px;
  background: linear-gradient(180deg, var(--white) 0%, #fafbfc 100%);
  border-right: 2px solid var(--emerald);
  padding: 16px 12px;
  overflow-y: auto;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

/* 스크롤바 스타일 */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--emerald);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--navy);
}

/* ============================================================
   섹션 스타일
   ============================================================ */

.sidebar-section {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* 섹션 제목 */
.sidebar-title {
  font-size: 12px;
  font-weight: 900;
  color: var(--deep-blue);
  margin: 12px 0 10px 0;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, var(--navy), var(--deep-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-title::before {
  content: "";
  width: 3px;
  height: 16px;
  background: linear-gradient(180deg, var(--emerald), var(--sky-blue));
  border-radius: 2px;
}

/* ============================================================
   사이드바 링크 스타일
   ============================================================ */

.sidebar-link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
}

/* 링크 호버 효과 */
.sidebar-link:hover {
  background: linear-gradient(135deg, rgba(80, 200, 120, 0.1), rgba(135, 206, 235, 0.1));
  color: var(--emerald);
  padding-left: 18px;
  font-weight: 600;
  box-shadow: inset 3px 0 0 0 var(--emerald);
}

/* 활성 상태 (현재 페이지) */
.sidebar-link.active {
  background: linear-gradient(135deg, rgba(80, 200, 120, 0.15), rgba(135, 206, 235, 0.15));
  color: var(--emerald);
  font-weight: 600;
  box-shadow: inset 3px 0 0 0 var(--emerald);
  border-radius: 8px;
}

/* 링크 호버 시 아이콘 같은 효과 */
.sidebar-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--emerald), transparent);
  opacity: 0;
  transition: all 0.3s ease;
  border-radius: 8px;
  z-index: -1;
}

.sidebar-link:hover::before {
  width: 100%;
  opacity: 0.05;
}

/* ============================================================
   특수 링크 스타일 (bold 강조) - 데이터 제출
   ============================================================ */

.sidebar-link[style*="font-weight: bold"],
.sidebar-link[style*="font-weight:bold"] {
  color: var(--emerald);
  font-weight: 800;
  background: transparent;
  border-left: none;
  padding-left: 12px;
  border-radius: 8px;
  letter-spacing: 0.3px;
}

.sidebar-link[style*="font-weight: bold"]:hover,
.sidebar-link[style*="font-weight:bold"]:hover {
  background: linear-gradient(135deg, rgba(80, 200, 120, 0.1), rgba(135, 206, 235, 0.1));
  color: var(--emerald);
  font-weight: 600;
  padding-left: 18px;
  box-shadow: inset 3px 0 0 0 var(--emerald);
  border-left: none;
}

/* ============================================================
   섹션별 색상 구분 (선택사항)
   ============================================================ */

.sidebar-section:nth-child(1) .sidebar-title::before {
  background: linear-gradient(180deg, var(--emerald), var(--sky-blue));
}

.sidebar-section:nth-child(2) .sidebar-title::before {
  background: linear-gradient(180deg, var(--sky-blue), var(--deep-blue));
}

.sidebar-section:nth-child(3) .sidebar-title::before {
  background: linear-gradient(180deg, var(--emerald), var(--deep-brown));
}

.sidebar-section:nth-child(4) .sidebar-title::before {
  background: linear-gradient(180deg, var(--sky-blue), var(--emerald));
}

/* ============================================================
   반응형 디자인
   ============================================================ */

@media (max-width: 1200px) {
  .sidebar {
    width: 200px;
    padding: 12px 8px;
  }

  .sidebar-link {
    padding: 8px 10px;
    font-size: 13px;
  }

  .sidebar-link:hover {
    padding-left: 14px;
  }

  .sidebar-title {
    font-size: 10px;
    margin: 6px 0 8px 0;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 180px;
    padding: 10px 6px;
  }

  .sidebar-link {
    padding: 8px 8px;
    font-size: 12px;
    border-radius: 6px;
  }

  .sidebar-link:hover {
    padding-left: 12px;
  }

  .sidebar-title {
    font-size: 9px;
    margin: 4px 0 6px 0;
    gap: 4px;
  }

  .sidebar-title::before {
    width: 2px;
    height: 12px;
  }

  .sidebar-section {
    margin-bottom: 12px;
    padding-bottom: 10px;
  }
}

/* ============================================================
   다크 모드 지원 (추후 확장)
   ============================================================ */

@media (prefers-color-scheme: dark) {
  .sidebar {
    background: linear-gradient(180deg, #1a202c 0%, #0f1419 100%);
    border-right-color: var(--sky-blue);
  }

  .sidebar-title {
    color: var(--sky-blue);
  }

  .sidebar-link {
    color: #e2e8f0;
  }

  .sidebar-link:hover {
    color: var(--emerald);
    background: rgba(80, 200, 120, 0.15);
  }

  .sidebar-link.active {
    color: var(--emerald);
    background: rgba(80, 200, 120, 0.15);
  }
}
