/****************************************************************/
/* 공통영역
/****************************************************************/

html {
  font-size: 14px;
}

body { -webkit-text-size-adjust: none; }
body .container { max-width: 1500px; }
body .main { width: 1500px; }

/* 스크롤바 CSS */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background-color: lightgray;
  border-radius: 10px;
  background-clip: padding-box;
  border: 2px solid transparent;
}

::-webkit-scrollbar-track {
  background-color: transparent;
}

/* CSS for Bootstrap 5 Fixed Left Sidebar Navigation */
@media (max-width: 1919.98px) {
  body {
    padding-top: 65px;
    padding-left: 0;
    padding-right: 0;
  }

  /* 상단 네비 모드: body에서 이미 보정하므로 main은 추가 패딩 불필요 */
  .app-content {
    padding-top: 0;
  }

  /* footer 내용 폭을 '너무 가운데/너무 끝' 둘 다 아니게 조절 */
  .footer-inner{
    max-width: 1500px;   /* 현재 body 안에서 1500을 쓰고 있으니 일단 동일 */
    margin: 0 auto;
    padding-left: 24px;  /* 작은 화면에서 끝에 붙지 않게 */
    padding-right: 24px;
  }
}

@media (min-width: 1920px) {
  body {
    padding-left: 240px; /* 300 → 240 (빈공간 줄이기) */
    padding-right: 40px; /* 60 → 40 */
    padding-top: 0;
  }

  /* 좌측 사이드바 모드: 상단 여백 최소 */
  .app-content {
    padding-top: 16px;
  }

  /* footer 배경/보더를 화면 좌우 끝까지 확장 */
  .app-footer {
    margin-left: -240px;   /* body padding-left와 동일 */
    margin-right: -40px;   /* body padding-right와 동일 */
  }

  /* footer 내용은 다시 본문 정렬로 되돌림 */
  .app-footer > .container-fluid {
    padding-left: 240px;
    padding-right: 40px;
  }

  /* footer-inner는 별도 폭 제한 없이 본문 흐름 */
  .footer-inner {
    max-width: none;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
  }

  nav.navbar {
    position: fixed;
    left: 0;
    width: 200px;
    bottom: 0;
    top: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: block;
    border-right: 1px solid #cecece;
  }
  nav.navbar > .container-fluid {
    flex-direction: column;
    padding: 0;
  }
  nav.navbar .navbar-nav {
    flex-direction: column;
    width: 100%;
  }
  nav.navbar .navbar-collapse {
    width: 100%;
    padding-left: 50px;
    padding-top: 30px;
  }
}

/* 네비게이션바 hover 및 현재 메뉴 하이라이트 처리 */
.ci, .nav-link:hover {
  color: #02b3bb;
  font-weight: bold;
}

.flex-container {
  display: flex;
  flex-wrap: wrap;
}

/* 공통 페이지 헤더 */
.page-header {
  border-bottom: 1px solid #dee2e6;
  padding-bottom: .5rem;
  margin-bottom: 1rem;
}

.page-header .page-title {
  font-size: 1.25rem; /* 대략 fs-5 정도 */
  font-weight: 600;
  margin: 0;
}

/* 선택상자 div의 스타일을 정의 */
.styled-radio {
  margin-right: 2px;
  width: 30px;
  height: 30px;
  border: 1px solid gray;
}

/* 보이지 않는 radio의 스타일을 정의 */
.invisible-radio {
  position: absolute;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
  clip: rect(1px, 1px, 1px, 1px);
}

/* 체크된 invisible-radio 인접 label에 속한 styled-radio 에는 새로운 content를 추가 */
.invisible-radio:checked + label .styled-radio::after {
  content: '✓';
  font-size: 1em;
  display: inline-block;
  box-sizing: border-box;
  padding-left: 10px;
  width: 10px;
  text-align: center;
}

/* 체크 안된 invisible-radio 인접 label은 손모양 커서로 변경 */
.invisible-radio:not(:checked) + label {
  cursor: pointer;
}

/* 체크 안된 invisible-radio 인접 label에 mouse over 하면 styled-radio의 투명도를 0.7로 세팅 */
.invisible-radio:not(:checked) + label:hover .styled-radio {
  opacity: 0.7;
}

/* 체크 안된 invisible-radio 인접 label에 mouse over 하면 label에 속한 module_box의 투명도를 0.7로 변경 */
.invisible-radio:not(:checked) + label:hover .module_box {
  opacity: 0.7;
}

/* 체크된 invisible-radio 인접 label에 속한 module_box의 바깥 테두리를 빨간색으로 변경 */
.invisible-radio:checked + label .module_box {
  outline: 3px solid red;
  /* color: blue; */
}

/* 근무모듈 div의 스타일 정의 */
.module_box {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  border: 0.5px solid gray;
  width: 30px;
  height: 30px;
  margin: 0 auto;     /* div 가운데 정렬 */
}

.module_box-disabled {
  width: 30px;
  height: 30px;
  margin: 0 auto;     /* div 가운데 정렬 */
  background-color: #ebebeb;
}

/* 근무모듈에서 근무종류에 따라 셀렉트박스를 비활성화하기 위한 CSS */
select[readonly] {
  background-color: #ddd;
  pointer-events: none;
}

/****************************************************************/
/* TODAY
/****************************************************************/

