html {
    background-color: #006400;
}

:root {
    --primary-green: #006400;
    --secondary-green: #2E8B57;
    --accent-gold: #d4af37;
    --light-green: #f0f7f0;
    --light-purple: #f2eef7;
    --dark-text: #333;
    --light-text: #f8f9fa;
    --gray-bg: #f8f9fa;
}

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

body {
    font-family: "Inter", sans-serif;
    background-color: #006400; /* Fallback solid color */
    background: linear-gradient(
        135deg,
        var(--primary-green),
        var(--secondary-green)
    );
    color: var(--dark-text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Poppins", sans-serif;
    font-weight: 600;
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    background-color: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    min-height: 600px;
}

.login-left {
    flex: 1;
    background: linear-gradient(
        135deg,
        var(--primary-green),
        var(--secondary-green)
    );
    color: white;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: cover;
}

.login-right {
    flex: 1;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background-color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--primary-green);
    font-size: 1.5rem;
    font-weight: bold;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
}

.welcome-text {
    margin-bottom: 30px;
}

.welcome-text h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.welcome-text p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.features-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.features-list li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1rem;
}

.features-list li i {
    margin-right: 10px;
    color: var(--accent-gold);
    font-size: 1.2rem;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h2 {
    color: var(--primary-green);
    font-size: 2rem;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
}

.login-form {
    width: 100%;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-text);
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5ee;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    background-color: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-green);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(0, 100, 0, 0.1);
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.remember-me {
    display: flex;
    align-items: center;
}

.remember-me input {
    margin-right: 8px;
}

.forgot-password {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: var(--secondary-green);
}

.btn-login {
    width: 100%;
    background: linear-gradient(
        135deg,
        var(--primary-green),
        var(--secondary-green)
    );
    color: white;
    border: none;
    border-radius: 10px;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 100, 0, 0.3);
}

.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: #e1e5ee;
}

.divider span {
    padding: 0 15px;
    color: #777;
    font-size: 0.9rem;
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: 2px solid #e1e5ee;
    color: #555;
    font-size: 1.2rem;
    transition: all 0.3s;
    cursor: pointer;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.social-btn.google:hover {
    background-color: #db4437;
    color: white;
    border-color: #db4437;
}

.social-btn.microsoft:hover {
    background-color: #0078d4;
    color: white;
    border-color: #0078d4;
}

.login-footer {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.login-footer a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 992px) {
    .login-container {
        flex-direction: column;
        max-width: 500px;
    }

    .login-left,
    .login-right {
        padding: 40px 30px;
    }

    .login-left {
        text-align: center;
    }

    .logo {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    body {
        padding: 15px;
    }

    .login-left,
    .login-right {
        padding: 30px 20px;
    }

    .welcome-text h1 {
        font-size: 1.8rem;
    }

    .login-header h2 {
        font-size: 1.7rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .social-login {
        flex-wrap: wrap;
    }
}

/* Animation pour le formulaire */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-right {
    animation: fadeIn 0.8s ease-out;
}

/* Style pour les messages d'erreur */
.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

.form-control.error {
    border-color: #e74c3c;
}

/* Loading state pour le bouton */
.btn-login.loading {
    position: relative;
    color: transparent;
}

.btn-login.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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