/**
 * MyInsights Portal – Full-Screen Split-Screen Login Styles
 * Theme: BNI Modern Elite (Neo Corporate)
 * Fonts: System UI (-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif)
 * Layout: 100vh Strict No-Scroll Desktop Split Screen
 */

:root {
    --bni-red: #D7193F;
    --bni-red-dark: #800014;
    --bni-red-deep: #A30823;
    --bni-red-light: #E01944;
    --bni-red-card: rgba(168, 8, 35, 0.78);
    --bni-red-glow: rgba(215, 25, 63, 0.35);
    --bni-red-subtle: rgba(215, 25, 63, 0.12);
    --navy-dark: #111827;
    --text-slate: #1E293B;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --bg-page: #FFFFFF;
    --bg-input: #EEF3F8;
    --input-surface: #EEF3F8;
    --border-input: #E2E8F0;
    --border-focus: #D7193F;
    --radius-pill: 9999px;
    --radius-card: 14px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Avenir Next W01", "Proxima Nova W01", "Rubik", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   STRICT NO-SCROLL DESKTOP VIEWPORT (100VH EXACT)
   ========================================================================== */
html, body {
    height: 100vh;
    max-height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    overflow: hidden !important;
    background: #FFFFFF;
    color: var(--text-slate);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.login-split-page {
    display: flex;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden !important;
}

/* ==========================================================================
   LEFT PANEL – BRANDING & VISUAL PRESENTATION (55% WIDTH)
   ========================================================================== */
.left-branding-panel {
    flex: 0 0 55%;
    width: 55%;
    height: 100vh;
    max-height: 100vh;
    background-color: var(--bni-red-dark);
    background-image: linear-gradient(135deg, rgba(125, 0, 18, 0.65) 0%, rgba(165, 8, 32, 0.4) 45%, rgba(215, 25, 63, 0.15) 100%), url('../images/login_portal_bg.jpg');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    color: #FFFFFF;
    padding: clamp(20px, 3.8vh, 44px) clamp(28px, 3.8vw, 54px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden !important;
}

/* Subtle Angular Polygon Facet Accent at Bottom */
.left-branding-panel::after {
    content: "";
    position: absolute;
    bottom: -80px;
    right: -60px;
    width: 340px;
    height: 340px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 65%);
    transform: rotate(35deg);
    pointer-events: none;
    z-index: 1;
}

.left-branding-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

/* Top Branding Bar */
.left-top-branding {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-shrink: 0;
}

.brand-identity-cluster {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.brand-official-logo {
    height: clamp(34px, 4.2vh, 44px);
    width: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.4));
}

.brand-portal-sub {
    font-size: clamp(11.5px, 1.05vw, 13px);
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.2;
    padding-left: 12px;
    border-left: 1.5px solid rgba(255, 255, 255, 0.35);
    font-family: inherit;
    white-space: nowrap;
}

.bni-partner-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.bni-logo-file {
    height: clamp(30px, 3.8vh, 38px);
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.bni-network-text {
    font-size: 9px;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 2px;
    font-weight: 500;
}

/* Large Display Hero Headline & Description - Prominent & Big */
.left-main-hero {
    margin: clamp(14px, 2.5vh, 26px) 0 clamp(10px, 1.8vh, 18px);
    max-width: 580px;
}

.hero-headline {
    font-size: clamp(38px, 3.8vw, 54px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: normal;
    margin-bottom: clamp(10px, 1.8vh, 18px);
    color: #FFFFFF;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.hero-description {
    font-size: clamp(14px, 1.25vw, 17px);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.94);
    max-width: 520px;
    font-weight: 400;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 4 Feature Highlight Badges (High Visibility & Solid Contrast) */
.feature-highlights-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(8px, 1vw, 12px);
    margin: clamp(10px, 2vh, 20px) 0;
    max-width: 560px;
}

.highlight-card {
    background: var(--bni-red-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.2px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-card);
    padding: clamp(10px, 1.5vh, 15px) clamp(6px, 0.8vw, 10px);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #FFFFFF;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.highlight-card:hover {
    transform: translateY(-2px);
    background: rgba(195, 12, 42, 0.88);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.highlight-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.22));
}

.highlight-icon svg {
    width: 24px;
    height: 24px;
}