/* 중립 컬럼 – 기본 헤더톤보다 살짝만 진한 회색 */
.mm-hdr-gray  {
  background: #E9ECEF !important;  /* 밝은 회색 */
  color: #343A40 !important;       /* 진한 회색 텍스트 */
}

/* 지각/조퇴 – 브라운 대신 살짝 누른 살구/오렌지 톤 */
.mm-hdr-brown {
  background: #FBE5D6 !important;  /* 아주 연한 살구색 */
  color: #8A3C1C !important;       /* 기존 브라운보다 한 톤 밝은 갈색 */
}

/* 연장/휴일 – 브랜드 티얼(#02b3bb)에서 많이 희석한 톤 */
.mm-hdr-blue  {
  background: #E0F4F6 !important;  /* 티얼을 많이 섞은 연한 파랑/민트 */
  color: #05636A !important;       /* #02b3bb보다 살짝 어두운 텍스트 */
}

/* TODAY, 근무로그 등 일 캘린더 스타일 */
.uniTodayDate {
  border: 0;
  width: 200px;
}

.uniTodayDatePicker {
  border: none;
  width: 28px;
  max-height: 30px;
}

/* Mobile - Landscape */
@media (max-width: 1000px) {
  .uniTodayDatePicker {
    border: none;
    width: 150px;
    max-height: 30px;
  }
}

.uniTodayDatePicker::-webkit-datetime-edit-text {
  -webkit-appearance: none;
  display: none;
}

.uniTodayDatePicker::-webkit-datetime-edit-year-field {
  -webkit-appearance: none;
  display: none;
}
.uniTodayDatePicker::-webkit-datetime-edit-month-field{
  -webkit-appearance: none;
  display: none;
}
.uniTodayDatePicker::-webkit-datetime-edit-day-field {
  -webkit-appearance: none;
  display: none;
}

/**************************************************************/
/* TODAY index 전용 – 부서 카드 + 상세 테이블 */
/**************************************************************/

.index-page {
  font-size: 0.9rem;
}

/* 부서 카드 */
.index-dept-card {
  border-radius: 0.9rem;
  border: 1px solid #dde3ec;
  box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.04);
}

