/* ================================================================= */
/* 🛠️ 공통 목록 스타일 (협력 파트너사 & 채용 공고 목록 통합)   common_list_styles.css */
/* ================================================================= */

/* 1. 기본 레이아웃 및 폰트 */
body { 
    font-family: 'Malgun Gothic', 'Arial', sans-serif; 
    background-color: #f4f6f9; 
}
a { 
    text-decoration: none; 
    color: inherit; 
}
#container {
    margin: 20px;
    padding-bottom: 0; 
}

/* 만약 그래도 줄어 보인다면 이 속성을 추가하세요 */
.search-box-container {
    flex: 1 1 auto; /* 남는 공간을 모두 채우도록 명령 */
}

/* 입력창 박스가 공간을 충분히 차지하게 설정 */
.search-form-grid {
    display: grid;
    width: 100%;              /* 그리드 자체도 전체 너비 사용 */
    grid-template-columns: 4fr 1fr 1fr 2fr; 
    gap: 12px;
    align-items: center;
}

/* 입력창과 버튼을 감싸는 부모 (Relative 설정) */
.inputBox {
    position: relative;     /* 버튼 배치를 위한 기준점 */
    display: flex;
    align-items: center;
}

/* 입력창 스타일 */
.inputBox input {
    width: 100%;
    height: 50px;           /* 높이 설정 */
    padding: 0 100px 0 20px; /* 우측에 버튼이 들어갈 공간(100px) 확보 */
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    outline: none;
}

/* 폼 요소 스타일 */
input[type="text"],
select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #CED4DA;
    border-radius: 4px;
    font-size: 0.9em;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
input[type="text"]:focus,
select:focus {
    border-color: #3498DB;
}

/* 내부 폼 요소의 너비 조정 */
.search-box-container input[type="text"],
.search-box input[type="text"],
.search-box-container select,
.search-box select {
    /* 공통 스타일에 정의된 width: 100%를 Flexbox가 오버라이드합니다. */
    flex-grow: 1; 
    min-width: 200px; 
}

/* --- 랜탈 목록 (단일 검색)에 맞춘 추가 조정 --- */
.search-area .search-box {
    display: flex;
    gap: 8px;
    align-items: center;
}
.search-area .search-box input[type="text"] {
    flex-grow: 3; /* 키워드 입력 필드에 가장 큰 너비 부여 */
    min-width: 150px; /* 랜탈 목록에서 검색 필드 최소 너비 조정 */
}
.search-area .search-box select {
    flex-grow: 1; 
    min-width: 100px;
}
.search-area .search-box .btn {
    flex-shrink: 0; 
    width: auto;
}

/* 다중 필터 검색 (채용 공고 리스트용) */
.search-form-grid {
    display: grid;
    /* 4개의 열: 검색창(4) + 드롭다운(1) + 드롭다운(1) + 버튼(2) */
    grid-template-columns: 4fr 1fr 1fr 2fr; /* 4번째 열 버튼 영역을 넓게 조정 */
    gap: 12px;
    align-items: center;
    /* 랜탈 목록에서 .search-form-grid를 사용 시, 이 스타일이 .search-box-container의 flex를 오버라이드 합니다. */
}
.search-form-grid .inputBox { 
    grid-column: 1 / span 1; 
}
.search-form-grid select { 
    grid-column: span 1; 
}
.search-form-buttons { 
    grid-column: 4 / 5; /* 4번째 열을 명시적으로 차지하도록 수정 */
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
fieldset {
    display: block;
    min-inline-size: min-content;
    margin-inline: 0px;
    border-width: 0px;
    border-style: groove;
    border-color: threedface;
    border-image: initial;
    padding-block: 0.35em 0.625em;
}

/* 추가 확인 사항: container에 여백이 있으므로 100% 설정 시 자동으로 꽉 찹니다. */
#container {
    margin: 20px;
    padding-bottom: 0; 
    /* 필요하다면 max-width를 여기에 설정하여 전체적인 가이드라인을 잡는 것이 좋습니다. */
}

/* 버튼 공통 스타일 */
.btn {
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    
    height: 35px; 
    line-height: 1.2; 
    white-space: nowrap; 
    box-sizing: border-box;

    padding: 3px 8px; 
    font-weight: 600;
    font-size: 0.9em; 
    
    border: 1px solid; 
    border-radius: 4px; 
    background-color: white; 

    cursor: pointer;
    text-decoration: none;
    text-align: center; 
    transition: background-color 0.2s, color 0.2s, border-color 0.2s; 
}

