/* Field chrome for login family. Layout comes from Mono cmms-enterprise.css:
   change-password = centered card on the photo; only .cmms-login-page splits on desktop. */

.login-left-panel {
    background-image: url("/Images/login-background.jpeg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-background-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 24px 24px;
}

.login-form-container {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.qa-logo,
.login-footer-left img,
.cmms-login-footer-company img {
    display: block !important;
    max-height: 40px !important;
    max-width: 140px !important;
    width: auto !important;
    height: 40px !important;
    object-fit: contain !important;
}

.login-ai-console-left img {
    width: 36px !important;
    height: 36px !important;
    object-fit: contain !important;
    border-radius: 8px;
    flex-shrink: 0;
}

.login-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--cmms-line-soft, #e9eef3);
    flex-shrink: 0;
}

.cmms-login-footer-company {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

.login-footer-right {
    font-size: 12px;
    color: #666;
}

.login-ai-console {
    width: 100%;
    margin: 4px 0 0;
    flex-shrink: 0;
}

.login-ai-console-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(33, 150, 243, 0.45);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(24, 46, 82, 0.96), rgba(34, 66, 112, 0.95));
    color: #f2f8ff;
}

.login-ai-console-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.login-ai-title {
    font-size: 13px;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.login-ai-copy {
    font-size: 11px;
    line-height: 1.35;
    opacity: 0.92;
    color: #f2f8ff;
}

.login-ai-open {
    flex-shrink: 0;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid rgba(142, 208, 255, 0.9);
    border-radius: 6px;
    color: #e4f3ff !important;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
}

.login-ai-open:hover {
    background: rgba(142, 208, 255, 0.12);
}

.login-ai-open-arrow {
    width: 16px;
    height: 16px;
}

.cmms-login-page .cmms-login-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid var(--cmms-line-soft, #e9eef3);
}

.cmms-login-page .cmms-public-footer-link {
    gap: 6px;
}

.login-form-fields {
    display: block;
    width: 100%;
}

.outlined-field {
    position: relative;
    margin: 0 0 16px;
    width: 100%;
}

.outlined-input {
    width: 100%;
    box-sizing: border-box;
    min-height: 56px;
    height: 56px;
    padding: 0 14px;
    border: 1px solid rgba(0, 0, 0, 0.23);
    border-radius: 4px;
    background: #fff !important;
    color: rgba(0, 0, 0, 0.87);
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.4;
    outline: none;
    box-shadow: none;
    appearance: none;
}

.outlined-input-password {
    padding-right: 64px;
}

.outlined-label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0 4px;
    margin: 0;
    color: rgba(0, 0, 0, 0.6);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1;
    pointer-events: none;
    background: transparent;
    z-index: 1;
    transition: top 0.15s cubic-bezier(0.4, 0, 0.2, 1),
                font-size 0.15s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.15s ease,
                background 0.15s ease;
}

.outlined-label .req {
    color: #d32f2f;
    margin-left: 1px;
}

.outlined-field:focus-within .outlined-label,
.outlined-field.has-value .outlined-label {
    top: 0;
    transform: translateY(-50%);
    font-size: 0.75rem;
    font-weight: 400;
    color: #3d6b7f;
    background: #fff;
}

.outlined-field:focus-within .outlined-input {
    border-color: #3d6b7f;
    border-width: 2px;
    padding-left: 13px;
}

.outlined-field:focus-within .outlined-input-password {
    padding-right: 63px;
}

.password-field-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 0;
    bottom: 0;
    margin: auto 0;
    height: fit-content;
    min-width: 44px;
    min-height: 44px;
    padding: 0 8px;
    border: 0;
    background: transparent;
    color: #3d6b7f;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    z-index: 2;
}

.password-toggle:hover {
    color: #2c5364;
}

