/* claim 화면 전용 스타일(invoice, 결재선관리, 양식함). 색은 app.css 토큰, payment.css 의 옛 화면 색(--pay-*), 이 파일의 --cl-grid 만 쓴다 */

/* 4칸 입력 표(invoice 작성, 수정, 상세): 이름 칸 두 개 */
table.form.cl-form > tbody > tr > th, table.form.cl-form > tr > th,
table.info.cl-view > tbody > tr > th, table.info.cl-view > tr > th { width: 100px; }
table.form.cl-form, table.info.cl-view { min-width: 0; }
.cl-blank { background: var(--white) !important; }
.cl-inline { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
table.form .cl-inline input[type=text] { flex: 1 1 160px; width: auto; min-width: 0; }

/* 묶음 상자(통화와 환율, 세부계정과 작업내용) */
/* 옛 화면처럼 칸 이름을 왼쪽에 붙여 한 줄씩(「통화 [고르기] [환율정보보기]」, 「달러환율 [ ]」) */
.cl-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-box); padding: var(--sp-3) var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); }
.cl-money { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-6); align-items: center; }
.cl-field { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); font-weight: 500; }
.cl-field > span:first-child { min-width: 72px; }
.cl-field input, .cl-field select { font-weight: 400; width: 160px; max-width: 100%; }
.cl-field.grow { flex: 1 1 240px; }
.cl-field.grow input { width: 100%; }
.cl-depts { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.cl-dept { display: flex; flex-direction: column; gap: var(--sp-1); font-size: var(--fs-sm); font-weight: 500; flex: 1 1 160px; min-width: 0; }
.cl-dept.wide { flex: 2 1 240px; }
.cl-dept select { height: 112px; width: 100%; padding: var(--sp-1); font-size: var(--fs-sm); font-weight: 400; }
.cl-dept select option:checked { background: var(--navy); color: var(--white); }
.cl-add { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); align-items: flex-end; margin: 0; }
table.amount.cl-rows { min-width: 640px; }
table.amount.cl-rows tr.on td { background: var(--navy-soft); }
table.amount.cl-total { width: auto; min-width: 320px; margin-left: auto; }
table.amount.cl-total th { text-align: left; width: 160px; }
table.amount .strong { font-weight: 700; }

/* 결재선 등록, 상세 */
.cl-line-view { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: flex-start; }
.cl-line-ol { margin: 0; padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-7); min-width: 240px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--white); display: flex; flex-direction: column; gap: var(--sp-1); }
.cl-line-ol li { font-size: var(--fs-base); }
.cl-line-method { margin-left: var(--sp-2); font-size: var(--fs-xs); color: var(--text-dim); }
.cl-line-method.agree { color: var(--progress); font-weight: 500; }
.cl-preview { display: flex; flex-direction: column; gap: var(--sp-2); }
.cl-preview-head { font-size: var(--fs-md); font-weight: 700; }

