/* 로그인 · 회원가입(계정 만들기 → 이용 방식 선택 → 기관 연결) · 아이디/비밀번호 찾기 · 재설정 (PUB-18 ~ PUB-20)
   2026-09-22 사본 디자인: 상단 메뉴(GNB)와 큰 푸터 없이, 회색 바탕 + 로고 + 흰 카드 + 아래 링크 3개로 된 전용 화면입니다.
   이 파일의 클래스는 모두 auth- 로 시작해 다른 화면(join.css 를 쓰는 기관 등록·기관 전환)과 겹치지 않습니다. */

.auth-body { background: var(--vb-color-surface-subtle); }

.auth {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 85px 20px 85px;
}

/* 로고 → 홈 */
.auth__logo {
    display: block;
    flex: none;
    width: 170px;
    height: 28px;
    background: var(--vb-color-brand-green);
    -webkit-mask: url("../images/logo-veribooks-mask.png") no-repeat 0 0 / 170px 28px;
    mask: url("../images/logo-veribooks-mask.png") no-repeat 0 0 / 170px 28px;
}
.auth__logo:focus-visible { outline: 2px solid var(--vb-color-brand-green); outline-offset: 4px; }

/* 흰 카드 */
.auth-card {
    width: min(var(--card-w, 600px), 100%);
    margin-top: 37px;
    padding: 45px 48px 40px;
    overflow: hidden;
    border-radius: 22px;
    background: var(--vb-color-surface-white);
    box-shadow: 0 10px 26px rgba(8, 26, 15, 0.08);
}
.auth-card--560 { --card-w: 560px; }
.auth-card--600 { --card-w: 600px; }
.auth-card--640 { --card-w: 640px; }
.auth-card--660 { --card-w: 660px; }
.auth-card[hidden] { display: none; }

.auth-card__title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    color: var(--vb-color-text-title);
}
.auth-card__desc {
    margin: 5px 0 0;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    color: var(--vb-color-brand-green);
}
.auth-card__body { margin-top: 30px; }

/* 상태 알약 (연결 완료 · 발송 완료 · 변경 완료) */
.auth-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 108px;
    height: 34px;
    margin: -3px auto 28px;
    padding: 0 26px;
    border-radius: 17px;
    background: var(--vb-color-brand-green-surface);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    color: var(--vb-color-text-title);
}

/* 입력 — 이 화면들은 16px 글자 · 8px 모서리 */
.auth-card .input {
    border-radius: 8px;
    font-size: 16px;
    line-height: 26px;
}
.auth-card .input::placeholder { color: var(--vb-color-state-disabled-text); }
.auth-card .input--error { border-width: 1.5px; padding-left: 17.5px; }
.auth-card .input--ok,
.auth-card .input--ok:focus { border: 1.5px solid var(--vb-color-brand-green); padding-left: 17.5px; }
.auth-card select.input {
    padding-right: 44px;
    background: var(--vb-color-surface-white) url("../images/auth-chevron-16.svg") no-repeat right 17px center / 16px 16px;
}
.auth-card select.input:has(option[value=""]:checked) { color: var(--vb-color-state-disabled-text); }
.auth-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.auth-fields { display: flex; flex-direction: column; gap: 12px; }
.auth-fields--14 { gap: 14px; }

/* 입력 + 버튼 한 줄 (중복 확인 · 인증번호 받기 · 코드 확인 · 검색) */
.auth-row { display: flex; gap: 12px; }
.auth-row .input { flex: 1; min-width: 0; }
.auth-row .btn { flex: none; width: var(--auth-btn-w, 132px); height: 56px; padding: 0 12px; }
.auth-row--176 { --auth-btn-w: 176px; }
.auth-row--153 { --auth-btn-w: 153px; }

/* 보조 버튼: 이 화면들은 굵은 글자 */
.auth-card .btn--secondary { font-weight: 600; }
/* 아이디 사용 가능 표시 버튼 */
.auth-card .btn--ok {
    background: #f0f7f2;
    box-shadow: inset 0 0 0 1px var(--vb-color-brand-green);
    font-weight: 600;
    color: var(--vb-color-brand-green);
    cursor: default;
}