.highlight-label {
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.3;
    color: #FFFFFF;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Footer Attribution: eNova Solutions */
.left-footer-brand {
    margin-top: auto;
    padding-top: clamp(8px, 1.5vh, 16px);
    flex-shrink: 0;
}

.maintained-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 6px;
    font-family: inherit;
}

.enova-brand-link {
    display: inline-block;
    text-decoration: none;
}

.enova-logo-img {
    height: clamp(26px, 3.2vh, 32px);
    width: auto;
    object-fit: contain;
    display: block;
    transition: opacity 0.2s ease;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

.enova-logo-img:hover {
    opacity: 0.92;
}

/* ==========================================================================
   RIGHT PANEL – LOGIN FORM (45% WIDTH, STRICTLY NO-SCROLL CENTERED)
   ========================================================================== */
.right-auth-panel {
    flex: 0 0 45%;
    width: 45%;
    height: 100vh;
    max-height: 100vh;
    background: #FFFFFF;
    padding: clamp(20px, 3vh, 36px) clamp(28px, 3.5vw, 48px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden !important;
}

/* Center Wrapper: Perfectly Centers Login Form Horizontally & Vertically */
.auth-form-center-wrapper {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto 0;
}

.auth-form-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 0;
}

@media (min-width: 1600px) {
    .auth-form-container {
        max-width: 500px;
    }
}

.welcome-kicker {
    color: var(--bni-red);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 4px;
    display: block;
    font-family: inherit;
}

.auth-heading {
    font-size: clamp(24px, 2.3vw, 30px);
    font-weight: 700;
    color: var(--navy-dark);
    letter-spacing: normal;
    line-height: 1.2;
    margin-bottom: 6px;
}

.auth-subheading {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    font-weight: 400;
    margin-bottom: clamp(14px, 2vh, 22px);
}

/* Input Fields - Unified Clean #EEF3F8 Styling */
.form-field-group {
    margin-bottom: clamp(10px, 1.6vh, 16px);
}

.form-field-label {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--navy-dark);
    margin-bottom: 5px;
}

.pill-input-box {
    display: flex;
    align-items: center;
    background: var(--input-surface);
    border: 1.5px solid transparent;
    border-radius: var(--radius-pill);
    padding: 0 16px;
    gap: 10px;
    height: clamp(42px, 5vh, 46px);
    transition: all 0.2s ease;
    position: relative;
}

.pill-input-box:focus-within {
    background: #FFFFFF;
    border-color: var(--bni-red);
    box-shadow: 0 0 0 3px rgba(215, 25, 63, 0.12);
}

.pill-input-box .field-svg-icon {
    color: var(--text-muted);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pill-input-box input {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 13.5px;
    color: var(--navy-dark);
    width: 100%;
    height: 100%;
    font-family: inherit;
}

.pill-input-box input::placeholder {
    color: var(--text-light);
}

/* Eliminate Browser Light-Blue / Yellow Autofill Boxes */
.pill-input-box input:-webkit-autofill,
.pill-input-box input:-webkit-autofill:hover, 
.pill-input-box input:-webkit-autofill:focus, 
.pill-input-box input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #EEF3F8 inset !important;
    -webkit-text-fill-color: #111827 !important;
    transition: background-color 5000s ease-in-out 0s;
}

.pill-input-box:focus-within input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important;
}

.toggle-password-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    transition: color 0.15s ease;
}

.toggle-password-btn:hover {
    color: var(--navy-dark);
}

/* Captcha Block - Harmonious & Unified */
.captcha-container-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.captcha-image-wrapper {
    position: relative;
    height: clamp(42px, 5vh, 46px);
    min-width: 125px;
    background: var(--input-surface);
    border: 1.5px solid transparent;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    padding: 2px 10px;
}

.captcha-image-wrapper img {
    height: 36px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    border-radius: var(--radius-pill);
    mix-blend-mode: multiply;
}

.captcha-loading-cover {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(238, 243, 248, 0.92);
    border-radius: var(--radius-pill);
}

.captcha-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-input);
    border-top-color: var(--bni-red);
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.captcha-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.captcha-input-wrapper .pill-input-box {
    flex: 1;
    background: var(--input-surface);
    border: 1.5px solid transparent;
    height: clamp(42px, 5vh, 46px);
}

.btn-captcha-refresh {
    width: clamp(42px, 5vh, 46px);
    height: clamp(42px, 5vh, 46px);
    border-radius: 50%;
    border: 1.5px solid transparent;
    background: var(--input-surface);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
    outline: none;
}