/* 결재선 선택 창: 왼쪽 사원 나무 / 가운데 결재선 / 오른쪽 결재방법 */
.cl-pick { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.cl-pick-col { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.cl-pick-col.narrow { flex: 0 1 160px; }
.cl-pick-head { font-size: var(--fs-sm); font-weight: 700; }
.cl-pick-search { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin: 0; }
.cl-pick-search input { flex: 1 1 100px; min-width: 0; height: var(--h-small); }
.cl-tree, .cl-line-list, .cl-ship-list { height: 260px; overflow-y: auto; border: 1px solid var(--input-line); border-radius: var(--r-control); background: var(--white); padding: var(--sp-1); display: flex; flex-direction: column; }
.cl-line-list.short { height: auto; min-height: 80px; }
.cl-ship-list { height: 320px; }
.cl-tree-folder, .cl-tree-item, .cl-line-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; font: inherit; font-size: var(--fs-sm); color: var(--text); padding: var(--sp-1) var(--sp-2); border-radius: var(--r-control); cursor: pointer; }
.cl-tree-folder { font-weight: 700; }
/* 결재선 선택 창 사원 나무: 옛 lineSetPop.jsp 처럼 폴더 그림(열림/닫힘)과 사람 그림. 게시판, 업무관리 사원 고르기 창과 같은 그림 */
.cl-tree .cl-tree-folder, .cl-tree .cl-tree-item { display: flex; align-items: center; gap: var(--sp-2); }
.cl-tree .cl-tree-folder::before { content: ""; flex: none; width: 16px; height: 16px; background: var(--folder); -webkit-mask: var(--icon-folder) center / contain no-repeat; mask: var(--icon-folder) center / contain no-repeat; }
.cl-tree .cl-tree-folder[aria-expanded="true"]::before { -webkit-mask-image: var(--icon-folder-open); mask-image: var(--icon-folder-open); }
.cl-tree .cl-tree-item::before { content: ""; flex: none; width: 14px; height: 14px; background: var(--text-dim); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.cl-tree-folder.dep { font-weight: 500; padding-left: var(--sp-4); color: var(--text-dim); }
.cl-tree-item { padding-left: var(--sp-7); }
.cl-ship-list .cl-tree-item { padding-left: var(--sp-2); }
.cl-tree-item:hover, .cl-line-item:hover:not(:disabled), .cl-tree-folder:hover { background: var(--navy-soft); }
.cl-line-item.on, .cl-line-item.on:hover:not(:disabled) { background: var(--navy); color: var(--white); }
.cl-line-item.on .cl-line-method { color: var(--white); }
.cl-line-item:disabled { color: var(--text-dim); cursor: default; }
.cl-line-item .num { color: inherit; }
.cl-pick-tools { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: flex-end; }

/* INVOICE 보기 새 창(메뉴 없음) */
.cl-pop { max-width: 724px; margin: 0 auto; padding: var(--sp-4); background: var(--white); }
table.amount.cl-rows tr.cl-pickable { cursor: pointer; }

/* ---- 옛 invoice 화면 모양(claimInsert, claimUpdate, claimDetail*.jsp): 폭 700px, 칸 사이 회색 1px 줄(옛 bab_01 바탕 #ccc), 칸 이름 흰 바탕 ---- */
:root {
  --cl-grid: #CCCCCC;     /* invoice 표 칸 사이 줄, 통화와 세부계정 묶음 상자 테두리 */
}
.page:has(table.cl-form) > *:not(.page-title):not(.modal-back):not(.confirm-back),
.page:has(table.cl-view) > *:not(.page-title):not(.modal-back):not(.confirm-back):not(.pay-ban-pop) { max-width: 700px; }
table.form.cl-form, table.info.cl-view { border-collapse: collapse; width: 100%; background: var(--white); }
table.form.cl-form > tbody > tr > *, table.form.cl-form > tr > *,
table.info.cl-view > tbody > tr > *, table.info.cl-view > tr > * { border: 1px solid var(--cl-grid); height: 25px; padding: 2px 4px 2px 10px; line-height: 15px; background: var(--white); color: var(--pay-black); }
table.form.cl-form > tbody > tr:first-child > *, table.form.cl-form > tr:first-child > *,
table.info.cl-view > tbody > tr:first-child > *, table.info.cl-view > tr:first-child > * { border-top: 1px solid var(--cl-grid); }
/* 작성, 수정: 칸 이름 굵게(옛 .B), 표 위 하늘색 3px 띠 */
table.form.cl-form > tbody > tr > th, table.form.cl-form > tr > th { font-weight: 700; }
.page:has(table.cl-form) > .table-scroll:has(> table.cl-form) { border-top: 3px solid var(--pay-band); padding-top: 1px; }
/* 상세: 칸 이름 보통 글자, 환율 줄만 굵게 */
table.info.cl-view > tbody > tr > th, table.info.cl-view > tr > th { font-weight: 400; }
table.info.cl-view th.cl-b, table.cl-plain th.cl-b { font-weight: 700; }
.cl-tax { color: var(--pay-o); font-weight: 700; }
.doc.cl-doc { border: 0; padding: 0; gap: var(--sp-2); background: var(--white); }

/* 묶음 상자: 회색 1px 테두리, 안쪽 10px */
.cl-box { border: 1px solid var(--cl-grid); border-radius: 0; padding: 10px; }
.cl-field > span:first-child { font-weight: 700; color: var(--pay-black); }
.cl-dept.w150 { flex: 0 1 150px; }
.cl-dept.wide { flex: 0 1 300px; }

/* 금액 줄 표: 하늘색 머리 흰 글자 30px. 너비 No 30 / 200 / 200 / 100 / 100 (상세는 150씩) */
table.amount.cl-rows { min-width: 0; width: 100%; margin: 0; font-size: var(--fs-base); }
table.amount.cl-rows th { height: 30px; background: var(--pay-band); color: var(--pay-head-white); font-weight: 400; border: 1px solid var(--cl-grid); }
table.amount.cl-rows td { height: 25px; border: 1px solid var(--cl-grid); }
table.amount.cl-rows .pt-no { width: 30px; } table.amount.cl-rows .pt-200 { width: 200px; } table.amount.cl-rows .pt-150 { width: 150px; } table.amount.cl-rows .pt-100 { width: 100px; }
table.amount.cl-rows tr.on td { background: var(--navy-soft); }

/* 합계 표: 한 줄 4칸, 굵은 검은 글자 */
table.amount.cl-total { width: 100%; min-width: 0; margin: 5px 0 0; font-size: var(--fs-base); }
table.amount.cl-total th, table.amount.cl-total td { border: 1px solid var(--cl-grid); height: 25px; padding: 2px 10px; background: var(--white); color: var(--pay-black); font-weight: 700; }
table.amount.cl-total th { width: 150px; text-align: left; }

/* 첨부, 기타 사항: 줄 없는 칸, 칸 이름 70px 굵게 */
table.cl-plain { border-collapse: collapse; width: 100%; min-width: 0; background: var(--white); }
table.cl-plain > tbody > tr > *, table.cl-plain > tr > * { border: 0 !important; padding: 3px 0; background: var(--white); }
table.cl-plain > tbody > tr > th, table.cl-plain > tr > th { width: 70px; background: var(--white); font-weight: 700; color: var(--pay-black); white-space: nowrap; padding-right: var(--sp-2); }
table.cl-plain input.cl-note:not([type=checkbox]):not([type=radio]):not([type=file]) { width: 400px; max-width: 100%; }
.cl-ban-name { color: var(--pay-green); }
.page:has(table.cl-form) > .btn-row { border-top: 2px solid var(--pay-band); padding-top: 7px; }
.page:has(table.cl-view) > .btn-row { border-top: 0; padding-top: 7px; }
