﻿:root {
    --primary: #1a1f4a;
    --secondary: #6366f1;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --light: #f8fafc;
    --dark: #0f172a;
    --border: #e2e8f0;
    --shadow: rgba(15, 23, 42, 0.08);
    --text: #334155;
    --text-muted: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light);
    color: var(--text);
    overflow-x: hidden;
}

.lgn-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* LEFT SIDE - BRANDING */
.lgn-branding {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 60px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .lgn-branding::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
        animation: lgn-rotate 25s linear infinite;
    }

@keyframes lgn-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.lgn-branding-content {
    max-width: 500px;
    position: relative;
    z-index: 1;
    text-align: left;
}

.lgn-branding-icon {
    width: 90px;
    height: 90px;
    background: rgba(99,102,241,0.08);
    backdrop-filter: blur(8px);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(99,102,241,0.12);
    margin-bottom: 28px;
    animation: lgn-float 3s ease-in-out infinite;
}

@keyframes lgn-float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.lgn-branding-icon i {
    font-size: 42px;
    color: var(--light);
}

.lgn-branding-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--light);
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.lgn-branding-subtitle {
    font-size: 18px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 40px;
    font-weight: 400;
}

.lgn-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lgn-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.04);
    transition: all 0.25s ease;
}

    .lgn-feature-item:hover {
        transform: translateX(6px);
        background: rgba(255,255,255,0.05);
        border-color: rgba(255,255,255,0.06);
    }

.lgn-feature-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.04);
}

    .lgn-feature-icon i {
        font-size: 18px;
        color: var(--light);
    }

.lgn-feature-text {
    color: rgba(255,255,255,0.92);
    font-size: 15px;
    line-height: 1.6;
}

/* RIGHT SIDE - LOGIN FORM */
.lgn-form-section {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
    overflow-y: auto;
}

.lgn-form-wrapper {
    max-width: 460px;
    margin: 0 auto;
    width: 100%;
}

.lgn-form-header {
    margin-bottom: 36px;
    text-align: center;
}

    .lgn-form-header h2 {
        font-size: 32px;
        font-weight: 800;
        color: var(--text);
        margin-bottom: 8px;
        letter-spacing: -0.5px;
    }

    .lgn-form-header p {
        font-size: 15px;
        color: var(--text-muted);
    }

.lgn-form-group {
    margin-bottom: 18px;
}

.lgn-form-label {
    display: block;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    font-size: 14px;
}

.lgn-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.lgn-input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
    z-index: 1;
}

.lgn-form-control {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.18s ease;
    background: var(--light);
    color: var(--text);
    outline: none;
    font-family: inherit;
}

    .lgn-form-control::placeholder {
        color: var(--text-muted);
        opacity: 0.9;
    }

    .lgn-form-control:focus {
        border-color: var(--secondary);
        box-shadow: 0 0 0 6px rgba(99,102,241,0.06);
    }

        .lgn-form-control:focus ~ .lgn-input-icon,
        .lgn-form-control:focus + .lgn-input-icon {
            color: var(--secondary);
        }

.lgn-password-toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    transition: color 0.18s ease, transform 0.12s ease;
    z-index: 2;
}

    .lgn-password-toggle:hover {
        color: var(--secondary);
        transform: translateY(-1px);
    }

.lgn-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.lgn-custom-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
}

    .lgn-custom-checkbox input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: var(--secondary);
    }

.lgn-forgot-password {
    font-size: 14px;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.18s ease, transform 0.12s ease;
}

    .lgn-forgot-password:hover {
        color: var(--primary);
        transform: translateY(-1px);
    }

.lgn-btn-login {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 700;
    color: var(--light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    box-shadow: 0 6px 20px var(--shadow);
    position: relative;
    overflow: hidden;
    margin-bottom: 18px;
}

    .lgn-btn-login::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
        transition: left 0.45s ease;
    }

    .lgn-btn-login:hover::before {
        left: 100%;
    }

    .lgn-btn-login:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 28px var(--shadow);
    }

    .lgn-btn-login:active {
        transform: translateY(0);
    }

    .lgn-btn-login.loading {
        opacity: 0.85;
        pointer-events: none;
    }

/* ANIMATION CHO SPINNER - ĐÂY LÀ PHẦN FIX */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

.lgn-divider {
    text-align: center;
    margin: 28px 0;
    position: relative;
    color: var(--text-muted);
    font-size: 13px;
}

    .lgn-divider::before,
    .lgn-divider::after {
        content: '';
        position: absolute;
        top: 50%;
        width: 42%;
        height: 1px;
        background: var(--border);
    }

    .lgn-divider::before {
        left: 0;
    }

    .lgn-divider::after {
        right: 0;
    }

    .lgn-divider span {
        background: white;
        padding: 0 12px;
        color: var(--text-muted);
        font-weight: 600;
    }

.lgn-social-login {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.lgn-btn-social {
    flex: 1;
    padding: 10px 12px;
    border-radius: 10px;
    border: 2px solid var(--border);
    background: white;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    box-shadow: 0 6px 18px var(--shadow);
}

    .lgn-btn-social:hover {
        border-color: var(--secondary);
        transform: translateY(-3px);
        box-shadow: 0 10px 24px var(--shadow);
    }

.lgn-footer-text {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 18px;
}

@media (max-width: 991px) {
    .lgn-branding {
        display: none;
    }

    .lgn-form-section {
        flex: none;
        width: 100%;
        padding: 40px 28px;
    }
}

@media (max-width: 576px) {
    .lgn-container {
        flex-direction: column;
    }

    .lgn-form-section {
        padding: 28px 18px;
    }

    .lgn-form-header h2 {
        font-size: 26px;
    }

    .lgn-form-control {
        padding: 10px 12px 10px 40px;
        font-size: 14px;
    }

    .lgn-btn-login {
        padding: 12px 16px;
        font-size: 15px;
    }

    .lgn-social-login {
        flex-direction: column;
        gap: 10px;
    }
}
