/* Premium SaaS Login Styles */
:root {
    --primary-color: #6C5DD3;
    /* Vibrant Purple/Blue from Image 1 inspiration */
    --primary-hover: #5b4eb8;
    --text-main: #11142D;
    --text-secondary: #808191;
    --border-color: #E4E4E4;
    --input-bg: #FFFFFF;
    --white: #FFFFFF;
    --radius-lg: 16px;
    /* Smooth large radius */
    --radius-md: 12px;
    --font-family: 'DM Sans', sans-serif;
}

body {
    font-family: var(--font-family) !important;
}

/* Layout */
.login.login-with-news-feed {
    display: flex;
    height: 100vh;
    background-color: var(--white);
    overflow: hidden;
}

.login.login-with-news-feed .news-feed {
    flex: 2;
    /* Increased from 1.2 to give image dominance */
    position: relative;
    display: block !important;
    overflow: hidden;
}

.login.login-with-news-feed .news-feed .news-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
}

/* Right Content - Compact Centered Area */
.login.login-with-news-feed .right-content {
    flex: 1;
    width: auto;
    max-width: 500px;
    /* Constrain width to keep it compact */
    min-width: 450px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Center children horizontally */
    padding: 40px;
    background-color: var(--white);
    position: relative;
    float: none;
    left: auto;
    right: auto;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.02);
    /* Restore subtle shadow for separation */
    z-index: 10;
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    left: auto;
    right: auto;
    width: 100%;
}

.login-header .d-flex {
    gap: 15px;
    /* Consistent gap between logo and text */
}

.login-header .icon {
    display: none;
}

.login-header img {
    height: 50px;
    margin-bottom: 0;
    /* Remove block margin */
}

/* Refined Typography for Title */
.login-header p {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    line-height: 1;
    letter-spacing: -0.5px;
    padding-top: 4px;
    /* Optical alignment with logo */
}

/* Content Width Limiter */
.login-content {
    width: 100%;
    max-width: 400px;
    /* Constrain form width for the 'card' look */
    position: relative;
    margin: 0;
    /* Allow space for footer */
    display: flex;
    flex-direction: column;
}

/* Input Fields with Icons */
.form-group.m-b-15,
.InputPassword.mb-3 {
    margin-bottom: 24px !important;
    position: relative;
    /* Reset any inherited container styles that cause 'ghosting' */
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i.icon-left {
    position: absolute;
    left: 20px;
    color: #B2B3BD;
    /* Discrete gray */
    font-size: 18px;
    z-index: 2;
    pointer-events: none;
}

.form-control.form-control-lg {
    height: 56px;
    padding-left: 54px;
    /* Space for icon */
    padding-right: 20px;
    background-color: var(--white);
    border: 2px solid #F0F0F3;
    /* Very light border initially */
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-main);
    transition: all 0.2s ease;
    width: 100%;
}

.form-control.form-control-lg:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(108, 93, 211, 0.1);
    background-color: var(--white);
}

.form-control.form-control-lg::placeholder {
    color: var(--text-secondary);
}

/* Password Toggle */
.InputPassword input {
    /* Padding inherited but need right padding for toggle */
    padding-right: 50px;
}

.InputPassword i.toggle-show-password {
    right: 20px !important;
    top: 50% !important;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #B2B3BD;
    transition: color 0.2s;
    z-index: 10;
    /* Ensure it's above the input */
}

.InputPassword i.toggle-show-password:hover {
    color: var(--text-main);
}

/* Primary Button */
button#buttonLogin {
    width: 100%;
    height: 56px;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 18px;
    font-weight: 700;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

button#buttonLogin:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(108, 93, 211, 0.2);
}

/* Divider 'o' */
.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 2px solid #F0F0F3;
}

.login-divider span {
    padding: 0 16px;
}

/* Social Buttons Container */
.social-login-container {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 20px;
}

/* Microsoft SSO Button - Premium Style */
.btn-microsoft-premium {
    flex: 1;
    height: 56px;
    background-color: var(--white);
    border: 2px solid #F0F0F3;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    font-weight: 600;
    color: var(--text-main);
    font-size: 16px;
}

.btn-microsoft-premium:hover {
    border-color: #E4E4E4;
    background-color: #FAFAFA;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.btn-microsoft-premium svg {
    width: 24px;
    height: 24px;
}

/* Notifications */
#notificationContainer {
    margin-top: 20px;
}

.alert {
    border-radius: var(--radius-md);
    padding: 1rem;
    background-color: #FFF2F2;
    color: #FF5A5A;
    border: 1px solid rgba(255, 90, 90, 0.2);
    font-weight: 600;
}

/* Premium Error Alert */
.alert-premium {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #FFF5F5;
    border: 1px solid #FFE5E5;
    border-radius: var(--radius-md);
    color: #E24A4A;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(226, 74, 74, 0.08);
    animation: slideUpFade 0.3s ease-out;
}

.alert-premium i {
    font-size: 18px;
    color: #FF5A5A;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer in Login Panel */
.login-footer {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: #B2B3BD;
    font-size: 13px;
    font-weight: 500;
}

.login-footer span.version {
    color: var(--text-secondary);
    font-weight: 600;
    margin-left: 5px;
}

/* Responsive */
@media (max-width: 991px) {
    .login.login-with-news-feed {
        flex-direction: column;
    }

    .login.login-with-news-feed .news-feed {
        display: none;
    }

    .login.login-with-news-feed .right-content {
        padding: 30px;
        width: 100%;
        max-width: 100%;
    }

    .login-footer {
        position: relative;
        bottom: auto;
        margin-top: 40px;
    }
}