/* ============================================================
   관리자 — 사이드바 + 상단바 + 패널 레이아웃
   ============================================================ */
:root { --adm-side-w: 248px; --adm-top-h: 56px; --adm-bg: #f3f6f9; }
body.adm { background: var(--adm-bg); min-height: 100vh; }

/* ── 사이드바 ─────────────────────────────────────────────── */
.adm-side {
  position: fixed; inset: 0 auto 0 0; width: var(--adm-side-w); z-index: 60;
  display: flex; flex-direction: column; background: var(--color-primary-deep); color: rgba(255,255,255,0.8);
}
.adm-brand { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px; color: #fff; font-weight: var(--weight-semibold); border-bottom: 1px solid rgba(255,255,255,0.1); text-decoration: none !important; }
.adm-brand img { height: 28px; width: auto; filter: brightness(0) invert(1); }
.adm-nav { flex: 1; overflow-y: auto; padding: 8px 10px 12px; scrollbar-width: none; }
.adm-nav::-webkit-scrollbar { display: none; }
.adm-nav-title { margin: 10px 10px 2px; font-size: 0.65rem; font-weight: var(--weight-bold); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.4); }
.adm-nav-item { display: flex; align-items: center; gap: 9px; padding: 4px 10px; min-height: 30px; border-radius: var(--radius-sm); color: rgba(255,255,255,0.8); font-size: 0.875rem; text-decoration: none !important; transition: background var(--duration); }
.adm-nav-item .ico { flex-shrink: 0; opacity: 0.7; }
.adm-nav-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.adm-nav-item.is-active { background: var(--color-primary); color: #fff; }
.adm-nav-item.is-active .ico { opacity: 1; }
.adm-count { font-size: 0.7rem; font-weight: var(--weight-semibold); padding: 1px 7px; border-radius: var(--radius-full); background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.75); font-variant-numeric: tabular-nums; }
.adm-nav-item.is-active .adm-count { background: rgba(255,255,255,0.25); color: #fff; }
.adm-side-foot { padding: 10px 16px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.8125rem; }
.adm-side-foot a { display: inline-flex; align-items: center; gap: 5px; color: rgba(255,255,255,0.75); }
.adm-side-foot a:hover, .adm-side-foot a.is-active { color: #fff; text-decoration: none; }
.adm-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(8,61,94,0.5); }

/* ── 본문 영역 ────────────────────────────────────────────── */
.adm-main { margin-left: var(--adm-side-w); min-height: 100vh; display: flex; flex-direction: column; }
.adm-topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; height: var(--adm-top-h); padding: 0 28px; background: rgba(255,255,255,0.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--color-border); }
.adm-menu-btn { display: none; width: 40px; height: 40px; border: 0; background: none; color: var(--color-heading); border-radius: var(--radius-sm); margin-left: -8px; }
.adm-crumbs { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 0.875rem; color: var(--color-text-muted); min-width: 0; overflow: hidden; }
.adm-crumbs a { color: var(--color-text-muted); white-space: nowrap; }
.adm-crumbs a + *, .adm-crumbs span + * { position: relative; padding-left: 14px; }
.adm-crumbs a + *::before, .adm-crumbs span + *::before { content: "›"; position: absolute; left: 2px; color: var(--color-text-subtle); }
.adm-crumbs span { color: var(--color-heading); font-weight: var(--weight-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-topbar-actions { display: flex; gap: 8px; flex-shrink: 0; }
.adm-topbar-actions .btn .ico { margin-right: -2px; }
.adm-content { flex: 1; padding: 24px 28px 64px; max-width: 1280px; width: 100%; }
.adm-flashes { margin-bottom: 16px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.5rem; margin-bottom: 4px; }
.page-head p { margin: 0; font-size: var(--text-body-sm); max-width: 70ch; }
.adm-search { display: flex; align-items: center; gap: 6px; }
.adm-search-box { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px 0 12px; background: #fff; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); color: var(--color-text-subtle); }
.adm-search-box:focus-within { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-soft); }
.adm-search-box input { border: 0; outline: 0; background: none; min-width: 200px; font-size: 0.9rem; color: var(--color-text); }

/* ── 통계 타일 ────────────────────────────────────────────── */
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 16px 18px; display: grid; gap: 2px; }
.stat span { font-size: var(--text-caption); color: var(--color-text-muted); }
.stat strong { font-size: 1.75rem; color: var(--color-heading); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat small { font-size: 0.75rem; color: var(--color-text-subtle); }
.stat a { font-size: var(--text-caption); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.recent-list li { padding: 10px 18px; border-bottom: 1px solid var(--color-border); font-size: var(--text-body-sm); }
.recent-list li:last-child { border-bottom: 0; }
.recent-list a { display: block; color: var(--color-text); font-weight: var(--weight-medium); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-list a:hover { color: var(--color-primary); }
.recent-meta { display: block; margin-top: 3px; font-size: var(--text-caption); color: var(--color-text-subtle); }
.recent-meta .badge { font-size: 0.65rem; margin-right: 4px; }

/* ── 패널 ─────────────────────────────────────────────────── */
.panel { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.panel--narrow { max-width: 520px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--color-border); flex-wrap: wrap; }
.panel-head h2 { font-size: 1rem; margin: 0; }
.panel-head small { flex-basis: 100%; }
.panel-body { padding: 18px; }
.panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--color-border); }
.panel-foot .pagination { margin: 0; }
.panel-foot--actions { justify-content: flex-end; background: var(--color-surface-alt); border-radius: 0 0 var(--radius-md) var(--radius-md); }
.panel--sticky { position: sticky; top: calc(var(--adm-top-h) + 20px); }

/* ── 표 ───────────────────────────────────────────────────── */
/* body 의 overflow-wrap:anywhere 는 단어 중간을 끊을 수 있게 해서 칸의 min-content 를
   '한 글자' 까지 떨어뜨린다. 표에서는 그 때문에 제목 열이 52px 로 눌려 글자가 세로로 쌓인다.
   break-word 는 넘칠 때만 끊고 min-content 는 '가장 긴 단어' 로 유지한다. */
.adm-table td, .adm-table th { overflow-wrap: break-word; }
/* 좁은 화면에서는 표를 욱여넣지 말고 .table-wrap 이 가로로 스크롤되게 한다.
   (cf-list 의 row-table 이 이미 쓰는 방식과 같다. 900px 이상에서는 컨테이너가 더 넓어 영향 없음) */
@media (max-width: 900px) { .adm-table { min-width: 720px; } }
.adm-table th, .adm-table td { padding: 11px 14px; vertical-align: middle; }
.adm-table thead th { background: var(--color-surface-alt); }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table--rows tbody tr { cursor: pointer; transition: background var(--duration); }
.adm-table--rows tbody tr:hover { background: var(--color-accent-soft); }
.adm-table tr.is-hidden td { opacity: 0.5; }
.adm-table .row-title { color: var(--color-heading); font-weight: var(--weight-semibold); }
.adm-table .row-title + .badge { margin-left: 6px; }
.adm-table .thumb { width: 60px; height: 42px; object-fit: cover; border-radius: 4px; border: 1px solid var(--color-border); background: #fff; }
.adm-table .thumb--empty { display: inline-grid; place-items: center; color: var(--color-text-subtle); background: var(--color-surface-sunken); }
.adm-table .col-thumb { width: 76px; }
.adm-table .actions { text-align: right; white-space: nowrap; width: 1%; }
.adm-table .actions .btn + .inline-form { margin-left: 4px; }
.adm-table .ellipsis { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-table .nowrap, .adm-table .num, .adm-table thead th { white-space: nowrap; }
.adm-table a { color: var(--color-text); }
.adm-table a:hover { color: var(--color-primary); }
.block { display: block; }
.btn-icon { padding-inline: 8px; }
.btn-icon:hover { color: var(--color-danger); background: var(--color-danger-soft); }

/* ── 폼 레이아웃 (본문 + 사이드 패널) ─────────────────────── */
.adm-form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.adm-form-main { min-width: 0; }
.adm-form-side { min-width: 0; }
.side-note { padding: 0 4px; }
.small { font-size: var(--text-caption); }

.field, .form .field { display: block; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field-label { display: block; margin-bottom: 5px; font-size: var(--text-caption); font-weight: var(--weight-semibold); color: var(--color-text-muted); }
.field input:not([type="checkbox"]), .field select, .field textarea {
  display: block; width: 100%; padding: 9px 12px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); background: #fff; font-size: 0.95rem; line-height: 1.5; margin: 0;
}
.field textarea { resize: vertical; min-height: 0; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--color-accent); outline: none; box-shadow: 0 0 0 3px var(--color-accent-soft); }
.field small { display: block; margin-top: 5px; font-size: 0.75rem; color: var(--color-text-subtle); }
.field-label small { display: inline; margin: 0 0 0 4px; font-weight: 400; }
.field--title input { font-size: 1.125rem; font-weight: var(--weight-semibold); padding: 12px 14px; }
.field .uppercase { text-transform: uppercase; }
.field-grid { display: grid; gap: 14px; }
.field-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-grid .field { margin-bottom: 0; }
.form .field { font-weight: var(--weight-regular); }
.req { color: var(--color-danger); }

/* 스위치 */
.switch, .form .switch { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; cursor: pointer; font-size: var(--text-body-sm); font-weight: var(--weight-regular); }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { display: inline-block; position: relative; width: 38px; height: 22px; border-radius: 11px; background: var(--color-border-strong); transition: background var(--duration); flex-shrink: 0; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.25); transition: transform var(--duration); }
.switch input:checked + .switch-track { background: var(--color-primary); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--color-accent); outline-offset: 2px; }

/* 첨부파일 */
/* 단일 컬럼이지만 트랙을 minmax(0,1fr) 로 못 박는다. auto 트랙이면 li 의 min-content
   (긴 파일명·URL 이 nowrap 이라 400px 가까이 된다) 아래로 줄지 못해 좁은 화면에서 카드를 뚫고 나간다. */
.file-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-bottom: 12px; }
.file-item { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-alt); }
.file-item .thumb { width: 56px; height: 40px; object-fit: cover; border-radius: 4px; border: 1px solid var(--color-border); background: #fff; }
.file-item .thumb--empty { display: inline-grid; place-items: center; color: var(--color-text-subtle); }
.file-name { flex: 1; min-width: 0; font-size: var(--text-body-sm); font-weight: var(--weight-medium); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name small { display: block; font-weight: 400; font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; }
.file-remove { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-caption); color: var(--color-danger); cursor: pointer; white-space: nowrap; }
.file-item:has(.file-remove input:checked) { opacity: 0.5; text-decoration: line-through; }
.dropzone { display: block; padding: 22px 16px; border: 2px dashed var(--color-border-strong); border-radius: var(--radius-md); text-align: center; cursor: pointer; transition: border-color var(--duration), background var(--duration); }
.dropzone:hover, .dropzone.is-over { border-color: var(--color-accent); background: var(--color-accent-soft); }
.dropzone input, .form .dropzone input[type="file"] { display: none; }
.dropzone-text { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-body-sm); font-weight: var(--weight-medium); color: var(--color-primary); }
.dropzone-files { display: block; margin-top: 6px; font-size: var(--text-caption); }

