.screen-page .card {
  box-shadow: none;
  min-width: 0;
}

.screen-page .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.screen-page .card-title {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
}

.screen-page .card-header > .card-tools {
  margin-left: auto;
  max-width: 100%;
}
.screen-page .card-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.screen-page .card-tools > .d-flex {
  min-width: 0;
}

.screen-split-col,
.screen-fill-col {
  min-width: 0;
}

.screen-split-col > .card,
.screen-fill-col > .card,
.screen-fill-col > .screen-fill-card,
.screen-split-col > .screen-fill-card {
  width: 100%;
  min-width: 0;
}

.screen-fill-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.screen-fill-card > .card-body {
  flex: 1 1 auto;
  min-width: 0;
}

.screen-min-h-650 {
  min-height: 650px;
}

.screen-min-h-620 {
  min-height: 620px;
}

.screen-grid-wrap {
  min-height: 520px;
}

.screen-scroll-body {
  max-height: calc(100vh - 250px);
  overflow-y: auto;
}

.screen-section-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: none;
}

.screen-section-card > .card-header {
  background-color: #f8f9fa;
}

.screen-footer-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.screen-tree-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.screen-tree-panel {
  flex: 1 1 auto;
  overflow-y: auto;
  min-width: 0;
}

/* 메뉴관리 좌측 트리: footer 근처까지 높이를 확보하고 트리 영역만 세로 스크롤 처리 */
.screen-menu-tree-card {
  height: calc(100vh - 145px);
  max-height: none;
  margin-bottom: 0.75rem;
}

.screen-menu-tree-card > .card-body.screen-tree-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.screen-menu-tree-card .screen-tree-panel {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: auto;
  padding-right: 0.25rem;
}

@media (max-width: 767.98px) {
  .screen-menu-tree-card {
    height: auto;
    max-height: none;
  }

  .screen-menu-tree-card > .card-body.screen-tree-body {
    max-height: 520px;
    overflow: hidden;
  }
}

.screen-btn-toolbar {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.screen-footer-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: #eef2f7;
  border-top: 1px solid #d7dee8;
}

.screen-footer-left,
.screen-footer-right {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.screen-footer-right {
  margin-left: auto;
  justify-content: flex-end;
}

@media (max-width: 767.98px) {
  .screen-scroll-body {
    max-height: none;
    overflow: visible;
  }

  .screen-min-h-650,
  .screen-grid-wrap {
    min-height: auto;
  }

  .screen-page .card-header {
    align-items: flex-start;
  }

  .screen-page .card-tools,
  .screen-btn-toolbar,
  .screen-footer-left,
  .screen-footer-right {
    width: 100%;
    justify-content: flex-start;
  }

  .screen-footer-right {
    margin-left: 0;
  }
}

.screen-page .card-footer {
  background: #f4f6f9;
  border-top: 1px solid #dee2e6;
}

.screen-page .screen-footer-split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #eef2f7;
  border-top: 1px solid #d8dee6;
}

