/* SDIN ADMIN — 단일 스타일시트
 * 1. 공통 기반 · 사이드바 · 대시보드 · 로그인
 * 2. 공통 목록/등록 화면
 * 3. 화면별 스타일 (각 섹션 제목 참고) */
/* Shared visual system: readable surfaces, compact controls, restrained accents. */
:root {
  /* ── 색상: 새 색은 여기에만 추가하고, 아래 규칙에서는 var(--c-*)만 사용합니다 ── */
  --c-bg: #f3f5f8;
  --c-surface: #ffffff;
  --c-surface-2: #f7f9fc;
  --c-line: #dfe5ed;
  --c-line-strong: #c5d0dd;
  --c-ink: #172536;
  --c-text-2: #43576e;
  --c-muted: #67768a;
  --c-faint: #a4afbb;
  --c-blue: #1765a8;
  --c-blue-hover: #13578f;
  --c-blue-soft: #eaf2fa;
  --c-blue-line: #acc8e3;
  --c-focus: #63aaf3;
  --c-ok: #3f8f63;
  --c-ok-ink: #315f47;
  --c-ok-soft: #edf5f0;
  --c-ok-line: #cfe5d6;
  --c-warn: #e5b84d;
  --c-warn-ink: #8a5a00;
  --c-warn-soft: #fff3d6;
  --c-warn-line: #efdaa5;
  --c-danger: #b44747;
  --c-danger-hover: #973a3a;
  --c-danger-soft: #fbeeee;
  --c-danger-faint: #fdf7f7;
  --c-danger-line: #f0cfcf;
  --c-nav-strong: #e6edf5;
  --c-nav: #0d1a2a;
  --c-nav-2: #17283c;
  --c-nav-line: #23354a;
  --c-nav-hover: #2d455f;
  --c-nav-text: #b8c6d6;
  --c-nav-muted: #8197b0;
  --c-nav-accent: #9dc9f2;
  --c-switch-off: #d3dbe4;
  --c-switch-off-hover: #c4cdd8;
  --c-login-btn: #2a4664;
  --c-login-btn-hover: #345779;
  /* ── 모서리: 작은 요소 6 · 카드 8 · 배지 pill ── */
  --r-sm: 6px;
  --r-md: 8px;
  --r-pill: 999px;
  /* ── 글자 크기 7단계 ── */
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-base: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-2xl: 26px;
  /* ── 컨트롤 크기: 버튼·입력칸·스위치 (모바일에서는 아래 미디어쿼리로 터치 크기 확대) ── */
  --control-h: 38px;
  --control-h-sm: 30px;
  --switch-w: 34px;
  --switch-h: 20px;
  --shadow-xs: 0 1px 2px rgba(23, 37, 54, 0.06);
  --ring: 0 0 0 3px rgba(99, 170, 243, 0.35);
  /* 기존 이름 호환 */
  --admin-bg: var(--c-bg);
  --admin-surface: var(--c-surface);
  --admin-ink: var(--c-ink);
  --admin-muted: var(--c-muted);
  --admin-border: var(--c-line);
  --admin-blue: var(--c-blue);
  --admin-focus: var(--c-focus);
  --admin-radius: var(--r-sm);
}
/* 터치 기기·좁은 화면: 손가락으로 누르기 쉬운 크기로 확대 */
@media (max-width: 768px) {
  :root {
    --control-h: 44px;
    --control-h-sm: 36px;
    --switch-w: 40px;
    --switch-h: 24px;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    "Pretendard Variable",
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    "Apple SD Gothic Neo",
    "Segoe UI",
    "Malgun Gothic",
    "맑은 고딕",
    sans-serif;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  background: var(--admin-bg);
  color: var(--admin-ink);
  font-size: var(--fs-md);
  line-height: 1.6;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--admin-focus);
  outline-offset: 3px;
}
input,
textarea,
select {
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-sm);
  background: var(--admin-surface);
  color: var(--admin-ink);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
input,
select {
  min-height: var(--control-h);
  padding: 10px 12px;
}
input {
  width: 100%;
}
textarea {
  width: 100%;
  padding: 12px;
  line-height: 1.7;
  resize: vertical;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--admin-focus);
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--admin-focus);
  box-shadow: 0 0 0 2px rgba(99, 170, 243, 0.16);
}
input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  padding: 0;
  margin: 0;
  accent-color: var(--admin-blue);
  cursor: pointer;
}
input[type="checkbox"]:focus:not(:focus-visible),
input[type="radio"]:focus:not(:focus-visible) {
  box-shadow: none;
}
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: 2px solid var(--admin-focus);
  outline-offset: 2px;
  box-shadow: none;
}
input[type="file"] {
  padding: 8px 10px;
  font-size: var(--fs-base);
}
input[type="file"]::file-selector-button {
  padding: 5px 10px;
  margin-right: 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--c-blue-soft);
  color: var(--c-text-2);
  font: inherit;
  cursor: pointer;
}
input:disabled,
textarea:disabled,
select:disabled {
  background: var(--c-bg);
  color: var(--c-faint);
  cursor: not-allowed;
}
label {
  display: block;
  font-size: var(--fs-base);
  font-weight: 600;
  margin: 18px 0 7px;
}
.check,
.admin-main label.check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  font-weight: 500;
  cursor: pointer;
}
h1 {
  font-size: var(--fs-2xl);
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}
h2 {
  font-size: var(--fs-lg);
  font-weight: 600;
  margin: 0 0 18px;
}
.eyebrow {
  font-size: var(--fs-xs);
  color: var(--c-muted);
  letter-spacing: 0.15em;
}
.muted,
.hint {
  color: var(--admin-muted);
}
.hint {
  font-size: var(--fs-sm);
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.brand {
  display: block;
  font-weight: 800;
  font-size: var(--fs-2xl);
  letter-spacing: -1px;
}
.brand span {
  font-size: var(--fs-xs);
  color: var(--admin-focus);
  letter-spacing: 2px;
  margin-left: 8px;
}
.admin-shell {
  margin-left: 240px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.admin-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -6px 0 18px;
  min-height: 36px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
/* 상단 바: 현재 위치 · 환경 표시 · 홈페이지 보기 */
.admin-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  flex: 1;
  font-size: var(--fs-sm);
  color: var(--admin-muted);
}
.admin-crumb a {
  color: var(--admin-muted);
}
.admin-crumb a:hover {
  color: var(--admin-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.admin-crumb-sep {
  color: var(--c-faint);
}
.admin-crumb [aria-current="page"] {
  color: var(--admin-ink);
  font-weight: 600;
}
/* 하단 고정 저장 바 공통 요소 */
.admin-sticky-note {
  font-size: var(--fs-sm);
  color: var(--admin-muted);
}
.admin-sticky-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.admin-main {
  padding: 30px 32px;
  width: 100%;
  min-width: 0;
  margin: 0;
}
/* Content width excludes the shared responsive outer padding. */
.admin-content {
  width: 100%;
  min-width: 0;
  margin: 0;
}
.admin-content-list {
  max-width: 1280px;
}
.admin-content-edit {
  max-width: 920px;
}
.admin-content-stats {
  max-width: 1360px;
}
.page-heading {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--admin-border);
}
.page-heading .eyebrow {
  margin: 0 0 8px;
}
.page-heading h1 {
  margin: 0 0 8px;
}
.page-heading .muted {
  margin: 0;
  font-size: var(--fs-base);
  line-height: 1.7;
}
.panel {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--r-md);
  padding: 24px;
  margin-bottom: 20px;
  min-width: 0;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.summary-grid strong {
  font-size: var(--fs-2xl);
  font-weight: 600;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.summary-grid small {
  font-size: var(--fs-sm);
  margin-left: 8px;
  font-weight: 400;
  color: var(--admin-muted);
}
.quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.quick-links a {
  padding: 14px 16px;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--r-sm);
}
.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 20px;
}
/* 버튼: .button(기본·회색) + 변형 .is-primary(파랑) / .is-danger(빨강) / .is-small / .is-block(가로 꽉 참).
 * 너비는 내용 크기가 기본이며, 폼·패널에 단독으로 쌓일 때만 위 간격을 줍니다. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--control-h);
  padding: 0 14px;
  margin: 0;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  box-shadow: var(--shadow-xs);
  color: var(--c-ink);
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease;
}
.button svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.button:hover {
  background: var(--c-surface-2);
  border-color: var(--c-faint);
}
.button:active {
  background: var(--c-bg);
  box-shadow: none;
}
.button:focus-visible {
  outline: none;
  border-color: var(--c-focus);
  box-shadow: var(--ring);
}
/* 강조 버튼: 위쪽 1px 하이라이트 + 색 그림자로 살짝 떠 보이게 */
.button.is-primary,
.button.is-danger {
  border-color: transparent;
  color: var(--c-surface);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 1px 2px rgba(23, 37, 54, 0.18);
}
.button.is-primary {
  background: var(--c-blue);
}
.button.is-primary:hover {
  background: var(--c-blue-hover);
  border-color: transparent;
}
.button.is-danger {
  background: var(--c-danger);
}
.button.is-danger:hover {
  background: var(--c-danger-hover);
  border-color: transparent;
}
.button.is-primary:active,
.button.is-danger:active {
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
}
.button.is-primary:focus-visible,
.button.is-danger:focus-visible {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    var(--ring);
}
.button.is-small {
  min-height: var(--control-h-sm);
  padding: 0 10px;
  font-size: var(--fs-sm);
}
.button.is-block {
  display: flex;
  width: 100%;
}
.button:disabled,
.button[aria-disabled="true"] {
  opacity: 0.45;
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}
:where(form, .panel, .login-panel) > :is(.button) {
  margin-top: 22px;
}
/* 삭제 확인 등 확인 화면의 버튼 줄: 취소(왼쪽) · 실행(오른쪽) */
.confirm-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--admin-border);
}
.confirm-actions .button {
  min-width: 112px;
}
@media (max-width: 520px) {
  .confirm-actions .button {
    flex: 1;
    min-width: 0;
  }
}
dl {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
}
dt {
  color: var(--admin-muted);
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.alert,
.success {
  padding: 12px 14px;
  border: 1px solid var(--c-danger-line);
  border-radius: var(--r-sm);
  background: var(--c-danger-faint);
  color: var(--c-danger-hover);
  font-size: var(--fs-base);
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.success {
  border-color: var(--c-ok-line);
  color: var(--c-ok-ink);
  background: var(--c-ok-soft);
}
.pending {
  padding: 32px;
}
.admin-footer {
  margin-top: auto;
  padding: 18px 32px;
  color: var(--c-muted);
  font-size: var(--fs-sm);
}
.drawer-toggle,
.drawer-shade {
  display: none;
}
.preview-note {
  padding: 12px 20px;
  background: var(--c-warn-soft);
  color: var(--c-warn-ink);
  border: 1px solid var(--c-warn-line);
}
.environment-badge {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid var(--c-warn);
  border-radius: var(--r-pill);
  background: var(--c-warn-soft);
  color: var(--c-warn-ink);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.5px;
}
.content-search {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.content-search input {
  flex: 1 1 180px;
  width: auto;
}
.content-search select {
  flex: 0 1 auto;
}
.content-search .button {
  margin: 0;
}
.table-scroll {
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  scrollbar-width: thin;
}
.content-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}
.content-table th,
.content-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--admin-border);
  vertical-align: middle;
  overflow-wrap: anywhere;
  font-size: var(--fs-base);
}
.content-table th,
.stats-table th {
  background: var(--c-surface-2);
  color: var(--c-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.content-table tbody tr,
.stats-table tbody tr {
  transition: background-color 0.2s ease;
}
.content-table tbody tr:hover,
.stats-table tbody tr:hover {
  background: var(--c-surface-2);
}
.content-table a {
  color: var(--admin-blue);
}
.content-table a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.content-badge {
  display: inline-block;
  padding: 3px 7px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  background: var(--c-surface-2);
  color: var(--c-muted);
  font-size: var(--fs-xs);
  line-height: 1.5;
  white-space: nowrap;
}
.content-pages {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 22px;
  font-size: var(--fs-sm);
}
.content-pages a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--admin-border);
  border-radius: var(--r-sm);
  background: var(--admin-surface);
  color: var(--c-muted);
}
.content-pages a:hover {
  background: var(--c-surface-2);
  border-color: var(--c-blue-line);
  color: var(--admin-blue);
}
.content-pages span {
  color: var(--admin-muted);
  font-variant-numeric: tabular-nums;
}
.popup-thumbnail {
  max-width: 100px;
  max-height: 90px;
}
.popup-preview {
  display: block;
  max-width: 100%;
  max-height: 360px;
  margin-top: 20px;
}
.inquiry-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
/* Setup retains its separate form layout; login glass is scoped below. */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--c-bg);
}
.login-panel {
  width: min(440px, 100%);
  background: white;
  padding: 42px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
}
.login-panel h1 {
  margin-top: 35px;
}
.login-panel .environment-badge {
  margin-top: 12px;
}
.return {
  display: block;
  text-align: center;
  margin-top: 24px;
  color: var(--c-muted);
  font-size: var(--fs-sm);
}
.login-panel .auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 41.6px;
}
.login-panel .auth-brand img {
  display: block;
  width: auto;
  height: 36px;
  max-width: 101px;
  object-fit: contain;
  flex-shrink: 0;
}
.login-panel .auth-brand span {
  margin-left: 0;
}
@media (max-width: 1024px) {
  .admin-shell {
    margin-left: 220px;
  }
  .admin-main {
    padding: 26px 24px;
  }
  .account-grid {
    grid-template-columns: 1fr;
  }
  .summary-grid {
    gap: 12px;
  }
  .panel {
    padding: 22px;
  }
}
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
  }
  .menu-open .sidebar {
    transform: none;
  }
  .admin-shell {
    margin-left: 0;
  }
  .drawer-toggle {
    display: block;
    min-height: 44px;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--r-sm);
    background: white;
    padding: 0 12px;
  }
  .menu-open .drawer-shade {
    display: block;
    position: fixed;
    inset: 0;
    border: 0;
    background: #0007;
    z-index: 20;
  }
  .admin-tools {
    flex-wrap: wrap;
    margin-top: 0;
  }
  .admin-main {
    padding: 24px 20px;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .quick-links {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: var(--fs-xl);
  }
  .login-panel {
    padding: 28px;
  }
  .pending {
    padding: 24px;
  }
  dl {
    grid-template-columns: 95px minmax(0, 1fr);
  }
  .admin-footer {
    padding: 18px 20px;
  }
}
@media (max-width: 520px) {
  .panel {
    padding: 18px;
  }
  .page-heading {
    margin-bottom: 20px;
    padding-bottom: 18px;
  }
  .content-search input {
    flex-basis: 100%;
  }
  .content-search select {
    flex: 1;
  }
  .content-search .button {
    flex: 1;
  }
}

