@font-face {
    font-family: "Instrument Sans";
    src: url("login-instrument-sans.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
}

:root {
    --ink: #29354b;
    --border: #ecebe9;
    --teal: #1a91b1;
    --primary: #12677e;
    font-family: "Instrument Sans", system-ui, sans-serif;
    color: var(--ink);
    background: #f0f5f7;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

::selection {
    color: var(--ink);
    background: #a0c8c3;
}

.login-screen {
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 16px;
}

.login-card {
    width: min(100%, 896px);
    display: grid;
    align-items: center;
    gap: 32px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 40px -8px rgb(26 145 177 / 12%), 0 6px 18px -3px rgb(41 53 75 / 6%);
}

.login-visual {
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    background: #ccc;
}

.login-content {
    min-width: 0;
    padding: 8px;
}

.login-logo {
    display: block;
    width: auto;
    height: 40px;
    margin: 0 auto 24px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    clip-path: inset(50%);
}

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

.login-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.login-field input {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: inherit;
    background: #fff;
    font: inherit;
    font-size: 15px;
    line-height: 24px;
}

.login-field input::placeholder {
    color: #64748b;
}

.login-field input:focus {
    outline: 2px solid var(--teal);
    outline-offset: -1px;
}

.login-form-error .login-field input {
    border-color: #d9383a;
    background: #fdf2f2;
}

.login-password {
    position: relative;
}

.login-password input {
    padding-right: 46px;
}

.login-password-toggle {
    position: absolute;
    inset: 0 0 0 auto;
    width: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: #64748b;
    background: transparent;
    cursor: pointer;
}

.login-password-toggle[hidden],
.login-password-slash {
    display: none;
}

.login-password-toggle:hover,
.login-password-toggle.is-visible {
    color: var(--ink);
}

.login-password-toggle.is-visible .login-password-slash {
    display: initial;
}

.login-remember {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
    color: #475569;
    font-size: 12px;
    line-height: 16px;
    cursor: pointer;
}

.login-remember input {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--teal);
    cursor: pointer;
}

.login-submit {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--primary);
    box-shadow: 0 1px 2px rgb(0 0 0 / 5%);
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 22px;
    cursor: pointer;
}

.login-submit:hover {
    background: #0e5264;
}

.login-submit:focus-visible,
.login-password-toggle:focus-visible,
.login-remember input:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

.login-help {
    margin: 24px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: #64748b;
    text-align: center;
    font-size: 12px;
    line-height: 19.5px;
}

.login-help strong {
    color: var(--ink);
    font-weight: 500;
}

.login-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 14px;
    border: 1px solid #f8b4b4;
    border-radius: 8px;
    color: #9b1c1c;
    background: #fdf2f2;
    font-size: 14px;
    line-height: 20px;
    overflow-wrap: anywhere;
}

.login-error:focus {
    outline: 2px solid #d9383a;
    outline-offset: 2px;
}

.login-error svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #d9383a;
}

.login-error strong {
    font-weight: 600;
}

.login-error p {
    margin: 0;
    font-size: 12px;
    line-height: 16px;
}

@media (min-width: 640px) {
    .login-screen {
        padding: 24px;
    }

    .login-card {
        padding: 32px;
    }

    .login-content {
        padding-inline: 16px;
    }
}

@media (min-width: 768px) {
    .login-card {
        grid-template-columns: 50% minmax(0, 1fr);
    }

    .login-visual {
        aspect-ratio: 1;
    }
}
