/* Two-step sign-in (MfaChallengeStep, MfaEnrolFlow, the member site's sign-in and security panel). Shared by the admin and
   member sites; buttons keep the site's own .btn-primary (the programme's colours on the member site). */

/* The sign-in's second step: a centred card under the logo, the same width as the sign-in form. */
.mfa-shell { max-width: 440px; margin: 8px auto 24px; padding: 28px 28px 22px; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, .08); text-align: left; color: #1f2937; }
.mfa-shell .mfa-title { font-size: 1.3rem; font-weight: 700; margin: 0 0 6px; text-align: center; }
.mfa-shell .mfa-subtitle { text-align: center; color: #6b7280; font-size: .95rem; margin: 0 0 18px; }

/* The method being used, as a round badge. */
.mfa-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: #f3f4f6; color: #374151; font-size: 24px; }
.mfa-lead { text-align: center; font-size: 1rem; line-height: 1.5; margin-bottom: 14px; }
.mfa-sent { text-align: center; font-size: .85rem; color: #6b7280; margin-top: -6px; margin-bottom: 14px; }

/* The code box: large, spaced digits. */
.mfa-code-input { font-size: 1.4rem; letter-spacing: .3em; text-align: center; height: 52px; font-variant-numeric: tabular-nums; }
.mfa-code-input::placeholder { letter-spacing: normal; font-size: 1rem; }
.mfa-challenge .btn-block, .mfa-enrol .mfa-actions .btn { min-height: 44px; font-weight: 600; }
.mfa-challenge .custom-control { margin: 4px 0 14px; }

/* Other ways in: readable rows with their icons, not small links. */
.mfa-alternatives { margin-top: 18px; padding-top: 14px; border-top: 1px solid #eef0f3; }
.mfa-alt-title { font-size: .8rem; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.mfa-alt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; margin-bottom: 6px; background: #fff; border: 1px solid #e5e7eb;
    border-radius: 10px; color: #1f2937; font-size: .95rem; text-align: left; cursor: pointer; }
.mfa-alt:hover, .mfa-alt:focus { border-color: #9ca3af; background: #f9fafb; outline: none; }
.mfa-alt i { width: 20px; text-align: center; color: #6b7280; }
.mfa-alt .mfa-alt-target { margin-left: auto; color: #6b7280; font-size: .85rem; }
.mfa-back { display: block; margin: 12px auto 0; padding: 4px 8px; background: none; border: 0; color: #6b7280; font-size: .9rem; text-decoration: underline; cursor: pointer; }
.mfa-back:hover { color: #111827; }

/* Choosing a method to set up: cards with an icon, the name, a short line, and a strength tag. */
.mfa-method-list { display: grid; gap: 10px; margin-bottom: 8px; }
.mfa-method { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 14px 16px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    color: #1f2937; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.mfa-method:hover:not(:disabled), .mfa-method:focus { border-color: #9ca3af; box-shadow: 0 4px 14px rgba(17, 24, 39, .08); outline: none; }
.mfa-method:disabled { opacity: .6; cursor: default; }
.mfa-method .mfa-method-icon { flex: 0 0 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #f3f4f6; color: #374151; font-size: 18px; }
.mfa-method .mfa-method-name { font-weight: 700; display: block; }
.mfa-method .mfa-method-desc { display: block; color: #6b7280; font-size: .875rem; margin-top: 2px; line-height: 1.4; }
.mfa-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: .7rem; font-weight: 700; vertical-align: middle; background: #f3f4f6; color: #4b5563; }
.mfa-tag.strong { background: #dcfce7; color: #166534; }
.mfa-qr { width: 200px; max-width: 100%; margin: 0 auto 14px; padding: 8px; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; }
.mfa-qr svg { display: block; width: 100%; height: auto; }
.mfa-key { word-break: break-all; }
.mfa-enrol .mfa-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }

/* Recovery codes: a grid of codes that are easy to read and copy. */
.mfa-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0 16px; }
.mfa-codes code { display: block; padding: 8px 10px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; color: #111827; font-size: .95rem; text-align: center; letter-spacing: .04em; }

/* The member's security panel on their profile. */
.mfa-panel { max-width: 640px; }
.mfa-panel .mfa-section { padding: 18px 20px; margin-bottom: 16px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; color: #1f2937; }
.mfa-panel .mfa-section h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 4px; }
.mfa-panel .mfa-section > p.mfa-help { color: #6b7280; font-size: .9rem; margin-bottom: 12px; }
.mfa-panel .mfa-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #f1f2f4; }
.mfa-panel .mfa-row:first-of-type { border-top: 0; }
.mfa-panel .mfa-row .mfa-method-icon { flex: 0 0 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #f3f4f6; color: #374151; }
.mfa-panel .mfa-row .mfa-row-main { flex: 1; min-width: 0; }
.mfa-panel .mfa-row .mfa-row-main small { display: block; color: #6b7280; overflow: hidden; text-overflow: ellipsis; }
.mfa-panel .mfa-row .btn-link { padding: 2px 6px; font-size: .875rem; }
.mfa-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.mfa-status.on { background: #dcfce7; color: #166534; }
.mfa-status.off { background: #f3f4f6; color: #4b5563; }

@media (max-width: 480px) {
    .mfa-shell { padding: 22px 18px 18px; border-radius: 12px; }
    .mfa-codes { grid-template-columns: 1fr; }
}
