@font-face {
  font-family: 'Wanted Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 1000;
  src: url('/fonts/WantedSansVariable.woff2') format('woff2-variations');
}

/* UI Basic */

:root {
  /* Primary Colors (퍼블리시 동기화) */
  --primary: #47429e;
  --primary-dark: #2d2968;
  --primary-light: #eeedfa;
  --danger: #e54e57;
  --secondary: #0052ff;
  /* Background */
  --bg-white: #ffffff;
  --bg-white-60: #ffffff99;
  --bg-gray: #e9e9e9;
  --bg-light-gray: #f9fafb;
  --bg-read-only:#f3f4f6;
  --bg-table-head: #edeef6;
  --bg-table-head-secondary: #e1eef0;
  /* --bg-hover: #f0f0f0; */
  --bg-hover: #fffef1;
  --bg-side-menu: #241f1f;
  /* Button */
  --btn-tertiary: #f6f7f8;
  /* Button / Light / Gray */
  --btn-light-gray-bg: #eaeaea;
  --btn-light-gray-text: #636363;
  /* Button / Light / Primary */
  --btn-light-primary-bg: #e8f2ff;
  --btn-light-primary-text: #0f6faf;
  /* Button / Light / Danger */
  --btn-light-danger-bg: #fedede;
  --btn-light-danger-text: #e3171a;
  /* Text */
  --text-default: #1e1e1e;
  --text-darkgray: #636363;
  --text-gray: #898989;
  --text-button-white: #ffffff;
  /* Border */
  --border-light-gray: #eaeaea;
  --border-gray: #dddddd;
  --border-darkgray: #a7a7a7;
  --border-table-wrap: #6b6178;
  --border-table: #bdbdc1;
  --border-search: #bab3bd;
  /* Shadow */
  --shadow-default: rgba(134, 150, 161, 0.1);
}