.btn-captcha-refresh:hover {
    background: #E2E8F0;
    color: var(--navy-dark);
    transform: rotate(60deg);
}

/* Sign In Button */
.btn-submit-signin {
    width: 100%;
    margin-top: clamp(8px, 1.4vh, 14px);
    border: none;
    border-radius: var(--radius-pill);
    padding: clamp(11px, 1.5vh, 14px) 24px;
    background: linear-gradient(135deg, var(--bni-red-light) 0%, #B80A28 100%);
    color: #FFFFFF;
    font-weight: 600;
    font-size: 14.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 20px var(--bni-red-glow);
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-submit-signin:hover {
    background: linear-gradient(135deg, #CF102D 0%, #9B071F 100%);
    box-shadow: 0 12px 25px rgba(215, 25, 63, 0.45);
    transform: translateY(-1px);
}

.btn-submit-signin:active {
    transform: translateY(0);
}

.btn-submit-signin:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

/* Footer Section - Compact & Anchored at Bottom */
.auth-panel-footer {
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-light);
    border-top: 1px solid #F1F5F9;
    padding-top: clamp(8px, 1.4vh, 14px);
    gap: 12px;
    background: #FFFFFF;
    flex-shrink: 0;
}

.footer-compliance-left {
    display: flex;
    align-items: center;
}

.copyright-text {
    color: var(--text-muted);
    font-weight: 500;
}

.footer-compliance-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.footer-compliance-right a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-compliance-right a:hover {
    color: var(--bni-red);
    text-decoration: underline;
}

.compliance-divider {
    color: #CBD5E1;
}

/* ==========================================================================
   MODERN TOASTER NOTIFICATIONS
   ========================================================================== */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.modern-toast {
    min-width: 300px;
    max-width: 420px;
    background: #FFFFFF;
    color: var(--text-slate);
    padding: 14px 20px;
    border-radius: 14px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(-20px) scale(0.96);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    border-left: 4px solid var(--border-input);
}

.modern-toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.modern-toast.success {
    border-left-color: #10B981;
}

.modern-toast.error {
    border-left-color: #EF4444;
}

.modern-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    flex-shrink: 0;
    color: #FFFFFF;
    font-size: 13px;
}

.modern-toast.success .modern-toast-icon {
    background: #10B981;
}

.modern-toast.error .modern-toast-icon {
    background: #EF4444;
}

.modern-toast-message {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
}

/* ==========================================================================
   RESPONSIVE DESIGN (DESKTOP -> TABLET -> MOBILE)
   ========================================================================== */
@media (max-width: 1180px) {
    .left-branding-panel {
        padding: clamp(18px, 3vh, 32px) clamp(22px, 3vw, 36px);
    }
    .right-auth-panel {
        padding: clamp(18px, 3vh, 32px) clamp(22px, 3vw, 36px);
    }
    .hero-headline {
        font-size: clamp(34px, 3.4vw, 44px);
    }
    .hero-description {
        font-size: 14px;
    }
}

@media (max-width: 992px) {
    .left-branding-panel {
        flex: 0 0 50%;
        width: 50%;
        padding: 24px 20px;
    }
    .right-auth-panel {
        flex: 0 0 50%;
        width: 50%;
        padding: 24px 20px;
    }
    .feature-highlights-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .hero-headline {
        font-size: 32px;
    }
    .hero-description {
        font-size: 13.5px;
    }
}

@media (max-width: 768px) {
    html, body, .login-split-page {
        height: auto !important;
        max-height: none !important;
        overflow-y: auto !important;
    }
    .login-split-page {
        flex-direction: column;
    }
    .right-auth-panel {
        order: 1;
        flex: 1 0 auto;
        width: 100%;
        height: auto;
        max-height: none;
        overflow: visible !important;
        padding: 32px 20px;
        justify-content: flex-start;
    }
    .left-branding-panel {
        order: 2;
        flex: 1 0 auto;
        width: 100%;
        height: auto;
        max-height: none;
        overflow: visible !important;
        padding: 36px 20px;
    }
    .feature-highlights-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .hero-headline {
        font-size: 28px;
    }
    .hero-description {
        font-size: 13.5px;
    }
    .captcha-container-row {
        flex-wrap: wrap;
    }
    .captcha-image-wrapper {
        width: 100%;
    }
    .auth-panel-footer {
        margin-top: 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
