/* The sign-in and "Check your email" pages (Views/Account/Login.cshtml, LoginMailCode.cshtml).
   Everything is scoped to .ae-auth, so no other Manager page is affected. Sizes are in px:
   Bootstrap 3 sets the root font size to 10px, which makes rem unreliable here. */

/* rules.css gives the document a 960px floor width for the desktop layout; the auth pages are
   responsive, so they lift it. */
html:has(.ae-auth) {
    --ae-min-width: 0px;
    min-width: 0 !important;
}

body:has(.ae-auth) {
    min-width: 0 !important;
    margin: 0;
    padding: 0 !important;
    background: #F5F7F8 !important;
}

.ae-auth {
    display: flex;
    flex-wrap: wrap;
    min-height: 100vh;
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #0F2530;
    -webkit-font-smoothing: antialiased;
}

.ae-auth *,
.ae-auth *::before,
.ae-auth *::after {
    box-sizing: border-box;
}

.ae-auth svg {
    display: block;
    flex: none;
}

/* ---- Left brand panel -------------------------------------------------- */

.ae-auth .ae-auth-brand {
    flex: 1 1 440px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: 56px 64px;
    background: #22495C;
    color: #fff;
}

.ae-auth .ae-auth-mark {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ae-auth .ae-auth-name {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.2;
    color: #fff;
}

.ae-auth .ae-auth-product {
    font-size: 13px;
    color: #C9D8DE;
}

.ae-auth .ae-auth-pill {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .12);
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.ae-auth .ae-auth-brand h1 {
    margin: 20px 0 14px 0;
    max-width: 460px;
    font-family: inherit;
    font-size: 40px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.01em;
    color: #fff;
}

.ae-auth .ae-auth-brand p {
    margin: 0;
    max-width: 440px;
    font-size: 16px;
    color: #D3E0E5;
}

.ae-auth .ae-auth-secure {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #C9D8DE;
}

/* ---- Compact header on phones ------------------------------------------ */

.ae-auth .ae-auth-topbar {
    display: none;
    flex: 1 1 100%;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #22495C;
    color: #fff;
}

.ae-auth .ae-auth-topbar .ae-auth-name {
    font-size: 14px;
}

.ae-auth .ae-auth-topbar .ae-auth-pill {
    margin-left: auto;
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- Right side: the form ---------------------------------------------- */

.ae-auth .ae-auth-main {
    flex: 1 1 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 24px 24px 24px;
    background: #F5F7F8;
}

.ae-auth .ae-auth-form {
    width: 100%;
    max-width: 420px;
    margin: auto 0;
}

.ae-auth .ae-auth-form form {
    margin: 0;
}

.ae-auth h2 {
    margin: 0 0 6px 0;
    font-family: inherit;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.01em;
    color: #0F2530;
}

.ae-auth .ae-auth-sub {
    margin: 0 0 28px 0;
    color: #52626A;
}

.ae-auth .ae-auth-sub strong {
    font-weight: 600;
    color: #0F2530;
}

.ae-auth a {
    color: #1D5A73;
    font-weight: 500;
    text-decoration: none;
}

.ae-auth a:hover,
.ae-auth a:focus {
    color: #1D5A73;
    text-decoration: underline;
}

.ae-auth a:focus-visible,
.ae-auth button:focus-visible {
    outline: 2px solid #22495C;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Fields */

.ae-auth .ae-field {
    margin-bottom: 18px;
}

.ae-auth .ae-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.ae-auth label {
    display: block;
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 500;
    color: #0F2530;
}

.ae-auth .ae-label-row label {
    margin: 0;
}

.ae-auth .ae-label-row a {
    font-size: 14px;
}

.ae-auth .ae-field input[type=text],
.ae-auth .ae-field input[type=email],
.ae-auth .ae-field input[type=password],
.ae-auth .ae-field select {
    display: block;
    width: 100% !important;
    max-width: none;
    height: 48px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid #C8D3D8 !important;
    border-radius: 10px !important;
    background: #fff;
    box-shadow: none;
    font-family: inherit;
    font-size: 15px;
    color: #0F2530;
    outline: none;
}

.ae-auth .ae-field input:focus,
.ae-auth .ae-field select:focus {
    border-color: #22495C !important;
    box-shadow: 0 0 0 3px rgba(34, 73, 92, .18);
}

.ae-auth .ae-field input.input-validation-error {
    border-color: #D92D20 !important;
    background: #fff !important;
}

.ae-auth .field-validation-error {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 400;
    color: #B42318 !important;
}

.ae-auth .field-validation-valid {
    display: none;
}

/* Password with the show/hide button */

.ae-auth .ae-pass {
    position: relative;
}

.ae-auth .ae-pass input {
    padding-right: 52px !important;
}

.ae-auth .ae-eye {
    position: absolute;
    top: 2px;
    right: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 8px !important;
    background: transparent;
    color: #52626A;
    cursor: pointer;
}

.ae-auth .ae-eye:hover {
    color: #0F2530;
}

.ae-auth .ae-eye .ae-eye-off,
.ae-auth .ae-eye[aria-pressed=true] .ae-eye-on {
    display: none;
}

.ae-auth .ae-eye[aria-pressed=true] .ae-eye-off {
    display: block;
}

/* Tick box */

.ae-auth .ae-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px 0;
    font-size: 14px;
    font-weight: 400;
    color: #52626A;
    cursor: pointer;
}

.ae-auth .ae-check input[type=checkbox] {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #22495C;
    cursor: pointer;
}

/* Primary button */

/* !important on the colours: modern-skin.css tints every bare submit button soft green with a
   selector that outranks a class. */
.ae-auth .ae-btn {
    display: block;
    width: 100%;
    height: 50px;
    margin: 6px 0 0 0;
    padding: 0 16px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: #22495C !important;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600 !important;
    color: #fff !important;
    cursor: pointer;
    transition: background-color .15s ease;
}

.ae-auth .ae-btn:hover {
    background: #1A3A4A !important;
    color: #fff !important;
}

.ae-auth .ae-btn:focus,
.ae-auth .ae-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 73, 92, .35) !important;
}

