.login-body {
    min-height: 100vh;
    overflow: hidden;
    background-color: #f4f7fb;
    background-image:
        linear-gradient(105deg, rgba(6, 18, 41, 0.88) 0%, rgba(6, 18, 41, 0.76) 43%, rgba(244, 247, 251, 0.92) 43.1%, rgba(244, 247, 251, 0.98) 100%),
        url("/app/javax.faces.resource/images/pages/bg-login.png.jsf?ln=diamond-layout");
    background-position: center;
    background-size: cover;
}

.login-body .login-wrapper {
    min-height: 100vh;
    height: auto;
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(360px, 520px);
    align-items: center;
    gap: clamp(32px, 6vw, 96px);
    width: min(1180px, calc(100vw - 64px));
    margin: 0 auto;
    padding: 42px 0 72px;
}

.login-body .login-image {
    position: relative;
    left: auto;
    width: 100%;
    min-width: 0;
    height: min(760px, calc(100vh - 112px));
    min-height: 560px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(4, 12, 26, 0.28);
}

.login-body .login-image .bg-blur {
    display: none;
}

.login-body .login-image .login-image-content {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 46px 38px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background:
        linear-gradient(180deg, rgba(19, 54, 94, 0.34), rgba(4, 15, 35, 0.72)),
        url("/app/javax.faces.resource/images/pages/bg-login.png.jsf?ln=diamond-layout");
    background-position: center;
    background-size: cover;
}

.login-body .login-wrapper .logo,
.login-body .login-image .login-image-content img {
    width: min(330px, 82%);
    max-width: none;
    height: auto;
    margin: 20px 0 0;
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.22));
}

.login-body .login-image .login-image-content > div {
    margin-top: 24px !important;
}

.login-body .login-image h3.login-sub {
    margin: 0;
    color: #ffffff;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.24;
    font-weight: 600;
    text-shadow: 0 12px 28px rgba(0, 0, 0, 0.36);
}

.login-body .login-image .product-container {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    display: grid;
    gap: 10px;
}

