/* resources/views/layout/authentication.blade.php 의 <style> 을 옮긴 파일 — 다른 응답에서 온 <style>(Turbo 이동·AJAX 창)은 CSP nonce 가 맞지 않아 막힌다. 이 화면 모양은 여기서 고친다 */

.auth-main {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.auth-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height:100vh;
}

/* 좌상단 로고는 카드 안 로고와 겹쳐 뺐다 — 언어 선택만 오른쪽에 둔다 */
.auth-header {
    width: 100%;
    padding: 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
}

.auth-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 100%;
}

.login-card {
    width: 100%;
    max-width: 520px;
    background-color: var(--background-elevated-normal);
    padding: 48px 40px 40px 40px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

@media (max-width: 768px) {
    .login-card {
        width: 90%;
        padding: 32px 24px 24px 24px;
        border-radius: 16px;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .login-card {
        width: 95%;
        padding: 24px 16px 16px 16px;
        border-radius: 12px;
        gap: 20px;
    }
}

.card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

.symbol-logo {
    display: flex;
    justify-content: center;
}


.gf-symbol {
    width: 48px;
    height: 48px;
    background-color: var(--primary-normal);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--label-strong);
    font-size: 24px;
    font-weight: bold;
}

.gf-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.symbol-logo svg {
    width: 48px;
    height: 48px;
}

.symbol-logo-placeholder {
    display: block;
    width: 48px;
    height: 48px;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 카드 안 알림: 제목/부제목 아래, 입력 폼 바로 위에 놓는다 */
.card-content > .card-title { order: -3; }
.card-content > .card-subtitle { order: -2; }
.card-content > .alert { order: -1; }

.card-content > .alert {
    margin: 0;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
}

.card-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--label-strong);
    margin: 0;
    text-align: center;
}

.card-subtitle {
    font-size: 14px;
    color: var(--label-alternative);
    margin: 0;
    text-align: center;
}


.language-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    color: var(--label-neutral);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.language-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Language Dropdown Styles */
.language-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.language-dropdown-btn {
    background: transparent;
    border: none;
    color: var(--label-neutral);
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 14px;
    transition: all 0.2s ease;
    gap: 8px;
}

.language-dropdown-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.language-dropdown-btn i {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.language-dropdown-wrapper.active .language-dropdown-btn i {
    transform: rotate(180deg);
}

.language-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: var(--background-elevated-normal);
    border: 1px solid var(--line-normal-normal);
    border-radius: 6px;
    min-width: 120px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 9999;
    overflow: hidden;
}

.language-dropdown-wrapper.active .language-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--label-normal);
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.language-dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--label-normal);
}

.language-dropdown-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-normal);
    font-weight: 500;
}

.footer {
    /* position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%); */
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.copyright {
    color: var(--label-alternative);
    font-size: 14px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.footer-link {
    color: var(--label-alternative);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--label-normal);
}

.separator {
    color: var(--label-neutral);
}

/* 폼 필드 스타일링 */
.form-group {
    position: relative;
    margin-bottom: 16px;
}

.form-label {
    position: absolute;
    top: -9px;
    left: 8px;
    background-color: var(--bg-elevated);
    padding: 0 6px;
    color: var(--label-normal);
    font-size: 12px;
    font-weight: 500;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s;
}

.form-group.focused .form-label {
    opacity: 1;
}

.form-control {
    width: 100%;
    height: 48px;   /* 주요 버튼(.btn-signin 48px)과 같은 높이 — 예전 56px 은 버튼보다 커서 어색했다. 옆에 붙은 버튼(인증·전송)은 flex 로 따라 늘어난다 */
    padding: 0 16px;
    border-width: 1px;
    border-style: solid;   /* 색(배경·테두리·글자)은 전역 입력칸 색(custom.css) — 예전 값은 전역 !important 에 늘 눌려 안 보였다 */
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
}

.form-control::placeholder {
    color: var(--label-alternative);
}

/* 입력칸 위 라벨 — 자리표시자만으론 입력을 시작하면 무슨 칸인지 사라진다. 모든 인증 화면이 같은 모양 */
.auth-label {
    display: block;
    margin-bottom: 6px;
    color: var(--label-neutral);
    font-size: 14px;
    font-weight: 400;
    text-align: left;
}

/* 입력칸 아래 보조 설명(회사 코드 안내 등) — 다른 힌트처럼 왼쪽 정렬·중립색 */
.auth-hint {
    display: block;
    margin-top: 6px;
    color: var(--label-alternative);
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
}

/* 비밀번호 보기/숨기기 — 입력칸 오른쪽 안에 눈 아이콘 버튼 */
.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 48px;
}