/* Sidebar */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 240px;
  background: var(--c-nav);
  color: var(--c-nav-strong);
  z-index: 30;
  display: flex;
  flex-direction: column;
  padding: 16px 12px 14px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--c-nav-hover) transparent;
  transition: transform 0.2s ease;
}
.navigation-ready .sidebar {
  transition:
    width 0.2s ease,
    transform 0.2s ease;
}
.navigation-ready .admin-shell {
  transition: margin-left 0.2s ease;
}
.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: var(--c-nav-hover);
  border-radius: var(--r-sm);
}
.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  flex-shrink: 0;
  padding: 0 8px;
}
.sidebar .sidebar-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
  max-width: calc(100% - 36px);
}
.sidebar .sidebar-brand img {
  display: block;
  width: auto;
  height: 32px;
  max-width: 100%;
  object-fit: contain;
}
.sidebar-collapse,
.sidebar-close {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--c-nav-muted);
  cursor: pointer;
}
.sidebar-collapse:hover,
.sidebar-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--c-nav-strong);
}
.sidebar-collapse[hidden],
.sidebar-close {
  display: none;
}
.sidebar-collapse {
  position: fixed;
  top: 24px;
  left: 202px;
  z-index: 40;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--c-nav-muted);
  box-shadow: none;
}
.sidebar-collapse:hover,
.sidebar-collapse:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--c-nav-strong);
}
.sidebar-collapse .nav-icon {
  width: 16px;
  height: 16px;
}
.navigation-ready .sidebar-collapse {
  transition:
    left 0.2s ease,
    background-color 0.18s ease,
    color 0.18s ease;
}
.sidebar-collapse.sidebar-collapse:focus-visible {
  outline: 1px solid var(--c-focus);
  outline-offset: 1px;
}
.sidebar nav {
  margin: 10px 0;
  flex-shrink: 0;
}
.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  width: 100%;
  padding: 6px 10px;
  margin: 1px 0;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--c-nav-text);
  font-size: var(--fs-md);
  line-height: 1.4;
  white-space: nowrap;
  text-align: left;
  transition:
    background-color 0.18s ease,
    color 0.18s ease;
}
.nav-icon {
  display: block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}