.login-body .login-image .product-container h3.login-products {
    width: auto;
    margin: 0;
    padding: 12px 16px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    background: rgba(6, 18, 41, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    backdrop-filter: blur(12px);
}

.login-body .login-wrapper .login-panel {
    position: relative;
    left: auto;
    top: auto;
    z-index: 2;
    width: 100%;
    max-width: 520px;
    min-height: 360px;
    height: auto;
    padding: 42px;
    text-align: left;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: #f7f8fb;
    border: 1px solid rgba(13, 35, 68, 0.1);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(13, 35, 68, 0.16);
}

.login-body .login-wrapper .login-panel form {
    height: auto;
    min-height: 276px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 22px;
}

.login-body .login-wrapper .login-form {
    width: 100%;
    margin: 0;
    display: grid;
    gap: 18px;
}

.login-body .login-wrapper .login-form > input,
.login-body .login-wrapper .login-form .ui-inputfield {
    width: 100%;
    height: 52px;
    margin: 0;
    padding: 0 16px;
    color: #172235;
    font-size: 15px;
    background: #ffffff;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    box-shadow: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.login-body .login-wrapper .login-form > input:focus,
.login-body .login-wrapper .login-form .ui-inputfield:focus {
    border-color: #194891;
    box-shadow: 0 0 0 4px rgba(25, 72, 145, 0.12);
}

.login-body .login-wrapper .login-form .ui-button {
    width: 100%;
    height: 52px;
    margin-top: 2px;
    border: 0;
    border-radius: 8px;
    background: #194891;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0;
    box-shadow: 0 14px 28px rgba(25, 72, 145, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.login-body .login-wrapper .login-form .ui-button:hover,
.login-body .login-wrapper .login-form .ui-button:focus {
    background: #123a78;
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(25, 72, 145, 0.28);
}

.login-body .login-wrapper .ui-commandlink {
    align-self: center;
    color: #194891;
    font-weight: 600;
    text-decoration: none;
}

.login-body .login-wrapper .ui-commandlink:hover {
    color: #123a78;
    text-decoration: underline;
}

.login-body .login-powered-by {
    width: 100%;
    margin: 4px auto 0;
    padding-top: 16px;
    border-top: 1px solid rgba(13, 35, 68, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-body .login-powered-by a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 190px;
    opacity: 0.92;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.login-body .login-powered-by a:hover,
.login-body .login-powered-by a:focus {
    opacity: 1;
    transform: translateY(-1px);
}

.login-body .login-powered-logo {
    width: 174px;
    max-width: 100%;
    max-height: 58px;
    height: auto;
    display: block;
    object-fit: contain;
}

.login-body .login-wrapper .product-container-responsive {
    display: none;
}

/* Multi-module entry screen: the same visual language as login, without app navigation. */
.login-body .module-selection-wrapper {
    grid-template-columns: minmax(340px, 0.9fr) minmax(480px, 1.25fr);
    max-width: 1320px;
}

.login-body .module-selection-panel {
    max-width: 720px;
    min-height: 560px;
    padding: clamp(30px, 5vw, 58px);
}

.login-body .module-selection-panel form {
    width: 100%;
    max-width: 600px;
}

.module-selection-heading {
    margin-bottom: 28px;
}

.module-selection-eyebrow {
    display: block;
    margin-bottom: 10px;
    color: #194891;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.module-selection-heading h2 {
    margin: 0 0 8px;
    color: #172235;
    font-size: clamp(28px, 3vw, 36px);
    line-height: 1.15;
}

.module-selection-heading p {
    margin: 0;
    color: #637083;
    font-size: 16px;
}

.module-selection-grid {
    display: grid;
    gap: 14px;
}

.module-selection-card.ui-commandlink {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
    min-height: 106px;
    padding: 20px;
    color: #172235;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(13, 35, 68, 0.06);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.module-selection-card.ui-commandlink:hover,
.module-selection-card.ui-commandlink:focus {
    color: #172235;
    text-decoration: none;
    border-color: #194891;
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(25, 72, 145, 0.16);
}

.module-selection-card > .pi:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    color: #194891;
    font-size: 23px;
    background: #eaf1fb;
    border-radius: 10px;
}

.module-selection-card-content {
    display: grid;
    flex: 1;
    gap: 6px;
    min-width: 0;
}

.module-selection-card-title {
    font-size: 18px;
    font-weight: 700;
}

.module-selection-card-description {
    color: #637083;
    font-size: 14px;
    line-height: 1.4;
}

.module-selection-arrow {
    color: #194891;
    font-size: 17px;
}

body .login-company-dialog.ui-dialog {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 26px 80px rgba(6, 18, 41, 0.28);
}

body .login-password-dialog.ui-dialog {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 26px 80px rgba(6, 18, 41, 0.28);
}

body .login-password-change-dialog.ui-dialog {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 26px 80px rgba(6, 18, 41, 0.28);
}

body .login-company-dialog.ui-dialog .ui-dialog-titlebar {
    padding: 20px 24px;
    background: #ffffff;
    border: 0;
    color: #172235;
}

body .login-password-dialog.ui-dialog .ui-dialog-titlebar {
    padding: 20px 24px;
    background: #ffffff;
    border: 0;
    color: #172235;
}

body .login-password-change-dialog.ui-dialog .ui-dialog-titlebar {
    padding: 20px 24px;
    background: #ffffff;
    border: 0;
    color: #172235;
}

body .login-company-dialog.ui-dialog .ui-dialog-title {
    font-size: 18px;
    font-weight: 700;
}

body .login-password-dialog.ui-dialog .ui-dialog-title {
    font-size: 18px;
    font-weight: 700;
}

body .login-password-change-dialog.ui-dialog .ui-dialog-title {
    font-size: 18px;
    font-weight: 700;
}

body .login-company-dialog.ui-dialog .ui-dialog-content {
    padding: 0 24px 24px;
    background: #ffffff;
}

body .login-password-dialog.ui-dialog .ui-dialog-content {
    padding: 0 24px 24px;
    background: #ffffff;
}

body .login-password-change-dialog.ui-dialog .ui-dialog-content {
    padding: 0 24px 24px;
    background: #ffffff;
}

.password-reset-content {
    display: grid;
    gap: 14px;
    width: 100%;
}

.password-reset-content label {
    color: #334155;
    font-weight: 700;
}

.password-reset-input.ui-inputfield {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    color: #172235;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    box-shadow: none;
}

.password-reset-input.ui-inputfield:focus {
    border-color: #194891;
    box-shadow: 0 0 0 4px rgba(25, 72, 145, 0.12);
}

.password-reset-button.ui-button {
    width: 100%;
    height: 48px;
    margin-top: 4px;
    border: 0;
    border-radius: 8px;
    background: #194891;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(25, 72, 145, 0.22);
}

.password-change-content {
    display: grid;
    gap: 16px;
    width: 100%;
}

.password-change-content .ui-messages {
    margin: 0;
}

.password-change-content .ui-messages-error,
.password-change-content .ui-message-error {
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
}

.password-change-content .ui-messages-info,
.password-change-content .ui-message-info {
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
}

.password-change-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    color: #9c2b2b;
    font-weight: 700;
    line-height: 1.35;
    background: #fff3f3;
    border: 1px solid #f1c7c7;
    border-radius: 8px;
}

.password-change-notice .fa {
    flex: 0 0 auto;
    font-size: 18px;
}

.password-change-help {
    padding: 12px 14px;
    color: #334155;
    font-weight: 600;
    line-height: 1.35;
    background: #f4f7fb;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
}

.password-change-fields {
    display: grid;
    gap: 14px;
}

.password-change-field {
    display: grid;
    gap: 8px;
}

.password-change-field label {
    color: #334155;
    font-weight: 700;
}

.password-change-input.ui-inputfield {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    color: #172235;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    box-shadow: none;
}

.password-change-input.ui-inputfield:focus {
    border-color: #194891;
    box-shadow: 0 0 0 4px rgba(25, 72, 145, 0.12);
}

.login-password-change-dialog .password-change-field .ui-password-panel {
    position: static !important;
    display: block;
    width: 100%;
    min-width: 0;
    margin: 2px 0 0;
    padding: 10px 12px;
    color: #334155;
    background: #f4f7fb;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    box-shadow: none;
}

.login-password-change-dialog .password-change-field .ui-password-panel .ui-password-meter {
    width: 100%;
    margin: 0 0 8px;
}

.login-password-change-dialog .password-change-field .ui-password-panel .ui-password-info {
    font-size: 13px;
    line-height: 1.3;
}

.password-change-button.ui-button {
    width: 100%;
    height: 48px;
    margin-top: 4px;
    border: 0;
    border-radius: 8px;
    background: #194891;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(25, 72, 145, 0.22);
}

.company-select-content,
.company-select-inner {
    width: 100%;
}

.company-select-menu.ui-selectonemenu {
    height: 48px;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    background: #ffffff;
}

.company-select-menu.ui-selectonemenu .ui-selectonemenu-label {
    padding: 14px 42px 14px 14px;
    color: #172235;
}

.company-select-menu.ui-selectonemenu .ui-selectonemenu-trigger {
    width: 42px;
    border-left: 1px solid #d8e0ea;
    border-radius: 0 8px 8px 0;
}

.company-select-panel.ui-selectonemenu-panel {
    border-radius: 8px;
    box-shadow: 0 18px 44px rgba(6, 18, 41, 0.18);
}

.company-select-panel .ui-selectonemenu-filter-container {
    padding: 12px;
}

.company-select-panel .ui-selectonemenu-filter {
    height: 42px;
    border-radius: 8px;
}

.login-company-dialog #companiesForm\:completeLogin {
    width: 100%;
    height: 48px;
    margin-top: 12px;
    border: 0;
    border-radius: 8px;
    background: #194891;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(25, 72, 145, 0.22);
}

@media only screen and (max-width: 1100px) {
    .login-body {
        overflow: auto;
        background-image:
            linear-gradient(180deg, rgba(6, 18, 41, 0.78), rgba(244, 247, 251, 0.96) 58%),
            url("/app/javax.faces.resource/images/pages/bg-login.png.jsf?ln=diamond-layout");
    }

    .login-body .login-wrapper {
        grid-template-columns: 1fr;
        width: min(640px, calc(100vw - 32px));
        gap: 24px;
        padding: 24px 0 32px;
    }

    .login-body .module-selection-panel {
        max-width: 640px;
        min-height: 0;
    }

    .login-body .login-image {
        min-height: 320px;
        height: auto;
    }

    .login-body .login-image .login-image-content {
        min-height: 320px;
        padding: 28px 24px;
    }

    .login-body .login-image .product-container {
        display: none;
    }

    .login-body .login-wrapper .product-container-responsive {
        position: static;
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        padding: 0;
        background: transparent;
    }

    .login-body .login-wrapper .product-container-responsive span {
        display: inline-flex;
        margin: 0;
        padding: 9px 12px;
        color: #ffffff;
        background: rgba(6, 18, 41, 0.72);
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 8px;
    }
}

@media only screen and (max-width: 560px) {
    .login-body .login-wrapper {
        width: calc(100vw - 24px);
        padding: 12px 0 24px;
    }

    .login-body .login-image {
        min-height: 250px;
    }

    .login-body .login-image .login-image-content {
        min-height: 250px;
        padding: 22px 18px;
    }

    .login-body .login-wrapper .logo,
    .login-body .login-image .login-image-content img {
        width: min(270px, 88%);
        margin-top: 8px;
    }

    .login-body .login-image h3.login-sub {
        font-size: 23px;
    }

    .login-body .login-wrapper .login-panel {
        width: 100%;
        max-width: none;
        padding: 24px 18px;
    }

    .login-body .module-selection-panel {
        padding: 28px 20px;
    }

    .module-selection-card.ui-commandlink {
        gap: 13px;
        min-height: 92px;
        padding: 16px;
    }

    .module-selection-card > .pi:first-child {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
        font-size: 19px;
    }

    .login-body .login-powered-logo {
        width: 156px;
    }

    body .login-company-dialog.ui-dialog {
        width: calc(100vw - 24px) !important;
    }

    body .login-password-dialog.ui-dialog {
        width: calc(100vw - 24px) !important;
    }

    body .login-password-change-dialog.ui-dialog {
        width: calc(100vw - 24px) !important;
    }
}
