@import url("brand-background.css");

:root {
    --auth-navy: #0e2a47;
    --auth-blue: #0873ad;
    --auth-ink: #142d40;
    --auth-muted: #667786;
    --auth-border: #cad6df;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--auth-ink);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.auth-page {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    background: var(--upnovator-shell-background);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    min-width: 0;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(2, 24, 43, .22);
}

.auth-card-wide {
    max-width: 660px;
}

.auth-brand {
    margin-bottom: 22px;
    text-align: center;
}

.auth-home-link {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 4px;
}

.auth-brand img {
    display: block;
    width: 100%;
    max-width: 250px;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.auth-heading {
    margin-bottom: 24px;
    text-align: center;
}

.auth-heading h1 {
    margin: 0;
    color: var(--auth-navy);
    font-size: 25px;
    font-weight: 650;
    line-height: 1.3;
}

.auth-heading p {
    margin: 12px 0 0;
    color: var(--auth-muted);
}

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

.field {
    min-width: 0;
}

.field > label {
    display: block;
    margin-bottom: 6px;
    color: #263d50;
    font-size: 13px;
    font-weight: 600;
}

.auth-input {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid var(--auth-border);
    border-radius: 9px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}

.auth-input:focus-within {
    border-color: var(--auth-blue);
    box-shadow: 0 0 0 3px rgba(8, 115, 173, .1);
}

.auth-input input {
    flex: 1;
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 12px 0;
    background: transparent;
    color: var(--auth-ink);
    font: inherit;
    font-size: 16px;
}

.auth-input input::placeholder {
    color: #8a97a2;
    opacity: 1;
}

.auth-input button {
    display: grid;
    flex: 0 0 44px;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-right: -8px;
    border: 0;
    border-radius: 7px;
    padding: 0;
    background: transparent;
    color: #526a7b;
    cursor: pointer;
}

.auth-input button:hover {
    background: #f3f7fa;
}

.eye-slash {
    display: none;
}

[aria-pressed="true"] .eye-slash {
    display: block;
}

.field small {
    display: block;
    margin-top: 5px;
    color: var(--auth-muted);
    font-size: 12px;
}

.options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 16px;
    font-size: 13px;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    cursor: pointer;
}

.remember input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--auth-navy);
}

.options a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.auth-card a {
    color: var(--auth-blue);
    text-decoration: none;
    font-weight: 600;
}

.auth-card a:hover {
    text-decoration: underline;
}

.auth-card .submit {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    width: 100%;
    margin-top: 4px;
    border: 0;
    border-radius: 9px;
    padding: 12px 14px;
    background: var(--auth-navy);
    color: #fff;
    font: inherit;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background .15s;
}

.auth-card .submit:hover {
    background: #145da0;
    text-decoration: none;
}

.auth-links {
    margin: 20px 0 0;
    text-align: center;
    color: var(--auth-muted);
    font-size: 13px;
}

.auth-links a {
    display: inline-block;
    padding: 6px 0;
}

.error,
.notice {
    margin-bottom: 18px;
    border-radius: 9px;
    padding: 12px;
    background: #fff0f2;
    color: #a51d38;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.notice {
    background: #edf6fc;
    color: #073b63;
}

.error ul {
    margin: 0;
    padding-left: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.auth-card footer {
    margin-top: 22px;
    color: var(--auth-muted);
    font-size: 11px;
    text-align: center;
}

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

@media (max-width: 600px) {
    .auth-page {
        padding: 20px 16px;
    }

    .auth-card {
        padding: 26px 22px;
        border-radius: 16px;
    }

    .auth-brand img {
        max-width: 230px;
    }

    .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 360px) {
    .auth-page {
        padding: 16px 12px;
    }

    .auth-card {
        padding: 24px 18px;
    }

    .auth-heading h1 {
        font-size: 23px;
    }
}

.auth-languages {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    margin: -12px -12px 14px 0;
}

.auth-languages a {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid transparent;
    border-radius: 7px;
}

.auth-languages img {
    display: block;
    width: 24px;
    height: 16px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(14, 42, 71, .12);
}

.auth-languages a[aria-current="true"] {
    border-color: #c9dce9;
    background: #edf6fc;
}

.auth-languages a:hover {
    background: #f3f7fa;
}

.auth-portal {
    display: block;
    margin-bottom: 8px;
    color: #667786;
    font-size: 12px;
    font-weight: 600;
}

.auth-heading p {
    font-size: 13px;
    line-height: 1.55;
}

.auth-card .submit {
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .auth-languages a {
        width: 40px;
        height: 40px;
    }

    .auth-languages {
        margin-top: -8px;
        margin-right: -6px;
    }
}

@media (max-width: 360px) {
    .auth-page {
        padding-right: 16px;
        padding-left: 16px;
    }
}
