/* 관리 화면 (APS-8 · APS-11 · APS-13) — 목업 mockups/console.html 의 색·간격을 따른다 */
body { font-family: system-ui, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif; margin: 0; background: #f6f7f9; color: #1f2933; font-size: 14px; }
header { background: #1f3a5f; color: #fff; padding: 12px 20px; font-weight: 600; display: flex; align-items: center; gap: 12px; }
header .who { font-weight: 400; font-size: 13px; }
main.narrow { max-width: 480px; margin: 48px auto; }
/* 관리 화면은 전체 폭 (APS-19) — 본문 폭 제한 없이 좌우 여백만 둔다 */
main.wide { margin: 0; padding: 24px 28px; }
.card { background: #fff; border-radius: 8px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.1); margin-bottom: 14px; }
h1 { font-size: 20px; margin: 0 0 4px; }
h3 { margin: 0 0 6px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.end { justify-content: flex-end; margin-top: 12px; }
.row.tabs { margin: 12px 0; gap: 6px; }
.sp { flex: 1; }
.btn { display: inline-block; padding: 8px 14px; border-radius: 6px; border: 0; background: #1f6feb; color: #fff; text-decoration: none; cursor: pointer; font-size: 14px; }
.btn.sub { background: #e4e7eb; color: #1f2933; }
.btn.sm { padding: 5px 10px; font-size: 13px; margin: 2px; }
.btn.on { background: #1f6feb; color: #fff; }
.msg { padding: 10px 12px; border-radius: 6px; background: #fff4e5; color: #8a4b00; margin: 0 0 14px; }
body > .msg { margin: 16px 28px 0; }
.err { color: #b42318; }
.hidden { display: none !important; }
.hint { color: #616e7c; font-size: 13px; }
.muted { color: #616e7c; font-size: 12px; }
.mono { font-family: ui-monospace, Consolas, monospace; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #e4e7eb; vertical-align: top; }
th { font-size: 12px; color: #616e7c; font-weight: 600; white-space: nowrap; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: #e4e7eb; white-space: nowrap; }
.p-ok { background: #e3f6e8; color: #1a7f37; }
.p-warn { background: #fff4e5; color: #8a4b00; }
.p-info { background: #e5effd; color: #1f4e9c; }
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.steps div { display: flex; flex-direction: column; }
.steps span { color: #616e7c; font-size: 12px; }
dialog { border: 0; border-radius: 8px; padding: 20px; width: min(600px, 94vw); box-shadow: 0 8px 30px rgba(0,0,0,.25); }
dialog label { display: block; margin: 8px 0; font-size: 13px; color: #3e4c59; }
dialog input, dialog select, dialog textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; padding: 7px 9px; border: 1px solid #cbd2d9; border-radius: 6px; font: inherit; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.checks label { display: flex; gap: 8px; align-items: center; }
.checks input { width: auto; display: inline; margin: 0; }
h2 { font-size: 16px; margin: 0; }
.filters { gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.filters select, .filters input, #demoQ { padding: 6px 8px; border: 1px solid #cbd2d9; border-radius: 6px; font: inherit; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.stat { background: #fff; border-radius: 8px; padding: 12px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.stat .k { font-size: 12px; color: #616e7c; }
.stat .v { font-size: 22px; font-weight: 600; margin: 2px 0; }
.stat .d { font-size: 12px; color: #616e7c; }
.bar { height: 10px; background: #e4e7eb; border-radius: 5px; overflow: hidden; margin-top: 12px; }
.bar i { display: block; height: 100%; background: #1f6feb; }
th.num, td.num { text-align: right; white-space: nowrap; }
/* 표 (APS-19) — 짧은 칸(상태·종류·숫자·금액·일시·단추)은 줄바꿈하지 않고, 좁으면 칸을 접지 않고 가로로 스크롤한다.
   일시는 'MM/DD HH:MM' 한 줄 + 시차(UTC+09:00)를 작게 — 둘 사이에서만 접혀 2줄을 넘지 않는다 */
.tablewrap { overflow-x: auto; }
.tablewrap > table { min-width: 720px; }
.tablewrap > table.hist { min-width: 1040px; }
.nw, td.acts { white-space: nowrap; }
.tz { font-size: 11px; color: #616e7c; font-family: ui-monospace, Consolas, monospace; white-space: nowrap; }
.p-bad { background: #fde8e8; color: #b42318; }
.btn.bad { background: #b42318; color: #fff; }
/* 왼쪽 메뉴 (APS-18, 목업 nav.side). 지금 화면은 .on + aria-current. 1024 폭 이하에서는 접어 두고 ☰ 로 편다 */
.layout { display: flex; align-items: flex-start; min-height: calc(100vh - 48px); }
.layout .content { flex: 1; min-width: 0; }
nav.side { width: 200px; flex: none; align-self: stretch; background: #fff; border-right: 1px solid #e4e7eb; padding: 12px 0; display: flex; flex-direction: column; }
nav.side button, nav.side a { display: block; width: 100%; text-align: left; padding: 10px 20px; border: 0; background: none; color: #1f2933; font: inherit; text-decoration: none; cursor: pointer; box-sizing: border-box; }
nav.side button:hover, nav.side a:hover { background: #f0f2f5; }
nav.side .on { background: #e5effd; color: #1f4e9c; font-weight: 600; box-shadow: inset -3px 0 0 #1f6feb; }
nav.side .side-link { margin-top: 12px; border-top: 1px solid #e4e7eb; padding-top: 14px; color: #616e7c; }
nav.side :focus-visible, .menu-btn:focus-visible { outline: 2px solid #1f6feb; outline-offset: -2px; }
.menu-btn { display: none; padding: 6px 10px; border: 1px solid rgba(255,255,255,.4); border-radius: 6px; background: none; color: #fff; font: inherit; cursor: pointer; }
@media (max-width: 1024px) {
  main.wide { padding: 16px; }
  body > .msg { margin: 12px 16px 0; }
  .menu-btn { display: inline-block; }
  .layout { flex-direction: column; align-items: stretch; min-height: 0; }
  nav.side { display: none; width: auto; border-right: 0; border-bottom: 1px solid #e4e7eb; }
  nav.side.open { display: flex; }
  nav.side .on { box-shadow: inset 3px 0 0 #1f6feb; }
}
