/*
 * The central site's login and "forgot password" popups. Loaded on every
 * central page, so the colours carry their own fallbacks rather than rely
 * on homepage.css.
 */
.bi-auth-dialog {
    max-width: 440px;
    padding-inline: 12px;
}

.bi-auth {
    position: relative;
    padding: 34px 32px 24px;
    color: var(--bi-ink, #071c55);
    border: 0;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(7, 31, 80, 0.28);
    font-family: "Corbel", "Trebuchet MS", Arial, sans-serif;
}

.bi-auth-close {
    position: absolute;
    top: 16px;
    right: 16px;
}

.bi-auth-head {
    margin-bottom: 20px;
    text-align: center;
}

.bi-auth-mark {
    display: inline-grid;
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
    place-items: center;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--bi-navy, #082d62), var(--bi-plum, #4a174f));
    font-size: 24px;
}

.bi-auth-title {
    margin: 0 0 6px;
    color: var(--bi-deep-navy, #071f50);
    font-size: 28px;
    font-weight: 700;
}

.bi-auth-lead {
    margin: 0 auto;
    max-width: 330px;
    color: var(--bi-muted, #687b9c);
    font-size: 16px;
}

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

.bi-auth-field label,
.bi-auth-label-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.bi-auth-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.bi-auth-label-row a {
    color: var(--bi-blue, #0866c6);
    font-size: 14px;
    text-decoration: none;
}

.bi-auth-label-row a:hover {
    text-decoration: underline;
}

.bi-auth .form-control {
    min-height: 46px;
    padding-inline: 14px;
    border: 1px solid var(--bi-border, #b8d6f1);
    border-radius: 8px;
    font-size: 16px;
}

.bi-auth .form-control:focus {
    border-color: var(--bi-blue, #0866c6);
    box-shadow: 0 0 0 3px rgba(8, 102, 198, 0.15);
}

.bi-auth-password {
    position: relative;
}

.bi-auth-password .form-control {
    padding-right: 46px;
}

.bi-auth-reveal {
    position: absolute;
    top: 50%;
    right: 6px;
    width: 36px;
    height: 36px;
    padding: 0;
    color: var(--bi-muted, #687b9c);
    border: 0;
    border-radius: 6px;
    background: none;
    transform: translateY(-50%);
}

.bi-auth-reveal:hover {
    color: var(--bi-navy, #082d62);
}

.bi-auth .invalid-feedback {
    display: none;
    margin-top: 5px;
    font-size: 14px;
}

.bi-auth-alert {
    display: none;
    padding: 10px 12px;
    color: #8a1c1c;
    border-radius: 8px;
    background: #fdecec;
    font-size: 15px;
}

.bi-auth-alert.is-success {
    color: #135b2e;
    background: #e5f6ea;
}

.bi-auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: -4px;
    cursor: pointer;
}

.bi-auth-remember .form-check-input {
    margin: 0;
}

.bi-auth-submit {
    min-height: 48px;
    color: #fff;
    border: 0;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--bi-navy, #082d62), #1f5aa8);
    box-shadow: 0 7px 18px rgba(5, 48, 97, 0.18);
    font-size: 17px;
    font-weight: 700;
    transition: box-shadow 0.15s, transform 0.15s;
}

.bi-auth-submit:hover,
.bi-auth-submit:focus {
    box-shadow: 0 9px 24px rgba(5, 48, 97, 0.26);
    transform: translateY(-1px);
}

.bi-auth-submit:disabled {
    opacity: 0.7;
    transform: none;
}

.bi-auth-switch {
    margin: 20px -32px -24px;
    padding: 16px 20px;
    border-top: 1px solid #e3eef9;
    border-radius: 0 0 14px 14px;
    background: #f3f9ff;
    text-align: center;
}

.bi-auth-switch a {
    color: var(--bi-blue, #0866c6);
    font-weight: 700;
    text-decoration: none;
}

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

.bi-auth-dot {
    margin-inline: 6px;
    color: var(--bi-muted, #687b9c);
}

@media (max-width: 480px) {
    .bi-auth {
        padding: 28px 20px 20px;
    }

    .bi-auth-switch {
        margin: 18px -20px -20px;
    }
}

/* the bar shown while a super admin is logged in as a user (loaded on every central page) */
.bi-impersonating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 16px;
    padding: 8px 16px;
    color: #3d2400;
    background: #ffd166;
    font-family: "Corbel", "Trebuchet MS", Arial, sans-serif;
    font-size: 15px;
}

.bi-impersonating form {
    margin: 0;
}

.bi-impersonating button {
    padding: 3px 12px;
    color: #fff;
    border: 0;
    border-radius: 5px;
    background: #3d2400;
    font-weight: 700;
}

/* the same card as a page of its own: choosing a new password, confirming an email */
.bi-auth-page {
    display: grid;
    min-height: 70vh;
    padding: 48px 16px;
    place-items: center;
    background: linear-gradient(135deg, #edf8ff, #f7f2fb);
}

.bi-auth-page .bi-auth {
    width: 100%;
    max-width: 440px;
    background: #fff;
}
