/* General Reset & Font */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital@1&display=swap'); /* Example font */
@import url('https://fonts.googleapis.com/css2?family=Arial:wght@400;500;600;700&display=swap'); /* Using Arial */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif; /* Consistent base font */
}

/* Body Styling */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Use min-height */
    background-color: #f0f4f8; /* Lighter background like register */
    overflow-x: hidden; /* Prevent horizontal scroll */
    padding: 10px 0; /* Add some vertical padding */
}

/* Container Styling - Matches register.css */
.container {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* Adjust column ratio if needed */
    width: 100%;
    max-width: 1200px; /* Max overall width */
    min-height: 95vh;
    overflow: hidden;
    background-color: #fff; /* White background for container */
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 20px;
}

/* Left Column - Matches register.css */
.left-column {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: linear-gradient(135deg, #0054a6, #002366); /* Gradient background */
    color: white;
    border-radius: 15px 0 0 15px;
    text-align: center; /* Center content */
}

.left-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 400px;
}

.left-logo .logo {
    width: clamp(200px, 60%, 300px); /* Responsive logo size */
    height: auto;
    margin-bottom: 20px;
    animation: fadeIn 1s ease;
}

.logo-text h2 {
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
    animation: fadeIn 1.5s ease;
}

.logo-text p {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    margin-top: 10px;
    animation: fadeIn 1.5s ease;
}

/* Right Column - Login Area */
.right-column {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px; /* Padding around the content area */
    overflow-y: auto; /* Allow right column to scroll if needed */
    background-color: #fff; /* Ensure white background */
}

/* Main Content within Right Column */
.main-content {
    width: 100%;
    max-width: 450px; /* Limit width of the login box */
    padding: 30px 40px; /* Padding inside the box */
    text-align: center;
    background-color: transparent; /* Container provides background */
    border-radius: 0;
    box-shadow: none;
    margin: 0; /* Remove fixed margins */
    /* Remove max-height and overflow, right-column handles scrolling */
}

/* Login Welcome Message */
.login-message {
    font-family: 'Playfair Display', serif; /* Specific font */
    font-style: italic;
    font-size: 1.8rem; /* Larger size */
    color: #002366; /* Dark blue */
    margin-bottom: 25px; /* Space below */
    animation: fadeInUp 1s ease;
}

/* Message Area (Errors/Success) - Matches register.css */
.message-area {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center; /* Center text */
    animation: fadeIn 0.5s ease;
    font-size: 0.95rem;
}
.message-area.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.message-area.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Form Styling - Harmonized with register.css */
.login-form {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
    margin: 0 auto;
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
    position: relative; /* Needed for error messages/icons */
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #343a40;
    font-size: 0.95rem;
}
/* Removed required asterisk styling as it wasn't in login form labels */

.form-group input {
    width: 100%;
    padding: 12px 15px; /* Consistent padding */
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fff;
}
.form-group input:focus {
    border-color: #0054a6;
    box-shadow: 0 0 0 3px rgba(0, 84, 166, 0.15);
    outline: none;
}

/* Password Container Specifics - Matches register.css */
.password-container {
    position: relative;
    width: 100%;
}
.password-container input#password {
    padding-right: 45px; /* Ensure space for the button */
}
.password-container .password-toggle-btn {
    position: absolute;
    right: 1px; top: 1px; bottom: 1px; /* Inside border */
    width: 40px; /* Button width */
    background: transparent;
    border: none;
    cursor: pointer;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 0 6px 6px 0;
    transition: color 0.2s ease;
}
.password-container .password-toggle-btn:hover,
.password-container .password-toggle-btn:focus {
    color: #0054a6;
    outline: none;
}
.password-container .password-toggle-btn i {
    font-size: 1.1rem;
}


/* Form Validation Styling (Basic - JS needed to add classes) */
.form-group .error-message {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 4px;
    display: none; /* Hide by default, shown by JS */
    font-weight: 500;
}
/* Input validation states (JS would add these classes) */
.form-group input.invalid {
    border-color: #dc3545 !important;
}
.form-group input.valid {
    border-color: #198754 !important;
}
.form-group input.invalid + .error-message, /* If error div is direct sibling */
.form-group .invalid ~ .error-message /* If error div is sibling of container */
{
    display: block;
}


/* Form Controls (Button & Links) - Matches register.css */
.form-controls {
    text-align: center;
    margin-top: 25px;
    padding-top: 15px;
    /* border-top: 1px solid #e9ecef; /* Optional separator */
}

