/* 회원가입 페이지 main (header/footer 레이아웃 사용 시) */
.regist_main {
    padding: 120px 0 60px 0;
    min-height: 60vh;
}

/* 회원가입 본문 영역 (main.css 등과 겹치지 않도록 스코프) */
/* 컨테이너 및 패널 */
.regist_main .layout-center {
    margin: 40px auto;
    max-width: 700px; /* 좀 더 컴팩트하게 조정 */
    padding: 0 20px;
}

.regist_main .panel {
    border: 1px solid #e2e8f0;
    border-radius: 16px; /* 더 둥글고 부드럽게 */
    padding: 32px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); /* 은은한 입체감 */
}

.regist_main .panel-title {
    margin-bottom: 24px;
    font-size: 22px;
    letter-spacing: -0.5px;
    text-align: center; /* 제목 중앙 정렬로 안정감 부여 */
}

/* 약관 섹션 공통 */
.regist_main .agree-section {
    margin-bottom: 20px;
}

/* 전체 동의 강조 박스 */
.regist_main .agree-section-all {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
}

.regist_main .agree-row {
    display: flex;
    align-items: center;
    justify-content: space-between; /* 텍스트와 > 버튼을 양 끝으로 */
    padding: 10px 0;
}

/* 체크박스 레이블 */
/* 메인 컬러 포인트 및 인풋/체크박스 */
.regist_main .agree-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 15px;
    color: #475569; /* 부드러운 다크 그레이 */
    flex: 1;
}

/* 체크박스 본체 커스텀 */
.regist_main .agree-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd; /* 체크 전 테두리 */
    border-radius: 4px;
    background-color: #fff;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 체크되었을 때 스타일 */
.regist_main .agree-label input[type="checkbox"]:checked {
    background-color: #EE7200; /* 메인 오렌지 */
    border-color: #EE7200;
}

/* 체크 표시(V) - 가상 요소로 직접 그리기 */
.regist_main .agree-label input[type="checkbox"]:checked::before {
    content: '';
    position: absolute;
    width: 5px;   /* V의 짧은 쪽 */
    height: 10px;  /* V의 긴 쪽 */
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0; /* 테두리 두께로 선을 만듦 */
    transform: rotate(45deg); /* 회전시켜서 V자 완성 */
    margin-top: -2px; /* 위치 미세 조정 */
}

/* 필수/선택 태그 스타일 */
.regist_main .tag {
    font-size: 12px;
    font-weight: 600;
    margin-right: 4px;
}

.regist_main .tag-required {
    color: #EE7200; /* 필수 항목 강조 */
}

.regist_main .tag-optional {
    color: #94a3b8; /* 선택 항목은 차분하게 */
}

