/* ── 전역 리셋 ── */
html, body {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

* {
    box-sizing: border-box;
}

/* ── 메인 배경 ── */
.login-main {
    margin-top: var(--header-height);
    width: 100%;
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    background-color: #efefef;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: clamp(32px, 8vh, 80px);
    box-sizing: border-box;
}

/* ── 로그인 카드 ── */
.login-card {
    background: #ffffff;
    border-radius: 20px;
    padding: clamp(32px, 5.4vh, 49px) clamp(28px, 4.45vw, 57px) clamp(36px, 6.4vh, 58px);
    width: min(449px, 92vw);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.10);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* ── 타이틀 ── */
.login-main-title {
    font-family: Inter, sans-serif;
    font-size: clamp(18px, 2.34vw, 30px);
    font-weight: bold;
    color: #000000;
    margin: 0 0 clamp(16px, 3.78vh, 34px);
    text-align: center;
}

/* ── 브랜드 ── */
.login-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-brand-icon {
    width: clamp(24px, 2.8vw, 36px);
    height: clamp(24px, 2.8vw, 36px);
    object-fit: contain;
}

.login-brand-name {
    font-family: Lexend, sans-serif;
    font-size: clamp(16px, 1.875vw, 24px);
    font-weight: normal;
    color: #2b2b2b;
}

/* ── 서브타이틀 ── */
.login-subtitle {
    font-family: Inter, sans-serif;
    font-size: clamp(12px, 1.41vw, 18px);
    font-weight: bold;
    color: #868686;
    margin: 12px 0 0;
    text-align: center;
}

/* ── 폼 ── */
.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: clamp(7px, 1.33vh, 12px);
    align-items: center;
    margin-top: clamp(16px, 2.9vh, 26px);
}

/* ── 인풋 ── */
.login-input {
    width: 100%;
    height: clamp(36px, 5.67vh, 51px);
    margin: 0;
    border: 1.5px solid rgba(45, 45, 45, 0.2);
    border-radius: 5px;
    padding: 0 20px;
    font-family: Inter, sans-serif;
    font-size: clamp(12px, 1.41vw, 18px);
    font-weight: 500;
    color: #333333;
    box-sizing: border-box;
    outline: none;
    box-shadow: 1px 2px 2px 0 rgba(0, 0, 0, 0.05);
}

.login-input:focus {
    border-color: #1b8de8;
}

.login-input::placeholder {
    color: #868686;
    font-weight: 500;
}

/* ── 로그인 버튼 ── */
.login-btn {
    width: 62%;
    height: clamp(38px, 6vh, 54px);
    background-color: #1b8de8;
    color: #ffffff;
    border: none;
    border-radius: 27px;
    font-family: Inter, sans-serif;
    font-size: clamp(14px, 1.875vw, 24px);
    font-weight: 800;
    cursor: pointer;
    margin-top: clamp(16px, 4.3vh, 39px);
    transition: opacity 0.15s;
}

.login-btn:hover {
    opacity: 0.85;
}

/* 등록 코드 가입 버튼: 로그인 버튼과 같은 크기의 보조 버튼 */
.login-btn-sub {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background-color: #ffffff;
    color: #1b8de8;
    border: 2px solid #1b8de8;
    text-decoration: none;
    margin-top: 12px;
}

.login-hint {
    font-size: 12px;
    color: #888888;
    text-align: center;
    margin: 4px 0 0;
}

/* ── 하단 링크 ── */
.login-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 4px;
}

.login-links a {
    font-size: 12px;
    color: #888888;
    text-decoration: none;
}

.login-notice {
    font-size: 13px;
    color: #1f7a3a;
    text-align: center;
}

.login-links a:hover {
    text-decoration: underline;
}

/* ══════════════════════════════════════════════════════════
   모바일 레이아웃 (≤480px)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .login-main {
        padding-top: clamp(20px, 5vh, 40px);
        align-items: flex-start;
    }

    .login-card {
        width: 92vw;
        border-radius: 12px;
    }

    .login-btn {
        width: 100%;
    }
}

/* ── 비밀번호 재설정 모달 ── */
.reset-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reset-modal-card {
    background: #fff;
    border-radius: 16px;
    width: min(420px, 90vw);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.reset-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #eee;
}

.reset-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.reset-modal-close {
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    font-weight: bold;
}

.reset-modal-close:hover {
    color: #333;
}

.reset-step {
    padding: 24px;
}

.reset-desc {
    font-size: 14px;
    color: #555;
    margin: 0 0 20px;
    text-align: center;
}

.reset-field {
    margin-bottom: 14px;
}

.reset-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.reset-input {
    width: 100%;
    height: 40px;
    padding: 0 14px;
    border: 1.5px solid #d0d0d0;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    outline: none;
    box-sizing: border-box;
}

.reset-input:focus {
    border-color: #1b8de8;
}

.reset-error {
    font-size: 12px;
    color: #e74c3c;
    min-height: 18px;
    margin-bottom: 8px;
    text-align: center;
}

.reset-btn {
    width: 100%;
    height: 42px;
    background: #1b8de8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s;
}

.reset-btn:hover {
    opacity: 0.85;
}

.reset-pw-match {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    min-height: 16px;
}

.reset-pw-match.match {
    color: #00b894;
}

.reset-pw-match.mismatch {
    color: #e74c3c;
}

.reset-done-msg {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin: 20px 0 24px;
}

/* QHD / 4K 초대형 화면 (≥1921px) */
@media (min-width: 1921px) {
    .login-card {
        width: min(600px, 31vw);
    }

    .login-main-title {
        font-size: 1.72vw;
    }

    .login-brand-name {
        font-size: 1.875vw;
    }
}
