@charset "UTF-8";

/* 모달 스타일 */
.modal {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: var(--z-index-modal);
}

/* 모달 content 박스 */
.modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--color-white);
  border-radius: var(--border-radius-large);
  max-width: 90%; /* 화면의 너비보다 커지지 않도록 최대 너비 설정 */
  max-height: 90%; /* 화면의 높이보다 커지지 않도록 최대 높이 설정 */
  overflow-y: auto; /* 내용이 넘칠 경우 세로 스크롤바 표시 */
}

/* 상세 팝업 크기: 휴가 상세와 동일(기본 modal-content 규칙 사용) */

/* 로딩 모달 스타일 */
.loading-overlay {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: var(--z-index-tooltip);
}

.loading-gif {
  width: 100px;
  height: 100px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 닫기 버튼 스타일 */
.close-modal {
  position: absolute;
  top: 30px;
  right: 50px;
  font-size: 36px;
  color: #cfcfcf;
  cursor: pointer;
}

/* popup */
/* 파일 목록 스타일 */
.selectorBtn_box {
  display: flex;
  flex-wrap: wrap;
  column-gap: 10px;
  width: 100%;
}

.selectorBtn_box .selectorBtn {
  position: relative;
  padding: 10px 35px 10px 20px;
  margin-top: 10px;
  background-color: #ededed;
  border-radius: var(--border-radius-large);
  font-weight: 500;
  cursor: pointer;
}

.selectorBtn_box .xBtn {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
}

.xBtn {
  padding: 5px; /* 버튼의 여백 */
  cursor: pointer; /* 클릭 가능하다는 커서 스타일 */
}

/* 팝업 버튼 박스(단일) */
.popup-btnBox {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

/* 팝업 버튼 박스(복합) */
.popup-btnBox_left {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
}
.popup-btnBox_right {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.popup_flex_td {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

/* popup_table */
.popup-wrapper {
  padding: 40px;
  overflow-x: auto;
}

/*
 * 결재 요청 등록: 휴가(#regModal)·품의/지출(#purchaseRegModal) 동일 최대 너비로 통일
 * (기존 .modal-content max-width: 90% 유지 + 과도한 초광폭만 제한)
 */

#regModal .modal-content,
#purchaseRegModal .modal-content,
#purchaseDtlModal .modal-content{
  max-width: min(940px, 90vw);
  width: 100%;
}


#prjRegModal .modal-content,
#prgDtlModal .modal-content {
  max-width: min(1340px, 90vw);
  width: 100%;
}


.popup-wrapper.approval-doc-reg {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.popup_title {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 20px;
}

/* 사용자 상세 수정 팝업 — 타이틀 우측에 경력 관리 버튼 */
.user-mgmt-update-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.user-mgmt-update-title-row .user-mgmt-update-title-row__title {
  margin-bottom: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.user-mgmt-update-title-row .user-mgmt-update-career-btn {
  flex-shrink: 0;
}

.popup_table {
  width: 100%;
  border-spacing: 6px 4px;
}

.popup_table.tb_fixed {
  table-layout: fixed;
}

.popup_table tr {
  border-collapse: collapse;
  width: 100%;
  /* margin-top: 20px; */
  border: none;
}

.popup_table th {
  color: #1c4004;
  font-weight: 600;
  font-size: 14px;
  background-color: var(--color-secondary-green);
  border-radius: var(--border-radius-medium);
  width: 20%;
  min-width: 100px;
  text-align: left;
  padding: 16px 24px;
}

.popup_table tr td {
  padding: 4px 0;
}

.popup_table .tb_text {
  display: block;
  width: 100%;
  min-height: 40px; /* 원하는 최소 높이 설정 */
  padding: 13px;
  border: 1px solid var(--color-border-gray);
  border-radius: var(--border-radius-medium);
  text-align: left;
}

.popup_table .align_center {
  text-align: center;
}

.popup_table input[type="text"],
.popup_table input[type="date"],
.popup_table select,
.popup_table textarea {
  width: 100%;
}



.popup_table option {
  display: block;
  min-height: 1.2em;
  padding: 0px 2px 1px;
  white-space: nowrap;
}

.popup_table label {
  display: block;
}

/* 지출결의 등: 라디오+문구는 블록 라벨 규칙보다 한 줄·수직 중앙 정렬이 우선 */
.popup_table .pur-reg-pay-account-row label.pur-reg-pay-radio-label {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1;
}

.pointRed {
  color: var(--color-system-point);
}

/* 라벨 옆 선택 항목 안내 (필수 아님) */
.pointGray {
  color: #6b7280;
  font-weight: 500;
}

.popup_flex {
  display: flex;
  align-items: center;
  gap: 5px 10px;
}

.popup_flex--date .date_item {
  width: calc(50% - 5px);
  text-align: left;
}

.popup_flex--date .date_item label {
  padding: 0 0 10px 5px;
}

/*  팝업 하단 테이블 - 결재 처리 이력 */
.popup_data_table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}

.popup_data_table th {
  padding: 15px 10px;
  background-color: var(--color-secondary-green);
  border-bottom: 1px solid var(--color-primary-green-100);
  font-weight: 600;
  white-space: nowrap;
}

.popup_data_table td {
  padding: 18px 10px;
  border-bottom: 1px solid var(--color-disabled-bg);
  box-sizing: border-box;
}

/* No 셀 width 지정 */
.popup_data_table td.td_num {
  width: 65px;
}

/* 비고 셀 width 지정 */
.popup_data_table td.td_note {
  width: 300px;
}

/* 날짜 셀 width 지정 */
.popup_data_table td.td_date {
  width: 150px;
}

/* popBtn */
.registerBtn_popup {
  background-color: var(--color-primary-green-100);
  padding: 12px 30px;
  border-radius: var(--border-radius-medium);
  color: var(--color-white);
  display: flex;
}

/* 행 추가 버튼 생성 */
.rowAddBtnTd {
  padding: 6px 0 !important;
  background-color: var(--color-background-gray) !important;
  border-radius: 0 !important;
  text-align: center;

  cursor: pointer;
}

.rowAddBtnTd button img {
  vertical-align: middle;
}

/* 행 삭제 버튼 생성 */
.dynamicRow,
.rowDelTd {
  position: relative;
}

.dynamicRow .rowDelBtn,
.rowDelTd button {
  width: 24px;
  height: 24px;
  position: absolute;
  top: 50%;
  left: calc(100% + 4px);
  transform: translateY(-50%);
}

/* 파일 업로드 */
.file_upload_wrap {
  display: flex;
  align-items: center;
  column-gap: 10px;
}

.file_upload_wrap .file_content {
  width: calc(100% - 130px);
  height: 40px;
  line-height: 40px;
  padding: 0 20px;
  border: 1px solid var(--color-border-gray);
  background-color: var(--color-white);
  border-radius: var(--border-radius-small);
  overflow: hidden;
}

.file_upload_wrap .file_content_2 {
  width: 100%;
  height: 40px;
  line-height: 40px;
  padding: 0 20px;
  border: 1px solid var(--color-border-gray);
  background-color: var(--color-white);
  border-radius: var(--border-radius-small);
  overflow: hidden;
}

.file_upload_wrap .file_label {
  width: 120px;
  height: 40px;
  line-height: 40px;
  font-weight: 500;
  background-color: var(--color-white);
  border: 1px solid var(--color-primary-green-100);
  border-radius: var(--border-radius-medium);
  text-align: center;
  cursor: pointer;
}

.file_upload_wrap .file_input {
  display: none;
}

.file_list_box {
  display: flex;
  flex-wrap: wrap;
  column-gap: 10px;
  width: 100%;
}

.file_list_item {
  position: relative;
  width: calc(33.3333% - 7px);
  line-height: 34px;
  padding: 0 40px 0 20px;
  background-color: #ededed;
  border-radius: var(--border-radius-large);
  margin-top: 10px;
}

.file_list_item .file_item_name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-wrap: normal;
}

.file_list_item .file_item_btn {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 24px;
  height: 24px;
  margin-top: -12px;
}

/* 지출결의서 상세(우측 증빙 패널) — 한 JSP(docKind)에서 분기 */
.approval-expense-dtl__cols {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}

.approval-expense-dtl__left {
  flex: 1 1 380px;
  min-width: 0;
}

.approval-expense-dtl__right {
  flex: 1 1 260px;
  max-width: 360px;
  border: 1px solid var(--color-border-gray);
  border-radius: var(--border-radius-medium);
  padding: 12px 14px;
  background: #f9fdf9;
  box-sizing: border-box;
}

/* (상세 내부 패널은 제거됨) */

/* 지출결의서 증빙 슬라이드아웃(팝업 밖 오른쪽) */
.evidence-slideout {
  position: fixed;
  z-index: calc(var(--z-index-modal) + 1);
  width: min(420px, 92vw);
  background: var(--color-white);
  border: 1px solid var(--color-border-gray);
  border-radius: var(--border-radius-large);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  display: none;
}

/* 슬라이드아웃이 2개(증빙자료/양식보기) 동시에 열릴 때:
 * - 증빙자료가 위로 올라와 클릭/닫기 가능해야 함
 * - 양식보기는 아래 레이어
 */
#formPreviewSlideout.evidence-slideout {
  z-index: calc(var(--z-index-modal) + 1);
}
#evidenceSlideout.evidence-slideout {
  z-index: calc(var(--z-index-modal) + 2);
}