.sidebar .nav-link .nav-icon {
  color: var(--c-nav-muted);
  transition: color 0.18s ease;
}
.sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--c-nav-strong);
}
.sidebar .nav-link:hover .nav-icon {
  color: var(--c-nav-accent);
}
.sidebar .nav-link[aria-current="page"] {
  background: rgba(114, 157, 204, 0.1);
  color: var(--c-nav-strong);
  font-weight: 500;
}
.sidebar .nav-link[aria-current="page"] .nav-icon {
  color: var(--c-focus);
}
.sidebar .nav-link:focus-visible,
.sidebar .nav-label:focus-visible,
.sidebar-collapse:focus-visible,
.sidebar-close:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: -2px;
}
.nav-text {
  min-width: 0;
}
.nav-group {
  margin-top: 12px;
}
.sidebar .nav-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 0 2px;
  padding: 0 0 0 10px;
  border: 0;
  background: transparent;
  color: var(--c-nav-muted);
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.025em;
  text-align: left;
  cursor: pointer;
}
.sidebar .nav-label:hover {
  color: var(--c-nav-text);
}
.nav-group-state {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: var(--r-sm);
  background: transparent;
  font-size: var(--fs-sm);
  line-height: 1;
  color: var(--c-nav-muted);
  transition:
    background-color 0.18s ease,
    color 0.18s ease;
}
.sidebar .nav-label:hover .nav-group-state,
.sidebar .nav-label:focus-visible .nav-group-state {
  background: rgba(255, 255, 255, 0.08);
  color: var(--c-nav-strong);
}
.sidebar .nav-label:focus-visible {
  outline: none;
}
.sidebar .nav-label:focus-visible .nav-group-state {
  outline: 1px solid var(--c-focus);
  outline-offset: 1px;
}
.nav-group-panel {
  display: grid;
  grid-template-rows: 1fr;
  opacity: 1;
  transition:
    grid-template-rows 0.18s ease,
    opacity 0.18s ease;
}
.nav-group-items {
  min-height: 0;
  overflow: hidden;
}
.nav-group.is-closed .nav-group-panel {
  grid-template-rows: 0fr;
  opacity: 0;
}
.sidebar-utility {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--c-nav-line);
  flex-shrink: 0;
}
.sidebar .logout {
  cursor: pointer;
}
.sidebar-tooltip {
  position: fixed;
  z-index: 60;
  max-width: 240px;
  padding: 7px 10px;
  border: 1px solid var(--c-nav-hover);
  border-radius: var(--r-sm);
  background: var(--c-nav-2);
  color: var(--c-nav-strong);
  font-size: var(--fs-sm);
  line-height: 1.5;
  pointer-events: none;
}
.sidebar-tooltip[hidden] {
  display: none;
}
@media (max-width: 1024px) {
  .sidebar {
    width: 220px;
  }
  .sidebar-collapse {
    left: 182px;
  }
}
@media (min-width: 769px) {
  .sidebar-collapsed .sidebar {
    width: 72px;
    padding: 14px 12px;
  }
  .sidebar-collapsed .admin-shell {
    margin-left: 72px;
  }
  .sidebar-collapsed .sidebar-collapse {
    left: 38px;
  }
  .sidebar-collapsed .sidebar-collapse .nav-icon {
    transform: rotate(180deg);
  }
  .sidebar-collapsed .sidebar-top {
    justify-content: center;
    padding: 0;
  }
  .sidebar-collapsed .sidebar-brand img {
    width: 42px;
    height: auto;
    max-height: 30px;
  }
  .sidebar-collapsed .nav-text,
  .sidebar-collapsed .nav-label {
    display: none;
  }
  .sidebar-collapsed .nav-group {
    margin-top: 8px;
  }
  .sidebar-collapsed .nav-link {
    justify-content: center;
    min-height: 40px;
    padding: 8px 0;
    margin: 2px 0;
  }
  .sidebar-collapsed .nav-group-panel {
    grid-template-rows: 1fr;
    opacity: 1;
  }
}
@media (max-width: 768px) {
  .sidebar {
    width: min(280px, calc(100vw - 48px));
  }
  .sidebar-collapse {
    display: none;
  }
  .sidebar-close {
    display: flex;
  }
  .sidebar .nav-link {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .sidebar .nav-label {
    min-height: 32px;
  }
  .menu-open {
    overflow: hidden;
  }
}
@media (min-width: 769px) {
  .sidebar-collapsed .sidebar-brand {
    max-width: 100%;
  }
  .sidebar-collapsed .sidebar-collapse {
    top: 60px;
    left: 52px;
    width: 30px;
    height: 30px;
    border: 1px solid var(--c-text-2);
    border-radius: 50%;
    background: var(--c-nav-line);
    color: var(--c-nav-text);
    box-shadow: none;
  }
  .sidebar-collapsed .sidebar-collapse:hover,
  .sidebar-collapsed .sidebar-collapse:focus-visible {
    background: var(--c-nav-hover);
    color: var(--c-nav-strong);
  }
  .sidebar-collapsed .sidebar nav {
    margin-top: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar-collapse {
    transition: none !important;
  }
}

/* Dashboard */
.dashboard-page .admin-content {
  max-width: 1280px;
}
.dashboard-page .admin-footer {
  padding-top: 12px;
  padding-bottom: 12px;
}
.dashboard-page .dashboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.dashboard-page .dashboard-heading h1 {
  margin: 0 0 6px;
}
.dashboard-page .dashboard-last-login {
  margin: 0;
}
.dashboard-page .dashboard-today {
  margin: 0;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--c-text-2);
  font-variant-numeric: tabular-nums;
}
.dashboard-page .dashboard-today span {
  margin-left: 4px;
  font-weight: 400;
  color: var(--admin-muted);
}
.dashboard-page .dashboard-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 12px;
}
.dashboard-page .dashboard-section-heading h2 {
  margin: 0;
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.dashboard-page .dashboard-section-heading p {
  margin: 0;
  color: var(--c-muted);
  font-size: var(--fs-sm);
}
/* 운영 현황 카드 */
.dashboard-page .dashboard-metrics {
  display: block;
  margin-top: 20px;
}
.dashboard-page .summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 0;
}
.dashboard-page .summary-grid .panel {
  margin: 0;
  padding: 18px 20px 16px;
  min-width: 0;
}
.dashboard-page .metric-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-radius: var(--r-md);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.dashboard-page .metric-card:hover {
  border-color: var(--c-blue-line);
  box-shadow: 0 6px 18px -12px rgba(23, 37, 54, 0.35);
}
.dashboard-page .metric-card > p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--c-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.dashboard-page .summary-grid strong {
  display: block;
  font-size: var(--fs-2xl);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.dashboard-page .summary-grid small {
  margin-left: 4px;
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--c-muted);
  letter-spacing: 0;
}
.dashboard-page .metric-more {
  margin-top: 2px;
  font-size: var(--fs-xs);
  color: var(--c-faint);
  transition: color 0.2s ease;
}
.dashboard-page .metric-card:hover .metric-more {
  color: var(--admin-blue);
}
/* 작은 상태 표시 (테두리 강조 대신 텍스트 배지) */
.dashboard-page .dashboard-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: var(--c-blue-soft);
  color: var(--c-blue);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.6;
}
.dashboard-page .dashboard-pill.is-warn {
  margin-left: 6px;
  background: var(--c-danger-soft);
  color: var(--c-danger-hover);
}
/* 목록형 패널 */
.dashboard-page .dashboard-recent {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
  align-items: stretch;
}
.dashboard-page .dashboard-list-panel {
  min-width: 0;
  margin: 0;
  padding: 0;
  border-radius: var(--r-md);
  overflow: hidden;
}
.dashboard-page .dashboard-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--c-line);
}
.dashboard-page .dashboard-list-heading h2 {
  margin: 0;
  font-size: var(--fs-md);
  font-weight: 600;
}
.dashboard-page .dashboard-list-heading a,
.dashboard-page .dashboard-list-heading > span {
  font-size: var(--fs-xs);
  color: var(--c-muted);
}
.dashboard-page .dashboard-list-heading a:hover {
  color: var(--c-blue);
}
.dashboard-page .dashboard-recent-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.dashboard-page .dashboard-recent-list > li + li {
  border-top: 1px solid var(--c-line);
}
.dashboard-page .dashboard-inquiry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 14px;
  align-items: center;
  min-height: 52px;
  padding: 7px 18px;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}
.dashboard-page .dashboard-inquiry-row:hover {
  background: var(--c-surface-2);
  color: var(--c-blue);
}
.dashboard-page .dashboard-row-title {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-base);
  font-weight: 500;
  line-height: 1.4;
}
.dashboard-page .dashboard-inquiry-row time {
  grid-column: 1;
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--c-muted);
}
.dashboard-page .dashboard-status {
  grid-column: 2;
  grid-row: 1 / 3;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--c-bg);
  color: var(--c-muted);
  font-size: var(--fs-xs);
  white-space: nowrap;
}
.dashboard-page .dashboard-status.is-pending {
  background: var(--c-blue-soft);
  color: var(--c-blue);
}
.dashboard-page .dashboard-activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 7px 18px;
}
.dashboard-page .dashboard-activity-copy,
.dashboard-page .dashboard-check-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.dashboard-page .dashboard-activity-copy .dashboard-row-title {
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
}
.dashboard-page .dashboard-row-target {
  overflow-wrap: anywhere;
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--c-muted);
}
.dashboard-page .dashboard-activity-row time {
  flex-shrink: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--c-muted);
  font-size: var(--fs-xs);
  line-height: 1.5;
}
.dashboard-page .dashboard-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 170px;
  margin: 0;
  padding: 24px 18px;
  color: var(--c-muted);
  font-size: var(--fs-sm);
  text-align: center;
}
/* 템플릿 점검 행 */
.dashboard-page .dashboard-check-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 10px 18px;
  transition: background-color 0.2s ease;
}
.dashboard-page .dashboard-check-row:hover {
  background: var(--c-surface-2);
}
.dashboard-page .dashboard-check-row .dashboard-row-title {
  white-space: normal;
}
.dashboard-page .dashboard-check-count {
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--admin-ink);
}
.dashboard-page .dashboard-check-count small {
  margin-left: 2px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-muted);
}
.dashboard-page .dashboard-check-count.is-zero {
  color: var(--c-faint);
}
.dashboard-page .dashboard-check-go {
  min-width: 64px;
  text-align: right;
  font-size: var(--fs-sm);
  color: var(--c-muted);
  white-space: nowrap;
}
.dashboard-page .dashboard-check-row:hover .dashboard-check-go {
  color: var(--c-blue);
}
/* 빠른 작업 */
.dashboard-page .quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 18px 18px;
}
.dashboard-page .quick-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--admin-border);
  border-radius: var(--r-sm);
  background: var(--c-surface-2);
  font-size: var(--fs-base);
  font-weight: 600;
  overflow-wrap: anywhere;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}
.dashboard-page .quick-links a:after {
  content: "→";
  margin-left: 8px;
  color: var(--c-faint);
  font-weight: 400;
  transition: color 0.2s ease;
}
.dashboard-page .quick-links a:hover,
.dashboard-page .quick-links a:focus-visible {
  background: var(--c-blue-soft);
  border-color: var(--c-blue-line);
  color: var(--c-blue);
}
.dashboard-page .quick-links a:hover:after {
  color: var(--c-blue);
}
@media (max-width: 1100px) {
  .dashboard-page .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 768px) {
  .dashboard-page .dashboard-recent {
    grid-template-columns: 1fr;
  }
  .dashboard-page .summary-grid {
    gap: 12px;
  }
}
@media (max-width: 520px) {
  .dashboard-page .summary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-page .summary-grid .panel {
    padding: 14px 16px;
  }
  .dashboard-page .summary-grid strong {
    font-size: var(--fs-xl);
  }
  .dashboard-page .quick-links {
    grid-template-columns: 1fr;
  }
  .dashboard-page .dashboard-list-heading,
  .dashboard-page .dashboard-inquiry-row,
  .dashboard-page .dashboard-activity-row,
  .dashboard-page .dashboard-check-row {
    padding-left: 14px;
    padding-right: 14px;
  }
  .dashboard-page .dashboard-activity-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
  .dashboard-page .dashboard-check-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .dashboard-page .dashboard-check-go {
    display: none;
  }
  .dashboard-page .dashboard-empty {
    min-height: 140px;
  }
}

