/* --- General Resets and Font Imports --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #1d3557;
    color: #333;
}

/* --- Main Container --- */
.login-container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* --- Image Section (Left Side) --- */
.login-image {
    flex: 1;
    display: none; /* Hidden by default, shown on larger screens */
}

.login-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Form Wrapper (Right Side) --- */
.login-form-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative; /* For form switching */
}

/* --- Form Styling --- */
.form {
    width: 100%;
    max-width: 400px;
    display: none; /* Hidden by default */
    flex-direction: column;
    gap: 16px;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.form.active {
    display: flex; /* Shown when active */
    opacity: 1;
    transform: scale(1);
}

.form h2 {
    font-size: 28px;
    font-weight: 600;
    color: #1d3557;
    text-align: center;
    margin-bottom: 0;
}

.form .form-subtitle {
    text-align: center;
    color: #666;
    margin-top: -10px;
    margin-bottom: 10px;
}

/* --- Input Groups --- */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 500;
    color: #333;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #1d3557;
    box-shadow: 0 0 0 3px rgba(29, 53, 87, 0.1);
}

/* --- Form Options (Remember Me / Reset Password) --- */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-options a {
    color: #1d3557;
    text-decoration: none;
    font-weight: 500;
}

.form-options a:hover {
    text-decoration: underline;
}

/* --- Buttons --- */
.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background-color: #1d3557;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.btn:hover {
    background-color: #e6b30d;
}

.btn:active {
    transform: scale(0.98);
}

/* --- Form Footer --- */
.form-footer {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.form-footer a {
    color: #1d3557;
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* --- Popup Message --- */
.popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #f44336; /* Red for errors */
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: translateX(0);
}

.popup.success {
    background-color: #4CAF50; /* Green for success */
}

.popup.hidden {
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
}

/* --- Responsive Design --- */
@media (min-width: 768px) {
    .login-image {
        display: block; /* Show image on tablets and larger */
    }
}

@media (max-width: 600px) {
    body {
        padding: 20px;
    }
    .login-container {
        min-height: auto;
    }
    .login-form-wrapper {
        padding: 30px;
    }
    .form h2 {
        font-size: 24px;
    }
}

.floating-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #007BFF;
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

.floating-button:hover {
    background-color: #0056b3;
    transform: scale(1.1);
}

.floating-button svg {
    width: 24px;
    height: 24px;
    fill: white;
}