﻿/* --- GLOBAL BASE LAYOUT --- */
body.login {
    background-color: #f8fafc !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0 !important;
    padding: 0 !important;
    height: 100vh !important;
}

.split-login-container {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* --- LEFT BRANDING PANEL (DESKTOP) --- */
/* --- UPDATED BRAND PANEL TO SHOW FULL IMAGE --- */
.login-brand-side {
    width: 50%;
    background-image: url('/assets/imgs/health.jpg');
    /* Forces the entire image to stretch and fit exactly inside the panel container boundaries */
    background-size: 100% 100% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Centered layout elements horizontally */
    text-align: center; /* Centered text alignments */
    padding: 60px 10%;
    color: #ffffff;
    position: relative;
    z-index: 1;
}

    /* Sharp corporate green overlay blend mode tint over full background image */
    .login-brand-side::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient( 135deg, rgba(20, 83, 45, 0.82) 0%, rgba(21, 128, 61, 0.70) 50%, rgba(34, 197, 94, 0.58) 100% );
        z-index: -1;
    }


/* --- GOVERNMENT STYLE TYPOGRAPHY UPGRADES --- */
.brand-welcome-heading {
    font-size: 22px; /* Tailored size for crisp official balance */
    font-weight: 800;
    margin: 0 0 14px 0;
    letter-spacing: -0.5px;
    line-height: 1.3;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    width: 100%;
}

.brand-sub-heading {
    font-size: 13px; /* Crisp administrative structural scale */
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 3px; /* Elegant wide tracking style common on state portals */
    width: 100%;
    opacity: 0.95;
}

.brand-ministry-text {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0; /* Reset margin bottom due to paragraph welcome space below */
    letter-spacing: 0.3px;
    width: 100%;
    position: relative;
    padding-bottom: 24px; /* Space layout above divider rule */
}

    /* Traditional institutional divider rule */
    .brand-ministry-text::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 70px; /* Clean horizontal line divider width */
        height: 2px;
        background-color: #ffffff;
        opacity: 0.35;
    }

.brand-welcome-text {
    font-size: 16px;
    color: #f0fdf4;
    line-height: 1.65;
    margin-top: 24px; /* Buffer clear space from the divider rule above */
    max-width: 520px;
    -ms-text-justify: inherit;
    text-justify: inherit;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    display: block;
}


/* --- RIGHT FORM PANEL (DESKTOP) --- */
.login-form-side {
    width: 50%;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    /* Forces content to stack vertically and pushes the footer down */
    justify-content: space-between;
    align-items: center;
    padding: 40px !important;
    overflow-y: auto;
    position: relative;
    height: 100vh; /* Keeps panel locked exactly to screen height */
}

body.login .logo {
    margin: 0 0 28px 0 !important;
    padding: 0 !important;
    text-align: center;
}

    body.login .logo img {
        max-height: 80px;
        width: auto;
    }

body.login .content {
    background-color: transparent !important;
    width: 100% !important;
    max-width: 400px !important;
    margin: auto 0 !important; /* Centers shorter forms perfectly in the screen */
    padding: 0 !important;
}

    body.login .content .form-group {
        position: relative;
        margin-bottom: 20px;
    }

    body.login .content .form-control {
        background-color: #f8fafc !important;
        border: 1px solid #cbd5e1 !important;
        color: #0f172a !important;
        height: 46px !important;
        /* padding: 10px 14px 10px 38px !important.*/
        border-radius: 6px !important;
        font-size: 14px !important;
        transition: all 0.2s ease-in-out;
    }

        body.login .content .form-control:focus {
            background-color: #ffffff !important;
            border-color: #16a34a !important;
            box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15) !important;
        }

    /* Input Icon Corrective Positions */
    body.login .content .input-icon {
        position: relative;
        width: 100%;
    }

        body.login .content .input-icon > i {
            position: absolute;
            z-index: 3;
            left: 14px !important;
            top: 50% !important;
            transform: translateY(-50%) !important;
            margin: 0 !important;
            color: #94a3b8 !important;
            font-size: 15px !important;
            display: inline-block;
        }

        body.login .content .input-icon .form-control:focus + i {
            color: #16a34a !important;
        }

    body.login .content h3,
    body.login .content .form-title {
        color: #0f172a !important;
        font-weight: 700 !important;
        font-size: 24px !important;
        margin-bottom: 24px !important;
    }

    body.login .content .btn-success,
    body.login .content .btn {
        background-color: #16a34a !important;
        border-color: #16a34a !important;
        font-weight: 600 !important;
        border-radius: 6px !important;
        height: 44px !important;
    }

        body.login .content .btn-success:hover,
        body.login .content .btn:hover {
            background-color: #15803d !important;
        }