/* Light Soft Glass login; isolated from Setup and internal pages. */
.auth-login {
  color-scheme: light;
  background-color: var(--c-blue-soft);
  background-image:
    radial-gradient(
      ellipse at 32% 28%,
      rgba(139, 207, 215, 0.23),
      transparent 32%
    ),
    radial-gradient(
      ellipse at 68% 46%,
      rgba(143, 176, 216, 0.22),
      transparent 35%
    ),
    radial-gradient(
      ellipse at 64% 76%,
      rgba(183, 172, 207, 0.15),
      transparent 29%
    );
  color: var(--c-ink);
  min-height: 100vh;
  min-height: 100svh;
  padding: 28px 20px;
  padding-bottom: calc(28px + 8vh);
  padding-bottom: calc(28px + 8svh);
}
.auth-login .login-panel {
  width: min(420px, 100%);
  padding: 28px 32px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--r-md);
  box-shadow:
    0 8px 28px rgba(38, 64, 94, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  -webkit-backdrop-filter: blur(28px);
  backdrop-filter: blur(28px);
}
.auth-login .login-panel h1 {
  margin: 0;
  font-size: var(--fs-xl);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.035em;
}
.auth-login .login-description {
  margin: 8px 0 0;
  color: var(--c-muted);
  font-size: var(--fs-base);
  line-height: 1.7;
}
.auth-login .environment-badge {
  margin: 0 0 16px;
}
.auth-login .login-feedback {
  display: flex;
  align-items: center;
  min-height: 12px;
  margin: 6px 0 2px;
}
.auth-login .alert {
  width: 100%;
  margin: 0;
  padding: 7px 10px;
  background: var(--c-danger-soft);
  border: 0;
  color: var(--c-danger);
  font-size: var(--fs-sm);
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.auth-login .login-field + .login-field {
  margin-top: 16px;
}
.auth-login .login-field label {
  margin: 0 0 6px;
  color: var(--c-text-2);
  font-size: var(--fs-base);
  font-weight: 500;
}
.auth-login .login-field input {
  display: block;
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.92);
  color: var(--c-ink);
  font-size: var(--fs-md);
  line-height: 1.5;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.auth-login .login-field input:focus {
  border-color: var(--c-focus);
  outline: none;
}
.auth-login .login-field input:focus-visible {
  outline: none;
  border-color: var(--c-focus);
  box-shadow: 0 0 0 2px rgba(23, 101, 168, 0.12);
}
.auth-login.pointer-focus .login-field input:focus-visible {
  box-shadow: none;
}
.auth-login .login-field input[aria-invalid="true"] {
  border-color: var(--c-danger);
}
.auth-login .field-error {
  margin: 4px 0 0;
  color: var(--c-danger);
  font-size: var(--fs-sm);
  line-height: 1.6;
}
.auth-login .field-error[hidden] {
  display: none;
}
.auth-login .login-field input:autofill {
  background: var(--c-surface);
  color: var(--c-ink);
  box-shadow: inset 0 0 0 1000px var(--c-surface);
}
.auth-login .login-field input:-webkit-autofill {
  caret-color: var(--c-ink);
  -webkit-text-fill-color: var(--c-ink);
  -webkit-box-shadow: inset 0 0 0 1000px var(--c-surface);
}
.auth-login .login-field input:-webkit-autofill:focus-visible {
  -webkit-box-shadow:
    inset 0 0 0 1000px var(--c-surface),
    0 0 0 2px rgba(23, 101, 168, 0.12);
}
.auth-login.pointer-focus .login-field input:-webkit-autofill:focus-visible {
  -webkit-box-shadow: inset 0 0 0 1000px var(--c-surface);
}
.auth-login .password-control {
  position: relative;
}
.auth-login .password-control input {
  padding-right: 50px;
}
.auth-login .password-toggle {
  position: absolute;
  top: 2px;
  right: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--c-muted);
  outline: none;
  transition: color 0.2s ease;
}
.auth-login .password-toggle[hidden] {
  display: none;
}
.auth-login .password-toggle:hover {
  color: var(--c-blue);
}
.auth-login .password-toggle:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: -4px;
}
.auth-login.pointer-focus .password-toggle:focus-visible {
  outline: none;
}
.auth-login .password-eye-slash {
  display: none;
}
.auth-login .password-toggle[aria-pressed="true"] .password-eye-slash {
  display: block;
}
.auth-login .caps-lock-hint {
  min-height: 16px;
  margin: 0;
  color: var(--c-danger);
  font-size: var(--fs-xs);
  line-height: 16px;
}
.auth-login .is-primary {
  margin-top: 16px;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--c-nav-hover);
  border-radius: var(--r-sm);
  background: var(--c-login-btn);
  color: var(--c-surface);
  font-size: var(--fs-md);
  font-weight: 600;
  transition:
    background-color 0.22s ease,
    border-color 0.22s ease;
}
.auth-login .is-primary:hover {
  background: var(--c-login-btn-hover);
  border-color: var(--c-nav-hover);
}
.auth-login .is-primary:focus-visible {
  background: var(--c-login-btn-hover);
  border-color: var(--c-focus);
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
}
.auth-login .is-primary:disabled {
  opacity: 0.72;
  cursor: wait;
  background: var(--c-login-btn);
  border-color: var(--c-nav-hover);
}
.auth-login .return {
  display: table;
  margin: 14px auto 0;
  padding: 3px 0;
  color: var(--c-text-2);
  font-size: var(--fs-sm);
  transition: color 0.2s ease;
}
.auth-login .return:hover {
  color: var(--c-blue);
}
.auth-login .return:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 4px;
}
@media (max-width: 520px) {
  .auth-login {
    padding: 24px 20px;
    padding-bottom: calc(24px + 8vh);
    padding-bottom: calc(24px + 8svh);
  }
  .auth-login .login-panel {
    padding: 22px 24px;
  }
  .auth-login .login-panel h1 {
    font-size: var(--fs-xl);
  }
}
@media (forced-colors: active) {
  .auth-login .login-field input:focus-visible {
    outline: 2px solid Highlight;
    outline-offset: 2px;
  }
}

/* ==================== 공통 목록 화면 ==================== */
/* Shared list UI. Loaded only by authenticated list pages, never edit forms. */
.admin-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding-bottom: 16px;
}
.admin-list-heading > div {
  min-width: 0;
  flex: 1;
}
.admin-list-heading > .button {
  flex-shrink: 0;
  margin: 0;
  white-space: nowrap;
}
.admin-list-panel {
  padding: 20px;
}
.admin-list-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
}
.admin-list-toolbar label {
  display: flex;
  flex: 1 1 140px;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  min-width: 0;
  font-size: var(--fs-sm);
}
.admin-list-toolbar .admin-list-search {
  flex: 2 1 200px;
}
.admin-list-toolbar.is-compact .admin-list-search {
  flex: 0 1 420px;
}
.admin-list-toolbar input,
.admin-list-toolbar select {
  width: 100%;
  margin: 0;
  min-width: 0;
  flex: none;
}
.admin-list-toolbar input,
.admin-list-toolbar select,
.admin-list-filter-actions .button {
  height: var(--control-h);
  box-sizing: border-box;
}
.admin-list-heading .muted {
  max-width: 800px;
}
.admin-list-filter-actions {
  display: flex;
  gap: 8px;
}
.admin-list-filter-actions .button {
  margin: 0;
  min-height: var(--control-h);
  white-space: nowrap;
}
.admin-list-summary,
.admin-list-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--admin-muted);
  font-size: var(--fs-sm);
}
.admin-list-summary {
  margin: 18px 0 12px;
}
.admin-list-summary p {
  margin: 0;
}
.admin-list-summary strong {
  color: var(--admin-ink);
  font-weight: 600;
}
/* Existing content-table supplies border, header, compact rows and hover. */
.admin-list-table .admin-list-order {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.admin-list-table .popup-thumbnail {
  width: 80px;
  height: 56px;
  max-width: 80px;
  max-height: 56px;
  object-fit: cover;
}
.admin-list-scroll:focus-visible {
  outline: 1px solid var(--admin-blue);
  outline-offset: 2px;
}
.admin-list-badge {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  background: var(--c-bg);
  color: var(--c-muted);
  font-size: var(--fs-xs);
  line-height: 1.3;
  white-space: nowrap;
}
.admin-list-badge.is-public,
.admin-list-badge.is-complete {
  background: var(--c-ok-soft);
  border-color: var(--c-ok-line);
  color: var(--c-ok-ink);
}
.admin-list-badge.is-pending {
  background: var(--c-blue-soft);
  border-color: var(--c-line);
  color: var(--c-blue);
}
.admin-list-badge.is-processing {
  background: var(--c-warn-soft);
  border-color: var(--c-warn-line);
  color: var(--c-warn-ink);
}
.admin-list-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
}
.admin-list-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: var(--fs-sm);
}
.admin-list-actions .admin-list-delete {
  color: var(--c-muted);
  transition: color 0.18s ease;
}
.admin-list-actions .admin-list-delete:hover,
.admin-list-actions .admin-list-delete:focus-visible {
  color: var(--c-danger);
}
.admin-list-table .admin-list-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--admin-muted);
}
.admin-list-bottom {
  margin-top: 16px;
}
.admin-list-pages {
  margin: 0;
  gap: 6px;
}
.admin-list-pages a,
.admin-list-pages .admin-list-page-current,
.admin-list-pages .admin-list-page-disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
}
.admin-list-pages .admin-list-page-current {
  background: var(--c-blue-soft);
  border: 1px solid var(--c-blue-line);
  color: var(--admin-blue);
  font-weight: 600;
}
.admin-list-pages .admin-list-page-disabled {
  color: var(--c-faint);
}
.activity-log-table {
  min-width: 780px;
}
.activity-log-table td:first-child,
.activity-log-table td:last-child {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 1024px) {
  .admin-list-toolbar .admin-list-search {
    flex-basis: 100%;
  }
}
/* 휴대폰: is-cards 표는 행마다 카드로 표시 (td의 data-label을 항목명으로 사용) */
@media (max-width: 600px) {
  .admin-list-table.is-cards {
    min-width: 0;
    table-layout: auto;
  }
  .admin-list-table.is-cards thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .admin-list-table.is-cards,
  .admin-list-table.is-cards tbody,
  .admin-list-table.is-cards tr,
  .admin-list-table.is-cards td {
    display: block;
    width: 100%;
  }
  .admin-list-table.is-cards tr {
    display: flex;
    flex-direction: column;
    margin: 0 0 10px;
    padding: 6px 14px;
    border: 1px solid var(--admin-border);
    border-radius: var(--r-md);
    background: var(--admin-surface);
  }
  .admin-list-table.is-cards td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--c-line);
    text-align: right;
  }
  .admin-list-table.is-cards td:last-child {
    border-bottom: 0;
  }
  .admin-list-table.is-cards td[data-label]:before {
    content: attr(data-label);
    flex: none;
    color: var(--admin-muted);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-align: left;
  }
  /* 카드 제목 칸: 맨 위에 항목명 없이 크게 */
  .admin-list-table.is-cards td.is-card-title {
    order: -1;
    display: block;
    text-align: left;
    padding-top: 10px;
    font-size: var(--fs-md);
    font-weight: 600;
  }
  .admin-list-table.is-cards td.is-card-title:before {
    display: none;
  }
  .admin-list-table.is-cards .admin-list-empty {
    text-align: center;
  }
  .admin-list-table.is-cards .admin-list-order {
    text-align: right;
  }
  .admin-list-scroll.has-cards,
  .admin-list-scroll:has(.is-cards) {
    overflow: visible;
  }
}
@media (max-width: 600px) {
  .admin-list-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 14px;
  }
  .admin-list-panel {
    padding: 16px;
  }
  .admin-list-toolbar label {
    flex-basis: calc(50% - 6px);
  }
  .admin-list-filter-actions {
    flex-basis: 100%;
  }
  .admin-list-filter-actions .button {
    flex: 1;
    justify-content: center;
  }
  .admin-list-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
  .admin-list-summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ==================== 공통 등록·수정 화면 ==================== */