/* 카드 헤더 – 살짝 티얼톤 */
.index-dept-card-header {
  padding: 0.45rem 0.8rem;
  border-radius: 0.9rem 0.9rem 0 0;
  background: linear-gradient(135deg, #02b3bb, #00a0a7);
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.index-dept-name {
  font-size: 0.83rem;
  font-weight: 600;
}

.index-dept-counts {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.index-count-chip {
  border-radius: 999px;
  padding: 0.08rem 0.5rem;
  font-size: 0.7rem;
  background-color: rgba(255, 255, 255, 0.18);
  white-space: nowrap;
}

/* 카드 바디 */
.index-dept-card-body {
  padding: 0.3rem 0.8rem 0.5rem;
  max-height: none;
  overflow-y: visible;
}

/* 카드 안 테이블 */
.index-dept-table {
  font-size: 0.78rem;
}

.index-dept-table thead th {
  padding: 0.18rem 0.25rem;
  border: 0;
  border-bottom: 1px solid #e5e9ef;
  color: #6c757d;
  font-weight: 500;
  background-color: transparent;
}

.index-dept-table tbody td {
  padding: 0.18rem 0.25rem;
  border: 0;
  border-bottom: 1px solid #f0f2f6;
}

/* AM/PM 점 */
.index-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background-color: #e2e6ea;
}
.index-dot-on {
  background-color: #02b3bb;
}

/* 하단 상세 테이블 – 정보 밀도 높게 */
.index-att-table {
  font-size: 0.86rem;
  table-layout: auto;
}

.index-att-table th,
.index-att-table td {
  padding: 0.18rem 0.28rem;
  white-space: nowrap;
}

/* index 하단 상세 테이블 헤더 색상 */
.index-att-table thead th {
  background-color: #f5f5f5;   /* 기본 연한 회색 */
  color: #495057;
  font-weight: 600;
}

/* 부서 구분용 group-divider 행: 티얼 컬러 바 형태로 강조 */
.index-att-table .table-group-divider td {
  padding: 0;
  border: 0;
  line-height: 0;
}

/* 전체 폭을 채우는 컬러 바 */
.index-att-table .table-group-divider td::before {
  content: "";
  display: block;
  height: 1px;  /* 바 두께 – 4~8px 선에서 취향대로 조절 가능 */
  background: linear-gradient(
    to right,
    rgba(2, 179, 187, 0.2),
    rgba(2, 179, 187, 0.25),
    rgba(2, 179, 187, 0.2)
  );
}

/* hover 색 */
.index-att-table tbody tr:hover {
  background-color: #f2fbfc;
}

/* 오류 버튼: 행 높이 튀지 않도록 슬림하게 */
.index-att-table .att-error-btn {
  padding: 0.2rem 0.5rem;  /* 기본 btn-sm 보다 더 얇게 */
  font-size: 0.78rem;
  line-height: 1;
  margin: 0;                 /* 혹시 모를 여백 제거 */
}

/* 혹시 기본 align이 깨진 경우를 대비해 한 번 더 명시 */
.index-att-table td {
  vertical-align: middle;
}

/****************************************************************/
/* 근무표 (Schedule) - GRID 버전
/****************************************************************/

/* ====== Config ====== */
:root {
    --wtm-nav-h: 65px;         /* <1920 구간 상단 네비 높이 */
    --wtm-app-top: 0px;        /* >=1920 구간(사이드바 모드) 상단 여백 */
    --wtm-pagehdr-h: 52px;     /* '근무표' 제목 영역 높이 */
    --wtm-toolbar-h: 48px;     /* 툴바 높이 */

    --wtm-dept-w: 60px;
    --wtm-name-w: 60px;
    --wtm-day-w: 34px;
}

/* ====== UI bits ====== */
.roundtext {
    background-color: cyan;
    font-weight: bold;
    border-radius: 20px;
}

.next { opacity: 0.3; }

input[type="month"] {
    border: none;
    cursor: pointer;
}
input[type="month"]::-webkit-calendar-picker-indicator { cursor: pointer; }
input[type="month"]::-webkit-calendar-picker-indicator:hover { opacity: 0.5; }

.btn-hover {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
}
.btn-hover:hover {
    background: #ebebeb;
    border-radius: 50%;
}

/* ====== Layering (Bootstrap 기준) ======
   navbar fixed-top: 1030
   toolbar: 1020 (navbar/드롭다운 아래로)
   grid header: 1015
   left sticky(body): 1010
   left sticky(header): 1018
*/
.schedule-toolbar.sticky-top {
    background: #fff;
    min-height: var(--wtm-toolbar-h);
    z-index: 1020;
    margin-bottom: 0 !important; /* mb-3로 생기는 “빈 띠” 방지 */
}

/* ====== GRID base ====== */
.schedule-grid {
    font-size: 0.86rem;
    width: max-content; /* 페이지 전체 가로 스크롤(내부 스크롤 X) */
    --wtm-pad-x: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
    padding-left: var(--wtm-pad-x);
    padding-right: var(--wtm-pad-x);
}

.schedule-grid-row {
    display: grid;
    grid-template-columns: var(--wtm-cols);
    align-items: stretch;
}

.schedule-grid-cell {
    text-align: center;
    padding: 2px 1px;
    vertical-align: middle;
}

/* 좌측 2칸(부서/성명) 공통 */
.schedule-grid-cell.left1,
.schedule-grid-cell.left2 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #fff;
    background-clip: padding-box;
    display: flex;
    align-items: center;      /* 세로 가운데 */
    justify-content: center;  /* 기존처럼 가로도 가운데 유지 */
}

/* ====== Sticky left (가로 스크롤 시 부서/성명 고정) ====== */
.schedule-grid-cell.left1 {
    position: sticky;
    left: 0;
    z-index: 1010;
}
.schedule-grid-cell.left2 {
    position: sticky;
    left: var(--wtm-dept-w);
    z-index: 1010;
    box-shadow: 1px 0 0 #dee2e6;
}

/* ====== Sticky header (세로 스크롤 시 날짜 헤더 고정) ====== */
.schedule-grid-header {
    position: sticky;
    z-index: 1015;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
}

/* 헤더 셀은 항상 흰배경 */
.schedule-grid-row-head .schedule-grid-cell {
    background: #fff;
    font-weight: 600;
}

/* 헤더의 좌측 2칸은 더 위로 */
.schedule-grid-row-head .schedule-grid-cell.left1,
.schedule-grid-row-head .schedule-grid-cell.left2,
.schedule-grid-row-head .schedule-grid-cell.head.left1,
.schedule-grid-row-head .schedule-grid-cell.head.left2 {
    position: sticky;
    background: #fff;
    z-index: 1018;
}
.schedule-grid-row-head .schedule-grid-cell.head.left1 { left: 0; }
.schedule-grid-row-head .schedule-grid-cell.head.left2 { left: var(--wtm-dept-w); }

/* ====== Hover (비침 방지: 불투명) ====== */
.schedule-grid-row-data:hover .schedule-grid-cell.day {
    background-color: #f2f2f2;
}
.schedule-grid-row-data:hover .schedule-grid-cell.left1,
.schedule-grid-row-data:hover .schedule-grid-cell.left2 {
    background-color: #f2f2f2;
}

/* 오늘 칸 강조 */
.schedule-grid-cell.day.is-today {
    background-color: #f2f2f2;
}

/* ====== Dept 구분선/여백 ====== */
.schedule-grid-divider-row .schedule-grid-divider {
    grid-column: 1 / -1;
    height: 1px;
    border-bottom: 1px solid #d3d3d3;
}
.schedule-grid-spacer-row .schedule-grid-spacer {
    grid-column: 1 / -1;
    height: 12px;
}

/* ====== Responsive offsets ====== */

/* <1920: 제목+툴바 fixed 2단 유지 (제목 위 / 날짜네비 아래) */
@media (max-width: 1919.98px) {

    .schedule-page {
        padding-top: calc(var(--wtm-pagehdr-h) + var(--wtm-toolbar-h) + 12px);
    }

    .schedule-page-header {
        position: fixed;
        left: 0;
        right: 0;
        top: calc(var(--wtm-nav-h) - 6px);
        height: calc(var(--wtm-pagehdr-h) + 6px);

        display: flex;
        align-items: center;

        background: #fff;
        z-index: 1025; /* toolbar(1020)보다 위, navbar(1030) 아래 */
        margin: 0 !important;
        padding: 0 12px;
        border-bottom: 1px solid #dee2e6;
    }

    .schedule-page-header .page-title {
        margin: 0;
    }

    .schedule-toolbar.sticky-top {
        position: fixed !important;
        left: 0;
        right: 0;
        top: calc(var(--wtm-nav-h) + var(--wtm-pagehdr-h));
        min-height: var(--wtm-toolbar-h);
        z-index: 1020;

        padding-left: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
        padding-right: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
    }

    .schedule-grid-header {
        top: calc(var(--wtm-nav-h) + var(--wtm-pagehdr-h) + var(--wtm-toolbar-h));
    }
}

/* >=1920: 사이드바/와이드 모드 */
@media (min-width: 1920px) {

    .schedule-page {
        padding-top: 0;
    }

    .schedule-toolbar.sticky-top {
        position: sticky !important;
        top: var(--wtm-app-top) !important;
    }

    .schedule-grid-header {
        top: calc(var(--wtm-app-top) + var(--wtm-toolbar-h));
    }
}

/* 주 경계(week-start) 세로선: border로 폭이 바뀌는 걸 피하려고 pseudo-element로 그림 */
.schedule-grid .schedule-grid-cell.day.week-start,
.schedule-grid .schedule-grid-cell.head.day.week-start {
  position: relative;
}

.schedule-grid .schedule-grid-cell.day.week-start::before,
.schedule-grid .schedule-grid-cell.head.day.week-start::before {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -1px;
  width: 0;
  border-left: 1px solid rgba(0, 0, 0, 0.18);
  pointer-events: none;
  z-index: 2; /* module_box 위로 올라오게 */
}



/****************************************************************/
/* 근무표 등록/수정 (Schedule Edit)
/****************************************************************/

/* 등록/수정 툴바 높이(월+버튼 1줄 + 모듈팔레트 1줄) */
:root {
    --wtm-editbar-h: 118px;   /* 필요 시 108~132 범위에서 “1회만” 조정 */
}

/* edit toolbar는 schedule-toolbar와 동일한 레이어 정책 */
.schedule-edit-toolbar.sticky-top {
    background: #fff;
    min-height: var(--wtm-editbar-h);
    z-index: 1020; /* navbar(1030)보다 낮게 */
    margin-bottom: 0 !important;
}

/* 모듈 팔레트: 가로 스크롤 */
.schedule-edit-toolbar .module-palette-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px; /* 스크롤바 공간 */
}

