/* --- CSS Variables forgot_password--- */
:root {
    --primary-color: #009460; /* Green */
    --secondary-color: #FCD116; /* Yellow */
    --accent-color: #CE1126; /* Red (for errors) */
    --dark-color: #2D3436; /* Dark text */
    --light-color: #F5F6FA; /* Light background */

    --alert-error-bg: #FFEBEE;
    --alert-error-text: var(--accent-color);
    --alert-error-border: #FFCDD2;

    --alert-success-bg: #E8F5E9;
    --alert-success-text: var(--primary-color);
    --alert-success-border: #C8E6C9;

    --border-radius-sm: 8px; /* For inputs, buttons */
    --border-radius-md: 16px; /* For the main container */
    --box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); /* More pronounced shadow */
    --transition-fast: all 0.2s ease-out; /* For interactive elements */
    --transition-default: all 0.3s ease-out; /* For general elements */

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* --- Base Styles (Mobile-First Defaults) --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: flex-start; /* Align to the top on mobile */
    min-height: 100vh; /* Ensure body takes full viewport height */
    padding: 1.5rem; /* Default padding for mobile */
    box-sizing: border-box;
}

.login-container {
    background: white;
    padding: 1.8rem; /* Adjusted padding for mobile */
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 450px; /* Max width for larger screens */
    text-align: center;
    margin-top: 2rem; /* Space from top on mobile */
    animation: fadeIn 0.4s ease-out; /* Apply animation */
}

.login-container h2 {
    color: var(--primary-color);
    margin-bottom: 1.8rem;
    font-size: 1.8rem; /* Adjusted for mobile readability */
    font-weight: 600;
}

.alert {
    padding: 1rem;
    border-radius: var(--border-radius-sm); /* Use smaller radius for alerts */
    margin-bottom: 1.5rem;
    font-size: 0.95rem; /* Adjusted font size for alerts */
    line-height: 1.4;
    text-align: left; /* Align alert text to left */
}

.alert-error {
    background-color: var(--alert-error-bg);
    color: var(--alert-error-text);
    border: 1px solid var(--alert-error-border);
}

.alert-success {
    background-color: var(--alert-success-bg);
    color: var(--alert-success-text);
    border: 1px solid var(--alert-success-border);
}

input[type="email"] {
    width: 100%;
    padding: 1.1rem; /* Adjusted padding for mobile input */
    margin-bottom: 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius-sm);
    font-size: 1rem; /* Adjusted font size for mobile input */
    transition: var(--transition-default);
    box-sizing: border-box; /* Crucial for width: 100% with padding */
}

input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 148, 96, 0.25); /* More prominent focus ring */
}

.login-button {
    width: 100%;
    padding: 1.1rem; /* Adjusted padding for mobile button */
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem; /* Adjusted font size for mobile button */
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-default);
    margin-top: 0.5rem;
    box-shadow: var(--shadow-sm); /* Subtle shadow for button */
}

.login-button:hover {
    background-color: #007548;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Stronger shadow on hover */
}

.login-button:active {
    transform: translateY(0);
    box-shadow: none;
}

.login-link {
    margin-top: 2rem;
    font-size: 0.95rem; /* Adjusted font size for mobile link text */
}

.login-anchor {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-default);
    padding: 0.25rem 0.5rem; /* Adjusted padding for better touch target */
    display: inline-block;
    border-radius: var(--border-radius-sm); /* Add border-radius for hover effect */
}

.login-anchor:hover {
    color: #007548;
    background-color: rgba(0, 148, 96, 0.05); /* Subtle background on hover */
    text-decoration: none; /* Remove underline on hover, rely on background */
}

/* --- Media Queries for Larger Screens --- */

/* Tablet and larger screens */
@media (min-width: 768px) {
    body {
        padding: 2rem;
        align-items: center; /* Center vertically on larger screens */
        justify-content: center; /* Center horizontally */
    }

    .login-container {
        padding: 2.5rem; /* Standard padding */
        margin-top: 0; /* Reset margin-top as body handles centering */
    }

    .login-container h2 {
        font-size: 2rem; /* Standard heading size */
    }

    .alert {
        padding: 1.2rem; /* More padding for alerts */
        font-size: 1rem;
    }

    input[type="email"] {
        padding: 1.2rem; /* Standard input padding */
        font-size: 1.1rem;
    }

    .login-button {
        padding: 1.2rem; /* Standard button padding */
        font-size: 1.1rem;
    }

    .login-link {
        font-size: 1rem;
    }
}

/* Desktop and larger screens */
@media (min-width: 1024px) {
    .login-container {
        padding: 3rem;
        max-width: 500px; /* Slightly wider container */
    }

    .login-container h2 {
        font-size: 2.2rem;
    }

    .alert {
        padding: 1.3rem;
        font-size: 1.05rem;
    }

    input[type="email"] {
        padding: 1.3rem;
        font-size: 1.15rem;
    }

    .login-button {
        padding: 1.3rem;
        font-size: 1.15rem;
    }

    .login-link {
        font-size: 1.05rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