/* Loaded only on the selected edit screens; list, auth and navigation stay unchanged. */
.admin-editor {
  --edit-padding: 24px;
}
.admin-editor .page-heading {
  margin-bottom: 18px;
  padding-bottom: 16px;
}
.admin-editor .panel {
  width: 100%;
  padding: var(--edit-padding);
  margin: 0 0 16px;
  box-sizing: border-box;
}
.admin-editor h2 {
  margin: 0 0 16px;
  font-size: var(--fs-lg);
}
.admin-editor form {
  min-width: 0;
}
.admin-editor label {
  margin: 16px 0 6px;
  font-size: var(--fs-sm);
}
.admin-editor
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.admin-editor select {
  width: 100%;
  min-height: var(--control-h);
}
.admin-editor textarea {
  min-height: 78px;
  line-height: 1.65;
}
.admin-editor .hint {
  margin: 6px 0 12px;
  font-size: var(--fs-sm);
  line-height: 1.65;
}
.admin-editor input,
.admin-editor textarea,
.admin-editor select,
.admin-editor img {
  scroll-margin-block: 110px;
}
.admin-editor label.check,
.admin-editor .site-mail-toggle,
.admin-editor .site-logo-reset {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  max-width: 100%;
  font-size: var(--fs-base);
  font-weight: 500;
  cursor: pointer;
}
.admin-editor .check input,
.admin-editor .site-mail-toggle input,
.admin-editor .site-logo-reset input {
  flex-shrink: 0;
}
.admin-editor .alert,
.admin-editor .success {
  width: 100%;
  margin: 0 0 16px;
  box-shadow: none;
}
.admin-editor .popup-preview,
.admin-editor .template-thumb {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  margin: 12px 0;
}
.admin-editor .admin-edit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  margin: 20px 0 0;
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid var(--admin-border);
  border-radius: 0;
  background: var(--admin-surface);
  box-shadow: none;
  box-sizing: border-box;
}
.admin-editor .admin-edit-actions .is-primary,
.admin-editor .admin-edit-actions .button {
  min-width: 112px;
  min-height: var(--control-h);
}
.admin-editor .main-editor-save.admin-edit-actions {
  padding: 12px calc(var(--edit-padding) + 1px);
  justify-content: space-between;
  flex-wrap: nowrap;
  background: var(--c-surface);
  border-top-color: var(--c-line);
  box-shadow: 0 -3px 10px -5px rgba(23, 37, 54, 0.16);
}
.admin-editor .main-editor-save .is-primary {
  background: var(--c-blue);
  border-color: var(--c-blue);
  color: var(--c-surface);
}
.admin-editor .main-editor-save .is-primary:hover {
  background: var(--c-blue-hover);
  border-color: var(--c-blue-hover);
}
.admin-editor .main-editor-save > div {
  border: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
}
@media (max-width: 768px) {
  .admin-editor {
    --edit-padding: 18px;
  }
  .admin-editor .main-editor-save.admin-edit-actions {
    position: static;
    flex-wrap: wrap;
    width: 100%;
    box-shadow: none;
  }
  .admin-editor .main-editor-save .is-primary {
    width: 100%;
  }
}
@media (max-width: 520px) {
  .admin-editor .admin-edit-actions .button,
  .admin-editor .admin-edit-actions .is-primary {
    flex: 1;
    min-width: 0;
  }
  .admin-editor .admin-edit-actions {
    gap: 10px;
  }
}

/* Shared editor tabs, native checkbox switches and optional sticky actions. */
.main-content-tabs,
.admin-edit-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.main-content-tabs a,
.admin-edit-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-h);
  padding: 8px 16px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  color: var(--c-muted);
  font-size: var(--fs-base);
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}
.main-content-tabs a:hover,
.admin-edit-tabs button:hover {
  background: var(--c-surface-2);
  border-color: var(--c-blue-line);
  color: var(--c-blue);
}
.main-content-tabs a[aria-current="page"],
.admin-edit-tabs button[aria-selected="true"] {
  background: var(--c-blue-soft);
  border-color: var(--c-blue-line);
  color: var(--c-blue-hover);
  font-weight: 600;
}
/* 공개 스위치 — 모든 화면 공통 (.switch + .switch-track + .switch-text)
 * <label class="switch"><input type="checkbox" role="switch"><span class="switch-track" aria-hidden="true"></span><span class="switch-text">공개</span></label>
 * 목록의 즉시 전환 버튼(.template-toggle)도 같은 .switch-track 모양을 씁니다. */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  margin: 10px 0 8px;
  cursor: pointer;
  user-select: none;
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--c-ink);
}
.switch input[type="checkbox"] {
  position: absolute;
  left: 0;
  top: 50%;
  width: var(--switch-w);
  height: var(--switch-h);
  min-height: 0;
  margin: 0;
  opacity: 0;
  transform: translateY(-50%);
  cursor: pointer;
}
/* 트랙: 꺼짐 회색 / 켜짐 파랑. 손잡이는 흰 원 + 얇은 그림자, 튕김 없는 부드러운 이동 */
.switch-track {
  position: relative;
  display: block;
  flex: 0 0 var(--switch-w);
  width: var(--switch-w);
  height: var(--switch-h);
  border-radius: var(--r-pill);
  background: var(--c-switch-off);
  box-shadow: inset 0 0 0 1px rgba(23, 37, 54, 0.06);
  transition:
    background-color 0.2s ease,
    box-shadow 0.15s ease;
}
.switch-track:after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: calc(var(--switch-h) - 4px);
  height: calc(var(--switch-h) - 4px);
  border-radius: var(--r-pill);
  background: var(--c-surface);
  box-shadow:
    0 1px 2px rgba(23, 37, 54, 0.24),
    0 0 0 0.5px rgba(23, 37, 54, 0.08);
  transition:
    transform 0.2s cubic-bezier(0.2, 0, 0, 1),
    width 0.12s ease;
}
.switch:hover .switch-track,
.template-toggle:hover .switch-track {
  background: var(--c-switch-off-hover);
}
.switch input:checked + .switch-track,
.template-toggle.is-on .switch-track {
  background: var(--c-blue);
  box-shadow: none;
}
.switch:hover input:checked + .switch-track,
.template-toggle.is-on:hover .switch-track {
  background: var(--c-blue-hover);
}
.switch input:checked + .switch-track:after,
.template-toggle.is-on .switch-track:after {
  transform: translateX(calc(var(--switch-w) - var(--switch-h)));
}
/* 누르는 동안 손잡이가 살짝 늘어나는 피드백 */
.switch:active .switch-track:after,
.template-toggle:active .switch-track:after {
  width: calc(var(--switch-h) + 1px);
}
.switch:active input:checked + .switch-track:after,
.template-toggle.is-on:active .switch-track:after {
  transform: translateX(calc(var(--switch-w) - var(--switch-h) - 5px));
}
.switch input:focus-visible + .switch-track,
.template-toggle:focus-visible .switch-track {
  outline: none;
  box-shadow: var(--ring);
}
.template-toggle:focus-visible {
  outline: none;
}
.switch input:disabled + .switch-track {
  opacity: 0.5;
}
.switch:has(input:disabled) {
  cursor: not-allowed;
  color: var(--c-faint);
}
.admin-sticky-actions {
  position: sticky;
  bottom: 12px;
  z-index: 10;
}
.admin-editor .admin-sticky-actions.admin-edit-actions {
  padding: 12px var(--edit-padding);
  justify-content: space-between;
  flex-wrap: nowrap;
  background: var(--c-surface);
  box-shadow: 0 -3px 10px -5px rgba(23, 37, 54, 0.16);
}
.admin-editor .admin-sticky-buttons .is-primary,
.admin-editor .admin-sticky-buttons .button {
  min-width: 112px;
}
@media (max-width: 768px) {
  .admin-sticky-note {
    flex-basis: 100%;
  }
  .admin-sticky-buttons {
    width: 100%;
  }
  .admin-editor .admin-sticky-buttons .is-primary,
  .admin-editor .admin-sticky-buttons .button {
    flex: 1;
  }
  .admin-edit-tabs button {
    flex: 1 0 auto;
    min-height: 44px;
  }
  .admin-editor .admin-sticky-actions.admin-edit-actions {
    position: static;
    flex-wrap: wrap;
    width: 100%;
    box-shadow: none;
  }
  .admin-editor .admin-sticky-actions .is-primary {
    width: 100%;
  }
}

