/* 전체 레이아웃 구성 */
/* Chrome, Safari, Edge, Opera에서 화살표 제거 */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Chrome, Safari, Edge, Opera에서 화살표 제거 */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox 및 표준 브라우저에서 화살표 제거 */
input[type=number] {
  -moz-appearance: textfield; /* Firefox용 전용 속성 */
  appearance: none;           /* 표준 속성 (에러 해결 핵심) */
}

/* 상단 경로 (Breadcrumb) 및 제목 */
.page-header-row h2 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.page-header-row h2 small {
    font-size: 14px;
    color: #6c757d;
    font-weight: 400;
}

/* 탭 메뉴 스타일 */
.tab-menu-container {
    display: flex;
    gap: 4px;
    margin-bottom: 0;
    align-items: flex-end; /* 바닥 선 정렬 */
}

.tab-btn {
    padding: 15px 35px;
    border: 1px solid #dee2e6;
    border-bottom: none;
    background-color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s;
}

.tab-btn.active {
    background-color: #fff;
    color: #4a62d8;
    border: 3px solid #4a62d8;
    border-bottom: 2px solid #fff;
    position: relative;
    z-index: 2;
}

/* 테이블 컨테이너 및 테이블 스타일 */
.apartment-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-top: 2px solid #333; /* 이미지 상단의 굵은 선 반영 */
    
    table-layout: fixed;
}

.apartment-table th {
    background-color: #ffffff;
    padding: 12px 8px;
    border-bottom: 1px solid #dee2e6;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.apartment-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    color: #444;
    text-align: center;
    vertical-align: middle;
}

.apartment-table tbody tr:hover {
    background-color: #f1f5f9;
}

/* '계약신규' 버튼 스타일 (이미지의 파란색 버튼) */
.btn-contract-new {
    background-color: #5d78ff; /* 이미지의 푸른색 */
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-contract-new:hover {
    background-color: #4a62d8;
}

/* 상세 폼 스타일 (showExecutionForm 용) */
.execution-form-container {

    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 1400px;   /* 원하는 동일한 최대폭 */
    margin: 0 auto;      /* 가운데 정렬 */
}

.execution-form-container h3 {
    font-size: 18px;
    color: #1a73e8;
    margin-bottom: 15px;
    border-left: 4px solid #1a73e8;
    padding-left: 10px;
}

.form-info-table {
    width: 100%;
    margin-bottom: 30px;
    border: 1px solid #dee2e6;
}

.form-info-table th {
    background-color: #f8f9fa;
    width: 15%;
    padding: 10px;
    border: 1px solid #dee2e6;
    font-size: 13px;
}

.form-info-table td {
    padding: 10px;
    border: 1px solid #dee2e6;
    font-size: 13px;
}

/* 입력 필드 스타일 */
input[type="text"]:not(.status-input), 
input[type="date"], 
input[type="number"], 
select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

/* 하단 버튼 바 */
.form-btns-bottom {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.btn-list {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-save {
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 상세보기 */
/* 공통 탭 버튼 기본 스타일 (기존 스타일이 있다면 유지) */
.tab-btn {
  padding: 10px 20px;
  cursor: pointer;
  border: 1px solid #ddd;
  background: #f8f9fa;
  transition: all 0.2s;
  box-shadow: none !important;
}

/* --- 기계설비 테마 (Blue) --- */
.theme-machine .tab-btn.active {
  background-color: #364fc7; /* 진한 파랑 */
  color: white;
  border-color: #364fc7;
  font-weight: bold;
}
.theme-machine .btn-contract-new, 
.theme-machine .btn-edit-execution {
  background-color: #4c6ef5; /* 파랑 버튼 */
  color: white;
}

/* --- 정보통신 테마 (Purple) --- */
.theme-comm .tab-btn.active {
  background-color: #862e9c; /* 진한 보라 */
  color: white;
  border-color: #862e9c;
  font-weight: bold;
}
.theme-comm .btn-contract-new, 
.theme-comm .btn-edit-execution {
  background-color: #be4bdb; /* 보라 버튼 */
  color: white;
}

/* 마우스 올렸을 때 효과 */
.tab-btn:hover {
  filter: brightness(90%);
}
/* 1. 탭 컨테이너 */
.custom-tab-container {
  display: flex;
  gap: 0;
  margin-bottom: -2px; /* 테이블 상단 선과 겹치게 배치 */
  padding-left: 0;
}

/* 2. 버튼 기본 스타일 (비활성 상태) */
.tab-btn {
  width: 250px;         /* 가로 크기 동일 고정 */
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px !important;
  font-weight: bold;
  cursor: pointer;
  border: 1px solid #ccc;    /* 사방 테두리 */
  border-bottom: 2px solid #182c61; /* 비활성 버튼 밑에는 기본적으로 선이 보임 (기계 기준 컬러) */
  background: #f8f9fa;
  color: #888;
  border-radius: 10px 10px 0 0 !important;
  transition: all 0.2s;
  outline: none;
  z-index: 1;                /* 기본적으로 테이블 선보다 뒤에 배치 */
}

/* --- 정보통신(Comm)일 때 비활성 버튼 밑선 색상 변경 --- */
.theme-comm .tab-btn {
  border-bottom: 2px solid #862e9c;
}

/* 3. [액티브] 기계설비 테마 */
.theme-machine .tab-btn.active {
  background: #fff;
  color: #182c61;
  border: 2px solid #182c61;   /* 진한 테두리 */
  border-bottom: 3px solid #fff; /* 밑선을 흰색으로 칠해서 테이블 선을 덮어버림 */
  z-index: 3;                  /* 테이블 선보다 위로 올려서 아래를 뚫어줌 */
}

/* 4. [액티브] 정보통신 테마 */
.theme-comm .tab-btn.active {
  background: #fff;
  color: #862e9c;
  border: 2px solid #862e9c;
  border-bottom: 3px solid #fff; /* 밑선 지움 */
  z-index: 3;
}

/* 5. 테이블 상단 라인 */
.apartment-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid #ccc;
  position: relative;
  z-index: 2; /* 탭 버튼보다는 위, 액티브 버튼보다는 아래 */
}

.theme-machine .apartment-table { border-top: 2px solid #182c61; }
.theme-comm .apartment-table { border-top: 2px solid #862e9c; }

/* 점검상태 뱃지 스타일 */
.status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.status.pending {
    background-color: #fff4e6;
    color: #fd7e14; /* 주황색 (점검중) */
    border: 1px solid #ffe8cc;
}

.status.done {
    background-color: #ebfbee;
    color: #40c057; /* 초록색 (완료) */
    border: 1px solid #d3f9d8;
}
/* 상세보기/수정 버튼 공통 스타일 추가 */
.btn-edit-execution {
    border: none;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s, transform 0.1s;
}

.btn-edit-execution:active {
    transform: scale(0.95);
}

