@font-face {
    font-family: "Cabin";
    src: url("cabin-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Cabin";
    src: url("cabin-semibold.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

:root {
    --panel: rgba(20, 60, 130, .84);
    --panel-border: rgba(255, 255, 255, .13);
    --panel-text: #edf2fa;
    --button: #c30028;
    --button-hover: #d83253;
    --focus: #72aaf8;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.esalary-login {
    min-width: 0;
    margin: 0;
    background-color: #e7eff8;
    background-image: url("login-background.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--panel-text);
    font-family: "Cabin", Arial, sans-serif;
    font-size: 14px;
}

button,
input,
select {
    font: inherit;
}

.login-page {
    display: flex;
    min-height: 100vh;
    min-height: 100svh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 5vh, 56px) 18px 24px;
}

.login-card {
    position: relative;
    width: min(100%, 410px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 14px;
    padding: 35px 34px 38px;
    background: linear-gradient(150deg, rgba(20, 60, 130, .92), rgba(35, 82, 151, .84));
    box-shadow: 0 24px 65px rgba(24, 56, 99, .25);
    backdrop-filter: blur(8px);
}

.login-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--button), #e63d5e 56%, #f0b5bf);
    content: "";
}

.login-logo {
    display: block;
    width: 218px;
    height: 66px;
    margin: 0 auto 25px;
    border-radius: 10px;
    padding: 9px 13px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 6px 20px rgba(9, 31, 65, .13);
    object-fit: contain;
    object-position: center;
}

.login-card h1 {
    margin: 0 0 29px;
    color: var(--panel-text);
    font-size: 23px;
    font-weight: 600;
    line-height: 1.25;
}

.login-form {
    display: grid;
    gap: 19px;
}

.form-field {
    display: grid;
    gap: 6px;
}

.form-field label {
    color: var(--panel-text);
    font-size: 13px;
}

.form-field input {
    width: 100%;
    height: 45px;
    outline: 0;
    border: 2px solid rgba(220, 226, 233, .94);
    border-radius: 6px;
    padding: 0 12px;
    background: rgba(255, 255, 255, .94);
    color: #3c4652;
    transition: border-color .16s, box-shadow .16s, background-color .16s;
}

.form-field input:hover {
    background: #fff;
}

.form-field input:focus {
    border-color: var(--focus);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(114, 170, 248, .28);
}

.password-field {
    position: relative;
}

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

.password-toggle {
    position: absolute;
    top: 2px;
    right: 2px;
    display: grid;
    width: 40px;
    height: 41px;
    place-items: center;
    border: 0;
    border-left: 1px solid #d4d9df;
    border-radius: 0 3px 3px 0;
    background: #edf0f3;
    color: #697680;
    cursor: pointer;
}

.password-toggle:hover {
    background: #e2e7ec;
    color: #143c82;
}

.password-toggle svg {
    width: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.password-toggle .eye-closed,
.password-toggle[aria-pressed="true"] .eye-open {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-closed {
    display: block;
}

.submit-button {
    min-height: 49px;
    margin-top: 3px;
    border: 1px solid var(--button);
    border-radius: 6px;
    padding: 10px 16px;
    background: var(--button);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(124, 0, 26, .22);
    transition: transform .16s, background-color .16s, border-color .16s, box-shadow .16s;
}

.submit-button:hover,
.submit-button:focus-visible {
    border-color: var(--button-hover);
    background: var(--button-hover);
    box-shadow: 0 12px 26px rgba(124, 0, 26, .3);
    transform: translateY(-1px);
}

.submit-button:active {
    transform: translateY(0);
}

.login-page footer {
    margin-top: 30px;
    color: #59636f;
    font-size: 11px;
    text-align: center;
    text-shadow: 0 1px 1px rgba(255, 255, 255, .9);
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(255, 255, 255, .8);
    outline-offset: 2px;
}

@media (max-height: 650px) {
    .login-logo {
        height: 58px;
        margin-bottom: 18px;
    }
}

@media (max-width: 430px) {
    .login-page {
        justify-content: flex-start;
        padding-inline: 14px;
    }

    .login-card {
        padding: 29px 23px 31px;
    }

    .login-logo {
        width: 195px;
        height: 62px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
