:root {
    --login-brand: #662e9b;
    --login-brand-dark: #4f2275;
    --login-brand-ink: #29153a;
    --login-muted: #857b8c;
    --login-paper: #f7f6f8;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #44394c;
    background: var(--login-paper);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-width: 320px;
    min-height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--login-paper);
}

button,
input {
    font: inherit;
}

button,
label,
input[type="checkbox"] {
    -webkit-tap-highlight-color: transparent;
}

.login-page {
    position: relative;
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    padding: 40px 24px;
    place-items: center;
    background:
        radial-gradient(circle at 17% 13%, rgba(102, 46, 155, .1), transparent 34%),
        linear-gradient(rgba(102, 46, 155, .024) 1px, transparent 1px),
        linear-gradient(90deg, rgba(102, 46, 155, .024) 1px, transparent 1px),
        var(--login-paper);
    background-size: auto, 40px 40px, 40px 40px, auto;
    isolation: isolate;
}

.login-page::after {
    position: absolute;
    z-index: -1;
    top: 12%;
    bottom: 12%;
    left: 50%;
    width: 1px;
    background: linear-gradient(transparent, rgba(102, 46, 155, .12), transparent);
    content: "";
    transform: translateX(-260px);
}

.login-shell {
    position: relative;
    width: min(390px, calc(100vw - 48px));
    padding-left: 34px;
}

.login-shell::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(
        180deg,
        transparent,
        rgba(102, 46, 155, .7) 28%,
        rgba(25, 137, 163, .38) 76%,
        transparent
    );
    content: "";
}

.login-mark {
    display: grid;
    width: 38px;
    height: 38px;
    margin-bottom: 38px;
    place-items: center;
    color: var(--login-brand);
}

.login-mark svg {
    width: 33px;
    height: 33px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-field {
    position: relative;
    display: block;
    margin-bottom: 20px;
}

.login-field label {
    position: absolute;
    z-index: 1;
    top: -7px;
    left: 12px;
    padding: 0 6px;
    background: var(--login-paper);
    color: var(--login-muted);
    font-size: 11px;
    font-weight: 680;
    line-height: 1.2;
    pointer-events: none;
    transition: color .15s ease;
}

.login-field input {
    display: block;
    width: 100%;
    height: 52px;
    padding: 14px 16px 11px;
    border: 1px solid rgba(63, 37, 78, .18);
    border-radius: 10px;
    outline: 0;
    background: rgba(255, 255, 255, .52);
    color: var(--login-brand-ink);
    font-size: 14px;
    font-weight: 520;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.login-field input:hover {
    border-color: rgba(102, 46, 155, .34);
}

.login-field input:focus {
    border-color: rgba(102, 46, 155, .68);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 46, 155, .09);
}

.login-field:focus-within label {
    color: var(--login-brand);
}

.login-validation {
    display: block;
    margin: 6px 4px -7px;
    color: #a53f55;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}

.login-validation:empty {
    display: none;
}

.login-remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 1px 0 26px;
    color: #706777;
    font-size: 12px;
    font-weight: 560;
    cursor: pointer;
    user-select: none;
}

.login-remember input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.login-checkbox {
    display: grid;
    width: 18px;
    height: 18px;
    flex: none;
    place-items: center;
    border: 1px solid rgba(63, 37, 78, .34);
    border-radius: 5px;
    background: rgba(255, 255, 255, .68);
    color: #fff;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.login-checkbox svg {
    width: 11px;
    height: 11px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
}

.login-remember input:checked + .login-checkbox {
    border-color: var(--login-brand);
    background: var(--login-brand);
}

.login-remember input:checked + .login-checkbox svg {
    opacity: 1;
}

.login-remember input:focus-visible + .login-checkbox {
    box-shadow: 0 0 0 3px rgba(102, 46, 155, .15);
}

.login-submit {
    display: inline-flex;
    min-width: 124px;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 11px 23px;
    border: 1px solid var(--login-brand);
    border-radius: 9px;
    background: var(--login-brand);
    color: #fff;
    font-size: 13px;
    font-weight: 720;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.login-submit:hover {
    border-color: var(--login-brand-dark);
    background: var(--login-brand-dark);
}

.login-submit:active {
    transform: translateY(1px);
}

.login-submit:focus-visible,
.login-field input:focus-visible {
    outline: 3px solid rgba(102, 46, 155, .25);
    outline-offset: 2px;
}

.login-error {
    margin: -14px 0 28px;
    padding: 12px 14px;
    border-left: 2px solid #a53f55;
    background: rgba(165, 63, 85, .065);
    color: #783143;
    font-size: 12px;
    font-weight: 620;
    line-height: 1.45;
}

.server-mark {
    position: fixed;
    z-index: 2;
    right: 14px;
    bottom: 10px;
    color: #888;
    font: 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    opacity: .55;
}

@media (max-width: 520px) {
    .login-page {
        padding: 32px 24px;
    }

    .login-page::after {
        display: none;
    }

    .login-shell {
        width: 100%;
        padding-left: 26px;
    }

    .server-mark {
        right: 10px;
        bottom: 8px;
        font-size: 10px;
    }
}

@media (max-height: 520px) and (orientation: landscape) {
    .login-page {
        align-items: start;
        overflow-y: auto;
        padding-top: 32px;
        padding-bottom: 48px;
    }

    .login-mark {
        margin-bottom: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-submit,
    .login-field input,
    .login-field label,
    .login-checkbox {
        transition: none;
    }
}