/* 두 칸 (이름 · 생년월일) */
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* 이메일: 아이디 @ 도메인 [도메인 선택] */
.auth-email { display: flex; align-items: flex-start; }
.auth-email__id { flex: 150 1 0; min-width: 0; }
.auth-email__at {
    flex: none;
    width: 36px;
    font-size: 18px;
    font-weight: 600;
    line-height: 56px;
    text-align: center;
    color: var(--vb-color-text-secondary);
}
.auth-email__domain { flex: 170 1 0; min-width: 0; }
.auth-email__pick { flex: 180 1 0; min-width: 0; margin-left: 8px; }
.auth-card .auth-email__pick select.input,
.auth-card .auth-email__pick select.input:has(option[value=""]:checked) { color: var(--vb-color-text-primary); font-weight: 600; }
.auth-card .auth-email .input { padding-left: 15px; }
.auth-card .auth-email .input--error { padding-left: 14.5px; }

/* 입력 아래 안내 (오류 · 확인) */
.auth-msg {
    margin: 4px 0 0;
    font-size: 14px;
    line-height: 20px;
    color: var(--vb-color-semantic-error);
}
.auth-msg--ok { color: var(--vb-color-brand-green); }
.auth-msg--13 { margin-top: 8px; font-size: 13px; }

/* 약관 동의 상자 */
.auth-agree {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0 0;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--vb-color-brand-green-surface);
    list-style: none;
}
.auth-agree--guardian { gap: 16px; margin-top: 26px; padding: 19px 18px; }
.auth-agree li { display: flex; align-items: center; gap: 8px; }
.auth-agree .checkbox { flex: 1; min-width: 0; gap: 8px; font-size: 14px; line-height: 20px; color: var(--vb-color-text-secondary); }
.auth-agree--guardian .checkbox { gap: 8px; }
.auth-agree .auth-agree__all { color: var(--vb-color-brand-green); }
.auth-agree__view {
    flex: none;
    font-size: 14px;
    line-height: 20px;
    color: var(--vb-color-text-secondary);
}

/* 큰 버튼 · 아래 링크 */
.auth-submit { width: 100%; margin-top: 30px; }
.auth-agree + .auth-submit { margin-top: 16px; }
.auth-agree + .auth-submit--26 { margin-top: 26px; }
.auth-more {
    margin: 20px 0 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
    color: var(--vb-color-brand-green);
}
.auth-submit + .auth-more { margin-top: 16px; }
.auth-submit + .auth-more--20 { margin-top: 20px; }
.auth-msg--8 { margin-top: 8px; }
.auth-line + .auth-submit.auth-submit--34 { margin-top: 34px; }
.auth-msg--gap { margin-top: 14px; }
.auth-submit.auth-submit--25 { margin-top: 25px; }
.auth-more span + a { margin-left: 8px; }
.auth-more a:hover,
.auth-option-row a:hover { text-decoration: underline; }

/* 로그인 카드 */
.auth-card--login { padding: 48px 48px 44px; }
.auth-card--login .auth-card__body { margin-top: 20px; }
.auth-option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    font-size: 14px;
    line-height: 20px;
}
.auth-option-row .checkbox { color: var(--vb-color-text-muted); }
.auth-option-row a { font-weight: 600; color: var(--vb-color-brand-green); }
.auth-card--login .auth-submit { margin-top: 20px; }
.auth-card--login .auth-more { margin-top: 20px; }
.auth-more__lead { font-weight: 400; }

/* 이용 방식 선택 (PUB-19A 회원가입 완료) */
.auth-choices { display: flex; flex-direction: column; gap: 12px; margin: 30px 0 0; padding: 0; list-style: none; }
.auth-choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 86px;
    padding: 16px 20px;
    border: 1px solid var(--vb-color-border-default);
    border-radius: 14px;
    background: var(--vb-color-surface-white);
}
.auth-choice:hover { border-color: var(--vb-color-brand-green); }
.auth-choice:focus-visible { outline: 2px solid var(--vb-color-brand-green); outline-offset: 2px; }
.auth-choice__title { display: block; font-size: 16px; font-weight: 600; line-height: 26px; color: var(--vb-color-text-primary); }
.auth-choice__desc { display: block; margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--vb-color-text-secondary); }
.auth-choice__go { flex: none; font-size: 18px; font-weight: 600; line-height: 28px; color: var(--vb-color-brand-green); }

