@font-face {
    font-family: Megrim;
    src: url(/static/fonts/Megrim-Regular.ttf);
}
* {
    box-sizing: border-box;
}
::-moz-selection { /* Code for Firefox */
    color: rgba(0, 0, 0, 0.35);
    background: #668cff;
}

::selection {
    color: rgba(0, 0, 0, 0.35);
    background: #668cff;
}
html,body{
    margin: 0;
}
body{
    min-height: 100vh;
    background-image: url(/static/img/login/back.png);
    background-position: top;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}
.logPanel{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(4, 8, 22, 0);
    border: 1px solid rgba(120, 150, 255, 0.15);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.35);
    margin-right: 10rem;
    padding: 45px 45px;
}
form{
    text-align: center;

}
h1{
    font-family: Megrim;
    text-shadow: 0 0 5px rgba(102, 140, 255, 0.2);
    color: #668cff;
    margin: 0 auto;
}
form p{
    color: #fff;
    font-family: Megrim;
}
input{
    background-color: transparent;
    border: 2px solid #668cff;
    border-radius: 3px;
    padding: 10px 40px;
    color: #668cff;
    font-size: larger;
    width: 100%;
}
input:focus{
    outline: none;
    border-color: #668cff;
    box-shadow: 0 0 8px rgba(102, 140, 255, 0.3);;
}

#password-field {
    position: relative;
    display: inline-block;
}

#password-field input {
    display: block;
    padding-right: 50px;
}

#toggle-password {
    all: unset;

    position: absolute;
    top: 50%;
    right: 12px;

    transform: translateY(-50%);

    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
}

#password-eye {
    display: block;
    width: 22px;
    height: 22px;
    object-fit: contain;

    opacity: 0.85;
}

#toggle-password:hover #password-eye {
    opacity: 1;
}
button{
    background-color: transparent;
    border: 1px solid #668cff;
    color: #8da7ff;
    font-size: 16px;
    font-family: Megrim;
    margin-top: 20px;
    padding: 12px 28px;
    min-width: 130px;
    cursor: pointer;
    transition: 0.2s;
}
button:hover{
    background-color: #668cff;
    color: #080b18;
    box-shadow: 0 0 18px rgba(102, 140, 255, 0.25);
}
.login-error {
    margin: 0 0 20px;
    padding: 12px 16px;
    border: 1px solid currentColor;
    border-radius: 8px;
    text-align: center;
    color: red;
}



@media (max-width: 768px) {

    body {
        justify-content: center;
        align-items: center;

        padding: 20px;

        background-position: center top;
        background-attachment: scroll;
    }

    .logPanel {
        width: 100%;
        max-width: 420px;

        margin-right: 0;

        padding: 35px 25px;

        text-align: center;
    }

    h1 {
        font-size: clamp(
            24px,
            8vw,
            34px
        );

        white-space: nowrap;
    }

    form {
        width: 100%;
    }

    label,
    #password-field {
        display: block;
        width: 100%;
    }
    #password-field input {
        width: 100%;
    }

    input {
        width: 100%;

        padding:
            10px 45px
            10px 15px;

        box-sizing: border-box;
    }

    label input[type="text"] {
        padding-right: 15px;
    }

    .login-button {
        margin-top: 10px;
    }
}
@media (max-width: 420px) {

    body {
        padding: 12px;
    }

    .logPanel {
        padding: 30px 18px;
    }

    h1 {
        font-size: 27px;
    }
}