body {
    background: #dce3e8;
}

.login-shell {
    align-items: center;
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    padding: 7rem clamp(1.5rem, 7.5vw, 8rem) 3rem;
    position: relative;
}

.login-background {
    height: 100%;
    inset: 0;
    object-fit: cover;
    object-position: center;
    position: absolute;
    width: 100%;
}

.login-brand {
    left: clamp(1.5rem, 3.6vw, 3.3rem);
    position: absolute;
    top: clamp(1.4rem, 4.4vh, 2.5rem);
    z-index: 2;
}

.login-brand img {
    display: block;
    height: auto;
    width: clamp(10.5rem, 15vw, 12rem);
}

.login-card {
    -webkit-backdrop-filter: blur(28px) saturate(165%);
    backdrop-filter: blur(28px) saturate(165%);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(245, 249, 255, 0.46));
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 28px;
    box-shadow:
        0 30px 80px rgba(9, 25, 48, 0.28),
        0 8px 24px rgba(9, 25, 48, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(255, 255, 255, 0.28);
    color: #142033;
    justify-self: end;
    max-width: 440px;
    overflow: hidden;
    padding: 1.85rem 2.1rem 1.45rem;
    position: relative;
    transform: translateY(-0.9rem);
    width: 100%;
    z-index: 2;
}

.login-card::before {
    background: linear-gradient(110deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0) 34%);
    content: "";
    height: 1px;
    left: 2rem;
    pointer-events: none;
    position: absolute;
    right: 2rem;
    top: 0;
}

.login-card__header h1 {
    color: #162238;
    font-size: 1rem;
    font-weight: 680;
    margin: 0 0 1.15rem;
    text-align: center;
}

.auth-tabs {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.44);
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0 0.35rem;
}

.auth-tab {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #4f5968;
    display: flex;
    justify-content: center;
    min-height: 52px;
    padding: 0.55rem 0.25rem;
    position: relative;
    transition: background 160ms ease, color 160ms ease;
}

.auth-tab::after {
    background: transparent;
    bottom: 0;
    content: "";
    height: 2px;
    left: 27%;
    position: absolute;
    right: 27%;
}

.auth-tab strong {
    font-size: 0.86rem;
    font-weight: 700;
}

.auth-tab:hover {
    background: rgba(255, 255, 255, 0.16);
}

.auth-tab:focus-visible {
    outline: 2px solid rgba(152, 22, 55, 0.42);
    outline-offset: 1px;
}

.auth-tab.is-active {
    color: var(--phbs-wine);
}

.auth-tab.is-active::after {
    background: var(--phbs-wine);
}

.auth-panel {
    min-height: 92px;
    padding-top: 1.7rem;
}

.auth-panel[hidden] {
    display: none;
}

.auth-panel--iaaa {
    align-content: center;
    display: grid;
}

.auth-primary {
    background: var(--phbs-wine);
    border: 1px solid #7d102e;
    border-radius: 9px;
    box-shadow: 0 6px 16px rgba(86, 12, 34, 0.18);
    color: #fff;
    font-weight: 700;
    min-height: 50px;
    padding: 0.7rem 1rem;
    transition: background 150ms ease, border-color 150ms ease;
    width: 100%;
}

.auth-primary:hover {
    background: #7f102f;
    border-color: #6f0e29;
}

.auth-primary:focus-visible {
    outline: 3px solid rgba(152, 22, 55, 0.24);
    outline-offset: 2px;
}

.platform-form {
    display: grid;
    gap: 0.45rem;
}

.platform-form label {
    color: #273449;
    font-size: 0.78rem;
    font-weight: 650;
}

.platform-form input {
    background: rgba(255, 255, 255, 0.54);
    border: 1px solid rgba(45, 58, 78, 0.16);
    border-radius: 9px;
    color: #566174;
    min-height: 46px;
    padding: 0.65rem 0.8rem;
    width: 100%;
}

.platform-form__label-row {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-top: 0.35rem;
}

.platform-form__label-row button {
    background: transparent;
    border: 0;
    color: var(--phbs-wine);
    font-size: 0.72rem;
    padding: 0;
}

.platform-form .auth-primary {
    margin-top: 0.65rem;
}

.login-card .action-message {
    background: rgba(255, 255, 255, 0.46);
    margin: 0.85rem 0 0;
}

.password-reset-dialog {
    -webkit-backdrop-filter: blur(26px) saturate(150%);
    backdrop-filter: blur(26px) saturate(150%);
    background: rgba(250, 252, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.88);
    border-radius: 20px;
    box-shadow: 0 28px 70px rgba(9, 25, 48, 0.32);
    color: #142033;
    max-width: 390px;
    padding: 1.3rem;
    width: calc(100% - 2rem);
}

.password-reset-dialog::backdrop {
    background: rgba(7, 15, 28, 0.42);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.password-reset-dialog__header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.password-reset-dialog__header h2 {
    font-size: 1rem;
    margin: 0;
}

.password-reset-methods {
    background: rgba(118, 128, 145, 0.1);
    border-radius: 10px;
    display: grid;
    gap: 3px;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.45fr);
    margin-bottom: 1rem;
    padding: 3px;
}

.password-reset-methods[hidden] {
    display: none;
}

.password-reset-methods button {
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #596579;
    font-size: 0.75rem;
    min-height: 36px;
    padding: 0.4rem 0.55rem;
}

.password-reset-methods button.is-active {
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 1px 5px rgba(20, 32, 51, 0.1);
    color: var(--phbs-wine);
    font-weight: 650;
}

.password-reset-form {
    display: grid;
    gap: 0.5rem;
}

.password-reset-form[hidden] {
    display: none;
}

.password-reset-dialog__close {
    background: transparent;
    border: 0;
    color: #596579;
    font-size: 1.4rem;
    line-height: 1;
    padding: 0.15rem 0.3rem;
}

.password-reset-form label {
    color: #273449;
    font-size: 0.78rem;
    font-weight: 650;
}

.password-reset-form input {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(45, 58, 78, 0.16);
    border-radius: 9px;
    min-height: 46px;
    padding: 0.65rem 0.8rem;
    width: 100%;
}

.password-reset-form .auth-primary {
    margin-top: 0.6rem;
}

.password-reset-helpdesk {
    color: #273449;
    font-size: 0.82rem;
    line-height: 1.65;
}

.password-reset-helpdesk[hidden] {
    display: none;
}

.password-reset-helpdesk p {
    margin: 0 0 0.7rem;
}

.password-reset-helpdesk a {
    color: var(--phbs-wine);
    font-weight: 650;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .login-card {
        background: rgba(250, 252, 255, 0.95);
    }
}

@media (max-width: 700px) {
    .login-shell {
        align-items: center;
        min-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 7rem 0.75rem 1.5rem;
    }

    .login-background {
        position: fixed;
    }

    .login-brand {
        left: 1.25rem;
        top: 1.35rem;
    }

    .login-brand img {
        width: 10.6rem;
    }

    .login-card {
        border-radius: 24px;
        justify-self: stretch;
        max-width: none;
        padding: 1.55rem 1.3rem 1.25rem;
        transform: none;
    }

    .auth-tab strong {
        font-size: 0.8rem;
    }

}

@media (max-height: 700px) and (min-width: 701px) {
    .login-shell {
        align-items: start;
        overflow-y: auto;
        padding-bottom: 2rem;
        padding-top: 6.5rem;
    }

    .login-card {
        transform: none;
    }
}