/* 상세보기 버튼 (>) */
.regist_main .btn-detail {
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 18px;
    padding: 5px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

.regist_main .btn-detail:hover {
    color: #EE7200; /* 호버 시 메인 컬러로 변화 */
    transform: translateX(2px);
}

/* 버튼 영역 */
.regist_main .panel-actions {
    margin-top: 32px;
}

.regist_main .btn-next {
    width: 100%;
    height: 52px;
    background: #EE7200; /* 메인 오렌지 */
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(238, 114, 0, 0.2); /* 은은한 오렌지 빛 그림자 */
    transition: all 0.2s;
}

.regist_main .btn-next:hover {
    background: #D96800; /* 살짝 어두운 오렌지로 변화 */
    box-shadow: 0 6px 15px rgba(238, 114, 0, 0.3);
}

/* 입력 영역 섹션 */
.regist_main .panel .panel-form-section {
    margin-top: 24px;
    padding-top: 4px;
}

.regist_main .panel .form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.regist_main .panel .form-row label {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
}

/* 공통 폼 컨트롤 포커스 효과 */
.regist_main .form-control:focus {
    border-color: #EE7200;
    box-shadow: 0 0 0 3px rgba(238, 114, 0, 0.1);
    outline: none;
}

/* 상태 메시지: 오렌지와 어울리는 톤으로 조정 */
.regist_main .regist-done-msg {
    margin: 0 0 16px;
    padding: 14px;
    background: #fff8f1; /* 따뜻한 미색 배경 */
    border: 1px solid #ffd8b5;
    border-radius: 8px;
    color: #8a4100; /* 짙은 갈색조 오렌지 */
    font-size: 14px;
    font-weight: 500;
}

.regist_main .regist-msg {
    margin: 0 0 16px;
    color: #64748b;
    font-size: 14px;
}

.regist_main .regist-error {
    margin: 0 0 16px;
    padding: 12px 16px;
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    color: #c53030; /* 에러는 명확한 레드로 유지하되 톤 다운 */
    font-size: 14px;
}

/* 약관 동의 섹션 (_common.css의 section padding 덮어씀) */
/* 약관 동의 섹션 */
.regist_main .agree-section {
    margin-bottom: 8px;
    padding: 0;
}

.regist_main .agree-section:last-of-type {
    margin-bottom: 0;
}

/* 약관 동의 행 */
.regist_main .agree-row {
    display: flex;
    align-items: center;
    padding: 14px 8px; /* 위아래 여백을 늘려 가독성 확보 */
    border-bottom: 1px solid #f1f5f9; /* 더 연한 선으로 변경 */
    transition: background-color 0.2s;
}

/* 마우스를 올렸을 때 살짝 강조 (선택 사항) */
.regist_main .agree-row:hover {
    background-color: #fafafa;
}

.regist_main .agree-section .agree-row:last-child {
    border-bottom: none;
}

/* 전체 동의 행 - 구분되도록 스타일 차별화 */
.regist_main .agree-row-all {
    border-bottom: 2px solid #f1f5f9; 

}

.regist_main .agree-row-all .label-text {
    font-weight: 700; /* 전체 동의 텍스트 강조 */
    font-size: 16px;
    color: #1e293b;
}

/* 레이블 및 체크박스 */
.regist_main .agree-label {
    display: inline-flex;
    align-items: center;
    gap: 12px; /* 간격을 조금 더 넓게 */
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.regist_main .agree-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #EE7200;
    flex-shrink: 0;
}

.regist_main .label-text {
    flex: 1;
    font-size: 15px;
    color: #475569;
    line-height: 1.4;
}

/* 태그 스타일: 쌩한 원색 대신 세련된 톤으로 */
.regist_main .tag {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    margin-right: 4px;
}

.regist_main .tag-required {
    color: #EE7200; /* 부드러운 블루 */
}

.regist_main .tag-optional {
    color: #94a3b8; /* 차분한 그레이 */
}

/* 상세보기 버튼 (>) */
.regist_main .btn-detail {
    flex-shrink: 0;
    width: 32px; /* 클릭 영역 확대 */
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    font-size: 16px;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s;
}

.regist_main .btn-detail:hover {
    color: #64748b;
    transform: translateX(2px); /* 마우스 올리면 살짝 움직이는 효과 */
}

/* 폼 섹션 (_common.css의 section padding 덮어씀) */
.regist_main .form-section {
    margin-bottom: 12px;
    padding: 0;
}

.regist_main .form-section:last-of-type {
    margin-bottom: 0;
}

.regist_main .form-section-title {
    margin: 0 0 8px 0;
    padding: 0 0 6px 0;
    font-size: 0.95rem;
    font-weight: bold;
    color: #333;
    border-bottom: 1px solid #ddd;
}

.regist_main .form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.regist_main .form-row .form-group {
    flex: 1;
    min-width: 0;
}

/* 폼 그룹 */
.regist_main .form-group {
    margin-bottom: 10px;
}

.regist_main .form-group label {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    font-weight: 500;
}

/* 라벨 없이 인풋만 + 우측 상단 * */
/* 인풋 그룹 컨테이너 */
.regist_main .form-group-inline {
    position: relative;
    margin-bottom: 16px;
}

/* 우측 상단 필수(*) 표시 */
.regist_main .form-group-inline .input-required {
    position: absolute;
    top: 14px; /* 높이에 맞춰 중앙 정렬 조정 */
    right: 16px;
    font-size: 14px;
    font-weight: bold;
    color: #EE7200; /* 메인 오렌지 컬러 적용 */
    line-height: 1;
    z-index: 5;
    pointer-events: none;
}

/* 기본 폼 컨트롤 스타일 */
.regist_main .form-control {
    width: 100%;
    max-width: 100%;
    height: 48px; /* 조금 더 시원한 높이 */
    box-sizing: border-box;
    padding: 10px 38px 10px 16px; /* 우측 필수 표시 공간 넉넉히 확보 */
    border: 1px solid #e2e8f0;
    border-radius: 10px; /* 패널 곡률과 통일감 부여 */
    font-size: 15px;
    color: #1e293b;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
}

/* 인풋 포커스(클릭) 상태 - 핵심! */
.regist_main .form-control:focus {
    outline: none;
    border-color: #EE7200;
    box-shadow: 0 0 0 4px rgba(238, 114, 0, 0.1); /* 부드러운 오렌지 글로우 */
    background-color: #fff;
}

/* 캡챠 인풋 위치 미세 조정 */
.regist_main .form-group-captcha-input .input-required,
.regist_main .captcha-input-wrap .input-required {
    top: 14px;
    right: 14px;
}

.regist_main .form-group-captcha-input .captcha-input,
.regist_main .captcha-input-wrap .captcha-input {
    padding-right: 30px;
}

/* 일반 텍스트 내 필수 표시 컬러 */
.regist_main .required {
    color: #EE7200;
    font-weight: bold;
}

/* 체크박스 그룹 */
.regist_main .form-group-checkbox {
    margin-top: 12px;
    margin-bottom: 12px;
}

.regist_main .checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #475569;
    font-weight: 500;
}

