/* ==========================================
   1. 테마 변수 (Theme Variables)
   ========================================== */
:root { 
  --bg: #f8fafc; 
  --card: #ffffff; 
  --accent: #059669; 
  --text: #0f172a; 
  --muted: #64748b; 
  --border: #e2e8f0; 
  --item-bg: #f8f9fa;
}

body.dark-mode { 
  --bg: #0a0e1a; 
  --card: #1a1f35; 
  --accent: #6ee7b7; 
  --text: #e2e8f0; 
  --muted: #94a3b8; 
  --border: rgba(110, 231, 183, 0.15); 
  --item-bg: #111827;
}

/* ==========================================
   2. 기본 리셋 및 전체 스크롤 제어
   ========================================== */
* { 
  box-sizing: border-box; 
} 

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden; /* 전체 페이지 스크롤 차단 */
}

body { 
  font-family: Inter, system-ui, -apple-system, sans-serif; 
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 60%); 
  color: var(--text); 
  transition: background 0.3s, color 0.3s; 
}

body.dark-mode { 
  background: linear-gradient(180deg, #081124 0%, #07121b 60%); 
}

/* ==========================================
   3. 메인 레이아웃 (Main Wrapper)
   ========================================== */
.main-wrapper {
  position: absolute;
  top: 60px;
  left: 220px;
  right: 0;
  bottom: 0;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto; /* 내부 콘텐츠 스크롤 허용 */
}

/* 사이트바 접힘 상태 대응 */
.sidebar.collapsed ~ .main-wrapper,
.main-wrapper.collapsed {
  left: 0;
}

/* 짧은 폼 위주 페이지(로그인/회원가입 등)를 세로 중앙 정렬하고 싶을 때 */
.main-wrapper.center-vertical {
  align-items: center;
}

/* 모바일 반응형 공통 레이아웃 */
@media (max-width: 768px) {
  .main-wrapper {
    left: 0;
    padding: 20px 16px;
  }
}