@font-face {
    font-family: Manrope;
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("fonts/manrope-auth-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: Manrope;
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("fonts/manrope-auth-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: Manrope;
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("fonts/manrope-auth-cyrillic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
    color-scheme: light;
    font: 16px/1.55 Manrope, system-ui, sans-serif;
    color: #1b2823;
    background: #f8f7f3;
    --auth-text: #1b2823;
    --auth-muted: #506059;
    --auth-action: #254c3d;
    --auth-focus: #357356;
    --auth-paper: #f8f7f3;
    --auth-border: #a8afa7;
}

*, *::before, *::after {
    box-sizing: border-box;
}

.auth-portal {
    margin: 0;
}

.auth-shell {
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
}

.auth-visual {
    background: #304039 url("auth-atrium.webp") center 52% / cover no-repeat;
}

.auth-content {
    min-width: 0;
    padding: clamp(24px, 4vw, 62px) clamp(26px, 6vw, 86px);
    display: grid;
    grid-template-columns: minmax(0, 420px);
    align-content: center;
    justify-content: center;
    row-gap: clamp(27px, 5vh, 46px);
    background: var(--auth-paper);
}

.auth-header {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 15px;
}

.auth-brand-mark {
    flex: 0 0 auto;
}

.auth-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #223f34;
    font-size: clamp(1.32rem, 2.4vw, 1.6rem);
    font-weight: 650;
    letter-spacing: -.065em;
    line-height: 1.15;
}

.auth-wordmark strong {
    font-weight: 800;
}

.auth-languages {
    position: relative;
}

.auth-languages summary {
    min-height: 42px;
    padding: 6px 11px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--auth-text);
    background: #fff;
    border: 1px solid #c9cec6;
    border-radius: 10px;
    cursor: pointer;
    font-size: .81rem;
    font-weight: 720;
    white-space: nowrap;
    list-style: none;
}

.auth-languages summary:hover,
.auth-languages[open] summary {
    background: #edf2eb;
}

.auth-languages summary::-webkit-details-marker {
    display: none;
}

.auth-languages summary::after {
    width: 7px;
    height: 7px;
    margin: -4px 2px 0 2px;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
    content: "";
}

.auth-languages[open] summary::after {
    margin-top: 4px;
    transform: rotate(225deg);
}

.auth-languages:not([open]) nav {
    display: none;
}

.auth-languages nav {
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 8px);
    width: 190px;
    padding: 5px;
    background: #fff;
    border: 1px solid #d9ded6;
    border-radius: 14px;
    box-shadow: 0 12px 35px rgb(25 45 36 / 12%);
}

.auth-languages nav a {
    min-height: 42px;
    padding: 6px 9px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    color: var(--auth-text);
    font-size: .87rem;
    font-weight: 650;
    text-decoration: none;
    border-radius: 9px;
}

.auth-languages nav a:hover {
    color: #1b4b37;
    background: #edf4eb;
}

.auth-flag {
    display: inline-block;
    flex: 0 0 24px;
    width: 24px;
    height: 16px;
    border-radius: 3px;
    background: url("auth-flags-flat.png") no-repeat;
    background-size: 144px 16px;
    box-shadow: inset 0 0 0 1px rgb(23 47 35 / 18%);
}

.auth-flag[data-flag="pl"] { background-position: 0 0; }
.auth-flag[data-flag="ru-RU"] { background-position: -24px 0; }
.auth-flag[data-flag="es"] { background-position: -48px 0; }
.auth-flag[data-flag="bg"] { background-position: -72px 0; }
.auth-flag[data-flag="hr"] { background-position: -96px 0; }
.auth-flag[data-flag="ro"] { background-position: -120px 0; }

.auth-card {
    min-width: 0;
    width: 100%;
    margin-bottom: clamp(8px, 4vh, 40px);
}

.auth-card h1 {
    margin: 0;
    font-size: clamp(2rem, 3.4vw, 2.75rem);
    line-height: 1.1;
    font-weight: 740;
    letter-spacing: -.057em;
    overflow-wrap: break-word;
    text-wrap: pretty;
}

.auth-intro {
    margin: 15px 0 0;
    color: var(--auth-muted);
    font-size: .95rem;
}

.auth-error {
    margin: 21px 0 0;
    padding: 11px 13px;
    color: #802737;
    background: #fdf0ef;
    border: 1px solid #e7b9bd;
    border-radius: 9px;
    font-size: .9rem;
}

