/* 페이지 안의 설정 메뉴, 상태 탭, 설명서 목차. */
body > header.app-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: calc(64px + env(safe-area-inset-top, 0px));
  min-height: calc(64px + env(safe-area-inset-top, 0px));
  margin: 0;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 20px 12px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 6;
  background: #2c293e;
  border: 0;
  border-bottom: 1px solid #514a6c;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #ecebf5;
  font: 14px/1.5 "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.app-header .page-header-legacy, .app-header [hidden] { display: none !important; }
.app-header .app-header-brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; font-weight: 700; }
.app-header .app-header-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #8b7bff, #2fe6e0); color: #fff; font-size: 16px;
}
.app-header .app-header-title {
  min-width: 0; margin: 0; padding: 0 0 0 20px; border-left: 1px solid #514a6c;
  background: none; -webkit-text-fill-color: #ecebf5; color: #ecebf5;
  font: 600 16px/1.5 "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-header .app-header-identity { display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: 0; flex-shrink: 0; }
.app-header .app-header-user { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.app-header .app-header-role { padding: 3px 8px; border: 1px solid #635782; border-radius: 6px; color: #d4caf7; font-size: 12px; white-space: nowrap; }
.page-context-tools {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
  min-height: 52px; padding: 8px 20px; position: relative; z-index: 5;
  background: #2c293e; border-bottom: 1px solid #514a6c;
}
.page-context-label { color: #c1bdd6; font-size: 13px; white-space: nowrap; }
.page-context-tools .user-dropdown, .page-context-tools #notif-dropdown { max-height: max(120px, calc(100dvh - 260px)); overflow-y: auto; }
@media (max-width: 700px) {
  body > header.app-header { gap: 12px; padding-left: 14px; padding-right: 14px; }
  .app-header .app-header-brand-name, .app-header .app-header-role { display: none; }
  .app-header .app-header-title { padding-left: 12px; font-size: 15px; }
  .app-header .app-header-user { max-width: 84px; font-size: 12px; }
  .page-context-tools { padding: 8px 14px; gap: 8px; }
  .page-context-label { font-size: 12px; }
}
.page-menu-legacy { display: none !important; }
.page-menu-shell {
  position: relative;
  z-index: 4;
  flex-shrink: 0;
  margin: 0;
  padding: 10px 20px;
  border-bottom: 1px solid #514a6c;
  background: #262335;
  color: #ecebf5;
  font: 14px/1.5 "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.page-menu-shell > summary { width: fit-content; cursor: pointer; color: #c1bdd6; font-size: 13px; }
.page-menu-shell[open] > summary { margin-bottom: 10px; }
.page-menu-shell .page-menu { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 24px; }
.page-menu-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.page-menu-shell [hidden] { display: none !important; }
.page-menu-label { display: block; margin-bottom: 6px; color: #bfb9d4; font-size: 12px; font-weight: 600; }
.page-menu-links { display: flex; flex-wrap: wrap; gap: 6px; }
.page-menu-links a {
  display: block;
  padding: 8px 12px;
  border: 1px solid #514a6c;
  border-radius: 8px;
  background: #343047;
  color: #ecebf5;
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
}
.page-menu-links a:hover { background: #443b5d; border-color: #a99cff; }
.page-menu-links a[aria-current] { color: #fff; border-color: #b4a8ff; background: #494064; box-shadow: inset 0 -3px 0 #b4a8ff; }
.page-menu-help { margin-left: auto; }
.page-menu-help > summary { display: list-item; padding: 8px 12px; color: #ecebf5; font-size: 14px; cursor: pointer; }
.page-menu-help .page-menu-links { margin-top: 8px; }
.page-menu-shell a:focus-visible, .page-menu-shell summary:focus-visible { outline: 2px solid #d1c8ff; outline-offset: 3px; }
@media (max-width: 700px) {
  .page-menu-shell { padding: 10px 14px; }
  .page-menu-shell > summary { min-height: 24px; }
  .page-menu-shell .page-menu { max-height: 45dvh; overflow-y: auto; display: grid; grid-template-columns: 1fr; gap: 16px; padding: 4px; }
  .page-menu-help { margin-left: 0; }
  .page-menu-links a { min-height: 44px; }
}
.menu-heading {
  margin: 0 0 12px;
  color: #ecebf5;
  font-size: 16px;
  font-weight: 700;
}
.toolbar-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.toolbar-row button {
  width: 100%;
  min-height: 88px;
  padding: 16px;
  gap: 14px;
  border-radius: 12px;
  background: #302d43;
  text-align: left;
  line-height: 1.5;
}
.toolbar-row button:hover {
  transform: none;
  background: #3b3654;
  border-color: #a99cff;
  box-shadow: none;
}
.toolbar-row button .icon-badge { width: 36px; height: 36px; flex-shrink: 0; }
.menu-copy { display: block; min-width: 0; }
.menu-copy strong { display: block; color: #f4f2ff; font-size: 15px; font-weight: 650; }
.menu-copy small { display: block; margin-top: 4px; color: #c1bdd6; font-size: 13px; font-weight: 400; }
.toolbar-row button::after { content: "›"; margin-left: auto; color: #c1bdd6; font-size: 24px; }

.approval-tabs, .notif-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid #514a6c;
  border-radius: 12px;
  background: #211f30;
}
.approval-tabs { width: fit-content; max-width: 100%; margin: 0 0 16px; }
.approval-tab, .notif-tab {
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #c1bdd6;
  font-weight: 600;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}
.approval-tab:hover, .notif-tab:hover { background: #353047; color: #fff; }
.approval-tab.active, .notif-tab.active {
  background: #494064;
  border-color: #b4a8ff;
  color: #fff;
  font-weight: 700;
  box-shadow: inset 0 -3px 0 #b4a8ff;
}
.approval-tab > span {
  display: inline-flex;
  justify-content: center;
  min-width: 24px;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: #211f30;
  color: #ecebf5;
  font-size: 12px;
}
#notif-dropdown { width: min(360px, calc(100vw - 96px)); max-height: min(480px, 70dvh); padding: 12px; }
.notif-tabs { margin-bottom: 10px; }
.notif-tab { flex: 1; padding: 8px 6px; font-size: 13px; word-break: keep-all; }
#knowledge-dropdown { width: min(300px, calc(100vw - 140px)); }
#knowledge-dropdown .dropdown-item { padding: 13px 12px; line-height: 1.5; }
#knowledge-dropdown .dropdown-item + .dropdown-item { border-top: 1px solid #514a6c; }
.info-type-choice { padding: 10px 12px; border: 1px solid #514a6c; border-radius: 8px; line-height: 1.5; }
.info-type-choice:has(input:checked) { background: #494064; border-color: #b4a8ff; color: #fff; }

nav.toc { padding: 20px; background: #2c293e; }
nav.toc p { margin: 0 0 14px; color: #ecebf5; font-weight: 700; line-height: 1.5; font-family: inherit; font-size: 15px; }
nav.toc ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 0;
  columns: auto;
  list-style: none;
  counter-reset: menu-item;
}
nav.toc li { margin: 0; min-width: 0; counter-increment: menu-item; }
nav.toc a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  height: 100%;
  padding: 12px;
  border: 1px solid #514a6c;
  border-radius: 8px;
  background: #343047;
  font-size: 14px;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
nav.toc a::before { content: counter(menu-item, decimal-leading-zero); color: #c5bbff; font: 12px var(--mono); flex-shrink: 0; }
nav.toc a:hover { color: #fff; background: #443b5d; border-color: #a99cff; text-decoration: none; }
.toolbar-row button:focus-visible, .approval-tab:focus-visible, .notif-tab:focus-visible,
#knowledge-dropdown .dropdown-item:focus-visible, nav.toc a:focus-visible {
  outline: 2px solid #d1c8ff;
  outline-offset: 3px;
}
@media (max-width: 600px) {
  .toolbar-row { grid-template-columns: 1fr; gap: 8px; }
  .toolbar-row button { min-height: 80px; padding: 14px; }
  nav.toc { padding: 14px; }
  nav.toc ol { grid-template-columns: 1fr; }
  .approval-tabs { width: 100%; }
  .approval-tab { flex: 1; padding: 9px 8px; }
  .notif-tabs { gap: 3px; padding: 4px; }
  .notif-tab { font-size: 12px; padding: 8px 3px; }
}
