/* ===============================
   PMS Project Header Toolbar
   =============================== */

/* 검색(왼쪽 가변) + 액션(오른쪽 고정) — flex-wrap 제거로 등록 버튼이 2행으로 밀리지 않음 */
.pms-toolbar{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
  row-gap: 10px;
  width: 100%;
}

/* 왼쪽 검색폼: 폭은 그리드 1열 안에서만 줄어듦, 내부는 필요 시 줄바꿈 */
.pms-search{
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  row-gap: 10px;
}

.pms-actions{
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-self: end;
}

/* 각 블럭(셀렉트/검색어/버튼/라디오) */
.pms-search-type{ flex: 0 0 150px; }
.pms-search-query{ flex: 0 1 180px; min-width: 180px; }
.pms-search-btn{ flex: 0 0 auto; }
.pms-status{ flex: 1 1 auto; min-width: 0; align-items:center; }

/* 전체 프로젝트 관리: 상태 select (라디오 대체) */
.pms-status.pms-status--select{
  flex: 0 0 auto;
  min-width: 160px;
  max-width: 240px;
  align-items: center;
}

.pms-status--select .project_status_select{
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

/* 라디오: 공간 부족 시 다음 줄로 (잘림 방지) */
.status-radios{
  display: flex;
  align-items: center;
  gap: 14px;

  flex-wrap: wrap;
  row-gap: 8px;
  overflow: visible;
}

.status-radios label{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
}

/* 전체 프로젝트: 툴바는 폼 하나만 두고, 첫 줄/둘째 줄은 폼 안에서 나눔 */
.pms-toolbar--project-search{
  display: block;
  width: 100%;
}

/* 폼 = 세로 2단: (검색·상태·버튼) / (시작일·금액) */
.pms-search.pms-search--project-layout{
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 10px;
}

.pms-search-top-row{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

/* 첫 줄 우측: 엑셀·프로젝트 등록 */
.pms-search-top-row .pms-actions{
  margin-left: auto;
  flex: 0 0 auto;
}

/* 전체 프로젝트: 시작일·금액만 항상 다음 줄(전체 폭) */
.pms-search-extra-row{
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* 기간/금액 등 인라인 필터 블록 */
.pms-inline-filters{
  flex: 0 1 auto;
  min-width: 0;
  flex-wrap: wrap;
}

/*
.search_type{
 width:150px;
}
.search_query{
 width:180px;
}
.search_btn{
 width:60px;
}*/
.action_btn{
 width:150px;
}

.number_display{
/* only mobile */
 font-size: 11px;

}



/* ===============================
   Mobile Layout: force stacking
   =============================== */
@media (max-width: 767.98px){

  .pms-toolbar{
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .pms-search{
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;         /* 모바일: 줄바꿈 허용 */
    gap: 10px;
  }

  .pms-search.pms-search--project-layout{
    flex-direction: column;
    flex-wrap: nowrap;
  }

  /* 모바일: 1줄씩 세팅 */
  .pms-search-type,
  .pms-search-query,
  .pms-search-btn,
  .pms-status,
  .pms-search-top-row,
  .pms-search-extra-row,
  .pms-inline-filters{
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
  }

  .pms-search--project-layout .pms-search-top-row{
    flex-direction: column;
    align-items: stretch;
  }

  .pms-search--project-layout .pms-search-top-row .pms-actions{
    margin-left: 0;
    justify-content: flex-end;
  }

  .pms-status.pms-status--select{
    max-width: none;
  }

  .pms-search-extra-row{
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

 .pms-search-btn .search_btn{
    width: 100%;
  }

  /* 모바일: 라디오는 줄바꿈 허용 */
  .status-radios{
    flex-wrap: wrap !important;
    white-space: normal;
    overflow: visible;
    gap: 10px;
  }

  /* 모바일: 검색 다음 줄, 버튼은 우측 정렬 */
  .pms-toolbar > .pms-actions{
    width: 100%;
    justify-content: flex-end;
    justify-self: stretch;
    margin-top: 0;
  }

  /* 전체 프로젝트: 폼 안 .pms-actions는 위쪽 블록에서 처리 */
  .pms-search-top-row .pms-actions{
    margin-top: 6px;
  }
}



/* background color */

.pms-thead, .search_btn, .action_btn{
background-color: rgb(33, 71, 137);
}

.search_btn, .action_btn{
border: 1px solid rgb(33, 71, 137);
}

.pms-thead{
color: white;
}

/* AdminLTE .alert a { color:#fff } → alert-light 등 밝은 알림에서 링크가 안 보이는 문제 보정 */
.alert-light a,
.alert-secondary a,
.alert-warning a,
.alert-info a,
.alert-success a,
.alert-danger a {
  color: rgb(33, 71, 137);
  font-weight: 600;
}
.alert-primary a,
.alert-dark a {
  color: #fff;
}



/* ===============================
   1단계: 사용자 친화적 UI 전역 스타일
   =============================== */

/* --- 페이지 진입 애니메이션 --- */
.content-wrapper {
  animation: pmsPageIn 0.18s ease;
}
@keyframes pmsPageIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- 카드 shadow 통일 --- */
.card {
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.07) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
}
.card-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.07) !important;
}

/* --- 테이블 행 hover --- */
.table tbody tr {
  transition: background-color 0.1s ease;
}
.table tbody tr:hover td {
  background-color: rgba(33, 71, 137, 0.05) !important;
}
/* onclick 속성이 있는 행 → 커서 pointer */
.table tbody tr[onclick] {
  cursor: pointer;
}
.table tbody tr[onclick]:hover td {
  background-color: rgba(33, 71, 137, 0.09) !important;
}

/* --- 빈 상태 안내 --- */
.pms-empty-state {
  text-align: center;
  padding: 32px 20px;
  color: #b0b8c8;
}
.pms-empty-state i {
  font-size: 2.2rem;
  margin-bottom: 8px;
  display: block;
}
.pms-empty-state p {
  margin: 0;
  font-size: 0.88rem;
}

/* --- 필수 항목 * 표시 --- */
.pms-required-star {
  color: #e74c3c;
  margin-left: 3px;
  font-weight: bold;
  font-size: 0.85em;
}

/* --- 입력 필드 포커스 강조 --- */
.form-control:focus,
.custom-select:focus {
  border-color: #214789 !important;
  box-shadow: 0 0 0 0.15rem rgba(33, 71, 137, 0.18) !important;
}

/* --- form submit 로딩 버튼 --- */
.pms-btn-loading {
  pointer-events: none;
  opacity: 0.72;
}
.pms-btn-loading .pms-btn-spinner {
  display: inline-block;
  width: 0.82rem;
  height: 0.82rem;
  border: 0.15em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: pmsSpinner 0.65s linear infinite;
  margin-right: 5px;
  vertical-align: -0.1em;
}
@keyframes pmsSpinner {
  to { transform: rotate(360deg); }
}

/* --- 버튼 사이 간격 --- */
.btn + .btn {
  margin-left: 3px;
}
.btn-group .btn + .btn {
  margin-left: 0;
}

/* --- 숫자/금액 강조 클래스 (선택적 사용) --- */
.text-amount {
  font-weight: 600;
  color: #1e3f7a;
}
.text-amount-pos { font-weight: 600; color: #27ae60; }
.text-amount-neg { font-weight: 600; color: #c0392b; }

/* --- 페이지네이션 컨텍스트 레이블 --- */
.pms-page-info {
  font-size: 0.82rem;
  color: #888;
  line-height: 1.8;
  margin-left: 6px;
}

/* 공지사항 상세: 제목 줄바꿈 */
.board-detail-title-text {
  word-break: break-word;
}

/* 공지 목록: 첨부 있음 표시(📎) */
.board-list-attach {
  display: inline-block;
  vertical-align: middle;
  font-size: 1.05em;
  line-height: 1;
  opacity: 0.9;
}

/* 공지 수정: 첨부 행 — 다운로드·삭제 한 줄 유지, 긴 파일명은 말줄임 */
.board-att-row {
  gap: 0;
}
.board-att-name {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.board-att-actions {
  max-width: 100%;
}
@media (max-width: 575.98px) {
  .board-att-row {
    flex-wrap: wrap !important;
  }
  .board-att-actions {
    width: 100%;
    margin-left: 0 !important;
    margin-top: 8px;
    padding-left: 0 !important;
    justify-content: flex-end;
  }
}