.login-submit-button {
    width: 100%;
    min-height: 44px;
    margin: 4px 0 16px;
    border: 0;
    border-radius: 6px;
    background: linear-gradient(135deg, #3d6b7f 0%, #2c5364 100%);
    color: #fff !important;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.login-submit-arrow {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.login-submit-button:hover:not(:disabled) {
    filter: brightness(1.05);
}

.login-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-alert {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.login-alert-error {
    background: #fbeaea;
    color: #9e1f1f;
    border: 1px solid #f0c2c2;
}

.login-alert-success {
    background: #e7f2e8;
    color: #1d5a22;
    border: 1px solid #c5e0c8;
}

.login-alert-info {
    background: #e8f4fd;
    color: #014361;
    border: 1px solid #b6e0fe;
}

.login-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.login-links-row {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.login-link {
    text-decoration: none;
}

.login-link:hover {
    text-decoration: underline;
}

.login-redirect-note {
    margin: 24px;
    text-align: center;
}

.cmms-login-page .login-branding {
    z-index: 1;
}

/* Phone/tablet: photo is the backdrop; the white card must grow with content
   instead of clipping the wordmark / QA logo inside a 100dvh box. */
@media (max-width: 1099px) {
    .cmms-login-page.login-split-container {
        min-height: 100dvh;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    .cmms-login-page .login-left-panel {
        position: fixed !important;
        inset: 0 !important;
        width: 100% !important;
        min-height: 100dvh;
        z-index: 0;
    }

    .cmms-login-page .login-background-overlay {
        align-items: flex-start;
        justify-content: center;
        padding: 20px 16px 0;
    }

    .cmms-login-page .login-branding {
        display: block;
        max-width: 100%;
        padding: 0;
        text-align: center;
    }

    .cmms-login-page .login-brand-title {
        margin: 0 0 4px;
        color: #fff;
        font-size: clamp(1.45rem, 7vw, 2rem);
        font-weight: 700;
        letter-spacing: 0.04em;
        line-height: 1.1;
        text-shadow: 0 2px 10px rgba(15, 32, 39, 0.5);
    }

    .cmms-login-page .login-brand-subtitle {
        margin: 0;
        color: rgba(255, 255, 255, 0.9);
        font-size: 0.62rem;
        font-weight: 600;
        letter-spacing: 0.08em;
        line-height: 1.4;
        text-shadow: 0 1px 6px rgba(15, 32, 39, 0.5);
    }

    .cmms-login-page .login-right-panel {
        position: relative !important;
        z-index: 1;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 100dvh;
        margin: 0 !important;
        padding: 88px 12px 24px !important;
        background: transparent !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }

    .cmms-login-page .login-form-container {
        width: min(440px, 100%) !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 20px 16px 16px !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    .cmms-login-page .cmms-wordmark {
        display: flex !important;
        align-items: center;
        gap: 10px;
        max-width: 100%;
    }

    .cmms-login-page .cmms-wordmark-icon {
        width: 56px !important;
        height: 56px !important;
        flex: 0 0 56px;
    }

    .cmms-login-page .cmms-wordmark-text {
        min-width: 0;
        font-size: 0.92rem;
    }

    .cmms-login-page .cmms-login-suite-band {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .cmms-login-page .login-ai-console-inner {
        flex-wrap: wrap;
    }

    .cmms-login-page .cmms-login-footer-company {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .cmms-login-page .qa-logo,
    .cmms-login-page .cmms-login-footer-company img {
        max-width: 120px !important;
        max-height: 32px !important;
        height: 32px !important;
    }

    .cmms-login-page .cmms-login-footer-links {
        justify-content: center;
    }
}

@media (min-width: 1100px) {
    .cmms-login-page.login-split-container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        max-width: 100vw !important;
        min-height: 100dvh;
        overflow: hidden !important;
        background: #fff;
    }

    .cmms-login-page .login-left-panel {
        position: relative !important;
        inset: auto !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        flex: 1 1 0% !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        min-height: 100dvh;
        overflow: hidden !important;
        z-index: 0 !important;
    }

    .cmms-login-page .login-background-overlay {
        align-items: flex-end;
        justify-content: flex-start;
        padding: clamp(40px, 5vw, 72px);
        background: linear-gradient(to top, rgba(15, 32, 39, 0.82), rgba(44, 83, 100, 0.18) 62%) !important;
    }

    .cmms-login-page .login-branding {
        display: block;
        max-width: 680px;
        padding: 0;
        text-align: left;
    }

    .cmms-login-page .login-right-panel {
        position: relative !important;
        z-index: 2 !important;
        flex: 0 0 480px !important;
        flex-shrink: 0 !important;
        width: 480px !important;
        min-width: 480px !important;
        max-width: 480px !important;
        min-height: 100dvh;
        margin: 0 !important;
        padding: 0 !important;
        align-items: stretch;
        background: #fff !important;
        box-shadow: -12px 0 32px rgba(15, 32, 39, 0.24);
        box-sizing: border-box !important;
        overflow: auto !important;
        isolation: isolate;
    }

    .cmms-login-page .login-form-container {
        width: 100% !important;
        max-width: 100% !important;
        height: 100dvh !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 36px 40px 28px !important;
        overflow-x: hidden !important;
        overflow-y: auto;
        justify-content: flex-start;
        border: 0;
        border-radius: 0;
        background: #fff;
        box-shadow: none;
        backdrop-filter: none;
        box-sizing: border-box !important;
    }

    .cmms-login-page .cmms-wordmark-icon {
        width: 96px;
        height: 96px;
    }

    .cmms-login-page .cmms-wordmark-text {
        font-size: 1.2rem;
    }

    .cmms-login-page .login-footer {
        margin-top: auto;
    }
}
