:root {
    color-scheme: light;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: #142239;
}

body {
    margin: 0;
}

button,
input {
    font: inherit;
}

.login-page {
    position: relative;
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    padding: 32px 20px;
    overflow-x: hidden;
    color: #172235;
    background:
        radial-gradient(circle at 20% 15%, rgb(61 91 135 / 28%), transparent 34rem),
        radial-gradient(circle at 85% 85%, rgb(37 99 235 / 16%), transparent 32rem),
        #142239;
    place-items: center;
}

.login-page::before {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgb(255 255 255 / 3%) 1px, transparent 1px),
        linear-gradient(90deg, rgb(255 255 255 / 3%) 1px, transparent 1px);
    background-size: 32px 32px;
    content: "";
    pointer-events: none;
}

.login-card {
    position: relative;
    z-index: 1;
    width: min(100%, 500px);
    padding: 32px;
    border: 1px solid rgb(219 226 238 / 90%);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 80px rgb(4 12 27 / 38%);
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    margin-bottom: 28px;
}

.login-brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    color: #fff;
    background: #243754;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 12%);
    font-size: 15px;
    font-weight: 800;
    place-items: center;
}

.login-brand-name {
    color: #172235;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .12em;
}

.login-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.login-messages {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.login-message,
.login-form-errors {
    margin: 0;
    padding: 11px 13px;
    border: 1px solid #fecdd3;
    border-radius: 10px;
    color: #9f1239;
    background: #fff1f2;
    font-size: 14px;
    line-height: 1.4;
}

.login-tabs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4px;
    padding: 4px;
    border: 1px solid #dfe5ef;
    border-radius: 12px;
    background: #eef2f7;
}

.login-tab {
    min-width: 0;
    padding: 11px 10px;
    border: 0;
    border-radius: 9px;
    color: #5d687a;
    background: transparent;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.login-tab:hover:not(:disabled) {
    color: #172235;
    background: rgb(255 255 255 / 65%);
}

.login-tab[aria-selected="true"] {
    color: #1d4ed8;
    background: #fff;
    box-shadow: 0 2px 8px rgb(20 34 57 / 10%);
}

.login-tab:disabled {
    color: #9aa4b2;
    cursor: not-allowed;
    opacity: .72;
}

.login-tab:focus-visible,
.login-submit:focus-visible,
.login-field input:focus-visible {
    outline: 3px solid rgb(37 99 235 / 28%);
    outline-offset: 2px;
}

.login-panel {
    padding-top: 22px;
}

.login-panel > .disabled-control-proxy {
    display: grid;
}

.login-card.is-enhanced .login-panel[hidden] {
    display: none;
}

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

.login-field {
    display: grid;
    gap: 7px;
    color: #445066;
    font-size: 14px;
    font-weight: 700;
}

.login-field input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 13px;
    border: 1px solid #cfd7e3;
    border-radius: 10px;
    color: #172235;
    background: #f8fafc;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.login-field input:hover {
    border-color: #aeb9ca;
}

.login-field input:focus {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgb(37 99 235 / 12%);
}

.login-submit {
    display: grid;
    width: 100%;
    min-height: 46px;
    padding: 11px 16px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: #2563eb;
    box-shadow: 0 8px 20px rgb(37 99 235 / 22%);
    font-weight: 750;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
    place-items: center;
}

.login-submit:hover:not(:disabled) {
    background: #1d4ed8;
    box-shadow: 0 10px 24px rgb(37 99 235 / 28%);
    transform: translateY(-1px);
}

.login-submit:active:not(:disabled) {
    transform: translateY(0);
}

.login-submit:disabled {
    color: #7d8796;
    background: #e4e9f0;
    box-shadow: none;
    cursor: not-allowed;
}

.login-submit-bitrix {
    background: #2f86e5;
}

.login-submit-bitrix:hover:not(:disabled) {
    background: #2577cf;
}

.login-form-errors ul,
.login-field .errorlist {
    padding: 0;
    margin: 0;
    color: #b4233c;
    font-size: 13px;
    font-weight: 600;
    list-style: none;
}

@media (max-width: 520px) {
    .login-page {
        padding: 20px 12px;
        place-items: center;
    }

    .login-card {
        padding: 24px 18px;
        border-radius: 16px;
    }

    .login-brand {
        margin-bottom: 22px;
    }

    .login-tabs {
        grid-template-columns: 1fr;
    }

    .login-tab {
        min-height: 42px;
    }
}

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