/* =======================================================
   LOGIN PAGE DESIGN (RE-THEMED FOR TRAVELINKS BRAND)
   ======================================================= */

/* --- Base and Page Layout --- */
body.auth-page { /* Use a specific class to avoid conflicts */
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--body-bg, #f4f4f4);
}

.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;
    min-height: 600px;
    background-color: var(--white, #ffffff);
    border-radius: var(--border-radius-lg, 24px); /* Using your brand radius */
    box-shadow: var(--card-shadow, 0 8px 30px rgba(0, 0, 0, 0.1)); /* Using your brand shadow */
    overflow: hidden;
    animation: fadeIn 0.6s ease-out;
}

/* --- Left Side: Image Panel --- */
.auth-image-panel {
    flex: 1 1 45%;
    background-color: #000;
}
.auth-image-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    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;
}

/* --- 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;
    top: 50%;
    left: 50px;
    right: 50px;
    transform: translateY(-50%) scale(0.98);
}

/* --- Logo and Typography --- */
.auth-logo {
    display: block;
    max-width: 120px;
    height: auto;
    margin: 0 auto 25px auto;
}
.auth-form-panel h2 {
    text-align: center;
    color: var(--text-dark, #333);
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 10px 0;
}
.auth-subheading {
    text-align: center;
    color: var(--text-light, #666);
    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: var(--text-light, #666);
    font-size: 0.9rem;
}
.form-group input, 
.form-group select {
    width: 100%;
    padding: 14px 18px 14px 50px;
    background-color: var(--body-bg, #f4f4f4); /* Match page background */
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: var(--border-radius-md, 12px); /* Using your brand radius */
    color: var(--text-dark, #333);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}
.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='%23666' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); /* Updated stroke color */
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 0.8em;
}
.form-group input::placeholder { color: var(--text-light, #666); }
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-orange, #f58220); /* Focus color is now your brand orange */
    box-shadow: 0 0 0 3px var(--light-orange-bg, #fff3e8); /* Focus shadow is your light brand orange */
}

/* --- Password Toggle Icon --- */
.toggle-password {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light, #666);
    cursor: pointer;
}

/* --- Agent Fields & Error Container --- */
.agent-fields { display: none; }
.error-container {
    background: #FFF0F1; /* Example for a light red background */
    color: var(--danger-red, #e53935);
    border: 1px solid var(--danger-red, #e53935);
    padding: 15px;
    border-radius: var(--border-radius-md, 12px);
    margin-bottom: 20px;
    text-align: center;
}
.error-container p { margin: 0; }

/* --- Buttons & Links --- */
.form-button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: var(--border-radius-md, 12px);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--white, #ffffff);
    /* THEMED GRADIENT: Your brand blue and orange */
    background: linear-gradient(90deg, var(--primary-blue, #003366) 0%, var(--primary-orange, #f58220) 100%);
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.2); /* Shadow color based on your blue */
    transition: all 0.3s ease;
    margin-top: 10px;
}
.form-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(245, 130, 32, 0.3); /* Shadow color based on your orange */
}

.form-switcher { text-align: center; margin-top: 25px; font-size: 0.9rem; color: var(--text-light, #666); }
.form-switcher a.toggle-link {
    color: var(--primary-orange, #f58220); /* Link color is your brand orange */
    text-decoration: none;
    font-weight: 600; /* Bolder link */
    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;
    }
    .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;
    }
}