/* 버튼 테마별 스타일 */
.btn.black { 
    color: #2C3E50; 
    border-color: #2C3E50; 
}
.btn.black:hover {
    background-color: #2C3E50; 
    color: white;
}
.btn.reset { 
    color: #7F8C8D; 
    border-color: #7F8C8D; 
}
.btn.reset:hover {
    background-color: #7F8C8D;
    color: white;
}
.btn.blue { 
    color: #3498DB; 
    border-color: #3498DB; 
}
.btn.blue:hover {
    background-color: #3498DB;
    color: white;
}
.btn.green { 
    color: #2ECC71; 
    border-color: #2ECC71; 
}
.btn.green:hover {
    background-color: #2ECC71;
    color: white;
}
.btn.yellow { 
    color: #F39C12; 
    border-color: #F39C12; 
}
.btn.yellow:hover {
    background-color: #F39C12;
    color: white;
}
.btn.orange { 
    color: #f29600; 
    border-color: #f29600; 
}
.btn.orange:hover {
    background-color: #cd7f03;
    color: white;
}
/* 랜탈 목록에서 사용되는 기본 검색 버튼 색상 오버라이드 */
.btn.black, button.btn.black, .btn-search { /* .btn-search 추가 */
    background-color:#2C3E50; 
    color:white; 
    border-color: #2C3E50; /* 테두리색 추가 */
}
.btn.black:hover, button.btn.black:hover, .btn-search:hover {
    background-color:#34495E; 
}
.btn.reset { 
    background-color: #7F8C8D; 
    color: white; 
}
.btn.reset:hover {
    background-color: #95A5A6; 
}
.btn-reset { 
    background-color: #7F8C8D !important;
}
.btn-reset:hover {
    background-color: #95A5A6 !important;
}

.info-section { border: 1px solid #ECF0F1; padding: 20px; border-radius: 8px; margin-bottom: 20px;
    /* 💡 [추가 및 수정] 배경색, 그림자, 전환 효과 */
    background-color: white; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); 
    transition: box-shadow 0.3s ease-in-out; /* 부드러운 전환 효과 추가 */
}

.info-section h3 { 
    border-left: 4px solid #3498DB; 
    padding-left: 10px; 
    margin-top: 15px; 
    margin-bottom: 15px; 
    font-size: 18px; 
    font-weight: 600;
}

/* 💡 [추가] 마우스 오버 시 그림자 강조 효과 */
.info-section h3:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); 
}

.listHeader {
    display: flex;          /* 부모를 flex 박스로 설정 */
    align-items: center;    /* 수직 중앙 정렬 */
    justify-content: flex-start; /* 기본 정렬은 왼쪽부터 */
    width: 100%;
}

.totalCnt { 
    margin-left: 20px;
    font-size: 1em;
    color: #555; 
}
.totalCnt .cnt { 
    font-weight: bold; 
    color: #3498DB; 
}