/* scrollbar */
html,
body {
  scrollbar-color: #9ca2a8 #f1f5f9;
  background-color: #f9fafb;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 10px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: #f1f5f9;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: #9ca2a8;
  border-radius: 9999px;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

html,
body {
  color: var(--text-default);
  font-family: 'Wanted Sans Variable', '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Apple SD Gothic Neo',
    'Malgun Gothic', 'sans-serif';
}

h3.section_title {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

hr.dashed {
  border-style: dashed;
}

.container--md {
  max-width: 1200px;
  margin: 0 auto;
}


/* Category Component Styles */
.category-wrap {
  display: flex;
}

.category-wrap .category {
  width: 100%;
  flex: 1 1 0%;
}

.category-wrap .category:nth-child(even) {
  --primary: #7974c2;
  --primary-light: #eeedf7;
}

.category-wrap .category ~ .category {
  margin-left: 1.5rem;
  padding-left: 1.5rem;
  border-left: 1px dashed var(--border-gray);
}

@media (max-width: 1024px) {
  .category-wrap {
    flex-direction: column;
  }

  .category-wrap .category ~ .category {
    margin-left: 0;
    padding-left: 0;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-left: none;
    border-top: 1px dashed var(--border-gray);
  }
}

.category__title {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-gray);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category__list .category__item {
  margin-bottom: 0.25rem;
}

.category__item {
  display: flex;
  align-items: center;
}

.category__input {
  position: relative;
  flex-grow: 1;
}

.category__input .custom-input {
  display: block;
  width: 100%;
  transition: 0.3s;
}

.category__input .custom-input:read-only {
  cursor: pointer;
  padding-right: 2.5rem;
}

.category__btn--edit {
  display: block;
  position: absolute;
  top: 50%;
  right: 0.875rem;
  transform: translateY(-50%);
  margin-left: 0.25rem;
  color: var(--text-gray);
  transition: color 0.3s;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.category__btn--edit:hover {
  color: var(--primary);
}

.category__btn--delete {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.25rem;
  aspect-ratio: 1/1;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background-color: var(--bg-gray);
  color: var(--text-gray);
  transition: background-color 0.3s;
  border: none;
  cursor: pointer;
  padding: 0;
}

.category__btn--delete:hover {
  background-color: #ddd;
}

.category__btn--delete:active {
  background-color: #ccc;
}

.category__btn--edit svg,
.category__btn--delete svg {
  display: block;
  width: 1rem;
  height: 1rem;
}

/* active, hover */
.category__input.active .custom-input {
  border-color: var(--primary) !important;
  background-color: var(--primary-light) !important;
  color: var(--primary) !important;
}

.category__input.active .custom-input:read-only,
.category__input:hover .custom-input:read-only {
  border-color: var(--primary);
  background-color: var(--primary-light);
  color: var(--primary);
}

.category__input.active .category__btn--edit,
.category__input:hover .category__btn--edit {
  color: var(--primary);
}

/* Tab Component Styles */
.tab-group-box {
  background-color: #f5f6fa;
  padding: 0.875rem 1rem 1rem;
  border-radius: 1rem;
  border: 2px solid #e5e7ec;
}

.tabs {
  display: flex;
  margin-bottom: 1rem;
}

.tabs button {
  transition: 0.3s;
  background: none;
  border: none;
  cursor: pointer;
}

@media (max-width: 1024px) {
  .tabs {
    margin-bottom: 0.75rem;
  }
}


.tabs--line {
  border-bottom: 1px solid var(--border-gray);
}

.tabs--line button {
  color: var(--text-gray);
  font-weight: 700;
  font-size: clamp(0.875rem, 0.5rem + 1vw, 1rem);
  padding: 0 0.25rem 0.5rem;
  border-bottom: 2px solid transparent;
}

.tabs--line button ~ button {
  margin-left: 0.75rem;
}

.tabs--line button.active {
  color: var(--primary);
  border-color: var(--primary);
}

@media (max-width:370px) { 
  .tabs--line button ~ button {
    margin-left: 0.5rem;
  }

  .btn-more span, .btn--link span {
    display: none;
  }

}

/* 탭 링크(a)도 버튼과 동일 스타일 (Turbo Frame 탭 등) */
.tabs a {
  text-decoration: none;
  color: inherit;
}
.tabs--line a {
  color: var(--text-gray);
  font-weight: 700;
  font-size: clamp(0.875rem, 0.5rem + 1vw, 1rem);
  padding: 0 0.25rem 0.5rem;
  border-bottom: 2px solid transparent;
}
.tabs--line a ~ a {
  margin-left: 0.75rem;
}
.tabs--line a.active {
  color: var(--primary);
  border-color: var(--primary);
}

.tabs--rounded {
  background-color: #f5f6fa;
  border: 1px solid #e2e4ed;
  border-radius: 0.875rem;
  padding: 0.25rem;
  white-space: nowrap;
  overflow-x: auto;
}

.tabs--rounded button {
  display: block;
  padding: 0.5rem 1.25rem;
  border-radius: 0.625rem;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-gray);
  border: 1px solid transparent;
}

.tabs--rounded button.active {
  color: var(--primary);
  background-color: var(--bg-white);
  border-color: #cdcfdb;
  box-shadow: 0 4px 10px 0 rgba(60, 55, 85, 0.1);
}

.tabs--pill {
  flex-wrap: wrap;
  gap: 0.375rem 0;
}

.tabs--pill button {
  padding: 0.125rem 0.75rem;
  border-radius: 999px;
  text-align: center;
  font-size: 0.875rem;
  margin-right: 0.25rem;
  background-color: var(--bg-gray);
  color: var(--text-darkgray);
}

.tabs--pill button:last-child {
  margin-right: 0;
}

.tabs--pill button.active {
  background-color: var(--btn-light-primary-bg);
  color: var(--btn-light-primary-text);
  font-weight: 600;
}

.tabs-content {
  display: none;
}

.tabs-content.active {
  display: block;
}

/* box */
.box-wrap-cols {
  display: flex;
}

.box-wrap-cols > .box {
  flex: 1 1 0%;
}

.box-wrap-cols > .box ~ .box {
  margin-left: 1rem;
}

@media (max-width: 1024px) {
  .box-wrap-cols {
    flex-direction: column;
  }

  .box-wrap-cols > .box ~ .box {
    margin-left: 0;
    margin-top: 1rem;
  }
}

@media (max-width: 1500px) {
  .box-wrap-cols.box-2-1 {
    flex-wrap: wrap;
  }

  .box-wrap-cols.box-2-1 > .box:last-child {
    flex-basis: 100%;
    margin-left: 0;
    margin-top: 1rem;
  }
}

.box {
  position: relative;
  border: 1px solid var(--border-gray);
  border-radius: 1rem;
  background: var(--bg-white);
  box-shadow: 0 4px 10px 0 rgba(68, 86, 96, 0.15);
  overflow: hidden;
  padding: 1.25rem;
  min-height: 100%;
}

.box--form > div ~ div {
  margin-top: 0.75rem;
}

/* form 내부의 연속된 custom-table-wrap 간격 */
.box--form form > .custom-table-wrap ~ .custom-table-wrap {
  margin-top: 0.75rem;
}

/* 검색 폼 전용: 목록 가시영역 확보를 위해 상하 여백 축소 (등록/수정 폼 영향 없음) */
.box--search {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

.box--search .search-btn-group {
  margin-top: 0.5rem;
}


.box__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  background-color: #f9fafb;
}

.box__title {
  display: flex;
  align-items: center;
  height: 2.188rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75em;
  border-bottom: 1px solid var(--border-gray);
}

.box--grow {
  display: flex;
  flex-direction: column;
}

/* Modal form styles (branch-code/modal, upload-modal, employee-code/modal) */
.modal-form .box__title { font-size: 14px; font-weight: 600; margin: 0; }
.modal-form .box__content { padding: 16px; }
.modal-form input[type="text"],
.modal-form textarea { border: 1px solid #CCCCCC !important; padding: 4px 8px; box-sizing: border-box; }
.modal-form input[type="text"]:focus,
.modal-form textarea:focus { border: 1px solid #4A90E2 !important; outline: none; }
.modal-form input[type="file"] { border: 1px solid #CCCCCC !important; padding: 4px 8px; box-sizing: border-box; }

/* SMS popup form layout */
.sms-popup-form { display: flex; flex-direction: column; gap: 1rem; }

/* SMS 팝업 폼 레이아웃 */
.box--grow .msg-box { flex-grow: 0; max-height: 380px; }
.box--grow .msg-box__cnt,
.box--grow .mockup { max-width: 100%; box-sizing: border-box; }
.box--grow .msg-box__cnt textarea { width: 100%; max-width: 100%; box-sizing: border-box; min-width: 0; border: none; }
.box--grow .mockup { max-width: 280px; height: auto; min-height: 240px; padding: 2.5rem 1rem 0.5rem; }
.box--grow .mockup .msg-box__cnt textarea { min-height: 140px; max-height: 200px; }

@media (max-width: 1024px) {
  .box__title {
    margin-bottom: 0.5rem;
  }
}

.box__title > svg {
  display: block;
  margin-right: 0.5rem;
  color: var(--primary);
}

.box__title b {
  display: block;
  margin-right: 1rem;
  flex-grow: 1;
  font-size: 1.25rem;
  font-weight: 700;
}

.box__title.sm {
  height: auto;
  margin-bottom: 0.5rem;
}

.box__title.sm b {
  font-size: 1rem;
}

.box__btn-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.box__btn-group > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

/* 버튼 그룹 내 버튼 최소 너비 고정 (검색 시 쿰척거림 방지) */
.box__btn-group .btn {
  min-width: max-content;
  white-space: nowrap;
}

.box__btn-group > .left,
.box__btn-group > .right {
  flex-shrink: 0;
}

/* box__btn-group 내 select와 버튼 스타일 일관성 */
.box__btn-group .selectbox {
  height: 2.25rem;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 6px;
}

@media screen and (max-width: 640px) {
  .box__btn-group {
    display: grid;
    grid-template-columns:repeat(1,1fr);
    align-items:end;
  }

  .box__btn-group > div {
    justify-content:end;
  }

  .box__btn-group .btn,
  .box__btn-group .selectbox {
    width:48%;
  }

  .box__btn-group .right .selectbox {
    display: none;
  }

}


.box__btn-group .btn--outline,
.box__btn-group .btn--primary-outline {
  height: 2.25rem;
  padding: 0 0.75rem;
  font-size: 0.825rem;
  font-weight: 600;
}

.search-btn-group {
  display: flex;
  justify-content: center;
}

.search-btn-group button {
  width: 100%;
  max-width: 12.5rem;
}

.search-btn-group button ~ button {
  margin-left: 0.5rem;
}

/* text-ellipsis (테이블 내용 말줄임표 + 호버 시 title tooltip) */
.table--data tbody td.text-ellipsis {
  max-width: 0;
  overflow: clip;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table--data tbody td.text-ellipsis span {
  display: inline-block;
  max-width: 100%;
  overflow: clip;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 테이블 말줄임 호버 툴팁 (싱글톤, .tooltip__desc 스타일 재사용) */
.ellipsis-tooltip {
  position: fixed;
  padding: 0.5rem 0.875rem;
  max-width: 320px;
  border-radius: 0.5rem;
  background-color: rgba(52, 51, 54, 0.9);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
  white-space: normal;
  word-break: break-all;
  overflow-wrap: break-word;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
}

/* text-wrap (테이블 내용 자동 줄바꿈) */
.table--data tbody td.text-wrap {
  max-width: 300px;
  white-space: normal;
  word-break: break-all;
}
/* text-wrap--fixed: 좁은 컬럼에서도 강제로 너비를 유지하며 줄바꿈 */
.table--data tbody td.text-wrap--fixed {
  min-width: 130px;
  max-width: 160px;
  white-space: normal;
  word-break: break-all;
}

/* tab */
.tab-group-box {
  /*background-color: #f5f6fa;*/
  background-color: #fff;
  padding: 0.875rem 1rem 1rem;
  border-radius: 1rem;
  border: 2px solid #e5e7ec;
}

.tabs {
  display: flex;
  margin-bottom: 1rem;
}

.tabs button {
  transition: 0.3s;
}

@media (max-width: 1024px) {
  .tabs {
    margin-bottom: 0.75rem;
  }
}

.tabs--line {
  border-bottom: 1px solid var(--border-gray);
}

.tabs--line button {
  color: var(--text-gray);
  font-weight: 700;
  font-size: 1rem;
  padding: 0 0.25rem 0.5rem;
  border-bottom: 2px solid transparent;
}

/* .tabs--line button ~ button {
  margin-left: 0.75rem;
} */

.tabs--line button.active {
  color: var(--primary);
  border-color: var(--primary);
}

.tabs--rounded {
  background-color: #f5f6fa;
  border-radius: 0.875rem;
  padding: 0.25rem;
  white-space: nowrap;
  overflow-x: auto;
}

.tabs--rounded button {
  display: block;
  padding: 0.5rem 1.25rem;
  border-radius: 0.625rem;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-gray);
  border: 1px solid transparent;
}

.tabs--rounded button.active {
  color: var(--primary);
  background-color: var(--bg-white);
  border-color: #cdcfdb;
  box-shadow: 0 4px 10px 0 rgba(60, 55, 85, 0.1);
}

.tabs--pill {
  flex-wrap: wrap;
  gap: 0.375rem 0;
}

.tabs--pill button {
  padding: 0.125rem 0.75rem;
  border-radius: 999px;
  text-align: center;
  font-size: 0.875rem;
  margin-right: 0.25rem;
  background-color: var(--bg-gray);
  color: var(--text-darkgray);
}

.tabs--pill button:last-child {
  margin-right: 0;
}

.tabs--pill button.active {
  background-color: var(--btn-light-primary-bg);
  color: var(--btn-light-primary-text);
  font-weight: 600;
}

.tabs-content {
  display: none;
}

.tabs-content.active {
  display: block;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* btn */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;
  line-height: 2.25rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  gap: 0.25rem;
  text-align: center;
  font-size: 0.825rem;
  font-weight: 600;
  white-space: nowrap;
  user-select: none;
  transition: 0.3s;
}

@media (hover: hover) {
  .btn:not(:disabled):hover {
    transform: scale(1.05);
  }
}

.btn:active {
  transform: scale(1);
}

.btn:disabled {
  opacity: 0.5;
}

.btn svg {
  display: block;
  width: 1rem;
  height: 1rem;
}

.btn--sm {
  padding: 0 0.5rem;
  height: 1.75rem;
  font-size: 0.725rem;
  line-height: 1.75rem;
}

.btn--md {
  height: 2rem;
  line-height: 2rem;
}

.btn--primary {
  background-color: var(--primary);
  color: var(--text-button-white);
}

.btn--secondary {
  background-color: #205e9f;
  color: var(--text-button-white);
}

.btn--green {
  background-color: #1eaf8f;
  color: var(--text-button-white);
}

.btn--gray {
  background-color: #6c6c6c;
  color: var(--text-button-white);
}

.btn--warning {
  background-color: #e34e4e;
  color: var(--text-button-white);
}

.btn--danger {
  background-color: var(--danger);
  color: var(--text-button-white);
}

.btn--outline {
  background-color: var(--bg-white);
  border: 1px solid var(--border-darkgray);
}

.btn--primary-outline {
  background-color: var(--bg-white);
  border: 1px solid var(--primary);
  color: var(--primary);
}

.btn--green-outline {
  background-color: var(--bg-white);
  border: 1px solid #1eaf8f;
  color: #0e8d71;
}

.btn--danger-outline {
  background-color: var(--bg-white);
  border: 1px solid var(--btn-light-danger-text);
  color: var(--btn-light-danger-text);
}

.btn--secondary-outline {
  background-color: var(--bg-white);
  border: 1px solid #0e76bc;
  color: #0e76bc;
}

.btn--orange {
  background-color: #eb760e;
  color: var(--text-button-white);
}

.btn--orange-outline {
  background-color: var(--bg-white);
  border: 1px solid #e6a04e;
  color: #c87a12;
}

.btn--teal {
  background-color: #4f46e5;
  color: var(--text-button-white);
}

@media (hover: hover) {
  .btn--ghost:hover {
    color: var(--primary);
    background: var(--bg-hover);
  }
}

.btn--link {
  display: flex;
  align-items: center;
  color: var(--btn-light-gray-text);
  transition: 0.3s;
}

.btn--link span {
  font-size: 15px;
}

/*table link*/
table .btn--link {
  color: var(--primary);
}

@media (hover: hover) {
  .btn--link:hover {
    /* color: var(--primary-dark); */
    color: var(--primary);
    text-decoration: underline;
  }

  /*table link*/
  table .btn--link:hover {
    color: var(--secondary);
    text-decoration: underline;
  }

  table .btn--link--danger:hover {
    color: #dc2626;
  }
}

table .btn--link--danger {
  color: #ef4444;
}

.btn--link svg {
  display: block;
  /* margin-left: 0.25rem; */
  width: 1rem;
  height: 1rem;
}

.btn--svg svg {
  display: block;
  margin-left: 0.25rem;
  color: var(--primary);
  width: 1rem;
  height: 1rem;
  transition: 0.3s;
}

@media (hover: hover) {
  .btn--svg:hover svg {
    color: var(--primary);
  }
}

.selectbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  line-height: 2.25rem;
  padding: 0 0.5rem;
  border-radius: 0.5rem;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: normal;
  user-select: none;
  background-color: var(--bg-white);
  border: 1px solid var(--border-darkgray);
}

/* selectbox 내 option 일관된 스타일 (optgroup 내부 포함) */
.selectbox option,
.selectbox optgroup option {
  font-weight: normal;
  padding-left: 0 !important;
}

.selectbox optgroup {
  font-weight: 600;
}

/* selectbox가 w-full 클래스와 함께 사용될 때 전체 너비 적용 */
.selectbox.w-full {
  display: flex !important;
  width: 100% !important;
}

/* grid 레이아웃 내 selectbox는 전체 너비 차지 */
.grid .selectbox,
.grid > .selectbox,
.grid-cols-2 .selectbox,
.grid-cols-2 > .selectbox,
.grid-cols-3 .selectbox,
.grid-cols-3 > .selectbox {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* custom-table 내 grid에서 selectbox 전체 너비 */
.custom-table .grid .selectbox,
.custom-table .grid > .selectbox,
.table__data .grid .selectbox,
.table__data .grid > .selectbox,
.table__data > .grid > .selectbox {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* form-card 테이블 셀 안의 selectbox도 전체 너비 */
.custom-table .table__data > .selectbox {
  display: flex;
  width: 100%;
}

/* Tailwind grid-cols-N과 함께 사용될 때 */
[class*='grid-cols-'] > select.selectbox {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  text-align: center;
  font-size: 0.938rem;
  line-height: 2.25rem;
  font-weight: 500;
  transition: 0.3s;
}

@media (max-width:470px) { 
  .pagination button {
    font-size: 13px;
    width: auto;
    margin: 0 4px;
  }
}

@media (hover: hover) {
  .pagination button:hover {
    background-color: var(--bg-hover);
  }
}

.pagination button.active {
  color: var(--primary);
  font-weight: 700;
}

.pagination button svg {
  width: 1rem;
  height: 1rem;
}

/* table */
table {
  table-layout: fixed;
  width: 100%;
  text-align: left;
  font-size: 0.875rem;
}

table thead th {
  font-weight: 500;
  background-color: var(--bg-table-head);
}

table thead tr:first-child th {
  font-weight: 700;
}

/*  tr border처리 하지않음 파이어 삭제
table tr {
  border-bottom: 1px solid var(--border-table);
} */

.table--board {
  table-layout: auto;
  width: auto;
  min-width: 100%;
  white-space: nowrap;
  border-top: 1px solid var(--border-table);
  border-collapse: collapse;
}

.table--board th,
.table--board td {
  min-height: 3rem;
  padding: 0.5rem 1.25rem;
  border-bottom: 1px solid var(--border-table);
}

/* 파이어 삭제
.table--board tbody th {
  display: flex;
  align-items: center;
  line-height: 1.5;
  font-weight: 500;
} */

/*board a 말줄임 추가*/
.table--board .board-title a {
  width: 80%;
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  vertical-align:middle;
  font-weight: 600;
}

.table--board .board-title .comt {
  color: var(--primary);
  margin-left: 5px;
}

/*제목칸 기본 width 추가 (모바일 스크롤고정)*/
.table--board .board-title a {
  min-width: 150px;
  max-width: 600px;
}


.table--board tbody td {
  font-weight: 500;
}

/* .table--board tr {
  transition: 0.3s;
  border-bottom: 1px solid var(--border-table);
} */

.table--board input {
  background-color: transparent;
  width: 100%;
}

.table--data {
  table-layout: auto;
  width: auto;
  min-width: 100%;
  white-space: nowrap;
  border-collapse: collapse;
}

.table--data tr {
  transition: 0.3s;
}

.table--data th,
.table--data td {
  min-height: 3rem;
  padding: 0.375rem 0.5rem;
  border: 1px solid var(--border-table);
  word-break: break-all;
}

.table--data th svg {
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  color: var(--text-darkgray);
}

.table--data td {
  background-color: var(--bg-white);
}

/* 컬럼 하이라이트 (highlight=true 컬럼 - 첫 열 등 강조 배경) */
.table--data td.td-highlight {
  background-color: var(--primary-light, #e6e9ee) !important;
  font-weight: 600;
  min-width: 270px;
}

/* 건수소계 행 구분선 (rowClassKey="_rowClass" → row-count, 마지막 행 제외) */
.table--data tbody tr.row-count:not(:last-child) td {
  border-bottom: 2px solid #aca5c7!important;
}

/* 컬럼 그룹 구분선 (separatorBefore=true 컬럼 - 세로 구분선) */
.table--data .td-separator {
  border-left: 2px solid var(--border-table, #a0a6ab) !important;
}
/* 컬럼 그룹 구분선 accent 변형 (separatorBefore="accent" - 테마 컬러) */
.table--data .td-separator--accent {
  border-left: 2px solid var(--primary, #5046e5) !important;
}

/* 데이터 테이블 내 입력 요소 그룹 줄바꿈 방지 */
.table--data td .form-group,
.table--data td .text-group,
.table--data td .btn-group {
  flex-wrap: nowrap;
}

/*테이블 왼쪽오른쪽 첫번째 마지막 라인 제거*/
.table--data td:first-child,
.table--data th:first-child {
  border-left: 0;
}

.table--data td:last-child,
.table--data th:last-child {
  border-right: 0;
}

.table--data tbody td,
.table--data tbody th {
  border: 1px solid var(--border-table);
}

.table--data tbody th {
  background-color: var(--bg-table-head);
  text-align: left;
  padding-left: 0.75rem;
}

.table--data.table--detail-overlap {
  margin: -1px;
  width: calc(100% + 2px);
}

/*table--data 및 읽기전용 필드 백그라운드 설정*/
.read-only-bg,
.table--data td.read-only-bg,
.table__data.read-only-bg,
.table__data:has(.read-only-bg),
.table__data:has(#inputPersonInfo){
  background: var(--bg-read-only);
}

/* popup-detail-table labelButtons */
.custom-table-wrap:has(.label-action-btn) {
  overflow: visible;
}
.label-action-th {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 2px;
}
.label-action-group {
  display: inline-flex;
  gap: 1px;
}
.label-action-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.label-action-btn:hover {
  background-color: rgba(59, 130, 246, 0.15);
}
.label-action-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #fff;
  font-size: 11px;
  font-weight: 400;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 50;
}
.label-action-btn:hover::after {
  opacity: 1;
}

.table--data figure {
  max-height: 200px;
}

@media (hover: hover) {
  .table--board tr:hover {
    background: var(--bg-hover);
  }

  .table--data tr:hover {
    background: var(--bg-hover);
  }
}

/* ====================== */
/* Sticky Header 지원 */
/* ====================== */
.table--data thead.sticky {
  position: sticky;
  top: -1px;
  z-index: 10;
}

.table--data thead.sticky th {
  background: var(--bg-table-head);
}

.table--data select {
  background-color: transparent;
}

.table--data .selectbox {
  background-color: transparent;
  height: 100%;
  min-height: calc(var(--table-height, 2rem) - 2px);
}

.table--data .selectbox:disabled {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: transparent;
  background-image: none;
  border-color: transparent;
  outline-color: transparent;
  pointer-events: none;
  opacity: 1;
  color: inherit;
}


/* ====================== */
/* .table--data input 스타일 (퍼블리시 동기화) */
/* ====================== */
.table--data input {
  background-color: transparent;
  width: 100%;
}

.table--data input[type='text'] {
  width: 100%;
  min-height: calc(var(--table-height, 2rem) - 2px);
  padding: 0 0.5rem;
  border: 1px solid transparent;
  outline: 2px solid transparent;
  border-radius: 6px;
  transition: 0.3s;
}

.table--data input[type='text'] {
  border-color: var(--border-darkgray);
}

.custom-table .table__data input[type='text']:hover,
.custom-table .table__data input[type='text']:focus,
.table--data input[type='text']:hover,
.table--data input[type='text']:focus {
  border-color: var(--primary);
  outline-color: #6a73c920;
}

.custom-table .table__data input[type='text']:read-only,
.table--data input[type='text']:read-only,
input[type='text']:read-only,
input[type='date']:read-only {
  padding: 0 0.5rem;
  background-color: transparent;
  border-color: transparent;
  outline-color: transparent;
  pointer-events: none;
}

.custom-table .table__data input[type='text']:disabled,
.table--data input[type='text']:disabled {
  background-color: var(--bg-gray);
  pointer-events: none;
}

/* text alignment utility for data table cells */
.table--data td.text-right,
.table--data td.text-right input {
  text-align: right;
}

/* center checkbox/radio in data table cells */
.table--data td.text-center input[type='checkbox'],
.table--data td.text-center input[type='radio'],
.table--data th.text-center input[type='checkbox'],
.table--data th.text-center input[type='radio'] {
  margin: 0 auto;
}

/* disabled checkbox/radio in data table */
.table--data input[type='checkbox']:disabled,
.table--data input[type='radio']:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #f3f4f6;
}
.table--data input[type='checkbox']:disabled:checked,
.table--data input[type='radio']:disabled:checked {
  opacity: 0.5;
  background-color: #9ca3af;
}

.board-badge {
  flex-shrink: 0;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  border-radius: calc(0.5rem - 4px);
  margin-inline-end: 0.5rem;
  background-color: var(--btn-light-primary-bg);
  color: var(--btn-light-primary-text);
}

/* breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-darkgray);
  font-weight: 500;
}

.breadcrumb a,
.breadcrumb span {
  white-space: nowrap;
}

.breadcrumb svg {
  display: block;
  width: 1rem;
  height: 1rem;
  color: var(--text-gray);
  flex-shrink: 0;
}

/* search box */
.search-box {
  display: flex;
  align-items: center;
  height: 2.25rem;
}

.search-box select {
  height: 100%;
  border: 1px solid var(--border-gray);
  border-radius: 0.5rem 0 0 0.5rem;
  padding: 0 0.5rem;
  font-size: 0.875rem;
}

.search-box input {
  width: 10rem;
  height: 100%;
  padding: 0 0.5rem;
  border-top: 1px solid var(--border-gray);
  border-bottom: 1px solid var(--border-gray);
  font-size: 0.875rem;
}

.search-box button {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 0.5rem;
  border-radius: 0 0.5rem 0.5rem 0;
  background-color: var(--primary);
  color: var(--text-button-white);
  font-size: 0.875rem;
}

.search-box button svg {
  display: block;
  width: 1rem;
  height: 1rem;
  margin-left: 0.25rem;
}

/* group */
.form-group,
.btn-group,
.input-group,
.text-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0;
}

.form-group .checkbox,
.form-group .radiobox {
  margin-right: 0.5rem;
}

/* 기간 선택 버튼 그룹 */
.period-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.period-btn-group .btn {
  min-width: 3.5rem;
  padding: 0 0.5rem;
}

/* 선택된 버튼 스타일 - 회색 배경 */
.period-btn-group .btn.active {
  background-color: #82818b;
  color: white;
  border-color: #6d6c77;
}

.period-btn-group .btn:hover:not(.active) {
  background-color: #f3f4f6;
}

.btn-group button ~ button {
  margin-left: 0.25rem;
}

.input-group > span {
  display: block;
  margin: 0 0.5rem;
}

.input-group input,
.input-group select {
  flex: 1 1 0%;
  min-width: 0;
}

/* 차량번호 입력 그룹: 비율 3:2:2:3 */
.input-group.car-number-group {
  gap: 0.25rem;
}
.input-group.car-number-group > select:nth-child(1) {
  flex: 3 1 0%;
  min-width: 0;
}
.input-group.car-number-group > input:nth-child(2) {
  flex: 2 1 0%;
  min-width: 0;
  width: auto !important;
}
.input-group.car-number-group > select:nth-child(3) {
  flex: 2 1 0%;
  min-width: 0;
}
.input-group.car-number-group > input:nth-child(4) {
  flex: 3 1 0%;
  min-width: 0;
  width: auto !important;
}

.custom-table .table__data > .form-group,
.custom-table .table__data > .btn-group {
  height: 100%;
  padding: 0.25rem 0.5rem;
  min-height: calc(var(--table-height) - 2px);
}

.custom-table .table__data > .input-group,
.custom-table .table__data > .text-group {
  height: 100%;
  min-height: calc(var(--table-height) - 2px);
}

.text-group > * {
  margin-right: 0.5rem;
}

.text-group > span:first-child {
  display: block;
  margin-left: 0.875rem;
}

.custom-table .text-group input[type='text'] {
  flex: 1 1 0%;
}

/* checkbox radiobox swtichbox */
.checkbox,
.radiobox,
.switchbox {
  display: flex;
  align-items: center;
  white-space: nowrap;
  min-height: 1.25rem;
}

.custom-table .checkbox,
.custom-table .radiobox {
  height: auto;
}

.table__data > .checkbox,
.custom-table > .radiobox {
  min-height: calc(var(--table-height) - 2px);
}

.checkbox input[type='checkbox'],
.radiobox input[type='radio'],
.switchbox .switch {
  margin-right: 0.375rem;
  flex-shrink: 0;
}

input[type='checkbox'],
input[type='radio'] {
  display: block;
  width: 1rem;
  height: 1rem;
  appearance: none;
  box-sizing: border-box;
  border: 1px solid var(--border-darkgray);
  background: var(--bg-white);
  border-radius: 4px;
  outline: 0;
  transition: 0.3s;
  cursor: pointer;
}

input[type='radio'] {
  border-radius: 50%;
}

input[type='checkbox']:checked,
input[type='radio']:checked {
  background-color: var(--primary);
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
  border-color: transparent;
}

/* 차명코드 팝업 - 가액옵션 체크박스 (#check_price) */
#check_price {
  border: 1px solid #777 !important;
}
#check_price:checked {
  background-color: #47429e !important;
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e") !important;
  border-color: transparent !important;
}

.checkbox label,
.radiobox label,
.switchbox label {
  line-height: 1rem;
  cursor: pointer;
}

.switchbox .switch {
  display: block;
  width: 2.25rem;
  height: 1.25rem;
  padding: 2px;
  background-color: #4e4d67;
  border-radius: 99px;
  transition: background-color 0.3s;
}

.switchbox .switch.active {
  background-color: var(--primary);
}

.switchbox .switch__ball {
  display: block;
  height: 100%;
  aspect-ratio: 1/1;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 0 2px 0 rgba(52, 51, 54, 0.3);
  transition: transform 0.3s;
}

.switchbox .switch.active .switch__ball {
  transform: translatex(100%);
}

/* input */
.input-group {
  display: flex;
  align-items: center;
}

.input-group > * ~ * {
  margin-left: 0.25rem;
}

input.custom-input {
  display: block;
  height: 2.25rem;
  border: 1px solid var(--border-darkgray);
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: border-color 0.3s;
}

input.custom-input:hover,
input.custom-input:focus {
  border-color: var(--primary);
}

/* date-wrap */
.datepicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.custom-table .datepicker {
  height: 100%;
  padding: 0;
}

.date-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.datepicker .date-wrap {
  margin-right: 1rem;
}

/* 기간 라디오 버튼 영역 너비 고정 (날짜 변경 시 레이아웃 흔들림 방지) */
.datepicker > .form-group {
  flex-shrink: 0;
  min-width: 240px;
}

/* date input 최소 너비 고정 */
.datepicker input[type='date'],
.datepicker input[type='month'] {
  min-width: 130px;
  width: 130px;
}

/* date input mobile */
@media (max-width: 450px) {
  .datepicker input[type='date'],
  .datepicker input[type='month'] {
    min-width: 100px;
    width: 45%;
  }
}

/* scroll-box */
.scroll-box {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 600px;
}

/* 테이블 첫 행 고정 (scroll-box 내부) */
.scroll-box table {
  border-collapse: collapse;
  border-spacing: 0;
}

.scroll-box table thead th {
  position: sticky;
  top: -1px;
  z-index: 10;
  background-color: var(--bg-table-head);
}

/* stats-pivot-tfoot 포함 테이블: separate 모드 + 단방향 border (겹침 방지) */
.scroll-box table:has(.stats-pivot-tfoot) {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}
.scroll-box table:has(.stats-pivot-tfoot) th,
.scroll-box table:has(.stats-pivot-tfoot) td {
  border: none !important;
  border-right: 1px solid var(--border-table) !important;
  border-bottom: 1px solid var(--border-table) !important;
}
/* 마지막 셀 우측 border 제거 (스크롤 인접 세로선 제거) */
.scroll-box table:has(.stats-pivot-tfoot) th:last-child,
.scroll-box table:has(.stats-pivot-tfoot) td:last-child {
  border-right: none !important;
}
/* tbody 마지막 행 하단 border 제거 (tfoot 구분선과 겹침 방지) */
.scroll-box table:has(.stats-pivot-tfoot) tbody tr:last-child td {
  border-bottom: none !important;
}
/* 합계/인포벨 행 하단 고정 - box-shadow (sticky에서도 항상 표시) */
.scroll-box .stats-pivot-tfoot td {
  position: sticky;
  z-index: 10;
  background-color: #f3f4f6 !important;
  border: none !important;
  border-right: 1px solid var(--border-table) !important;
  box-shadow: inset 0 1px 0 #d1d5db, 0 1px 0 #d1d5db;
}
.scroll-box .stats-pivot-tfoot td:last-child {
  border-right: none !important;
}

/* 합계 행 (첫 번째 tr): 인포벨 행 높이만큼 위에 고정 */
.scroll-box .stats-pivot-tfoot tr:first-child td {
  bottom: 33px;
}

/* 인포벨 행 (두 번째 tr): 맨 아래 고정 */
.scroll-box .stats-pivot-tfoot tr:nth-child(2) td {
  bottom: 0;
}

/* tfoot에 행이 1개뿐일 때 (FC탭 등 인포벨 없음) */
.scroll-box .stats-pivot-tfoot tr:first-child:last-child td {
  bottom: 0;
}



.scroll-box-y {
  overflow-y: auto;
}

/* 테이블 첫 행 고정 (scroll-box-y 내부) */
.scroll-box-y table {
  border-collapse: separate;
  border-spacing: 0;
}

.scroll-box-y table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--bg-table-head);
}

/* 테이블 첫 행 고정 (일반 테이블 - overflow가 있는 부모 요소 내부) */
table.table--data thead th {
  position: sticky;
  top: -1px;
  z-index: 10;
  background-color: var(--bg-table-head);
  text-align: center;
  line-height: 1.2;
}

/*sticky collapse 버그용 th top line처리*/
thead th::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--bg-side-menu);
  pointer-events: none;
}

/*스케줄관리 calendar 이중테이블 탑라인 임시방편css*/
.table--data.calendar-table .w-full thead th::before {
  display: none;
}

/* 복합 헤더 sticky 지원 (2행 grouped header 등) */
/* 개별 th를 row별 sticky로 (thead 레벨 sticky는 Chrome에서 불안정) */
table.table--data.table--sticky-multirow thead th {
  min-height: unset;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  line-height: 1.5;
}

/* sub-pixel 비침 차단: thead 영역 전체 배경색 통일 → cell 간 sub-pixel 영역도 같은 색 */
table.table--data.table--sticky-multirow thead,
table.table--data.table--sticky-multirow thead tr {
  background-color: var(--bg-table-head);
}

table.table--data.table--sticky-multirow thead tr:first-child th {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: var(--bg-table-head);
}

table.table--data.table--sticky-multirow thead tr:nth-child(2) th {
  position: sticky;
  top: 0; /* JS가 row별 높이 기반으로 동적 설정 (fallback: 0) */
  z-index: 19;
  background-color: var(--bg-table-head);
}

table.table--data.table--sticky-multirow thead tr:nth-child(3) th {
  position: sticky;
  top: 0; /* JS가 row별 높이 기반으로 동적 설정 (fallback: 0) */
  z-index: 18;
  background-color: var(--bg-table-head);
}

/* 2행+ 서브컬럼의 ::before 상단 라인 제거 (1행과의 시각적 여백 방지) */
table.table--data.table--sticky-multirow thead tr:nth-child(2) th::before,
table.table--data.table--sticky-multirow thead tr:nth-child(3) th::before {
  display: none;
}

/* 대량 행 스크롤 성능 최적화: 뷰포트 밖 행 렌더링 스킵 */
table.table--data.table--sticky-multirow tbody tr {
  content-visibility: auto;
  contain-intrinsic-size: 0 40px;
}

/* 합계 행 배경색 */
.bg-subtotal {
  background-color: #faf8f1;
}

.bg-subtotal td {
  background-color: #faf8f1;
}

/* data-table 소계/합계 행 스타일 (rowDataAttrs로 _rowType 노출) */
tr[data-row-type='subtotal'] td,
tr[data-row-type='total'] td {
  font-weight: 600;
  background-color: #faf8f1 !important;
}
tr[data-row-type='total'] td {
  border-top: 2px solid #6b7280;
}

/* 팝업 테이블 tfoot sticky (합계 행 하단 고정) */
.sticky-bottom {
  position: sticky;
  bottom: 0;
  z-index: 5;
}

.sticky-bottom td {
  background-color: #faf8f1;
}

/* new badge */
.new-badge {
  display: block;
  width: 1rem;
  height: 1rem;
  line-height: 1rem;
  text-align: center;
  aspect-ratio: 1/1;
  font-size: 0.5rem;
  font-weight: 700;
  color: var(--text-button-white);
  background-color: var(--danger);
  border-radius: 0.25rem;
  margin-left: 0.25rem;
}

/* table */
.custom-table-title {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.box--form .custom-table-title {
  margin-bottom: -0.5rem;
}

.custom-table-title b {
  flex-grow: 1;
  font-weight: 700;
}

.custom-table {
  width: 100%;
  --table-height: 2rem;
}

.custom-table .row-cols-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.custom-table .row-cols-wrap > .row {
  flex: 1 1 0%;
}

.custom-table .row-cols-wrap > .row.colspan-2 {
  flex-grow: 2;
}

.custom-table .row-cols-wrap > .row.colspan-3 {
  flex-grow: 3;
}

/* 2열 레이아웃 기본 스타일--모바일은 1줄로 통일함
.custom-table .row-cols-wrap.row-cols-2 > .row {
  flex: 0 0 50%;
  max-width: 50%;
}*/

/* 3열 레이아웃 기본 스타일 */
.custom-table .row-cols-wrap.row-cols-3 > .row {
  flex: 0 0 33.333%;
  max-width: 33.333%;
}

/* 4열 레이아웃 기본 스타일 */
.custom-table .row-cols-wrap.row-cols-4 > .row {
  flex: 0 0 25%;
  max-width: 25%;
}

/* 3열/4열 colspan 지원 */
.custom-table .row-cols-wrap.row-cols-3 > .row.colspan-2 {
  flex: 0 0 66.666%;
  max-width: 66.666%;
}

.custom-table .row-cols-wrap.row-cols-4 > .row.colspan-2 {
  flex: 0 0 50%;
  max-width: 50%;
}

.custom-table .row-cols-wrap.row-cols-4 > .row.colspan-3 {
  flex: 0 0 75%;
  max-width: 75%;
}

.custom-table .row-cols-wrap.row-cols-4 > .row.colspan-4,
.custom-table .row-cols-wrap.row-cols-3 > .row.colspan-3 {
  flex: 0 0 100%;
  max-width: 100%;
}

/* fullRow(colspan-2) 필드가 row-cols-wrap에서 유일 자식이면 전체 너비 (pairFields가 fullRow를 단독 행으로 분리) */
.custom-table .row-cols-wrap > .row.colspan-2:only-child {
  flex: 0 0 100%;
  max-width: 100%;
}

@media (max-width: 1280px) {
  .custom-table .row-cols-wrap > .row {
    flex-basis: 50%;
  }

  /* 3열/4열도 태블릿에서 2열로 */
  .custom-table .row-cols-wrap.row-cols-3 > .row,
  .custom-table .row-cols-wrap.row-cols-4 > .row {
    flex: 0 0 50%;
    max-width: 50%;
  }

  /* 태블릿에서 row-cols-wrap의 마지막 자식이 홀수 위치(2열로 wrap 시 단독 행)면 100% 너비로 확장 */
  .custom-table .row-cols-wrap.row-cols-3 > .row:not([class*="colspan-"]):last-child:nth-child(odd),
  .custom-table .row-cols-wrap.row-cols-4 > .row:not([class*="colspan-"]):last-child:nth-child(odd) {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* 팝업 등 뷰포트 < 1280px 환경에서 3열 강제 유지 (모바일 제외) */
@media screen and (min-width: 769px) {
  .force-cols-3 .custom-table .row-cols-wrap.row-cols-3 > .row {
    flex: 0 0 33.333% !important;
    max-width: 33.333% !important;
  }
}



/* .popup-history 의 row-cols-3 3열 강제 룰 제거 — base 룰을 따르도록 변경:
   - 1281px+: base 33.333% (3열)
   - 769~1280px: base 50% (2열 변환) + last-child odd 100% (마지막 dl 단독 행)
   - 768px 이하: 100% (1열 stack)
   1200px popup window 폭에서 3열 강제하던 의도는 폭이 더 좁아졌을 때 깨짐을 야기하므로 폐기.
   data table 측 dt 좌측 세로선(border-left)은 라인 2247 의 3n+2/3n+3 룰로 충분히 처리됨. */


@media screen and (max-width: 768px) {
  .custom-table .row-cols-wrap > .row {
    flex-basis: 100%;
  }

  /* 3열/4열도 모바일에서 1열로 */
  .popup-history .row-cols-wrap.row-cols-3 > .row, 
  .custom-table .row-cols-wrap.row-cols-3 > .row,
  .custom-table .row-cols-wrap.row-cols-4 > .row {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* colspan도 모바일에서 100% (base 규칙 specificity 0,5,0 오버라이드) */
  .custom-table .row-cols-wrap.row-cols-3 > .row.colspan-2,
  .custom-table .row-cols-wrap.row-cols-4 > .row.colspan-2,
  .custom-table .row-cols-wrap.row-cols-4 > .row.colspan-3 {
    flex: 0 0 100%;
    max-width: 100%;
  }

}

.custom-table .row {
  display: flex;
  align-items: stretch;
  min-height: var(--table-height);
  min-width: 0;
}

.table__head {
  display: flex;
  align-items: center;
  width: 9rem;
  background-color: var(--bg-table-head);
  font-weight: 700;
  flex-shrink: 0;
  white-space: nowrap;
}

/* 필수 필드 빨간 별 표시 */
.table__head.required {
  position: relative;
}

.table__head.required::before {
  content: '*';
  position: absolute;
  top: 50%;
  left: 0.2rem;
  transform: translateY(-50%);
  display: block;
  color: rgb(255, 0, 76);
}

/******** table line ********/
.custom-table > .row-cols-wrap:not(:first-child),
.custom-table > .row:not(:first-child) {
  border-top: 1px solid var(--border-table);
}

/* 내부 dl.row가 display:none인 단일 자식 row-cols-wrap 자동 숨김 (이중 border 방지) */
.custom-table > .row-cols-wrap:has(> .row:only-child[style*="display:none"]),
.custom-table > .row-cols-wrap:has(> .row:only-child[style*="display: none"]) {
  display: none;
}

.table__head {
  border-right: 1px solid var(--border-table);
  border-left: 1px solid var(--border-table);
}

.custom-table .row:first-child > .table__head,
.custom-table > .row > .table__head {
  border-left: none;
}

@media screen and (max-width: 1280px) {
  .custom-table .row:nth-child(odd) .table__head {
    border-left: none;
  }

  .custom-table > .row-cols-wrap > .row:nth-child(n + 3) {
    border-top: 1px solid var(--border-table);
  }
}

@media screen and (max-width: 768px) {
  .table__head {
    border-left: none;
  }

  /* 1열 (기본): 두 번째 row부터 border-top */
  .custom-table .row-cols-wrap > .row ~ .row {
    border-top: 1px solid var(--border-table);
  }

  /* 2열 유지 레이아웃: 같은 줄 row끼리 border 중복 방지 */
  .custom-table .row-cols-wrap.row-cols-2 > .row ~ .row {
    border-top: none;
  }
  .custom-table .row-cols-wrap.row-cols-2 > .row:nth-child(n + 3) {
    border-top: 1px solid var(--border-table);
  }
}

@media screen and (max-width: 640px) {
  .table__head {
    border-right: none;
  }
}

/* box 내부 중첩 box: 2중 카드 제거 (탭, 팝업섹션 등) */
.tab-group.box > .tab-content > .box,
.popup-section.box > .popup-section__body > .box {
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding-left: 0;
  padding-right: 0;
  margin-bottom: 0.5rem;
}
.tab-group.box > .tab-content > .box:last-child,
.popup-section.box > .popup-section__body > .box:last-child {
  margin-bottom: 0;
}

/* row-cols-3: 3열 border 보정 — 1281px+ 에서만 적용 (실제 3열 한 줄로 렌더되는 폭).
   769~1280px: base 의 2열변환(50%) + last-child odd 100% 모드 → 보정 룰이 dl 간 가로선/세로선을 오작동시킴
   768px 이하: 1열 stack → 보정 룰 불필요. */
@media screen and (min-width: 1281px) {
  .custom-table .row-cols-wrap.row-cols-3 > .row {
    border-top: none;
  }
  .custom-table .row-cols-wrap.row-cols-3 > .row:nth-child(n + 4) {
    border-top: 1px solid var(--border-table);
  }
  .custom-table .row-cols-wrap.row-cols-3 > .row:nth-child(3n + 2) > .table__head,
  .custom-table .row-cols-wrap.row-cols-3 > .row:nth-child(3n + 3) > .table__head {
    border-left: 1px solid var(--border-table);
  }
}

/****************************/
.table__head,
.table__data {
  min-height: var(--table-height);
  padding: 1px;
  font-size: 0.875rem;
  transition: background-color 0.3s;
}

.table__data {
  flex: 1 1 0%;
  min-width: 0;
  background-color: var(--bg-white);
}

@media (hover: hover) {
  .table__data:hover {
    background: var(--bg-hover);
  }

.info-table .table__data:hover,
.table__data.read-only-bg:hover,
.read-only-bg:hover,
.table__data:has(.read-only-bg):hover,
.table__data:has(#inputPersonInfo):hover{
  background: var(--bg-read-only);
}

}

.info-table .table__data {
    background: var(--bg-light-gray);
}




.table__head > span,
.table__data > span {
  display: block;
  padding: 0 0.5rem;
  line-height: calc(var(--table-height) - 2px);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* 내부 값에 wrap 클래스가 지정된 경우 외부 span의 nowrap 해제 */
.table__data > span:has(.whitespace-pre-wrap),
.table__data > span:has(.whitespace-normal),
.table__data > span:has(.text-wrap-value) {
  white-space: normal;
  word-break: break-all;
  text-overflow: clip;
  overflow: visible;
  line-height: 1.5;
  padding-top: 4px;
  padding-bottom: 4px;
}

/* dt.table__head - 퍼블리싱 원본: display: flex; align-items: center; padding: 1px; */
dt.table__head {
  display: flex;
  align-items: center;
  padding: 1px;
  line-height: calc(var(--table-height) - 2px);
}

/* dd.table__data - 퍼블리싱 원본: padding: 1px; */
dd.table__data {
  display: block;
  padding: 1px;
  line-height: calc(var(--table-height) - 2px);
}

/* dd.table__data 안의 span은 패딩 유지 */
dd.table__data > span {
  padding: 0 0.5rem;
}
dd.table__data > div {
  padding: 0;
  /*margin-left: 0.5rem;*/
}

dd.table__data > div:has(input) {
  margin-left: 0;
}

.trans-upload {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.trans-upload input{ 
  min-width: 150px;
}

/* static-text: detail-section type="static" 읽기전용 텍스트 */
.static-text {
  display: block;
  padding: 0.25rem 0.75rem;
  line-height: calc(var(--table-height) - 2px);
  color: var(--text-dark, #333);
  font-weight: 400;
}

/* dt.table__head 안의 select 스타일 (fc-allocation 등에서 라벨 대신 select 사용 시) */
.table__head > select {
  width: 100%;
  height: calc(var(--table-height) - 2px);
  padding: 0 0.5rem;
  border: none;
  background-color: transparent;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
}

.table__head > select:focus {
  outline: none;
  background-color: var(--bg-hover);
}

.table__head > span.line-2 {
  display: block;
  line-height: 0.875rem;
}

.table__head > span.line-2 b {
  color: var(--secondary);
  font-size: 0.75rem;
  font-weight: 600;
}

.custom-table input,
.custom-table textarea {
  background-color: transparent;
}

.custom-table input[type='text'],
.custom-table input[type='number'],
.custom-table input[type='search'],
.custom-table input[type='date'],
.custom-table input[type='month'],
.custom-table input[type='datetime-local'] {
  min-height: calc(var(--table-height) - 2px);
  padding: 0 0.5rem;
  border: 1px solid transparent;
  outline: 2px solid transparent;
  border-radius: 6px;
  transition: 0.3s;
}

.custom-table .table__data > input[type='text'],
.custom-table .table__data > input[type='number'],
.custom-table .table__data > input[type='search'],
.custom-table .table__data > input[type='date'],
.custom-table .table__data > input[type='month'] {
  width: 100%;
  display: block;
  height: 100%;
}

.custom-table .table__data > :not(.input-group):not(.form-group):not(.btn-group):not(.text-group) > input[type='text'],
.custom-table
  .table__data
  > :not(.input-group):not(.form-group):not(.btn-group):not(.text-group)
  > input[type='number'],
.custom-table
  .table__data
  > :not(.input-group):not(.form-group):not(.btn-group):not(.text-group)
  > input[type='search'] {
  width: 100%;
}

.custom-table select {
  min-height: calc(var(--table-height) - 2px);
  padding: 0 0.5rem;
  padding-left: 0.25rem;
  border: 1px solid transparent;
  outline: 2px solid transparent;
  border-radius: 6px;
  transition: 0.3s;
  background-color: transparent;
  cursor: pointer;
}

.custom-table .table__data > select {
  width: 100%;
  display: block;
  height: 100%;
}

.custom-table .table__data:has(> select:disabled) {
  background-color: var(--bg-read-only);
}

.custom-table .table__data > :not(.input-group):not(.form-group):not(.btn-group):not(.text-group) > select {
  width: 100%;
}

.custom-table textarea {
  display: block;
  width: 100%;
  min-height: calc(var(--table-height) - 2px);
  padding: 0.5rem;
  border: 1px solid transparent;
  outline: 2px solid transparent;
  border-radius: 6px;
  transition: 0.3s;
}

.custom-table .table__data input[type='text']:hover,
.custom-table .table__data input[type='text']:focus,
.custom-table .table__data input[type='number']:hover,
.custom-table .table__data input[type='number']:focus,
.custom-table .table__data input[type='search']:hover,
.custom-table .table__data input[type='search']:focus,
.custom-table .table__data input[type='date']:hover,
.custom-table .table__data input[type='date']:focus,
.custom-table .table__data input[type='month']:hover,
.custom-table .table__data input[type='month']:focus,
.custom-table .table__data input[type='datetime-local']:hover,
.custom-table .table__data input[type='datetime-local']:focus,
.custom-table .table__data select:hover,
.custom-table .table__data select:focus,
.custom-table textarea:hover,
.custom-table textarea:focus {
  border-color: var(--primary);
  outline-color: #6a73c920;
}

.custom-table .table__data input[type='text']:disabled,
.custom-table .table__data input[type='number']:disabled,
.custom-table .table__data input[type='search']:disabled,
.custom-table .table__data select:disabled,
.custom-table textarea:disabled {
  background-color: var(--bg-gray);
  pointer-events: none;
}

.custom-table .table__data > .checkbox,
.custom-table .table__data > .radiobox {
  margin: 0 0.5rem;
}

@media (max-width: 640px) {
  .custom-table .row {
    flex-direction: column;
    height: auto;
  }

  .table__head {
    height: var(--table-height);
  }

  .table__data {
    min-height: var(--table-height);
    height: auto;
  }

  .table__head {
    width: auto;
    border-right: none;
    border-left: none;
  }

  .custom-table .datepicker {
    justify-content: center;
    padding: 0;
    gap: 0.5rem;
  }

  .custom-table .datepicker > div {
    min-height: var(--table-height);
    height: auto;
  }

  .datepicker > .form-group {
    width: auto;
    min-width: auto;
  }

  .custom-table .datepicker .date-wrap {
    justify-content: center;
    margin-right: 0;
    width: auto;
    border-bottom: 1px dashed var(--border-table);
  }

  .custom-table .datepicker input[type='date'],
  .custom-table .datepicker input[type='month'] {
    text-align: center;
  }

}


@media (max-width: 480px) {
  .custom-table .datepicker {
    flex-direction: column;
  }

  .custom-table .datepicker .date-wrap {
    width: 100%;
  }

  .custom-table .datepicker > .form-group {
    width: 100%;
  }

  .custom-table .datepicker .period-btn-group {
    width: 100%;
  }

  .custom-table .datepicker .period-btn-group .btn {
    min-width: 0;
    flex: 1 1 auto;
  }

}

.custom-table-wrap_pop {
  overflow: hidden;
  border: 1px solid var(--border-table-wrap);
}

.custom-table-wrap {
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--border-table-wrap);
}

.custom-table-wrap table tr:last-child {
  border: none;
}

.table__btn {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 0 0.5rem;
  line-height: calc(var(--table-height) - 2px);
}

.table__data .table__btn {
  color: var(--text-gray);
}

.table__btn span {
  display: block;
  padding: 0;
  flex-grow: 1;
}

.table__btn svg {
  display: block;
  width: 1rem;
  height: 1rem;
  color: var(--text-default);
  transition: color 0.3s;
  flex-shrink: 0;
}

.table__btn:hover svg {
  color: var(--primary);
}

/* tooltip */
.tooltip {
  position: relative;
}

.custom-table .tooltip {
  margin-left: auto;
  margin-right: 0.5rem;
}

.tooltip__ico svg {
  width: 1rem;
  height: 1rem;
  color: var(--text-darkgray);
}

.tooltip__desc {
  display: block;
  position: fixed;
  padding: 0.5rem 0.875rem;
  min-width: 200px;
  max-width: 320px;
  border-radius: 0.5rem;
  background-color: rgba(52, 51, 54, 0.9);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
  white-space: normal;
  word-break: keep-all;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
}

.tooltip:hover .tooltip__desc {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 640px) {
  .tooltip__desc {
    left: auto;
    right: 0;
  }
}

@media (hover: none) {
  .tooltip {
    display: none;
  }
}

/* nodata */
.nodata {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0.5rem 0;
}

.nodata svg {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-darkgray);
}

.nodata b {
  font-weight: 700;
  font-size: 1rem;
}

.nodata p {
  color: var(--text-gray);
  font-size: 0.875rem;
}

/* modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background-color: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s, visibility 0.5s;
  z-index: 1000; /* header(999)보다 높게 */
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal__cnt {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 800px;
  max-height: 80dvh;
  border-radius: 0.5rem;
  background-color: #fff;
  box-shadow: 0px 2px 15px 0px rgba(154, 154, 154, 0.25);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s, transform 0.5s;
}

.modal.active .modal__cnt {
  opacity: 1;
  transform: translateY(0);
}

.modal__head {
  display: flex;
  align-items: center;
  font-size: 1rem;
  padding: 1rem 1rem 0.5rem;
}

.modal__head > svg {
  display: block;
  padding: 0.5rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background-color: #eff0f9;
  color: var(--primary);
}

.modal__head b {
  display: block;
  line-height: 1;
  font-size: 1.125rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.modal__body {
  flex-grow: 1;
  padding: 0.25rem 1rem;
  overflow-y: auto;
  line-height: 160%;
  text-align: center;
}

.modal__body:last-child {
  margin-bottom: 1rem;
}

.modal__btn {
  display: flex;
  padding: 1rem;
}

.modal__btn .btn {
  flex: 1 1 0%;
}

.modal__btn .btn ~ .btn {
  margin-left: 0.5rem;
}

/* Loading overlay */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.7);
  z-index: 10;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2rem;
  height: 2rem;
  margin: -1rem 0 0 -1rem;
  border: 3px solid var(--border-gray);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 11;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Tab Component Styles */
.tab-group-box {
  background-color: #f5f6fa;
  padding: 0.875rem 1rem 1rem;
  border-radius: 1rem;
  border: 2px solid #e5e7ec;
}

.tabs {
  display: flex;
  margin-bottom: 1rem;
}

.tabs button {
  transition: 0.3s;
  background: none;
  border: none;
  cursor: pointer;
}

@media (max-width: 1024px) {
  .tabs {
    margin-bottom: 0.75rem;
  }
}

.tabs--line {
  border-bottom: 1px solid var(--border-gray);
}

.tabs--line button {
  color: var(--text-gray);
  font-weight: 700;
  font-size: clamp(0.875rem, 0.5rem + 1vw, 1rem);
  padding: 0 0.25rem 0.5rem;
  border-bottom: 2px solid transparent;
}

/* .tabs--line button ~ button {
  margin-left: 0.75rem;
} */

.tabs--line button.active {
  color: var(--primary);
  border-color: var(--primary);
}

.tabs--rounded {
  background-color: #f5f6fa;
  border-radius: 0.875rem;
  padding: 0.25rem;
  white-space: nowrap;
  overflow-x: auto;
}

.tabs--rounded button {
  display: block;
  padding: 0.5rem 1.25rem;
  border-radius: 0.625rem;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-gray);
  border: 1px solid transparent;
}

.tabs--rounded button.active {
  color: var(--primary);
  background-color: var(--bg-white);
  border-color: #cdcfdb;
  box-shadow: 0 4px 10px 0 rgba(60, 55, 85, 0.1);
}

.tabs--pill {
  flex-wrap: wrap;
  gap: 0.375rem 0;
}

.tabs--pill button {
  padding: 0.125rem 0.75rem;
  border-radius: 999px;
  text-align: center;
  font-size: 0.875rem;
  margin-right: 0.25rem;
  background-color: var(--bg-gray);
  color: var(--text-darkgray);
}

.tabs--pill button:last-child {
  margin-right: 0;
}

.tabs--pill button.active {
  background-color: var(--btn-light-primary-bg);
  color: var(--btn-light-primary-text);
  font-weight: 600;
}

.tabs-content {
  display: none;
}

.tabs-content.active {
  display: block;
}

/* ======================================
   반응형 검색 필터 컴포넌트
   ====================================== */

/* 라벨+Select 그룹 컨테이너 - Desktop: inline flex, Mobile/Tablet: grid */
.labeled-select-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0; /* row-gap만 주고, column은 아이템 내부에서 처리 */
  width: 100%;
}

/*only pc select box line*/
@media (min-width: 1200px) {
  .labeled-select-group > div::after {
    display: block;
    content: '';
    width: 1px;
    height: 8px;
    background: #d1d5db;
    position: absolute;
    right: -0.5rem;
    z-index: 1;
  }

  .labeled-select-group > div:last-child::after {
    display: none;
  }

  /* 구분선 (Desktop에서 표시) */
  .labeled-select-item .separator {
    display: none;
    /* color: #d1d5db;
    font-size: 0.875rem;
    margin-right: 0.25rem; */
  }

  /* select 박스 */
  .labeled-select-item .selectbox {
    min-width: 109px;
  }
}

/* 라벨+Select 개별 아이템 - 카드 스타일 없이, 깔끔한 inline 배치 */
.labeled-select-item {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* label과 select 사이 */
  padding: 0.125rem 0.375rem; /* 최소 padding - 높이는 지역 row와 동일하게 */
  margin-right: 1rem;
  box-sizing: border-box;
  flex-shrink: 0;
  border-radius: 0.25rem; /* 4px - hover 시 배경 라운드 */
  transition: background-color 0.15s ease;
  position: relative;
}

/* 마지막 아이템의 우측 여백 제거 (캐스케이드 순서상 labeled-select-item 이후에 선언) */
.labeled-select-group > .labeled-select-item:last-child {
  margin-right: 0;
}

/* hover 시 개별 아이템만 밝게 표시 (row hover가 어둡게 되므로 밝은 색으로 구분) */
.labeled-select-item:hover {
  background-color: #ffffff; /* 흰색 - row hover 배경보다 밝게 */
}

/* 라벨 텍스트 스타일 */
.labeled-select-item .label-text {
  font-size: 0.8125rem; /* 13px - 좀 더 크게 */
  font-weight: 600;
  color: #47429e; /* gray-700 - 더 진하게 */
  white-space: nowrap;
  flex-shrink: 0;
}

/* 첫 번째 아이템의 구분선 숨김 (HBS에서 showSeparator로 제어) */

/* date/text input 스타일 - selectWidth 적용, selectbox와 동일 높이 */
.labeled-select-item input[type='date'] {
  height: 2rem;
  border: none;
  padding: 0 0.5rem;
  font-size: 0.875rem;
  border-radius: 4px;
  box-sizing: border-box;
  min-width: 0;
}

.labeled-select-item input[type='text'] {
  height: 2rem;
  border: none;
  padding: 0 0.5rem;
  font-size: 0.875rem;
  border-radius: 4px;
  box-sizing: border-box;
  min-width: 0;
  border: 1px solid #ddd;
}

.labeled-select-item .selectbox {
  border: 1px solid #ddd;
}

.labeled-select-item input[type='date'].select-with-width {
  width: auto; /* inline style width가 적용되도록 */
  flex-shrink: 0;
}

/* combo (input[list]) 스타일 - select와 동일하게 (화살표 포함) */
.labeled-select-item input[list],
.labeled-select-item input.selectbox[list] {
  height: 2rem !important;
  line-height: 2rem !important;
  padding: 0 1.75rem 0 0.5rem !important;
  border: 1px solid var(--border-darkgray, #ddd) !important;
  border-radius: 0.5rem !important;
  font-size: 0.875rem !important;
  background-color: var(--bg-white, #fff) !important;
  box-sizing: border-box !important;
  /* 드롭다운 화살표 - select와 동일 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.5rem center !important;
  background-size: 10px !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

.labeled-select-item input[list]:focus {
  outline: none !important;
  border-color: var(--primary, #6366f1) !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1) !important;
}

.labeled-select-item input[list]::placeholder {
  color: #9ca3af;
  font-size: 0.8125rem;
}

/* 브라우저 기본 datalist 화살표 완전 숨김 */
.labeled-select-item input[list]::-webkit-calendar-picker-indicator {
  display: none !important;
  -webkit-appearance: none !important;
}

/* Firefox datalist arrow 숨김 */
.labeled-select-item input[list]::-moz-list-bullet {
  display: none !important;
}

/* 체크박스 아이템 스타일 */
.labeled-select-item.checkbox {
  padding: 0.125rem 0.375rem; /* label+select와 동일한 padding */
}

/* ===========================================
   Large Desktop (1024-1399px): 4컬럼 Grid
   너비가 좁아져 줄바꿈 발생 시 구분선 표시
   =========================================== */
@media (max-width: 1399px) and (min-width: 1024px) {
  .labeled-select-group > div::after {
    display: none;
  }

  .labeled-select-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4컬럼 균등 분할 */
    gap: 0.5rem;
    row-gap: 0; /* 줄 구분선을 위해 row-gap 제거 */
    position: relative;
  }

  .labeled-select-item {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 0.5rem 0.5rem;
    background: transparent;
    border-radius: 0;
    width: 100%;
    min-height: 2.25rem; /* 행 높이 고정 */
    position: relative;
  }

  /* 행 구분선: 첫 행 제외, 각 행의 첫 아이템에만 전체 너비 점선 추가 */
  .labeled-select-group .labeled-select-item:nth-child(4n + 1):not(:nth-child(-n + 4))::before {
    content: '';
    position: absolute;
    top: 0;
    left: -0.25rem;
    right: -100vw; /* 충분히 넓게 */
    width: calc(100vw); /* 컨테이너 전체 너비 */
    max-width: calc(400% + 1.5rem); /* 4컬럼 + gap */
    height: 0;
    border-top: 1px dashed var(--border-table);
  }

  .labeled-select-item:hover {
    background-color: #ffffff;
  }

  .labeled-select-item .label-text {
    font-size: 0.8125rem;
    color: #374151;
    min-width: 55px;
  }

  .labeled-select-item .selectbox {
    flex: 1;
    min-width: 0;
  }

  .labeled-select-item .separator {
    display: none; /* 그리드에서는 구분선 숨김 */
  }

  .labeled-select-item.checkbox {
    flex-direction: row;
    align-items: center;
    padding: 0.5rem 0.5rem;
  }
}

/* ===========================================
   Tablet (640-1023px): 3컬럼 Grid
   줄바꿈 시 깔끔하게 정렬된 그리드로 전환
   =========================================== */
@media (max-width: 1400px) and (min-width: 640px) {
  .labeled-select-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3컬럼 균등 분할 */
    gap: 0.5rem;
    row-gap: 0; /* 줄 구분선을 위해 row-gap 제거 */
    position: relative;
  }

  .labeled-select-item {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 0.5rem 0.5rem;
    background: transparent;
    border-radius: 0;
    width: 100%; /* 그리드 셀 채우기 */
    min-height: 2.25rem; /* 행 높이 고정 */
    position: relative;
    margin: 0;
  }

  /* 행 구분선: 첫 행 제외, 각 행의 첫 아이템에만 전체 너비 점선 추가 */
  .labeled-select-group .labeled-select-item:nth-child(3n + 1):not(:nth-child(-n + 3))::before {
    content: '';
    position: absolute;
    top: 0;
    left: -0.25rem;
    width: calc(300% + 1rem); /* 3컬럼 + gap */
    height: 0;
    border-top: 1px dashed var(--border-table);
  }

  .labeled-select-item:hover {
    background-color: #ffffff;
  }

  .labeled-select-item .label-text {
    font-size: 0.75rem;
    color: #374151;
    min-width: 50px; /* label 최소 너비로 정렬 */
  }

  .labeled-select-item .selectbox {
    flex: 1; /* 남은 공간 채우기 */
    min-width: 0;
    width: 100%;
  }

  .labeled-select-item .separator {
    display: none; /* 그리드에서는 구분선 숨김 */
  }

  .labeled-select-item.checkbox {
    flex-direction: row;
    align-items: center;
    padding: 0.5rem 0.5rem;
  }

  .period-btn-group .btn {
    min-width: 1rem;
  }

  .datepicker .date-wrap {
    margin-right: 0.5rem;
  }

  .datepicker > .form-group {
    min-width: auto;
  }

}

/* ===========================================
   Mobile (480-639px): 2컬럼 Grid
   =========================================== */
@media (max-width: 639px) and (min-width: 480px) {
  .labeled-select-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2컬럼 균등 분할 */
    gap: 0.5rem;
    row-gap: 0; /* 줄 구분선을 위해 row-gap 제거 */
    position: relative;
  }

  .labeled-select-item {
    flex-direction: row;
    align-items: center;
    margin: 0;
    padding: 0.5rem 0.5rem;
    background: transparent;
    border-radius: 0;
    width: 100%;
    min-height: 2.25rem; /* 행 높이 고정 */
    position: relative;
  }

  /* 행 구분선: 첫 행 제외, 각 행의 첫 아이템에만 전체 너비 점선 추가 */
  .labeled-select-group .labeled-select-item:nth-child(2n + 1):not(:nth-child(-n + 2))::before {
    content: '';
    position: absolute;
    top: 0;
    left: -0.25rem;
    width: calc(200% + 0.5rem); /* 2컬럼 + gap */
    height: 0;
    border-top: 1px dashed var(--border-table);
  }

  .labeled-select-item:hover {
    background:none;
  }

  .labeled-select-item .label-text {
    font-size: 0.6875rem; /* 11px */
    min-width: 45px;
  }

  .labeled-select-item .selectbox {
    flex: 1;
    min-width: 0;
    font-size: 0.8125rem;
    width: 100%;
  }

  .labeled-select-item .separator {
    display: none;
  }

  .labeled-select-item.checkbox {
    padding: 0.5rem 0.5rem;
  }
}

/* ===========================================
   XS (<480px): 1컬럼 Stack - 풀 너비
   =========================================== */
@media (max-width: 479px) {
  .labeled-select-group {
    display: flex;
    flex-direction: column; /* 세로 배치 */
    gap: 0; /* 줄 구분선을 위해 gap 제거 */
  }

  .labeled-select-item {
    margin: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /* label 왼쪽, select 오른쪽 */
    padding: 0.5rem 0.5rem;
    background: transparent;
    border-radius: 0;
    width: 100%;
    min-height: 2.25rem;
    border-bottom: 1px dashed var(--border-table); /* 1컬럼은 셀 단위 점선도 OK (끊김 없음) */
  }

  /* 마지막 아이템의 border-bottom 제거 (1컬럼) */
  .labeled-select-group .labeled-select-item:last-child {
    border-bottom: none;
  }

  .labeled-select-item:hover {
    background-color: #ffffff;
  }

  .labeled-select-item .label-text {
    font-size: 0.6875rem;
    flex-shrink: 0;
  }

  .labeled-select-item .selectbox {
    flex: 1;
    max-width: 60%; /* select가 너무 넓어지지 않도록 */
    min-width: 0;
    font-size: 0.8125rem;
  }

  .labeled-select-item .separator {
    display: none;
  }

  .labeled-select-item.checkbox {
    justify-content: flex-start;
    padding: 0.5rem 0.5rem;
  }
}

/* Checkbox 그룹 반응형 */
.checkbox-group-responsive {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 767px) {
  .checkbox-group-responsive {
    gap: 0.75rem;
  }
}

/* 검색 조건 row 반응형 (custom-table 내) */
@media (max-width: 767px) {
  .custom-table .row {
    flex-direction: column;
  }

  .custom-table .row .table__head {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-right: none;
    border-bottom: 1px solid var(--border-gray);
  }

  .custom-table .row .table__data {
    width: 100%;
    padding: 0.75rem;
  }

  /* 2열 레이아웃도 1열로 
  .row-cols-wrap {
    flex-direction: column;
  }*/

  .row-cols-wrap .row {
    width: 100%;
  }

}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   detail-section 컴포넌트 스타일
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* 연결된 섹션 스타일 */
.box.connected-first {
  margin-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
  box-shadow: none;
  z-index: 1;
}

.box.connected-last {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: none;
}

/* 중간 섹션 (3개+ 체인): connected-first 하단 + connected-last 상단 결합 */
.box.connected-prelast {
  margin-bottom: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-top: none;
  border-bottom: none;
}

/* 연결된 카드 그룹 래퍼: overflow:hidden으로 내부 shadow를 완전 차단 */
.connected-group {
  border-radius: 1rem;
  box-shadow: 0 4px 10px 0 rgba(68, 86, 96, 0.15);
  overflow: hidden;
  margin-bottom: 1rem;
}
.connected-group > .box {
  box-shadow: none;
  margin-bottom: 0;
}

/* 반응형 레이아웃: detail-section--responsive */
.detail-section--responsive .row-cols-wrap {
  display: flex;
  flex-wrap: wrap;
}

.detail-section--responsive .row-cols-3 > .row {
  flex: 0 0 33.333%;
  max-width: 33.333%;
}

.detail-section--responsive .row-cols-4 > .row {
  flex: 0 0 25%;
  max-width: 25%;
}

/* colspan 지원 */
.detail-section--responsive .row.colspan-2 {
  flex: 0 0 66.666%;
  max-width: 66.666%;
}

.detail-section--responsive .row-cols-3 .row.colspan-2 {
  flex: 0 0 66.666%;
  max-width: 66.666%;
}

.detail-section--responsive .row-cols-4 .row.colspan-2 {
  flex: 0 0 50%;
  max-width: 50%;
}

.detail-section--responsive .row-cols-4 .row.colspan-3 {
  flex: 0 0 75%;
  max-width: 75%;
}

/* Tablet (768px ~ 1279px): 3col → 2col, 4col → 2col */
@media (min-width: 768px) and (max-width: 1279px) {
  .detail-section--responsive .row-cols-3 > .row,
  .detail-section--responsive .row-cols-4 > .row {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .detail-section--responsive .row.colspan-2,
  .detail-section--responsive .row.colspan-3 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Mobile (< 768px): 모두 1col */
@media (max-width: 767px) {
  .detail-section--responsive .row-cols-wrap > .row,
  .detail-section--responsive .row-cols-3 > .row,
  .detail-section--responsive .row-cols-4 > .row {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .detail-section--responsive .row.colspan-2,
  .detail-section--responsive .row.colspan-3 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* 라벨 2줄 표시 (line-2) */
.custom-table .table__head .line-2 {
  display: block;
  line-height: 1.3;
  overflow: visible !important;
  white-space: normal;
}

.custom-table .table__head .line-2 b {
  display: block;
  margin-top: 2px;
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--text-gray);
}

/* 라디오 버튼 스타일 - 퍼블리싱과 동일하게 유지 */
/* .radiobox 내부의 radio 버튼도 기본 스타일 유지 (원형 + 체크마크) */

/* ========================================
   contract-form 공통 필드 레이아웃
   (detail-section, bodyinsu, general-insurance 등 contract-form 클래스 사용 섹션 공통)
   ======================================== */

/* 입력 그룹 공통 스타일 */
.contract-form .input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.contract-form .input-group > span {
  color: #6b7280;
}

/* 날짜 범위 스타일 */
.contract-form .datepicker .date-wrap {
  display: flex;
  align-items: center;
}

/* 라디오/체크박스 그룹 */
.contract-form .form-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* table__data 기본 스타일 */
.contract-form .table__data {
  display: flex;
  align-items: center;
}

/* table__data 직속 자식 input/select 스타일 */
.contract-form .table__data > input,
.contract-form .table__data > select {
  flex: 1 1 0%;
  min-width: 0;
}
.contract-form .table__data > select {
  height: var(--table-height, 2rem);
  box-sizing: border-box;
}

/* 모든 필드 래퍼 공통 스타일 */
.contract-form .table__data > .field-wrap,
.contract-form .table__data > .text-group,
.contract-form .table__data > .input-group,
.contract-form .table__data > .datepicker {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  flex-wrap: nowrap;
  gap: 0.5rem;
}

/* 내부 input/select flex 확장 */
.contract-form .table__data > .field-wrap > input,
.contract-form .table__data > .field-wrap > select,
.contract-form .table__data > .text-group > input,
.contract-form .table__data > .input-group > input,
.contract-form .table__data > .input-group > select {
  flex: 1 1 0%;
  min-width: 0;
}

/* select 높이를 input과 동일하게 */
.contract-form .table__data > .field-wrap > select,
.contract-form .table__data > .input-group > select {
  height: var(--table-height, 2rem);
  box-sizing: border-box;
}

/* 단위/구분자 텍스트 */
.contract-form .table__data > .text-group > span,
.contract-form .table__data > .input-group > span {
  flex-shrink: 0;
  white-space: nowrap;
}

/* table__data 직속 자식 span 스타일 (읽기전용 텍스트 표시용) */
.contract-form .table__data > span {
  display: flex;
  align-items: center;
  height: 100%;
}

/* 섹션 높이 통일 */
.contract-form .row {
  min-height: var(--table-height, 2rem);
}

/* input/select 마진/패딩 조정 */
.contract-form .table__data > input,
.contract-form .table__data > select,
.contract-form .table__data > .field-wrap,
.contract-form .table__data > .text-group,
.contract-form .table__data > .input-group,
.contract-form .table__data > .datepicker {
  margin-left: 0;
  padding-left: 0;
}
/* input에 최소 좌측 여백 (placeholder/텍스트 가독성) */
.contract-form .table__data > input[type="text"],
.contract-form .table__data > input[type="number"],
.contract-form .table__data > input[type="date"],
.contract-form .table__data .text-group > input[type="text"] {
  padding-left: 0.375rem;
}
.contract-form .table__data > .datepicker {
  padding: 0;
}
.contract-form .table__data > select {
  padding-left: 0;
}

/* colspan 행 border 처리 (box/row-cols-wrap border와 중복 방지) */

/* full-width(colspan-4/3) 행: border-top만 (border-bottom은 다음 행 border-top으로 대체) */
.contract-form .row-cols-wrap > .row.colspan-4,
.contract-form .row-cols-wrap > .row.colspan-3 {
  border-top: 1px solid var(--border-table);
}
/* first-child: row-cols-wrap border-top이 이미 있으므로 제거 */
.contract-form .row-cols-wrap > .row.colspan-4:first-child,
.contract-form .row-cols-wrap > .row.colspan-3:first-child {
  border-top: none;
}

/* full-width 행 뒤 non-full-width 행들: border-top으로 구분 (같은 줄 모든 행) */
.contract-form .row-cols-wrap > .row.colspan-4 ~ .row:not(.colspan-4):not(.colspan-3),
.contract-form .row-cols-wrap > .row.colspan-3 ~ .row:not(.colspan-3):not(.colspan-4) {
  border-top: 1px solid var(--border-table);
}

/* full-width 행: box 좌측 경계에 있으므로 table__head border-left 제거 */
.contract-form .row-cols-wrap > .row.colspan-4 > .table__head,
.contract-form .row-cols-wrap > .row.colspan-3 > .table__head {
  border-left: none;
}
/* full-width 행 뒤 행: 새 줄 좌측 시작이므로 border-left 제거 */
.contract-form .row-cols-wrap > .row.colspan-4 + .row > .table__head,
.contract-form .row-cols-wrap > .row.colspan-3 + .row > .table__head {
  border-left: none;
}

/* dt 라벨 내 CSS tooltip (title 속성 대체) - 아래 방향 */
.label-tip {
  position: relative;
}
.label-tip .label-tip__desc {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 4px;
  background-color: rgba(52, 51, 54, 0.92);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 400;
  white-space: nowrap;
  z-index: 9999;
  pointer-events: none;
}
.label-tip .label-tip__desc::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-bottom-color: rgba(52, 51, 54, 0.92);
}
.label-tip:hover .label-tip__desc {
  display: block;
}
/* 위 방향 tooltip (마지막 행 등 아래 공간 부족 시) */
.label-tip--up .label-tip__desc {
  top: auto;
  bottom: calc(100% + 6px);
}
.label-tip--up .label-tip__desc::after {
  top: 100%;
  bottom: auto;
  border-bottom-color: transparent;
  border-top-color: rgba(52, 51, 54, 0.92);
}

/* colspan-2 행 하단 구분선 - 데스크탑에서만 */
@media (min-width: 1280px) {
  .contract-form .row-cols-wrap > .row.colspan-2 {
    border-bottom: 1px solid var(--border-table);
  }
}

/* 마지막 row-cols-wrap 하단: box border-bottom과 중복 방지 (connected-first는 제외) */
.contract-form:not(.connected-first) .custom-table > .row-cols-wrap:last-child > .row:last-child {
  border-bottom: none;
}
@media (min-width: 1280px) {
  .contract-form:not(.connected-first) .custom-table > .row-cols-wrap:last-child > .row.colspan-2:nth-last-child(-n+2) {
    border-bottom: none;
  }
}

/* 섹션 헤더 체크박스 스타일 */
.contract-form .custom-table-title {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.contract-form .custom-table-title .header-checkbox {
  margin-left: auto;
  white-space: nowrap;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.contract-form .custom-table-title .header-checkbox input[type="checkbox"] {
  margin: 0;
}
.contract-form .custom-table-title .header-checkbox span {
  color: #374151;
}

/* 연락처 영역 레이아웃 조정 */
.contract-form .table__data .flex.flex-col.gap-1 {
  width: 100%;
}

/* ========================================
   연결된 섹션 스타일 (connected="first"/"last")
   ======================================== */

/* 첫 번째 섹션: 하단 테두리/둥근모서리 제거 */
.contract-form.connected-first {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
}

/* 마지막 섹션: 상단 테두리/둥근모서리 제거 */
.contract-form.connected-last {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: none;
}

/* connected-last: 내부 첫 번째 row의 border-top도 제거 (box border-top 제거와 일치) */
.contract-form.connected-last .custom-table > .row-cols-wrap:first-child,
.contract-form.connected-last .custom-table > .row:first-child {
  border-top: none;
}

/* 마지막 섹션 바로 앞 섹션 마진 제거 */
.box--form:has(+ .box--form.connected-last) {
  margin-bottom: 0 !important;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
}

/* 연결된 섹션: table__data padding-left 제거 */
.contract-form.connected-first .table__data,
.contract-form.connected-last .table__data {
  padding-left: 0 !important;
}

/* 연결된 섹션: 입력 요소 마진 제거 */
.contract-form.connected-first .table__data select,
.contract-form.connected-first .table__data input,
.contract-form.connected-first .table__data .datepicker,
.contract-form.connected-first .table__data .text-group,
.contract-form.connected-first .table__data .input-group,
.contract-form.connected-last .table__data select,
.contract-form.connected-last .table__data input,
.contract-form.connected-last .table__data .datepicker,
.contract-form.connected-last .table__data .text-group,
.contract-form.connected-last .table__data .input-group {
  margin-left: 0 !important;
  margin: 0 !important;
}

/* 연결된 섹션: text-group 내부 input 마진 제거 */
.contract-form.connected-first .table__data .text-group input,
.contract-form.connected-first .table__data .text-group select,
.contract-form.connected-last .table__data .text-group input,
.contract-form.connected-last .table__data .text-group select {
  margin-left: 0 !important;
}

/* ========================================
   view 모드: 읽기전용 배경 스타일
   ======================================== */

/* 데이터 영역 전체 disabled 배경 */
[data-mode="view"] .contract-form .table__data,
.contract-form[data-mode="view"] .table__data {
  background-color: var(--bg-read-only) !important;
}

/* input/select/textarea 배경/border 투명 */
[data-mode="view"] .contract-form .table__data input,
[data-mode="view"] .contract-form .table__data select,
[data-mode="view"] .contract-form .table__data textarea,
.contract-form[data-mode="view"] .table__data input,
.contract-form[data-mode="view"] .table__data select,
.contract-form[data-mode="view"] .table__data textarea {
  background-color: transparent !important;
  border-color: transparent !important;
}

/* ========================================
   edit 모드: readonly 입력 필드 disabled 배경
   ======================================== */
/* readonly 필드: dd 배경 + input 투명 (form-card는 inline style, field-group은 class) */
.readonly-field > .table__data {
  background-color: var(--bg-gray);
}
.readonly-field > .table__data input[readonly],
.readonly-field > .table__data input {
  background-color: transparent;
}

/* ========================================
   장기보험 피보험자&계약자 (.insured-contractor-section)
   ======================================== */
.insured-contractor-section .group-names-row {
  height: auto !important;
  min-height: auto !important;
}
.insured-contractor-section .group-names-row .table__head {
  display: flex;
  align-items: center;
}
.insured-contractor-section .group-names-row .table__data {
  height: auto !important;
  min-height: auto !important;
  background-color: var(--bg-gray) !important;
  display: flex;
  align-items: center;
}
.insured-contractor-section .table__data > a,
.insured-contractor-section .table__data > span:not(.text-group span) {
  padding-left: 0.5rem;
}
.insured-contractor-section #group_names,
.insured-contractor-section #group_names * {
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  line-height: 1.4;
  font-weight: normal !important;
  color: #333 !important;
  text-decoration: none !important;
  padding-left: 0.5rem;
}

/* ========================================
   일반보험 계약등록 (.gen-contract)
   ======================================== */

/* 담보 3컬럼 라벨 너비 (데스크탑/태블릿) */
@media (min-width: 769px) {
  .gen-contract .row-cols-3 .table__head {
    width: 9rem;
    min-width: 9rem;
  }
}

/* 담보 라벨: span ellipsis 해제 */
.gen-contract .row-cols-3 .table__head > span {
  white-space: normal;
  text-overflow: clip;
  overflow: visible;
}

/* 태블릿/모바일: 보험료 input 유연 너비 + 3컬럼 줄바꿈 border 정리 */
@media (max-width: 1280px) {
  .gen-contract .row-cols-3 .text-group input.\!w-\[120px\] {
    width: auto !important;
    min-width: 60px;
    flex: 1 1 0%;
  }
  /* items 1+2에 border-bottom (합쳐서 full-width 구분선) */
  .gen-contract .row-cols-wrap.row-cols-3 > .row:nth-child(-n+2) {
    border-bottom: 1px solid var(--border-table);
  }
  /* ui.css border-top 중복 제거 (이중 border 방지) */
  .gen-contract .row-cols-wrap.row-cols-3 > .row:nth-child(n+2) {
    border-top: none;
  }
}

/* 보험기간 datepicker: PC 한 줄 유지 */
@media (min-width: 1281px) {
  .gen-contract .contract-form .datepicker .date-wrap {
    flex-wrap: nowrap;
  }
}
.gen-contract .datepicker input[type="date"] {
  min-width: 130px;
  width: 130px;
}

/* colspan-2 다음 standalone row 이중 border 방지 (데스크탑만) */
@media (min-width: 1280px) {
  .gen-contract .custom-table > .row-cols-wrap + .row {
    border-top: none;
  }
}

/* 고객 그룹 span 패딩 */
.gen-contract #groupNamesDesktop {
  padding-left: 0 !important;
}

/* 삭제 모드: readonly 필드 스타일 */
.gen-contract.mode-delete input[readonly],
.gen-contract.mode-delete select[disabled],
.gen-contract.mode-delete textarea[readonly] {
  cursor: not-allowed;
  background-color: transparent !important;
  background: transparent !important;
}
.gen-contract.mode-delete select[disabled] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.gen-contract.mode-delete button[disabled]:not(.btn--warning) {
  opacity: 0.5;
  cursor: not-allowed;
}
.gen-contract.mode-delete input[readonly][name*="fee"],
.gen-contract.mode-delete input[readonly][name*="Fee"] {
  text-align: right;
}

/* 상세보기 모드: 필수 표기(*) 숨김 */
.gen-contract.mode-view .table__head.required::before {
  display: none;
}

/* readonly 필드 시각적 구분: dd 전체 배경 회색 (insert/update 모드) */
.gen-contract:not(.mode-delete):not(.mode-view) .table__data:has(input[readonly]) {
  background-color: #f3f4f6 !important;
}
.gen-contract:not(.mode-delete):not(.mode-view) .table__data input[readonly] {
  background-color: transparent !important;
}
.gen-contract:not(.mode-delete):not(.mode-view) .readonly-bg .table__data {
  background-color: #f3f4f6 !important;
}

/* 계약자 라벨 아이콘: view/delete 모드에서 숨김 (table__btn.label-tip = renderLabelWithTooltip) */
.gen-contract.mode-view .table__btn.label-tip i,
.gen-contract.mode-view .table__btn.label-tip svg,
.gen-contract.mode-delete .table__btn.label-tip i,
.gen-contract.mode-delete .table__btn.label-tip svg {
  display: none;
}
.gen-contract.mode-view .table__btn.label-tip,
.gen-contract.mode-delete .table__btn.label-tip {
  cursor: default;
  pointer-events: none;
}

/* ========================================
   Lucide 아이콘 플래시 방지
   Turbo 페이지 전환 시 <i data-lucide> → <svg> 교체 전
   미처리 아이콘이 깜빡이는 현상 방지
   ======================================== */
i[data-lucide] {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: middle;
  visibility: hidden;
}

/* ========================================
   페이지 전환 로딩 오버레이
   Turbo 페이지 이동 시 자동 표시
   ======================================== */
.page-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* 반투명 50% */
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
}

.page-loading-overlay.active {
  display: flex;
}

.page-loading-spinner {
  text-align: center;
}

.page-loading-spinner .spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border: 4px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: page-loading-spin 1s linear infinite;
}

.page-loading-spinner .loading-text {
  color: #fff;
  margin-top: 16px;
  font-size: 14px;
}

@keyframes page-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Network Error Overlay ── */
.network-error-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
}

.network-error-overlay.active {
  display: flex;
}

.network-error-content {
  text-align: center;
  padding: 40px;
}

.network-error-icon {
  color: #9ca3af;
  margin-bottom: 16px;
}

.network-error-title {
  font-size: 20px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.network-error-message {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Modern Tabs Component
   현대적인 탭 컴포넌트 스타일
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Base Styles */
.modern-tabs {
  margin-bottom: 1rem;
}

.modern-tabs__nav {
  display: flex;
  gap: 0;
}

.modern-tabs__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-weight: 500;
  color: var(--text-gray, #6b7280);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: transparent;
}

.modern-tabs__item:hover:not(.disabled) {
  color: var(--primary, #2563eb);
}

.modern-tabs__item.active {
  color: var(--primary, #2563eb);
  font-weight: 600;
}

.modern-tabs__item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modern-tabs__icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.modern-tabs__label {
  white-space: nowrap;
}

.modern-tabs__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  color: white;
  background: var(--primary, #2563eb);
  border-radius: 9999px;
}

/* === Underline Variant (현대적 스타일) === */
.modern-tabs--underline {
  border-bottom: 2px solid var(--border-gray, #e5e7eb);
}

.modern-tabs--underline .modern-tabs__item {
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.modern-tabs--underline .modern-tabs__item:hover:not(.disabled):not(.active) {
  border-bottom-color: var(--border-gray, #c9cdd4);
}

.modern-tabs--underline .modern-tabs__item.active {
  border-bottom-color: var(--primary, #2563eb);
}

/* === Pills Variant (둥근 버튼 스타일) === */
.modern-tabs--pills {
  border-bottom: none;
}

.modern-tabs--pills .modern-tabs__nav {
  gap: 0.5rem;
  background: var(--bg-light, #f3f4f6);
  padding: 0.25rem;
  border-radius: 0.5rem;
}

.modern-tabs--pills .modern-tabs__item {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
}

.modern-tabs--pills .modern-tabs__item:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.5);
}

.modern-tabs--pills .modern-tabs__item.active {
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* === Box Variant (기존 스타일 호환) === */
.modern-tabs--box {
  border-bottom: 2px solid var(--border-gray, #d1d5db);
}

.modern-tabs--box .modern-tabs__nav {
  gap: 0.25rem;
}

.modern-tabs--box .modern-tabs__item {
  background: var(--bg-light, #f3f4f6);
  border-radius: 0;
}

.modern-tabs--box .modern-tabs__item:first-child {
  border-radius: 0.375rem 0 0 0;
}

.modern-tabs--box .modern-tabs__item:last-child {
  border-radius: 0 0.375rem 0 0;
}

.modern-tabs--box .modern-tabs__item:hover:not(.disabled) {
  background: var(--bg-hover, #e5e7eb);
}

.modern-tabs--box .modern-tabs__item.active {
  background: var(--primary, #2563eb);
  color: white;
}

.modern-tabs--box .modern-tabs__item.active .modern-tabs__badge {
  background: white;
  color: var(--primary, #2563eb);
}

/* === Size Variants === */
.modern-tabs--sm .modern-tabs__item {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.modern-tabs--lg .modern-tabs__item {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* === Full Width === */
.modern-tabs--full-width .modern-tabs__nav {
  width: 100%;
}

.modern-tabs--full-width .modern-tabs__item {
  flex: 1;
  justify-content: center;
}

/* === Responsive === */
@media (max-width: 640px) {
  .modern-tabs__nav {
    flex-wrap: wrap;
  }

  .modern-tabs__item {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }

  .modern-tabs--full-width .modern-tabs__item {
    flex: 0 0 auto;
    width: auto;
  }

  .modern-tabs--pills .modern-tabs__nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Print Styles - 인쇄 시 데스크톱 레이아웃 유지
   반응형 미디어 쿼리가 인쇄 용지 크기에 적용되는 것을 방지
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media print {
  /* 색상 정확히 인쇄 */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* 불필요한 요소 숨기기 */
  .no-print {
    display: none !important;
  }
  /* col 요소는 display:none이 안 먹음 → visibility:collapse로 컬럼 자체 제거 */
  col.no-print {
    visibility: collapse !important;
  }

  /* row-cols-wrap: 반응형 무효화, 가로 레이아웃 강제 */
  .row-cols-wrap {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
  }

  /*
   * 주의: .custom-table .row-cols-wrap > .row에 대한 flex 기본값을 설정하지 않음
   * 인쇄 전용 페이지(compare-print-*.hbs)에서 개별적으로 flex 비율을 정의하므로
   * 여기서 flex-basis: auto를 강제하면 해당 페이지 스타일이 무효화됨
   */

  /* 2열 레이아웃 */
  .custom-table .row-cols-wrap.row-cols-2 > .row {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }

  /* 3열 레이아웃 */
  .custom-table .row-cols-wrap.row-cols-3 > .row {
    flex: 0 0 33.333% !important;
    max-width: 33.333% !important;
  }

  /* 4열 레이아웃 */
  .custom-table .row-cols-wrap.row-cols-4 > .row {
    flex: 0 0 25% !important;
    max-width: 25% !important;
  }

  /* detail-section 반응형 무효화 */
  .detail-section--responsive .row-cols-wrap > .row,
  .detail-section--responsive .row-cols-3 > .row {
    flex: 0 0 33.333% !important;
    max-width: 33.333% !important;
  }

  .detail-section--responsive .row-cols-4 > .row {
    flex: 0 0 25% !important;
    max-width: 25% !important;
  }

  /* 테이블 레이아웃 유지 */
  .scroll-box {
    overflow: visible !important;
  }

  table {
    page-break-inside: auto;
  }

  tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }

  thead {
    display: table-header-group;
  }

  tfoot {
    display: table-footer-group;
  }

  /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
     Border 강제 표시 (인쇄 시 border 누락 방지)
     - row-cols-wrap 내부 border는 페이지별로 다르므로 여기서 정의하지 않음
     - 각 인쇄 전용 페이지(compare-print-*.hbs)에서 개별 정의
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

  /* custom-table border */
  .custom-table {
    border: 1px solid #e5e7eb !important;
  }

  /* 단일 row 구조일 때만 border-top 적용 (row-cols-wrap 제외) */
  .custom-table > .row {
    border-top: 1px solid #e5e7eb !important;
  }

  .custom-table > .row:first-child {
    border-top: none !important;
  }

  .custom-table .table__head {
    border-right: 1px solid #e5e7eb !important;
    background-color: #f9fafb !important;
  }

  .custom-table .table__data {
    border-right: 1px solid #e5e7eb !important;
  }

  .custom-table .table__data:last-child {
    border-right: none !important;
  }

  /* box border */
  .box {
    border: 1px solid #e5e7eb !important;
  }

  .box--form {
    border: 1px solid #e5e7eb !important;
  }

  /* 전산지원(comptel) 인쇄: 검색폼/버튼 숨김, 테이블만 출력 */
  body.comptel-print .box--form,
  body.comptel-print .box__btn-group,
  body.comptel-print .box__btn-group + hr,
  body.comptel-print .breadcrumb,
  body.comptel-print .search-result-header {
    display: none !important;
  }

  body.comptel-print .section_title {
    text-align: center;
    margin-bottom: 20px;
  }

  body.comptel-print .box {
    border: none !important;
    box-shadow: none !important;
  }

  /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
     리스트 페이지 검색결과 인쇄 (갱신대상/해지·삭제/신계약 등)
     - 모바일 반응형 분기 방지 (페이지 너비 강제)
     - 검색결과 테이블 전체 노출 (max-height/overflow 해제)
     - 헤더/GNB/액션버튼/페이지네이션 등 chrome 숨김
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
  @page {
    size: A4 landscape;
    margin: 8mm 6mm;
  }

  html, body {
    width: auto !important;
    min-width: 1280px !important;
    max-width: none !important;
    margin: 0 !important;
    background: #fff !important;
    overflow: visible !important;
  }

  main {
    padding: 0 !important;
  }

  /* 스크롤 박스 전체 펼치기 (가려진 행/컬럼 모두 인쇄) */
  .scroll-box,
  .scroll-box-y {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
  }

  /* sticky header/footer/column 전부 해제 (인쇄 시 가려진 영역 모두 표시) */
  .scroll-box table thead,
  .scroll-box table thead th,
  .scroll-box-y table thead,
  .scroll-box-y table thead th,
  .table-sticky-header thead,
  .table-sticky-header thead th,
  .table--sticky-multirow thead,
  .table--sticky-multirow thead th,
  .table-sticky-bordered thead,
  .table-sticky-bordered thead th,
  .table-sticky-first-col th:first-child,
  .table-sticky-first-col td:first-child,
  .table-sticky-footer tfoot,
  .table-sticky-footer tfoot td,
  .table-sticky-footer tfoot th,
  tfoot.sticky-summary-footer,
  tfoot.sticky-summary-footer tr,
  tfoot.sticky-summary-footer td,
  tfoot.sticky-summary-footer-2row .sticky-summary-row-0 td,
  tfoot.sticky-summary-footer-2row .sticky-summary-row-1 td,
  tfoot.sticky-summary-footer-3row .sticky-summary-row-0 td,
  tfoot.sticky-summary-footer-3row .sticky-summary-row-1 td,
  tfoot.sticky-summary-footer-3row .sticky-summary-row-2 td,
  .sticky-cols-1 thead th, .sticky-cols-1 tbody td, .sticky-cols-1 tfoot td,
  .sticky-cols-2 thead th, .sticky-cols-2 tbody td, .sticky-cols-2 tfoot td,
  .sticky-cols-3 thead th, .sticky-cols-3 tbody td, .sticky-cols-3 tfoot td,
  .sticky-cols-4 thead th, .sticky-cols-4 tbody td, .sticky-cols-4 tfoot td,
  .sticky-cols-5 thead th, .sticky-cols-5 tbody td, .sticky-cols-5 tfoot td,
  .sticky-col,
  .sticky-col-1, .sticky-col-2, .sticky-col-3, .sticky-col-4, .sticky-col-5,
  .data-table-base .sticky-header-row,
  .data-table-base .sticky-header-row1,
  .data-table-base .sticky-header-row2,
  .data-table-base .sticky-footer-row,
  .data-table-base .sticky-footer-row1 td,
  .data-table-base .sticky-footer-row2 td,
  .data-table-base .sticky-footer-single td,
  .data-table-base .sticky-col,
  .perf-table .sticky-header-row1,
  .perf-table .sticky-header-row2,
  .perf-table .sticky-footer-row,
  .perf-table .sticky-footer-row1,
  .perf-table .sticky-footer-row2,
  .perf-table .sticky-col {
    position: static !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    box-shadow: none !important;
  }

  /* chrome 숨김 */
  header.header--pc,
  header.header--mobile,
  .header--pc,
  .header--mobile,
  #irs-gnb-pc,
  #irs-gnb-mobile,
  .gnb--pc,
  .gnb--mobile,
  .breadcrumb,
  .box__btn-group,
  .box__btn-group + hr,
  .search-btn-group,
  .pagination,
  .footer,
  footer {
    display: none !important;
  }

  /* 테이블 너비/줄바꿈 강제 */
  table.table--data,
  .scroll-box table {
    width: 100% !important;
    table-layout: auto !important;
    border-collapse: collapse !important;
  }

  table.table--data th,
  table.table--data td,
  .scroll-box th,
  .scroll-box td {
    white-space: nowrap !important;
    word-break: keep-all !important;
  }

  /* 검색폼은 인쇄 정보로 유지하되 페이지 분할 방지 */
  .box--form {
    page-break-inside: avoid;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Searchable Select Component (커스텀 검색 콤보)
   - 기존 selectbox 스타일과 동일한 디자인
   - 검색 기능이 필요한 드롭다운에 사용
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* JS 초기화 전 select 숨기기 (layout shift 방지)
   select는 display:none으로 완전히 숨기고,
   JS가 생성하는 searchable-select 컨테이너가 자리를 차지하도록 함 */
select.searchable-select-target {
  display: none !important;
}

.searchable-select {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.searchable-select__trigger {
  display: flex;
  align-items: center;
  height: 2rem;
  padding: 0 1.75rem 0 0.5rem;
  font-size: 0.875rem;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* 기존 selectbox와 동일한 화살표 SVG */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}

.searchable-select__dropdown {
  position: fixed;
  z-index: 9999;
  display: none;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.searchable-select__dropdown.open {
  display: block;
}

.searchable-select.open .searchable-select__trigger {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: #fff;
}

.searchable-select__search {
  width: 100%;
  padding: 4px 6px;
  border: none;
  border-bottom: 1px solid #ddd;
  font-size: 0.8125rem;
  outline: none;
  box-sizing: border-box;
}

.searchable-select__options {
  max-height: 200px;
  overflow-y: auto;
}

.searchable-select__option {
  padding: 3px 6px;
  font-size: 0.8125rem;
  cursor: pointer;
  white-space: nowrap;
}

.searchable-select__option:hover,
.searchable-select__option.highlighted {
  background-color: #1e90ff;
  color: #fff;
}

.searchable-select__option.selected {
  background-color: #e8f0fe;
}

.searchable-select__option.selected:hover {
  background-color: #1e90ff;
  color: #fff;
}

.searchable-select__empty {
  padding: 4px 6px;
  font-size: 0.8125rem;
  color: #999;
}

/******** 장기보험 - 상품검색 autocomplete ********/
.bodyitem-autocomplete {
  position: relative;
}

.bodyitem-autocomplete__dropdown {
  position: fixed;
  z-index: 9999;
  display: none;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 280px;
  overflow-y: auto;
}

.bodyitem-autocomplete__dropdown.open {
  display: block;
}

.bodyitem-autocomplete__item {
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bodyitem-autocomplete__item:last-child {
  border-bottom: none;
}

.bodyitem-autocomplete__item:hover,
.bodyitem-autocomplete__item.highlighted {
  background: #f0f7ff;
}

.bodyitem-autocomplete__item--available {
  color: #333;
}

.bodyitem-autocomplete__item--unavailable {
  color: #aaa;
  cursor: default;
}

.bodyitem-autocomplete__item--unavailable:hover,
.bodyitem-autocomplete__item--unavailable.highlighted {
  background: transparent;
}

.bodyitem-autocomplete__badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.bodyitem-autocomplete__badge--company {
  background: #e8f0fe;
  color: #1a73e8;
}

.bodyitem-autocomplete__name {
  flex: 1;
  min-width: 0;
}

.bodyitem-autocomplete__tag {
  font-size: 11px;
  color: #ccc;
  margin-left: auto;
  flex-shrink: 0;
}

.bodyitem-autocomplete__empty {
  padding: 12px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

/******** 비교견적 - 차명코드 autocomplete ********/
.carcode-autocomplete__dropdown {
  position: fixed;
  z-index: 9999;
  display: none;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 280px;
  overflow-y: auto;
}

.carcode-autocomplete__dropdown.open {
  display: block;
}

.carcode-autocomplete__item {
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.carcode-autocomplete__item:last-child {
  border-bottom: none;
}

.carcode-autocomplete__item:hover,
.carcode-autocomplete__item.highlighted {
  background: #f0f7ff;
}

.carcode-autocomplete__badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  background: #e8f0fe;
  color: #1a73e8;
}

.carcode-autocomplete__name {
  flex: 1;
  min-width: 0;
}

.carcode-autocomplete__code {
  font-size: 11px;
  color: #888;
  margin-left: auto;
  flex-shrink: 0;
}

.carcode-autocomplete__empty {
  padding: 12px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

/******** 장기보험 - 취급자 hover 툴팁 ********/
.handler-tooltip-wrap {
  position: relative;
  display: inline-block;
  cursor: help;
}

.handler-tooltip {
  display: none;
  position: fixed;
  z-index: 9999;
  font-size: 12px;
  line-height: 1.6;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  overflow: hidden;
  border:1px solid #ccc;
  border-radius: 10px;
}

.handler-tooltip-header {
  background: var(--primary);
  color: #fff;
  padding: 4px 10px;
  white-space: nowrap;
  font-weight: 600;
}

.handler-tooltip-body {
  background: #f6f4f7;
  /* border: 1px solid #999; */
  border-top: none;
  padding: 8px 10px;
  white-space: nowrap;
}

/* 실계약 강조 (만기대상조회) */
.contract-type-real {
  color: #990000;
}

/* 보험사 컬럼 헤더 배경 (지점별코드관리 등) */
.bg-orange-100 {
  background-color: #ffe5d4 !important;
}

/******** 장기보험 - 엑셀 다운로드 모달 ********/
.excel-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.excel-modal-content {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  width: 100%;
  max-width: 450px;
  max-height: 90vh;
  overflow: hidden;
}

.excel-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.excel-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.excel-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.excel-modal-close:hover {
  background-color: #f3f4f6;
  color: #111827;
}

.excel-modal-body {
  padding: 20px;
  overflow-y: auto;
  max-height: calc(90vh - 140px);
}

.excel-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
  background-color: #f9fafb;
}

/* ======== 취급자/주민번호/핸드폰 툴팁 (position: fixed, scroll-box 밖 표시) ======== */
.handler-tooltip-wrap {
  position: relative;
  display: inline-block;
  cursor: help;
}
/* 
.handler-tooltip {
  display: none;
  position: fixed;
  z-index: 9999;
  font-size: 12px;
  line-height: 1.6;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
.handler-tooltip-header {
  background: #5079b5;
  color: #fff;
  padding: 4px 10px;
  white-space: nowrap;
}
.handler-tooltip-body {
  background: #ffffe1;
  border: 1px solid #999;
  border-top: none;
  padding: 8px 10px;
  white-space: nowrap;
} */

/******** 종목별집계 테이블 — 고유 규칙만 (공통은 data-table-base) ********/

.item-aggregate-table-scroll {
  max-height: 600px;
  overflow: auto;
}

/* tfoot 색상 오버라이드 (base=#f3f4f6, 여기는 --bg-hover) */
.item-aggregate-table tfoot td {
  background: var(--bg-hover, #f0f0f0) !important;
}

/* 건수 행 구분선 */
.item-aggregate-table .row-count td {
  border-bottom: 3px solid var(--primary, #5046e5);
}

/* 본부 그룹 구분선 */
.item-aggregate-table .bonbu-group-start td,
.monthly-statistics-table .bonbu-group-start td,
.monthly-statistics-table tbody tr.bonbu-group-start td {
  border-top: 2px solid var(--primary, #2c5aa0) !important;
}
/* 그룹 구분선 앞 행의 회색 border-bottom 제거 (겹침 방지) */
.table--data tbody tr:has(+ .bonbu-group-start) td {
  border-bottom: none !important;
}

/* 2행 sticky footer (개별 td 레벨 sticky + ::before 구분선) */
.item-aggregate-table .sticky-footer-row1 td {
  position: sticky;
  bottom: calc(2.5rem - 1px);
  z-index: 20;
  background: var(--bg-hover, #f0f0f0) !important;
}
.item-aggregate-table .sticky-footer-row1 td::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border-table, #a0a6ab);
  pointer-events: none;
}
.item-aggregate-table .sticky-footer-row2 td {
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: var(--bg-hover, #f0f0f0) !important;
}
.item-aggregate-table .sticky-footer-row2 td::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-table, #a0a6ab);
  pointer-events: none;
}

/* 푸터 sticky-col 색상 오버라이드 */
.item-aggregate-table tfoot .sticky-col {
  z-index: 30;
  background: var(--bg-hover, #f0f0f0) !important;
}

/******** 다건계약조회 (bodyinsu/duplicate) ********/
.truncate-text {
  display: block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.group-separator td {
  padding: 0 !important;
}
.group-separator__td {
  height: 3px;
  background-color: #5d7d90 !important;
  border: none !important;
}

/********문자발송 이미지 템플릿********/
.img-template-list li {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddd;
  padding: 5px;
  font-size: 0.725rem;
  max-height: 115px;
  border-radius: 0.5rem;
}

/* ========================================
   Company Aggregate Table — 고유 규칙만 (공통은 data-table-base)
   ======================================== */
.company-aggregate-table-scroll {
  max-height: 600px;
  overflow: auto;
}
.company-aggregate-table-scroll--popup {
  max-height: 400px;
}

/* sticky-col 경계선 (border-right + box-shadow + ::after) */
.company-aggregate-table .sticky-col {
  border-right: 1px solid var(--border-table, #bdbdc1);
  box-shadow: 4px 0 4px -4px rgba(0, 0, 0, 0.15);
}
.company-aggregate-table .sticky-col::after {
  content: '';
  position: absolute;
  top: 0;
  right: -1px;
  bottom: 0;
  width: 1px;
  background: var(--border-table, #bdbdc1);
  pointer-events: none;
}

/* 비활성 링크 */
.company-aggregate-table .btn--link.inactive {
  color: #999;
}

/* ===== 보험사별집계2 — 고유 규칙만 (공통은 data-table-base) ===== */

.aggregate2-table-scroll {
  max-height: 600px;
  overflow: auto;
}

/* FC상세 4컬럼 배경색 */
.agg2-cols-4 tbody td:nth-child(-n + 4),
.agg2-cols-4 thead th:nth-child(-n + 4) {
  background: var(--bg-table-head, #edeef6) !important;
}

/* multi-sticky-col 경계선 (inset box-shadow + last-sticky) */
/* 주의: .sticky-col ~ .sticky-col::before { content: none } 금지! */
.aggregate2-table .sticky-col:not(.last-sticky) {
  border-right: none;
  box-shadow: inset -1px 0 0 var(--border-table, #bdbdc1);
}
.aggregate2-table .sticky-col::after {
  content: none;
}
.aggregate2-table .sticky-col.last-sticky {
  border-right: 1px solid var(--border-table, #bdbdc1);
  box-shadow: 4px 0 4px -4px rgba(0, 0, 0, 0.15);
}
.aggregate2-table .sticky-col.last-sticky::after {
  content: '';
  position: absolute;
  top: 0;
  right: -1px;
  bottom: 0;
  width: 1px;
  background: var(--border-table, #bdbdc1);
  pointer-events: none;
}

/* z-index 오버라이드 */
.aggregate2-table thead .sticky-col {
  z-index: 30;
}
.aggregate2-table tbody .sticky-col {
  z-index: 10;
}
.aggregate2-table tfoot .sticky-col {
  z-index: 30;
  background: #f3f4f6 !important;
}

/* ========================================
   Download Popup (엑셀 다운로드 사유/비밀번호)
   ======================================== */
.download-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.download-popup-content {
  position: relative;
  background: #fff;
  border: 5px solid #fff;
  padding: 20px;
  min-width: 300px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.download-popup-close {
  position: absolute;
  right: 5px;
  top: 5px;
  padding: 5px;
  cursor: pointer;
  font-weight: bold;
}

/* 통계 테이블 (조직권역관리 등) */
.stat-scroll-box {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 300px);
  width: 100%;
  position: relative;
}
.stat-table {
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.stat-table thead {
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.stat-table thead th {
  background-color: #f3f4f6 !important;
}
.stat-subtotal-row td {
  background-color: #faf8f1 !important;
  font-weight: bold;
}

/* ========== Info Details (접이식 용어설명) ========== */
.info-details {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}
.info-details__summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  list-style: none;
  user-select: none;
}
.info-details__summary::-webkit-details-marker {
  display: none;
}
.info-details__chevron {
  transition: transform 0.2s;
  margin-left: auto;
}
.info-details[open] .info-details__chevron {
  transform: rotate(180deg);
}
.info-details__content {
  padding: 0.75rem 1rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.8125rem;
  background: #f9fafb;
  border-radius: 0 0 0.5rem 0.5rem;
}
/* 인라인 변형: 검색결과 헤더 우측에 배치, 열리면 오버레이 드롭다운 */
.info-details--inline {
  position: relative;
  border: none;
  width: fit-content;
}
.info-details--inline .info-details__summary {
  padding: 0.375rem 0.625rem;
  font-size: 0.8125rem;
  color: #4b5563;
  background-color: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
}
.info-details--inline .info-details__summary:hover {
  background-color: #e5e7eb;
}
.info-details--inline .info-details__content {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 30;
  min-width: 480px;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media screen and (max-width: 767px) {
  .info-details--inline .info-details__content {
    width: 290px;
    min-width: 250px;
  }
}

/* ========== Annual Leave (연차관리) ========== */
.able {
  cursor: pointer;
}
.able:hover {
  background-color: #d9ebff !important;
}
.tb_wide_01 {
  width: 100%;
  border-collapse: collapse;
}
.tb_wide_01 tr td {
  border-bottom: solid 1px #e6e9eb;
  height: 20px;
  padding: 10px;
}
.tb_wide_01 tr td.td01 {
  background-color: #f5f7f9;
  font-weight: bold;
  width: 25%;
}
/* Legacy layer modal structure */
.layer.user {
  display: none;
}
.layer.user.active {
  display: flex;
  align-items: center;
  justify-content: center;
}
.layer.user .inbox {
  position: relative;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.layer.user .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}
.layer.user .top b {
  font-size: 1.125rem;
  font-weight: 600;
}
.layer.user .box {
  padding: 1.5rem;
}
.layer.user .bot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #e5e7eb;
}
.layer.user .bot .btn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  background-color: #fff;
}
.layer.user .bot .btn.confirm {
  background-color: var(--primary, #455771);
  color: #fff;
  border-color: var(--primary, #455771);
}
.layer.user .bot .btn.cancel {
  background-color: #fff;
  color: #333;
}
.layer.user .bot .btn:hover {
  opacity: 0.9;
}
.modal__btn-close {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal__btn-close:hover {
  color: #374151;
}

/* ===== 월별실적현황 테이블 (statistics1/statistics2 공통) ===== */

/* ===========================
   monthly-statistics-table — 고유 규칙만 (공통은 data-table-base)
   =========================== */

/* sticky-col 경계선 (border-right + box-shadow + ::after) */
.monthly-statistics-table .sticky-col {
  border-right: 1px solid var(--border-table, #bdbdc1);
  box-shadow: 4px 0 4px -4px rgba(0, 0, 0, 0.15);
}
.monthly-statistics-table .sticky-col::after {
  content: '';
  position: absolute;
  top: 0;
  right: -1px;
  bottom: 0;
  width: 1px;
  background: var(--border-table, #bdbdc1);
  pointer-events: none;
}

/* tbody sticky-col 배경색 오버라이드 (col1-bg와 동일 색상) */
.monthly-statistics-table tbody .sticky-col {
  background: var(--bg-table-head, #edeef6) !important;
}

/* 비활성 링크 */
.monthly-statistics-table .btn--link.inactive {
  color: #999;
}

/* ===========================
   statistics2-table — 고유 규칙만 (공통은 data-table-base)
   =========================== */

/* 2행 multi-row 헤더 (z-index: 40/39 — base의 20보다 높음) */
.statistics2-table .sticky-header-row {
  position: sticky;
  top: 0;
  z-index: 40;
}
.statistics2-table .sticky-header-row th {
  background: var(--bg-table-head, #dadee3) !important;
}
.statistics2-table .sticky-header-row-2 {
  top: 2.5rem;
  z-index: 39;
}
.statistics2-table .sticky-header-row-2 th {
  background: var(--bg-table-head, #dadee3) !important;
}

/* multi-sticky-col 경계선 (aggregate2와 동일 패턴) */
/* 주의: .sticky-col ~ .sticky-col::before { content: none } 금지! */
.statistics2-table .sticky-col:not(.last-sticky) {
  border-right: none;
  box-shadow: inset -1px 0 0 var(--border-table, #bdbdc1);
}
.statistics2-table .sticky-col::after {
  content: none;
}
.statistics2-table .sticky-col.last-sticky {
  border-right: 1px solid var(--border-table, #bdbdc1);
  box-shadow: 4px 0 4px -4px rgba(0, 0, 0, 0.15);
}
.statistics2-table .sticky-col.last-sticky::after {
  content: '';
  position: absolute;
  top: 0;
  right: -1px;
  bottom: 0;
  width: 1px;
  background: var(--border-table, #bdbdc1);
  pointer-events: none;
}

/* z-index 오버라이드 (thead 교차점 z: 50) */
.statistics2-table thead .sticky-col {
  z-index: 50;
}
.statistics2-table tbody .sticky-col {
  z-index: 10;
}
.statistics2-table tfoot .sticky-col {
  z-index: 30;
  background: #f3f4f6 !important;
}

/* 링크 스타일 */
.statistics2-table .btn--link {
  color: var(--primary, #2563eb);
  text-decoration: none;
}
.statistics2-table .btn--link:hover {
  text-decoration: underline;
}

/* ============================================================
   월별근태관리 달력 테이블
   ============================================================ */
.attendance-monthly-table-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 600px;
  border: 1px solid #e5e7eb;
}

.attendance-monthly-table {
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.attendance-monthly-table th,
.attendance-monthly-table td {
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.attendance-monthly-table thead th {
  background-color: #f3f4f6;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

.attendance-monthly-table tbody tr:hover {
  background-color: #f9fafb;
}

/* Calendar Table (월간스케줄관리) */
.calendar-table {
  border-collapse: collapse;
}
.calendar-table thead th {
  background-color: #F3F8FC;
  font-weight: 600;
  color: #1f2937;
}
.calendar-table tbody td {
  background-color: inherit;
  vertical-align: top;
  height: auto;
  min-height: auto;
  white-space: normal;
  vertical-align: middle;
}
.calendar-table th table,
.calendar-table th table th,
.calendar-table th table td {
  border: none !important;
}
.calendar-table .plan-item-table,
.calendar-table .plan-item-table td,
.calendar-table .plan-item-table th {
  border: none !important;
}
.calendar-table tbody td table td {
  border: none !important;
}
.calendar-day-row {
  transition: background-color 0.2s;
  height: auto;
}
.calendar-day-row td {
  height: auto;
}
.calendar-day-row:hover {
  background-color: #f3f4f6 !important;
}
.plan-item-row {
  transition: background-color 0.2s;
}
.plan-item-row:hover {
  background-color: #f9fafb;
}

/* ==========================================================================
   Success Plan 프로세스 테이블
   - .table--process: 프로세스 분석/계획 테이블 공통
   - .table-sticky-process-plan: 10일활동계획 sticky 헤더/컬럼
   - .empty-state: 빈 상태 표시
   ========================================================================== */

.table--process {
  font-size: 13px;
}

.table--process thead {
  position: sticky;
  top: -1px;
  border-bottom: 1px solid #ddd;
}

.table--process thead th {
  font-weight: 600;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  position: relative; /* ::before 앵커링용 (sticky 없는 페이지에서도 top-line 정상 표시) */
}

.table--process tbody td {
  font-size: 12px;
  vertical-align: middle;
}

.table--process .text-right {
  text-align: right;
  padding-right: 8px;
}

.table--process tbody tr:hover {
  background-color: #f9fafb;
}

.table-sticky-process-plan {
  border-collapse: separate;
  border-spacing: 0;
}

.table-sticky-process-plan thead {
  position: sticky;
  top: 0;
  z-index: 20;
}

.table-sticky-process-plan thead th.sticky-header-group {
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.table-sticky-process-plan tbody td.sticky-cell {
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
  background-color: #fff;
}

.table-sticky-process-plan thead tr:first-child th.sticky-header-group {
  top: 0;
}

.table-sticky-process-plan thead tr:nth-child(2) th.sticky-header-group {
  top: 0;
}

.table-sticky-process-plan .scroll-box {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 600px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.empty-state i {
  margin-bottom: 16px;
}

.empty-state p {
  margin: 0;
}

/* 드릴다운 테이블 sticky 지원 */
.drilldown-table-sticky {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.drilldown-table-sticky thead {
  position: sticky;
  top: 0;
  z-index: 20;
}

.drilldown-table-sticky .sticky-col {
  position: sticky;
  z-index: 5;
  background-color: #fff;
}

.drilldown-table-sticky thead .sticky-col {
  z-index: 25;
}

.drilldown-table-sticky .sticky-col-shadow {
  box-shadow: 4px 0 4px -4px rgba(0, 0, 0, 0.15);
}

/* 일자별활동조회 등 td 배경색 유틸리티 */
td.td-bg-yellow {
  background-color: yellow;
}

/* 토스트 메시지 (문자설정관리 등) */
.toast-message {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 24px;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
}
.toast-message.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast-success {
  background: #10b981;
}
.toast-error {
  background: #ef4444;
}

/* PMS 업로드 팝업 - 섹션 스타일 */
.section-box {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}
.section-title-custom {
  font-weight: 600;
  font-size: 14px;
  color: #374151;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title-custom i {
  width: 16px;
  height: 16px;
  color: #6b7280;
}
.stat-value {
  font-weight: 700;
  font-size: 18px;
}
.stat-label {
  font-size: 12px;
  color: #6b7280;
}

/* 게시판 Quill 에디터 */
#editor-container {
  height: 500px;
  background: white;
}
.ql-editor {
  min-height: 450px;
  font-size: 14px;
}

/* 배정 팝업 강조 셀 (충전건수, 배정건수, 잔여건수 등) */
.assign-highlight {
  background-color: #FED101;
}

/* 장기보험 입력폼: readonly 필드 시각적 구분 */
#bodyinsuForm .table__data:has(input[readonly]) {
  background-color: var(--bg-read-only) !important;
}
#bodyinsuForm .table__data input[readonly] {
  background-color: transparent !important;
}

/* popup-info-table: 팝업 정보 테이블 (라벨-값 그리드) */
.popup-info-table .custom-table {
  display: grid;
  gap: 0;
}

.popup-info-table .custom-table.row-cols-1 {
  grid-template-columns: 1fr;
}

.popup-info-table .custom-table.row-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.popup-info-table .custom-table.row-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.popup-info-table .custom-table.row-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.popup-info-table .row {
  display: flex;
  border: 1px solid #e5e7eb;
  margin: -1px 0 0 -1px;
}

.popup-info-table .table__head {
  min-width: 100px;
  padding: 8px 12px;
  background: #f9fafb;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.popup-info-table .table__data {
  flex: 1;
  padding: 8px 12px;
  display: flex;
  align-items: center;
}

.popup-info-table .colspan-2 {
  grid-column: span 2;
}

.popup-info-table .colspan-3 {
  grid-column: span 3;
}

.popup-info-table .colspan-4 {
  grid-column: span 4;
}

/* Utility text colors (Handlebars helpers에서 공통 사용) */
.text-red-600 { color: #d12222; }
.text-blue-600 { color: #1449bd; }
.text-green-600 { color: #118e66; }



  /*보험료 비교 테이블 추가*/
.my-3 {
    padding: 0.5rem 1rem;
    background: #fff;
    border: 2px dotted #aeb2d7;
    border-radius: 0.5rem;
}

/* ==========================================================================
   .table__data 내부 값 리스트 (table-data-info)
   - dd(table__data) 자식으로 사용
   - li 앞에 네모 표식
   ========================================================================== */
.table-data-info {
  list-style: none;
  padding: 0.6rem 0.75rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.table-data-info > li {
  position: relative;
  padding-left: 0.9rem;
  line-height: 1.65;
  color: var(--text-default);
  word-break: keep-all;
}

.table-data-info > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 0.35rem;
  height: 0.35rem;
  background: var(--primary);
  border-radius: 2px;
}

  /*가망고객 통합관리 광고,DB정보 추가*/

.ad-infomation {
    padding: 0.5rem;
    border: 2px solid #b0d1ca;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    background: #fffbf3;
    font-size: 0.85rem;
    font-weight: 600;
    color: #179177;
}

/* ==========================================================================
   모바일 검색폼 접기 (≤768px)
   - JS가 3번째 이후 dl.row에 data-mobile-collapsed="true" 부여
   - 2번째가 labeled-select-group(검색조건)이면 2번째부터 가림
   - 폼 루트(.is-expanded)로 펼침/접힘 토글
   ========================================================================== */
@media screen and (max-width: 768px) {
  /* 접힘 상태 — 즉시 숨김 */
  [data-hbs-component="irs/components/search-form"] [data-mobile-collapsed="true"],
  [data-hbs-component="irs/components/popup-search-form"] [data-mobile-collapsed="true"] {
    display: none !important;
  }

  /* 펼침 상태 */
  [data-hbs-component="irs/components/search-form"].is-expanded [data-mobile-collapsed="true"],
  [data-hbs-component="irs/components/popup-search-form"].is-expanded [data-mobile-collapsed="true"] {
    display: flex !important;
  }

  /* 토글이 붙은 박스: 하단 모서리 flat + bottom border 제거 + margin 제거 → 토글과 이음새 없음 */
  .box.search-form-has-collapse-tab {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-bottom: none !important;           /* 토글과 연결부 가로선 제거 */
    margin-bottom: 0 !important;
  }

  /* 박스 하단에 "붙어서 이어지는" 얇은 tab — .box 와 동일한 border/bg 로 시각 통일 */
  .search-form-more-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: 100%;
    min-height: 28px;
    padding: 0.25rem 1rem;
    margin: 0 0 1rem 0;

    background: var(--bg-white);
    border: 1px solid var(--border-gray);
    border-top: 1px solid var(--border-gray);   /* 폼 영역과 토글 구분선 */
    border-radius: 0 0 1rem 1rem;          /* .box border-radius 와 동일 */
    box-shadow: 0 4px 10px 0 rgba(68, 86, 96, 0.15);  /* .box 그림자 이어받음 */

    color: var(--text-muted, #5a5a6b);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    position: relative;
  }

  /* 시각적으로는 28px이지만 터치 타겟은 44px 이상 (WCAG 2.5.5) */
  .search-form-more-toggle::before {
    content: '';
    position: absolute;
    inset: -10px 0;
  }

  .search-form-more-toggle:hover {
    background: var(--bg-gray, #f5f5f7);
  }
  .search-form-more-toggle:active {
    background: var(--bg-gray-hover, #eceef2);
  }
  .search-form-more-toggle:focus-visible {
    outline: none;
    box-shadow:
      0 4px 10px 0 rgba(68, 86, 96, 0.15),
      inset 0 0 0 2px var(--color-primary, #6c5ce7);
  }

  .search-form-more-toggle .chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
  }
  .search-form-more-toggle .chevron svg {
    display: block;
  }

  /* 펼침 상태 — aria-expanded 속성 기반 */
  .search-form-more-toggle[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
  }
}

/* 데스크톱(>768px)에서는 토글 버튼 자체를 노출하지 않음 */
@media screen and (min-width: 769px) {
  .search-form-more-toggle {
    display: none !important;
  }
}

/* ==========================================================================
   업무지원시스템 (FC Reception Support)
   - 왼쪽: 타이틀 / 오른쪽: 단계 카드 + 유의사항
   - 반응형: 900px 이하에서 세로 stack
   ========================================================================== */
.support-guide {
  display: grid;
  grid-template-columns: minmax(340px, 420px) 1fr;
  gap: 1.75rem;
  padding: 1.75rem;
  background: var(--bg-white);
  border: 1px solid var(--border-light-gray);
  border-radius: 1rem;
  box-shadow: 0 1px 3px var(--shadow-default);
}

.support-guide__intro {
  position: sticky;
  top: 1rem;
  align-self: start;
  padding: 2rem 1.75rem;
  background: linear-gradient(140deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 0.875rem;
  color: var(--text-button-white);
  overflow: hidden;
}

.support-guide__intro::after {
  content: '';
  position: absolute;
  inset: auto -20% -30% auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.support-guide__point {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 2.25rem;
  height: 2.25rem;
  color: rgba(255, 255, 255, 0.45);
  stroke-width: 2.5;
  animation: support-point-nudge 1.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes support-point-nudge {
  0%, 100% {
    transform: translateX(0);
    opacity: 0.45;
  }
  50% {
    transform: translateX(6px);
    opacity: 0.85;
  }
}

.support-guide__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 1rem;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}

.support-guide__headline {
  position: relative;
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 1.75rem;
}

.support-guide__date {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.85rem;
  width: 100%;
}

.support-guide__date-label {
  font-weight: 500;
  opacity: 0.75;
}

.support-guide__date-value {
  font-weight: 700;
}

.support-guide__body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.support-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.support-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-white);
  border: 2px solid var(--border-light-gray);
  border-radius: 0.875rem;
}

.support-step--full {
  grid-column: 1 / -1;
}

.support-step__num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 0.625rem;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.support-step__content {
  flex: 1;
  min-width: 0;
}

.support-step__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-default);
  margin-bottom: 0.375rem;
  letter-spacing: -0.01em;
}

.support-step__highlight {
  color: var(--primary);
  font-weight: 800;
}

.support-arrow {
  display: inline-block;
  padding: 0 0.15rem;
  color: var(--primary);
  font-weight: 700;
}

/* 체크 리스트 (step / notice desc 공용) */
.support-step__list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0;
}

.support-step__list > li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-darkgray);
}

.support-step__list > li > span {
  font-weight: 600;
}

.support-step__list .lucide {
  flex-shrink: 0;
  width: 0.95rem;
  height: 0.95rem;
  padding: 0.15rem;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  stroke-width: 3.5;
  margin-top: 0.25rem;
}

.support-notices .support-step__list .lucide {
  background: #e08a2a;
}

/* 유의사항 카드 */
.support-notices {
  padding: 1.5rem 1.75rem;
  background: #fff9ef;
  border: 1px solid #f5dfc4;
  border-radius: 0.875rem;
}

.support-notices__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #b35c00;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.support-notices__title::before {
  content: '';
  width: 4px;
  height: 1rem;
  background: #e08a2a;
  border-radius: 2px;
}

.support-notices__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.support-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  background: var(--bg-white);
  border: 1px solid #f0dfc6;
  border-radius: 0.625rem;
}

.support-notice__num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  background: #fff3e0;
  color: #b35c00;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 800;
}

.support-notice__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.support-notice__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--danger);
  letter-spacing: -0.01em;
}

/* 하단 액션 */
.support-guide__action {
  display: flex;
  justify-content: center;
  margin-top: 0.75rem;
  padding-top: 1.75rem;
  border-top: 1px dashed var(--border-gray);
}

.support-guide__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.95rem 2.25rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(71, 66, 158, 0.28);
  transition: transform 0.2s, box-shadow 0.2s;
}

.support-guide__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(71, 66, 158, 0.38);
}

.support-guide__btn:hover .support-guide__btn-arrow {
  transform: translateX(3px);
}

.support-guide__btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(71, 66, 158, 0.28);
}

.support-guide__btn .lucide {
  width: 1.1rem;
  height: 1.1rem;
  stroke-width: 2.25;
}

.support-guide__btn-arrow {
  margin-left: 0.2rem;
  transition: transform 0.2s;
}

/* 반응형 */
@media (max-width: 1024px) {
  .support-guide {
    grid-template-columns: minmax(280px, 340px) 1fr;
    gap: 1.25rem;
    padding: 1.25rem;
  }
  .support-guide__intro {
    padding: 1.75rem 1.5rem;
  }
  .support-guide__headline {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .support-guide {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1rem;
  }
  .support-guide__intro {
    position: static;
    padding: 1.5rem;
  }
  .support-guide__point {
    display: none;
  }
  .support-guide__headline {
    font-size: 1.375rem;
    margin-bottom: 1rem;
  }
  .support-steps,
  .support-notices__list {
    grid-template-columns: 1fr;
  }
  .support-step {
    padding: 1rem 1.125rem;
    gap: 0.75rem;
  }
  .support-step__num {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.85rem;
  }
  .support-step__title,
  .support-notice__title {
    font-size: 1.05rem;
  }
  .support-notices {
    padding: 1.25rem;
  }
}

/* ============================================================
 * IrsModal.showBatchResult — 일괄작업 결과 모달
 *
 * Design system: GitHub Primer + Stripe Dashboard 톤
 * - Severity 컬러 코딩 (danger/warning/info/neutral)
 * - <details>/<summary> 기반 펼침 (a11y 표준)
 * - 8px grid · 부드러운 transition · focus ring
 * ============================================================ */

.batch-result {
  text-align: left;
  font-size: 0.875rem;
  color: #1f2937;
  line-height: 1.5;
}

/* 요약: 성공·실패 카운트 */
.batch-result-summary {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.5rem 0 1rem;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}
.batch-result-success {
  color: #047857;
  font-weight: 600;
}
.batch-result-fail {
  color: #b91c1c;
  font-weight: 600;
}

/* 그룹 컨테이너 — 카드 스타일 */
.batch-result-groups {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: #ffffff;
}

.batch-result-group {
  border-top: 1px solid #e5e7eb;
}
.batch-result-group:first-child {
  border-top: none;
}

/* 요약 row (펼침 가능한 summary 또는 static row) */
.batch-result-group > summary,
.batch-result-group .batch-result-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  background-color: #ffffff;
  transition: background-color 0.15s ease;
}
.batch-result-group > summary {
  cursor: pointer;
  user-select: none;
  list-style: none;
  outline: none;
}
.batch-result-group > summary::-webkit-details-marker {
  display: none;
}
.batch-result-group > summary:hover {
  background-color: #f9fafb;
}
.batch-result-group > summary:focus-visible {
  background-color: #f9fafb;
  box-shadow: inset 0 0 0 2px #6366f1;
}
.batch-result-group[open] > summary {
  border-bottom: 1px solid #e5e7eb;
}

/* Chevron — CSS 삼각형 + 회전 애니메이션 */
.batch-result-chevron {
  width: 0.5rem;
  height: 0.5rem;
  flex-shrink: 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
  color: #9ca3af;
  margin-left: 0.125rem;
}
.batch-result-group[open] > summary .batch-result-chevron {
  transform: rotate(45deg);
  color: #6b7280;
}

/* 사유 텍스트 */
.batch-result-reason {
  flex: 1 1 auto;
  font-weight: 500;
  color: #111827;
}

/* 카운트 배지 (severity별 컬러) */
.batch-result-badge {
  flex-shrink: 0;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background-color: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
  line-height: 1.4;
}

/* Severity 매핑 */
.batch-result-group[data-severity="danger"] .batch-result-badge {
  background-color: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.batch-result-group[data-severity="warning"] .batch-result-badge {
  background-color: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}
.batch-result-group[data-severity="info"] .batch-result-badge {
  background-color: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.batch-result-group[data-severity="neutral"] .batch-result-badge {
  background-color: #f3f4f6;
  color: #4b5563;
  border-color: #e5e7eb;
}

/* 항목 영역 — 칩(pill) wrap */
.batch-result-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0.75rem 0.875rem;
  background-color: #f9fafb;
  max-height: 14rem;
  overflow-y: auto;
}

.batch-result-item {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.5rem;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  color: #374151;
  white-space: nowrap;
  line-height: 1.4;
}

/* 스크롤바 — items 영역 (subtle) */
.batch-result-items::-webkit-scrollbar {
  width: 6px;
}
.batch-result-items::-webkit-scrollbar-thumb {
  background-color: #d1d5db;
  border-radius: 3px;
}
.batch-result-items::-webkit-scrollbar-track {
  background-color: transparent;
}

/* 모바일/좁은 모달 대응 */
@media (max-width: 480px) {
  .batch-result-summary {
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
  }
  .batch-result-items {
    max-height: 12rem;
  }
}