/*
 * Admin sign-in, in MissingPage's own clothes.
 *
 * Loaded after main-style.css and overrides its account-page rules, so every view
 * under Views/Account (login, forgot password, reset, lock screen) picks this up
 * without markup changes. The old look was the template's: a stock photo of a
 * laptop, a teal-to-green gradient, and a navy button from a different palette.
 *
 * Palette comes from the public site: near-black #101216, cyan #46b7c5, Nexa type.
 */

.main-box {
    background: #f4f6f8;
    background-image: none;
    overflow-x: hidden;
}

/* Left half: the brand panel. The wordmark is drawn with pseudo-elements so the
   empty <div class="login-banner"> every account view already has is enough. */
.login-banner {
    background: #101216;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.login-banner::before {
    content: "MISSINGPAGE";
    font-family: 'Nexa-Heavy', sans-serif;
    font-size: 2.4em;
    letter-spacing: 3px;
    color: #46b7c5;
}

.login-banner::after {
    /* The support desk sets --mp-login-tagline to name itself (MP-65). */
    content: var(--mp-login-tagline, "Site administration");
    margin-top: 10px;
    font-family: 'Nexa-Book', sans-serif;
    font-size: 1.05em;
    letter-spacing: 1px;
    color: #8b93a1;
}

/* Right half: the form, vertically centred instead of pinned at 10%. */
.login-box {
    top: 50%;
    transform: translateY(-50%);
    max-width: calc(100% - 48px);
}

.text-heading {
    font-size: 1.9em;
    line-height: 1.3;
    color: #101216;
}

/* Fields: bordered and calm in place of borderless-on-gradient. */
.login-box form input[type="text"],
.login-box form input[type="password"],
input[type="text"].form-control,
input[type="password"].form-control {
    height: 56px !important;
    font-size: 16px;
    border: 1px solid #d9dee3 !important;
    border-radius: 8px;
    background: #fff !important;
}

.login-box form input.form-control:focus {
    border-color: #46b7c5 !important;
    box-shadow: 0 0 0 3px rgba(70, 183, 197, .18) !important;
}

.login-box label {
    color: #6b7280;
    font-size: .8em;
}

.login-box .form-check-input:checked {
    background-color: #46b7c5 !important;
    border-color: #46b7c5;
}

.login-box .form-check-label {
    color: #3d434b;
}

/* The button was .btn-link over navy; make it the public site's cyan block. */
.login-btn,
.login-box .login-btn {
    display: block;
    width: 100%;
    margin-top: 24px;
    padding: 15px 0;
    background: #46b7c5;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-family: 'Nexa-Bold', sans-serif;
    font-size: 1.05rem;
    letter-spacing: .5px;
    text-decoration: none;
    text-align: center;
}

.login-btn:hover,
.login-btn:focus {
    background: #3aa5b3;
    color: #fff;
    text-decoration: none;
}

/* One column on narrow screens: brand becomes a header strip. */
@media (max-width: 900px) {
    .login-banner {
        position: static;
        width: 100%;
        height: 150px;
    }

    .login-banner::before {
        font-size: 1.6em;
    }

    .right-block {
        width: 100%;
        float: none;
    }

    .login-box {
        position: static;
        transform: none;
        margin: 40px auto;
    }
}

/* Inline sign-in failure: message lives in the form, not in a popup. */
.login-error {
    background: #fdecec;
    color: #b3363c;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: .92rem;
    line-height: 1.45;
}

@keyframes mp-shake {
    10%, 90% { transform: translate(-1px, -50%); }
    20%, 80% { transform: translate(2px, -50%); }
    30%, 50%, 70% { transform: translate(-4px, -50%); }
    40%, 60% { transform: translate(4px, -50%); }
}

.login-box.login-shake {
    animation: mp-shake .45s cubic-bezier(.36, .07, .19, .97) both;
}

/* Static account boxes (mobile layout) shake around their normal position. */
@media (max-width: 900px) {
    @keyframes mp-shake {
        10%, 90% { transform: translateX(-1px); }
        20%, 80% { transform: translateX(2px); }
        30%, 50%, 70% { transform: translateX(-4px); }
        40%, 60% { transform: translateX(4px); }
    }
}
