/* General Body and Root Variables */
:root {
    --primary-color: #4CAF50; /* Green */
    --secondary-color: #20a8d8; /* Blue */
    --text-dark: #34495e; /* Darker charcoal */
    --text-light: #6c7a89; /* Muted grey */
    --bg-light: #f5f7fa; /* Very light subtle background */
    --bg-white: #ffffff;
    --border-color: #e0e6ed; /* Light grey border */
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.08);
    --transition-speed: 0.3s ease-in-out;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--bg-light) 0%, #e0e5ea 100%); /* Subtle gradient background */
    display: flex; /* Use flexbox to center content */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    min-height: 100vh; /* Full viewport height */
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Login Container (the main card) */
.login-container {
    background-color: var(--bg-white);
    padding: 40px 30px; /* Generous padding */
    border-radius: 12px; /* Rounded corners */
    box-shadow: var(--shadow-light); /* Soft shadow */
    text-align: center;
    width: 100%;
    max-width: 400px; /* Max width for the login form */
    box-sizing: border-box; /* Include padding in width calculation */
}

.login-container h2 {
    font-size: 2.2rem; /* Larger heading */
    color: var(--primary-color); /* Green heading */
    margin-bottom: 30px; /* Space below heading */
    font-weight: 700;
    position: relative;
}

/* Underline for the heading */
.login-container h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Error Message Styling */
.error-message {
    color: #e74c3c; /* Red color for errors */
    background-color: #fce8e8; /* Light red background */
    border: 1px solid #e74c3c;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Form Group (Label + Input) */
.form-group {
    margin-bottom: 25px; /* Space between form fields */
    text-align: left; /* Align labels to the left */
}

.form-group label {
    display: block; /* Make label take full width */
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 8px; /* Space between label and input */
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px; /* Slightly rounded inputs */
    font-size: 1rem;
    color: var(--text-dark);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06); /* Subtle inner shadow */
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    box-sizing: border-box; /* Include padding in width */
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    border-color: var(--secondary-color); /* Highlight on focus */
    box-shadow: 0 0 0 3px rgba(32, 168, 216, 0.2); /* Soft glow on focus */
    outline: none; /* Remove default outline */
}

/* Submit Button */
.submit-btn {
    background: linear-gradient(45deg, var(--primary-color), #6dd5ed); /* Gradient for the button */
    color: var(--bg-white);
    padding: 14px 25px;
    border: none;
    border-radius: 25px; /* Pill-shaped button */
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-speed);
    width: 100%; /* Full width button */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.submit-btn:hover {
    background: linear-gradient(45deg, #43a047, #4ecdc4); /* Darker gradient on hover */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px); /* Slight lift */
}

.submit-btn:active {
    transform: translateY(0); /* Press effect */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* --- Responsive Design --- */
@media (max-width: 600px) {
    .login-container {
        margin: 20px; /* Add margin on very small screens */
        padding: 30px 20px; /* Reduce padding */
    }

    .login-container h2 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input[type="text"],
    .form-group input[type="password"] {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    .submit-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
}