:root {
  --bg: #f4f6f9; --panel: #fff; --text: #1d2430; --muted: #5b6575; --line: #d5dbe4; --head: #e9eef5;
  --primary: #1f5fbf; --primary-text: #fff; --danger: #b42318; --sel: #fff6c9; --sum: #e3ecf8;
  --red: #c62828; --blue: #1546b3; --focus: #f59e0b;
  font-family: "Malgun Gothic", "맑은 고딕", system-ui, sans-serif; font-size: 14px; color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }

.btn { font: inherit; padding: 6px 12px; border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 6px; cursor: pointer; white-space: nowrap; min-height: 32px; }
.btn:hover { background: #f0f3f8; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); border-color: #e4b4ae; }
.btn.sm { padding: 2px 8px; min-height: 26px; font-size: 13px; }
.btn.icon { padding: 4px 10px; }
.btn:disabled { opacity: .5; cursor: default; }

/* 로그인 */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-box { width: min(360px, 100%); background: var(--panel); padding: 28px; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,.08); display: grid; gap: 8px; }
.login-box h1 { margin: 0 0 8px; font-size: 20px; }
.login-box input { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; }
.msg { color: var(--danger); min-height: 1.2em; margin: 4px 0; }

/* 틀 */
.app { display: grid; grid-template-columns: 200px 1fr; grid-template-rows: auto 1fr auto; min-height: 100vh; }
.top { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: #1c2b45; color: #fff; }
.top .btn { background: transparent; color: #fff; border-color: #5d6f8f; }
.top .brand { font-size: 16px; }
.spacer { flex: 1; }
#menuToggle { display: none; }
.menu { background: #fff; border-right: 1px solid var(--line); padding: 10px 0; overflow-y: auto; }
/* 메뉴 묶음 제목 : 붉은 계열 띠로 하위 메뉴와 구분 */
.menu-group h2 { font-size: 14px; font-weight: 700; color: #fff; background: #b3261e; margin: 8px 0 2px; padding: 7px 16px; letter-spacing: 1px; border-left: 4px solid #7f1d1d; }
.menu-group:first-child h2 { margin-top: 0; }
.menu ul a { padding-left: 26px; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu a { display: block; padding: 8px 18px; color: var(--text); text-decoration: none; }
.menu a:hover { background: #f0f3f8; }
.menu a[aria-current] { background: #e3ecf8; color: var(--primary); font-weight: 700; border-left: 3px solid var(--primary); }
.content { padding: 12px 16px; min-width: 0; display: flex; flex-direction: column; }
.screen-title { font-size: 18px; margin: 4px 0 10px; }
.screen { display: flex; flex-direction: column; gap: 8px; min-height: 0; flex: 1; }

/* 조건 · 도구줄 */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar.end { justify-content: flex-end; margin-top: 12px; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; background: var(--panel); padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.fld { display: inline-flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.fld > span { white-space: nowrap; }
.fld input, .fld select, .fld textarea { font: inherit; color: var(--text); padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; min-width: 0; background: #fff; }
.filters .fld input[type=search] { width: 120px; }
.fld.chk { flex-direction: row; align-items: center; gap: 6px; color: var(--text); }
.fld.chk input { width: 18px; height: 18px; }
.fld input.n { text-align: right; }
.fld input.short { width: 60px; }
.barcode { width: 200px; }
.hint { color: var(--muted); font-size: 12px; margin: 0; }

/* 그리드 */
.grid-wrap { overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; flex: 1; min-height: 240px; max-height: calc(100vh - 230px); }
.grid { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 13px; }
.grid th, .grid td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 8px; white-space: nowrap; }
.grid thead { position: sticky; top: 0; z-index: 3; }
.grid thead th { background: var(--head); font-weight: 600; position: relative; }
.grid tbody tr:hover { background: #f6f9fd; }
.grid tbody tr.sel { background: var(--sel); }
.grid td.n { text-align: right; font-variant-numeric: tabular-nums; }
.grid td.c { text-align: center; }
.grid td.bg-red { background: var(--red); color: #fff; }
.grid td.bg-blue { background: var(--blue); color: #fff; }
.grid td.fg-blue { color: var(--blue); font-weight: 600; }
.grid tfoot td { position: sticky; bottom: 0; background: var(--sum); font-weight: 700; z-index: 1; }
.grid td input[type=text], .grid td input[type=date] { font: inherit; width: 100%; min-width: 80px; border: 1px solid transparent; background: transparent; padding: 2px 4px; }
.grid td input[type=text]:focus, .grid td input[type=date]:focus { border-color: var(--primary); background: #fff; }
.grid td input.n { text-align: right; }

/* 입력창 */
.dlg { border: none; border-radius: 10px; padding: 0; box-shadow: 0 10px 40px rgba(0,0,0,.25); max-height: 92vh; display: flex; flex-direction: column; }
.dlg:not([open]) { display: none; }
.dlg::backdrop { background: rgba(15,23,42,.45); }
.dlg.md { width: min(720px, 96vw); }
.dlg.lg { width: min(960px, 96vw); }
.dlg.xl { width: min(1280px, 96vw); }
.dlg.full { width: 96vw; height: 90vh; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.dlg-head h2 { margin: 0; font-size: 17px; }
.dlg-body { padding: 12px 14px; overflow: auto; flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.dlg-body .grid-wrap { max-height: none; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.form-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 12px; align-items: end; }
.form-grid .wide, .form-grid .span2 { grid-column: 1 / -1; }
.form-grid textarea { width: 100%; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px 12px; margin: 0; }
legend { font-weight: 600; padding: 0 4px; }
.master-form { display: flex; flex-direction: column; gap: 10px; }
fieldset.checks .form-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.panel.narrow { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; max-width: 900px; }

.loading { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.35); z-index: 1000; pointer-events: none; }
.loading span { background: #1c2b45; color: #fff; padding: 8px 16px; border-radius: 20px; }

@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  #menuToggle { display: inline-block; }
  .menu { position: fixed; top: 48px; left: 0; bottom: 0; width: 220px; z-index: 50; transform: translateX(-100%); transition: transform .15s; box-shadow: 2px 0 12px rgba(0,0,0,.15); }
  .menu.open { transform: none; }
  .content { padding: 10px; }
  .grid-wrap { max-height: none; }
}

/* 도구줄 구분 */
.toolbar .sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; }
.toolbar .lbl { color: var(--muted); font-size: 13px; }
.toolbar select { font: inherit; padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; min-height: 32px; }

/* ── 출력 미리보기 · 인쇄 ── */
.print-root { position: fixed; inset: 0; z-index: 2000; background: #5f6368; overflow: auto; }
.print-bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: #1c2b45; color: #fff; }
.print-bar .spacer { flex: 1; }
.pages { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 16px; }
.page { background: #fff; color: #000; box-shadow: 0 2px 10px rgba(0,0,0,.4); padding: 8mm; font-family: "Malgun Gothic", "맑은 고딕", sans-serif;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.page.a4l { width: 297mm; min-height: 210mm; page: a4l; }
.page.a4p { width: 210mm; min-height: 297mm; page: a4p; }
.page.label { width: 100mm; height: 50mm; padding: 2.5mm 3mm; page: label; overflow: hidden; }
@page a4l { size: A4 landscape; margin: 8mm; @bottom-right { content: counter(page) " / " counter(pages); font-size: 8pt; } }
@page a4p { size: A4 portrait; margin: 7mm; }
@page label { size: 100mm 50mm; margin: 0; }

/* 목록형 (자재 발주 현황 · 발주품 입고 현황 · 미입고현황) */
.page.list h1 { text-align: center; font-size: 20pt; font-weight: 400; letter-spacing: 6px; margin: 2mm 0 4mm; }
.page.list .meta { display: flex; justify-content: space-between; font-size: 9pt; margin-bottom: 2mm; }
.plist { width: 100%; border-collapse: collapse; font-size: 8.5pt; }
.plist thead th { border-top: 1.5px solid #000; border-bottom: 1.5px solid #000; padding: 1.5mm 1mm; font-weight: 400; text-align: center; }
.plist td { padding: 1.4mm 1mm; border-bottom: 1px dotted #666; text-align: center; white-space: nowrap; }
.plist td.n, .plist th.n { text-align: right; }
.plist tr.grp td { background: #c0c0c0; font-weight: 700; border-bottom: 1px solid #000; }
.plist tr.tot td { font-weight: 700; border-top: 1.5px solid #000; border-bottom: 1.5px solid #000; font-size: 10pt; }
.plist tr.tot.yellow td { background: #ffff00; }
.plist tr { break-inside: avoid; }

/* 발주서 / 거래명세서 */
.page.po { padding: 6mm; font-size: 9pt; }
.po table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.po td { border: 1px solid #000; padding: 0.6mm 1mm; white-space: pre-line; overflow: hidden; }
.po .c { text-align: center; } .po .n { text-align: right; } .po .left { text-align: left; }
.po .lab { text-align: center; }
.po .small { font-size: 8pt; }
.po .vert { width: 6mm; text-align: center; line-height: 1.15; }
.po-head { border: 2px solid #000; }
.po-head td { height: 9mm; }
.po-head .logo { width: 30mm; text-align: center; }
.po-head .mark { font: 900 17pt "Arial Black", Arial, sans-serif; letter-spacing: 1px; }
.po-head .title { text-align: center; font-size: 18pt; font-weight: 700; letter-spacing: 2px; }
.po-party td { height: 6.6mm; }
.po-body .h td { text-align: center; height: 6mm; }
.po-body .d1 td, .po-body .d2 td { height: 7.2mm; }
.po-body .d1 td:not([rowspan]) { border-bottom: 1px dotted #000; }
.po-body .d2 td { border-top: none; }
.po-body col.w10 { width: 10%; } .po-body col.w26 { width: 26%; } .po-body col.w17 { width: 17%; } .po-body col.w6 { width: 6%; }
.po-body col.w11 { width: 11%; } .po-body col.w9 { width: 9%; }
.po .bc { display: flex; flex-direction: column; align-items: center; }
.barcode-svg { width: 92%; height: 4.2mm; display: block; }
.po .bctxt { font-size: 7.5pt; line-height: 1; margin-top: 0.4mm; }
.po-foot td { height: 6.4mm; }
.po-foot .notice { font-size: 10pt; vertical-align: middle; padding-left: 3mm; }
.po-foot .memo { vertical-align: top; font-size: 8.5pt; }
.po-foot .sign { height: 26mm; }

/* 자재입고식별표 100×50mm — QR */
.page.label.qr { display: flex; align-items: center; justify-content: center; padding: 0 !important; }
/* 내용은 용지 크기(100×50mm, 안쪽 1mm)로 짜고 90% 로 줄인다 → 실제 90×45mm, 용지 가운데 (사방 5mm·2.5mm 여백) */
.label .lb-inner { width: 100mm; height: 50mm; padding: 1mm; box-sizing: border-box; flex: none; display: flex; gap: 2mm; align-items: stretch; transform: scale(0.9); transform-origin: center center; }
.label .lb-left { width: 33mm; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1.5px solid #000; padding: 1mm; }
.label .lb-title { font-size: 9pt; font-weight: 700; letter-spacing: 2px; margin-bottom: 0.5mm; }
.label .qr-svg { width: 29mm; height: 29mm; display: block; }
.label .lb-code { font-size: 7pt; font-weight: 700; margin-top: 0.5mm; white-space: nowrap; letter-spacing: -0.2px; }
.lb-tbl { flex: 1; border-collapse: collapse; table-layout: fixed; font-size: 8pt; border: 1.5px solid #000; }
.lb-tbl th, .lb-tbl td { border: 1px solid #000; padding: 0 1.2mm; height: 5.6mm; overflow: hidden; white-space: nowrap; text-overflow: clip; }
.lb-tbl th { width: 14mm; font-weight: 400; background: #eee; text-align: center; letter-spacing: 1px; }
.lb-tbl td.strong { font-weight: 700; font-size: 9pt; }

@media print {
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing { background: #fff; }
  .print-root { position: static; background: none; overflow: visible; }
  .no-print { display: none !important; }
  .pages { display: block; padding: 0; }
  .page { box-shadow: none; margin: 0; padding: 0; min-height: 0; width: auto; break-after: page; }
  .page.label { width: 100mm; height: 50mm; padding: 2.5mm 3mm; }
  .page:last-child { break-after: auto; }
}

/* 그리드 : 건수·엑셀 줄, 정렬, 필터, 열 너비 */
.grid-bar { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.grid-bar .spacer { flex: 1; }
.grid th.sortable { cursor: pointer; user-select: none; padding-right: 12px; }
.grid th.sortable:hover { background: #dde5f0; }
.grid th[aria-sort="ascending"], .grid th[aria-sort="descending"] { color: var(--primary); }
.grid th.grp-head { text-align: center; }
.grid .col-resize { position: absolute; top: 0; right: -3px; width: 7px; height: 100%; cursor: col-resize; z-index: 4; }
.grid .col-resize:hover { background: rgba(31,95,191,.35); }
.grid tr.filter-row th { padding: 2px 3px; background: #f3f6fa; font-weight: 400; }
.grid input.gfilter { width: 100%; min-width: 50px; font: inherit; font-size: 12px; padding: 1px 4px; border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.grid.fixed { table-layout: fixed; min-width: 0; }
.grid.fixed td, .grid.fixed th { overflow: hidden; text-overflow: ellipsis; }
body.resizing, body.resizing * { cursor: col-resize !important; user-select: none !important; }
.po-party col.w3 { width: 3%; } .po-party col.w12 { width: 12%; } .po-party col.w16 { width: 16%; } .po-party col.w6 { width: 6%; } .po-party col.w13 { width: 13%; }
.po-party td.lab { font-size: 8.5pt; white-space: nowrap; }
.po-foot .notice { white-space: pre-line; }
.po-foot col.f34 { width: 34%; } .po-foot col.f3 { width: 3%; } .po-foot col.f10 { width: 10%; } .po-foot col.f4 { width: 4%; }
.po-foot col.f14 { width: 14%; } .po-foot col.f21 { width: 21%; }
.po-body .d1.empty td:not([rowspan]) { border-bottom: 1px dotted #000; }

/* 목록형 출력 : 종이 폭에 고정, 칸 넘는 글자는 줄여 보이기(…) */
.plist { table-layout: fixed; }
.plist thead th { white-space: nowrap; overflow: hidden; text-overflow: clip; padding: 1.5mm 0.6mm; }
.plist td { overflow: hidden; text-overflow: clip; padding: 1.4mm 0.6mm; }
.plist tr.grp td, .plist tr.tot td { overflow: hidden; }
.po td { white-space: pre-line; }
.po-body td, .po-party td, .po-head td { white-space: nowrap; }
.po-foot .notice, .po .vert, .po-body .h td { white-space: pre-line; }
/* 조건칸 옆 [검색] 버튼 */
.fld .inp-btn { display: inline-flex; gap: 4px; align-items: center; }
.fld .inp-btn input { width: 120px; }
.hint.notice { color: #b3261e; font-weight: 600; }

/* 틀 고정 (그리드 고정열수) */
.grid .frozen { position: sticky; z-index: 2; background: #fff; }
.grid thead th.frozen { z-index: 6; background: var(--head); }
.grid tr.filter-row th.frozen { background: #f3f6fa; }
.grid tfoot td.frozen { z-index: 4; background: var(--sum); }
.grid tbody tr:hover td.frozen { background: #f6f9fd; }
.grid tbody tr.sel td.frozen { background: var(--sel); }
.grid .frozen-last { box-shadow: 3px 0 0 -1px #8a94a6; }
/* 열 강조 : 총계(tot) */
.grid thead th.col-tot { background: #f4c7b0; color: #5c1a0b; }
.grid tr.filter-row th.col-tot { background: #fbe1d4; }
.grid tbody td.col-tot { background: #fdeee6; font-weight: 600; }
.grid tbody tr:hover td.col-tot { background: #fbe1d4; }
.grid tbody tr.sel td.col-tot { background: var(--sel); }
.grid tfoot td.col-tot { background: #f1bfa4; }
/* 입고집계(일별) : 그리드 자리, 토·일 머리글 색 */
.grid-host { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
.grid thead th.grp-head.col-sat { color: #1546b3; }
.grid thead th.grp-head.col-sun { color: #c62828; }

/* 경영정보 : 요약·탭·그래프 */
.summary { margin: 0; font-weight: 600; color: var(--text); }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); flex-wrap: wrap; }
.tab { font: inherit; padding: 7px 16px; border: 1px solid var(--line); border-bottom: none; border-radius: 6px 6px 0 0; background: #eef2f7; color: var(--muted); cursor: pointer; margin-bottom: -2px; }
.tab[aria-selected="true"] { background: #fff; color: #b3261e; font-weight: 700; border-color: #b3261e; border-bottom: 2px solid #fff; }
.tab-panel { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
.chart-host { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 8px; }
.chart-box { position: relative; height: 320px; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.tab-panel .grid-wrap { max-height: 46vh; }

/* 사원별 권한 : 지금 화면에 없는 권한의 버튼은 숨김 (body.no-권한, 실제 막는 것은 서버) */
body.no-신규 [data-perm="신규"], body.no-삭제 [data-perm="삭제"], body.no-저장 [data-perm="저장"],
body.no-인쇄 [data-perm="인쇄"], body.no-엑셀 [data-perm="엑셀"] { display: none !important; }

/* 사원별권한설정 */
.perm-wrap { display: grid; grid-template-columns: minmax(320px, 2fr) 3fr; gap: 12px; flex: 1; min-height: 0; }
.perm-left, .perm-right { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; }
.perm-title { font-size: 15px; margin: 0; }
.perm-right select { font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px; }
.perm-table-host { overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; max-height: calc(100vh - 260px); }
.perm-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.perm-table th, .perm-table td { border-bottom: 1px solid var(--line); padding: 5px 8px; }
.perm-table thead th { position: sticky; top: 0; background: var(--head); z-index: 1; }
.perm-table thead tr.all-row th { top: 28px; background: #f3f6fa; }
.perm-table td.c, .perm-table th { text-align: center; }
.perm-table td.menu { padding-left: 22px; }
.perm-table td.na { color: #b9c0cb; }
.perm-table tr.grp td { background: #fbe9e7; font-weight: 700; color: #7f1d1d; }
.perm-table tr.off td.menu { color: var(--muted); }
.perm-table input[type=checkbox] { width: 17px; height: 17px; }
.menu-none { padding: 12px 16px; }
@media (max-width: 900px) { .perm-wrap { grid-template-columns: 1fr; } }

/* 바닥 띠 (DHNET 홈페이지와 같은 모양) */
.foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: #0a1b31; color: #9fb4cc; padding: 14px 28px; font-size: 14px; }
.foot p { margin: 0; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 16px; letter-spacing: .5px; }
.foot-brand img { width: 28px; height: 28px; border-radius: 4px; }
@media (max-width: 800px) { .foot { flex-direction: column; text-align: center; padding: 14px 16px; } }
@media print { .foot { display: none; } }
.grid td.admin-row { color: #b3261e; font-weight: 700; }

/* 개발자요청 게시판 */
.grid td.st-new { color: #b3261e; font-weight: 700; } .grid td.st-seen { color: #1546b3; font-weight: 600; }
.grid td.st-doing { color: #b45309; font-weight: 700; } .grid td.st-done { color: #15803d; font-weight: 700; } .grid td.st-hold { color: var(--muted); }
.req-form .fld > span { color: var(--text); font-weight: 600; font-size: 14px; }
.req-form .fld > span small, .fld-head small { color: var(--muted); font-weight: 400; font-size: 12px; }
.req-form input, .req-form select, .req-form textarea { padding: 9px 10px; border-radius: 6px; font-size: 14px; }
.star { color: #c62828; }
.fld-head { margin-bottom: 6px; font-size: 14px; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 2px dashed #b8c2cf; border-radius: 10px;
  padding: 18px; cursor: pointer; color: var(--muted); background: #fff; text-align: center; }
.drop:hover, .drop.over { border-color: var(--primary); background: #f3f7fd; }
.drop.has { border-style: solid; border-color: #15803d; background: #f2fbf4; color: var(--text); }
.drop-ico { font-size: 22px; color: var(--primary); }
.drop-text b { color: var(--text); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn.big { padding: 10px 26px; font-weight: 700; font-size: 15px; }
.req-view { border-collapse: collapse; width: 100%; font-size: 14px; }
.req-view th { width: 110px; text-align: left; background: #f1f4f8; padding: 6px 10px; border: 1px solid var(--line); font-weight: 600; }
.req-view td { padding: 6px 10px; border: 1px solid var(--line); }
.req-h { font-size: 15px; margin: 10px 0 4px; }
.req-body { white-space: pre-wrap; border: 1px solid var(--line); border-radius: 6px; padding: 10px; background: #fbfcfe; min-height: 60px; font-size: 14px; }
.req-answer textarea { width: 100%; font: inherit; padding: 8px; border: 1px solid var(--line); border-radius: 6px; }
.st { font-weight: 700; } .st.st-new { color: #b3261e; } .st.st-doing { color: #b45309; } .st.st-done { color: #15803d; } .st.st-seen { color: #1546b3; }

/* 정산관리 */
.settle-wrap { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; flex: 1; min-height: 0; }
.settle-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 0; }
.settle-mid { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.settle-h { font-size: 15px; margin: 0; }
.settle-sum { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.sum-box { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 14px; display: flex; flex-direction: column; min-width: 120px; }
.sum-box span { font-size: 12px; color: var(--muted); }
.sum-box b { font-size: 17px; font-variant-numeric: tabular-nums; }
.sum-box.due { border-color: #e4b4ae; background: #fff4f2; } .sum-box.due b { color: var(--danger); }
.sum-note { align-self: center; color: var(--muted); font-size: 13px; }
.pay-form { background: var(--panel); }
.pay-form input.auto { background: #ffffd6; } .pay-form input.manual { background: #ffe6cc; }
.pay-form .wide-in { width: 220px; }
.filters input.corp { width: 200px; background: #f7f9fc; }
.grid td.due { color: var(--danger); font-weight: 700; }
.grid td.band { background: #f5f7fa; }
.grid td.total-row { background: #e3ecf8; font-weight: 700; }
@media (max-width: 1300px) { .settle-wrap { grid-template-columns: 1fr; } .settle-mid { flex-direction: row; justify-content: flex-start; } }
/* 화면 안 확인창·알림창 */
.msgbox { border: none; border-radius: 10px; padding: 18px 20px 14px; min-width: 320px; max-width: min(520px, 92vw); box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.msgbox::backdrop { background: rgba(15,23,42,.35); }
.msgbox-text { white-space: pre-line; margin: 0 0 16px; font-size: 15px; line-height: 1.5; }
.msgbox-actions { display: flex; justify-content: flex-end; gap: 8px; }
.msgbox-actions .btn { min-width: 76px; }