body.login .copyright {
    position: relative !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    text-align: center !important;
    margin-top: 40px !important; /* Prevents form content from bumping into text */
    padding-bottom: 10px;
    color: #94a3b8 !important;
    font-size: 11px !important;
    font-weight: 600;
    letter-spacing: 0.5px;
    clear: both;
}


.menu-toggler.sidebar-toggler {
    display: none !important;
}

.hreflink {
    display: inline-block;
    padding: 6px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #16a34a !important; /* Sharp corporate green text */
    background-color: #f0fdf4 !important; /* Soft pastel emerald tint */
    border: 1px solid #dcfce7 !important; /* Clean matching light border */
    border-radius: 20px !important; /* Elegant rounded pill-shape */
    text-decoration: none !important; /* Removes default link underline */
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

    /* Hover and Interactive Focus States */
    .hreflink:hover,
    .hreflink:focus {
        color: #ffffff !important; /* Turns text crisp white */
        background-color: #16a34a !important; /* Fills background with your layout's solid green */
        border-color: #16a34a !important;
        text-decoration: none !important;
        box-shadow: 0 4px 6px -1px rgba(22, 163, 74, 0.2); /* Soft green glow */
        outline: none;
    }

/* --- MOBILE & TABLET RESPONSIVE OVERRIDES (< 992px) --- */
@media (max-width: 991px) {
    body .login {
        overflow-y: auto !important;
        height: auto !important;
    }

    .split-login-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .login-brand-side {
        width: 100% !important;
        /* Maintains standard high-definition widescreen aspect ratio on mobile headers */
        aspect-ratio: 16 / 9 !important;
        min-height: auto !important;
        /* Keeps the image perfectly scaled inside the top banner on phones */
        background-size: 100% 100% !important;
        padding: 30px 24px !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    .brand-welcome-heading {
        font-size: 14px !important;
        margin-bottom: 6px !important; /* Slight buffer adaptation for mobile */
    }

    .brand-sub-heading {
        font-size: 11px !important;
        letter-spacing: 2px !important;
    }

    .brand-ministry-text {
        font-size: 12px !important;
        padding-bottom: 12px !important;
    }

    .brand-welcome-text {
        display: none !important;
    }

    .login-form-side {
        width: 100% !important;
        height: auto !important; /* Allows layout expansion on tiny phone displays */
        min-height: calc(100vh - 180px);
        padding: 40px 20px !important;
    }

    body.login .logo {
        margin: 0 0 20px 0 !important;
    }

    body.login .content {
        max-width: 360px !important;
    }

    body.login .copyright {
        position: static !important;
        margin-top: 40px !important;
        text-align: center !important;
        width: 100% !important;
    }
}

/* Fix: On long forms or shorter displays, let the footer fall into natural text flow below the buttons */
@media (max-height: 850px) or (max-width: 991px) {
    .login-form-side {
        justify-content: flex-start !important; /* Prevent the flex layout from cramming items together */
    }

    body.login .copyright {
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        margin-top: 40px !important;
        text-align: center !important;
        width: 100% !important;
        display: block !important;
    }
}