.auth-form {
    display: grid;
    gap: 19px;
    margin-top: 24px;
}

.auth-field {
    min-width: 0;
}

.auth-field label {
    display: block;
    margin-bottom: 7px;
    font-size: .87rem;
    font-weight: 760;
}

.auth-field input {
    width: 100%;
    min-height: 52px;
    min-width: 0;
    padding: 10px 14px;
    color: var(--auth-text);
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 11px;
    font: inherit;
}

.auth-password {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 11px;
}

.auth-password input {
    flex: 1 1 auto;
    border: 0;
    background: transparent;
}

.auth-password:focus-within {
    border-color: var(--auth-focus);
    outline: 2px solid var(--auth-focus);
    outline-offset: 1px;
}

.auth-reveal {
    flex: 0 0 auto;
    width: 44px;
    min-height: 44px;
    margin-inline-end: 3px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #315a49;
    cursor: pointer;
}

.auth-reveal:hover {
    background: #edf4eb;
}

.auth-eye {
    position: relative;
    display: block;
    width: 20px;
    height: 20px;
    margin: auto;
}

.auth-eye::before {
    position: absolute;
    inset: 3px;
    border: 1.5px solid currentColor;
    border-radius: 72% 12%;
    transform: rotate(45deg);
    content: "";
}

.auth-eye::after {
    position: absolute;
    inset: 7px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    content: "";
}

.auth-reveal[data-visible="true"] .auth-eye span {
    position: absolute;
    z-index: 1;
    inset: 9px -1px auto;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
    box-shadow: 0 -1px #fff;
    transform: rotate(-45deg);
}

.auth-password input::-ms-reveal {
    display: none;
}

.auth-hint {
    margin: 7px 0 0;
    color: var(--auth-muted);
    font-size: .8rem;
}

.auth-submit {
    width: 100%;
    min-height: 54px;
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 12px;
    padding: 11px 17px;
    margin-top: 4px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: var(--auth-action);
    font: inherit;
    font-weight: 760;
    text-align: center;
    cursor: pointer;
}

.auth-submit::before {
    content: "";
}

.auth-submit:hover {
    background: #193b2d;
}

.auth-submit-arrow {
    position: relative;
    inline-size: 14px;
    block-size: 2px;
    border-radius: 2px;
    background: currentColor;
}

.auth-submit-arrow::after {
    position: absolute;
    inset-inline-end: 0;
    top: -3px;
    width: 8px;
    height: 8px;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: rotate(-45deg);
    content: "";
}

.auth-portal :focus-visible {
    outline: 2px solid var(--auth-focus);
    outline-offset: 3px;
}

.auth-password input:focus-visible {
    outline: 0;
}

@media (max-width: 760px) {
    .auth-shell {
        display: block;
    }

    .auth-visual {
        display: none;
        background-image: none;
    }

    .auth-content {
        min-height: 100vh;
        min-height: 100svh;
        padding: 22px clamp(21px, 6vw, 42px);
    }

    .auth-languages summary {
        padding-inline: 8px;
        gap: 7px;
    }

    .auth-card {
        margin-bottom: clamp(20px, 8vh, 70px);
    }

    .auth-card h1 {
        font-size: clamp(1.95rem, 8vw, 2.6rem);
    }

    .auth-form {
        margin-top: 23px;
    }
}

.auth-remember {
    display:inline-flex; align-items:center; gap:10px; align-self:start; cursor:pointer;
    font:500 13px/1.5 Manrope,system-ui,sans-serif; color:var(--auth-muted);
}
.auth-remember input { width:18px; height:18px; margin:0; accent-color:var(--auth-action); cursor:pointer; }
.auth-remember:focus-within { color:var(--auth-action); }
@media (prefers-reduced-motion:no-preference) {
    .auth-submit, .auth-reveal, .auth-languages summary { transition:background-color .18s,color .18s,box-shadow .18s; }
    .auth-field :is(input,.auth-password) { transition:border-color .16s,box-shadow .16s; }
    .auth-submit-arrow { transition:transform .18s; }
    .auth-submit:is(:hover,:focus-visible) .auth-submit-arrow { transform:translateX(3px); }
    .auth-submit:hover { box-shadow:0 4px 15px #254c3d24; }
}