/* ==================== 웹솔루션 템플릿 · 카테고리 ==================== */
.template-editor select {
  width: 100%;
}
.template-list-table {
  min-width: 760px;
  table-layout: fixed;
}
.template-list-table th:first-child {
  width: 40%;
}
.template-list-table th:nth-child(2) {
  width: 16%;
}
.template-list-table th:nth-child(3) {
  width: 15%;
}
.template-list-table th:nth-child(4) {
  width: 14%;
}
.template-list-table th:last-child {
  width: 15%;
}
.template-list-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.template-list-thumbnail {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 80px;
  width: 80px;
  height: 56px;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: var(--r-sm);
  background: var(--c-bg);
}
.template-list-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 썸네일이 없는 로컬 데모: 1280px 화면을 80px로 축소한 실시간 미리보기 */
.template-list-thumbnail iframe {
  position: absolute;
  left: 0;
  top: 0;
  width: 1280px;
  height: 896px;
  border: 0;
  transform: scale(0.0625);
  transform-origin: 0 0;
  pointer-events: none;
}
.template-list-placeholder {
  font-size: var(--fs-xs);
  color: var(--c-muted);
  white-space: nowrap;
}
.template-list-copy {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.template-list-table .template-list-title {
  color: var(--admin-ink);
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.template-list-id {
  font-size: var(--fs-xs);
  color: var(--admin-muted);
}
.template-file-missing {
  color: var(--c-danger);
  font-weight: 600;
}
.template-list-table tr.is-file-missing {
  background: var(--c-danger-faint);
}
.template-category-hidden {
  display: block;
  margin-top: 4px;
  color: var(--admin-muted);
  font-size: var(--fs-xs);
}
.template-thumb {
  display: block;
  width: 100%;
  max-width: 380px;
  max-height: 260px;
  object-fit: contain;
  margin: 12px 0;
}
.template-demo-preview {
  max-width: 380px;
  height: 240px;
  overflow: hidden;
  background: var(--c-line);
  margin: 12px 0;
}
.template-demo-preview iframe {
  width: 1280px;
  height: 810px;
  border: 0;
  transform: scale(0.296875);
  transform-origin: 0 0;
  pointer-events: none;
}

/* 템플릿 · 카테고리 탭 */
.template-tabs {
  display: flex;
  gap: 4px;
  margin: -6px 0 18px;
  border-bottom: 1px solid var(--admin-border);
}
.template-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--admin-muted);
  font-weight: 600;
  font-size: var(--fs-md);
}
.template-tabs a:hover {
  color: var(--admin-blue);
}
.template-tabs a[aria-current="page"] {
  color: var(--admin-ink);
  border-bottom-color: var(--admin-blue);
}

/* 공개 상태 스위치 */
.template-toggle-form {
  margin: 0;
}
.template-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}
/* 정렬순서 입력 */
.template-sort-input {
  width: 86px;
  min-height: 34px;
  padding: 4px 8px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.template-sort-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* 업로드된 데모 불러오기 */
.template-demo-picker {
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid var(--admin-border);
  border-radius: var(--r-md);
  background: var(--c-surface-2);
}
.template-demo-picker form {
  margin: 0;
}
.template-demo-picker label {
  margin-top: 0;
}
.template-demo-picker-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.template-demo-picker-row select {
  flex: 1;
  min-width: 0;
}
.template-demo-picker-row .button {
  flex: none;
  min-height: var(--control-h);
}
.template-missing-note a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 등록 대기 / 파일 없음 점검 패널 */
.template-check {
  margin-bottom: 18px;
}
.template-check-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.template-check-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.template-check-head h2 span {
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--c-warn-soft);
  color: var(--c-warn-ink);
}
.template-check-head form {
  margin: 0;
}
.template-check-head .button {
  margin: 0;
  min-height: 36px;
  padding: 6px 14px;
}
.template-check.is-missing {
  border-color: var(--c-danger-line);
  background: var(--c-danger-faint);
}
.template-check.is-missing .template-check-head h2 span {
  background: var(--c-danger-soft);
  color: var(--c-danger-hover);
}
.template-check > .hint {
  margin: 8px 0 0;
}
.template-check ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  border-top: 1px solid var(--admin-border);
}
.template-check li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--admin-border);
}
.template-check li > div:first-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.template-check li span {
  font-size: var(--fs-sm);
  color: var(--admin-muted);
  overflow-wrap: anywhere;
}
.admin-list-badge.is-warning {
  background: var(--c-danger-soft);
  border-color: var(--c-danger-line);
  color: var(--c-danger-hover);
}

@media (max-width: 640px) {
  .template-demo-picker-row {
    flex-direction: column;
    align-items: stretch;
  }
  .template-check li {
    flex-direction: column;
    align-items: flex-start;
  }
  .template-sort-actions .button {
    width: 100%;
  }
}

/* ==================== 계정정보 ==================== */
.account-settings .account-grid {
  grid-template-columns: minmax(0, 7fr) minmax(0, 13fr);
  gap: 0;
  align-items: stretch;
  padding: 0;
}
.account-settings .account-grid > section {
  min-width: 0;
  padding: var(--edit-padding);
}
.account-settings .account-info {
  border-right: 1px solid var(--admin-border);
}
.account-settings dl {
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 10px 8px;
  margin: 0;
  font-size: var(--fs-sm);
}
.account-settings dd {
  font-variant-numeric: tabular-nums;
}
.account-settings .account-caps-hint + label,
.account-settings #account-password-policy + label {
  margin-top: 12px;
}
.account-settings .account-password form > label:first-of-type {
  margin-top: 0;
}
.account-settings #account-password-policy {
  margin: 4px 0 8px;
}
.account-password-control {
  position: relative;
}
.account-settings .account-password-control input {
  padding-right: 48px;
}
.account-settings .account-password-control input::-ms-reveal,
.account-settings .account-password-control input::-ms-clear {
  display: none;
}
.account-password-toggle {
  position: absolute;
  right: 2px;
  top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--c-muted);
  transition:
    color 0.18s,
    background-color 0.18s;
}
.account-password-toggle[hidden] {
  display: none;
}
.account-password-toggle svg {
  width: 18px;
  height: 18px;
}
.account-password-toggle:hover {
  color: var(--c-blue);
  background: var(--c-surface-2);
}
.account-password-toggle:focus-visible {
  outline: 1px solid var(--admin-focus);
  outline-offset: -2px;
}
.account-eye-slash {
  display: none;
}
.account-password-toggle[aria-pressed="true"] .account-eye-slash {
  display: block;
}
.account-settings .account-caps-hint {
  min-height: 14px;
  margin: 2px 0 0;
  font-size: var(--fs-xs);
  line-height: 14px;
  color: var(--c-danger);
}
.account-settings .account-password-match {
  min-height: 16px;
  margin: 3px 0 0;
  color: var(--c-danger);
  font-size: var(--fs-sm);
}
.account-password-match.is-match {
  color: var(--c-ok-ink);
}
.account-settings .admin-edit-actions {
  margin-top: 10px;
  padding-top: 12px;
}
.account-settings .admin-edit-actions .is-primary {
  flex: 0 1 auto;
}
@media (max-width: 768px) {
  .account-settings .account-info {
    border-right: 0;
    border-bottom: 1px solid var(--admin-border);
  }
  .account-settings .account-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== 작업기록 ==================== */
.activity-log-page .activity-log-toolbar {
  display: grid;
  grid-template-columns:
    minmax(150px, 1fr) minmax(190px, 1.35fr) minmax(140px, 0.9fr)
    auto;
  gap: 12px;
  align-items: end;
}
.activity-log-toolbar .admin-list-filter-actions {
  justify-content: flex-end;
}
.activity-log-toolbar .activity-filter-dates {
  grid-column: 1/-1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 220px));
  gap: 12px;
}
.activity-log-page .activity-filter-date-hint {
  grid-column: 1/-1;
  margin: 0;
}
.activity-log-page .activity-filter-dates[hidden] {
  display: none;
}
.activity-log-page .activity-log-table {
  min-width: 880px;
  table-layout: fixed;
}
.activity-log-page .activity-log-table th:first-child {
  width: 165px;
}
.activity-log-page .activity-log-table th:nth-child(2) {
  width: 150px;
}
.activity-log-page .activity-log-table th:nth-child(3) {
  width: 150px;
}
.activity-log-page .activity-log-table th:last-child {
  width: 85px;
}
.activity-log-page .activity-log-table td {
  padding-top: 10px;
  padding-bottom: 10px;
  overflow-wrap: anywhere;
  vertical-align: middle;
}
.activity-log-page .activity-log-table td:last-child,
.activity-log-page .activity-log-table th:last-child {
  text-align: right;
}
.activity-log-page .activity-log-entry-id {
  display: block;
  margin-top: 3px;
  color: var(--admin-muted);
  font-size: var(--fs-xs);
}
.activity-log-page .activity-log-table .admin-list-badge {
  line-height: 1.4;
  padding: 4px 8px;
  font-size: var(--fs-xs);
}
@media (max-width: 1100px) {
  .activity-log-page .activity-log-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .activity-log-toolbar .activity-filter-dates {
    grid-row: 3;
  }
}
@media (max-width: 600px) {
  .activity-log-page .activity-log-toolbar {
    grid-template-columns: 1fr;
  }
  .activity-log-toolbar .activity-filter-dates {
    grid-row: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .activity-log-toolbar .admin-list-filter-actions {
    grid-column: 1/-1;
  }
}

/* ==================== 문의 목록 · 상세 ==================== */
.inquiry-detail h2 {
  overflow-wrap: anywhere;
}
.inquiry-detail dl {
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px 16px;
  margin: 0 0 16px;
  font-size: var(--fs-base);
}
.inquiry-detail .inquiry-original {
  border-top: 1px solid var(--admin-border);
  padding-top: 20px;
  margin-top: 20px;
}
.inquiry-detail .inquiry-text {
  margin: 0;
  overflow-wrap: anywhere;
}
.inquiry-detail .inquiry-detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.inquiry-detail-links .button {
  margin: 0;
}
.inquiry-list-table .admin-list-badge.is-processing,
.inquiry-detail .admin-list-badge.is-processing {
  background: var(--c-warn-soft);
  border-color: var(--c-warn-line);
  color: var(--c-warn-ink);
}
.inquiry-list-table {
  min-width: 900px;
}
.inquiry-list-table th:nth-child(7),
.inquiry-list-table td:nth-child(7) {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 520px) {
  .inquiry-detail dl {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 8px 10px;
  }
}

/* ==================== 문의 삭제 ==================== */
.inquiry-delete {
  width: 100%;
  max-width: 700px;
}
.inquiry-delete dl {
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px 16px;
  margin: 0 0 20px;
  font-size: var(--fs-base);
}
.admin-editor .inquiry-delete .admin-edit-actions {
  justify-content: space-between;
  margin-top: 16px;
}
.inquiry-delete .admin-edit-actions .is-primary {
  background: var(--c-danger);
  border-color: var(--c-danger);
}
.inquiry-delete .admin-edit-actions .is-primary:hover {
  background: var(--c-danger-hover);
  border-color: var(--c-danger-hover);
}
.inquiry-delete .admin-edit-actions .is-primary:focus-visible {
  outline: 2px solid var(--c-danger);
  outline-offset: 3px;
}
.inquiry-delete .admin-edit-actions .is-primary:disabled {
  cursor: wait;
}
@media (max-width: 520px) {
  .inquiry-delete dl {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 8px 10px;
  }
}

/* ==================== 메인페이지 관리 ==================== */
.main-editor-form input,
.main-editor-form textarea {
  scroll-margin-block: 90px;
}
.main-editor-required {
  color: var(--c-danger);
}
.main-editor-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.main-editor-section-head h2 {
  margin: 0;
}
.main-editor-image-block {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--admin-border);
}
.main-editor-image-block h3 {
  margin: 0 0 12px;
  font-size: var(--fs-md);
}
.main-editor-image-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}
.main-editor-image-grid > div {
  min-width: 0;
}
.main-editor-image-grid label:first-child {
  margin-top: 0;
}
.main-editor-image-label {
  margin: 0 0 8px;
  color: var(--admin-muted);
  font-size: var(--fs-sm);
}
.main-editor-image-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 156px;
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.main-editor-image-stage .main-content-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 210px;
  object-fit: contain;
  margin: 0;
}
.main-editor-image-stage [hidden] {
  display: none;
}
.main-editor-image-empty {
  padding: 20px;
  color: var(--c-muted);
  text-align: center;
  font-size: var(--fs-sm);
  line-height: 1.7;
}
.main-editor-image-empty strong {
  display: block;
  color: var(--c-text-2);
  font-weight: 500;
}
.main-editor-image-empty p {
  margin: 6px 0 0;
}
.main-editor-original {
  display: inline-block;
  margin-top: 8px;
  font-size: var(--fs-sm);
  color: var(--admin-blue);
}
.main-editor-form .main-editor-reset {
  width: max-content;
  max-width: 100%;
  font-size: var(--fs-sm);
}
.main-editor-save {
  position: sticky;
  bottom: 12px;
  z-index: 10;
  justify-content: space-between;
}
.main-editor-form {
  width: 100%;
  margin: 0;
  padding-bottom: 12px;
}
.main-editor-form > :not(.main-editor-save) {
  scroll-margin-bottom: 120px;
}
.main-editor-save > div {
  min-width: 0;
}
.main-editor-save strong {
  display: block;
  font-size: var(--fs-base);
}
.main-editor-save span {
  display: block;
  margin-top: 4px;
  font-size: var(--fs-sm);
  color: var(--admin-muted);
}
.main-editor-save .is-primary {
  min-width: 144px;
  min-height: var(--control-h);
}
@media (max-width: 768px) {
  .main-editor-image-grid {
    grid-template-columns: 1fr;
  }
  .main-editor-save {
    position: static;
    flex-wrap: wrap;
  }
  .main-editor-save .is-primary {
    width: 100%;
  }
  .main-editor-image-stage {
    min-height: 140px;
  }
  .main-content-tabs a {
    flex: 1 0 auto;
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .switch-track,
  .switch-track:before,
  .switch-track:after,
  .main-content-tabs a {
    transition: none;
  }
}

/* ==================== 팝업 게시기간 ==================== */
.popup-period-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.popup-period-options[hidden],
[data-popup-period] [hidden] {
  display: none;
}
.popup-period-options .check {
  margin: 0 10px 0 0;
  font-weight: 400;
}
.popup-period-option {
  font: inherit;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-sm);
  background: var(--c-surface-2);
  color: var(--c-ink);
  padding: 9px 15px;
  min-height: var(--control-h);
}
.popup-period-option[aria-pressed="true"] {
  background: var(--c-blue);
  border-color: var(--c-blue);
  color: var(--c-surface);
}
.popup-period-preview {
  padding: 12px 16px;
  background: var(--c-blue-soft);
  border-radius: var(--r-md);
  overflow-wrap: anywhere;
}

