* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f7f7;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== 상단 네비게이션 ===== */

.top-nav {
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 20;
}

.top-nav-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-toggle {
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.menu-toggle:hover {
  background: #f0f0f0;
}

.brand {
  font-weight: 700;
  font-size: 18px;
}

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  border: none;
  background: #222;
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
}

.nav-btn:hover {
  opacity: 0.9;
}

.user-area {
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
}

.admin-submenu {
  padding-left: 12px;
  border-left: 1px solid #eee;
}

.admin-sub-item {
  font-size: 13px;
  padding-left: 26px; /* 조금 더 안쪽으로 */
}

/* 토글 열렸을 때 표시용 (선택사항) */
#admin-menu-toggle.admin-open {
  font-weight: 600;
}

/* ===== 왼쪽 슬라이드 메뉴 ===== */

.side-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  max-width: 80%;
  height: 100vh;
  background: #ffffff;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
  transform: translateX(-100%);
  transition: transform 0.25s ease-out;
  z-index: 30;
  display: flex;
  flex-direction: column;
}

.side-menu.open {
  transform: translateX(0);
}

.side-menu-header {
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
  font-weight: 600;
}

.close-btn {
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.close-btn:hover {
  background: #f0f0f0;
}

.side-menu-list {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}

.side-menu-item {
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
}

.side-menu-item:hover {
  background: #f5f5f5;
}

/* 어두운 배경 (메뉴 열렸을 때) */

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
  z-index: 25;
}

.backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ===== 메인 영역 ===== */

.main {
  flex: 1;
  position: relative;
  padding: 16px;
}

/* 하단에만 보이는 타이틀 */

.bottom-title {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  font-size: 18px;
  font-weight: 600;
  opacity: 0.8;
}

.main-home {
  display: flex;
  justify-content: center;
  align-items: center;
  height: calc(100vh - 56px); /* 상단 메뉴 높이 제외 */
}

.home-title {
  font-size: 28px;
  font-weight: 700;
  opacity: 0.8;
  text-align: center;
}

/* 공용 hidden 클래스 */

.hidden {
  display: none !important;
}