@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');
:root {
    /* Color Palette derived from the desired image (CareSprout branding) */
    --primary-green-dark: #2C5F2D; /* Deep Forrest Green for titles/text */
    --primary-green-light: #5AA847; /* Vibrant Sprout Green for links/branding */
    --accent-yellow: #FFC300; /* Rich Gold/Orange for button base (Kept for reference) */
    --accent-yellow-dark: #D4A800; /* Darker Gold for button shadow (Kept for reference) */
    --bg-lightest: #F9F9F9; /* Container background */
    --bg-medium: #E0EEE2; /* Main body background (Kept for reference) */
    --input-border-start: #78B35A;
    --input-border-end: #C78C33;
    --text-dark: #333333;
    --text-light: #fff;
    --error-red: #D63031;

    /* NEW BUTTON COLORS (Connecting to green palette) */
    --button-green-base: #5AA847; /* Use primary-green-light for base */
    --button-green-darker: #4A8E3C; /* A slightly darker green for shadow/active */
    --button-green-hover: #6BC056; /* A slightly lighter green for hover */
}

body {
    margin: 0;
    /* Cleaned up linear-gradient for better performance/simplicity, kept original colors */
    background: linear-gradient(to bottom, #AADDE0, #CBE9DF, #EBF3DE);
    background-size: cover;
    background-repeat: no-repeat;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
}

.container {
    height: auto;
    background-color: var(--bg-lightest);
    border-radius: 20px;
    padding: 50px;
    width: 400px;
    text-align: center;
    /* Clean, soft shadow */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease-in-out;
}

.title {
    font-size: 40px;
    font-weight: 800; /* Extra bold */
    color: var(--primary-green-light);
    text-shadow: 2px 2px var(--text-light), 0px 0px 5px rgba(0,0,0,0.05); /* Used variable for consistency */
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    margin-bottom: 40px;
    color: var(--primary-green-dark);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* --- Input Fields and Labels --- */

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

.input-group label {
    display: block;
    text-align: left;
    /* REMOVED: margin-left: 20px; -> This was causing the left-side space */
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-green-dark);
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    /* Added padding/margin to keep it aligned with the input field's inner content */
    padding-left: 20px;
}

input[type="email"],
.password-container input[type="password"],
.password-container input[type="text"] {
    /* Set width to 100% of the container - padding - border, making it span the full width of the form's content area. */
    width: 100%;
    /* REMOVED: max-width: 360px; and adjusted width */
    height: 20px;
    /* Reduced horizontal padding to allow full width usage inside container (400px) */
    padding: 18px 20px;
    /* REMOVED: margin: 0 auto; -> This was redundant with 100% width and centered container */
    box-sizing: border-box; /* Crucial for width: 100% + padding/border to work correctly */
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--text-light);
    color: var(--text-dark);
    font-weight: 400;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05), inset 0 1px 3px rgba(0,0,0,0.02);

    /* Gradient border effect */
    background-image: linear-gradient(var(--text-light), var(--text-light)),
                      linear-gradient(to right, var(--input-border-start), var(--input-border-end));
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

input[type="email"]:focus,
.password-container input:focus {
    outline: none;
    border-color: var(--primary-green-light);
    box-shadow: 0 0 0 3px rgba(90, 168, 71, 0.2);
}

/* --- Password Toggle (Eye Icon) --- */

.password-container {
    position: relative;
    width: 100%; /* Ensures it spans the full width of the input field now set to width: 100% */
    display: flex;
    justify-content: center;
    align-items: center;
}

.password-container input {
    padding-right: 55px; /* Space for the eye icon */
}

.toggle-password {
    position: absolute;
    /* Adjusted 'right' value to account for the input's 20px right padding and 2px border */
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
    font-size: 1.4rem;
    transition: color 0.2s ease;
    z-index: 10;
}

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

/* --- Submit Button --- */

input[type="submit"] {
    background: var(--button-green-base);
    color: var(--text-light);
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    padding: 14px 60px;
    border: none;
    border-radius: 12px;
    margin-top: 40px;
    cursor: pointer;
    /* 3D button effect, using green shades */
    box-shadow: 0 8px 20px rgba(90, 168, 71, 0.3), inset 0 -4px 0px var(--button-green-darker);
    transition: all 0.2s ease;
    font-size: 18px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

input[type="submit"]:hover {
    background: var(--button-green-hover);
    box-shadow: 0 10px 25px rgba(90, 168, 71, 0.4), inset 0 -5px 0px var(--button-green-darker);
    transform: translateY(-2px);
}

input[type="submit"]:active {
    background: var(--button-green-darker);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2), inset 0 -1px 0px var(--button-green-darker);
    transform: translateY(1px);
}

/* --- Links and Messages --- */

.links {
    font-size: 14px;
    /* Removed text-align: right; to center it with the full-width input, or you can keep it */
    text-align: right;
    /* REMOVED: margin-right: 20px; -> to remove the extra space */
    margin-top: 10px;
    /* Added padding-right to align link with the input's content area if text-align: right is desired */
    padding-right: 20px;
}

.links a {
    color: var(--primary-green-light);
    text-decoration: none;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

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

.message {
    margin-top: 25px;
    font-weight: 600;
    font-size: 15px;
    color: var(--error-red);
    min-height: 20px;
    font-family: 'Poppins', sans-serif;
}

/* --- Success Modal (Lottie) Styling --- */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Dark overlay */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--text-light);
    padding: 20px 20px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    color: var(--text-dark);
    font-size: 18px;
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 250px;
    height: 250px;
    justify-content: space-between;
}

.modal-content p {
    margin-top: -10px;
    font-weight: 600;
    color: var(--primary-green-dark);
}

.modal-content dotlottie-wc {
    max-width: 100%;
    max-height: 70%;
    width: auto;
    height: auto;
}

/* --- Responsive Adjustments (Mobile) --- */
@media (max-width: 600px) {
    body {
        align-items: flex-start;
        padding-top: 40px;
    }

    .container {
        width: 90%;
        padding: 30px 15px;
        border-radius: 18px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .subtitle {
        font-size: 20px;
        margin-bottom: 25px;
    }

    .input-group label {
        /* REMOVED: margin-left: 15px; */
        padding-left: 15px; /* Use padding to align with input on mobile */
        font-size: 12px;
    }

    input[type="email"],
    .password-container input {
        /* Set to 100% and use box-sizing to manage padding/border */
        width: 100%;
        padding: 12px 15px;
        font-size: 13px;
        border-radius: 10px;
        box-sizing: border-box; /* Re-applied for mobile specificity */
    }

    .password-container input {
        padding-right: 40px;
    }

    .toggle-password {
        /* Adjusted 'right' for mobile input's 15px padding and 2px border */
        right: 17px;
        font-size: 1rem;
    }

    input[type="submit"] {
        padding: 10px 40px;
        font-size: 14px;
        border-radius: 10px;
        margin-top: 25px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), inset 0 -2px 0px var(--button-green-darker);
    }

    .links {
        text-align: center;
        font-size: 12px;
        /* Re-centered the link area on mobile and removed margins */
        margin-right: 0;
        margin-top: 5px;
        padding-right: 0;
    }

    .signup-link {
        margin-top: 25px;
        font-size: 12px;
    }

    .modal-content {
        width: 90%;
        max-width: 250px;
        padding: 25px;
        border-radius: 12px;
        font-size: 15px;
        height: 200px;
    }

    .modal-content dotlottie-wc {
        max-height: 60%;
    }
}