/* ==================== 개인정보처리방침 ==================== */
.privacy-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.privacy-editor-heading > div {
  min-width: 0;
}
.privacy-editor-heading > .button {
  flex-shrink: 0;
  margin: 0;
  white-space: nowrap;
}
.privacy-editor-form {
  padding-bottom: 12px;
}
.privacy-editor-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}
.privacy-editor-fields > div {
  min-width: 0;
}
.privacy-editor-fields label {
  margin-top: 0;
}
.privacy-editor-variables {
  margin: 8px 0 12px;
  color: var(--admin-muted);
  font-size: var(--fs-sm);
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.privacy-editor-variables p {
  margin: 4px 0;
}
.privacy-editor-variables code {
  font-size: inherit;
  color: var(--c-text-2);
}
.admin-editor .privacy-editor-form #privacy-body {
  min-height: 500px;
  resize: vertical;
  scroll-margin-bottom: 120px;
}
.privacy-editor-body-info {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 8px;
  color: var(--admin-muted);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.privacy-editor-body-info.is-invalid {
  color: var(--c-danger);
}
.privacy-editor-form > .panel {
  scroll-margin-bottom: 120px;
}
.admin-editor .privacy-editor-save.admin-edit-actions {
  border: 1px solid var(--c-line);
}
.privacy-editor-change {
  min-height: 20px;
  color: var(--c-muted);
  font-size: var(--fs-sm);
}
@media (max-width: 768px) {
  .privacy-editor-fields {
    grid-template-columns: 1fr;
  }
  .privacy-editor-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 14px;
  }
  .privacy-editor-save .privacy-editor-change {
    flex-basis: 100%;
  }
}

/* ==================== 사이트 정보 ==================== */
.site-settings-asset-preview {
  display: block;
  max-width: 280px;
  max-height: 130px;
  object-fit: contain;
  padding: 12px;
  margin: 12px 0;
  background: var(--c-ink);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-md);
}
.site-logo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.site-logo-editor {
  min-width: 0;
}
.site-logo-editor h3 {
  margin: 0;
  font-size: var(--fs-md);
}
.site-logo-previews {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}
.site-logo-previews > div {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-md);
  padding: 12px;
}
.site-logo-previews .is-dark {
  background: var(--c-ink);
}
.site-logo-previews .is-light {
  background: var(--c-line);
}
.site-logo-previews img {
  max-width: 100%;
  max-height: 76px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.site-logo-editor .site-logo-reset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  margin: 8px 0;
  font-weight: 400;
  font-size: var(--fs-base);
}
.site-logo-reset input {
  width: auto;
  margin: 0;
}
.site-logo-editor input[type="file"] {
  max-width: 100%;
}
.site-settings-form [hidden] {
  display: none;
}
.site-settings-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}
.site-settings-field {
  min-width: 0;
}
.site-settings-field.is-wide {
  grid-column: 1/-1;
}
.site-settings-fields .site-settings-field label {
  margin-top: 0;
}
.site-settings-section + .site-settings-section,
.site-logo-help + .site-settings-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--admin-border);
}
.site-settings-og-preview {
  width: auto;
  max-width: 100%;
  background: var(--c-bg);
}
.site-logo-editor .site-logo-reset-button {
  margin: 10px 0 0;
  min-height: 36px;
  padding: 6px 12px;
  font-size: var(--fs-sm);
  font-weight: 500;
}
.site-logo-reset-button[aria-pressed="true"] {
  border-color: var(--c-blue-line);
  background: var(--c-blue-soft);
  color: var(--c-blue-hover);
}
.site-logo-status {
  min-height: 40px;
}
.site-settings-form > .panel {
  scroll-margin-bottom: 120px;
}
.site-settings-form {
  padding-bottom: 12px;
}
.admin-editor .site-settings-save.admin-edit-actions {
  border: 1px solid var(--c-line);
}
.site-settings-save > span {
  color: var(--admin-muted);
  font-size: var(--fs-sm);
}
@media (max-width: 768px) {
  .site-logo-grid,
  .site-settings-fields {
    grid-template-columns: 1fr;
  }
  .site-settings-save > span {
    flex-basis: 100%;
  }
  .site-logo-status {
    min-height: 0;
  }
}
@media (max-width: 600px) {
  .site-settings-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==================== 접속통계 ==================== */
/* Statistics only: collection, aggregation and other admin screens are unchanged. */
.stats-dashboard {
  min-width: 0;
}
.stats-dashboard .page-heading {
  margin-bottom: 20px;
  padding-bottom: 16px;
}
.stats-dashboard .stats-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stats-dashboard .stats-cards .panel {
  padding: 18px 20px;
  margin: 0;
}
.stats-dashboard .stats-cards h2 {
  margin: 0 0 12px;
  font-size: var(--fs-base);
  color: var(--c-text-2);
}
.stats-dashboard .stats-cards p {
  margin: 6px 0;
  color: var(--admin-muted);
  font-size: var(--fs-sm);
}
.stats-dashboard .stats-cards strong {
  font-size: var(--fs-2xl);
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.stats-dashboard .stats-cards small {
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--admin-muted);
}
.stats-dashboard .stats-views {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--c-line);
}
.stats-dashboard .stats-views b {
  font-size: var(--fs-lg);
  color: var(--c-text-2);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.stats-dashboard .stats-trend-panel {
  margin-top: 20px;
}
.stats-dashboard .stats-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--admin-border);
}
.stats-dashboard .stats-periods {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
}
.stats-dashboard .stats-periods a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-h);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  color: var(--c-muted);
  font-size: var(--fs-sm);
  transition:
    background-color 0.18s,
    border-color 0.18s;
}
.stats-dashboard .stats-periods a:hover {
  background: var(--c-surface-2);
  border-color: var(--c-blue-line);
}
.stats-dashboard .stats-periods a[aria-current] {
  background: var(--c-blue-soft);
  border-color: var(--c-blue-line);
  color: var(--c-blue);
  font-weight: 600;
}
.stats-dashboard .stats-range {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
}
.stats-dashboard .stats-range label {
  margin: 0;
  flex: 1;
  min-width: 140px;
  max-width: 180px;
  font-size: var(--fs-sm);
}
.stats-dashboard .stats-range input {
  display: block;
  margin-top: 6px;
  height: var(--control-h);
  font-size: var(--fs-base);
}
.stats-dashboard .stats-range .button {
  margin: 0;
  white-space: nowrap;
  height: var(--control-h);
}
.stats-dashboard .stats-trend-caption {
  font-weight: 600;
  margin: 18px 0 10px;
  font-size: var(--fs-base);
  font-variant-numeric: tabular-nums;
}
.stats-dashboard .stats-legend {
  display: flex;
  gap: 20px;
  font-size: var(--fs-sm);
  margin-bottom: 10px;
  color: var(--c-text-2);
}
.stats-dashboard .stats-legend span:before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 0;
  border-top: 3px solid;
  vertical-align: middle;
  margin-right: 7px;
}
.stats-dashboard .stats-visitors:before {
  border-color: var(--c-blue);
}
.stats-dashboard .stats-pageviews:before {
  border-color: var(--c-faint);
  border-top-style: dashed;
}
.stats-dashboard .stats-chart {
  position: relative;
  overflow-x: auto;
  margin-bottom: 12px;
  scrollbar-width: thin;
}
.stats-dashboard .stats-chart svg {
  display: block;
  width: 100%;
  min-width: 600px;
}
.stats-dashboard .stats-axis-label {
  font-family: inherit;
  font-size: var(--fs-base);
  fill: var(--c-text-2);
}
.stats-dashboard .stats-gridline {
  stroke: var(--c-line);
  stroke-width: 1;
}
.stats-dashboard .stats-line {
  fill: none;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}
