/*
 * The staff sign-in flow: sign-in, the three second-factor screens and the
 * forced password change.
 * =====================================================================
 *
 * The same split as the participant sign-in on ctl. - brand panel beside the
 * form - so the two doors read as one place, but on a deep navy rather than the
 * portal's bright blue, so nobody mistakes which door they are at.
 *
 * Its own file rather than eml-portal.css: that one is scoped to the portal on
 * purpose and the back office never loads it. Like the pages it serves, this is
 * deliberately small - no theme, nothing these screens do not draw.
 *
 * Light only. The back office has no dark mode, so its front door does not
 * offer one either.
 */

:root {
    --staff-ink: #1f2b38;
    --staff-muted: #6b7a88;
    --staff-faint: #93a1ad;
    --staff-line: #e3e8ee;
    --staff-blue: #0f6fb6;        /* EML's deeper blue: white text at 5.29:1 */
    --staff-blue-dark: #0d5e9b;
}

html, body { height: 100%; }

body.staff-auth {
    margin: 0;
    background: #fff;
    color: var(--staff-ink);
    /* The family and size come from ctl-base.css: Open Sans, like every page. */
    line-height: 1.55;
}

.staff-auth a { color: var(--staff-blue); }
.staff-auth a:hover { color: var(--staff-blue-dark); }

/* The theme-less pages still need a visible focus ring. */
.staff-auth a:focus,
.staff-auth button:focus,
.staff-auth input:focus,
.staff-auth .btn:focus {
    outline: 2px solid var(--staff-blue);
    outline-offset: 2px;
}

.staff-split {
    display: flex;
    min-height: 100vh;
}

/* ------------------------------------------------------------ the panel */

.staff-panel {
    flex: 0 0 42%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 48px 56px;
    color: #fff;
    /* Navy, with a little of EML's blue as light rather than as the ground. */
    background:
        radial-gradient(circle at 88% 8%, rgba(21, 169, 225, .22), transparent 42%),
        radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1.5px) 0 0 / 22px 22px,
        linear-gradient(165deg, #1d3350 0%, #14243a 55%, #0c1726 100%);
}

/* White tiles: every mark here is drawn for a white ground. */
.staff-tile {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    background: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}

.staff-tile--ddi img {
    height: 38px;
    width: auto;
    max-width: 100%;
    display: block;
}

.staff-panel__pitch { margin: auto 0; }

.staff-panel__eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .72);
}

.staff-panel__title {
    margin: 0;
    font-size: 36px;
    font-weight: 600;
    line-height: 1.15;
    color: #fff;
}

.staff-panel__partners {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.staff-panel__label {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, .72);
}

/* The shared partner partial, styled here because eml-portal.css is not loaded. */
.staff-auth .eml-logos {
    display: flex;
    align-items: center;
    gap: 22px;
}

.staff-auth .eml-logos a {
    display: inline-flex;
    line-height: 0;
    border-radius: 4px;
}

.staff-auth .eml-logos img {
    height: 36px;
    width: auto;
}

/* ------------------------------------------------------------ the form side */

.staff-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.staff-main__body {
    width: 100%;
    max-width: 420px;
    margin: auto;
    padding: 56px 24px 32px;
}

/* The MFA screens carry more: a QR code, a secret, two cards. */
.staff-main__body--wide { max-width: 500px; }

.staff-heading {
    margin: 0 0 24px;
    font-size: 28px;
    font-weight: 600;
    color: var(--staff-ink);
}

.staff-auth label { font-weight: 600; font-size: 13.5px; }

.staff-auth .form-group { margin-bottom: 20px; }

.staff-auth .form-control {
    height: 44px;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid #cdd4db;
    border-radius: 8px;
    box-shadow: none;
}

.staff-auth .form-control:focus {
    border-color: var(--staff-blue);
    box-shadow: 0 0 0 3px rgba(15, 111, 182, .18);
}

.staff-auth .btn {
    height: 46px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
}

.staff-auth .btn-primary,
.staff-auth .btn-primary:focus {
    background: var(--staff-blue);
    border-color: var(--staff-blue);
}

.staff-auth .btn-primary:hover,
.staff-auth .btn-primary:active {
    background: var(--staff-blue-dark);
    border-color: var(--staff-blue-dark);
}

.staff-auth .btn-block { width: 100%; }

.staff-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

/* Password field with its show/hide button inside the right-hand end. */
.staff-password { position: relative; }
.staff-password .form-control { padding-right: 48px; }

.staff-password__toggle {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: #6f7881;
    font-size: 16px;
    line-height: 1;
}

.staff-password__toggle:hover { color: var(--staff-blue); }

.staff-caps-warning {
    margin: 8px 0 0;
    padding: 6px 10px;
    border-radius: 6px;
    background: #fff4d6;
    color: #7a5200;
    font-size: 13px;
}

.staff-caps-warning[hidden] { display: none; }

.staff-help {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--staff-muted);
}

.staff-note {
    margin: 18px 0 0;
    font-size: 13px;
    color: var(--staff-muted);
    text-align: center;
}

.staff-note .fa { margin-right: 4px; }

.staff-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid #eef0f2;
    font-size: 12px;
    color: var(--staff-muted);
    text-align: center;
}

.staff-footer__sep { margin: 0 6px; }

/* Shown only once the panel has shrunk to a header; see below. */
.staff-footer__partners { display: none; }

/* ------------------------------------------------- the second-factor screens */

.mfa__card {
    background: #fff;
    border: 1px solid var(--staff-line);
    border-radius: 14px;
    padding: 24px;
}

.mfa__card + .mfa__card { margin-top: 18px; }
.mfa__card h2 { font-size: 17px; font-weight: 600; margin: 0 0 6px; }
.mfa__muted { color: var(--staff-muted); font-size: 13px; }
.mfa__qr { text-align: center; margin: 18px 0; }
.mfa__qr svg { max-width: 190px; height: auto; }

.mfa__secret {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 15px;
    letter-spacing: 1px;
    background: #f3f6f9;
    border-radius: 8px;
    padding: 10px 12px;
    word-break: break-all;
}

.mfa__code {
    font-size: 22px;
    letter-spacing: 6px;
    text-align: center;
    font-family: ui-monospace, Menlo, Consolas, monospace;
}

.mfa__codes { columns: 2; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; }
.mfa__codes li { margin-bottom: 6px; }
.staff-auth details > summary { cursor: pointer; font-weight: 600; font-size: 14px; }

/* ------------------------------------------------------------ narrow screens */

/*
 * Below the two-column width the panel becomes a short header and the form
 * starts straight under it.
 */
@media (max-width: 991px) {
    .staff-split { flex-direction: column; }

    .staff-panel {
        flex: none;
        max-width: none;
        gap: 16px;
        padding: 22px 20px 24px;
    }

    .staff-tile--ddi img { height: 28px; }
    .staff-panel__title { font-size: 24px; }
    .staff-panel__eyebrow { margin-bottom: 6px; }
    .staff-panel__partners { display: none; }

    .staff-main { flex: 1 0 auto; }

    .staff-main__body {
        margin: 0 auto;
        padding: 28px 20px 32px;
    }

    .staff-footer { margin-top: auto; }

    .staff-footer__partners {
        display: block;
        margin-bottom: 14px;
    }

    .staff-footer__partners .eml-logos {
        justify-content: center;
    }

    .staff-footer__partners .eml-logos img { height: 30px; }
    .staff-footer > span:not(.staff-footer__sep) { display: block; }
    .staff-footer__sep { display: none; }
}