/* 팔레트 테이블을 “슬림”하게 */
.schedule-edit-toolbar .module-palette-table {
    border-collapse: separate;
    border-spacing: 6px 2px;
    margin: 0;
    width: max-content;   /* 모듈이 많으면 가로 스크롤 */
}

.schedule-edit-toolbar .module-palette-cell,
.schedule-edit-toolbar .module-palette-name {
    border: 0;
    padding: 0 !important;
    font-weight: normal;
    vertical-align: bottom;
    width: 50px;
}

.schedule-edit-toolbar .module-palette-names .module-palette-name {
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.9;
}

/* GRID 열 hover(기존 table의 is-hover 대체) */
.schedule-edit-grid .schedule-grid-cell.day.is-hover {
    background-color: #f2f2f2;
}

/* <1920: 제목 + 툴바 fixed 2단 (조회 화면과 동일한 UX) */
@media (max-width: 1919.98px) {
    .schedule-edit-page{
        padding-top: calc(var(--wtm-pagehdr-h) + var(--wtm-editbar-h) + 12px);
    }

    .schedule-edit-page-header{
        position: fixed;
        left: 0;
        right: 0;
        top: calc(var(--wtm-nav-h) - 6px);
        height: calc(var(--wtm-pagehdr-h) + 6px);

        display: flex;
        align-items: center;

        background: #fff;
        z-index: 1025;          /* 툴바(1020)보다 위, navbar(1030)보단 아래 */
        margin: 0 !important;
        padding: 0 12px;
        border-bottom: 1px solid #dee2e6;
    }

    .schedule-edit-page-header .page-title{
        margin: 0;
    }

    .schedule-edit-toolbar.sticky-top{
        position: fixed !important;
        left: 0;
        right: 0;
        top: calc(var(--wtm-nav-h) + var(--wtm-pagehdr-h));
        min-height: var(--wtm-editbar-h);

        margin: 0 !important;
        background: #fff;
        z-index: 1020;

        padding-left: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
        padding-right: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
    }

    .schedule-edit-page .schedule-grid-header {
        top: calc(var(--wtm-nav-h) + var(--wtm-pagehdr-h) + var(--wtm-editbar-h));
    }
}

/* >=1920: 사이드바/와이드 모드 */
@media (min-width: 1920px) {
    .schedule-edit-page{
        padding-top: 0;
    }

    .schedule-edit-toolbar.sticky-top{
        position: sticky !important;
        top: var(--wtm-app-top) !important;
    }

    .schedule-edit-page .schedule-grid-header {
        top: calc(var(--wtm-app-top) + var(--wtm-editbar-h));
    }
}

/****************************************************************/
/* 근무표 수정 모달 (modal_schedule.html)
/****************************************************************/