.screen-page .screen-footer-left,
.screen-page .screen-footer-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* pagination footer 중앙 정렬 */
.screen-page .card-footer .tui-pagination,
.screen-page .card-footer #pagination,
.screen-page .card-footer [id$="Pagination"] {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* split footer 안에 pagination 들어간 경우도 중앙 정렬 */
.screen-page .screen-footer-split .tui-pagination,
.screen-page .screen-footer-split #pagination,
.screen-page .screen-footer-split [id$="Pagination"] {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

/* pagination wrapper가 하나 더 있어도 중앙 유지 */
.screen-page .card-footer .pagination,
.screen-page .card-footer .tui-pagination .tui-page-btn {
  vertical-align: middle;
}

.screen-page .screen-card-tools-inline {
  flex-wrap: nowrap;
}

.screen-page .screen-page-size-host {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0;
}

.screen-page .screen-page-size-host .view-count {
  width: auto;
  min-width: 118px;
}

.screen-page .screen-card-tools-inline > .screen-page-size-host,
.screen-page .screen-card-tools-inline > .screen-btn-toolbar {
  flex: 0 0 auto;
}

.screen-page .screen-card-tools-inline > .custom-file {
  width: 260px;
  min-width: 220px;
  flex: 0 0 260px;
  margin-bottom: 0;
}

.screen-page .screen-card-tools-inline > .custom-file .custom-file-label {
  margin-bottom: 0;
}

@media (max-width: 991.98px) {
  .screen-page .screen-card-tools-inline {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .screen-page .screen-card-tools-inline > .custom-file {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
    margin-right: 0 !important;
  }
}

.screen-auth-page {
  background-color: #f4f6f9;
}

.screen-auth-box-sm {
  width: 460px;
  max-width: 96%;
}

.screen-auth-box-lg {
  width: 720px;
  max-width: 96%;
}

.screen-auth-alert-hidden {
  display: none;
}

.screen-auth-alert-conditional-hidden {
  display: none;
}

.screen-auth-alert-sm {
  font-size: 0.8rem;
}

.screen-auth-submit {
  width: 100%;
}

.screen-auth-card {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.screen-auth-card-header {
  padding: 1.5rem 1.25rem 1.25rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.screen-auth-title-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  border-radius: 999px;
  color: #1f4e79;
  background: #e8f1ff;
}

.screen-auth-guide {
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  color: #495057;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  font-size: 0.875rem;
}

.screen-password-input-group .input-group-text {
  min-width: 38px;
  justify-content: center;
  color: #5f6b7a;
  background-color: #f8fafc;
}

.screen-password-input-group .toggle-password {
  min-width: 38px;
}

.screen-password-rule {
  margin-top: 0.45rem;
}

.tui-grid-row.screen-grid-selected-row td {
  background-color: #e8f1ff !important;
}

/* Bootstrap Switch를 form column 전체 폭으로 맞출 때 사용하는 공통 래퍼 */
.screen-switch-full,
.screen-option-switch-wrap {
  display: block;
  width: 100%;
  min-height: 31px;
}

.screen-switch-full .bootstrap-switch,
.screen-option-switch-wrap .bootstrap-switch {
  display: block;
  width: 100% !important;
  border-radius: 0.25rem;
}

.screen-switch-full .bootstrap-switch-container,
.screen-option-switch-wrap .bootstrap-switch-container {
  width: 150% !important;
}

.screen-switch-full .bootstrap-switch-handle-on,
.screen-switch-full .bootstrap-switch-handle-off,
.screen-option-switch-wrap .bootstrap-switch-handle-on,
.screen-option-switch-wrap .bootstrap-switch-handle-off {
  width: 50% !important;
}

.screen-switch-full .bootstrap-switch-label,
.screen-option-switch-wrap .bootstrap-switch-label {
  width: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}



/* 목록 카드 내부 검색영역: 원가현황관리와 동일하게 Grid 바로 위에 배치 */
.screen-search-inline-wrap {
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  background: #f8f9fa;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
}

.screen-search-list-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.screen-list-grid-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.screen-list-grid-body > div[id$="Grid"] {
  height: 100%;
}

@media (max-width: 767.98px) {
  .screen-search-list-body {
    display: block;
    overflow: visible;
  }

  .screen-list-grid-body {
    height: 420px;
  }
}

/* 260901_09 목록카드 높이/여백 공통 기준
 * 기준 화면: 기간/마감관리 > 기간/마감 목록
 * 단독 primary 목록카드만 reference height를 사용하고, 복합 화면의 목록카드는 기존 자연 높이를 유지한다. */
:root {
  --erp-reference-list-card-height: calc(100vh - 250px);
  --erp-reference-list-card-min-height: 690px;
  --erp-list-grid-card-gap: 12px;
}

/* 2026-06-18 화면 생성 규칙: 좌측 목록 카드 + 우측 상세/하위 리스트 카드 */
.screen-two-pane-row {
  align-items: stretch;
}

.screen-fill-col > .screen-two-pane-list-card:only-child {
  height: var(--erp-reference-list-card-height);
  min-height: var(--erp-reference-list-card-min-height);
  overflow: hidden;
}

.screen-fill-col > .screen-two-pane-detail-card:only-child {
  height: auto;
  min-height: 0;
  overflow: visible;
}

.screen-fill-col > .screen-two-pane-list-card:not(:only-child),
.screen-fill-col > .screen-two-pane-detail-card:not(:only-child) {
  height: auto;
  min-height: 0;
}

.screen-two-pane-list-card > .card-body,
.screen-two-pane-detail-card > .card-body {
  min-height: 0;
}

.screen-two-pane-list-grid {
  flex: 1 1 auto;
  min-height: 360px;
  overflow: hidden;
}

.screen-two-pane-list-grid > div[id$="Grid"] {
  height: 100%;
}

.screen-two-pane-sub-grid {
  height: 260px;
  min-height: 220px;
}

.screen-two-pane-sub-grid-sm {
  height: 205px;
  min-height: 180px;
}

.screen-pagination-center,
.screen-page .screen-pagination-center,
.screen-page .card-footer.screen-pagination-center {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.screen-pagination-center .tui-pagination,
.screen-pagination-center [id$="Pagination"],
.screen-pagination-center #pagination {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
}

.screen-readonly-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.85rem;
}

@media (min-width: 992px) {
  .screen-readonly-summary.screen-readonly-summary-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.screen-readonly-summary .summary-item {
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid #e3e8ef;
  border-radius: 0.45rem;
  background: #f8fafc;
}

.screen-readonly-summary .summary-label {
  display: block;
  margin-bottom: 0.15rem;
  color: #6c757d;
  font-size: 0.76rem;
  font-weight: 700;
}

.screen-readonly-summary .summary-value {
  display: block;
  color: #263238;
  font-size: 0.88rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 991.98px) {
  .screen-fill-col > .screen-two-pane-list-card:only-child {
    height: auto;
    min-height: 0;
  }

  .screen-fill-col > .screen-two-pane-detail-card:only-child {
    height: auto;
    min-height: 0;
  }
}

@media (max-width: 767.98px) {
  .screen-readonly-summary {
    grid-template-columns: 1fr;
  }

  .screen-two-pane-list-grid,
  .screen-two-pane-sub-grid,
  .screen-two-pane-sub-grid-sm {
    height: 420px;
  }
}


/* 2026-06-18 18차 보정: 참고 화면(card-footer/pagination/detail grid) 기준 직접 적용 */
.screen-search-inline-wrap > .row {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.screen-search-inline-wrap > .row > [class*="col-"] {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.screen-two-pane-detail-card > .card-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.screen-two-pane-detail-card .screen-section-card {
  flex: 0 0 auto;
}

.screen-two-pane-detail-card .screen-detail-grid-card {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.screen-two-pane-detail-card .screen-detail-grid-card > .card-body {
  flex: 1 1 auto;
  min-height: 0;
}

.screen-two-pane-detail-card .screen-detail-grid-card .screen-two-pane-sub-grid,
.screen-two-pane-detail-card .screen-detail-grid-card .screen-two-pane-sub-grid-sm {
  height: 100%;
  min-height: 280px;
}

.screen-page .card-footer.clearfix.screen-footer-split > .tui-pagination,
.screen-page .card-footer.clearfix.screen-footer-split > [id$="Pagination"],
.screen-page .card-footer.clearfix.screen-footer-split > #pagination {
  margin: 0 auto;
}


/* 2026-06-29 13차 보정: 현황/요약 영역 공통 카드 패턴 */
.erp-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: #102a4c;
  font-size: 0.82rem;
  font-weight: 800;
}

.erp-summary-head small,
.erp-summary-head .summary-sub-text {
  color: #6c757d;
  font-size: 0.73rem;
  font-weight: 600;
}

.erp-summary-card-wrap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.erp-summary-card-wrap.erp-summary-card-wrap-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.erp-summary-card {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 66px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #dde5ef;
  border-radius: 10px;
  background: #fff;
  color: #263238;
  text-align: left;
}

button.erp-summary-card {
  cursor: pointer;
}

button.erp-summary-card:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.erp-summary-card .summary-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #eef4ff;
  color: #2356a6;
  font-size: 0.82rem;
}

.erp-summary-card .summary-label {
  display: block;
  color: #6c757d;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.15;
}

.erp-summary-card strong {
  display: block;
  color: #263238;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-summary-card small {
  display: block;
  color: #7a869a;
  font-size: 0.68rem;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-summary-card.info {
  border-color: #bdd2ee;
  background: #f2f7ff;
}

.erp-summary-card.info .summary-icon {
  background: #e4efff;
  color: #2356a6;
}

.erp-summary-card.success {
  border-color: #c3e6cb;
  background: #f3fbf5;
}

.erp-summary-card.success .summary-icon {
  background: #e2f5e8;
  color: #11724a;
}

.erp-summary-card.warning {
  border-color: #f1d1a8;
  background: #fff9f1;
}

.erp-summary-card.warning .summary-icon {
  background: #fff0d7;
  color: #b65f16;
}

.erp-summary-card.danger {
  border-color: #f5c6cb;
  background: #fff5f6;
}

.erp-summary-card.danger .summary-icon {
  background: #fdebed;
  color: #b4232c;
}

.erp-summary-card.muted {
  border-color: #e3e8ef;
  background: #f8fafc;
}

.erp-summary-card.muted .summary-icon {
  background: #eef2f7;
  color: #526071;
}

@media (max-width: 1200px) {
  .erp-summary-card-wrap,
  .erp-summary-card-wrap.erp-summary-card-wrap-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .erp-summary-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .erp-summary-card-wrap,
  .erp-summary-card-wrap.erp-summary-card-wrap-5 {
    grid-template-columns: 1fr;
  }
}


/* 2026-07-22 07차: 기존 two-pane 화면도 형제 카드가 없는 경우에만 높이 정책을 적용한다. */
.screen-fill-col > .screen-two-pane-detail-card:only-child > .card-body {
  flex: 0 0 auto;
  max-height: none;
  overflow: visible;
}

.screen-fill-col > .screen-two-pane-detail-card:only-child .screen-detail-grid-card {
  flex: 0 0 auto;
}

.screen-fill-col > .screen-two-pane-detail-card:only-child .screen-detail-grid-card .screen-two-pane-sub-grid,
.screen-fill-col > .screen-two-pane-detail-card:only-child .screen-detail-grid-card .screen-two-pane-sub-grid-sm {
  height: 320px;
  min-height: 240px;
}

.screen-fill-col > .screen-two-pane-list-card:not(:only-child) .screen-list-grid-body,
.screen-fill-col > .screen-two-pane-detail-card:not(:only-child) .screen-detail-grid-card {
  flex: 0 0 auto;
}

/* 2026-07-22 06차: 단독 목록/상세 카드 높이 정책
 * 같은 부모 아래에 다른 형제 요소가 이어지는 화면에는 적용하지 않는다. */
.screen-standalone-list-card:only-child {
  height: var(--erp-reference-list-card-height);
  min-height: var(--erp-reference-list-card-min-height);
  overflow: hidden;
}

.screen-standalone-list-card:only-child > .card-body {
  min-height: 0;
}

.screen-standalone-list-card:only-child > .card-body.screen-search-list-body {
  overflow: hidden;
}

.screen-standalone-detail-card:only-child {
  height: auto;
  min-height: 0;
  overflow: visible;
}

.screen-standalone-detail-card:only-child > .card-body {
  flex: 0 0 auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

.screen-standalone-detail-card:only-child > .card-footer {
  position: relative;
  z-index: 1;
}

.screen-standalone-list-card:not(:only-child),
.screen-standalone-detail-card:not(:only-child) {
  height: auto;
  min-height: 0;
  overflow: visible;
}

.screen-standalone-list-card:not(:only-child) .screen-list-grid-body {
  flex: 0 0 auto;
  height: auto;
  min-height: 320px;
  overflow: hidden;
}

@media (max-width: 991.98px) {
  .screen-standalone-list-card:only-child {
    height: auto;
    min-height: 0;
  }
}

@media (max-width: 767.98px) {
  .screen-standalone-list-card:only-child {
    min-height: auto;
  }

  .screen-standalone-list-card:only-child .screen-list-grid-body {
    height: 560px;
    min-height: 420px;
  }
}

/* 260727_03 신규/수정 모달 공통 구조: 조회영역과 입력 성격별 카드 구분 */
.erp-footer-modal .erp-modal-search-card > .card-header,
.erp-footer-modal .erp-modal-section-card > .card-header { background:#f8f9fa; border-bottom:1px solid #dee2e6; }
.erp-footer-modal .erp-modal-search-card .input-group.input-group-sm,
.erp-footer-modal .erp-modal-section-card .input-group.input-group-sm { width:100%; }
.erp-footer-modal .erp-modal-section-card label { font-size:.8125rem; margin-bottom:.25rem; font-weight:600; }
.erp-footer-modal .erp-modal-section-card textarea.form-control { min-height:72px; resize:vertical; }

/* 260727_03 inventory valuation/modal standard */
#inventoryValuationGrid .tui-grid-row-selected td,
#inventoryValuationGrid .selected-valuation-row td {
  background: #eaf2ff !important;
}
.erp-modal-search-card .input-group-sm > .form-control,
.erp-modal-section-card .input-group-sm > .form-control {
  min-height: 31px;
}
.erp-modal-search-card .card-header,
.erp-modal-section-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}


/* Production detail grouping: quantity/status summaries must not be flat fields. */
.production-detail-section {
  margin-bottom: 1rem;
  padding: 0.85rem;
  border: 1px solid #dce3ec;
  border-radius: 0.55rem;
  background: #fff;
}

.production-detail-section-title {
  display: flex;
  align-items: center;
  margin: 0 0 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #edf1f5;
  color: #34495e;
  font-size: 0.82rem;
  font-weight: 700;
}

.production-flow-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.production-flow-summary > div {
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid #dce3ec;
  border-radius: 0.5rem;
  background: #f8fafc;
}

.production-flow-summary small {
  display: block;
  overflow: hidden;
  color: #6c757d;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-flow-summary strong {
  display: block;
  margin-top: 0.15rem;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-flow-summary.production-flow-summary-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 767.98px) {
  .production-flow-summary,
  .production-flow-summary.production-flow-summary-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 260901_05 연차관리 메인 목록 공통화: 전자결재 목록과 유사한 가시 높이 */
.screen-page .annual-leave-common-list-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.screen-page .annual-leave-common-list-card > .card-header,
.screen-page .annual-leave-common-list-card > .card-footer {
  flex: 0 0 auto;
}

.screen-page .annual-leave-common-list-card > .card-body.screen-search-list-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.screen-page .annual-leave-common-list-card .screen-list-grid-body {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  overflow: hidden;
}

.screen-page .annual-leave-common-list-card .screen-list-grid-body > div[id$="Grid"] {
  height: 100% !important;
  min-height: 0 !important;
}

@media (max-width: 991.98px) {
  .screen-page .annual-leave-common-list-card .screen-list-grid-body {
    min-height: 320px;
  }
}


/* annual-leave main list card: legacy per-screen fixed heights must not override the common card */
.screen-page .annual-leave-common-list-card.screen-reference-list-card > .card-body.screen-search-list-body {
  height: auto !important;
  max-height: none !important;
}
.screen-page .annual-leave-common-list-card.screen-reference-list-card .policy-list-grid-wrap,
.screen-page .annual-leave-common-list-card.screen-reference-list-card .holiday-list-grid-wrap,
.screen-page .annual-leave-common-list-card.screen-reference-list-card .apply-list-grid-wrap {
  height: 100% !important;
  min-height: 0 !important;
}

/* 260901_09 목록 Grid 공통 높이/여백 계약
 * 260901_08의 모든 card Grid 520px 강제는 제거한다.
 * 실제 목록 Grid(.screen-list-grid-body)만 대상으로 하고, primary 단독 목록카드만 기간/마감관리 높이를 채운다. */
.screen-page .screen-card-with-list-grid > .screen-list-card-body-grid-gap {
  padding-bottom: var(--erp-list-grid-card-gap) !important;
}

.screen-page .screen-list-card-grid-shell {
  margin-bottom: 0 !important;
}

.screen-page .screen-reference-list-card {
  display: flex;
  flex-direction: column;
}

.screen-page .screen-reference-list-card > .card-header,
.screen-page .screen-reference-list-card > .card-footer {
  flex: 0 0 auto;
}

.screen-page .screen-reference-list-card > .card-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.screen-page .screen-reference-list-grid-shell {
  flex: 1 1 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
}

.screen-page .screen-reference-list-grid-host {
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden;
}

/* 복합/하위 목록카드는 기존 화면의 명시적 높이를 유지하며, 공통 정책은 여백만 12px로 제한한다.
 * 단, 상세 탭의 내용이 Grid 목록 하나뿐인 screen-tab-list-only는 260902_05부터 primary 목록 높이를 사용한다. */
.screen-page .screen-card-with-list-grid:not(.screen-reference-list-card) .screen-list-card-grid-host {
  max-height: none;
}

/* 260902_05 상세 탭 순수 목록 공통 높이
 * input/form/상세 + 목록 혼합 탭은 이 class를 부여하지 않는다. */
.screen-page .screen-tab-list-only[data-erp-tab-list-height="reference"] {
  height: var(--erp-reference-list-card-height);
  min-height: var(--erp-reference-list-card-min-height);
  overflow: hidden;
}

.screen-page .screen-tab-list-only[data-erp-tab-list-height="reference"].show.active {
  display: flex;
  flex-direction: column;
}

.screen-page .screen-tab-list-only[data-erp-tab-list-height="reference"] > .card,
.screen-page .screen-tab-list-only[data-erp-tab-list-height="reference"] > .screen-tab-list-grid-shell {
  flex: 1 1 auto;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin-bottom: 0 !important;
  overflow: hidden;
}

.screen-page .screen-tab-list-only[data-erp-tab-list-height="reference"] > .card {
  display: flex;
  flex-direction: column;
}

.screen-page .screen-tab-list-only[data-erp-tab-list-height="reference"] > .card > .card-header,
.screen-page .screen-tab-list-only[data-erp-tab-list-height="reference"] > .card > .card-footer {
  flex: 0 0 auto;
}

.screen-page .screen-tab-list-only[data-erp-tab-list-height="reference"] > .card > .card-body,
.screen-page .screen-tab-list-only[data-erp-tab-list-height="reference"] .screen-list-grid-body,
.screen-page .screen-tab-list-only[data-erp-tab-list-height="reference"] .screen-tab-list-grid-shell {
  flex: 1 1 auto;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
}

.screen-page .screen-tab-list-only[data-erp-tab-list-height="reference"] .screen-tab-list-grid-host {
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden;
}

@media (max-width: 767.98px) {
  .screen-page .screen-tab-list-only[data-erp-tab-list-height="reference"] {
    height: 420px;
    min-height: 420px;
  }

  .screen-page .screen-reference-list-grid-shell {
    height: 420px !important;
    min-height: 420px !important;
    flex: 0 0 420px !important;
  }
}