/* 체크박스 본체 커스텀 (이전 V 표시 로직 포함) */
.regist_main .checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    background-color: #fff;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.regist_main .checkbox-label input[type="checkbox"]:checked {
    background-color: #EE7200;
    border-color: #EE7200;
}

/* 체크 표시(V) */
.regist_main .checkbox-label input[type="checkbox"]:checked::before {
    content: "";
    position: absolute;
    top: 1px;
    left: 4.5px;
    width: 4.5px;
    height: 8.5px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
/* 캡챠 그룹 전체 컨테이너 */
.regist_main .captcha-group {
    margin-bottom: 20px;
}

.regist_main .captcha-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #334155;
}

/* 캡챠 로우: 요소들을 수평으로 깔끔하게 정렬 */
.regist_main .captcha-row {
    display: flex;
    align-items: stretch; /* 요소들의 높이를 통일 */
    gap: 10px;
    flex-wrap: wrap;
}

/* 캡챠 이미지 박스 */
.regist_main .captcha-image-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 140px; /* 조금 더 시원하게 확장 */
    height: 44px; /* 입력창 높이와 맞춤 */
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    overflow: hidden;
    flex-shrink: 0;
}

.regist_main .captcha-img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* 새로고침 버튼 */
.regist_main .captcha-refresh {
    padding: 8px;
    font-size: 12px;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    margin-left: 4px;
}

.regist_main .captcha-refresh:hover {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #cbd5e1;
}

/* 입력창 스타일 */
.regist_main .captcha-input {
    width: 130px;
    padding: 0 12px;
    height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.regist_main .captcha-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 하단 힌트 메세지 */
.regist_main .captcha-hint {
    margin-top: 8px;
    font-size: 13px;
    color: #94a3b8; /* 가독성을 해치지 않는 보조 텍스트 컬러 */
    display: flex;
    align-items: center;
    gap: 4px;
}

.regist_main .captcha-hint::before {
    content: '•';
    color: #2563eb;
    font-weight: bold;
}

/* 버튼 컨테이너 */
.regist_main .panel-actions {
    margin-top: 32px; /* 간격을 더 넓혀 답답함 해소 */
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
    text-align: right; /* 버튼을 우측 정렬하는 경우가 많음 */
}

/* 기본 버튼 공통 스타일 */
.regist_main .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px; /* 높이와 너비를 황금비율로 조정 */
    font-size: 14px;
    font-weight: 600; /* 글자를 조금 더 또렷하게 */
    border-radius: 8px; /* 둥근 모서리로 트렌디하게 */
    cursor: pointer;
    transition: all 0.2s ease; /* 부드러운 변화 효과 */
    border: 1px solid transparent;
    outline: none;
}

