/* LMS 로그인 페이지 CSS */
body {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    font-family: 'Noto Sans KR', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* 배경 그라데이션 애니메이션 */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
                0 10px 30px rgba(0, 0, 0, 0.1),
                0 4px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    min-width: 400px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: cardFadeIn 0.6s ease forwards 0.2s;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2),
                0 15px 40px rgba(0, 0, 0, 0.15),
                0 6px 15px rgba(0, 0, 0, 0.1);
}

.login-header {
    background: white;
    color: #1a1a1a;
    padding: 50px 40px 0;
    text-align: center;
    position: relative;
}

.login-header::before {
    display: none;
}

.logo-container {
    margin-bottom: 0;
    opacity: 0;
    animation: logoFadeIn 0.8s ease forwards;
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-container img {
    max-height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-container img:hover {
    transform: none;
}

.admin-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--login-primary-color, #4285f4);
    color: white;
    font-size: 14px;
    font-weight: 600;
    border-radius: 20px;
    margin-top: 10px;
    opacity: 0;
    animation: badgeFadeIn 0.6s ease forwards 0.4s;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.25);
    letter-spacing: 0.3px;
}

@keyframes badgeFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.login-body {
    padding: 30px 40px 40px;
}

.form-floating {
    margin-bottom: 24px;
    position: relative;
    opacity: 0;
    animation: formFadeIn 0.5s ease forwards;
}

.form-floating:nth-child(2) { animation-delay: 0.3s; }
.form-floating:nth-child(3) { animation-delay: 0.4s; }
.form-floating:nth-child(4) { animation-delay: 0.5s; }

@keyframes formFadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-floating > .form-control {
    border: 2px solid #e8eaed;
    border-radius: 12px;
    height: auto;
    padding: 16px 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    background: #fafbfc;
}

