/* ==================================== */
/* 🚀 1. 기본 설정 및 공통 스타일 */
/* ==================================== */

body {
    background-color: #f0f2f5; /* 전체 배경색 */
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    line-height: 1.5;
    font-size: 14px;
}

a {
    color: #5d5dff;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #4343e8;
    text-decoration: underline;
}

/* 전체 화면 컨테이너 (auth-wrapper 및 admin-register-card를 중앙 정렬) */
.outer-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1200px; /* 전체 가로 레이아웃의 최대 너비 */
    padding: 20px;
    box-sizing: border-box;
}

/* 헤더 - 공통 */
.auth-header {
    padding-bottom: 20px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0; /* 관리자 등록 카드용 구분선 유지 */
    margin-bottom: 25px; /* 관리자 등록 카드용 마진 유지 */
}

.auth-header h2 {
    color: #222;
    font-size: 1.5rem;
    margin: 10px 0 5px 0;
    font-weight: 800;
}

.auth-header p {
    color: #777;
    margin-bottom: 0;
    font-size: 0.95rem;
}

.logo-icon {
    display: block;
    margin: 0 auto;
    width: 28px;
    height: 28px;
    fill: #5d5dff;
}


/* 입력 그룹 - 공통 */
.input-group {
    text-align: left;
    margin-bottom: 18px;
    position: relative;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.input-group input[type="text"],
.input-group input[type="email"],
.input-group input[type="password"],
.input-group input[type="tel"] {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 9px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
    border-color: #7575FF;
    box-shadow: 0 0 0 3px rgba(117, 117, 255, 0.1);
    outline: none;
}

/* 버튼 - 공통 */
.btn {
    display: block;
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 9px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s, transform 0.1s;
    margin-top: 10px;
    font-weight: 700;
}

.btn-primary {
    background-color: #5d5dff;
    color: #fff;
    margin-top: 15px; /* 로그인 화면과의 일관성을 위해 조정 */
}

.btn-primary:hover {
    background-color: #4343e8;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #f0f2f5;
    color: #555;
    margin-top: 15px;
}

.btn-secondary:hover {
    background-color: #e0e2e5;
}

.btn-danger {
    background-color: #e74c3c;
    color: #fff;
}

.btn-link {
    background: none;
    color: #777;
    margin-top: 5px;
    font-size: 0.9rem;
    padding: 5px;
    display: block; /* 링크도 블록으로 */
}

.small-link-gray {
    font-size: 0.8rem;
    color: #aaa;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
}
.small-link-gray:hover {
    text-decoration: underline;
    color: #888;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 메시지 - 공통 */
.error-message {
    color: #e74c3c;
    font-size: 0.8rem;
    margin: 5px 0 10px 0;
    text-align: left;
    padding: 5px 0;
    /* JS에서 .show 클래스로 제어 */
    display: none;
}

.error-message.show {
    display: block;
}

.warning-message {
    color: #a87e2b;
    background-color: #fff9e6;
    border: 1px solid #ffe58f;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    text-align: left;
}
.warning-message strong {
    display: block;
    margin-bottom: 5px;
    color: #8a6d3b;
}

.success-message {
    color: #27ae60;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #e6fff2;
    border-radius: 8px;
}

/* 비밀번호 강도 표시 - 공통 */
.password-strength {
    height: 5px;
    width: 100%;
    background-color: #eee;
    border-radius: 2.5px;
    margin-top: 8px;
    transition: background-color 0.3s, width 0.3s;
}

.password-strength.strength-weak {
    background-color: #e74c3c;
    width: 33%;
}

.password-strength.strength-medium {
    background-color: #f39c12;
    width: 66%;
}

.password-strength.strength-strong {
    background-color: #27ae60;
    width: 100%;
}

.separator { /* 구분선 */
    border: 0;
    border-top: 1px solid #eee;
    margin: 25px 0 20px 0;
}

/* 하단 링크 및 지원 정보 - 공통 */
.auth-links {
    margin-top: 25px;
    font-size: 0.85rem;
    color: #777;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    text-align: center; /* 관리자 등록 카드 중앙 정렬 반영 */
}

.auth-links.center-links {
    justify-content: center;
}
.auth-links span {
    white-space: nowrap;
}

.auth-support {
    text-align: left;
    font-size: 0.85rem;
    color: #999;
}
.auth-support.center-support {
    text-align: center;
}

.auth-support h4 {
    font-weight: 700;
    color: #666;
    margin-bottom: 8px;
    font-size: 0.9rem;
}
.auth-support p {
    margin: 3px 0;
}
.support-time {
    margin-top: 8px;
    font-size: 0.75rem;
}


/* ==================================== */
/* 🖼️ 2. 로그인 화면 (가로형 레이아웃 고유 스타일) */
/* ==================================== */

.auth-wrapper.horizontal {
    display: flex;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    min-height: 550px;
}

/* 일러스트 영역 */
.illustration-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f7f9fc;
    padding: 20px;
    min-width: 300px;
}

.illustration-area img.main-illustration {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* 로그인 폼 영역 */
.auth-card-area {
    flex: 1;
    padding: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 400px;
}

/* 화면 전환 관리 */
.auth-container {
    display: none;
    animation: fadeIn 0.5s;
    width: 100%;
}

.auth-container.active {
    display: block;
}

/* auth-card-area 내부의 기본 헤더는 숨김 (JS로 제어) */
.auth-card-area > .auth-header {
    display: none;
    padding-bottom: 20px; /* 로그인 화면 헤더 여백 조정 */
    margin-bottom: 25px; /* 로그인 화면 헤더 여백 조정 */
    border-bottom: none; /* 로그인 화면 헤더 구분선 제거 */
}

/* 활성화된 auth-container 내부의 헤더만 표시 */
.auth-container.active .auth-header {
    display: block;
}

/* 패스워드 찾기 단계 표시 (현재 HTML에는 없으나 원본 CSS에서 가져옴) */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 0 10px;
    font-size: 0.9rem;
    color: #ccc;
    position: relative;
    border-bottom: 1px solid #f0f2f5;
    margin-top: 10px;
}
.step-indicator span {
    flex-grow: 1;
    text-align: center;
    padding: 10px 0;
    position: relative;
    z-index: 10;
    transition: color 0.3s;
}
.step-indicator span::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: transparent;
    transition: background-color 0.3s;
}
.step-indicator span.active {
    color: #5d5dff;
    font-weight: 700;
}
.step-indicator span.active::after {
    background-color: #5d5dff;
}

