* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
  font-size: 14px;
  background: #f0f2f5;
  color: #333;
  height: 100vh;
  overflow: hidden;
}

/* ── Layout ── */
.layout {
  display: flex;
  height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: 220px;
  min-width: 220px;
  background: #1a2b45;
  color: #cdd6e0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  /* border-right: 1px solid #0a1520; */ /* 기존: 검은색 경계선 */
  border-right: 1px solid #111f32;       /* 변경: 사이드바 헤더 색과 동일한 어두운 톤으로 통일 */
}

.sidebar-logo {
  margin-top: auto;
  padding: 16px 0 20px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  /* border-top: 1px solid #2d4160; */ /* 기존 구분선 색상 */
  border-top: 1px solid #5a8ec8;       /* 변경: 로고 영역 밝은 배경에 맞춰 밝은 톤으로 조정 */
  /* background: none; */               /* 기존: 배경 없음 (어두운 사이드바 색 그대로) */
  background: #e8f0f8;                  /* 변경: 로고가 잘 보이도록 밝은 배경 추가 */
  border-radius: 0 0 0 0;
}

.sidebar-logo img {
  /* opacity: 0.85; */ /* 기존: 약간 투명 */
  opacity: 1;          /* 변경: 완전 불투명 (로고 선명하게) */
  /* width: 100px; */  /* 기존 크기 */
  width: 160px;        /* 변경: 로고 크기 확대 */
}

.sidebar-header {
  padding: 18px 16px;
  background: #111f32;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #2d4160;
  user-select: none;
}

.sidebar-header span {
  font-size: 11px;
  font-weight: 400;
  color: #7a9bbf;
  margin-left: 6px;
}

/* ── Menu Tree ── */
.menu-tree {
  list-style: none;
  padding: 8px 0;
  flex: 1;
}

.menu-tree li {
  position: relative;
}

/* Top-level items */
.menu-tree > li > .menu-row {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s;
  user-select: none;
}

.menu-tree > li > .menu-row:hover {
  background: #253d5c;
}

.menu-tree > li.active > .menu-row,
.menu-tree > li.active-parent > .menu-row {
  background: #1e4d7b;
  color: #fff;
}

.menu-row .label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-row .icon {
  font-size: 15px;
  width: 18px;
  text-align: center;
}

.menu-row .arrow {
  font-size: 10px;
  color: #7a9bbf;
  transition: transform 0.2s;
}

.menu-tree > li.open > .menu-row .arrow {
  transform: rotate(90deg);
}

/* Sub-menu */
.submenu {
  list-style: none;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
  background: #162035;
}

.menu-tree > li.open > .submenu {
  max-height: 500px;
}

.submenu li .menu-row {
  padding: 8px 16px 8px 42px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.15s;
  user-select: none;
  color: #a8bdd0;
}

.submenu li .menu-row:hover {
  background: #1e3254;
  color: #fff;
}

.submenu li.active .menu-row {
  background: #1e4d7b;
  color: #fff;
  border-left: 3px solid #4fa3e0;
  padding-left: 39px;
}

.submenu li .menu-row::before {
  content: '•';
  margin-right: 8px;
  font-size: 10px;
  color: #4f6e8a;
}

.submenu li.active .menu-row::before {
  color: #4fa3e0;
}

/* ── Content area ── */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Page header bar */
.page-header {
  background: #fff;
  padding: 14px 24px;
  border-bottom: 1px solid #dde3ea;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #1a2b45;
  min-height: 52px;
}

.page-header .breadcrumb {
  font-size: 12px;
  color: #8a9ab0;
  font-weight: 400;
  margin-left: auto;
}

.page-header .header-clock {
  font-size: 13px;
  font-weight: 600;
  color: #1a2b45;
  background: #f0f4f8;
  border: 1px solid #d0d7e2;
  border-radius: 4px;
  padding: 4px 12px;
  margin-left: 16px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Page body */
.page-body {
  padding: 24px;
  flex: 1;
}

/* Page sections (hidden/shown) */
.page {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.page.active {
  display: flex;
}

#pages-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* ── Placeholder cards ── */
.placeholder-card {
  background: #fff;
  border-radius: 6px;
  border: 1px solid #dde3ea;
  padding: 32px;
  color: #8a9ab0;
  text-align: center;
  font-size: 14px;
}

.placeholder-card h2 {
  font-size: 20px;
  color: #1a2b45;
  margin-bottom: 8px;
}
