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

html {
  font-size: 14px;
}

body {
  -webkit-text-size-adjust: none; /* 폰트의 사이즈를 늘어나지 않도록 한다. */
  .container {
   max-width: 1500px;
   }
  .main {
   width: 1500px;
   }
}

/* 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;
  }
}

/* 스크롤바 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;
}

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

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

/* 선택상자 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;
}

/* 근무모듈 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;
}

/* 체크 안된 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; */
}

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

/* 테이블 헤더 고정을 위한 css */
.div-sticky-h { height: 85vh; width: 100%; overflow: auto; }
.div-sticky-m { height: 70vh; width: 100%; overflow: auto; }

/* 헤더는 가장 위에 표시 */
.sticky-top thead {
  position: sticky;
  top: 0;
  z-index: 3;
}

/* 첫 번째 열(부서) 고정 */
.sticky-left td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background-color: white;
}

/* 두 번째 열(이름) 고정 */
.sticky-left2 td:nth-child(2) {
  position: sticky;
  left: 0;
  z-index: 1;
  background-color: white;
}

/* 공통 페이지 헤더 */
.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;
}


/****************************************************************/
/* 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;
}

/****************************************************************/
/* 근무표
/****************************************************************/

/* 근무표 입력시 column hover효과를 위한 CSS */
.table-hover tbody tr:hover td {
  --bs-bg-opacity: 0.1;
  background-color: rgba(var(--bs-black-rgb), var(--bs-bg-opacity)) !important;
}

.is-hover {
  --bs-bg-opacity: 0.1;
  background-color: rgba(var(--bs-black-rgb), var(--bs-bg-opacity)) !important;
}

/* 근무표에서 오늘 날짜를 눈에 띄게 하기 위한 CSS */
.roundtext {
  background-color: cyan;
  font-weight: bold;
  border-radius: 20px;
  width: auto;
  height: auto;
}

/* 근무표 월 캘린더 활용을 위한 CSS */
input[type='month'] {
  border: none;
  cursor: pointer;
}

input[type='month']::-webkit-calendar-picker-indicator, input[type='date']::-webkit-calendar-picker-indicator {
  cursor: pointer;
}

input[type='month']::-webkit-calendar-picker-indicator:hover, input[type='date']::-webkit-calendar-picker-indicator:hover {
  opacity: 0.5;
}

/* 근무표에서 전/후 월 이동 버튼위에 mouse over 시 표현을 위한 CSS */
.btn-hover {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
}

.btn-hover:hover {
  background: #ebebeb;
  border-radius: 50%;
}

.next {
  opacity: 0.3;
}

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

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

.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;
}

/********
 * 근태기록-월간집계 - 지각/조퇴/연장/휴일 상세 테이블
 ********/
.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 auto;
}

/* 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;
}

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

/* 직원관리 관련 CSS */
.sortable {
  cursor: pointer;
}

.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;
}

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

/* 설정(부서/직위/...) 공통 폼: 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;
}
