/**
 * 로그인·회원가입·비밀번호 찾기 — Bootstrap 5 + 커스텀 auth.css
 */
@import url('express-fonts.css');
@import url('lang-switch.css');

.login-page,
.register-page,
.forgot-page {
    font-family: var(--express-font-sans);
    font-size: 0.8125rem;
    min-height: 100vh;
    margin: 0;
    background: #0d47a1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3.25rem 1rem 1rem;
    box-sizing: border-box;
}

/* 인증 페이지 상단 툴바 — 로그인 링크·언어 */
.auth-page-toolbar {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 0.85rem;
}
.auth-toolbar-link {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-size: 0.8125rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(4px);
    white-space: nowrap;
}
.auth-toolbar-link:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
}
.auth-toolbar-lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent !important;
    box-shadow: none !important;
    line-height: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}
.auth-toolbar-lang::after {
    display: none !important;
}
.auth-toolbar-lang:hover,
.auth-toolbar-lang:focus,
.auth-toolbar-lang:active {
    background: transparent !important;
    box-shadow: none !important;
    outline: none;
}
.auth-toolbar-lang:hover .auth-toolbar-flag,
.auth-toolbar-lang:focus .auth-toolbar-flag {
    opacity: 0.85;
}
.auth-toolbar-flag {
    width: 26px;
    height: auto;
    display: block;
    border-radius: 2px;
}
.auth-toolbar-flag-sm {
    width: 18px;
    height: auto;
    border-radius: 2px;
}
/* 언어 드롭다운 — 글자·패딩 축소 */
.auth-page-toolbar .dropdown-menu {
    font-size: 0.8125rem;
    min-width: 8.5rem;
    padding: 0.25rem 0;
}
.auth-page-toolbar .dropdown-item {
    font-size: 0.8125rem;
}
/* Popper 인라인 transform 대신 CSS로 드롭다운 위치 고정 */
.auth-toolbar-lang-dropdown {
    position: relative;
}
.auth-toolbar-lang-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    margin-top: 0.35rem;
}

.auth-page-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--auth-page-bg-image, none);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    z-index: 0;
}

.login-page .login-box,
.register-page .fns-register-shell,
.forgot-page .login-box {
    position: relative;
    z-index: 1;
    width: 100%;
}

.login-page .login-box,
.forgot-page .login-box {
    max-width: 420px;
}

.register-page .fns-register-shell {
    max-width: 640px;
    width: 100%;
    margin: auto;
}

/* 회원가입 — 수직·수평 가운데 (내용이 길면 스크롤) */
.register-page {
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

.login-page .login-box > .card,
.forgot-page .login-box > .card,
.register-page .fns-register-shell > .card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.standalone-card-header-sub {
    opacity: 0.88;
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

.card-header-custom {
    background: linear-gradient(135deg, #283593, #1565c0);
    color: #fff;
    padding: 1.2rem 1.5rem;
    border-radius: 14px 14px 0 0;
}

.card-header-custom h5 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.login-card-body {
    padding: 1.5rem 1.35rem;
    font-size: 0.8125rem;
    border-radius: 0 0 14px 14px;
    background: #fff;
}

.forgot-page .login-card-body {
    border-radius: 0 0 14px 14px;
}

.btn-login,
.btn-register,
.btn-submit {
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    border: none;
    border-radius: 0;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #fff;
    width: 100%;
    padding: 0.55rem 0.5rem;
    font-size: 0.875rem;
}

.btn-login:hover,
.btn-register:hover,
.btn-submit:hover {
    background: linear-gradient(135deg, #0d47a1, #1a237e);
    color: #fff;
}

.btn-outline-auth {
    border-radius: 0;
    border-color: #1565c0;
    color: #1565c0;
}

.btn-outline-auth:hover {
    background: #1565c0;
    color: #fff;
}

.login-page .form-control,
.forgot-page .form-control,
.register-page .form-control {
    border-radius: 0 !important;
    border: 1px solid #ced4da;
    font-size: 0.8125rem;
}

.login-page .input-group .form-control,
.forgot-page .input-group .form-control {
    border-right: none !important;
}

.login-page .input-group > .input-group-text:last-child,
.forgot-page .input-group > .input-group-text:last-child {
    background: #f8f9fa;
    border: 1px solid #ced4da;
    border-left: none !important;
    border-radius: 0 !important;
}

.login-page .input-group-append .input-group-text,
.forgot-page .input-group-append .input-group-text {
    background: #f8f9fa;
    border: 1px solid #ced4da;
    border-left: none !important;
    border-radius: 0 !important;
}

.captcha-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.captcha-wrap .form-control {
    flex: 1;
    border-radius: 0 !important;
}

.captcha-img-box {
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 0;
    overflow: hidden;
    border: 1px solid #dee2e6;
    line-height: 0;
}

.captcha-img-box:hover {
    opacity: 0.85;
}

.captcha-img {
    height: 32px;
    width: auto;
    display: block;
}

.captcha-refresh {
    flex-shrink: 0;
    color: #6c757d;
    cursor: pointer;
    font-size: 1.1rem;
    background: none;
    border: none;
    padding: 0 4px;
}

.captcha-refresh:hover {
    color: #1565c0;
}

.divider-text {
    position: relative;
    text-align: center;
    margin: 1rem 0;
}

.divider-text::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.divider-text span {
    position: relative;
    background: #fff;
    padding: 0 12px;
    color: #999;
    font-size: 0.875rem;
}

.standalone-label-sm {
    font-size: 0.8125rem;
    margin-bottom: 5px;
}

.standalone-link-sm {
    font-size: 0.8125rem;
}

.standalone-text-sm {
    font-size: 0.8125rem;
}

.login-card-footer .standalone-footer-notice {
    font-size: 0.8125rem;
    line-height: 1.75;
    color: #6c757d !important;
}

.login-card-footer .standalone-footer-copyright {
    font-size: 0.8125rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
    color: #6c757d !important;
}

.standalone-icon-circle {
    width: 80px;
    height: 80px;
    background: #e8f5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.standalone-icon-circle .fas {
    font-size: 2rem;
}

.text-warning-auth {
    color: #f9a825 !important;
}

/* 회원가입 카드 내부 — register.css 와 병용 */
.register-page .fns-register-shell .card-body {
    border-radius: 0 0 14px 14px;
}