/* 모달 안에서만 적용되게 스코프 */
.schedule-modal .schedule-module-scroll {
    overflow-x: auto;                 /* 넘칠 때만 가로 스크롤 */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

/* 테이블은 “내용만큼” 넓어지게 해서 래퍼가 스크롤 담당 */
.schedule-modal .schedule-module-table {
    width: max-content;
    min-width: max-content !important;
    border-collapse: separate;
    border-spacing: 5px 0; /* 2~6px 사이에서 취향껏 */
}

/* th 폭은 기존 50px 유지(인라인 style 제거하고 싶으면 여기만 조정) */
.schedule-modal .schedule-module-th {
    width: 10px;
    font-weight: normal;
    white-space: nowrap;              /* 예상치 못한 줄바꿈 방지(줄바꿈은 <br>로만) */
}

/* 이름 줄(두 번째 row) 폰트 크기 */
.schedule-modal .schedule-module-name {
    font-size: 10px;
}

/****************************************************************/
/* 근태기록
/****************************************************************/

/********
 * 근태기록-월간집계(전체)
 ********/

.status-table-wrapper.table-responsive {
  overflow-x: hidden;   /* Bootstrap의 overflow-x:auto 덮어쓰기 */
}

.work-status-table {
  width: 100%;
  table-layout: fixed;     /* colgroup 기준으로 고정 배치 */
  font-size: 0.86rem;      /* 기본보다 살짝 작게 */
}

.work-status-table th,
.work-status-table td {
  padding: 0.25rem 0.4rem; /* 행 높이 줄이기 */
  white-space: nowrap;     /* 줄바꿈 방지 → 글자가 세로로 쌓이는 현상 막기 */
}

/* 헤더는 중앙 정렬 */
.work-status-table thead th {
  text-align: center;
  vertical-align: middle !important;
}

/********
/* 근태기록-월간집계(전체) 모바일 요약 테이블
 ********/

@media (max-width: 768px) {

  /* 모바일 요약 테이블은 화면폭에 맞춰 고정 배치 */
  .work-status-mobile-table {
    width: 100%;
    table-layout: fixed;
    font-size: 0.82rem;
  }

  .work-status-mobile-table th,
  .work-status-mobile-table td {
    padding: 0.22rem 0.28rem;
    vertical-align: middle;
  }

  .work-status-mobile-table thead {
    position: sticky;
    top: 65px;          /* fixed-top navbar 높이 */
    z-index: 30;
  }

  .work-status-mobile-table thead th {
    background: #f8f9fa;
    font-weight: 700;
    text-align: center;
  }

  /* 첫 칸(직원)만 줄바꿈 허용 */
  .work-status-mobile-table .ws-namecell {
    white-space: normal;
    text-align: left;
  }

  .work-status-mobile-table .ws-dept {
    display: block;
    font-size: 0.74rem;
    color: #6c757d;
  }

  .work-status-mobile-table .ws-name {
    display: block;
    font-size: 0.92rem;
    font-weight: 800;
  }

  /* 지표 셀은 줄바꿈 없이(2줄 구조는 div로 제어) */
  .work-status-mobile-table .ws-metric {
    white-space: nowrap;
    text-align: center;
    font-variant-numeric: tabular-nums;
  }

  .work-status-mobile-table .ws-bad  { color: #dc3545; font-weight: 800; }
  .work-status-mobile-table .ws-warn { color: #b45f06; font-weight: 800; }
  .work-status-mobile-table .ws-good { color: #05636A; font-weight: 800; }
}

/********
 * 근태기록-월간집계 - 지각/조퇴/연장/휴일 상세 테이블
 ********/

.metric-table-wrapper {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.metric-table-wrapper.table-responsive {
  overflow-x: hidden;   /* Bootstrap의 overflow-x:auto 덮어쓰기 */
}

.work-metric-table {
  width: 100%;
  table-layout: fixed;     /* colgroup 기준으로 강제 배치 */
  font-size: 0.86rem;      /* 전체 화면보다 한 단계 더 작게 */
}

.work-metric-table th,
.work-metric-table td {
  white-space: nowrap;      /* 줄바꿈 방지 */
}

/* 근태기록-월간집계 - 지각/조퇴/연장/휴일 상세 테이블 세로 가운데 정렬 */
.work-metric-table th {
  vertical-align: middle !important;
}

/* 버튼 그룹 전체 폭 줄이고 가운데 정렬 */
.metric-filter {
  max-width: 420px;   /* 원하는 만큼 조절 가능 (예: 360~480 사이) */
  margin: 0;
}

/* btn-group 자체를 flex 컨테이너로 */
.metric-filter.btn-group {
  display: flex;
  width: 100%;
}

/* 근태기록-월간집계 상단 필터 버튼: 슬림 + 동일 폭 */
.metric-filter.btn-group .btn {
  padding: 0.2rem 0.4rem;   /* 기본 btn-sm 보다 조금 더 작게 */
  font-size: 0.8rem;        /* 글자 크기도 살짝 줄이기 */

  flex: 0 0 80px;           /* 고정 폭(80px). 필요하면 80~100 조정 */
  text-align: center;       /* 글자 가운데 정렬 */
  white-space: nowrap;      /* 줄바꿈 방지 (연장근로, 휴일근로 깨지지 않게) */
}

/* 색상: #02b3bb로 통일 */
.metric-filter .btn-primary {
  background-color: #02b3bb;
  border-color: #02b3bb;
}

.metric-filter .btn-primary:hover,
.metric-filter .btn-primary:focus,
.metric-filter .btn-primary:active {
  background-color: #02a2a9; /* 약간 어둡게 (원하면 #02b3bb로 유지해도 됨) */
  border-color: #02a2a9;
}

.metric-filter .btn-outline-primary {
  color: #02b3bb;
  border-color: #02b3bb;
}

.metric-filter .btn-outline-primary:hover,
.metric-filter .btn-outline-primary:focus,
.metric-filter .btn-outline-primary:active {
  background-color: #02b3bb;
  border-color: #02b3bb;
  color: #ffffff;
}

/* export 슬롯 폭 고정: 버튼 유무와 관계없이 항상 같은 자리 */
.export-slot {
  min-width: 92px;        /* Excel 버튼 폭에 맞춰 조정(아이콘+텍스트 기준) */
  justify-content: flex-end;
  align-items: center;
}

/* 자리만 차지하고 화면에는 안 보이게 */
.export-placeholder {
  display: inline-block;
  width: 92px;
  height: 31px;           /* btn-sm 높이에 맞춰 조정 */
  visibility: hidden;
}

/********
/* 근태기록-월간집계(지표별) 모바일 요약 테이블
 ********/

@media (max-width: 768px) {

  /* 지표별 카드 */
  .metric-card {
    border-radius: 12px;
  }

  .metric-line {
      display: inline-flex;
      align-items: baseline;
      gap: 6px;              /* '지각'과 '2회' 간격 */
      line-height: 1.1;
      white-space: nowrap;   /* 줄바꿈 방지 */
  }

  .metric-label {
      font-size: 0.82rem;
      font-weight: 700;
      color: #495057;
      letter-spacing: -0.2px;
  }

  .metric-count {
      font-size: 0.92rem;
      font-weight: 900;
      color: #212529;
      letter-spacing: -0.2px;
  }

  .metric-total {
      font-size: 0.78rem;
      font-weight: 600;
      color: #6c757d;
      margin-top: 2px;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
  }

  .metric-chip {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #212529;
    font-weight: 700;
    padding: 0.35rem 0.45rem;
    font-variant-numeric: tabular-nums;
    border-radius: 999px;
  }
}

/****************************************************************/
/* 직원관리
/****************************************************************/

/* 정렬 버튼에 마우스 올렸을때 */
.sortable {
  cursor: pointer;
}

/* 1) 반응형 래퍼 */
.user-list-page .user-list-table-wrap {
  overflow-x: auto;
}

/* 2) 폰트/행높이: 근태기록 밀도 */
.user-list-page table.table {
  font-size: 0.86rem;
}

.user-list-page table.table th,
.user-list-page table.table td {
  padding: 0.25rem 0.4rem;
  white-space: nowrap;
  vertical-align: middle;
}

/* (B-1) 직원관리에서는 main 고정폭(1500px)을 풀어서, 화면 폭에 맞춰 테이블이 수축 가능하게 */
.user-list-page .main {
  width: 100% !important;
}

/* (B-2) 컬럼이 필요 이상으로 넓어지는 현상 방지 */
.user-list-page table.main {
  table-layout: fixed;
}

/* (B-3) 요일(월~일) 칸의 padding만 더 줄여서 전체 폭을 확 줄임 (7칸이라 효과 큼) */
.user-list-page table.main th:nth-child(n+10),
.user-list-page table.main td:nth-child(n+10) {
  padding-left: 0.12rem;
  padding-right: 0.12rem;
}

/* 3) 헤더 톤: table-primary/secondary */
/* 기본정보(파란 계열을 아주 연하게) */
.user-list-page thead th.table-primary {
  background: #eef6ff !important;
  color: #1f2d3d !important;
  border-bottom: 1px solid rgba(0,0,0,.08) !important;
}

/* 근로계약(회색 계열을 연하게) */
.user-list-page thead th.table-secondary {
  background: #f3f4f6 !important;
  color: #343a40 !important;
  border-bottom: 1px solid rgba(0,0,0,.08) !important;
}

/* 4) 2단 헤더(기본정보/근로계약)도 과하지 않게 */
/* 2단 그룹 헤더(기본정보/근로계약) 색상도 아래 컬럼헤더 톤과 맞춤 */
.user-list-page thead th[colspan="6"] {      /* 기본정보 */
  background: #eef6ff !important;
  color: #1f2d3d !important;
  font-weight: 700;
}

.user-list-page thead th[colspan="10"] {     /* 근로계약 */
  background: #f3f4f6 !important;
  color: #343a40 !important;
  font-weight: 700;
}

/* 5) hover: 근태기록 느낌으로 아주 연한 민트 */
.user-list-page tbody tr:hover {
  background-color: #f2fbfc;
}

/* 6) 근로모듈(.module_box)은 유지하되, '간격만' 줄이기 */
.user-list-page .module_box {
  margin: 0 auto;           /* 기존 유지 */
  /* width/height는 전역 30px 유지 */
  /* font-size/box는 전역 유지(원하면 여기서만 9px→8.5px 같은 미세 조정은 가능) */
}

.user-list-page .user-filter-card {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

@media (max-width: 768px) {
    .user-list-page .user-title-row {
        flex-wrap: nowrap;
        min-width: 0;
        gap: 6px;
    }

    .user-list-page .user-name {
        white-space: nowrap;
        flex: 0 0 auto;
    }

    /* 핵심: meta 영역이 남는 공간을 최대한 먹게 */
    .user-list-page .user-meta {
        min-width: 0;
        flex: 1 1 auto;
        overflow: hidden;
    }

    /* 하나 태그가 남는 공간을 거의 다 쓰게 */
    .user-list-page .meta-pill.meta-deptpos {
        display: inline-block;
        max-width: 100%;
        font-size: 0.72rem;
        line-height: 1.1;
        padding: 0.12rem 0.48rem;
        border-radius: 999px;
        border: 1px solid rgba(2,179,187,.20);
        background: rgba(2,179,187,.08);
        color: rgba(33,37,41,.65);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 1) 라벨이 잘리지 않도록: 관련 컨테이너는 overflow visible */
    .user-list-page .user-mobile-card,
    .user-list-page .user-mobile-card .card-body,
    .user-list-page .contract-week-row,
    .user-list-page .user-week-inline,
    .user-list-page .user-week-grid--compact,
    .user-list-page .user-week-grid--compact .week-item {
        overflow: visible;
    }

    /* 2) 근로계약(좌) + 모듈(우) 하단 정렬 */
    .user-list-page .contract-week-row {
        display: flex;
        justify-content: space-between;
        gap: 8px;
        align-items: flex-end;
    }

    /* 좌측 텍스트가 모듈 30px 라인에 딱 맞게(높이 늘지 않음) */
    .user-list-page .contract-info {
        display: flex;
        align-items: flex-end;
        height: 30px;        /* module_box 높이와 동일 */
        line-height: 1.1;    /* 자연스러운 텍스트 */
        white-space: nowrap;
    }

    /* 3) 7칸 모듈: 30px 고정 + 간격 최소 */
    .user-list-page .user-week-grid--compact {
        display: grid;
        grid-template-columns: repeat(7, 30px);
        gap: 1px; /* 더 타이트하게 */
        align-items: end;
    }

    /* week-item은 30x30 박스의 기준점(라벨은 위로 떠서 겹침) */
    .user-list-page .user-week-grid--compact .week-item {
        position: relative;
        width: 30px;
        height: 30px;
    }

    /* 기존 module_box(30x30)는 그대로 쓰되, grid에선 margin:auto 제거 */
    .user-list-page .user-week-grid--compact .module_box {
        margin: 0;
    }

    /* 4) 요일 라벨: "높이 증가 없이" 모듈 위에 겹쳐 표시 */
    .user-list-page .week-label-float {
        position: absolute;
        top: -11px;              /* 모듈 위로 살짝 */
        left: 50%;
        transform: translateX(-50%);
        font-size: 10px;
        line-height: 1;
        font-weight: 700;
        color: #6c757d;
        z-index: 5;              /* 안 보이는 문제의 핵심 해결 */
        pointer-events: none;
        white-space: nowrap;

        /* 배경을 깔아주면 근로계약 텍스트와 겹쳐도 읽힘(높이 증가 없음) */
        background: #fff;
        padding: 0 2px;
        border-radius: 6px;
    }
}

/****************************************************************/
/* 직원수정
/****************************************************************/

/* 근로계약 섹션 헤더(눈에 띄게) */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.04);
    margin-bottom: 10px;
}

.section-title {
    font-weight: 700;
    letter-spacing: -0.2px;
}

.section-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--bs-primary);
}

/* 카드 안에서 폼을 모바일처럼 1열로 */
.user-modify-page .user-form-stack {
    max-width: 520px;   /* 480~620 사이 취향 */
}

.user-modify-page .user-info-card {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

.user-modify-page table.contract-table {
    font-size: 0.86rem;
    width: 100%;
    table-layout: fixed;
}

.user-modify-page table.contract-table th,
.user-modify-page table.contract-table td {
    padding: 0.25rem 0.4rem;
    white-space: nowrap;
    vertical-align: middle;
}

/* 월~일 칸만 더 타이트하게
   컬럼 구성: [1 기준일][2 근로형태][3 근태확인][4~10 월~일][11 삭제]
*/
.user-modify-page table.contract-table th:nth-child(n+4):nth-child(-n+10),
.user-modify-page table.contract-table td:nth-child(n+4):nth-child(-n+10) {
    padding-left: 0.12rem;
    padding-right: 0.12rem;
}

.user-modify-page .module_box {
    margin: 0 auto;
}

.user-modify-page .user-action-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
}

.user-modify-page .user-action-bar .btn {
    width: auto;
}

/********
   모바일: 근로계약 카드
 ********/
@media (max-width: 768px) {
    .user-modify-page .user-title-row {
        flex-wrap: nowrap;
        min-width: 0;
        gap: 6px;
    }

    .user-modify-page .user-name {
        white-space: nowrap;
        flex: 0 0 auto;
        font-weight: 700;
        text-decoration: none;
    }

    /* 삭제 아이콘 pill: 클릭영역만 확보 + 라인 안정화 */
    .user-modify-page .contract-delete-pill {
        padding: 0.10rem 0.30rem;
        line-height: 1;
        border-radius: 999px;
    }
    .user-modify-page .contract-delete-pill svg {
        display: block;   /* baseline 흔들림 방지 */
    }
    /* borderless를 쓰고 있으면 안전하게 정의(이미 있으면 중복 무시됨) */
    .user-modify-page .borderless {
        border: 0 !important;
        background: transparent !important;
    }

    /* 라벨이 위로 뜨므로 overflow는 visible */
    .user-modify-page .user-mobile-card,
    .user-modify-page .user-mobile-card .card-body,
    .user-modify-page .contract-week-row,
    .user-modify-page .user-week-inline,
    .user-modify-page .user-week-grid--compact,
    .user-modify-page .user-week-grid--compact .week-item {
        overflow: visible;
    }

    /* 좌(칩) + 우(모듈) 하단 정렬 */
    .user-modify-page .contract-week-row {
        display: flex;
        justify-content: space-between;
        gap: 8px;
        align-items: flex-end;
    }

    /* 7칸 모듈: 30px 고정 + 간격 최소(우측 배치) */
    .user-modify-page .user-week-grid--compact {
        display: grid;
        grid-template-columns: repeat(7, 30px);
        gap: 1px;
        align-items: end;
    }

    .user-modify-page .user-week-grid--compact .week-item {
        position: relative;
        width: 30px;
        height: 30px;
    }

    .user-modify-page .user-week-grid--compact .module_box {
        margin: 0;
    }

    /* 요일 라벨을 “높이 증가 없이” 위에 겹쳐 올림 */
    .user-modify-page .week-label-float {
        position: absolute;
        top: -11px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 10px;
        line-height: 1;
        font-weight: 700;
        color: #6c757d;
        z-index: 5;
        pointer-events: none;
        white-space: nowrap;
        background: #fff;
        padding: 0 2px;
        border-radius: 6px;
    }
}

/****************************************************************/
/* 근로계약
/****************************************************************/

.contract-workday-wrapper {
  display: inline-block;
  flex-direction: column;  /* 위→아래로 ①선택, ②입력 */
  gap: 4px;                /* 두 박스 사이 간격 */
  align-items: flex-start; /* 내용 폭만큼만 사용 */
}

/* 선택/입력 각각의 외곽 박스 */
.contract-workday-section {
  display: block;
  width: 100%;               /* 두 박스 폭을 동일하게 */
  box-sizing: border-box;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 4px 6px;
  background-color: #ffffff;
}

/* 안쪽 테이블은 내용 폭만큼만 */
.contract-workday-section table {
  width: auto;                  /* Bootstrap .table 의 100% 덮어쓰기 */
  border-collapse: collapse;
  margin-bottom: 0;
}

/* 혹시 td 배경이 남아있을 경우 대비 */
.contract-workday-section td,
.contract-workday-section th {
  background-color: #ffffff;
}

/********
/* 근로계약 - 근로요일 입력 정렬(모듈박스 유지, CSS만)
 ********/

/* 테이블 간격을 spacing으로 제어 */
.contract-page .contract-workday-section table{
  border-collapse: separate;    /* spacing 적용을 위해 */
  border-spacing: 6px 2px;      /* ← 모듈 간 간격(가로/세로). 취향대로 4~8px */
  table-layout: fixed;
  width: auto;
  margin: 0;                    /* 현재는 왼쪽 정렬이 자연스러움 */
}

/* td padding 제거(bootstrap 영향 제거) */
.contract-page .contract-workday-section td{
  padding: 0 !important;
}

/* 좌측 라벨(①선택/②입력) 폭 고정 */
.contract-page .contract-workday-section td[rowspan="2"]{
  width: 80px !important;
  white-space: nowrap;
}

/* ①(60px)/②(50px) inline width를 CSS로 덮어써서 통일 */
.contract-page .contract-workday-section td:not([rowspan="2"]){
  width: 44px !important;     /* 42~46 사이에서 조절 */
}

/* label 기본 마진 제거(박스 위아래 흔들림 방지) */
.contract-page .contract-workday-section .form-label{
  margin: 0 !important;
}

/* 모듈명/요일 라벨 줄 */
.contract-page .contract-workday-section tr[style*="font-size: 10px"] td{
  font-size: 10px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/********
/* 근로계약 - 레이아웃 폭 통일(오른쪽 끝 정렬 안정화)
 ********/
.contract-page {
  --contract-w: 460px; /* 원하는 폭: 420~520 정도로 취향 조절 */
}

/* 이 페이지에서만 폭 통일 */
.contract-page .contract-fixed {
  width: var(--contract-w);
  max-width: 100%;
}

/* col-md-4가 잡아버리는 33% 폭을 “고정폭”으로 덮어쓰기 */
@media (min-width: 768px) {
  .contract-page .contract-fixed.col-md-4 {
    flex: 0 0 var(--contract-w);
    width: var(--contract-w);
    max-width: 100%;
  }
}

/* 근로요일 입력 박스도 같은 폭 안에서만 보이게 */
.contract-page .contract-fixed .contract-workday-wrapper,
.contract-page .contract-fixed .contract-workday-section {
  width: 100%;
}


/****************************************************************/
/* 설정
/****************************************************************/

/* 설정(부서/직위/...) 공통 폼: small이 input에 안 먹는 문제 해결 */
.settings-form,
.settings-form .table {
  font-size: 0.86rem;
}

.settings-form .form-control,
.settings-form .form-select,
.settings-form input,
.settings-form select,
.settings-form textarea {
  font-size: 0.86rem !important;
}

/* (선택) 컴팩트한 행 높이 */
.settings-form .form-control,
.settings-form .form-select {
  padding: 0.25rem 0.4rem;
  height: 30px;
}

/* (선택) 체크박스/라디오 정리 */
.settings-form .form-check-input {
  width: 0.95rem;
  height: 0.95rem;
}

/* 근로모듈 관리: 테이블 폰트/행 높이 컴팩트 */
.settings-table {
  font-size: 0.86rem;
}
.settings-table th,
.settings-table td {
  padding: 0.25rem 0.4rem;
  white-space: nowrap;
  vertical-align: middle;
}

/* 버튼/링크도 같이 축소(테이블 안에 있는 것만) */
.settings-table .btn {
  font-size: 0.86rem;
  padding: 0.2rem 0.4rem;
}
.settings-table a {
  font-size: 0.86rem;
}
