/* ================================================================
   회원가입 페이지 전용 스타일 (register.php)
   ================================================================ */

/* --- 전체 섹션 --- */
.reg-section {
    min-height: calc(100vh - 80px);
    display: flex;
    background: #f1f5f9;
    align-items: center;
    padding: 40px 20px;
}

/* --- 1500px 래퍼 컨테이너 --- */
.reg-container {
    display: flex;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    overflow: hidden;
}

/* --- 좌측 사이드 패널 (PC) --- */
.reg-side {
    flex: 0 0 450px;
    /* 바탕은 눈을 끌지 않아야 한다 — 봐야 할 것은 오른쪽 가입 폼이다.
       진한 파랑은 450px 폭이 통째로 쨍했고, 그 위 흰 글자는 대비도 낮았다.
       아주 옅게 두어 오른쪽 폼과 이어지게 하고, 파란 빛깔은
       로고·아이콘에서 낸다. 작게 쓰면 오히려 또렷하다. */
    background: linear-gradient(165deg, #f8fbff 0%, #eef5ff 100%);
    border-right: 1px solid #dbeafe;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
}
.reg-side::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 320px; height: 320px;
    background: rgba(59,130,246,0.07);
    border-radius: 50%;
}
.reg-side::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -60px;
    width: 240px; height: 240px;
    background: rgba(59,130,246,0.05);
    border-radius: 50%;
}
.reg-side-inner { position: relative; z-index: 1; width: 100%; }
.reg-side-logo {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 32px;
    box-shadow: 0 6px 16px rgba(37,99,235,0.25);
}
.reg-side h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 14px 0;
    line-height: 1.3;
}
.reg-side p {
    font-size: 1.15rem;
    color: #475569;
    line-height: 1.7;
    margin: 0 0 36px 0;
}

/* 사이드 혜택 리스트 */
.reg-benefit-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.reg-benefit-item {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #334155;
    font-size: 1.05rem;
    font-weight: 500;
}
.reg-benefit-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: #3b82f6;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    color: #fff;
}

/* 이미 계정 있음 링크 */
.reg-side-footer {
    margin-top: 48px;
    font-size: 1.05rem;
    /* 옅은 바탕이라 흰 글자는 사라진다 */
    color: #94a3b8;
}
.reg-side-footer a {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(37,99,235,0.35);
    padding-bottom: 1px;
    transition: border-color 0.2s;
}
/* 손을 올린 것이 보여야 누를 수 있는 줄 안다 — 흰 테두리는 옅은 바탕에서 사라진다 */
.reg-side-footer a:hover { border-color: #2563eb; color: #1d4ed8; }

/* --- 우측 폼 영역 --- */
.reg-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background: #fff;
}
.reg-form-wrap {
    width: 100%;
    max-width: 850px;
}

