/* Scoped fixes for lessons/settings navigation and account details. */
html[dir=ltr] #curriculumSubView > .mf-curriculum-return,
html[dir=ltr] #settingsSubView > .mf-settings-return {
  direction: ltr;
  justify-content: flex-start;
}

html[data-theme=dark] #mfSubscriberDialog > .mf-dialog-close {
  color: #f8fafc !important;
  background: #274d79 !important;
  border: 1px solid #8eb9e8;
  border-radius: 8px;
  min-height: 44px;
  min-width: 64px;
  padding: 8px 14px;
  opacity: 1 !important;
}
html[data-theme=dark] #mfSubscriberDialog > .mf-dialog-close:hover {
  background: #356394 !important;
}
html[data-theme=dark] #mfSubscriberDialog > .mf-dialog-close:focus-visible {
  outline: 3px solid #7dd3fc;
  outline-offset: 3px;
}

html[dir=ltr] #mfStudentDrawer[open] {
  animation-name: mf-drawer-enter-ltr;
}
@keyframes mf-drawer-enter-ltr {
  from { transform: translateX(-100%); opacity: .5; }
  to { transform: translateX(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html[dir=ltr] #mfStudentDrawer[open] { animation: none; }
}

/* Titles follow the selected interface language; Arabic stays unchanged. */
html[dir=ltr] #curriculumSubView .mf-curriculum-toolbar,
html[dir=ltr] #curriculumSubView .mf-curriculum-toolbar h2,
html[dir=ltr] #settingsSubView > .mf-settings-panel > div:first-child {
  direction:ltr;
  text-align:left;
}
#adminDynamicGrid[data-workspace=stats],#mfReviewStatsPanel[hidden]{display:none!important}
.mf-review-stats{background:var(--mf-panel,#fff);color:var(--mf-ink,#12304e);border:1px solid var(--mf-border,#d9e5ef);border-radius:16px;padding:20px;min-width:0}
.mf-review-stats-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.mf-review-stats h2{font-size:22px;font-weight:800;margin:0 0 6px}
.mf-review-stats p{font-size:13px;line-height:1.8}
.mf-review-stats-scroll{overflow:auto;width:100%;margin-top:16px}
.mf-review-stats table{width:100%;min-width:540px;border-collapse:collapse}
.mf-review-stats th,.mf-review-stats td{text-align:start;padding:14px 12px;border-bottom:1px solid var(--mf-border,#d9e5ef);font-size:14px}
.mf-review-stats th{background:var(--mf-soft,#edf4fa);font-weight:800}
.mf-review-rank{font-weight:700;width:72px}
.mf-review-rank-1{color:#7a4b00;background:#fff0bc;font-size:21px!important;font-weight:900}
.mf-review-rank-2{color:#334155;background:#e2e8f0;font-size:18px!important;font-weight:800}
.mf-review-rank-3{color:#793f20;background:#f8e3d4;font-size:16px!important}
.mf-review-duration{white-space:nowrap;font-variant-numeric:tabular-nums}
.mf-review-stats-pages{display:flex;align-items:center;justify-content:center;gap:20px;margin-top:18px}
.mf-review-detail{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:14px;background:var(--mf-soft,#edf4fa);border-radius:10px}
@media(max-width:600px){.mf-review-stats{padding:12px}.mf-review-stats th,.mf-review-stats td{padding:12px 8px}.mf-review-stats table{min-width:480px}}