/* 다음/제출 버튼 (Primary) */
.regist_main .btn-next,
.regist_main .btn-submit {
    background-color: #ff9900; /* 주황색 배경 */
    border: 1px solid #e68a00;  /* 약간 더 진한 주황색 테두리 */
    color: #fff;               /* 글자색은 흰색 유지 */
    padding: 10px 20px;        /* 안쪽 여백 (필요시 조정) */
    border-radius: 4px;        /* 모서리 둥글게 */
    cursor: pointer;           /* 마우스 올리면 손가락 모양 */
    font-weight: bold;         /* 글자 두껍게 */
}

/* 마우스를 올렸을 때(Hover) 약간 더 진해지는 효과 */
.regist_main .btn-next:hover,
.regist_main .btn-submit:hover {
    background-color: #e68a00;
    border-color: #cc7a00;
}

/* 취소 버튼 (Outline/Secondary) */
.regist_main .btn-cancel {

    background: #fff;
    color: #64748b; /* 눈이 편안한 슬레이트 그레이 */
    border: 1px solid #e2e8f0;
    width: 50%;
    margin: 0 auto;
}

.regist_main .btn-cancel:hover {
    background: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
}

/* 버튼 클릭 시 눌리는 느낌 */
.regist_main .btn:active {
    transform: translateY(0);
    filter: brightness(0.9);
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal.is-open {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-box {
    position: relative;
    margin: 0 auto;
    max-width: 520px;
    width: 100%;
    max-height: 80vh;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.modal-title {
    margin: 0;
    font-size: 1.1rem;
}

.modal-close {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}




/* 주민번호 입력 */
.regist_main .jumin-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.regist_main .jumin-front {
    flex: 1;
    min-width: 0;
}

.regist_main .jumin-back {
    flex: 1;
    min-width: 0;
}

.regist_main .jumin-dash {
    font-size: 18px;
    color: #475569;
    flex-shrink: 0;
}

/* SMS 인증번호 받기 버튼 */
.regist_main .btn-sms-send {
    height: 48px;
    width: 120px;
    flex-shrink: 0;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.regist_main .btn-sms-send:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}

.regist_main .btn-sms-send:disabled {
    background: #94a3b8;
    border-color: #94a3b8;
    color: #fff;
    cursor: not-allowed;
}

/* 약관 모달 */
.terms-article { 
    max-width: 700px; /* 폭을 살짝 줄여 집중도를 높임 */
    margin: 40px auto; 
    font-family: 'Pretendard', -apple-system, sans-serif; /* 현대적인 폰트 적용 */
    line-height: 1.6; /* 1.8에서 1.6으로 최적화 */
    color: #444; 
}

.terms-header { 
    text-align: center; 
    margin-bottom: 30px; 
    border-bottom: 2px solid #111; 
    padding-bottom: 15px; 
}

.terms-header h1 { 
    font-size: 24px; 
    color: #000; 
    margin: 0; 
}

.terms-item {  
    padding: 4px 0; /* 위아래 간격 일정하게 조정 */
    border-bottom: 1px solid #eee;  
}

.terms-item strong { 
    display: block; 
    font-size: 15px; 
    color: #111; 
    margin-bottom: 6px; /* 제목과 본문 사이 간격 줄임 */
}

.terms-footer { 
    margin-top: 40px; 
    padding: 20px; 
    background: #f1f3f5; 
    border-radius: 8px; 
    text-align: center;
    font-size: 14px;
    color: #666;
}