/* Consolidated Button Style */
.login-button { /* Target specific button */
    background: linear-gradient(45deg, #0054a6, #002366); /* Darker gradient */
    color: white;
    padding: 13px 30px; /* Slightly less padding than register */
    border: none;
    border-radius: 30px;
    font-size: 1.05rem; /* Slightly smaller font */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px; /* Space below button */
    width: 100%;
    max-width: 280px; /* Adjust width */
    box-shadow: 0 4px 15px rgba(0, 84, 166, 0.2);
    display: block; /* Make it block */
    margin-left: auto; /* Center block button */
    margin-right: auto; /* Center block button */
}
.login-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 84, 166, 0.3);
}
.login-button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 84, 166, 0.2);
}

/* Links below button */
.forgot-password-link,
.register-link {
    display: block; /* Stack links vertically */
    color: #0054a6;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 5px 0;
    transition: color 0.2s ease;
    margin-top: 8px; /* Space between links */
}
.forgot-password-link:hover,
.register-link:hover {
    color: #002366;
    text-decoration: underline;
}

/* Keyframe Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }


/* --- Footer or Above Responsive Section --- */

/* --- Mobile Header Styles --- */
.mobile-header {
    display: none; /* Hidden by default on larger screens */
    flex-direction: column; /* Stack logo and text vertically */
    align-items: center; /* Center items horizontally */
    background-color: #0054a6; /* Blue background */
    color: white; /* White text */
    padding: 20px 15px; /* Padding inside the header */
    border-radius: 10px; /* Slightly rounded corners */
    margin-bottom: 25px; /* Space below the header */
    text-align: center; /* Center text */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    animation: fadeIn 0.5s ease; /* Fade in effect */
}

.mobile-logo {
    width: 80px; /* Adjust logo size as needed */
    height: auto;
    margin-bottom: 10px; /* Space between logo and text */
}

.mobile-header-text h4 {
    font-size: 1.1rem; /* Adjust heading size */
    font-weight: 600;
    margin: 0 0 5px 0; /* Spacing */
    line-height: 1.3;
}

.mobile-header-text p {
    font-size: 0.9rem; /* Adjust paragraph size */
    font-style: italic;
    opacity: 0.9; /* Slightly less prominent */
    margin: 0;
    line-height: 1.4;
}

/* --- Responsive Design Adjustments --- */
@media (max-width: 992px) {
    .container {
        grid-template-columns: 1fr; /* Stack columns */
        max-width: 600px; /* Limit width on tablet */
        margin: 20px;
        min-height: 0; /* Allow height to adjust */
    }
    .left-column {
        display: none; /* Hide left column */
    }
    .right-column {
        border-radius: 15px; /* Round corners if left is hidden */
        padding: 15px; /* Adjust padding */
    }
    .main-content {
        max-width: 100%; /* Use full width of right column */
        padding: 25px;
    }
    
    /* Show the mobile header */
    .mobile-header {
        display: flex; /* Show the header on mobile */
    }
}

@media (max-width: 768px) {
    body { padding: 0; }
    .container {
        margin: 0;
        width: 100%;
        border-radius: 0;
        min-height: 100vh; /* Full screen on mobile */
    }
    .right-column {
        border-radius: 0;
        padding: 10px;
    }
    .main-content {
        padding: 20px 15px;
    }
    .login-message { font-size: 1.6rem; }
}

@media (max-width: 480px) {
    .main-content { padding: 15px 10px; }
    .login-message { font-size: 1.5rem; margin-bottom: 20px;}
    .form-group input { padding: 10px 12px; font-size: 0.95rem; }
    .password-container input#password { padding-right: 40px; }
    .password-container .password-toggle-btn { width: 35px; }
    .login-button { padding: 12px 25px; font-size: 1rem; max-width: 250px; }
    .forgot-password-link, .register-link { font-size: 0.85rem; }
    
    /* Mobile header fine-tuning */
    .mobile-header {
        padding: 15px 10px;
        margin-bottom: 20px;
    }
    .mobile-logo {
        width: 70px;
    }
    .mobile-header-text h4 {
        font-size: 1rem;
    }
    .mobile-header-text p {
        font-size: 0.85rem;
    }
}

/* Touch-friendly adjustments - Optional: Remove hover effects */
@media (hover: none) {
    .login-button:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(0, 84, 166, 0.2);
    }
    .password-container .password-toggle-btn:hover {
        color: #6c757d; /* Reset color */
    }
     .forgot-password-link:hover, .register-link:hover {
        text-decoration: none; /* Remove underline on touch */
     }
}