@charset "UTF-8";

/* 공통 변수 설정 */
:root {
    --main-color: #3F2F8E;   /* Deep Purple (기업용 포인트) */
    --second-color: #007094; /* Ocean Blue (근로자용 포인트) */
    --bg-color: #f4f7f6;
    --text-color: #1f2937;
    --text-muted: #6b7280;
}

/* 모바일 친화적 리셋 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: 'Noto Sans KR', sans-serif; 
    background: var(--bg-color); 
    color: var(--text-color); 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
    -webkit-font-smoothing: antialiased; /* 모바일 글씨 부드럽게 */
}
a { text-decoration: none; -webkit-tap-highlight-color: transparent; /* 모바일 터치 시 깜빡임 제거 */ }

/* -----------------------------------
    1. 게이트웨이 화면 (index.php)
----------------------------------- */
.gateway-wrapper { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; padding: 20px; }
.gateway-header { text-align: center; margin-bottom: 40px; }
.gateway-header h1 { font-size: 28px; font-weight: 900; color: var(--main-color); letter-spacing: -1px; margin-bottom: 10px; word-break: keep-all; }
.gateway-header p { font-size: 15px; color: var(--text-muted); font-weight: 400; word-break: keep-all; }

.gateway-container { display: flex; gap: 20px; max-width: 900px; width: 100%; flex-wrap: wrap; justify-content: center; }

.gate-card { flex: 1; min-width: 280px; max-width: 400px; background: #fff; border-radius: 20px; padding: 40px 20px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: all 0.3s ease; border: 2px solid transparent; display: flex; flex-direction: column; align-items: center; }
.gate-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }

