:root {
    --truffle-orange: #FF5A00;
    --navy: #14284A;
    --text-secondary: #52627A;
    --input-bg: #F2F6FC;
    --input-border: #D6DFEC;
    --white: #FFFFFF;
    --card-radius: 22px;
    --input-radius: 10px;
    --button-radius: 10px;
    --card-shadow: 0 20px 60px rgba(20, 40, 74, 0.14);
}

/* Hide header/footer globally on this page */
header,
nav,
.main-footer,
.sub-footer,
.navbar,
.bg-dark,
.newslatter {
    display: none !important;
}

/* Reset and base */
body.login-page-body,
html.login-page-html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    overflow-x: hidden;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Main Layout */
.login-page-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: block;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Assumes image is at assets/images/ */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.login-content {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 80px;
    align-items: center;
    width: min(100% - 64px, 1400px);
    margin: 0 auto;
    min-height: 100vh;
    padding: 40px 0;
}

.left-section {
    flex: 0 1 550px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.right-section {
    flex: 0 0 520px;
}

/* Branding & Hero */
.brand-area {
    margin-bottom: 30px;
}

.brand-area img {
    width: 180px;
    height: auto;
}

.brand-subtitle {
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 500;
    color: var(--navy);
    text-transform: uppercase;
    margin-top: 8px;
    margin-bottom: 0;
}

.hero-content h1 {
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 800;
    color: var(--navy);
    line-height: 1.15;
    margin: 0;
}

.hero-content h1 span {
    display: block;
}

.hero-content h1 span.accent {
    color: var(--truffle-orange);
}

.hero-accent-line {
    width: 48px;
    height: 4px;
    background: var(--truffle-orange);
    border-radius: 999px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 14px;
    line-height: 1.6;
    max-width: 400px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Features */
.feature-list {
    display: flex;
    gap: 24px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 90, 0, 0.08);
    display: grid;
    place-items: center;
    margin-bottom: 12px;
    color: var(--truffle-orange);
    font-size: 15px;
}

.feature-item span {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.3;
}

/* Login Card */
.login-card {
    background: var(--white);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    box-sizing: border-box;
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    text-align: center;
    margin-bottom: 4px;
    margin-top: 0;
}

.login-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 4px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-secondary);
    font-size: 15px;
    z-index: 2;
}

.form-input {
    width: 100%;
    height: 40px;
    border-radius: var(--input-radius);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    padding-left: 40px;
    padding-right: 40px;
    font-size: 12px;
    color: var(--navy);
    box-sizing: border-box;
    transition: 160ms ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--truffle-orange);
    box-shadow: 0 0 0 3px rgba(255, 90, 0, 0.10);
    background: #fff;
}

/* Real-time Validation States */
.form-input.is-valid {
    border-color: #10B981 !important;
    background-color: #f6fdf9 !important;
}

/* Hide native browser password reveal icons (Edge/IE) to prevent conflict with our custom toggle */
input::-ms-reveal,
input::-ms-clear,
input::-webkit-contacts-auto-fill-button,
input::-webkit-credentials-auto-fill-button {
    display: none !important;
}

.form-input.is-valid:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

.input-wrapper.is-valid .input-icon {
    color: #10B981 !important;
}

.form-input.is-invalid {
    border-color: #EF4444 !important;
    background-color: #fff9f9 !important;
}

.form-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.input-wrapper.is-invalid .input-icon {
    color: #EF4444 !important;
}

.password-toggle {
    position: absolute;
    right: 16px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 15px;
    z-index: 2;
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0;
}

.remember-me input {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: var(--truffle-orange);
}

.remember-me span {
    font-size: 13px;
    color: var(--text-secondary);
}

.forgot-password {
    font-size: 13px;
    color: var(--navy);
    text-decoration: none;
    font-weight: 500;
    transition: 160ms ease;
}

.forgot-password:hover {
    color: var(--truffle-orange);
    text-decoration: underline;
}

.login-button {
    width: 100%;
    height: 40px;
    border-radius: var(--button-radius);
    background: var(--truffle-orange);
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    transition: 160ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(255, 90, 0, 0.20);
    background: #e65100;
}

/* Error States */
.form-input.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    color: #dc3545;
    font-size: 13px;
    margin-top: 6px;
    display: block;
}

/* Responsive */
@media (max-width: 1199px) {
    .login-content {
        gap: 60px;
        padding: 24px;
        width: 100%;
    }

    .left-section {
        padding-right: 20px;
    }

    .right-section {
        flex: 0 0 460px;
    }

    .login-card {
        padding: 24px;
    }
}

@media (max-width: 991px) {
    .login-content {
        flex-direction: column;
        justify-content: center;
        gap: 40px;
    }

    .left-section {
        padding-right: 0;
        margin-bottom: 40px;
        text-align: center;
        align-items: center;
    }

    .hero-content h1 span {
        display: inline;
    }

    .hero-description {
        margin: 0 auto 32px auto;
    }

    .feature-list {
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .login-background {
        background-position: 65% center;
    }

    .right-section {
        flex: 1;
        width: 100%;
        max-width: 520px;
    }

    .login-card {
        width: calc(100% - 32px);
        margin: 0 auto;
        padding: 28px;
    }

    .brand-area img {
        width: 200px;
    }

    .hero-content h1 {
        font-size: clamp(32px, 9vw, 48px);
    }

    .feature-list {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 24px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}