/* <copyright file="auth-pages.css" company="Laxson Solutions">
 * Laxson Solutions Development Team
 *
 * Description:
 * Defines styling for authentication and account-management pages.
 * </copyright> */

:root {
    --cx-auth-navy: #2f587d;
    --cx-auth-navy-dark: #244866;
    --cx-auth-text: #2f455e;
    --cx-auth-muted: #74879a;
    --cx-auth-border: #d6e1eb;
    --cx-auth-field: #f8fbfd;
    --cx-auth-card: rgba(255, 255, 255, 0.96);
    --cx-auth-shadow: 0 20px 55px rgba(45, 72, 110, 0.16);
    --cx-auth-radius: 18px;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
}

.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(420px, 46%) 1fr;
    align-items: center;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: #edf4f9;
}

    /* Keep the photographic panel independent from the form wash. This preserves
       detail/contrast on large displays and gives every Identity page the same
       corporate visual treatment without modifying the source image. */
    .auth-page::before {
        content: "";
        position: absolute;
        z-index: 0;
        inset: 0;
        pointer-events: none;
        background: #edf4f9 url('/images/conexgo-auth-background.png') right center / auto 100% no-repeat;
        filter: saturate(.96) contrast(1.025) brightness(1.01);
        transform: none;
        transform-origin: center;
    }

    .auth-page::after {
        content: "";
        position: absolute;
        z-index: 1;
        inset: 0;
        pointer-events: none;
        background:
            linear-gradient(90deg,
                rgba(246, 250, 253, .995) 0%,
                rgba(246, 250, 253, .985) 31%,
                rgba(246, 250, 253, .90) 39%,
                rgba(246, 250, 253, .54) 48%,
                rgba(246, 250, 253, .16) 58%,
                rgba(246, 250, 253, 0) 69%),
            linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(226, 237, 246, .04));
    }

.auth-shell {
    position: relative;
    z-index: 2;
    width: min(100%, 520px);
    padding: 36px 28px;
    margin-left: clamp(22px, 6vw, 112px);
}

.auth-card {
    width: 100%;
    padding: 34px 36px 30px;
    background: var(--cx-auth-card);
    border: 1px solid rgba(205, 219, 232, 0.92);
    border-radius: var(--cx-auth-radius);
    box-shadow: var(--cx-auth-shadow);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
}

    .auth-card.auth-card-wide {
        width: min(100%, 500px);
    }

.auth-brand {
    text-align: center;
    margin-bottom: 22px;
}

.auth-logo {
    display: block;
    max-width: min(230px, 82%);
    width: auto;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.auth-product-name {
    margin-top: 8px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--cx-auth-navy-dark);
    letter-spacing: 0.01em;
}