/* 행 편집 표 (정박지·선석) */
.row-table th, .row-table td { padding: 6px 6px; }
.row-table thead th { font-size: 0.7rem; }
.row-table td input { width: 100%; padding: 7px 9px; border: 1px solid var(--color-border-strong); border-radius: 4px; font-size: 0.875rem; }
.row-table td input:focus { border-color: var(--color-accent); outline: none; box-shadow: 0 0 0 2px var(--color-accent-soft); }
.row-table .actions { width: 44px; }
.row-table-empty { padding: 14px 18px; margin: 0; font-size: var(--text-caption); }
.row-table tbody:empty + template + .row-table-empty { display: block; }

/* TinyMCE 테두리 맞춤 */
.tox-tinymce { border-radius: var(--radius-sm) !important; border-color: var(--color-border-strong) !important; }

/* 메뉴 표시 설정 */
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.menu-group .panel-head { align-items: center; }
.menu-group .switch--head { margin: 0; }
.menu-group .switch--head h2 { font-size: 1rem; margin: 0; }
.menu-group .panel-head small { flex-basis: auto; margin-left: auto; font-size: 0.72rem; }
.menu-pages li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 18px; border-bottom: 1px solid var(--color-border); }
.menu-pages li:last-child { border-bottom: 0; }
.menu-pages .switch { margin: 0; flex: 1; min-width: 0; }
.menu-page-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-page-label small { color: var(--color-text-subtle); font-size: 0.75rem; }
.menu-page-url { font-size: 0.7rem; color: var(--color-text-subtle); white-space: nowrap; font-family: ui-monospace, Consolas, monospace; }
.menu-pages li.is-off .menu-page-label, .menu-pages li.is-off .menu-page-url { opacity: 0.45; text-decoration: line-through; }
.menu-group.is-off .menu-pages { opacity: 0.45; }
.adm-count--warn { background: rgba(255, 190, 90, 0.25); color: #ffd28a; }

/* ── 로그인 ───────────────────────────────────────────────── */
.adm-login-page { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: linear-gradient(135deg, var(--color-primary-deep), var(--color-primary)); }
.adm-login { width: 100%; max-width: 380px; background: #fff; border-radius: var(--radius-lg); padding: 36px 32px 28px; box-shadow: var(--shadow-lg); display: grid; gap: 6px; }
.adm-login img { margin: 0 auto 6px; }
.adm-login h1 { text-align: center; font-size: 1.25rem; margin: 0; }
.adm-login > .muted { text-align: center; font-size: var(--text-caption); margin-bottom: 14px; }
.adm-login .field { margin-bottom: 8px; }
.adm-login .switch { margin: 6px 0 14px; }
.adm-login-back { text-align: center; font-size: var(--text-caption); color: var(--color-text-muted); margin-top: 10px; }

/* ── 홈페이지 내용 편집 (content_form.html) ─────────────────── */
.adm-nav-item .adm-nav-sub { display: none; }
.cf-form .panel-body.cf-item { padding: 14px 18px; border-bottom: 1px solid var(--color-border); }
.cf-form .panel-body.cf-item:last-child { border-bottom: 0; }
.cf-form .field { margin-bottom: 0; }
.cf-form .field-label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cf-badge { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--color-accent-soft); color: var(--color-primary-dark); font-style: normal; font-size: 0.68rem; font-weight: var(--weight-semibold); }
.cf-reset { margin-left: auto; font-size: 0.72rem; padding: 2px 8px; color: var(--color-text-subtle); }
.cf-reset:hover { color: var(--color-primary); }
.cf-list { padding: 0; }
.cf-list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px 8px; flex-wrap: wrap; }
.cf-list-head .field-label { margin: 0; }
.cf-list-actions { display: flex; gap: 6px; margin-left: auto; }
.cf-hint { margin: 0; padding: 0 18px 8px; font-size: 0.75rem; }
.cf-list .table-wrap { border-top: 1px solid var(--color-border); }
.cf-list .row-table { min-width: 100%; }
/* 열이 3개 이상인 표는 좁은 화면에서 찌그러지지 않고 가로 스크롤 */
.cf-list .row-table[data-cols="3"], .cf-list .row-table[data-cols="4"] { min-width: 640px; }
.cf-list .row-table[data-cols="5"], .cf-list .row-table[data-cols="6"] { min-width: 820px; }
.cf-list + .cf-item, .cf-item + .cf-list { border-top: 1px solid var(--color-border); }
.row-table td textarea, .row-table td select { width: 100%; padding: 7px 9px; border: 1px solid var(--color-border-strong); border-radius: 4px; font-size: 0.875rem; font-family: inherit; line-height: 1.5; background: #fff; }
.row-table td textarea { resize: none; min-height: 36px; overflow: hidden; }
.row-table td textarea:focus, .row-table td select:focus { border-color: var(--color-accent); outline: none; box-shadow: 0 0 0 2px var(--color-accent-soft); }
.row-table .actions--row { width: 104px; white-space: nowrap; }
.row-table .actions--row .btn-icon { min-width: 28px; padding: 4px; }
.cf-image-row { display: grid; grid-template-columns: minmax(160px, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
.cf-preview { margin: 0; width: 100%; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: repeating-conic-gradient(#f1f4f8 0 25%, #fff 0 50%) 0 0 / 16px 16px; overflow: hidden; }
.cf-preview img { display: block; width: 100%; height: 100%; }
.cf-image-side small { display: block; margin: 8px 0; font-size: 0.75rem; color: var(--color-text-subtle); line-height: 1.5; }
.cf-image-side .switch { margin: 4px 0 0; }
.cf-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
@media (max-width: 700px) { .cf-image-row { grid-template-columns: minmax(0, 1fr); } .cf-preview { max-width: 100% !important; } }

/* ── 반응형 ───────────────────────────────────────────────── */
@media (max-width: 1100px) { .adm-form-layout { grid-template-columns: minmax(0, 1fr); } .adm-form-side { order: -1; } .panel--sticky { position: static; } .dash-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .adm-side { transform: translateX(-100%); transition: transform 0.25s var(--ease); }
  body.adm-side-open .adm-side { transform: translateX(0); }
  /* 서랍이 열려 있는 동안 뒤 본문은 멈춘다 (공개 쪽 body.drawer-open 과 같은 동작).
     사이드바가 서랍인 구간(≤900px)에서만 잠가야, 넓은 화면으로 돌렸을 때 스크롤이 묶이지 않는다. */
  body.adm-side-open { overflow: hidden; }
  .adm-backdrop[hidden] { display: none; }
  .adm-main { margin-left: 0; }
  .adm-menu-btn { display: inline-grid; place-items: center; }
  .adm-topbar { padding: 0 16px; }
  .adm-content { padding: 16px 16px 48px; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-grid--2, .field-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .adm-topbar-actions .btn span, .adm-topbar-actions .btn { font-size: 0.78rem; }
}

/* ── 개선 (2026-10) ─────────────────────────────────────────── */
.switch-help { display: block; margin: -8px 0 14px 48px; font-size: 0.78rem; line-height: 1.5; }
.flash a { margin-left: 8px; font-weight: 600; color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.adm-search select { height: 36px; padding: 0 8px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); background: #fff; font-size: 0.85rem; color: var(--color-text); }
/* 드롭다운 (대시보드 Congestion 바로가기) */
.adm-dropdown { position: relative; }
.adm-dropdown > summary { list-style: none; cursor: pointer; }
.adm-dropdown > summary::-webkit-details-marker { display: none; }
.adm-dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; padding: 6px; background: #fff; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(15, 30, 50, .12); }
.adm-dropdown-menu a { display: block; padding: 8px 10px; border-radius: 4px; color: var(--color-text); text-decoration: none; font-size: 0.88rem; }
.adm-dropdown-menu a:hover, .adm-dropdown-menu a:focus-visible { background: var(--color-accent-soft); }
.badge-warn { background: #fff4e0; color: #9a5b00; text-decoration: none; }
a.badge-warn:hover { background: #ffe8bf; text-decoration: none; }
/* 상태 탭 (Q&A 전체 / 답변 대기) */
.adm-tabs { display: inline-flex; padding: 3px; margin-right: 6px; background: var(--color-surface-alt); border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); }
.adm-tabs a { padding: 5px 12px; border-radius: 4px; font-size: 0.85rem; color: var(--color-text-muted); text-decoration: none; white-space: nowrap; }
.adm-tabs a.is-active { background: #fff; color: var(--color-text); font-weight: 600; box-shadow: 0 1px 2px rgba(15, 30, 50, .08); }
.adm-tabs b { margin-left: 2px; color: #9a5b00; }
/* Q&A 답변 패널 */
.qna-meta { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 16px; font-size: 0.88rem; }
.qna-meta dt { color: var(--color-text-subtle); }
.qna-meta dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 900px) { .adm-search { flex-wrap: wrap; } }
/* 좁은 화면: 검색 상자의 min-width:200px 가 폼을 두 줄로 접는다.
   상자를 늘어나게 바꾸면 한 줄에 들어오고, 남는 공간은 그대로 다 쓴다. */
@media (max-width: 700px) {
  .adm-search { width: 100%; flex-wrap: nowrap; }
  .adm-search-box { flex: 1 1 90px; min-width: 0; }
  .adm-search-box input { min-width: 0; width: 100%; }
}
/* 상단바가 좁으면 '현재 위치' 가 먼저 잘려 두 글자만 남았다.
   현재 위치는 끝까지 보이게 두고, 상위 경로가 대신 줄어들게 한다. */
@media (max-width: 700px) {
  .adm-crumbs a { min-width: 0; flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; }
  .adm-crumbs > span:last-child { flex-shrink: 0; }
}

/* ── 좁은 화면 보정 ──────────────────────────────────────────
   상단바: 햄버거(40) + 액션 버튼 3개 + 좌우 여백 이 320px 를 넘겨서
   버튼이 화면 밖으로 밀려나가므로, 아주 좁을 때만 여백을 줄인다. */
@media (max-width: 400px) {
  .adm-topbar { padding: 0 10px; gap: 8px; }
  .adm-topbar-actions { gap: 4px; }
  .adm-topbar-actions .btn { padding-inline: 8px; }
}

/* 입력칸 글자가 16px 미만이면 iOS Safari 가 입력칸을 누를 때 화면을 확대하고,
   그 뒤로 페이지가 가로로 밀려 넘치는 것처럼 보인다. 좁은 화면에서만 16px 로 올린다. */
@media (max-width: 768px) {
  .field input:not([type="checkbox"]), .field select, .field textarea,
  .row-table td input, .row-table td textarea, .row-table td select,
  .adm-search-box input, .adm-search select { font-size: 16px; }
}