.evidence-slideout.is-open {
  display: block;
}

.evidence-slideout__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border-gray);
  background: #f9fdf9;
}

.evidence-slideout__title {
  font-weight: 700;
  font-size: 16px;
  color: #1c4004;
}

.evidence-slideout__close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #666;
}

.evidence-slideout__body {
  padding: 14px 16px 16px;
  /* 노트북 등 작은 화면에서도 아래가 잘리지 않게: 슬라이드아웃 높이 안에서 스크롤 */
  height: calc(100% - 54px);
  overflow: auto;
}

.evidence-slideout__preview {
  position: relative;
}

.evidence-slideout__hint {
  margin: 0;
  font-size: 13px;
  color: #444;
  line-height: 1.5;
}

.evidence-slideout__img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  border: 1px solid var(--color-border-gray);
  border-radius: var(--border-radius-medium);
  background: #fff;
  display: block;
  cursor: zoom-in;
}

/* 증빙 이미지 클릭 확대(모달) */
.evidence-img-modal {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-index-modal) + 3);
}

.evidence-img-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.evidence-img-modal__content {
  position: absolute;
  /* 확대 보기 영역을 최대화(여백 최소) */
  inset: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.evidence-img-modal__viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.evidence-img-modal__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #fff;
  border-radius: var(--border-radius-large);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
  transform: translate(0px, 0px) scale(1);
  transform-origin: center center;
  will-change: transform;
  user-select: none;
}

