/* ============================================================
   iPlan — 사이드바 네비게이션
   PC: 고정 240px / 태블릿: 56px 접힘 / 모바일: 드로어
   ============================================================ */

/* ── 사이드바 컨테이너 ── */
.ip-sidebar {
  display: flex;
  flex-direction: column;
  width: var(--ip-sidebar-w);
  height: 100vh;
  height: 100dvh;
  background: var(--bg-raised);
  border-right: 1px solid var(--line);
  flex-shrink: 0;
  overflow: hidden;
  transition: width var(--duration-slow) var(--ease-default);
  z-index: var(--z-sidebar);
}

/* ── 사이드바 헤더 ── */
.ip-sidebar-header {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-5) var(--s-5);
  border-bottom: 1px solid var(--line-subtle);
  flex-shrink: 0;
}

.ip-sidebar-logo {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), #0d9488);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  color: var(--bg-base);
  flex-shrink: 0;
}

.ip-sidebar-title {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
}

/* ── 네비게이션 영역 ── */
.ip-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--s-3) var(--s-2);
}

/* ── 네비 섹션 ── */
.ip-nav-section {
  margin-bottom: var(--s-4);
}

.ip-nav-section-title {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--s-2) var(--s-3);
  margin-bottom: var(--s-1);
}

/* ── 네비 아이템 ── */
.ip-nav-item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-sub);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-default);
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}

.ip-nav-item:hover {
  color: var(--text-main);
  background: var(--surface-hover);
}

.ip-nav-item.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.ip-nav-item svg,
.ip-nav-item .ip-nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.ip-nav-item.active svg,
.ip-nav-item.active .ip-nav-icon {
  opacity: 1;
}

.ip-nav-item-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ip-nav-item-count {
  font-size: var(--text-xs);
  color: var(--text-faint);
  min-width: 20px;
  text-align: right;
}

/* ── 프로젝트 색상 도트 ── */
.ip-project-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* ── 프로젝트 추가 버튼 ── */
.ip-add-project {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--text-faint);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-default);
}

.ip-add-project:hover {
  color: var(--accent);
  background: var(--surface-hover);
}

/* ── 사이드바 푸터 ── */
.ip-sidebar-footer {
  padding: var(--s-3) var(--s-4);
  border-top: 1px solid var(--line-subtle);
  flex-shrink: 0;
}

.ip-sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-default);
}

.ip-sidebar-user:hover {
  background: var(--surface-hover);
}

.ip-sidebar-user-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ip-sidebar-user-email {
  font-size: var(--text-xs);
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── 사이드바 오버레이 (모바일) ── */
.ip-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: calc(var(--z-sidebar) - 1);
}

.ip-sidebar-overlay.show {
  display: block;
}
