/* Staff login — Solution A: full-bleed photo + glass panel, no scroll */

html:has(.staff-login),
body:has(.staff-login) {
    height: 100%;
    overflow: hidden;
    margin: 0;
}

.staff-login-host {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}

.staff-login {
    --staff-navy: #002d56;
    --staff-navy-deep: #012d56;
    --staff-blue: #2e6da4;
    --staff-border: #d0d7de;
    --staff-text: #1f2933;
    --staff-muted: #7a7369;
    --staff-error: #b42318;
    --staff-white: #ffffff;

    position: relative;
    isolation: isolate;
    box-sizing: border-box;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    color: var(--staff-text);
    font-family: var(--font);
    background-color: var(--staff-navy-deep);
}

.staff-login__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    user-select: none;
}

.staff-login__veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(
            120deg,
            rgba(1, 45, 86, 0.62) 0%,
            rgba(1, 45, 86, 0.42) 45%,
            rgba(1, 45, 86, 0.55) 100%
        );
}

.staff-login__panel {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 400px;
    max-height: calc(100dvh - 48px);
    overflow: auto;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--cmit-surface-radius);
    padding: 28px 26px 24px;
    box-shadow:
        0 20px 56px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px) saturate(1.1);
    -webkit-backdrop-filter: blur(16px) saturate(1.1);
}

.staff-login__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    text-align: center;
}

.staff-login__logo {
    height: 44px;
    width: auto;
}

.staff-login__title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--staff-navy-deep);
}

.staff-login__form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.staff-login__form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--staff-navy-deep);
}

.staff-login__form input[type="text"],
.staff-login__form input[type="email"],
.staff-login__form input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--staff-border);
    border-radius: var(--cmit-control-radius);
    padding: 10px 12px;
    font-size: 14px;
    color: var(--staff-text);
    background: rgba(249, 251, 253, 0.95);
}

.staff-login__form input:focus {
    outline: none;
    border-color: var(--staff-blue);
    box-shadow: none;
}

.staff-login__form .password-strength {
    margin-top: 8px;
}

.staff-login__form .password-strength__hint {
    margin: 0;
    font-size: 12px;
    color: var(--staff-muted);
}

.staff-login__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: var(--staff-muted);
}

.staff-login__remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
}

.staff-login__remember input {
    margin: 0;
}

.staff-login__link {
    color: var(--staff-blue);
    text-decoration: none;
    font-weight: 600;
}

.staff-login__link:hover {
    text-decoration: underline;
}

.staff-login__success {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: var(--cmit-surface-radius);
    background: rgba(236, 253, 243, 0.95);
    border: 1px solid #a7f3d0;
    color: #067647;
    font-size: 13px;
}

.staff-login__error {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: var(--cmit-surface-radius);
    background: rgba(254, 243, 242, 0.95);
    border: 1px solid #fecdca;
    color: var(--staff-error);
    font-size: 13px;
}

.staff-login__submit {
    margin-top: 4px;
    width: 100%;
    border: none;
    border-radius: var(--cmit-control-radius);
    padding: 11px 16px;
    font-size: var(--cmit-button-font-size);
    font-weight: 700;
    color: var(--staff-white);
    background: var(--staff-blue);
    cursor: pointer;
}

.staff-login__submit:hover:not(:disabled) {
    background: #255a88;
}

.staff-login__submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.staff-login__recaptcha {
    display: flex;
    flex-direction: column;
    align-items: start;
    min-height: 78px;
}

.recaptcha-expired-msg {
    margin: 8px 0 0;
    width: 100%;
    font-size: 13px;
    line-height: 1.4;
    color: var(--cmit-error);
    text-align: start;
}

.staff-login__hint {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--staff-muted);
    text-align: center;
}

a.staff-login__sso {
    display: block;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
}

@supports not (height: 100dvh) {
    .staff-login-host,
    .staff-login {
        height: 100vh;
        max-height: 100vh;
    }

    .staff-login__panel {
        max-height: calc(100vh - 48px);
    }
}
