/* --- Global Reset & Premium Base Styles --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Poppins', sans-serif;
    background-color: #F7F8FC !important;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.login-page {
    display: flex; width: 100%; max-width: 1000px; min-height: 600px;
    background-color: #FFFFFF; border-radius: 20px;
    box-shadow: 0 15px 50px rgba(50, 70, 100, 0.1);
    overflow: hidden; animation: fadeIn 0.8s ease-out;
}
.branding-side {
    width: 45%; background: linear-gradient(135deg, #4F46E5, #3730A3);
    color: #FFFFFF; display: flex; flex-direction: column;
    justify-content: center; align-items: center; padding: 40px; text-align: center;
}
.branding-content h2 { font-size: 2em; font-weight: 600; margin-bottom: 15px; }
.branding-content p { font-size: 1.1em; font-weight: 300; line-height: 1.6; max-width: 300px; }
.form-side {
    width: 55%; display: flex; justify-content: center; align-items: center; padding: 50px;
}
.form-container { width: 100%; max-width: 380px; }
.form-container h1 { font-size: 2.2em; font-weight: 600; color: #1A253C; margin-bottom: 10px; }
.form-container .subtitle { color: #777; margin-bottom: 35px; }
.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-weight: 500; color: #555; margin-bottom: 8px; }
.input-wrapper { position: relative; display: flex; align-items: center; }
.input-wrapper i { position: absolute; left: 15px; color: #aaa; }
.input-wrapper input {
    width: 100%; padding: 14px 15px 14px 45px; border: 1px solid #DDE2E8; border-radius: 8px;
    font-size: 1em; font-family: 'Poppins', sans-serif; transition: all 0.3s ease;
}
.input-wrapper input:focus { outline: none; border-color: #4F46E5; box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1); }
.input-wrapper input::placeholder { color: #aaa; }
.captcha-group { margin-bottom: 30px; }
.captcha-group label { display: block; font-weight: 500; color: #555; margin-bottom: 8px; }
.captcha-wrapper { display: flex; align-items: center; gap: 10px; }
.captcha-wrapper img { border-radius: 8px; border: 1px solid #DDE2E8; }
.captcha-wrapper .refresh-icon {
    font-size: 1.2em; color: #888; cursor: pointer;
    transition: color 0.3s, transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.captcha-wrapper .refresh-icon:hover { color: #4F46E5; transform: rotate(180deg); }
.captcha-wrapper input {
    width: 100%; padding: 14px 15px; border: 1px solid #DDE2E8; border-radius: 8px;
    font-size: 1em; font-family: 'Poppins', sans-serif; transition: all 0.3s ease;
}
.captcha-wrapper input:focus { outline: none; border-color: #4F46E5; box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1); }
.login-button {
    width: 100%; padding: 15px; border: none; background-color: #4F46E5; color: #FFFFFF;
    font-size: 1.1em; font-weight: 500; border-radius: 8px; cursor: pointer;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2); transition: all 0.3s ease;
}
.login-button:hover {
    background-color: #4338CA; transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(79, 70, 229, 0.3);
}
.login-button:active { transform: translateY(0); box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2); }
.error-message {
    padding: 12px; margin-bottom: 20px; background-color: #FEECEB; color: #D93025;
    border-radius: 8px; text-align: center; border: 1px solid #F6C8C5; font-size: 0.95em;
}
@media (max-width: 992px) {
    .login-page { flex-direction: column; max-width: 480px; min-height: auto; }
    .branding-side, .form-side { width: 100%; }
    .branding-side { padding: 40px 30px; min-height: 250px; border-radius: 20px 20px 0 0; }
    .form-side { padding: 40px 30px; }
}

/* --- Forgot Password Link Style --- */
.forgot-password-link {
    text-align: center;
    margin-top: 20px;
}
.forgot-password-link a {
    color: #555;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}
.forgot-password-link a:hover {
    color: var(--accent-primary, #4F46E5);
    text-decoration: underline;
}

.success-message {
    padding: 12px; margin-bottom: 20px; background-color: #E6F4EA; color: #34A853;
    border-radius: 8px; text-align: center; border: 1px solid #CEEAD6; font-size: 0.95em;
}

/* --- NEW & IMPROVED: Password Strength Indicator Styles --- */
.password-strength {
    margin-top: -10px; /* Pulls it closer to the input field */
    margin-bottom: 20px;
    padding: 10px;
    background-color: #F7F8FC; /* A very light background to group the items */
    border-radius: 8px;
    border: 1px solid #DDE2E8;
}
.password-strength ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid; /* Use grid for a clean, multi-column layout on wider screens */
    grid-template-columns: 1fr 1fr;
    gap: 5px 15px; /* Row and column gap */
}
.password-strength li {
    font-size: 0.8em; /* Make text slightly smaller */
    color: #777;
    transition: color 0.3s ease;
    padding: 2px 0;
}
.password-strength li::before {
    content: '\f00d'; /* Font Awesome 'times' (X) icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #D93025; /* Red */
    margin-right: 8px;
    display: inline-block;
    width: 15px;
    transition: content 0.3s ease, color 0.3s ease;
}
/* Style for a valid criterion */
.password-strength li.valid {
    color: #333; /* Darken the text for valid items */
}
.password-strength li.valid::before {
    content: '\f00c'; /* Change icon to a 'check' */
    color: #34A853; /* Green */
}

/* On smaller screens, stack the grid into a single column */
@media (max-width: 480px) {
    .password-strength ul {
        grid-template-columns: 1fr;
    }
}