/* 세련된 하얀색 배경 모던 로그인 페이지 CSS */
/* 미니멀하고 깔끔한 디자인 */

/* 기본 레이아웃 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 메인 배경 - 하얀색 기반 */
body.modern-login-layout {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    overflow-x: hidden;
    position: relative;
}

/* 서틀한 배경 패턴 */
body.modern-login-layout::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(168, 85, 247, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* 서틀한 도트 패턴 */
body.modern-login-layout::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(148, 163, 184, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 1;
}

/* 메인 컨테이너 */
.modern-login-container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 로그인 카드 - 세련된 화이트 카드 */
.modern-login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.modern-login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #06b6d4);
    border-radius: 20px 20px 0 0;
}

.modern-login-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 25px 30px -5px rgba(0, 0, 0, 0.15),
        0 15px 15px -5px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* 로고 섹션 */
.modern-logo-section {
    text-align: center;
    margin-bottom: 36px;
    position: relative;
    z-index: 3;
}

.modern-logo-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-logo-image:hover {
    transform: translateY(-2px) scale(1.05);
}

.modern-logo-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.modern-logo-image:hover img {
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.15));
}

.modern-logo-title {
    color: #1e293b;
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modern-logo-title:hover {
    transform: scale(1.02);
    text-decoration: none;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 로그인 헤더 */
.modern-login-header {
    color: #64748b;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 32px;
    text-align: center;
}

/* 폼 그룹 */
.modern-form-group {
    margin-bottom: 24px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modern-input-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    flex: 1;
}

/* 입력 필드 */
.modern-input {
    width: 100%;
    padding: 16px 20px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    color: #1e293b;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-input:focus {
    outline: none;
    background: #ffffff;
    border-color: #6366f1;
    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.modern-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* 입력 아이콘 - 필드 왼쪽 밖에 위치 */
.modern-input-icon {
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 16px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.modern-form-group:hover .modern-input-icon,
.modern-input:focus ~ .modern-input-icon {
    background: #e0e7ff;
    color: #6366f1;
    transform: scale(1.05);
}

/* 로그인 옵션 */
.modern-login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.modern-remember-me {
    display: flex;
    align-items: center;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modern-remember-me:hover {
    color: #475569;
}

.modern-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    accent-color: #6366f1;
    cursor: pointer;
}

/* 로그인 버튼 */
.modern-login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
    box-shadow:
        0 4px 14px 0 rgba(99, 102, 241, 0.4),
        0 2px 4px 0 rgba(99, 102, 241, 0.2);
}

.modern-login-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 25px 0 rgba(99, 102, 241, 0.5),
        0 4px 8px 0 rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, #5856eb 0%, #7c3aed 100%);
}

.modern-login-btn:active {
    transform: translateY(0px);
    box-shadow:
        0 2px 8px 0 rgba(99, 102, 241, 0.3),
        0 1px 2px 0 rgba(99, 102, 241, 0.2);
}

/* 비밀번호 찾기 링크 */
.modern-forgot-password {
    text-align: center;
    margin-top: 24px;
}

.modern-forgot-link {
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    padding: 8px 12px;
    border-radius: 8px;
}

.modern-forgot-link:hover {
    color: #6366f1;
    text-decoration: none;
    background: rgba(99, 102, 241, 0.05);
}

.modern-forgot-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: #6366f1;
    transition: all 0.2s ease;
    transform: translateX(-50%);
}

.modern-forgot-link:hover::after {
    width: 70%;
}

/* 비밀번호 찾기 모달 스타일 */
.modern-forgot-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    display: none;
    animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-forgot-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ef4444, #f97316, #eab308);
    border-radius: 20px 20px 0 0;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modern-forgot-card.active {
    display: block;
}

.modern-forgot-header {
    color: #dc2626;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.modern-forgot-description {
    color: #64748b;
    font-size: 14px;
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.5;
}

.modern-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.025em;
    box-shadow:
        0 4px 14px 0 rgba(220, 38, 38, 0.4),
        0 2px 4px 0 rgba(220, 38, 38, 0.2);
    margin-bottom: 20px;
}

.modern-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 25px 0 rgba(220, 38, 38, 0.5),
        0 4px 8px 0 rgba(220, 38, 38, 0.3);
    background: linear-gradient(135deg, #b91c1c 0%, #c2410c 100%);
}

.modern-back-link {
    display: inline-block;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 8px 12px;
    border-radius: 8px;
    width: 100%;
    text-align: center;
}

.modern-back-link:hover {
    color: #475569;
    text-decoration: none;
    background: rgba(100, 116, 139, 0.05);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .modern-login-card,
    .modern-forgot-card {
        margin: 15px;
        padding: 30px 25px;
    }

    .modern-logo-title {
        font-size: 22px;
    }

    .modern-logo-icon {
        width: 75px;
        height: 75px;
    }

    .modern-logo-icon i {
        font-size: 35px;
    }

    .modern-input {
        padding: 15px 18px 15px 50px;
        font-size: 15px;
    }

    .modern-login-btn,
    .modern-submit-btn {
        padding: 16px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .modern-login-container {
        padding: 10px;
    }

    .modern-login-card,
    .modern-forgot-card {
        margin: 10px;
        padding: 25px 20px;
    }

    .modern-logo-title {
        font-size: 20px;
    }

    .modern-input {
        padding: 14px 16px 14px 45px;
    }

    .modern-input-icon {
        left: 16px;
        font-size: 18px;
    }
}

/* 숨길 기존 요소들 */
.login-layout:not(.modern-login-layout) .main-container,
.login-layout:not(.modern-login-layout) .main-content,
.login-layout:not(.modern-login-layout) .row,
.login-layout:not(.modern-login-layout) .col-sm-10,
.login-layout:not(.modern-login-layout) .col-sm-offset-1,
.login-layout:not(.modern-login-layout) .login-container,
.login-layout:not(.modern-login-layout) .center,
.login-layout:not(.modern-login-layout) .space-6,
.login-layout:not(.modern-login-layout) .position-relative,
.login-layout:not(.modern-login-layout) .widget-box,
.login-layout:not(.modern-login-layout) .widget-body,
.login-layout:not(.modern-login-layout) .widget-main,
.old-login-elements {
    display: none !important;
}

/* 애니메이션 효과 */
.modern-login-card,
.modern-forgot-card {
    animation: fadeInScale 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 포커스 효과 개선 */
.modern-input:focus,
.modern-checkbox:focus,
.modern-login-btn:focus,
.modern-submit-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
}