/**
 * INNOLYZER 로그인 페이지 스타일
 *
 * @date 2026-03-04
 * @link https://innolyzer.innored.co.kr/login
 */

/* ============================================================
   기본 설정
   ============================================================ */

:root {
    /* 컬러 팔레트 */
    --color-primary: #6366f1;
    --color-primary-dark: #4f46e5;
    --color-primary-light: #818cf8;
    --color-secondary: #0ea5e9;

    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;

    --color-gray-50: #f8fafc;
    --color-gray-100: #f1f5f9;
    --color-gray-200: #e2e8f0;
    --color-gray-300: #cbd5e1;
    --color-gray-400: #94a3b8;
    --color-gray-500: #64748b;
    --color-gray-600: #475569;
    --color-gray-700: #334155;
    --color-gray-800: #1e293b;
    --color-gray-900: #0f172a;

    /* 그라데이션 */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);

    /* 폰트 */
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* 그림자 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* 애니메이션 */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-gray-800);
    background: var(--color-gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   로그인 레이아웃
   ============================================================ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.login-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ============================================================
   브랜딩 영역 (왼쪽)
   ============================================================ */

.login-branding {
    flex: 1;
    background: var(--gradient-dark);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.login-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-5%, 5%) scale(1.1); }
}

.branding-content {
    position: relative;
    z-index: 1;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 56px;
    height: 56px;
    color: var(--color-primary-light);
}

.logo-text {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.branding-tagline {
    font-size: 1.5rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    max-width: 400px;
    line-height: 1.4;
}

.branding-features {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(8px);
}

.feature-icon {
    font-size: 1.5rem;
}

.feature-text {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.branding-footer {
    position: relative;
    z-index: 1;
}

.branding-footer p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================================
   로그인 폼 영역 (오른쪽)
   ============================================================ */

.login-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: white;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 0.5rem;
}

.form-header p {
    font-size: 1rem;
    color: var(--color-gray-500);
}

/* ============================================================
   알림 메시지
   ============================================================ */

.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: #fef2f2;
    color: var(--color-error);
    border: 1px solid #fecaca;
}

.alert.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* ============================================================
   폼 스타일
   ============================================================ */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-gray-700);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--color-gray-400);
    pointer-events: none;
    transition: var(--transition-fast);
}

.input-wrapper input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--color-gray-900);
    background: var(--color-gray-50);
    border: 2px solid var(--color-gray-200);
    border-radius: 10px;
    outline: none;
    transition: var(--transition-normal);
}

.input-wrapper input::placeholder {
    color: var(--color-gray-400);
}

.input-wrapper input:hover {
    border-color: var(--color-gray-300);
}

.input-wrapper input:focus {
    border-color: var(--color-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--color-primary);
}

/* 비밀번호 토글 버튼 */
.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--color-gray-400);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.password-toggle:hover {
    color: var(--color-gray-600);
}

/* ============================================================
   버튼 스타일
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-dark);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================================
   폼 푸터
   ============================================================ */

.form-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-gray-200);
}

.form-footer p {
    font-size: 0.875rem;
    color: var(--color-gray-500);
}

.form-footer a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.form-footer a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* ============================================================
   반응형 디자인
   ============================================================ */

@media (max-width: 1024px) {
    .login-branding {
        display: none;
    }

    .login-form-section {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .login-form-section {
        padding: 1.5rem;
    }

    .form-header h2 {
        font-size: 1.5rem;
    }

    .input-wrapper input {
        padding: 0.75rem 1rem 0.75rem 2.75rem;
        font-size: 0.9375rem;
    }
}