.icon-circle { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; font-size: 32px; transition: 0.3s; }
.gate-title { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.gate-desc { font-size: 14px; color: var(--text-muted); line-height: 1.5; margin-bottom: 25px; word-break: keep-all; }
.btn-gate { padding: 14px 20px; border-radius: 50px; font-size: 15px; font-weight: 700; color: #fff; width: 85%; transition: 0.3s; display: block; }

/* 카드 상호작용 디자인 */
.card-company:hover { border-color: var(--main-color); }
.card-company .icon-circle { background: rgba(63,47,142,0.1); color: var(--main-color); }
.card-company:hover .icon-circle { background: var(--main-color); color: #fff; }
.card-company .btn-gate { background: var(--main-color); }
.card-company:hover .btn-gate { box-shadow: 0 5px 15px rgba(63,47,142,0.3); }

.card-worker:hover { border-color: var(--second-color); }
.card-worker .icon-circle { background: rgba(0,112,148,0.1); color: var(--second-color); }
.card-worker:hover .icon-circle { background: var(--second-color); color: #fff; }
.card-worker .btn-gate { background: var(--second-color); }
.card-worker:hover .btn-gate { box-shadow: 0 5px 15px rgba(0,112,148,0.3); }

/* 모바일 전용 반응형 (화면이 480px 이하일 때) */
@media (max-width: 480px) {
    .gateway-header h1 { font-size: 24px; }
    .gateway-header p { font-size: 14px; }
    .gateway-container { gap: 15px; }
    .gate-card { padding: 30px 15px; min-width: 100%; } /* 모바일에서는 100% 폭 사용 */
    .icon-circle { width: 70px; height: 70px; font-size: 28px; }
    .btn-gate { width: 100%; padding: 16px 20px; font-size: 16px; } /* 모바일에서 버튼을 더 크고 꽉 차게 변경 (터치 용이) */
}

/* -----------------------------------
    2. 프론트엔드 로그인 폼 공통 (추가)
----------------------------------- */
.login-container { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; padding: 20px; width: 100%; }
.login-box { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); overflow: hidden; }
.login-header { padding: 30px 20px; text-align: center; color: #fff; }
.login-header h2 { font-size: 24px; font-weight: 800; margin-bottom: 5px; letter-spacing: -0.5px; }
.login-header p { font-size: 14px; opacity: 0.9; font-weight: 300; }
.login-body { padding: 40px 30px; }

/* 테마별 헤더 색상 */
.theme-company .login-header { background: var(--main-color); }
.theme-worker .login-header { background: var(--second-color); }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; color: var(--text-color); margin-bottom: 8px; font-weight: 600; }
.form-group input { width: 100%; height: 50px; border: 1.5px solid #d1d5db; border-radius: 8px; padding: 0 15px; font-size: 15px; outline: none; transition: 0.2s; }
.form-group input::placeholder { color: #9ca3af; }

/* 테마별 인풋 포커스 & 버튼 색상 */
.theme-company .form-group input:focus { border-color: var(--main-color); box-shadow: 0 0 0 3px rgba(63,47,142,0.1); }
.theme-company .btn-submit { background: var(--main-color); color: #fff; }
.theme-company .btn-submit:hover { box-shadow: 0 5px 15px rgba(63,47,142,0.3); transform: translateY(-2px); }

.theme-worker .form-group input:focus { border-color: var(--second-color); box-shadow: 0 0 0 3px rgba(0,112,148,0.1); }
.theme-worker .btn-submit { background: var(--second-color); color: #fff; }
.theme-worker .btn-submit:hover { box-shadow: 0 5px 15px rgba(0,112,148,0.3); transform: translateY(-2px); }

.btn-submit { width: 100%; height: 52px; border: none; border-radius: 8px; font-size: 16px; font-weight: 700; cursor: pointer; transition: all 0.3s ease; margin-top: 10px; }
.login-footer { text-align: center; margin-top: 20px; margin-bottom: 20px; font-size: 13px; color: var(--text-muted); }
.login-footer a { color: var(--text-muted); text-decoration: underline; }

/* -----------------------------------
    3. 기업 담당자 대시보드 (company/main.php)
----------------------------------- */
/* 상단 네비게이션 바 */
.top-navbar { background: #fff; padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 100; }
.top-navbar .logo { font-size: 22px; font-weight: 900; color: var(--main-color); letter-spacing: -1px; text-decoration: none; }
.top-navbar .user-info { font-size: 14px; color: var(--text-color); font-weight: 500; display: flex; align-items: center; }
.top-navbar .btn-logout { margin-left: 15px; font-size: 12px; color: #6b7280; background: #f3f4f6; padding: 6px 12px; border-radius: 4px; transition: 0.2s; text-decoration: none; font-weight: 600; }
.top-navbar .btn-logout:hover { background: #e5e7eb; color: #1f2937; }

/* 대시보드 메인 레이아웃 */
.dashboard-container { max-width: 1000px; margin: 50px auto; padding: 0 20px; width: 100%; }
.page-title-wrap { margin-bottom: 40px; text-align: center; }
.page-title-wrap h2 { font-size: 28px; font-weight: 800; color: #1f2937; margin-bottom: 12px; letter-spacing: -0.5px; }
.page-title-wrap p { font-size: 16px; color: var(--text-muted); line-height: 1.5; word-break: keep-all; }

/* 지원사업 카드 그리드 */
.program-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 30px; }
.program-card { background: #fff; border-radius: 16px; padding: 35px 30px; box-shadow: 0 4px 20px rgba(0,0,0,0.04); border: 1px solid #f3f4f6; transition: 0.3s; display: flex; flex-direction: column; }
.program-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0,0,0,0.08); border-color: var(--main-color); }

.program-card .badge { display: inline-block; padding: 6px 14px; border-radius: 50px; font-size: 13px; font-weight: 700; margin-bottom: 20px; }
.program-card .badge.bg-skill { background: rgba(63,47,142,0.1); color: var(--main-color); }
.program-card .badge.bg-vacation { background: rgba(0,112,148,0.1); color: var(--second-color); }

.program-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 15px; color: #1f2937; letter-spacing: -0.5px; }
.program-card p.desc { font-size: 15px; color: #4b5563; line-height: 1.6; margin-bottom: 30px; flex-grow: 1; word-break: keep-all; }

/* 다운로드 박스 */
.download-box { background: #f9fafb; border-radius: 10px; padding: 20px; margin-bottom: 25px; border: 1px solid #e5e7eb; }
.download-box .dl-title { font-size: 14px; font-weight: 700; color: #374151; margin-bottom: 12px; display: flex; align-items: center; }
.download-box .dl-title::before { content: '📁'; margin-right: 6px; font-size: 16px; }

.btn-download { display: flex; align-items: center; justify-content: space-between; background: #fff; border: 1px solid #d1d5db; padding: 12px 16px; border-radius: 8px; font-size: 14px; color: #374151; font-weight: 500; margin-bottom: 10px; transition: 0.2s; text-decoration: none; }
.btn-download:hover { border-color: var(--main-color); color: var(--main-color); box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.btn-download:last-child { margin-bottom: 0; }
.btn-download .file-icon { font-size: 18px; margin-right: 10px; }
.btn-download .file-name { flex-grow: 1; text-align: left; }
.btn-download .down-icon { color: #9ca3af; font-size: 16px; }

/* 신청하기 버튼 */
.btn-apply-go { width: 100%; text-align: center; background: var(--main-color); color: #fff; padding: 16px 0; border-radius: 8px; font-weight: 700; font-size: 16px; transition: 0.2s; border: none; cursor: pointer; display: block; text-decoration: none; }
.btn-apply-go:hover { background: #2a1f63; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(63,47,142,0.3); }

/* 모바일 반응형 */
@media (max-width: 768px) {
    .program-grid { grid-template-columns: 1fr; }
    .top-navbar { padding: 15px 20px; }
    .page-title-wrap h2 { font-size: 24px; }
}

/* -----------------------------------
    4. 근로자 모바일 동의서 폼 (worker/consent_form.php)
----------------------------------- */
.mobile-container { max-width: 600px; margin: 0 auto; padding: 20px; background: #fff; min-height: 100vh; }
.mobile-header { text-align: center; padding: 20px 0 30px; border-bottom: 2px solid #f3f4f6; margin-bottom: 30px; }
.mobile-header h2 { font-size: 22px; font-weight: 800; color: var(--second-color); margin-bottom: 10px; }
.mobile-header p { font-size: 14px; color: #6b7280; word-break: keep-all; }

.section-title { font-size: 18px; font-weight: 700; color: #1f2937; margin-bottom: 15px; display: flex; align-items: center; }
.section-title::before { content: ''; display: inline-block; width: 4px; height: 18px; background: var(--second-color); margin-right: 8px; border-radius: 2px; }

/* 약관 스크롤 박스 */
.terms-box { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 15px; height: 150px; overflow-y: auto; font-size: 13px; color: #4b5563; line-height: 1.6; margin-bottom: 15px; }

/* 터치 친화적 라디오/체크박스 */
.check-row { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; border-bottom: 1px dashed #e5e7eb; }
.check-row:last-child { border-bottom: none; }
.check-question { font-size: 14px; color: #374151; font-weight: 500; width: 65%; word-break: keep-all; }
.check-options { display: flex; gap: 15px; }
.check-options label { display: flex; align-items: center; font-size: 14px; font-weight: 600; cursor: pointer; color: #4b5563; }
.check-options input[type="radio"], .check-options input[type="checkbox"] { width: 18px; height: 18px; margin-right: 6px; accent-color: var(--second-color); }

/* 전체 동의 박스 */
.agree-all-box { background: rgba(0,112,148,0.05); border: 1px solid rgba(0,112,148,0.2); padding: 20px; border-radius: 10px; margin: 30px 0; display: flex; align-items: center; justify-content: center; }
.agree-all-box label { font-size: 16px; font-weight: 700; color: var(--second-color); display: flex; align-items: center; }
.agree-all-box input[type="checkbox"] { width: 22px; height: 22px; margin-right: 10px; accent-color: var(--second-color); }

/* 서명 영역 */
.signature-box { background: #fff; border: 2px solid #e5e7eb; border-radius: 10px; padding: 25px 20px; text-align: center; margin-bottom: 40px; }
.signature-box p { font-size: 14px; color: #6b7280; margin-bottom: 15px; }
.signature-box input[type="text"] { width: 100%; max-width: 250px; padding: 12px; font-size: 18px; font-weight: 700; text-align: center; border: 1px solid #d1d5db; border-radius: 6px; }
.signature-box input[type="text"]:focus { border-color: var(--second-color); outline: none; box-shadow: 0 0 0 3px rgba(0,112,148,0.1); }

.btn-submit-mobile { width: 100%; padding: 18px 0; background: var(--second-color); color: #fff; border: none; border-radius: 12px; font-size: 18px; font-weight: 800; cursor: pointer; transition: 0.2s; box-shadow: 0 4px 15px rgba(0,112,148,0.2); }
.btn-submit-mobile:hover { background: #005a77; }

   /* 1. 스텝 인디케이터 커스텀 (딥 퍼플 테마) */
        .step-indicator { display: flex; gap: 10px; margin-bottom: 30px; }
        .step { flex: 1; text-align: center; padding: 15px 5px; background: #fff; color: #9ca3af; border-radius: 8px; font-weight: 700; font-size: 14px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
        .step.active { background: var(--main-color); color: #fff; }

        /* 2. 테이블 디자인 보강 */
        .apply-form-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-bottom: 30px; }
        .apply-form-table th { background: #f8f9fa; padding: 20px; text-align: left; border-bottom: 1px solid #eee; width: 220px; font-size: 15px; color: #374151; }
        .apply-form-table td { padding: 20px; border-bottom: 1px solid #eee; }

        /* 3. 단위(명, 원)가 붙은 인풋 박스 */
        .input-with-unit { display: inline-flex; align-items: center; position: relative; width: 100%; max-width: 250px; }
        .input-with-unit input { padding-right: 40px; } /* 글자가 단위와 겹치지 않게 */
        .input-with-unit .unit-text { position: absolute; right: 15px; font-weight: 700; color: var(--text-muted); font-size: 14px; }

        /* 4. 체크박스/라디오 디자인 */
        .choice-group { display: flex; flex-wrap: wrap; gap: 20px; }
        .choice-item { display: flex; align-items: center; cursor: pointer; font-weight: 500; }
        .choice-item input { width: 20px; height: 20px; margin-right: 8px; accent-color: var(--main-color); cursor: pointer; }

        .form-section-title { font-size: 18px; font-weight: 800; color: var(--main-color); margin: 40px 0 15px; display: flex; align-items: center; }
        .form-section-title::before { content: '✔'; margin-right: 8px; }
		
		    /* 메뉴 구분을 위한 추가 스타일 */
        .nav-links { display: flex; align-items: center; gap: 20px; margin-right: 25px; }
        .nav-link-item { color: #555; text-decoration: none; font-size: 14px; font-weight: 500; transition: 0.2s; }
        .nav-link-item:hover { color: var(--main-color); }
        .nav-link-item.highlight { color: var(--main-color); font-weight: 700; border-bottom: 2px solid var(--main-color); padding-bottom: 2px; }
        .user-greeting { font-size: 14px; color: #333; margin-right: 15px; padding-right: 15px; border-right: 1px solid #eee; }
		
		        .mypage-container { max-width: 800px; margin: 40px auto; padding: 0 20px; }
        .content-section { background: #fff; border-radius: 12px; padding: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-bottom: 30px; }
        .section-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; color: #333; display: flex; align-items: center; }
        
        /* 최초 로그인 시 강조 효과 애니메이션 */
        @keyframes highlight-pulse {
            0% { box-shadow: 0 0 0 0px rgba(217, 72, 68, 0.4); }
            70% { box-shadow: 0 0 0 15px rgba(217, 72, 68, 0); }
            100% { box-shadow: 0 0 0 0px rgba(217, 72, 68, 0); }
        }
        .highlight-focus { border: 2px solid var(--main-color); animation: highlight-pulse 2s infinite; }

        .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
        .form-group { margin-bottom: 15px; }
        .form-group label { display: block; font-weight: 500; margin-bottom: 8px; font-size: 14px; color: #666; }
        .form-group input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; box-sizing: border-box; }
        .form-group input:focus { border-color: var(--main-color); outline: none; }
        
        .btn-save { background: var(--main-color); color: #fff; border: none; padding: 15px 30px; border-radius: 8px; font-weight: 700; cursor: pointer; width: 100%; font-size: 16px; margin-top: 10px; transition: 0.3s; }
        .btn-save:hover { opacity: 0.9; transform: translateY(-1px); }
		
		        /* 2단계 전용 보조 스타일 (전부 style.css에 있다면 삭제해도 무방합니다) */
        .survey-table { width: 100%; border-collapse: collapse; background: #fff; margin-bottom: 30px; border-top: 2px solid var(--main-color); }
        .survey-table th { background: #f8f9fa; padding: 15px; border: 1px solid #eee; font-size: 14px; text-align: left; }
        .survey-table td { padding: 15px; border: 1px solid #eee; font-size: 14px; line-height: 1.6; }
        .survey-title-row { background: #f1f3f9 !important; font-weight: 800; color: #333; }
        .radio-cell { text-align: center; width: 180px; }
        .radio-cell label { cursor: pointer; font-weight: 700; margin: 0 8px; color: #4b5563; }
        .radio-cell input { width: 18px; height: 18px; vertical-align: middle; margin-right: 4px; accent-color: var(--main-color); }
        
        .final-notice-box { background: #fff; border: 2px solid #e5e7eb; border-radius: 12px; padding: 30px; margin: 40px 0; }
        .final-notice-box p { font-size: 14px; color: #4b5563; line-height: 1.8; margin-bottom: 20px; word-break: keep-all; }
		
  .consent-wrapper { background: #fff; border-radius: 12px; padding: 40px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
        .consent-box { background: #f9fafb; border: 1px solid #e5e7eb; padding: 25px; border-radius: 8px; line-height: 1.7; font-size: 15px; color: #374151; margin-bottom: 30px; }
        .consent-box h4 { font-size: 17px; margin-bottom: 15px; color: #111827; font-weight: 800; }
        
        /* 약관 테이블 전용 */
        .consent-table { width: 100%; border-collapse: collapse; margin: 15px 0; font-size: 13px; }
        .consent-table th, .consent-table td { border: 1px solid #d1d5db; padding: 10px; text-align: center; }
        .consent-table th { background: #f3f4f6; font-weight: 700; }

        /* 예쁜 체크박스 디자인 */
        .agree-selector { display: flex; justify-content: center; gap: 40px; margin-top: 30px; padding: 20px; background: #f1f3f9; border-radius: 50px; }
        .agree-item { display: flex; align-items: center; cursor: pointer; font-size: 18px; font-weight: 800; transition: 0.2s; }
        .agree-item input { width: 24px; height: 24px; margin-right: 10px; accent-color: var(--main-color); cursor: pointer; }
        .agree-item.active { color: var(--main-color); }
		
		   .pledge-wrapper { background: #fff; border-radius: 12px; padding: 40px; border: 1px solid #e5e7eb; position: relative; }
        .optional-badge { position: absolute; top: 20px; right: 20px; background: #f3f4f6; color: #6b7280; padding: 5px 12px; border-radius: 4px; font-size: 13px; font-weight: 700; }
        
        .pledge-content { border: 1px solid #374151; padding: 30px; margin: 20px 0; line-height: 1.8; }
        .pledge-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
        .pledge-table th { background: #f8f9fa; border: 1px solid #d1d5db; padding: 12px; width: 180px; text-align: left; font-size: 14px; }
        .pledge-table td { border: 1px solid #d1d5db; padding: 12px; font-size: 14px; }

        .signature-area { text-align: center; margin-top: 50px; }
        .signature-line { font-size: 20px; font-weight: 800; margin-bottom: 20px; }
        .sig-input { border: none; border-bottom: 2px solid #333; width: 200px; text-align: center; font-size: 22px; font-weight: 900; outline: none; }
        
        /* 확약 체크박스 강조 */
        .pledge-check-box { background: #fffaf0; border: 1px solid #feebc8; padding: 20px; border-radius: 8px; margin-bottom: 30px; display: flex; align-items: center; gap: 15px; cursor: pointer; }
        .pledge-check-box input { width: 24px; height: 24px; accent-color: #dd6b20; }
        .pledge-check-box span { font-weight: 800; color: #9c4221; font-size: 16px; }
		
		/* 활성화된 스텝의 배경과 글자색 강제 설정 */
.step.active {
    background-color: #4a3f9a !important; /* 동형님이 설정한 메인 컬러 */
}

/* 활성화된 스텝 내부의 텍스트와 링크를 모두 하얀색으로 */
.step.active, 
.step.active a {
    color: #ffffff !important; 
    text-decoration: none;
}

/* 호버 시에도 글자색 유지 */
.step.active a:hover {
    color: #ffffff !important;
}

/* 제출 완료 버튼 (비활성화 느낌) */
.btn-apply-go.btn-complete {
    background: #e5e7eb !important;
    cursor: default;
    border: 1px solid #d1d5db;
}

/* 이어 쓰기 버튼 (강조) */
.btn-apply-go.btn-ing {
    background: #4a3f9a !important; /* 메인 테마 색상 */
    box-shadow: 0 4px 10px rgba(74, 63, 154, 0.3);
}
/* 버튼 상태별 색상 (CSS 파일이 있다면 그쪽에 넣으셔도 됩니다) */
    .btn-apply-go.btn-ing { background-color: #f59e0b !important; /* 주황색 (작성중) */ }
    .btn-apply-go.btn-complete { background-color: #10b981 !important; /* 녹색 (완료/수정) */ }
	
	/* '아니오' 라벨 강조 스타일 */
    .radio-no { 
        font-weight: 800 !important; 
        color: #1e293b; /* 진한 남색 계열 */
        margin-left: 10px;
    }
    /* 라디오 버튼 자체 크기 살짝 키움 (선택 편의성) */
    .radio-cell input[type="radio"] {
        width: 16px;
        height: 16px;
        vertical-align: middle;
        cursor: pointer;
    }
    .radio-cell label {
        cursor: pointer;
        padding: 5px;
    }