/* --- 폼 헤더 (모바일에서만 보임) --- */
.reg-mobile-header {
    display: none;
    text-align: center;
    margin-bottom: 32px;
}
.reg-mobile-header h2 {
    font-size: 1.9rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px 0;
}
.reg-mobile-header p { color: #64748b; font-size: 1rem; margin: 0; }

/* --- 진행 단계 표시 --- */
.reg-steps {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
    gap: 0;
}
.reg-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    position: relative;
}
.reg-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 16px;
    left: calc(50% + 16px);
    right: calc(-50% + 16px);
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
}
.reg-step.done:not(:last-child)::after,
.reg-step.active:not(:last-child)::after {
    background: linear-gradient(90deg, #3b82f6, #e2e8f0);
}
.reg-step-dot {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    background: #e2e8f0;
    color: #94a3b8;
    z-index: 1;
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
}
.reg-step.active .reg-step-dot {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59,130,246,0.2);
}
.reg-step.done .reg-step-dot {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}
.reg-step-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    white-space: nowrap;
}
.reg-step.active .reg-step-label { color: #3b82f6; }
.reg-step.done .reg-step-label { color: #10b981; }

/* --- SNS 배너 --- */
.reg-sns-banner {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.reg-sns-banner-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.reg-sns-banner-icon.kakao { background: #FEE500; color: #3c1e1e; }
.reg-sns-banner-icon.naver { background: #03C75A; color: #fff; font-size: 1rem; font-weight: 900; }
.reg-sns-banner-text h4 {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e3a8a;
    margin: 0 0 3px 0;
}
.reg-sns-banner-text p {
    font-size: 0.82rem;
    color: #3b5dbf;
    margin: 0;
}

/* --- 소셜 가입 버튼 그룹 --- */
.reg-social-section {
    margin-bottom: 28px;
}
.reg-divider {
    position: relative;
    text-align: center;
    margin: 0 0 26px 0;
}
.reg-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 1px;
    background: #e2e8f0;
}
.reg-divider-text {
    position: relative;
    display: inline-block;
    background: #f1f5f9;
    padding: 0 14px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #94a3b8;
}
.reg-social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.reg-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}
.reg-social-btn.kakao {
    background: #FEE500;
    color: #191919;
    border-color: #f5dc00;
}
.reg-social-btn.kakao:hover {
    background: #f5dc00;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(254,229,0,0.4);
}
.reg-social-btn.naver {
    background: #03C75A;
    color: #fff;
    border-color: #02b350;
}
.reg-social-btn.naver:hover {
    background: #02b350;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(3,199,90,0.35);
}
.reg-social-n {
    font-size: 1.1rem;
    font-weight: 900;
    font-family: 'Inter', sans-serif;
    line-height: 1;
}

/* --- 폼 카드 섹션 --- */
.reg-form-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.reg-section-title {
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #94a3b8;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.reg-section-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    background: #3b82f6;
    border-radius: 2px;
}

/* --- 폼 그리드 --- */
.reg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.reg-grid-full { grid-column: span 2; }

/* --- 폼 필드 --- */
.reg-field { display: flex; flex-direction: column; gap: 8px; }
.reg-label {
    font-size: 1rem;
    font-weight: 700;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 5px;
}
.reg-label .req { color: #ef4444; font-size: 0.8rem; }
.reg-label .opt { color: #94a3b8; font-size: 0.8rem; font-weight: 500; }
.reg-input-wrap { position: relative; }
.reg-input {
    width: 100%;
    padding: 14px 46px 14px 44px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.05rem;
    color: #1e293b;
    background: #f8fafc;
    transition: all 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
}
.reg-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.reg-input.is-valid {
    border-color: #10b981;
    background: #f0fdf4;
}
.reg-input.is-error {
    border-color: #ef4444;
    background: #fff5f5;
}
.reg-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
    pointer-events: none;
    transition: color 0.2s;
}
.reg-input-wrap:focus-within .reg-input-icon { color: #3b82f6; }
.reg-pw-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 1.1rem;
    padding: 4px;
    transition: color 0.2s;
    line-height: 1;
}
.reg-pw-toggle:hover { color: #475569; }

/* 중복확인 버튼 + 인풋 */
.reg-id-wrap {
    display: flex;
    gap: 8px;
}
.reg-id-wrap .reg-input-wrap { flex: 1; }
.reg-id-check-btn {
    padding: 0 20px;
    background: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.reg-id-check-btn:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}
.reg-field-msg {
    font-size: 0.78rem;
    min-height: 18px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.reg-field-msg.ok  { color: #10b981; }
.reg-field-msg.err { color: #ef4444; }
.reg-field-hint {
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.5;
}

/* 비밀번호 강도 표시 */
.pw-strength {
    height: 4px;
    border-radius: 2px;
    background: #e2e8f0;
    margin-top: 6px;
    overflow: hidden;
}
.pw-strength-bar {
    height: 100%;
    border-radius: 2px;
    transition: all 0.3s ease;
    width: 0%;
}
.pw-strength-label {
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 3px;
    min-height: 14px;
}

/* --- 동의 섹션 --- */
.reg-agree-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}
.reg-agree-all {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    user-select: none;
}
.reg-agree-all label {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    flex: 1;
}
.reg-agree-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
    border-top: 1px solid #f1f5f9;
}
.reg-agree-item:first-of-type { border-top: none; }
.reg-agree-item:hover { background: #f8fafc; }
.reg-agree-item label {
    font-size: 0.95rem;
    color: #374151;
    cursor: pointer;
    flex: 1;
    font-weight: 500;
}
.reg-agree-item .req-tag {
    font-size: 0.7rem;
    font-weight: 700;
    color: #ef4444;
    background: #fee2e2;
    padding: 2px 7px;
    border-radius: 20px;
    flex-shrink: 0;
}
.reg-agree-item .opt-tag {
    font-size: 0.7rem;
    font-weight: 700;
    color: #6366f1;
    background: #eef2ff;
    padding: 2px 7px;
    border-radius: 20px;
    flex-shrink: 0;
}
.reg-agree-view {
    font-size: 0.75rem;
    font-weight: 700;
    color: #3b82f6;
    background: none;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 3px 10px;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
    white-space: nowrap;
}
.reg-agree-view:hover { background: #eff6ff; }

/* 커스텀 체크박스 */
.reg-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
    background: #fff;
    position: relative;
}
.reg-checkbox:checked {
    background: #3b82f6;
    border-color: #3b82f6;
}
.reg-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 4px; top: 1px;
    width: 6px; height: 10px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

/* 수신동의 체크박스 행 */
.reg-recv-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.reg-recv-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
}

/* 에러 메시지 박스 */
.reg-error-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    color: #991b1b;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    animation: shakeX 0.4s ease;
}
@keyframes shakeX {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

/* 가입 완료 버튼 */
.reg-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(37,99,235,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.02em;
}
.reg-submit-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37,99,235,0.4);
}
.reg-submit-btn:active { transform: translateY(0); }

/* 로그인 링크 */
.reg-login-link {
    text-align: center;
    margin-top: 22px;
    font-size: 1rem;
    color: #64748b;
}
.reg-login-link a {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
    margin-left: 4px;
}
.reg-login-link a:hover { text-decoration: underline; }

/* ===================================================
   약관 모달
   =================================================== */
.agree-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    box-sizing: border-box;
}
.agree-modal-content {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 680px;
    max-height: 82vh;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
    from { opacity: 0; transform: scale(0.94) translateY(10px); }
    to   { opacity: 1; transform: scale(1)  translateY(0); }
}
.agree-modal-header {
    padding: 20px 26px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}
.agree-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
}
.close-agree-btn {
    background: #f1f5f9;
    border: none;
    width: 32px; height: 32px;
    border-radius: 8px;
    font-size: 1.1rem;
    color: #64748b;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}
.close-agree-btn:hover { background: #e2e8f0; color: #1e293b; }
.agree-modal-body {
    padding: 24px 26px;
    background: #fff;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #334155;
    flex: 1;
}
.agree-modal-footer {
    padding: 16px 26px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    gap: 12px;
    flex-wrap: wrap;
}
.agree-footer-hint {
    font-size: 0.8rem;
    color: #94a3b8;
}
.btn-agree-confirm {
    padding: 10px 28px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.btn-agree-confirm:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 4px 12px rgba(37,99,235,0.35);
}

/* ===================================================
   반응형
   =================================================== */
@media (max-width: 900px) {
    .reg-side { display: none; }
    .reg-section { min-height: auto; background: #f1f5f9; padding: 20px 10px; }
    .reg-container { box-shadow: none; background: transparent; display: block; }
    .reg-main { padding: 24px 16px 40px; background: transparent; }
    .reg-mobile-header { display: block; }
    .reg-form-section { padding: 20px; }
    .reg-grid { grid-template-columns: 1fr; gap: 16px; }
    .reg-grid-full { grid-column: span 1; }
    .reg-steps { display: none; }
}
@media (max-width: 480px) {
    .reg-main { padding: 16px 10px 32px; }
    .reg-form-section { padding: 16px; border-radius: 14px; }
    .reg-social-grid { grid-template-columns: 1fr; }
    .reg-recv-row { flex-direction: column; gap: 10px; }
    .reg-submit-btn { font-size: 0.95rem; padding: 14px; }
}

/* ── 뼈대에서 옮겨 온 인라인 꾸밈 (커서룰 §10) ──────────────────
 *  이름을 세 번 겹쳐 (0,3,0) 으로 올린다 — 인라인은 (1,0,0) 이었으므로
 *  클래스 하나로는 다른 규칙에 진다. `!important` 는 쓰지 않는다.
 *  옮긴 자리: application/view/skin/default/member/register.tpl.php
 * ────────────────────────────────────────────────────────────── */
.rg-txt-01.rg-txt-01.rg-txt-01 { font-size:0.7rem; }
.rg-txt-02.rg-txt-02.rg-txt-02 { font-size:1.1rem;flex-shrink:0; }
.rg-txt-03.rg-txt-03.rg-txt-03 { font-size:1.1rem; }
.rg-mg-04.rg-mg-04.rg-mg-04 { margin-top:20px;margin-bottom:0; }
.rg-clr-05.rg-clr-05.rg-clr-05 { background:#f0fdf4;border:1px solid #bbf7d0;border-radius:10px;padding:12px 16px;font-size:0.83rem;color:#166534;display:flex;align-items:center;gap:8px; }
.rg-clr-06.rg-clr-06.rg-clr-06 { color:#22c55e; }