.evidence-img-modal__img.is-grab {
  cursor: grab;
}

.evidence-img-modal__img.is-grabbing {
  cursor: grabbing;
}

.evidence-img-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.evidence-slideout__dl {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.evidence-slideout__dl-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--border-radius-medium);
  border: 1px solid var(--color-border-gray);
  background: #fff;
  cursor: pointer;
}

/* 양식 미리보기: PDF / XLSX 아이콘 링크 */
.evidence-slideout__dl-btn--file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  box-sizing: border-box;
}

.evidence-slideout__dl-btn--file:hover {
  background: #f7faf6;
  border-color: #b8c9b0;
}

.evidence-slideout__dl-btn--file:focus-visible {
  outline: 2px solid #2e7d32;
  outline-offset: 2px;
}

.evidence-slideout__dl-btn--file img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
  pointer-events: none;
}

.evidence-slideout__pill {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  border-radius: var(--border-radius-medium);
  border: 1px solid var(--color-border-gray);
  background: #efefef;
  display: flex;
  align-items: center;
  padding: 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.approval-expense-dtl__right-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 10px;
  color: #1c4004;
}

/* 품의·지출 상세: 문서 종류 제목만 (결재 서명 그리드는 미사용) */
.approval-sign__doc-title {
  font-size: 28px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  color: #1c4004;
}

/* 지출 상세: 등록 화면 file_upload_wrap과 동일 박스 — 클릭만 가능(라벨/input 없음) */
.exp-dtl-evidence-click {
  cursor: pointer;
}

.exp-dtl-evidence-click:focus {
  outline: 2px solid var(--color-primary-green-100, #84b73f);
  outline-offset: 2px;
}

/* 지출 상세 지급계좌: popup_table input width:100% 와 flex 한 줄 레이아웃 충돌 방지 */
.pur-reg-pay-account-row input.exp-dtl-pay-input[type="text"] {
  width: auto;
  min-width: 0;
  box-sizing: border-box;
}

.approval-expense-dtl__preview {
  min-height: 48px;
  margin-bottom: 10px;
}

.approval-expense-dtl__preview-hint {
  margin: 0;
  font-size: 13px;
  color: #444;
  line-height: 1.5;
}

.approval-expense-dtl__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  border: 1px solid var(--color-border-gray);
  border-radius: var(--border-radius-medium);
  background: #fff;
}
