/*
 * Sign-in shell.
 *
 * This exists because of a wrong assumption the login page was built on: the
 * markup uses Paper Dashboard's login classes — `.full-page`,
 * `.full-page-background`, `.full-page:after` — and **this build of
 * paper-dashboard.min.css does not define any of them.** It carries only
 * `.wrapper.wrapper-full-page`. So the background div was 0px tall, the wash
 * had no `content` and never painted, and the photograph behind it was never on
 * screen: a white void with a card floating in it, which is exactly what it
 * looked like.
 *
 * Rather than depend again on rules that are not there, the page owns them.
 */

/* ------------------------------------------------------------------ */
/* The page                                                           */
/* ------------------------------------------------------------------ */

.login-page .full-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* The photograph. Fixed so it does not slide under a short viewport. */
.login-page .full-page-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}

/*
 * The wash. A flat 55% slate flattened the picture into grey card; a diagonal
 * gradient keeps the desk readable on the left and gives the card its contrast
 * on the right, where the card actually sits.
 */
.login-page .full-page:after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(115deg,
        rgba(13, 31, 40, .58) 0%,
        rgba(13, 31, 40, .70) 45%,
        rgba(13, 31, 40, .86) 100%);
}

/* Everything the reader touches sits above both. */
.login-page .full-page > .content,
.login-page .full-page > .footer {
    position: relative;
    z-index: 2;
}

/*
 * The theme parks the card near the top — `.content` has `padding-top: 21vh`
 * and the container adds `margin-top: 8vh` — which strands it above centre on
 * a tall screen.
 */
.login-page .full-page > .content {
    flex: 1 1 auto;
    padding-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.login-page .full-page > .content .container { margin-top: 0; }

/* Room for the footer on a short screen, so nothing is cut off. */
@media (max-height: 640px) {
    .login-page .full-page > .content {
        min-height: auto;
        padding: 6vh 0 4vh;
    }
}

/* ------------------------------------------------------------------ */
/* The card                                                           */
/* ------------------------------------------------------------------ */

.login-page .card-login {
    border: none;
    border-radius: 14px;
    padding: 6px 6px 2px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .5);
}

.login-page .card-login .card-header {
    padding: 22px 24px 6px;
    background: transparent;
    border: none;
}

.login-page .card-login .card-body { padding: 8px 24px 4px; }
.login-page .card-login .card-footer { padding: 4px 24px 20px; border: none; background: transparent; }

.login-page .card-login .card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #252422;
    margin: 12px 0 2px;
}

/* One line saying what is being signed in to, which the page never said. */
.login-page .card-login .card-subtitle {
    font-size: .78rem;
    color: #9a9a9a;
    margin: 0;
}

/* ------------------------------------------------------------------ */
/* Fields                                                             */
/* ------------------------------------------------------------------ */

/*
 * The icon and the field were two boxes with two borders meeting in the middle.
 * One bordered group with the icon inside it reads as a single control.
 */
.login-page .card-login .input-group {
    margin-bottom: 14px;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.login-page .card-login .input-group:focus-within {
    border-color: #51bcda;
    box-shadow: 0 0 0 3px rgba(81, 188, 218, .15);
}

.login-page .card-login .input-group-text {
    background: transparent;
    border: none;
    color: #b3b3b3;
    padding-left: 14px;
    padding-right: 8px;
}

.login-page .card-login .form-control {
    border: none;
    background: transparent;
    box-shadow: none;
    height: 46px;
    font-size: .9rem;
    color: #252422;
}

.login-page .card-login .form-control:focus {
    border: none;
    box-shadow: none;
    background: transparent;
}

.login-page .card-login .form-control::placeholder { color: #b3b3b3; }

/*
 * Remember me was a large grey square with the label shouted beside it —
 * the theme's `.form-check-sign` needs sprite CSS this build does not carry.
 * A plain, correctly sized checkbox is better than a broken ornament.
 */
.login-page .card-login .form-check { padding-left: 0; margin: 2px 0 4px; }

.login-page .card-login .form-check .form-check-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-left: 0;
    font-size: .8rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #66615b;
    cursor: pointer;
}

/*
 * Drawn rather than left to the platform. The theme hides the real input and
 * paints `.form-check-sign` in its place, and this build has no CSS for that
 * sign — so the box was simply absent. Falling back to the native control put
 * it at the mercy of the OS, which renders a pale outline on white that is
 * easy to miss. This one is explicit, so it looks the same everywhere.
 */
.login-page .card-login .form-check .form-check-input {
    position: static;
    margin: 0;
    opacity: 1;
    /* The theme hides it with all three of opacity, position and visibility
       (`.form-check input[type="checkbox"]`). Miss any one and the box takes
       up its space while painting nothing, which is what happened. */
    visibility: visible;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    appearance: none;
    -webkit-appearance: none;
    border: 1.5px solid #cfcfcf;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

.login-page .card-login .form-check .form-check-input:hover { border-color: #51bcda; }

.login-page .card-login .form-check .form-check-input:checked {
    background: #51bcda;
    border-color: #51bcda;
    /* The tick, so nothing depends on a font or a sprite being present. */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E");
    background-size: 13px 13px;
    background-position: center;
    background-repeat: no-repeat;
}

.login-page .card-login .form-check .form-check-input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(81, 188, 218, .25);
}

.login-page .card-login .form-check .form-check-sign { display: none; }

/* ------------------------------------------------------------------ */
/* Actions                                                            */
/* ------------------------------------------------------------------ */

.login-page .card-login .btn-block {
    height: 46px;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .04em;
    margin-bottom: 4px;
}

.login-page .card-login .btn-link {
    font-size: .76rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: #9a9a9a;
}

.login-page .card-login .btn-link:hover { color: #51bcda; }

.login-page .alert {
    border: none;
    border-radius: 8px;
    font-size: .8rem;
    margin: 0 24px 10px;
    padding: 10px 14px;
}

/* ------------------------------------------------------------------ */
/* Footer                                                             */
/* ------------------------------------------------------------------ */

.login-page .footer {
    background: transparent;
    border: none;
    padding: 14px 0 18px;
}

.login-page .footer .container-fluid { color: rgba(255, 255, 255, .7); }