.registerBtnWrap {
    flex-shrink: 0;
    margin-right: 20px;
    margin-left: auto;      /* 💡 핵심: 왼쪽 여백을 최대로 밀어 맨 우측으로 배치 */
}
/* 5. 테이블 공통 스타일 (PC 환경) */
.list-table,
.rcr-table,
.partner-list-table,
.rental-list-table { /* .rental-list-table 통합 */
    width: 100%; 
    border-collapse: collapse; 
    table-layout: fixed;
    font-size: 0.9em;
    background-color: white;
    border: 1px solid #EAECEE;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.list-table th, .list-table td,
.rcr-table th, .rcr-table td,
.partner-list-table th, .partner-list-table td,
.rental-list-table th, .rental-list-table td { /* .rental-list-table 통합 */
    padding: 12px 10px; 
    border-bottom: 1px solid #ECF0F1;
    text-align: center;
    vertical-align: middle;
}

.list-table th,
.rcr-table th,
.partner-list-table th,
.rental-list-table th { /* .rental-list-table 통합 */
    background-color: #F4F6F6;
    font-weight: bold;
    color: #34495E;
    border-bottom: 1px solid #ECF0F1;
}

.list-table tbody tr:hover,
.rcr-table tbody tr:hover,
.partner-list-table tbody tr:hover,
.rental-list-table tbody tr:hover { /* .rental-list-table 통합 */
    background-color: #E8F6F8;
    cursor: pointer; 
}


/* 6. 목록 개별 스타일 (채용 공고) */
.rcr-table .rcr-title-cell { text-align: left; padding-left: 20px; font-weight: 600; }
.rcr-table .rcr-title-cell a { color: #2C3E50; transition: color 0.2s; }
.rcr-table .rcr-title-cell a:hover { color: #21a510; }
.rcr-table .project-info-user { font-size: 0.8em; color: #7F8C8D; display: block; margin-top: 3px; font-weight: normal; }
.status-active { color: #2ECC71; font-weight: bold; } 
.status-filled { color: #3498DB; font-weight: bold; } 
.status-expired { color: #E74C3C; font-weight: bold; } 
.rcr-table td:nth-child(8) { 
    white-space: nowrap;
}


/* 7. 목록 개별 스타일 (파트너사) */
.partner-list-table .col-name { text-align: left; }
.company-logo-thumb { max-width: 100px; max-height: 80px; height: auto; width: auto; border-radius: 5px; object-fit: contain; vertical-align: middle; }
.col-linked { font-weight:normal}
.col-address { cursor: pointer; }
.col-address:hover { background-color: #E8F6F8; color: #3498DB; }
.site-link { color: #3498DB; text-decoration: none; font-size: 0.9em; }
.site-link:hover { text-decoration: underline; }


/* 8. 목록 개별 스타일 (랜탈 목록) */
.rental-list-table .col-photo { width: 8%; }
.rental-list-table .col-category { width: 12%; }
.rental-list-table .col-item-info { width: 35%; text-align: left; }
.rental-list-table .col-size { width: 10%; }
.rental-list-table .col-price { width: 15%; text-align: right; } /* 임대 가격 오른쪽 정렬 */
.rental-list-table .col-region-cost { width: 20%; text-align: center; line-height: 1.4; } /* 배송 정보 가운데 정렬 */

/* 물품 이미지 스타일 */
.item-photo-thumb { /* .company-logo-thumb과 유사하지만, 크기가 다르므로 별도 유지 */
    width: 60px; height: 40px; object-fit: cover; border-radius: 4px; vertical-align: middle; border: 1px solid #EEE;
}
.col-name, 
.col-usage {
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis;
}


/* 9. 정렬 아이콘 스타일 (랜탈 목록) */
.sort-link {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    justify-content: center; 
    width: 100%;
}
.sort-icon {
    font-size: 0.8em;
    vertical-align: middle;
    line-height: 1;
}
/* 기본/미적용 아이콘 */
.sort-icon.default {
    color: #BDC3C7;
    font-size: 0.9em;
}
/* 현재 정렬 방향 아이콘 */
.sort-icon.active-dir {
    font-weight: bold;
    color: #3498DB;
}
.sort-link:hover {
    color: #3498DB;
}
/* 테이블 헤더의 텍스트가 링크 안으로 들어가도록 조정 */
.rental-list-table th {
     padding: 0; 
}
.rental-list-table th .sort-link {
     padding: 12px 10px;
}


/* 10. 모바일 블록 리스트 (기본 숨김) */
.partner-block-list,
.recruitment-block-list,
.rental-block-list { /* .rental-block-list 통합 */
    display: none; 
}

span.partner-tag {
    display: inline-block;
    margin: 2px 4px 2px 0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    color: #34495E;
    cursor: default;
}


/* 토글 스위치 컨테이너 */
.toggle-switch-wrapper {
    display: flex;
    justify-content: flex-start; /* 좌측 정렬 (중앙 정렬 원하면 center) */
    margin-bottom: 25px;
}

/* 스위치 배경 */
.toggle-switch {
    display: inline-flex;
    background-color: #f1f5f9; /* 연한 그레이 배경 */
    border-radius: 50px;       /* 완전한 라운드 */
    padding: 5px;
    gap: 4px;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.03); /* 안쪽으로 살짝 들어간 느낌 */
}

/* 개별 아이템 스타일 */
.toggle-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 700;
    color: #64748b;            /* 기본 글자색 */
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

/* 활성화 상태 (Active) */
.toggle-item.active {
    color: #ffffff;            /* 흰색 글자 */
    background-color: #3498db; /* 포인트 블루 */
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3); /* 블루 그림자 효과 */
}

/* 비활성 상태 호버 효과 */
.toggle-item:not(.active):hover {
    color: #334155;
    background-color: #e2e8f0;
}

/* 아이콘 간격 조절 */
.toggle-item i {
    font-size: 16px;
}

/* 하단 고정 버튼 */
.bottom-actions, .pageBtns clearFix { position: sticky; bottom: 0; background: #fff; padding: 15px; border-top: 1px solid #e2e8f0; display: flex; gap: 10px; margin: 0 -15px -15px -15px; }
.btn-submit { 
    background: var(--p-main); 
    color: var(--p-text-on-main); 
    border: none; 
    height: 52px; 
    font-weight: 800; 
    font-size: 17px; 
    border-radius: 10px; 
    cursor: pointer; 
    transition: 0.2s; 
    flex: 2; 
    display: flex;
    align-items: center;     /* 세로 중앙 정렬 */
    justify-content: center; /* 가로 중앙 정렬 */
    text-align: center;      /* 텍스트 중앙 정렬 (보험용) */ 
}
.btn-re-submit { 
    background: #0369a1;
    color:  white; 
    border: none; 
    height: 52px; 
    font-weight: 800; 
    font-size: 17px; 
    border-radius: 10px; 
    cursor: pointer; 
    transition: 0.2s; 
    flex: 2; 
    display: flex;
    align-items: center;     /* 세로 중앙 정렬 */
    justify-content: center; /* 가로 중앙 정렬 */
    text-align: center;      /* 텍스트 중앙 정렬 (보험용) */ 
}
.btn-print { 
    background: #3498DB; 
    color: white; 
    border: none; 
    height: 52px; 
    font-weight: 800; 
    font-size: 17px; 
    border-radius: 10px; 
    cursor: pointer; 
    transition: 0.2s; 
    flex: 2; 
    display: flex;
    align-items: center;     /* 세로 중앙 정렬 */
    justify-content: center; /* 가로 중앙 정렬 */
    text-align: center;      /* 텍스트 중앙 정렬 (보험용) */ 
}
.btn-cancel {
    flex: 1;
    background: #818181;
    color: #fff;
    border: none;
    border-radius: 8px;
    height: 52px;
    font-weight: 800;
    text-align: center;
    
    /* 세로 정렬을 위한 핵심 설정 */
    display: flex;
    align-items: center;     /* 세로 중앙 정렬 */
    justify-content: center;  /* 가로 중앙 정렬 */
    text-decoration: none;   /* a 태그일 경우 밑줄 제거 */
}
/* ================================================================= */
/* 🏗️ 공수 프로그램 전용 추가 스타일 (Man-Day System) */
/* ================================================================= */

/* 1. 공수 계산 결과 박스 (Result Card) */
.result-box, .result-card {
    margin-top: 30px;
    background-color: #f0f9ff; /* 연한 파랑 배경 */
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 20px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.result-item {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0f2fe;
    text-align: center;
}

.result-label {
    display: block;
    font-size: 12px;
    color: #7dd3fc;
    font-weight: 700;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.result-val {
    font-size: 18px;
    font-weight: 700;
    color: #0369a1;
}

.result-val.highlight {
    color: #e67e22; /* 오렌지색 강조 */
    font-size: 20px;
}

/* 2. 폼 입력 보조 스타일 */
.quantity-group {
    display: flex;
    align-items: center;
}

.unit-addon {
    background-color: #f8fafc;
    border: 1px solid #ced4da;
    border-left: none;
    height: 38px;
    line-height: 38px;
    padding: 0 12px;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

.quantity-group input {
    border-radius: 4px 0 0 4px !important;
}

.rate-info-text {
    font-size: 12px;
    color: #3498db;
    margin-top: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 3. 캘린더 전용 세부 스타일 (md_calendar.php) */
.calendar-table td {
    height: 120px; /* 공수 데이터 표시를 위한 높이 확보 */
    transition: background 0.2s;
}

.md-badge {
    display: block;
    margin-top: 5px;
    padding: 3px 6px;
    background-color: #3498db;
    color: white;
    font-size: 11px;
    border-radius: 4px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-table td.has-data {
    background-color: #f0f9ff;
}

.day-num {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 14px;
}

/* 4. 공수 리스트 특화 스타일 */
.badge-site {
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
}
.badge-site:hover {
    text-decoration: underline;
}

.company-tag {
    background-color: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

/* 5. 신규 등록 플로팅/강조 버튼 */
.btn-register-action {
    width: 100%;
    height: 50px;
    background-color: #27ae60 !important;
    color: white !important;
    border: none !important;
    font-size: 16px !important;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}


    /* 채용 검색 그리드 한 줄 배치 스타일 */
    .recruit-search-grid {
        display: grid;
        /* [검색어 2.5배] [직무 1배] [경력 1배] [거리 1배] [버튼 자동] */
        grid-template-columns: 2.5fr 1fr 1fr 1fr auto; 
        gap: 10px;
        align-items: center;
        width: 100%;
        background: #ffffff;
    }

    /* 입력창 및 셀렉트 박스 높이 통일 */
    .recruit-search-grid .inputBox input,
    .recruit-search-grid select {
        width: 100%;
        height: 45px;
        padding: 0 10px;
        border: 1px solid #ddd;
        border-radius: 6px;
        box-sizing: border-box;
        font-size: 14px;
    }

    /* 버튼 스타일 유지 및 너비 최적화 */
    .recruit-search-grid .search-form-buttons button {
        white-space: nowrap; /* 텍스트 줄바꿈 방지 */
        cursor: pointer;
    }

    /* 모바일 대응 (화면이 좁아지면 자동으로 줄바꿈 처리 - 필요시) */
    @media (max-width: 1024px) {
        .recruit-search-grid {
            grid-template-columns: 1fr 1fr; /* 2열로 변경 */
        }
        .recruit-search-grid .inputBox {
            grid-column: span 2; /* 검색창은 넓게 */
        }
    }

    /* 3. 테이블 레이아웃 최적화 */
    .rcr-list-table {
        width: 100%;
        table-layout: fixed;
        border-spacing: 0;
        border-collapse: separate;
        border-radius: 8px;
        border: 1px solid #EAECEE;
        overflow: hidden;
    }
    .rcr-list-table thead th {
        background-color: #F8F9FA;
        padding: 15px 10px;
        border-bottom: 1px solid #EAECEE;
        font-size: 14px;
        color: #444;
    }
    .rcr-list-table tbody td {
        padding: 15px 10px;
        border-bottom: 1px solid #F2F4F6;
        font-size: 14px;
        vertical-align: middle;
    }

    /* 상태 라벨 스타일 */
    .status-badge {
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 12px;
        font-weight: bold;
    }

    /* 모바일 대응 */
    @media (max-width: 1024px) {
        .recruit-search-grid {
            grid-template-columns: 1fr 1fr; /* 2열 배치로 전환 */
        }
        .search-form-buttons { grid-column: span 2; display: flex; gap: 5px; }
        .search-form-buttons button, .search-form-buttons a { flex: 1; }
    }

    /* 1. 검색창 너비 및 그리드 최적화 */
    .search-box-container {
        width: 100% !important;
        height: 90px;
        max-width: 100% !important;
        box-sizing: border-box;
        margin-bottom: 25px;
        padding: 20px !important; /* 내부 여백 확대 */
        border: 1px solid #EAECEE;
        background-color: #fff;
        border-radius: 12px;
    }

    .partner-search-grid {
        display: grid;
        grid-template-columns: 1fr auto; /* 검색창이 메인, 버튼은 우측 고정 */
        gap: 12px;
        width: 100%;
        align-items: center;
    }

    /* 2. 입력창 디자인 (index.css 스타일 반영) */
    .partner-search-grid .inputBox input {
        width: 100%;
        height: 45px;
        padding: 0 15px;
        border: 1px solid #CED4DA;
        border-radius: 6px;
        font-size: 15px;
        outline: none;
        transition: border-color 0.2s;
    }
    .partner-search-grid .inputBox input:focus { border-color: #21a510; }

    /* 3. 테이블 레이아웃 최적화 */
    .partner-list-table {
        width: 100%;
        table-layout: fixed;
        border-spacing: 0;
        border-collapse: separate;
        border-radius: 8px;
        border: 1px solid #EAECEE;
        overflow: hidden;
    }

    /* 4. 페이지네이션 */
    .pagination-wrapper {
        display: flex;
        justify-content: center;
        gap: 5px;
        margin-top: 30px;
    }
    .pagination-btn {
        min-width: 35px;
        height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #ddd;
        background: #fff;
        color: #333;
        border-radius: 4px;
        font-weight: 500;
    }
    .pagination-btn.active {
        background-color: #21a510;
        border-color: #21a510;
        color: #fff;
    }
    /* 파트너 연결 수 배지 스타일 */
    .link-cnt-badge {
        display: inline-block;
        min-width: 40px;
        padding: 4px 12px;
        background-color: #f0f7ff;      /* 연한 파란색 배경 */
        color: #3498db;                 /* 포인트 블루 글자색 */
        border: 1px solid #d1e9ff;
        border-radius: 50px;            /* 둥근 캡슐 모양 */
        font-weight: 800;
        font-size: 14px;
        text-decoration: none;
        transition: all 0.2s ease-in-out;
    }

    /* 마우스 호버 시 강조 효과 */
    .link-cnt-badge:hover {
        background-color: #3498db;
        color: #ffffff;
        border-color: #3498db;
        box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
        transform: translateY(-1px);
    }