/* Notices */

.ae-auth .ae-alert,
.ae-auth .validation-summary-errors {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 18px 0;
    padding: 12px 14px;
    border: 1px solid #FECDCA;
    border-radius: 10px !important;
    background: #FEF3F2;
    font-size: 14px;
    color: #912018;
}

.ae-auth .ae-alert svg {
    margin-top: 1px;
}

.ae-auth .ae-alert small {
    display: block;
    margin-top: 2px;
    opacity: .85;
}

.ae-auth .ae-alert.ae-alert-info {
    border-color: #B9D5DF;
    background: #EAF3F6;
    color: #17414F;
}

.ae-auth .validation-summary-errors ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ae-auth .validation-summary-valid {
    display: none;
}

/* The 2FA page */

.ae-auth .ae-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 20px;
    border-radius: 14px !important;
    background: #E4ECEF;
    color: #22495C;
}

.ae-auth .code-boxes {
    margin: 0 0 18px 0;
}

.ae-auth .ae-links {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-top: 22px;
    font-size: 14px;
    color: #52626A;
}

.ae-auth .ae-help {
    margin: 22px 0 0 0;
    font-size: 14px;
    color: #52626A;
}

.ae-auth .ae-help.ae-help-small {
    margin-top: 12px;
    font-size: 13px;
}

/* Footer */

.ae-auth .ae-auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 32px;
    font-size: 12px;
    color: #5F6E75;
}

/* ---- Phones ------------------------------------------------------------ */

@media (max-width: 767px) {
    .ae-auth .ae-auth-brand {
        display: none;
    }

    .ae-auth .ae-auth-topbar {
        display: flex;
    }

    .ae-auth {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .ae-auth .ae-auth-topbar {
        flex: none;
    }

    .ae-auth .ae-auth-main {
        flex: 1 1 auto;
        padding: 32px 20px 20px 20px;
    }

    .ae-auth .ae-auth-form {
        margin: 0;
    }

    .ae-auth .ae-auth-footer {
        margin-top: auto;
        padding-top: 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ae-auth .ae-btn {
        transition: none;
    }
}
