/* Re-import necessary root variables if this CSS is not combined with style.css */
:root {
    --primary-green: #0cb218;
    --dark-green: #123524;
    --light-yellow: #eddd5e;
    --dark-yellow: #d3c448;
    --light-gray: #f8f9fa;
    --dark-gray: #212529;
    --medium-gray: #666;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--dark-gray);
    overflow-x: hidden;
    line-height: 1.7;
    background-color: var(--light-gray); /* Overall background for the page */
}

/* Login Form Section - Similar to registration-section-container */
.login-section-container {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4f5e8 100%);
    padding: 80px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Ensure it takes full viewport height */
}

.login-card {
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    width: 90%;
    max-width: 1000px;
    margin: auto;
}

.login-card-left {
    flex: 1;
    min-width: 350px;
    background-image: url('/static/img/ghadgesir.jpg');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    background-color: #f8f9fa;
    height: auto;
    min-height: 500px;
}

.login-card-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(12, 178, 24, 0.2) 0%, rgba(18, 53, 36, 0.6) 100%);
}

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

.login-card-right h2 {
    font-size: 2.2rem;
    color: var(--dark-gray);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.login-card-right h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-green);
}

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

.input-group-custom .form-control {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px 15px 15px 50px;
    font-size: 1rem;
    height: auto;
    transition: all 0.3s ease;
}

.input-group-custom .form-control:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.25rem rgba(12, 178, 24, 0.25);
}

.input-group-custom .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--medium-gray);
    font-size: 1.2rem;
    z-index: 2;
}

/* Password toggle button */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--medium-gray);
    cursor: pointer;
    z-index: 2;
    padding: 0;
    font-size: 1.1rem;
}

.password-toggle:hover {
    color: var(--primary-green);
}

/* Form validation styles */
.input-group-custom .form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

/* Remember me checkbox */
.form-check {
    margin-bottom: 20px;
}

.form-check-input:checked {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

.form-check-label {
    color: var(--medium-gray);
    font-size: 0.9rem;
    cursor: pointer;
}

/* Enhanced button states */
.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading {
    display: none;
}

/* Forgot password link */
.forgot-password a {
    color: var(--medium-gray);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: var(--primary-green);
    text-decoration: underline;
}

/* Security notice */
.security-notice .alert-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Enhanced message boxes */
.message-box {
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    border: none;
    transition: opacity 0.3s ease;
}

.message-box.success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.message-box.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.message-box.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.login-form .btn-login {
    background: linear-gradient(to right, var(--primary-green) 0%, var(--dark-green) 100%);
    border: none;
    color: white;
    padding: 16px 0;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 8px 20px rgba(12, 178, 24, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-form .btn-login:hover {
    box-shadow: 0 12px 25px rgba(12, 178, 24, 0.4);
    transform: translateY(-2px);
}

.or-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.or-divider::before {
    content: '';
    position: absolute;
    width: 40%;
    height: 1px;
    background-color: #eee;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}
.or-divider::after {
    content: '';
    position: absolute;
    width: 40%;
    height: 1px;
    background-color: #eee;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}
.or-divider span {
    background-color: white;
    padding: 0 15px;
    color: var(--medium-gray);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.social-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.social-button {
    flex: 1;
    min-width: 120px;
    padding: 14px 15px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.social-button:hover {
    opacity: 0.9;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.social-button.facebook { background-color: #3b5998; }
.social-button.google { background-color: #dd4b39; }
.social-button.twitter { background-color: #1da1f2; }

.social-button i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.login-confirmation {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #555;
}

.login-confirmation strong {
    color: #007bff;
    font-weight: 600;
}

/* Message Box styles (reusing from previous setup) */
.message-box {
    margin-top: 25px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #007bff;
    text-align: center;
}

.message-box.success {
    color: #28a745;
}

.message-box.error {
    color: #dc3545;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .login-card {
        flex-direction: column;
    }
    .login-card-left,
    .login-card-right {
        min-width: 100%;
    }
    .login-card-left {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .login-section-container {
        padding: 40px 0;
    }
    .login-card {
        margin: 15px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    .login-card-right {
        padding: 25px;
    }
    .login-card-right h2 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
}