.login-layout {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--u-surface);
    color: var(--u-ink);
    font-family: "Public Sans", system-ui, sans-serif;
}

.login-feature {
    display: none;
}

.login-panel {
    display: grid;
    min-width: 0;
    align-items: center;
    justify-items: center;
    padding: clamp(24px, 6vw, 76px);
}

.login-panel-inner {
    width: min(100%, 420px);
}

.login-brand {
    display: inline-flex;
    align-items: center;
    margin-bottom: clamp(22px, 4vh, 36px);
}

.login-brand img {
    width: 126px;
    height: auto;
}

.dark-style .login-brand {
    padding: 6px 12px;
    border-radius: 12px;
    background: #fff;
}

.login-welcome {
    margin-bottom: 28px;
}

.login-welcome h1 {
    margin: 0 0 8px;
    color: var(--u-ink);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -.055em;
}

.login-welcome p {
    margin: 0;
    color: var(--u-ink-3);
    line-height: 1.6;
}

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

.login-account-choice,
.login-field {
    min-width: 0;
    margin: 0;
}

.login-account-choice legend,
.login-field label {
    display: block;
    margin: 0 0 9px;
    color: var(--u-ink);
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.45;
}

.login-account-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.login-account-item {
    position: relative;
}

.login-account-radio {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
}

.login-account-option {
    display: flex;
    min-height: 69px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 5px;
    border: 1px solid var(--u-line);
    border-radius: 13px;
    background: var(--u-surface);
    color: var(--u-ink-2);
    cursor: pointer;
    font-size: .8125rem;
    font-weight: 600;
    text-align: center;
}

.login-account-option i {
    font-size: 1.25rem;
}

.login-account-option:hover {
    border-color: var(--u-brand);
}

.login-account-radio:checked + .login-account-option {
    border-color: var(--u-brand);
    background: var(--u-brand-soft);
    color: var(--u-brand-strong);
    box-shadow: inset 0 0 0 1px var(--u-brand);
}

.login-account-radio:focus-visible + .login-account-option,
.login-field-heading a:focus-visible,
.login-password-toggle:focus-visible,
.login-submit:focus-visible {
    outline: 2px solid var(--u-brand);
    outline-offset: 3px;
}

.login-field-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    column-gap: 12px;
}

.login-field-heading a {
    margin-bottom: 9px;
    color: var(--u-brand-strong);
    font-size: .8125rem;
    font-weight: 700;
}

.login-field-heading a:hover {
    color: var(--u-brand-strong);
    text-decoration: underline;
}

.login-control {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 50px;
    border: 1px solid var(--u-line);
    border-radius: 12px;
    background: var(--u-surface-2);
}

.login-control:focus-within {
    border-color: var(--u-brand);
    box-shadow: 0 0 0 3px var(--u-brand-ring);
}

.login-control:has([aria-invalid="true"]) {
    border-color: var(--u-danger);
}

.login-control-icon,
.login-control-end {
    position: absolute;
    pointer-events: none;
    color: var(--u-ink-3);
    font-size: 1.2rem;
}

.login-control-icon {
    inset-inline-start: 14px;
}

.login-control-end {
    inset-inline-end: 13px;
}

.login-control input,
.login-control select {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0 13px 0 43px;
    border: 0;
    border-radius: inherit;
    outline: 0;
    background: transparent;
    color: var(--u-ink);
    font: inherit;
    font-size: 1rem;
}

.login-control input::placeholder,
.login-control select:invalid {
    color: var(--u-ink-3);
    opacity: 1;
}

.login-control select {
    appearance: none;
    padding-inline-end: 38px;
    cursor: pointer;
    text-overflow: ellipsis;
}

.login-control select option {
    background: var(--u-surface);
    color: var(--u-ink);
}

.login-password-toggle {
    display: grid;
    flex: 0 0 42px;
    min-height: 42px;
    margin-inline-end: 3px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--u-ink-3);
    font-size: 1.2rem;
}

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

.login-password-toggle:hover {
    background: var(--u-brand-soft);
    color: var(--u-brand-strong);
}

.login-submit {
    display: flex;
    min-height: 51px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 3px;
    padding: 12px 18px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(115deg, #5748cd, #4733ad);
    box-shadow: 0 7px 16px rgb(72 56 187 / 22%);
    color: #fff;
    font-weight: 700;
}

.login-submit:hover {
    background: #4330a6;
}

.login-submit i {
    font-size: 1.25rem;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 18px;
    padding: 12px;
    border: 1px solid var(--u-danger);
    border-radius: 12px;
    background: var(--u-danger-soft);
    color: var(--u-ink);
    font-size: .875rem;
}

.login-alert i {
    color: var(--u-danger);
    font-size: 1.2rem;
}

.login-field-error {
    margin: 6px 0 0;
    color: var(--u-danger);
    font-size: .8125rem;
}

@media (min-width: 840px) {
    .login-layout {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    }

    .login-feature {
        display: flex;
        min-width: 0;
        align-items: flex-end;
        margin: 16px;
        padding: clamp(30px, 4vw, 66px);
        border-radius: 24px;
        background-color: #221a40;
        background-image: linear-gradient(180deg, rgb(23 16 42 / 0%) 18%, rgb(23 16 42 / 32%) 52%, rgb(23 16 42 / 96%) 100%), url("../img/login-campus.webp");
        background-position: center;
        background-size: cover;
        color: #fff;
    }

    .login-feature-copy {
        width: min(100%, 490px);
    }

    .login-feature-name {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin: 0 0 22px;
        padding: 7px 12px;
        border: 1px solid rgb(255 255 255 / 35%);
        border-radius: 999px;
        background: rgb(26 19 46 / 58%);
        font-size: .875rem;
        font-weight: 700;
    }

    .login-feature-name i {
        color: #d8d0ff;
        font-size: 1.125rem;
    }

    .login-feature-copy h2 {
        margin: 0 0 14px;
        color: inherit;
        font-size: clamp(2.45rem, 4.8vw, 4.5rem);
        font-weight: 700;
        line-height: 1.02;
        letter-spacing: -.055em;
        text-wrap: balance;
    }

    .login-feature-copy p:last-child {
        max-width: 33ch;
        margin: 0;
        color: #ece9f6;
        font-size: 1rem;
        line-height: 1.6;
    }
}

@media (max-width: 839px) {
    .login-layout {
        background: radial-gradient(ellipse at top, var(--u-brand-soft), transparent 400px), var(--u-surface);
    }
}

@media (max-width: 839px) and (max-height: 620px) {
    .login-panel {
        padding-block: 18px;
    }

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

    .login-brand img {
        width: 112px;
    }

    .login-welcome {
        margin-bottom: 18px;
    }

    .login-form {
        gap: 13px;
    }

    .login-account-option {
        min-height: 59px;
    }
}

@media (forced-colors: active) {
    .login-account-radio:checked + .login-account-option {
        outline: 2px solid Highlight;
        outline-offset: -2px;
    }

    .login-control:focus-within,
    .login-submit {
        border: 1px solid ButtonText;
    }
}