.stats-dashboard .stats-line-visitors {
  stroke: var(--c-blue);
}
.stats-dashboard .stats-line-views {
  stroke: var(--c-faint);
  stroke-dasharray: 5 3;
}
.stats-dashboard .stats-dot-visitors {
  fill: var(--c-blue);
  pointer-events: none;
}
.stats-dashboard .stats-dot-views {
  fill: var(--c-faint);
  pointer-events: none;
}
.stats-dashboard .stats-hit {
  fill: transparent;
  cursor: crosshair;
}
.stats-dashboard .stats-hit:hover,
.stats-dashboard .stats-hit:focus {
  fill: rgba(23, 101, 168, 0.07);
}
.stats-dashboard .stats-tooltip {
  position: absolute;
  top: 18px;
  left: 16px;
  max-width: calc(100% - 32px);
  margin: 0;
  background: var(--c-ink);
  color: var(--c-surface);
  padding: 8px 12px;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  pointer-events: none;
  z-index: 1;
}
.stats-dashboard .stats-tooltip[hidden],
.stats-dashboard [data-stats-daily-toggle][hidden],
.stats-dashboard .stats-trend tr[hidden] {
  display: none;
}
.stats-dashboard .stats-chart-mobile {
  display: none;
}
.stats-dashboard .stats-daily-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--admin-border);
}
.stats-dashboard .stats-daily-heading h3 {
  margin: 0;
  font-size: var(--fs-md);
  font-weight: 600;
}
.stats-dashboard .stats-daily-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.stats-dashboard .stats-daily-heading span {
  font-size: var(--fs-sm);
  color: var(--admin-muted);
}
.stats-dashboard .stats-daily-heading .button {
  margin: 0;
  min-height: 34px;
  padding: 6px 12px;
  font-size: var(--fs-sm);
}
.stats-dashboard .stats-trend {
  min-width: 0;
  table-layout: fixed;
}
.stats-dashboard .stats-trend td,
.stats-dashboard .stats-trend th {
  padding: 9px 10px;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.stats-dashboard .stats-trend td:not(:first-child),
.stats-dashboard .stats-trend th:not(:first-child) {
  text-align: right;
}
.stats-dashboard .stats-daily-scroll:focus-visible {
  outline: 1px solid var(--admin-blue);
  outline-offset: 2px;
}
.stats-dashboard .stats-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}
.stats-dashboard .stats-analysis-panel {
  margin: 0;
  min-width: 0;
  padding: 20px;
}
.stats-dashboard .stats-analysis-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.stats-dashboard .stats-analysis-heading h2 {
  margin: 0;
  font-size: var(--fs-md);
}
.stats-dashboard .stats-analysis-heading > span {
  font-size: var(--fs-xs);
  color: var(--admin-muted);
  white-space: nowrap;
}
.stats-dashboard .stats-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: var(--fs-sm);
}
.stats-dashboard .stats-table td,
.stats-dashboard .stats-table th {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--admin-border);
  overflow-wrap: anywhere;
}
.stats-dashboard .stats-table th:last-child,
.stats-dashboard .stats-table td:last-child {
  width: 90px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.stats-dashboard .stats-page-label {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.stats-dashboard .stats-table .stats-empty {
  height: 120px;
  width: auto;
  text-align: center;
  color: var(--admin-muted);
}
.stats-dashboard .stats-retention {
  padding: 18px 20px;
  background: var(--c-surface-2);
}
.stats-dashboard .stats-retention h2 {
  font-size: var(--fs-md);
  margin: 0 0 8px;
}
.stats-dashboard .stats-retention p {
  margin: 6px 0;
  font-size: var(--fs-sm);
}
.stats-dashboard .stats-retention form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.stats-dashboard .stats-check {
  display: inline-flex;
  max-width: 100%;
  margin: 0;
  font-size: var(--fs-sm);
}
.stats-dashboard .stats-retention .is-primary {
  margin: 0;
  min-height: var(--control-h);
  font-size: var(--fs-sm);
}
@media (max-width: 1100px) {
  .stats-dashboard .stats-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats-dashboard .stats-range {
    flex: 1 1 100%;
  }
}
@media (max-width: 768px) {
  .stats-dashboard .stats-detail-grid {
    grid-template-columns: 1fr;
  }
  .stats-dashboard .stats-chart-mobile {
    display: block;
  }
  .stats-dashboard .stats-range label {
    max-width: none;
  }
  .stats-dashboard .stats-range .button {
    flex: 1;
  }
  .stats-dashboard .stats-trend-panel,
  .stats-dashboard .stats-analysis-panel {
    padding: 18px;
  }
}
@media (max-width: 520px) {
  .stats-dashboard .stats-cards {
    grid-template-columns: 1fr;
  }
  .stats-dashboard .stats-range {
    gap: 10px;
  }
  .stats-dashboard .stats-range label {
    min-width: 0;
    flex: 1 1 calc(50% - 5px);
  }
  .stats-dashboard .stats-range .button {
    flex-basis: 100%;
  }
  .stats-dashboard .stats-daily-heading > div {
    justify-content: space-between;
    width: 100%;
  }
  .stats-dashboard .stats-retention .is-primary {
    width: 100%;
  }
}

/* ==================== 화면 구조 공통 (메뉴 알림 · 목록 · 문의 상세) ==================== */
/* 왼쪽 메뉴 알림 숫자 */
.sidebar .nav-link {
  position: relative;
}
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--c-blue);
  color: var(--c-surface);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 769px) {
  .sidebar-collapsed .nav-badge {
    position: absolute;
    top: 6px;
    right: 12px;
    min-width: 8px;
    width: 8px;
    height: 8px;
    padding: 0;
    font-size: 0;
    box-shadow: 0 0 0 2px var(--c-nav);
  }
}

/* 공지 · 팝업 목록 */
.content-list-title {
  display: block;
  color: var(--c-ink);
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.content-table a.content-list-title:hover {
  color: var(--c-blue);
}
.content-list-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  color: var(--c-muted);
  font-size: var(--fs-xs);
}
.content-list-meta .admin-list-badge {
  padding: 2px 7px;
  font-size: var(--fs-xs);
}
.content-list-date,
.content-list-period {
  color: var(--c-text-2);
  font-size: var(--fs-sm);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.content-edit-switches {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin-top: 14px;
}

/* 문의 상세 */
.inquiry-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.inquiry-detail-head h2 {
  margin: 0;
}
.inquiry-contact {
  color: var(--c-blue);
}
.inquiry-contact:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.inquiry-tracking {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--c-surface-2);
  font-size: var(--fs-sm);
  gap: 6px 16px;
}
.inquiry-detail .inquiry-detail-links {
  align-items: center;
}
.inquiry-pager {
  display: inline-flex;
  gap: 8px;
}
.inquiry-delete-link {
  margin-left: auto;
  color: var(--c-danger);
}
.inquiry-delete-link:hover {
  border-color: var(--c-danger-line);
  background: var(--c-danger-faint);
  color: var(--c-danger-hover);
}

/* 처리 상태 등 하나만 고르는 버튼 묶음 (라디오) */
.segmented {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.segmented legend {
  margin: 0 0 7px;
  padding: 0;
  font-size: var(--fs-base);
  font-weight: 600;
}
.admin-editor .segmented legend {
  font-size: var(--fs-sm);
}
.segmented label {
  position: relative;
  display: inline-flex;
  margin: 0;
  font-weight: 500;
  cursor: pointer;
}
.segmented label + label {
  margin-left: -1px;
}
.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.segmented span {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-h);
  padding: 0 18px;
  border: 1px solid var(--c-line-strong);
  background: var(--c-surface);
  color: var(--c-text-2);
  font-size: var(--fs-base);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
.segmented label:first-of-type span {
  border-radius: var(--r-sm) 0 0 var(--r-sm);
}
.segmented label:last-of-type span {
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.segmented label:hover span {
  background: var(--c-surface-2);
  color: var(--c-ink);
}
.segmented input:checked + span {
  position: relative;
  z-index: 1;
  border-color: var(--c-blue);
  background: var(--c-blue-soft);
  color: var(--c-blue-hover);
  font-weight: 600;
}
.segmented input:focus-visible + span {
  z-index: 2;
  box-shadow: var(--ring);
}

@media (max-width: 600px) {
  .activity-log-page .activity-log-table.is-cards,
  .inquiry-list-table.is-cards {
    min-width: 0;
    table-layout: auto;
  }
  .content-list-meta {
    justify-content: flex-start;
  }
  .inquiry-pager {
    order: 3;
    width: 100%;
  }
  .inquiry-pager .button {
    flex: 1;
  }
}

/* ==================== 접근성 공통 ==================== */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
@media (forced-colors: active) {
  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible {
    outline: 2px solid Highlight;
    outline-offset: 2px;
    box-shadow: none;
  }
}
