/* General Body Styles */
body {
    font-family: 'Poppins', sans-serif; /* Using Poppins for a modern feel */
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f0f4f8, #c8d3e3); /* Soft gradient background */
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Login Container */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
    box-sizing: border-box; /* Include padding in element's total width and height */
}

/* Login Box Styling */
.login-box {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); /* Soft shadow */
    width: 100%;
    max-width: 400px; /* Max width for larger screens */
    text-align: center;
    box-sizing: border-box;
}

/* Titles and Subtitles */
.login-title {
    font-size: 2.2em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.login-subtitle {
    font-size: 1em;
    color: #7f8c8d;
    margin-bottom: 30px;
}

/* Input Group Styles */
.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.9em;
    color: #555;
    margin-bottom: 8px;
    font-weight: 400;
}

.input-group input[type="email"],
.input-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    color: #333;
    box-sizing: border-box; /* Ensures padding doesn't expand the input width */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-group input[type="email"]:focus,
.input-group input[type="password"]:focus {
    border-color: #3498db; /* Highlight on focus */
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none; /* Remove default outline */
}

/* Login Button */
.login-button {
    width: 100%;
    padding: 15px;
    background-color: #3498db; /* Primary button color */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    letter-spacing: 0.5px;
}

.login-button:hover {
    background-color: #2980b9; /* Darker on hover */
    transform: translateY(-2px); /* Slight lift effect */
}

.login-button:active {
    transform: translateY(0); /* Press effect */
}

/* Optional: Forgot password link */
.forgot-password {
    margin-top: 20px;
    font-size: 0.9em;
}

.forgot-password a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #2980b9;
    text-decoration: underline;
}


/* Add this to your login.css */
.error-message {
    color: #e74c3c; /* Red color for errors */
    font-size: 0.9em;
    margin-top: -10px; /* Adjust margin to pull it closer to inputs */
    margin-bottom: 15px;
    text-align: center;
    visibility: hidden; /* Hidden by default */
    opacity: 0;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.error-message.show {
    visibility: visible;
    opacity: 1;
}

.error-message {
    min-height: 20px; /* Reserve space so layout doesn’t shift */
    color: red;
    font-size: 14px;
    margin-bottom: 10px;
    text-align: center;
    visibility: hidden; /* Start hidden */
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.error-message.visible {
    visibility: visible;
    opacity: 1;
}




/* Responsive Adjustments */
@media (max-width: 600px) {
    .login-box {
        padding: 30px 20px;
        margin: 20px; /* Add some margin on smaller screens */
    }

    .login-title {
        font-size: 1.8em;
    }

    .login-subtitle {
        font-size: 0.9em;
    }

    .input-group input {
        padding: 10px 12px;
        font-size: 0.95em;
    }

    .login-button {
        padding: 12px;
        font-size: 1em;
    }
}