/* ── 로그인 모달: 좌(로고/블랙) + 우(폼/화이트) 2단 레이아웃 ── */
.auth-modal-dialog {
    max-width: 760px;
}
.auth-modal-content {
    flex-direction: row;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(var(--text-rgb), 0.06), 0 24px 64px rgba(var(--text-rgb), 0.14);
    min-height: 460px;
}
.auth-modal-close {
    position: absolute;
    top: 18px; right: 18px;
    z-index: 5;
}
.auth-modal-brand {
    flex: 0 0 260px;
    background: #fff;
    border-right: 1px solid rgba(var(--text-rgb), 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}
.auth-modal-brand-logo {
    width: 130px;
    filter: brightness(0);
}
.auth-modal-brand-copy {
    margin: 18px 0 0;
    font-size: var(--fs-13);
    line-height: 1.6;
    color: rgba(var(--text-rgb), 0.55);
}
.auth-modal-form-panel {
    flex: 1;
    min-width: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 640px) {
    .auth-modal-content { flex-direction: column; min-height: 0; }
    .auth-modal-brand { flex: 0 0 96px; }
    .auth-modal-brand-logo { width: 96px; }
}

/* ── 탭 행 ── */
#authTabsRow {
    display: flex;
    gap: 12px;
    width: 100%;
}

/* ── 탭 ── */
.auth-tab {
    background: none;
    border: none;
    padding: 4px 0 10px;
    font-size: var(--fs-16);
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    letter-spacing: -0.3px;
    transition: color .18s, border-color .18s;
}
.auth-tab.active {
    color: var(--text);
    border-bottom-color: var(--accent);
}
.auth-tab:hover:not(.active) {
    color: var(--text-muted);
}

/* ── 뒤로가기 행 ── */
#authBackRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-bottom: 2px;
}
#authBackRow button {
    background: none;
    border: none;
    padding: 4px 0 10px;
    font-size: var(--fs-13);
    color: var(--accent);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    letter-spacing: -0.1px;
    opacity: .8;
    transition: opacity .15s;
    font-family: inherit;
}
#authBackRow button:hover { opacity: 1; }

/* ── 폼 필드 ── */
.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}
.auth-field label {
    font-size: var(--fs-12);
    font-weight: 400;
    color: var(--text);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.auth-field input {
    border: 1.5px solid var(--text);
    border-radius: 8px;
    padding: 11px 14px;
    font-size: var(--fs-16);
    color: var(--text);
    outline: none;
    background: transparent;
    font-family: inherit;
    transition: border-color .18s, box-shadow .18s;
}
.auth-field input::placeholder {
    color: var(--text-muted);
}
.auth-field input:focus {
    border-color: var(--text);
    background: transparent;
    box-shadow: 0 0 0 3px rgba(var(--text-rgb), .12);
}

/* 이메일·비밀번호 인풋: 메인 AI 프롬프트 입력창(.idx-ai-bar)과 동일한 필 형태 */
.auth-field input[type="email"],
.auth-field input[type="password"] {
    border-radius: 999px;
    border-color: var(--border);
    padding: 11px 20px;
}
.auth-field input[type="email"]:focus,
.auth-field input[type="password"]:focus {
    border-color: var(--text);
    box-shadow: none;
}

/* 크롬 등 브라우저 자동완성 배경 오버라이드 (안 그러면 인풋 배경이 파랗게 덮임) */
.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover,
.auth-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    box-shadow: 0 0 0 1000px #fff inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* ── 약관 동의 체크박스 ── */
.auth-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 4px 0 18px;
    cursor: pointer;
}
.auth-consent input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--accent);
    cursor: pointer;
}
.auth-consent span {
    font-size: var(--fs-13);
    line-height: 1.5;
    color: var(--text-muted);
}
.auth-consent a {
    color: var(--text);
    text-decoration: underline;
}

/* ── 제출 버튼 ── */
.auth-submit {
    width: 100%;
    height: 44px;
    margin-top: 6px;
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: 999px;
    font-size: var(--fs-16);
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .15s;
    box-shadow: 0 2px 8px rgba(var(--accent-rgb), .25);
}
#formRegister .auth-submit {
    margin-top: 18px;
}
.auth-submit:hover {
    background: var(--accent-hover);
}
.auth-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(var(--accent-rgb), .2);
}
.auth-submit:disabled {
    background: var(--border);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* ── 비밀번호 잊기 링크 ── */
.auth-forgot-link {
    text-align: center;
    margin-top: 14px;
}
.auth-forgot-link button {
    background: none;
    border: none;
    padding: 0;
    font-size: var(--fs-13);
    font-weight: 400;
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    transition: color .15s;
}
.auth-forgot-link button:hover {
    color: var(--accent);
}

/* ── 알림 박스 ── */
.auth-notice {
    border-radius: 8px;
    padding: 11px 14px;
    font-size: var(--fs-14);
    line-height: 1.6;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.auth-notice-error {
    background: var(--danger-tint);
    color: var(--danger);
    border: 1px solid var(--danger);
}
.auth-notice-success {
    background: var(--accent-tint);
    color: var(--accent);
    border: 1px solid var(--accent-tint);
}

/* ── forgot 안내 텍스트 ── */
.auth-hint {
    font-size: var(--fs-14);
    color: var(--text-muted);
    line-height: 1.75;
    margin: 0 0 20px;
}

/* ── SNS 버튼 ── */
.auth-sns-btns {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-bottom: 4px;
}
.auth-sns-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 44px;
    border-radius: 10px;
    text-decoration: none;
    border: 1.5px solid var(--border);
    background: var(--bg);
    color: var(--text);
    transition: background .15s, border-color .15s;
    font-family: inherit;
}
.auth-sns-btn:hover {
    background: var(--bg);
    border-color: var(--text-muted);
    color: var(--text);
    text-decoration: none;
}
/* 카카오·네이버: 버튼은 구글과 동일한 중립 톤, 아이콘 배지만 브랜드 컬러 */
.auth-sns-badge {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.auth-sns-badge-kakao { background: var(--kakao); }
.auth-sns-badge-naver { background: var(--naver); color: #fff; font-weight: 800; font-size: 13px; }

/* 회원가입 탭에서 약관 미동의 시 소셜 버튼 잠금 표시 */
.auth-sns-locked .auth-sns-btn {
    opacity: 0.4;
    cursor: not-allowed;
}
.auth-sns-locked .auth-sns-btn:hover {
    background: var(--bg);
    border-color: var(--accent-tint);
}

/* ── 구분선 ── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 14px;
    color: var(--border);
    font-size: var(--fs-12);
    font-weight: 600;
    letter-spacing: 0.05em;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--accent-tint);
}

/* ── reset 안내 텍스트 ── */
.auth-reset-hint {
    font-size: var(--fs-14);
    color: var(--text-muted);
    margin: 0 0 18px;
    line-height: 1.6;
}
