:root {
    --primary-color: #0056b3; 
    --primary-dark: #004085;  
    --accent-gold: #ffc107;   
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f4f8fb;      
    --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    height: 100vh;
    overflow: hidden; 
}

.split-screen-container { display: flex; height: 100%; width: 100%; }

/* --- FIXED IMAGE PATH --- */
.left-pane {
    flex: 1; 
    background-image: url('../images/SOUTHERNBAPTISTCOLLEGELOGO.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
}

.left-pane .overlay {
    background: linear-gradient(135deg, rgba(0, 64, 133, 0.9), rgba(0, 86, 179, 0.8));
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--white); text-align: center; padding: 40px;
}

.brand-display .logo-icon { font-size: 3rem; margin-bottom: 20px; color: var(--accent-gold); }
.brand-display h1 { font-family: 'Playfair Display', serif; font-size: 3rem; margin-bottom: 15px; }
.brand-display p { font-size: 1.1rem; opacity: 0.9; max-width: 400px; margin: 0 auto; line-height: 1.6; }

.right-pane { flex: 1; display: flex; align-items: center; justify-content: center; background-color: var(--bg-light); }
.login-card { width: 100%; max-width: 420px; padding: 40px; background: var(--bg-light); border-top: 4px solid var(--accent-gold); border-radius: 8px;}
.title { font-family: 'Playfair Display', serif; font-size: 2.2rem; color: var(--primary-color); margin-bottom: 10px; }
.subtitle { color: var(--text-light); margin-bottom: 40px; font-size: 0.95rem; }

.input-wrapper { margin-bottom: 20px; }
.input-wrapper label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text-dark); margin-bottom: 8px; }

.input-group { position: relative; }
.input-group .icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--primary-color); z-index: 2; }
.input-group .toggle-password { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: #aaa; cursor: pointer; z-index: 10; transition: color 0.3s; }
.input-group .toggle-password:hover { color: var(--primary-color); }

/* --- FIXED OVERLAPPING ICON --- */
.input-group input, .input-group select {
    width: 100%;
    padding: 14px 45px 14px 45px; /* Pushes text past the left icon */
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: 0.3s;
    background-color: var(--white);
    outline: none;
    appearance: none;
}

.input-group input:focus, .input-group select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15); }

/* --- MAIN LOGIN BUTTON --- */
.btn-login { width: 100%; padding: 14px; background-color: var(--primary-color); color: white; border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: 0.3s; display: flex; justify-content: center; align-items: center; gap: 10px; }
.btn-login:hover { background-color: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0, 86, 179, 0.2); }

/* --- NEW GUEST LOGIN BUTTON --- */
.btn-guest-login { width: 100%; padding: 14px; background-color: var(--primary-color); color: white; border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: 0.3s; display: flex; justify-content: center; align-items: center; gap: 10px; text-decoration: none; }
.btn-guest-login:hover { background-color: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0, 86, 179, 0.2); }


.footer-links { margin-top: 30px; text-align: center; font-size: 0.9rem; color: var(--text-light); }
.register-link { color: var(--primary-color); font-weight: 600; text-decoration: none; }
.back-home { display: block; margin-top: 15px; color: #999; text-decoration: none; font-size: 0.85rem; transition: 0.2s; }
.back-home:hover { color: var(--text-dark); }

@media (max-width: 768px) {
    .left-pane { display: none; }
    .right-pane { background-color: var(--white); }
}

/* Back to Home Button */
.btn-back-home {
    position: absolute;
    top: 20px;
    left: 20px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 100;
    background: white;
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Fix squished dropdown text on small phones */
@media (max-width: 480px) {
    .input-group select {
        font-size: 0.85rem; /* Shrinks the text slightly so it fits the box */
        padding-right: 30px;
    }
}

@media (max-width: 480px) {
    /* Shrink the dropdown text so "Requesting User" fits perfectly */
    .input-group select {
        font-size: 0.85rem;
        padding-right: 10px;
    }
    
    /* Make sure the login box doesn't cover the back button */
    .login-container {
        margin-top: 60px; 
    }
}

/* =========================================
   📱 MOBILE FIX: ENABLE SCROLLING
   ========================================= */
@media (max-width: 768px) {
    /* 1. Unlock the body and container so they can scroll */
    body, html {
        height: auto;
        min-height: 100vh;
        overflow-y: auto !important; 
    }
    
    .split-screen-container {
        height: auto;
        min-height: 100vh;
        display: block; /* Stacks the layout naturally */
    }

    .right-pane {
        height: auto;
        min-height: 100vh;
        overflow-y: visible !important; /* Allows the content to stretch down */
        padding: 40px 20px 60px 20px; /* Gives nice breathing room at top and bottom */
        display: flex;
        align-items: center;
    }
    
    /* 2. Give the card enough space to breathe */
    .login-card {
        margin: auto;
        width: 100%;
    }

    /* 3. Fix squished dropdown text */
    .input-group select {
        font-size: 0.85rem;
        padding-right: 10px;
    }
    
    .input-group input, 
    .input-group select {
        padding: 12px 10px 12px 45px;
    }
}
.input-wrapper a:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

/* =========================================
   📱 MOBILE & GADGET RESPONSIVE FIXES
   ========================================= */

/* Container for Birth Date to keep it neat on all screens */
.dob-mobile-container {
    display: flex;
    gap: 10px;
    flex-direction: row; /* Default for Laptops/PC */
    width: 100%;
}

/* Specific styling for the Month dropdown */
.dob-select-month {
    flex: 2;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    background: white;
    outline: none;
    cursor: pointer;
}

/* Wrapper for Day and Year inputs */
.dob-day-year {
    display: flex;
    gap: 10px;
    flex: 2.5;
}

.dob-day-year input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    outline: none;
}

.helper-text {
    color: #888;
    font-size: 0.75rem;
    margin-top: 5px;
    display: block;
}

/* --- MOBILE SPECIFIC MEDIA QUERY --- */
@media (max-width: 600px) {
    /* Stack the Month above the Day/Year on small phone screens */
    .dob-mobile-container {
        flex-direction: column; 
    }
    
    .dob-day-year {
        width: 100%;
    }

    /* Hide the decorative left side on mobile to save space for the form */
    .left-pane {
        display: none !important;
    }

    /* Make the login/reset card fill the mobile screen width */
    .right-pane {
        width: 100% !important;
        padding: 15px !important;
    }

    .login-card {
        padding: 25px !important;
        box-shadow: none !important; 
        border-radius: 12px !important;
        width: 100% !important;
    }
}