body.auth-page {
    height: 100%;
    overflow: hidden;
}

.guest-login--current {
    background: rgba(246,246,246, 0.72);
}

.auth-stage {
    position: fixed;
    inset: 0;
    overflow: hidden;
    background: #f6f6f6;
}

.auth-background {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(248,248,248, 0.2), transparent 62%),
        url("../img/auth-office.webp") center / cover no-repeat;
}

.auth-panel {
    position: absolute;
    z-index: 3;
    top: 20vh;
    left: 4.78vw;
    display: none;
    width: 500px;
    opacity: 0;
    transform: translateY(12px);
}

.auth-panel.is-active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: auth-in 0.45s ease both;
}

@keyframes auth-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-panel h1 {
    margin: 0;
    color: #232323;
    font-size: clamp(40px, 3vw, 50px);
    font-weight: 400;
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.auth-panel h1 em {
    color: var(--red);
    font-style: normal;
}

.auth-lead {
    margin: 14px 0 0;
    color: rgba(35,35,35, 0.75);
    font-size: 17px;
    line-height: 1.55;
}

.auth-error {
    margin-top: 18px;
    padding: 11px 15px;
    border: 1px solid rgba(227, 19, 45, 0.46);
    border-radius: 7px;
    background: rgba(133, 6, 24, 0.28);
    color: #232323;
    font-size: 13px;
}

.auth-error + .auth-form {
    margin-top: 18px;
}

.auth-form {
    display: grid;
    gap: 21px;
    margin-top: 30px;
}

.field {
    display: grid;
    gap: 8px;
    color: rgba(35,35,35, 0.78);
    font-size: 14px;
}

.field > input,
.password-field > input {
    width: 100%;
    height: 62px;
    padding: 0 20px;
    border: 1px solid rgba(35,35,35, 0.2);
    border-radius: 9px;
    outline: 0;
    background: rgba(247,247,247, 0.42);
    color: #232323;
    font-size: 16px;
    caret-color: var(--red);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.field input::placeholder {
    color: rgba(35,35,35, 0.4);
}

.field input:focus {
    border-color: rgba(227, 19, 45, 0.72);
    background: rgba(247,247,247, 0.64);
    box-shadow: 0 0 0 3px rgba(227, 19, 45, 0.08);
}

.password-field {
    position: relative;
    display: block;
}

.password-field > input {
    padding-right: 118px;
}

.password-field button {
    position: absolute;
    top: 50%;
    right: 16px;
    padding: 10px;
    border: 0;
    background: transparent;
    color: rgba(35,35,35, 0.48);
    cursor: pointer;
    font-size: 12px;
    transform: translateY(-50%);
}

.password-field button:hover {
    color: #232323;
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 62px;
    margin-top: 3px;
    padding: 0 28px 0 159px;
    border: 1px solid #ef1b35;
    border-radius: 8px;
    background: linear-gradient(110deg, #c50a22, #e3132d 72%, #c70a22);
    box-shadow: 0 15px 37px rgba(202, 8, 31, 0.2);
    color: #232323;
    cursor: pointer;
    font-size: 17px;
    font-weight: 400;
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.auth-submit:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 20px 45px rgba(202, 8, 31, 0.28);
}

.auth-submit b {
    font-size: 28px;
    font-weight: 400;
}

.auth-switch {
    margin: 15px 0 0;
    color: rgba(35,35,35, 0.52);
    font-size: 12px;
    text-align: center;
}

.auth-switch button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #ed263f;
    cursor: pointer;
}

.auth-switch button:hover {
    text-decoration: underline;
}

.auth-panel--register {
    top: 14vh;
}

.auth-panel--register h1 {
    font-size: clamp(38px, 2.8vw, 47px);
}

.auth-panel--register .auth-lead {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.auth-form--register {
    gap: 14px;
    margin-top: 22px;
}

.auth-form--register .field {
    gap: 7px;
    font-size: 13px;
}

.auth-form--register .field > input,
.auth-form--register .password-field > input {
    height: 52px;
    font-size: 14px;
}

.auth-form--register .auth-submit {
    height: 56px;
    margin-top: 5px;
    padding-left: 148px;
    font-size: 15px;
}

@media (max-width: 1000px) {
    .auth-background {
        background-position: 62% center;
    }

    .auth-panel {
        left: 5vw;
        width: min(500px, 58vw);
    }

    .auth-submit {
        padding-left: 30%;
    }
}

@media (max-width: 720px) {
    .auth-background {
        background:
            linear-gradient(180deg, rgba(247,247,247, 0.45), rgba(247,247,247, 0.9) 42%, #f6f6f6 78%),
            url("../img/auth-office.webp") 69% center / cover no-repeat;
    }

    .auth-panel,
    .auth-panel--register {
        top: 14vh;
        left: 18px;
        width: calc(100% - 36px);
        max-height: calc(100vh - 130px);
    }

    .auth-panel h1,
    .auth-panel--register h1 {
        font-size: clamp(32px, 8.5vw, 42px);
    }

    .auth-lead,
    .auth-panel--register .auth-lead {
        margin-top: 12px;
        font-size: 12px;
        line-height: 1.5;
    }

    .auth-form,
    .auth-form--register {
        gap: 14px;
        margin-top: 25px;
    }

    .field,
    .auth-form--register .field {
        gap: 7px;
        font-size: 13px;
    }

    .field > input,
    .password-field > input,
    .auth-form--register .field > input,
    .auth-form--register .password-field > input {
        height: 50px;
        padding: 0 17px;
        font-size: 13px;
    }

    .password-field > input {
        padding-right: 95px;
    }

    .password-field button {
        right: 8px;
        font-size: 10px;
    }

    .auth-submit,
    .auth-form--register .auth-submit {
        height: 52px;
        padding: 0 20px 0 32%;
        font-size: 14px;
    }

    .auth-submit b {
        font-size: 29px;
    }

    .auth-error {
        margin-top: 12px;
    }

    .auth-switch {
        margin-top: 15px;
        font-size: 12px;
    }
}

@media (max-height: 780px) and (min-width: 721px) {
    .auth-panel {
        top: 12vh;
        width: 470px;
    }

    .auth-panel--register {
        top: 14vh;
    }

    .auth-form {
        gap: 13px;
        margin-top: 19px;
    }

    .field > input,
    .password-field > input {
        height: 52px;
    }

    .auth-submit {
        height: 54px;
    }

    .auth-panel h1 {
        font-size: 42px;
    }

    .auth-lead {
        font-size: 14px;
    }

    .auth-panel--register .auth-form {
        gap: 9px;
        margin-top: 14px;
    }

    .auth-panel--register .field > input,
    .auth-panel--register .password-field > input {
        height: 46px;
    }
}
