/* =========================================================
   로그인
   /css/pages/login.css
   ========================================================= */

.login-page {
    --lg-green: #42BC74;
    --lg-green-dark: #36A564;
    --lg-text: #1F2420;
    --lg-sub: #6B6E6B;
    --lg-mute: #999999;
    --lg-line: #EEEEEE;
    --lg-border: #D9D9D9;
    --lg-red: #D94343;
    --lg-bg: #F8F8F5; /* 서브페이지 공통 배경과 동일 */

    background: var(--lg-bg);
    color: var(--lg-text);
    letter-spacing: -0.07em;
    word-break: keep-all;
    padding: 40px 0 120px; /* 위 여백은 padding으로 (margin이면 부모 밖으로 새어 흰 띠가 생김) */
}

.login-page *,
.login-page *::before,
.login-page *::after {
    box-sizing: border-box;
}

.login-page button,
.login-page input {
    font-family: inherit;
    letter-spacing: inherit;
}

.login-page p {
    width: auto;
}

.login-inner {
    max-width: 514px; /* 카드 474 + 좌우 20 */
    margin: 0 auto;
    padding: 0 20px;
}


/* ---------- 안내 문구 ---------- */
.login-desc {
    margin: 0 0 28px;
    font-size: 18px;
    line-height: 1.4;
    text-align: center;
}


/* ---------- 카드 ---------- */
.login-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 40px 22px;
    border: 1px solid var(--lg-border);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}


/* ---------- 입력 ---------- */
.login-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-label {
    font-size: 15px;
    font-weight: 500;
}

.login-input {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 51px;
    padding: 0 14px 0 16px;
    border: 1px solid var(--lg-line);
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.15s ease;
}

/* 입력 중 : 1.5px 초록 (border 1px + 안쪽 0.5px, 크기 변화 없이) */
.login-input:focus-within {
    border-color: var(--lg-green);
    box-shadow: inset 0 0 0 0.5px var(--lg-green);
}

/* 오류 : 1.5px 빨강 (입력 중이어도 오류 색 유지) */
.login-input.is-error,
.login-input.is-error:focus-within {
    border-color: var(--lg-red);
    box-shadow: inset 0 0 0 0.5px var(--lg-red);
}

.login-input input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--lg-text);
    font-size: 15px;
}

.login-input input::placeholder {
    color: var(--lg-mute);
}

/* 비밀번호 보기 */
.login-eye {
    flex: none;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5.5C8 5.5 4.5 7.5 2 12C4.5 16.5 8 18.5 12 18.5C16 18.5 19.5 16.5 22 12C19.5 7.5 16 5.5 12 5.5Z' fill='none' stroke='%236B6E6B' stroke-width='1.6'/%3E%3Ccircle cx='12' cy='12' r='3' fill='%236B6E6B'/%3E%3C/svg%3E") no-repeat center / 24px;
    cursor: pointer;
}

/* 비밀번호가 보이는 상태 : 눈 위에 사선 */
.login-eye.is-visible {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5.5C8 5.5 4.5 7.5 2 12C4.5 16.5 8 18.5 12 18.5C16 18.5 19.5 16.5 22 12C19.5 7.5 16 5.5 12 5.5Z' fill='none' stroke='%236B6E6B' stroke-width='1.6'/%3E%3Ccircle cx='12' cy='12' r='3' fill='%236B6E6B'/%3E%3Cpath d='M4 3L20 21' stroke='%236B6E6B' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.login-eye:focus-visible {
    outline: 2px solid var(--lg-green);
    outline-offset: 2px;
    border-radius: 4px;
}

.login-msg {
    margin: 0;
    color: var(--lg-red);
    font-size: 13px;
    line-height: 1.4;
}

.login-msg[hidden] {
    display: none;
}


/* ---------- 로그인 상태 유지 · 찾기 ---------- */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.login-keep {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--lg-sub);
    font-size: 14px;
    cursor: pointer;
}

.login-page .login-check {
    appearance: none;
    -webkit-appearance: none;
    flex: none;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 1.5px solid var(--lg-border);
    border-radius: 50%;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.5l3 3 6-7' fill='none' stroke='%23D9D9D9' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 12px;
    cursor: pointer;
}

.login-page .login-check:checked {
    border-color: var(--lg-green);
    background-color: var(--lg-green);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.login-page .login-check:focus-visible {
    outline: 2px solid var(--lg-green);
    outline-offset: 2px;
}

.login-find {
    display: flex;
    align-items: center;
}

.login-find a {
    color: var(--lg-sub);
    font-size: 14px;
}

.login-find a:hover {
    color: var(--lg-text);
    text-decoration: underline;
}

.login-find a + a::before {
    content: "";
    display: inline-block;
    width: 1px;
    height: 12px;
    margin: 0 10px;
    background: var(--lg-border);
    vertical-align: -1px;
}


/* ---------- 버튼 ---------- */
.login-submit {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 10px;
    background: var(--lg-green);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.login-submit:hover {
    background: var(--lg-green-dark);
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: var(--lg-mute);
    font-size: 13px;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--lg-line);
}

.login-join {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    border: 1px solid var(--lg-green);
    border-radius: 10px;
    background: rgba(66, 188, 116, 0.06);
    color: var(--lg-green);
    font-size: 16px;
}

.login-join strong {
    margin: 0 0.25em;
    font-weight: 700;
}

.login-join:hover {
    background: rgba(66, 188, 116, 0.12);
}


/* ---------- 모바일 ---------- */
@media (max-width: 768px) {
    .login-page {
        padding: 28px 0 56px;
    }

    .login-desc {
        margin-bottom: 20px;
        font-size: 14px;
    }

    .login-card {
        padding: 32px 20px;
    }
}