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

/* Header */
.header {
  height: var(--header-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header__left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header__logo img {
  height: 34px;
}
.header__menu-toggle {
  display: none;
  padding: 6px;
  font-size: 20px;
  color: var(--color-text-muted);
}
.header__right {
  display: flex;
  align-items: center;
  gap: 16px;
}
/* 로그아웃 <form>이 header__right의 실제 flex item이다 - 버튼에만 flex-shrink:0을 줘도
   그 부모 form이 좁아지면 안의 "로그아웃" 텍스트가 한글 글자 단위로 줄바꿈되며 세로로
   쪼개져 보였다(실측 - 모바일 좁은 화면). form 자체를 고정폭으로 지켜야 한다. */
.header__right form {
  flex-shrink: 0;
}
.header__icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  color: var(--color-text-muted);
}
.header__icon-link:hover {
  background: var(--color-bg);
  text-decoration: none;
}
.header__icon-link.is-active {
  background: var(--color-sidebar-active-bg);
  color: var(--color-primary);
}
.header__user {
  font-size: 13px;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.header__user strong {
  color: var(--color-text);
}
.header__user--link {
  padding: 6px 10px;
  border-radius: var(--radius-md);
}
.header__user--link:hover {
  background: var(--color-bg);
  text-decoration: none;
}
.header__user--link.is-active {
  background: var(--color-sidebar-active-bg);
}
.header__badge {
  display: inline-block;
  margin-left: 6px;
}
.header__logout {
  font-size: 13px;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
.header__logout:hover {
  background: var(--color-bg);
  text-decoration: none;
}

/* Body: sidebar + content */
.layout {
  flex: 1;
  display: flex;
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--color-sidebar-bg);
  color: var(--color-sidebar-text);
  border-right: 1px solid var(--color-border);
  padding: 20px 14px;
}
.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar__group-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-light);
  padding: 18px 12px 6px;
}
.sidebar__group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}
.sidebar__group-toggle .icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}
.sidebar__group.is-collapsed .sidebar__group-toggle .icon {
  transform: rotate(-90deg);
}
.sidebar__group-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-sidebar-text);
  width: 100%;
  text-align: left;
}
.sidebar__link .icon {
  flex-shrink: 0;
  color: inherit;
}
.sidebar__link .label {
  flex: 1;
}
.sidebar__link:hover {
  background: var(--color-bg);
  text-decoration: none;
}
.sidebar__link.is-active {
  background: var(--color-sidebar-active-bg);
  color: var(--color-sidebar-text-active);
  font-weight: 700;
}
/* 모바일 고객 헤더에서 뺀 "내 정보"/"로그아웃"을 이 사이드바(햄버거로 여는 메뉴) 맨
   아래로 옮겨뒀다 - PC에서는 헤더에 그대로 있으니 여기서는 기본으로 숨긴다
   (responsive.css의 body.is-customer 모바일 구간에서만 다시 보여준다). */
.sidebar__mobile-only {
  display: none;
}

/* PC 화면에서 고객 포털 사이드바만 글자를 더 키우고 위아래 간격을 넓힌다. */
@media (min-width: 769px) {
  body.is-customer .sidebar__nav {
    gap: 6px;
  }
  body.is-customer .sidebar__link {
    font-size: 17px;
    padding: 16px 14px;
  }
}

.layout__content {
  flex: 1;
  min-width: 0;
  padding: 24px;
}

.footer {
  padding: 16px 24px;
  font-size: 12px;
  color: var(--color-text-light);
  text-align: center;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

/* Auth (no sidebar) layout */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  padding: 24px;
}
.auth-box {
  width: 100%;
  max-width: 420px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.auth-box--wide {
  max-width: 560px;
}
.auth-box__logo {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.auth-box__title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
}
.auth-box__footer {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
}
