/*
 * Public account pages (login, register, forgot/reset password), modernised.
 *
 * Overrides the template rules in main-style.css, so all account views change
 * together without markup edits - the same approach as the admin sign-in. The
 * book photograph stays: it is the one piece of the old design that says
 * MissingPage. What goes is the teal-to-green gradient and the navy button
 * from a different palette.
 */

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

/* Left half: keep the book image, grounded with a soft ink wash so it reads
   as a designed panel rather than a bare stock photo. */
.login-banner {
    background:
        linear-gradient(to top, rgba(16, 18, 22, .55), rgba(16, 18, 22, .08) 45%),
        url('../images/login-page.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

/* Right half: the form floats as a card on the light canvas. */
.login-box {
    top: 50%;
    transform: translateY(-50%);
    max-width: calc(100% - 48px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px rgba(16, 24, 40, .10);
    padding: 36px 36px 28px;
}

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

.login-box form {
    margin-top: 24px;
}

.login-box form input[type="text"],
.login-box form input[type="password"],
.login-box input[type="text"].form-control,
.login-box input[type="password"].form-control {
    height: 54px !important;
    font-size: 16px;
    border: 1px solid #dfe4ec !important;
    border-radius: 10px;
    background: #fff !important;
}

.login-box form input.form-control:focus {
    border-color: #46b7c5 !important;
    box-shadow: 0 0 0 3px rgba(70, 183, 197, .16) !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 primary action: brand gradient instead of the navy block. */
.login-btn,
.login-box .login-btn {
    display: block;
    width: 100%;
    margin-top: 22px;
    padding: 14px 0;
    background: linear-gradient(135deg, #46b7c5, #2e8fa3);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-family: 'Nexa-Bold', sans-serif;
    font-size: 1.02rem;
    letter-spacing: .4px;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 4px 14px rgba(70, 183, 197, .35);
}

.login-btn:hover,
.login-btn:focus {
    background: linear-gradient(135deg, #3aa5b3, #257e91);
    color: #fff;
    text-decoration: none;
}

/* Secondary links and the social row */
.trouble-login {
    color: #3aa5b3;
}

.social-login .text-small {
    color: #8b93a1;
}

.social-login button {
    background: transparent;
    border: none;
}

.signup-btn span {
    color: #5b6270;
}

.signup-btn a {
    color: #3aa5b3;
    font-weight: 600;
}

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

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

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

/* 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); }
    }
}