/* Edge 기본 보기 버튼과 겹치지 않게 */
.password-field input::-ms-reveal,
.password-field input::-ms-clear {
    display: none;
}

.password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 6px;
    color: var(--label-alternative);
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--label-normal);
}

.password-toggle:focus { outline: none; }
.password-toggle:focus-visible {
    color: var(--label-normal);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.4);
}

/* 비밀번호 규칙 — 입력하는 동안 항목마다 충족(✓)/위반(✕) 표시. 비어 있으면 중립 */
.pw-rules {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: var(--label-alternative);
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
}

.pw-rules li {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.pw-rules li i {
    flex: 0 0 12px;
    font-size: 11px;
    text-align: center;
}

.pw-rules li.is-ok,
.pw-match.is-ok { color: var(--status-positive); }
.pw-rules li.is-bad,
.pw-match.is-bad { color: var(--status-negative); }

.pw-match {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
}

/* 비어 있을 때 자리를 차지하지 않게(예전엔 빈 span 이 회사 코드 앞에 틈을 만들었다) */
.pw-match:empty { display: none; }

/* 2차 인증 화면의 대상 이메일 — 경고색(노랑)이 아니라 중립 강조 */
.auth-email-emph {
    color: var(--label-normal);
    font-size: 18px;
    font-weight: 700;
    word-break: break-all;
}

/* 카드 안 보조 링크(비밀번호 찾기·회원가입) — 브랜드 강조색은 토큰으로 */
.auth-link {
    color: var(--primary-tint-text);
    font-size: 14px;
    text-decoration: none;
}

.auth-link:hover,
.auth-link:focus {
    color: var(--primary-tint-text-hover, var(--primary-tint-text));
    text-decoration: underline;
}

.auth-foot-text {
    color: var(--label-alternative);
    font-size: 14px;
    text-align: center;
}

/* 버튼 스타일링 */
.btn-signin {
    width: 100%;
    height: 48px;
    background-color: var(--primary-normal);
    border: none;
    border-radius: 6px;
    color: #fff;   /* 주요 버튼 글자는 테마와 무관하게 흰색 — 예전엔 라이트에서 주황 바탕 위 검은 글자 */
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-signin:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.btn-signin:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-forgot {
    width: 100%;
    height: 48px;
    background: none;
    border: none;
    color: var(--label-alternative);
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-forgot:hover {
    color: var(--label-normal);
}

/* 에러 메시지 */
.error-message {
    color: var(--status-negative);
    font-size: 14px;
    margin-top: 8px;
}

/* 로딩 스피너 */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

    /* 인증 화면 — 예전 요소별 인라인 style. 이 레이아웃 <style> 은 custom.css 뒤라 같은 우선순위에서 앞선다 */
    .gf-logo.gf-logo--symbol { height: 48px; width: auto; object-fit: contain; }
    .gf-logo.gf-logo--full { height: 96px; width: auto; object-fit: contain; }
    .btn.gf-auth-cta { min-width: 150px; font-size: 16px; font-weight: 500; white-space: nowrap; }
    .btn.gf-auth-btn-text { font-size: 16px; font-weight: 500; }
    .gf-otp-qr { display: inline-block; padding: 8px; border-radius: 8px; background: #fff; }
    .gf-otp-secret { letter-spacing: 2px; word-break: break-all; }
    .gf-otp-help { color: var(--label-alternative); font-size: 12px; line-height: 1.6; text-wrap: balance; }