/* 기관 정보 상자 (기관 확인 · 승인 대기) */
.auth-org {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    padding: 22px 24px;
    border-radius: 14px;
    background: var(--vb-color-brand-green-surface);
    text-align: center;
}
.auth-org__label { margin: 0; font-size: 14px; font-weight: 600; line-height: 20px; color: var(--vb-color-brand-green); }
.auth-org__name { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.5; color: var(--vb-color-text-title); }
.auth-org__meta { margin: 0; font-size: 14px; line-height: 20px; color: var(--vb-color-brand-green); }
.auth-org + .auth-submit { margin-top: 20px; }

/* 한 줄 안내 상자 (연결 완료 · 발송한 이메일) */
.auth-line {
    display: block;
    margin: 30px 0 0;
    padding: 21px 10px;
    border-radius: 12px;
    background: var(--vb-color-brand-green-surface);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
    color: var(--vb-color-text-primary);
    white-space: pre-wrap;
}
.auth-line + .auth-submit { margin-top: 30px; }

/* 기관 검색 결과 */
.auth-results { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.auth-result {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-height: 72px;
    padding: 12px 18px;
    border: 1px solid var(--vb-color-border-default);
    border-radius: 12px;
    background: var(--vb-color-surface-white);
    color: var(--vb-color-text-primary);
    cursor: pointer;
}
.auth-result input { position: absolute; opacity: 0; pointer-events: none; }
.auth-result:has(input:checked) {
    padding: 11.5px 17.5px;
    border: 1.5px solid var(--vb-color-brand-green);
    background: var(--vb-color-brand-green-surface);
}
.auth-result:has(input:focus-visible) { outline: 2px solid var(--vb-color-brand-green); outline-offset: 2px; }
.auth-result__name { font-size: 16px; font-weight: 600; line-height: 26px; }
.auth-result__meta { font-size: 13px; line-height: 20px; }
.auth-results + .auth-submit { margin-top: 20px; }

/* 비밀번호 조건 */
.auth-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin: 20px 0 0;
    padding: 18px;
    border-radius: 12px;
    background: var(--vb-color-brand-green-surface);
    list-style: none;
    font-size: 13px;
    line-height: 20px;
    color: var(--vb-color-text-secondary);
}
.auth-rules + .auth-submit { margin-top: 25px; }

/* 아이디 찾기 / 비밀번호 찾기 탭 */
.auth-card--tabs { padding-top: 0; }
.auth-tabs {
    display: flex;
    margin: 0 -48px 45px;
    background: var(--vb-color-border-default);
}
.auth-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 61px;
    padding-top: 4px;
    font-size: 15px;
    font-weight: 600;
    color: #57695e;
}
.auth-tab.is-active {
    border-radius: 22px 22px 0 0;
    background: var(--vb-color-surface-white);
    color: var(--vb-color-text-primary);
}
.auth-tab:focus-visible { outline: 2px solid var(--vb-color-brand-green); outline-offset: -4px; }

/* 아래 링크 (개인정보처리방침 | 이용약관 | 고객지원) */
.auth-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 16px 85px;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}
.auth-foot a { color: var(--vb-color-brand-green); }
.auth-foot a + a::before {
    content: "";
    display: inline-block;
    width: 1px;
    height: 15px;
    margin: 0 14px;
    vertical-align: -2px;
    background: var(--vb-color-border-default);
}
.auth-foot a:hover { text-decoration: underline; }
.auth-foot a + a:hover::before { text-decoration: none; }

@media (max-width: 767px) {
    .auth { padding: 40px 16px 48px; }
    .auth-card { margin-top: 28px; padding: 32px 20px 28px; border-radius: 18px; }
    .auth-card--login { padding: 32px 20px 28px; }
    .auth-card--tabs { padding-top: 0; }
    .auth-tabs { margin: 0 -20px 32px; }
    .auth-card__title { font-size: 24px; }
    .auth-row .btn { width: auto; min-width: 104px; padding: 0 16px; }
    .auth-grid { grid-template-columns: 1fr; }
    .auth-email { flex-wrap: wrap; row-gap: 8px; }
    .auth-email__pick { flex-basis: 100%; margin-left: 0; }
    .auth-option-row { flex-wrap: wrap; }
    .auth-choice { padding: 14px 16px; }
    .auth-foot { padding-bottom: 48px; }
}
