/* 2026-10-14 2단계 — 오른쪽 공공데이터 수집 현황(pubstatus.js) · 목록 고치기·작업 버튼·일괄생성(caselist.js) · 보고서 창(reportpop.js)
   흰 바탕 · 남색 1색 · 강조(실패 빨강·진행 노랑)만 색 */

/* ---------- 2단계 배치: [드롭] → [목록] | [공공데이터 수집 현황] */
.stage[data-stage="2"] .flow { grid-template-columns: 230px 40px minmax(0, 1fr) minmax(360px, 34%); }
.pub-col { display: grid; gap: 10px; min-width: 0; align-content: start; }
.pub-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 10px 12px; display: grid; gap: 6px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.pub-card > * { min-width: 0; }
.pub-h { display: flex; align-items: center; gap: 6px; }
.pub-h h3 { font-size: 14.5px; }
.pub-sub { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 12.5px; min-height: 0; }
.pub-sub:empty { display: none; }
.ps-case { font-weight: 600; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ps-st { color: var(--ink2); }
.ps-st.busy { color: var(--warn); font-weight: 600; }
.ps-spin { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border: 2px solid var(--human-line); border-top-color: transparent; border-radius: 50%; animation: ps-rot .9s linear infinite; vertical-align: -1px; }
@keyframes ps-rot { to { transform: rotate(360deg); } }
.ps-legend { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--ink2); }
.ps-legend b { font-weight: 700; }
.ps-wrap { max-height: 46vh; }
.ps-grid { font-size: 12px; }
.ps-grid th { font-size: 10.5px; padding: 4px 2px; white-space: normal; word-break: break-all; line-height: 1.2; min-width: 0; vertical-align: bottom; text-align: center; }
.ps-grid td { padding: 3px 2px; }
.ps-grid td.nw { padding-right: 4px; }
.ps-a1 th, .ps-a1 td { padding: 4px 4px; }
.ps-grid tfoot td { background: var(--bg2); position: sticky; bottom: 0; border-top: 1px solid var(--line); }
.sy { text-align: center; font-weight: 700; cursor: help; }
.sy.ok { color: var(--ok); }
.sy.none { color: var(--muted); }
.sy.err { color: var(--bad); background: var(--bad-bg); }
.sy.off { color: var(--warn); }
.sy.skip { color: var(--line2); }
.sy.run { color: var(--warn); background: var(--human); }
.ps-bad { color: var(--bad); font-weight: 600; }
.ps-notes { margin: 2px 0 0; padding-left: 16px; color: var(--ink2); max-height: 140px; overflow: auto; }
.ps-notes li.bad { color: var(--bad); }
.ps-a1 { font-size: 12px; }

