/* =======================================================
   NEW LOGIN PAGE DESIGN - As per Image Sample
   ======================================================= */

/* --- Base and Page Layout --- */
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #f0f2f5; /* Light grey background like the sample */
}

.auth-page-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

/* --- Main Login/Signup Card --- */
.auth-container {
    display: flex;
    width: 100%;
    max-width: 900px; /* Adjust as needed */
    min-height: 600px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* Important for keeping rounded corners on children */
    animation: fadeIn 0.6s ease-out;
}

/* --- Left Side: Image Panel --- */
.auth-image-panel {
    flex: 1 1 65%; /* Flex-grow | Flex-shrink | Flex-basis */
    background-color: #000;
}

.auth-image-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the panel without distortion */
    display: block;
}

/* --- Right Side: Form Panel --- */
.auth-form-panel {
    flex: 1 1 55%;
    padding: 40px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative; /* For positioning the toggling forms */
}

/* --- Form Toggling & Animations --- */
.auth-form {
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
}
.auth-form.is-hidden {
    opacity: 0;
    transform: scale(0.98);
    pointer-events: none;
    position: absolute; /* Take it out of the layout flow */
    top: 50%;
    left: 50px;
    right: 50px;
    transform: translateY(-50%) scale(0.98);
}


/* --- Logo and Typography --- */
.auth-logo {
    display: block;
    max-width: 120px; /* Adjust size of your logo */
    height: auto;
    margin: 0 auto 25px auto;
}
.auth-form-panel h2 {
    text-align: center;
    color: #1c1e21; /* Dark grey, almost black */
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 10px 0;
}
.auth-subheading {
    text-align: center;
    color: #606770; /* Lighter grey for subheading */
    font-size: 0.95rem;
    margin: 0 0 30px 0;
}

/* --- Input Fields with Icons --- */
.form-group {
    position: relative;
    margin-bottom: 18px;
}
.form-group .fa-user, .form-group .fa-lock, .form-group .fa-envelope, .form-group .fa-briefcase, .form-group .fa-building {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #8a929c;
    font-size: 0.9rem;
}
.form-group input, 
.form-group select {
    width: 100%;
    padding: 14px 18px 14px 50px; /* More left padding for icon */
    background-color: #f5f6f7;
    border: 1px solid #dddfe2;
    border-radius: 8px;
    color: #1c1e21;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box; /* Important for consistent sizing */
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238a929c' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 0.8em;
}

.form-group input::placeholder { color: #8a929c; }
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4B49AC; /* Primary blue/purple from your button */
    box-shadow: 0 0 0 2px rgba(75, 73, 172, 0.2);
}

/* --- Password Toggle Icon --- */
.toggle-password {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #8a929c;
    cursor: pointer;
}

/* --- Agent Fields & Error Container --- */
.agent-fields { display: none; }
.error-container {
    background: #ffebe8;
    color: #8f1d12;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}
.error-container p { margin: 0; }

/* --- Buttons & Links --- */
.form-button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(90deg, #7B0043 0%, #7B0000 100%);
    box-shadow: 0 4px 15px rgba(75, 73, 172, 0.2);
    transition: all 0.3s ease;
    margin-top: 10px;
}
.form-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(75, 73, 172, 0.3);
}

.form-switcher { text-align: center; margin-top: 25px; font-size: 0.9rem; color: #606770; }
.form-switcher a.toggle-link {
    color: #7B0000; /* Use button color for link */
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}
.form-switcher a.toggle-link:hover { text-decoration: underline; }

/* --- Keyframe Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Responsive Design for Mobile --- */
@media (max-width: 850px) {
    .auth-image-panel {
        display: none; /* Hide image panel on smaller screens to focus on the form */
    }
    .auth-form-panel {
        flex-basis: 100%;
        padding: 40px;
    }
    .auth-container {
        flex-direction: column;
        max-width: 450px;
        min-height: auto;
    }
}

@media (max-width: 500px) {
    .auth-form-panel {
        padding: 30px 25px;
    }
    .auth-form.is-hidden {
        left: 25px;
        right: 25px;
    }
    .auth-form-panel h2 {
        font-size: 1.5rem;
    }
}