@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

body.login-page {
    background: linear-gradient(135deg, rgb(82, 140, 228) 0%, rgb(72, 111, 219) 50%, rgb(82, 140, 228) 100%);
    background-size: 200% 200%;
    animation: gradientBG 10s ease infinite;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    position: relative;
}

/* Animated background elements */
body.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.login-container {
    width: 100%;
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    min-height: 500px;
    animation: slideUp 0.8s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
}

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

.logo-side {
    background: #ffffff;
    color: #333333;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 45%;
    position: relative;
    overflow: hidden;
}

.logo-side::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.logo-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.logo-img {
    max-width: 280px;
    margin-bottom: 20px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.logo-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.95);
}

.company-tagline {
    color: rgba(255, 255, 255, 0.85);
    margin-top: 15px;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.5;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.form-side {
    padding: 50px 40px;
    background: rgba(255, 255, 255, 0.95);
    width: 55%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-title {
    color: #2d3748;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 28px;
    text-align: left;
}

.form-subtitle {
    color: #718096;
    font-size: 16px;
    margin-bottom: 35px;
    font-weight: 400;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.form-control {
    height: 50px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    width: 100%;
    padding: 0 18px;
    font-size: 15px;
    font-weight: 400;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 16px;
    pointer-events: none;
}

.remember-me {
    display: flex;
    align-items: center;
    margin: 20px 0 30px 0;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    accent-color: #667eea;
}

.remember-me label {
    font-size: 14px;
    color: #4a5568;
    font-weight: 400;
    cursor: pointer;
}

.login-btn {
    background: linear-gradient(135deg, rgb(82, 140, 228) 0%, rgb(72, 111, 219) 100%);
    border: none;
    color: white;
    font-weight: 600;
    font-size: 16px;
    width: 100%;
    height: 50px;
    border-radius: 12px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.login-btn:hover::before {
    left: 100%;
}

.forgot-link {
    color: #667eea;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    display: block;
    margin-top: 20px;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #5a67d8;
    text-decoration: none;
}

.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 25px;
    color: #718096;
    font-size: 12px;
}

.security-badge i {
    margin-right: 6px;
    color: #48bb78;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-card {
        flex-direction: column;
        margin: 20px;
        max-width: none;
    }
    
    .logo-side, .form-side {
        width: 100%;
        padding: 30px 25px;
    }
    
    .logo-side {
        min-height: 200px;
    }
    
    .form-title {
        font-size: 24px;
    }
    
    .logo-img {
        max-width: 200px;
    }
}

/* Loading animation */
.loading {
    pointer-events: none;
}

.loading .login-btn {
    background: #a0aec0;
    cursor: not-allowed;
}

.loading .login-btn::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
