/* Password dialog in the site's own style: cream surface, navy text, sky-blue focus. */
dialog.mf-password-dialog{border:0;padding:0;border-radius:20px;width:min(calc(100vw - 32px),380px);background:#FCF9F2;color:#0B2E59;box-shadow:0 20px 60px rgba(11,46,89,.25)}
dialog.mf-password-dialog::backdrop{background:rgba(11,46,89,.45)}
.mf-password-form{position:relative;display:grid;gap:14px;padding:48px 24px 24px;text-align:start}
.mf-password-form h2{margin:0;font:800 19px/1.3 "Cairo",sans-serif;color:#0B2E59}
.mf-password-note{margin:0;color:#516075;font:500 13px/1.7 "Cairo",sans-serif}
.mf-password-form label{display:grid;gap:6px}
.mf-password-label{font:700 13px/1.4 "Cairo",sans-serif;color:#0B2E59}
.mf-password-form input{width:100%;border:1px solid #cbd5e1;background:#fff;padding:12px;border-radius:10px;font:500 16px "Cairo",sans-serif;color:#0B2E59}
.mf-password-form input:focus{outline:2px solid #378AE6;outline-offset:2px}
.mf-password-error{margin:0;color:#b91c1c;font:500 13px/1.6 "Cairo",sans-serif;min-height:1em}
.mf-password-actions{display:flex;gap:10px;justify-content:flex-start;flex-wrap:wrap}
.mf-password-form .mf-password-save{background:#0B2E59;color:#fff;border:0;padding:12px 18px;border-radius:10px;font:800 14px "Cairo",sans-serif;cursor:pointer}
.mf-password-form .mf-password-save:disabled{opacity:.6;cursor:wait}
.mf-password-secondary{padding:12px 18px;border-radius:10px;border:1px solid #cbd5e1;background:#fff;color:#0B2E59;font:800 14px "Cairo",sans-serif;cursor:pointer}
.mf-password-close{position:absolute;top:12px;left:12px;width:34px;height:34px;border-radius:50%;border:1px solid #cbd5e1;background:#fff;color:#0B2E59;font:500 20px/1 "Cairo",sans-serif;cursor:pointer}
.mf-password-close:focus-visible,.mf-password-secondary:focus-visible,.mf-password-save:focus-visible{outline:3px solid #378AE6;outline-offset:3px}
html[data-theme=dark] dialog.mf-password-dialog{background:#162334;color:#e6edf7}
html[data-theme=dark] .mf-password-form h2,html[data-theme=dark] .mf-password-label{color:#e6edf7}
html[data-theme=dark] .mf-password-note{color:#b2c1d4}
html[data-theme=dark] .mf-password-form input{background:#1d3045;border-color:#33465d;color:#e6edf7}
html[data-theme=dark] .mf-password-secondary,html[data-theme=dark] .mf-password-close{background:#1d3045;border-color:#33465d;color:#e6edf7}

/* Forgot-password link under the login form. */
.mf-forgot-link{justify-self:start;margin-top:6px;padding:0;border:0;background:none;color:#0B2E59;font:700 13px "Cairo",sans-serif;text-decoration:underline;cursor:pointer}
.mf-forgot-link:focus-visible{outline:3px solid #378AE6;outline-offset:3px;border-radius:6px}
html[data-theme=dark] .mf-forgot-link{color:#b5d4f4}

/* Admin: temporary code block in the student details. */
.mf-admin-password{margin-top:12px;padding:12px;border-radius:12px;background:#f8fbff;border:1px solid #e2ebf5;display:grid;gap:8px;color:#0B2E59;font:600 13px/1.7 "Cairo",sans-serif}
.mf-admin-password p{margin:0}
.mf-admin-password-result{word-break:break-word}

/* Sign-in box: show/hide button for the code or password. */
.mf-eye-wrap{position:relative;display:block;width:100%}
.mf-eye-wrap input{padding-inline-end:46px}
/* Arabic: the eye sits on the left, against the writing direction. English: on the right. */
html[dir=rtl] .mf-eye-wrap input{padding-left:46px;padding-right:12px}
html[dir=ltr] .mf-eye-wrap input{padding-right:46px;padding-left:12px}
html[dir=rtl] .mf-eye{left:8px;right:auto}
html[dir=ltr] .mf-eye{right:8px;left:auto}
.mf-eye{position:absolute;top:50%;transform:translateY(-50%);width:34px;height:34px;border:0;border-radius:50%;background:none;color:#0B2E59;display:grid;place-items:center;cursor:pointer}
.mf-eye:hover{background:#e8f2fd}
.mf-eye:focus-visible{outline:3px solid #378AE6;outline-offset:2px}
html[data-theme=dark] .mf-eye{color:#e6edf7}
html[data-theme=dark] .mf-eye:hover{background:#1d3045}
/* Show/hide state: the eye is highlighted while the password is visible. */
.mf-eye.is-on{background:#e8f2fd;color:#378AE6}
.mf-eye .mf-eye-slash{display:none}
.mf-eye:not(.is-on) .mf-eye-slash{display:inline}
.mf-eye{transition:background .15s,color .15s}
html[data-theme=dark] .mf-eye.is-on{background:#1d3045;color:#6aa8f0}
.mf-reset-email{color:#378AE6;font-weight:800;overflow-wrap:anywhere}
html[data-theme=dark] .mf-reset-email{color:#9CC3EE}