/* 단계 컨텐츠 */
.step {
    display: none;
    text-align: left;
}

.step.active {
    display: block;
}

/* 정보 텍스트 */
p.info-text {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

/* ==================================== */
/* 🔑 3. 관리자 등록 화면 (세로형 카드 고유 스타일) */
/* ==================================== */

.admin-register-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    padding: 40px;
}


/* ==================================== */
/* 📱 4. 반응형 디자인 */
/* ==================================== */

@media (max-width: 768px) {
    /* 가로형 로그인 화면을 세로형으로 변경 */
    .auth-wrapper.horizontal {
        flex-direction: column; /* 세로형으로 변경 */
        max-width: 400px; /* 최대 너비 조정 */
        min-height: auto;
    }

    .illustration-area {
        height: 200px; /* 모바일에서 이미지 영역 높이 조정 */
        min-width: auto;
        padding: 15px;
        border-bottom: 1px solid #eee;
    }

    .auth-card-area {
        padding: 30px;
        min-width: auto;
    }
    
    /* 관리자 등록 카드의 반응형 조정 */
    .admin-register-card {
        padding: 30px 25px;
        margin: 10px;
    }
    
    .auth-header h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    /* 관리자 등록 카드의 더 좁은 화면 조정 */
    .admin-register-card {
        padding: 25px 20px;
    }
    
    .auth-header {
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
    
    .input-group {
        margin-bottom: 18px;
    }
}