/* ---------- 목록: 체크 · 작업 버튼 · 고치기 줄 · 일괄생성 진행 */
#c-list .cl-chk { width: 30px; }
#c-list .cl-acts { white-space: nowrap; text-align: right; }
#c-list .cl-acts .btn { margin-left: 3px; padding: 3px 8px; }
#c-list .cl-acts-h { text-align: right; }
#c-list .cl-acts .btn.lk-edit, #c-list .cl-acts .btn.lk-del { margin-left: 3px; }
#c-list .cl-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 360px; }
#c-list .pp-bdg.rep { cursor: pointer; }
#c-list .pp-bdg.rep:hover { outline: 1px solid var(--ok); }
#c-list tr.cl-edit td { background: #fff; padding: 8px; }
.ce-box { display: grid; gap: 8px; border: 1px solid var(--navy2); border-radius: 6px; padding: 10px; background: var(--navy-bg); }
.ce-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; }
.ce-grid label { display: grid; gap: 2px; font-size: 12px; color: var(--ink2); }
.ce-grid label.wide { grid-column: span 3; }
.ce-grid input { font-size: 13px; padding: 5px 7px; }
.ce-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ce-acts .bad { color: var(--bad); }
.cl-mask { font-size: 10.5px; color: var(--warn); background: var(--human); border-radius: 3px; padding: 0 4px; margin-left: 3px; }
.cl-bprog { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; background: var(--bg2); display: grid; gap: 6px; }
.cl-bprog[hidden] { display: none; }
.cl-bh { display: flex; align-items: center; gap: 8px; }
.cl-bl { margin: 0; padding-left: 20px; display: grid; gap: 3px; max-height: 220px; overflow: auto; font-size: 13px; }
.cl-bs { display: inline-block; min-width: 58px; text-align: center; font-size: 11px; border-radius: 4px; padding: 0 5px; background: #fff; border: 1px solid var(--line); color: var(--ink2); }
.cl-bs.run { background: var(--human); border-color: var(--human-line); color: var(--warn); }
.cl-bs.ok { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.cl-bs.bad { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.cl-bs.warn { color: var(--warn); }

/* ---------- 보고서 창 */
.rpp { position: fixed; inset: 0; z-index: 72; background: rgba(27, 33, 48, .38); display: flex; align-items: stretch; justify-content: center; padding: 14px; }
.rpp[hidden] { display: none; }
.rpp-box { background: #fff; border-radius: 10px; box-shadow: 0 12px 40px rgba(0, 0, 0, .22); width: min(1600px, 100%); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.rpp-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.rpp-ttl { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1 1 260px; flex-wrap: wrap; }
.rpp-ttl h3 { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.rpp-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rpp-acts .btn.dis, .rpp-acts .btn[disabled] { opacity: .5; cursor: not-allowed; }
.rpp-tabs { display: flex; gap: 4px; padding: 6px 14px 0; border-bottom: 1px solid var(--line); overflow-x: auto; flex: 0 0 auto; }
.rpp-tabs:empty { display: none; }
.rp-tab { border: 1px solid var(--line); border-bottom: 0; background: var(--bg2); border-radius: 6px 6px 0 0; padding: 5px 10px; font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; color: var(--ink2); }
.rp-tab.on { background: #fff; color: var(--navy); font-weight: 600; box-shadow: inset 0 2px 0 var(--navy); }
.rp-ext { font-size: 10px; text-transform: uppercase; color: var(--muted); margin-right: 5px; border: 1px solid var(--line); border-radius: 3px; padding: 0 3px; }
/* 2026-10-14 대표: "노란색 칸을 직접 클릭하고 바로 수정 — 오른쪽 칸은 불필요" → 보고서가 창 전체 폭(가운데 종이), [항목 목록]은 겹쳐 여는 서랍 */
.rpp-main { flex: 1 1 auto; min-height: 0; display: flex; position: relative; }
.rpp-view { position: relative; flex: 1 1 auto; min-width: 0; min-height: 0; overflow: auto; display: flex; flex-direction: column; background: var(--bg2); }
.rp-frame { flex: 1 1 auto; width: 100%; min-height: 60vh; border: 0; background: #fff; }
.rp-wait { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 4px 14px; font-size: 12.5px; color: var(--ink2); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.rp-wait[hidden] { display: none; }
.rp-alt { margin: 0; padding: 4px 10px; background: #fff; border-top: 1px solid var(--line); }
.rp-pad { padding: 16px; }
.rp-gen { padding: 16px; background: #fff; }
.rp-gen .pp-job { display: grid; gap: 8px; }
.rp-fail { display: grid; gap: 8px; }
.rp-log { max-height: 280px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 8px; font-size: 12px; white-space: pre-wrap; margin: 0; }
.rp-blk { margin: 0; padding-left: 18px; color: var(--bad); }
.rpp-drawer { position: absolute; top: 0; right: 0; bottom: 0; z-index: 6; width: min(400px, 92%); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: #fff; box-shadow: -8px 0 24px rgba(27, 33, 48, .16); }
.rpp-drawer[hidden] { display: none; }
.rp-dq { flex: 1 1 160px; min-width: 0; font-size: 13px; padding: 5px 8px; }
.rp-df[hidden], .rp-dg[hidden] { display: none; }
.rpp-stabs { display: flex; align-items: center; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.rpp-stabs [data-rp-side] { border: 0; background: none; font: inherit; font-size: 13px; padding: 4px 8px; border-radius: 5px; cursor: pointer; color: var(--ink2); }
.rpp-stabs [data-rp-side].on { background: var(--navy-bg); color: var(--navy); font-weight: 600; }
.rpp-sbody { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; }
.rp-fields { display: grid; gap: 6px; }
.rp-fg summary { font-weight: 600; font-size: 13px; cursor: pointer; padding: 3px 0; }
.rp-fg label { display: grid; gap: 2px; font-size: 12px; color: var(--ink2); margin: 4px 0; }
.rp-fg input, .rp-fg textarea { font-size: 13px; padding: 5px 7px; }
.rp-facts { position: sticky; bottom: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: #fff; border-top: 1px solid var(--line); padding: 6px 0 0; }
.rp-facts .bad { color: var(--bad); }
/* 2026-10-14 '문서 항목'(항목 목록 서랍) — 입력 ↔ 보고서 글자 조각 */
.rp-dfhead { position: sticky; top: -8px; z-index: 2; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: #fff; margin: -8px -10px 0; padding: 8px 10px 6px; border-bottom: 1px solid var(--line); }
.rp-dfttl { font-weight: 600; font-size: 13.5px; }
.rp-dfcnt { font-size: 12.5px; font-weight: 600; color: var(--warn); background: var(--human); border-radius: 99px; padding: 1px 8px; }
.rp-dfcnt.zero { color: var(--muted); background: var(--bg2); font-weight: 400; }
.rp-dfhint { margin: 0; }
.rp-dfnote { background: #f4f5f7; border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; font-size: 12.5px; color: var(--ink2); display: grid; gap: 6px; justify-items: start; }
.rp-dfnote p { margin: 0; }
.rp-dfnote.ok { background: #eef7f0; border-color: #b9dcc2; }
.rp-dfnote.warn { background: #fffbe6; border-color: var(--human-line); color: var(--warn); }
.rp-dfnote.bad { color: var(--bad); }
.rp-dfields { display: grid; gap: 4px; }
.rp-dg summary { font-weight: 600; font-size: 12.5px; cursor: pointer; padding: 4px 0; color: var(--navy); }
.rp-dg.miss summary { color: var(--muted); }
.rp-df { display: grid; gap: 2px; font-size: 12px; color: var(--ink2); margin: 2px 0; padding: 3px 5px; border-radius: 5px; border: 1px solid transparent; }
.rp-df.on { background: #eef4ff; border-color: #c9d9f2; }
.rp-df.ro { opacity: .6; }
.rp-df input, .rp-df textarea { font-size: 13px; padding: 4px 7px; width: 100%; box-sizing: border-box; }
.rp-df textarea { resize: vertical; line-height: 1.45; }
.rp-df.chg input, .rp-df.chg textarea { background: #fff3a8; border-color: #e7c84a; }
.rp-dfl .warn { color: var(--warn); }
.rp-paper .rp-hl { outline: 2px solid #f0a020; outline-offset: 1px; border-radius: 2px; }
.rp-work { flex: 1 1 auto; width: 100%; min-height: 60vh; border: 1px solid var(--line); border-radius: 6px; }
/* 보고서 보기(2026-10-14) — 한글·엑셀 보고서를 회색 바탕 위 A4 폭 흰 종이로 펼침 · 바로 고치기 */
.rpp-acts .btn.on { background: var(--human); border-color: var(--human-line); color: var(--warn); font-weight: 600; }
.rp-vtop { position: sticky; top: 0; z-index: 3; flex: 0 0 auto; }
.rp-ebar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 14px; background: #fff; border-bottom: 1px solid var(--line); font-size: 13px; }
.rp-ebar.dirty { background: #fffbe6; border-bottom-color: var(--human-line); }
.rp-ebar[hidden], .rp-sheettabs[hidden] { display: none; }
.rp-ecnt { font-weight: 600; color: var(--warn); background: var(--human); border: 1px solid var(--human-line); border-radius: 99px; padding: 1px 9px; }
.rp-ehint { color: var(--ink2); }
.rp-emsg { font-size: 12.5px; color: var(--ink2); }
.rp-emsg.warn { color: var(--warn); font-weight: 600; }
.rp-skip { flex: 1 0 100%; font-size: 12px; color: var(--ink2); }
.rp-skip ul { margin: 4px 0 0; padding-left: 18px; max-height: 140px; overflow: auto; }
.rp-sheettabs { display: flex; gap: 4px; padding: 6px 14px; background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; }
.rp-sheettabs button { border: 1px solid var(--line); background: var(--bg2); border-radius: 5px; padding: 3px 10px; font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; color: var(--ink2); }
.rp-sheettabs button.on { background: #fff; color: var(--navy); font-weight: 600; border-color: var(--navy); }
.rp-note { max-width: 640px; margin: 8px auto; background: #f4f5f7; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; color: var(--ink2); display: grid; gap: 10px; justify-items: start; font-size: 13.5px; }
.rp-note p { margin: 0; }
.rp-note ul { margin: 0; padding-left: 18px; }
.rp-pad-s { padding: 8px 16px 0; }
/* 엑셀로 열기 안내(2026-10-14) — 처음 한 번, 창 머리 아래 */
.rp-xhint { display: flex; align-items: flex-start; gap: 10px; padding: 8px 14px; background: #eef4ff; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink); flex: 0 0 auto; }
.rp-xhint[hidden] { display: none; }
.rp-xhint .rp-xh-body { flex: 1 1 auto; display: grid; gap: 4px; }
.rp-xhint p { margin: 0; font-weight: 600; }
.rp-xhint details { color: var(--ink2); font-size: 12.5px; }
.rp-xhint ul { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 2px; }
.rp-warns { margin: 8px 16px 0; color: var(--ink2); }
.rp-warns ul { margin: 4px 0 0; padding-left: 18px; }
.rp-paper-wrap { flex: 1 0 auto; padding: 18px 16px 48px; background: #e6e9ef; }
.rp-paper { width: min(820px, 100%); margin: 0 auto; background: #fff; color: #111; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); padding: 48px 56px; box-sizing: border-box; overflow-wrap: anywhere; }
.rp-paper.rp-xl { width: max-content; min-width: min(820px, 100%); max-width: none; padding: 16px; overflow-wrap: normal; }
.rp-paper .rp-page + .rp-page, .rp-paper .rp-pb { border-top: 2px dashed #b9c0cc; margin-top: 40px; padding-top: 40px; }
.rp-paper img { max-width: 100%; height: auto; }
.rp-paper .rp-sheet[hidden] { display: none !important; }
/* 바로 고치기(늘 켜짐) — 고칠 수 있는 칸은 글자 커서 · 올리면 점선 · 고치는 칸은 파란 테두리 · 고친 칸은 옅은 노랑 + 점 */
.rp-paper.rp-editable .rp-t[data-k]:not([data-ro]), .rp-paper.rp-editable td[data-k]:not([data-ro]) { cursor: text; }
.rp-paper.rp-editable .rp-t[data-k]:not([data-ro]):hover, .rp-paper.rp-editable td[data-k]:not([data-ro]):hover { outline: 1px dashed #74a7e8; outline-offset: 1px; }
.rp-paper .rp-t.rp-empty { display: inline-block; min-width: 1em; min-height: 1em; vertical-align: text-bottom; }
.rp-paper [contenteditable] { outline: 2px solid var(--navy) !important; outline-offset: 1px; border-radius: 2px; caret-color: var(--navy); }
.rp-paper .rp-dirty { background-color: #fff7c2 !important; position: relative; }
.rp-paper .rp-dirty::after { content: ""; position: absolute; top: -3px; right: -3px; width: 6px; height: 6px; border-radius: 50%; background: #e0a400; pointer-events: none; }

/* 2단계 폭에 맞춰(컨테이너 질의 — 오른쪽 법령 패널이 있어도 정확히): 넓으면 [드롭] → [목록] | [수집 현황] 한 줄,
   중간이면 드롭 칸을 위 한 줄로 올리고 [목록] | [수집 현황](오른쪽 유지), 좁으면 위→아래 */
.stage[data-stage="2"] { container-type: inline-size; container-name: s2; }
@container s2 (max-width: 1499px) {
  .stage[data-stage="2"] .flow { grid-template-columns: minmax(0, 1fr) minmax(320px, 350px); }
  .stage[data-stage="2"] .flow > .dz-col { grid-column: 1 / -1; grid-template-columns: 230px minmax(0, 1fr) 230px; align-items: start; }
  .stage[data-stage="2"] .flow > .dz-col .dz-actions.top { margin-bottom: 0; }
  .stage[data-stage="2"] .flow > .dz-col .dropzone { min-height: 118px; padding: 10px; }
  .stage[data-stage="2"] .flow > .dz-col .dropzone p { margin: 2px 0 0; }
  .stage[data-stage="2"] .flow > .arrow { display: none; }
  .stage[data-stage="2"] .flow > .case-col { grid-column: 1; }
  .stage[data-stage="2"] .flow > .pub-col { grid-column: 2; }
}
@container s2 (max-width: 1150px) {
  .stage[data-stage="2"] .flow { grid-template-columns: minmax(0, 1fr); }
  .stage[data-stage="2"] .flow > .case-col, .stage[data-stage="2"] .flow > .pub-col { grid-column: 1; }
  .stage[data-stage="2"] .flow > .pub-col { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
}
@container s2 (max-width: 900px) {
  .stage[data-stage="2"] .flow > .dz-col, .stage[data-stage="2"] .flow > .pub-col { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .ce-grid { grid-template-columns: minmax(0, 1fr); }
  .ce-grid label.wide { grid-column: auto; }
  #c-list .cl-sub { max-width: 200px; }
  .rpp { padding: 0; }
  .rpp-box { border-radius: 0; }
  .rpp-drawer { width: 100%; border-left: 0; }
  .rp-ebar { padding: 6px 8px; }
  .rp-paper { padding: 20px 14px; }
  .rp-paper-wrap { padding: 10px 6px 32px; }
}
/* 2026-10-14 [일괄삭제 (n)] — 빨간 테두리(체크한 줄만 · 보고서 작성 권한만) */
#cl-bdel { border-color: var(--bad); color: var(--bad); background: #fff; }
#cl-bdel:not([disabled]):hover { background: var(--bad-bg); }
#cl-bdel[disabled] { border-color: #f1b8b2; color: #d9918a; }

/* 2026-10-14 대표 지시("생성된 보고서만 보이면 됩니다") — 2단계 경매통계 [옥션원에서 가져오기] · 공부서류 안내 · 새 물건 칸 · 3단계 생성된 보고서 */
.ps-a1f { display: flex; flex-wrap: wrap; gap: 6px; align-items: end; margin-top: 6px; font-size: 12px; }
.ps-a1f label { display: grid; gap: 2px; color: var(--ink2); }
.ps-a1f input, .ps-a1f select { font-size: 12px; padding: 3px 5px; min-width: 0; }
.ps-a1msg { margin-top: 4px; overflow-wrap: anywhere; }
.ps-pconly { margin: 2px 2px 0; }
.nc-form { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px 4px; margin: 8px 0; }
.nc-form legend { padding: 0 4px; color: var(--ink2); }
.oq-cats { margin: 8px 0 2px; }
.rl-tbl tr.rl-row { cursor: pointer; }
.rl-tbl tr.rl-row:hover td, .rl-tbl tr.rl-row:focus td { background: var(--navy-bg); }
.rl-tbl tr.rl-row:focus { outline: 2px solid var(--navy2); outline-offset: -2px; }
.rl-fs { white-space: normal; }
.rl-f { border: 1px solid var(--line2); background: #fff; border-radius: 4px; padding: 0 6px; margin: 1px 3px 1px 0; font-size: 11.5px; line-height: 18px; cursor: pointer; color: var(--ink2); text-transform: lowercase; }
.rl-f:hover { border-color: var(--navy2); color: var(--navy); }
.rl-f.hwpx, .rl-f.hwp { color: #1d4f91; }
.rl-f.xlsx, .rl-f.xlsm, .rl-f.xls { color: var(--ok); }
.rl-f.aims { text-transform: none; }
.rl-f.ed { border-color: var(--human-line); background: var(--human); }
.rl-v { font-weight: 600; }
.rl-mk { display: inline-block; font-size: 11px; padding: 0 5px; border-radius: 4px; background: var(--human); border: 1px solid var(--human-line); color: var(--warn); }
.rl-cat { display: inline-block; font-size: 11.5px; padding: 0 6px; border-radius: 4px; border: 1px solid var(--line2); }
.rl-cat.npl { border-color: var(--navy2); color: var(--navy); }