.form-floating > .form-control:focus {
    border-color: var(--login-primary-color, #4285f4);
    background: white;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--login-primary-color, #4285f4) 10%, transparent);
    transform: translateY(-2px);
}

.form-floating > .form-control::placeholder {
    color: transparent;
}

.form-floating > label {
    font-weight: 500;
    color: #5f6368;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--login-primary-color, #4285f4);
}

.login-btn {
    background: var(--login-primary-color, #4285f4);
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
    opacity: 0;
    animation: formFadeIn 0.5s ease forwards 0.6s;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-btn:active::before {
    width: 300px;
    height: 300px;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(66, 133, 244, 0.4);
}

.login-btn:active {
    transform: translateY(-1px);
}

.caps-lock-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 20px;
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.system-info {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.6;
}


.copyright {
    text-align: center;
    margin-top: 30px;
    color: #5f6368;
    font-size: 12px;
    text-shadow: none;
    padding: 0 20px;
    line-height: 1.4;
    opacity: 0;
    animation: formFadeIn 0.5s ease forwards 0.8s;
}

.form-control-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 10;
}

.input-group-custom {
    position: relative;
}

/* 로딩 애니메이션 */
.login-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .login-card {
        min-width: auto;  /* 모바일에서는 최소 너비 제거 */
        max-width: 100%;
        margin: 0 15px;
    }
}

@media (max-width: 576px) {
    .login-wrapper {
        padding: 10px;
    }

    .login-header {
        padding: 30px 20px 20px;
    }

    .login-body {
        padding: 30px 20px;
    }

    .login-title {
        font-size: 24px;
    }

    .copyright {
        font-size: 12px;
        margin-top: 20px;
    }
}

/* 커스텀 알림 스타일 */
.custom-alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

/* ==================== 아이디/비밀번호 찾기 ==================== */

/* 로그인 페이지 하단 링크 */
.login-links {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e8eaed;
}

.login-link {
    color: #5f6368;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.login-link:hover {
    color: var(--login-primary-color, #4285f4);
}

.login-link-divider {
    color: #dadce0;
    margin: 0 12px;
}

/* 페이지 제목 */
.find-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
    text-align: center;
}

.find-subtitle {
    font-size: 13px;
    color: #5f6368;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.5;
}

/* 세그먼트 탭 */
.find-tab-group {
    display: flex;
    border: 2px solid #e8eaed;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.find-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: #fafbfc;
    font-size: 14px;
    font-weight: 600;
    color: #5f6368;
    cursor: pointer;
    transition: all 0.2s;
}

.find-tab + .find-tab {
    border-left: 2px solid #e8eaed;
}

.find-tab.active {
    background: var(--login-primary-color, #4285f4);
    color: white;
}

/* 결과 영역 */
.find-result {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 16px;
    text-align: center;
}

.find-result.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.find-result.failure {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.find-result-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.find-result.success .find-result-title { color: #166534; }
.find-result.failure .find-result-title { color: #991b1b; }

.find-result-message {
    font-size: 13px;
    color: #5f6368;
    margin: 0;
}

/* 아이디 리스트 */
.find-id-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
    max-height: 200px;
    overflow-y: auto;
    text-align: left;
}

.find-id-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: white;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.find-id-item:hover {
    border-color: var(--login-primary-color, #4285f4);
    background: #f8faff;
}

.find-id-value {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.find-id-arrow {
    font-size: 11px;
    color: #dadce0;
}

.find-id-item:hover .find-id-arrow {
    color: var(--login-primary-color, #4285f4);
}

.find-result-hint {
    font-size: 11px;
    color: #9aa0a6;
    margin-top: 8px;
    text-align: center;
}

/* 결과 버튼 */
.find-action-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 비밀번호 가이드 */
.find-pw-guide {
    font-size: 12px;
    color: #5f6368;
    background: #f8f9fa;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
    text-align: left;
    line-height: 1.6;
}

/* 비밀번호 폼 */
.find-pw-group {
    margin-bottom: 12px;
    text-align: left;
}

.find-pw-group .form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.find-pw-group .form-label .required {
    color: #ef4444;
    margin-left: 2px;
}

.find-pw-group .form-control {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 2px solid #e8eaed;
    border-radius: 12px;
    background: #fafbfc;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.find-pw-group .form-control:focus {
    outline: none;
    border-color: var(--login-primary-color, #4285f4);
    background: white;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--login-primary-color, #4285f4) 10%, transparent);
}

/* 비밀번호 강도 */
.password-strength { display: flex; gap: 4px; margin-top: 6px; }
.password-strength .bar { flex: 1; height: 3px; background: #e5e7eb; border-radius: 2px; transition: background 0.2s; }
.password-strength.weak .bar:nth-child(1) { background: #ef4444; }
.password-strength.medium .bar:nth-child(1), .password-strength.medium .bar:nth-child(2) { background: #f59e0b; }
.password-strength.strong .bar:nth-child(1), .password-strength.strong .bar:nth-child(2), .password-strength.strong .bar:nth-child(3) { background: #22c55e; }
.password-strength.very-strong .bar { background: #22c55e; }

.password-hint { margin-top: 4px; font-size: 12px; color: #6b7280; min-height: 18px; }

/* step-section */
.step-section { text-align: center; }

/* auth-input-form */
.auth-input-form { margin-top: 4px; }
.auth-input-form .form-floating { opacity: 1; animation: none; }

/* 이메일 입력 */
.email-input-group { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.email-id-input { flex: 1; margin-bottom: 0 !important; }
.email-at { color: #5f6368; font-size: 16px; font-weight: 500; flex-shrink: 0; }
.email-domain-wrapper { flex: 1; }
.email-domain-select, .email-domain-input {
    border: 2px solid #e8eaed; border-radius: 12px; padding: 14px 16px;
    font-size: 15px; background: #fafbfc; transition: all 0.3s ease; width: 100%;
}
.email-domain-select:focus, .email-domain-input:focus {
    border-color: var(--login-primary-color, #4285f4); background: white;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--login-primary-color, #4285f4) 10%, transparent); outline: none;
}

/* 결과 버튼 */
.result-btn {
    width: 100%;
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-btn.btn-outline-secondary {
    border: 2px solid #dadce0;
    color: #5f6368;
    background: transparent;
}

.result-btn.btn-outline-secondary:hover {
    background: #f8f9fa;
    border-color: #c0c3c7;
    color: #3c4043;
}

/* 반응형 */
@media (max-width: 576px) {
    .find-tab-group { flex-direction: column; }
    .find-tab + .find-tab { border-left: none; border-top: 2px solid #e8eaed; }
    .email-input-group { flex-direction: column; }
    .email-at { display: none; }
}
