/* =======================================================
   IMPROVED LOGIN PAGE DESIGN (REBRANDED FOR AIRKING)
   ======================================================= */

/* --- Base and Page Layout --- */
body {
    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);
    box-shadow: var(--card-shadow, 0 8px 30px rgba(0, 0, 0, 0.1));
    overflow: hidden;
    animation: fadeIn 0.6s ease-out;
}

/* --- Left Side: Image Panel --- */
.auth-image-panel {
    flex: 1 1 45%;
    position: relative; /* For the overlay */
}
/* NEW: Subtle violet overlay to enhance contrast */
.auth-image-panel::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(54, 33, 179, 0.3), transparent);
}
.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: 700; /* Bolder for more impact */
    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 i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light, #666);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}
.form-group input {
    width: 100%;
    padding: 14px 18px 14px 50px;
    background-color: #f8f9fa; /* Slightly different background */
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: var(--border-radius-md, 12px);
    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 input::placeholder { color: var(--text-light, #666); }
.form-group input:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 0 3px var(--light-cyan-bg);
}
.form-group input:focus ~ i { /* Icon color changes on focus */
    color: var(--primary-cyan);
}

/* --- Password Toggle Icon --- */
.toggle-password {
    right: 18px;
    left: auto;
    cursor: pointer;
}

/* --- Messages: Error and Success with Icons --- */
.error-container,
.success-container {
    padding: 15px 15px 15px 50px; /* Make room for the icon */
    border-radius: var(--border-radius-md, 12px);
    margin-bottom: 20px;
    text-align: left; /* Align text to the left */
    position: relative;
}
.error-container {
    background: #FFF0F1;
    color: #b71c1c;
    border: 1px solid #ffcdd2;
}
.success-container {
    background: var(--light-cyan-bg);
    color: #00636e;
    border: 1px solid var(--primary-cyan);
}
.error-container p, .success-container p { margin: 0; }
/* NEW: Icons for the message boxes */
.error-container::before,
.success-container::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}
.success-container::before {
    content: '\f058'; /* fa-circle-check */
    color: var(--primary-cyan);
}
.error-container::before {
    content: '\f06a'; /* fa-circle-exclamation */
    color: var(--danger-red);
}

/* --- 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(--primary-cyan);
    background: linear-gradient(90deg, var(--primary-violet) 0%, var(--accent-magenta) 100%);
    box-shadow: 0 4px 15px rgba(54, 33, 179, 0.2);
    margin-top: 10px;
    
    /* IMPROVED: Setup for dynamic gradient hover */
    background-size: 200% auto;
    transition: all 0.4s ease;
}
.form-button:hover {
    background-position: right center; /* Shifts gradient to the right */
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(212, 0, 255, 0.3);
}

.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-cyan);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease;
}
.form-switcher a.toggle-link:hover {
    color: var(--primary-violet);
}

/* --- 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; }
}