* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --page: #fafafa;
    --panel: #fff;
    --border: #dbdbdb;
    --field: #fafafa;
    --text: #262626;
    --muted: #737373;
    --footer: #8e8e8e;
    --footer-hover: #555;
    --link: #00376b;
    --brand: #0095f6;
    --brand-hover: #1877f2;
    --facebook: #385185;
}

body {
    min-height: 100vh;
    background: var(--page);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

button,
input {
    border: 0;
    font: inherit;
}

button {
    cursor: pointer;
}

.flex {
    display: flex;
}

.direction-column {
    flex-direction: column;
}

.justify-content-center {
    justify-content: center;
}

.align-items-center {
    align-items: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

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

main {
    width: min(100%, 935px);
    min-height: calc(100vh - 138px);
    margin: 0 auto 56px;
    padding: 64px 20px 24px;
    gap: 36px;
}

.panel {
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--border);
}

#mobile {
    flex: 0 1 402px;
    max-width: 402px;
    transform: translate(-18px, -10px);
}

#mobile img {
    display: block;
    width: min(100%, 368px);
    max-height: 568px;
    height: auto;
    object-fit: contain;
}

#auth {
    flex: 0 0 350px;
    width: 100%;
    max-width: 350px;
    transform: translateX(16px);
}

.login {
    min-height: 396px;
    padding: 28px 40px 22px;
}

.login h1 {
    margin: 18px 0 30px;
}

.login h1 img {
    display: block;
    width: 175px;
    height: auto;
}

form {
    width: 100%;
}

form input {
    width: 100%;
    min-height: 38px;
    margin-bottom: 6px;
    padding: 9px 8px 7px;
    background: var(--field);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text);
    font-size: 12px;
}

form input::placeholder {
    color: var(--muted);
}

form input:focus {
    border-color: #a8a8a8;
    box-shadow: 0 0 0 1px rgba(168, 168, 168, 0.2);
    outline: none;
}

form button {
    width: 100%;
    min-height: 32px;
    margin-top: 8px;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    transition: background-color 160ms ease;
}

form button:hover,
form button:focus-visible {
    background: var(--brand-hover);
}

.separator {
    width: 100%;
    margin: 18px 0 26px;
    gap: 18px;
}

.separator span {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.separator .or {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.login-with-fb {
    width: 100%;
    gap: 14px;
}

.login-with-fb div {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.fb-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 2px;
    background: var(--facebook);
    color: #fff;
    flex: 0 0 16px;
    transform: translateY(-1px);
}

.fb-mark svg {
    display: block;
    width: 13px;
    height: 13px;
    fill: currentColor;
}

.login-with-fb div a {
    color: var(--facebook);
    font-weight: 700;
}

.login-with-fb > a {
    color: var(--link);
    font-size: 12px;
}

.register {
    min-height: 63px;
    margin-top: 10px;
    gap: 5px;
    padding: 18px 16px;
}

.register a {
    color: var(--brand);
    font-weight: 700;
}

.app-download {
    padding: 18px 0;
    gap: 14px;
}

.app-download p {
    color: var(--text);
}

.app-download div {
    gap: 8px;
}

.app-download img {
    display: block;
    width: auto;
    height: 40px;
}

footer {
    width: 100%;
    min-height: 132px;
    margin: 0;
    padding: 22px 20px 30px;
    background: var(--page);
    border-top: 1px solid var(--border);
    color: var(--footer);
    font-size: 12px;
    text-align: center;
}

footer ul {
    gap: 8px 18px;
    margin-bottom: 18px;
}

footer a {
    color: var(--footer);
    font-weight: 400;
    transition: color 160ms ease;
}

footer a:hover,
footer a:focus-visible {
    color: var(--footer-hover);
    text-decoration: underline;
}

.footer-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.language-control {
    position: relative;
    display: inline-flex;
    align-items: center;
    max-width: 170px;
    vertical-align: middle;
}

.language-display {
    display: inline-flex;
    align-items: center;
    max-width: 170px;
    gap: 6px;
    color: var(--footer);
}

.language-current {
    min-width: 0;
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.language-arrow {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: translateY(-65%) rotate(45deg);
}

.language-control:focus-within .language-display {
    color: var(--footer-hover);
    text-decoration: underline;
}

.footer-meta select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    color: var(--footer);
    cursor: pointer;
    font: inherit;
    opacity: 0;
    outline: none;
}

.footer-meta select:focus-visible {
    color: var(--footer-hover);
    text-decoration: underline;
}

.footer-meta select option {
    background: #fff;
    color: #000;
}

footer .copyright {
    color: var(--footer);
    text-transform: none;
}

@media screen and (max-width: 875px) {
    main {
        min-height: auto;
        padding-top: 64px;
        padding-bottom: 24px;
        margin-bottom: 56px;
    }

    #mobile {
        display: none;
        transform: none;
    }
}

@media screen and (max-width: 450px) {
    body {
        background: #fff;
    }

    main {
        margin-bottom: 42px;
        padding: 28px 0 20px;
    }

    #auth {
        flex-basis: 100%;
        max-width: none;
        transform: none;
    }

    .panel {
        border-color: transparent;
    }

    .login {
        min-height: auto;
        padding: 34px 40px 22px;
    }

    .register {
        margin-top: 0;
    }

    footer {
        min-height: auto;
        padding: 24px 18px 30px;
        font-size: 12px;
    }

    .footer-meta {
        flex-direction: column;
        gap: 10px;
    }
}