.auth-version {
    margin-top: 10px;
    color: var(--cx-auth-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-heading {
    margin: 0 0 7px;
    text-align: center;
    color: var(--cx-auth-navy-dark);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.auth-subheading {
    margin: 0 auto 22px;
    max-width: 360px;
    text-align: center;
    color: var(--cx-auth-muted);
    font-size: 0.94rem;
    line-height: 1.5;
}

.auth-field {
    margin-bottom: 15px;
}

.auth-input-group {
    display: flex;
    align-items: stretch;
    min-height: 52px;
}

.auth-input-icon {
    width: 50px;
    flex: 0 0 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--cx-auth-border);
    border-right: 0;
    border-radius: 12px 0 0 12px;
    background: #fff;
    color: var(--cx-auth-navy);
    font-size: 1.05rem;
}

.auth-input {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--cx-auth-border);
    border-radius: 0 12px 12px 0;
    background: var(--cx-auth-field);
    color: var(--cx-auth-text);
    padding: 0 15px;
    outline: none;
    font-size: 0.98rem;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

    .auth-input::placeholder {
        color: #91a0af;
    }

    .auth-input:focus {
        border-color: #84a8c5;
        background: #fff;
        box-shadow: 0 0 0 3px rgba(61, 98, 135, 0.10);
    }

.auth-validation {
    display: block;
    padding-top: 5px;
    color: #b42318;
    font-size: 0.82rem;
    line-height: 1.35;
}

.auth-status {
    margin-bottom: 16px;
}

.auth-primary-button {
    width: 100%;
    min-height: 50px;
    margin-top: 5px;
    border: 1px solid var(--cx-auth-navy);
    border-radius: 12px;
    background: var(--cx-auth-navy);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.015em;
    box-shadow: 0 8px 20px rgba(47, 88, 125, 0.16);
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

    .auth-primary-button:hover,
    .auth-primary-button:focus-visible {
        background: var(--cx-auth-navy-dark);
        border-color: var(--cx-auth-navy-dark);
        color: #fff;
        box-shadow: 0 10px 24px rgba(36, 72, 102, 0.22);
    }

    .auth-primary-button:active {
        transform: translateY(1px);
    }

.auth-links {
    display: flex;
    justify-content: center;
    margin-top: 22px;
    text-align: center;
}

.auth-link {
    color: var(--cx-auth-navy);
    font-weight: 600;
    text-decoration: none;
}

    .auth-link:hover,
    .auth-link:focus-visible {
        color: var(--cx-auth-navy-dark);
        text-decoration: underline;
    }

.auth-divider {
    height: 1px;
    margin: 24px 0 0;
    background: #e6edf3;
}

.auth-footer {
    position: relative;
    z-index: 2;
    margin-top: 18px;
    text-align: center;
    color: #7a8b9c;
    font-size: 0.75rem;
    line-height: 1.45;
}

.auth-message-icon {
    width: 70px;
    height: 70px;
    margin: 2px auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #edf5f8;
    color: var(--cx-auth-navy);
    font-size: 1.8rem;
}

    .auth-message-icon.success {
        background: #eef7eb;
        color: #3e7d45;
    }

.auth-message {
    margin: 0 auto;
    max-width: 360px;
    text-align: center;
    color: var(--cx-auth-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

    .auth-message + .auth-links {
        margin-top: 20px;
    }

@media (max-width: 1050px) {
    .auth-page {
        grid-template-columns: minmax(400px, 52%) 1fr;
    }

    .auth-shell {
        margin-left: clamp(18px, 3vw, 44px);
    }
}

@media (max-width: 760px) {
    .auth-page {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 24px 16px;
        background: #edf4f9;
    }

    .auth-page::before {
        left: 0;
        background-position: 67% center;
        filter: saturate(.92) contrast(1.02) brightness(1.02);
    }

    .auth-page::after {
        background: linear-gradient(rgba(245, 250, 253, .90), rgba(245, 250, 253, .94));
    }

    .auth-shell {
        width: min(100%, 470px);
        margin: 0;
        padding: 0;
    }

    .auth-card,
    .auth-card.auth-card-wide {
        width: 100%;
        padding: 30px 24px 26px;
    }
}

@media (max-width: 420px) {
    .auth-page {
        padding: 14px;
    }

    .auth-card,
    .auth-card.auth-card-wide {
        padding: 26px 18px 22px;
        border-radius: 15px;
    }

    .auth-logo {
        max-width: min(205px, 82%);
    }

    .auth-heading {
        font-size: 1.12rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-input,
    .auth-primary-button {
        transition: none;
    }
}


/* Password visibility toggle */
.auth-input-group {
    position: relative;
}

.auth-input.auth-input-with-toggle {
    padding-right: 52px;
}

.auth-password-toggle {
    position: absolute;
    top: 1px;
    right: 1px;
    bottom: 1px;
    width: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0 11px 11px 0;
    background: transparent;
    color: var(--cx-auth-navy);
    cursor: pointer;
    font-size: 1.15rem;
}

    .auth-password-toggle:hover {
        background: rgba(61, 98, 135, 0.06);
    }

    .auth-password-toggle:focus-visible {
        outline: 2px solid #84a8c5;
        outline-offset: -3px;
    }
