/*
 * RTL remap for Bootstrap's *physically compiled* utilities.
 *
 * This project ships the LTR Bootstrap build only. In it `ms-*`, `me-*`,
 * `ps-*`, `pe-*`, `text-start` and `text-end` are compiled to physical
 * properties (margin-left, text-align:right, ...) and therefore do NOT flip
 * when the document direction does — verified in the browser: `.text-end`
 * computes to `right` and `.ms-4` to `margin-left` under both dir="ltr" and
 * dir="rtl".
 *
 * The visible symptom was the platform dashboard: the stat-card icon uses a
 * real logical inset and moved to the right in Arabic, while `.text-end` stayed
 * pinned right as well, so the label ran underneath the icon and was clipped.
 *
 * This file restores the intent those class names already express, which is
 * exactly what Bootstrap's own RTL build does. Loaded only when the locale is
 * Arabic, so the LTR rendering is untouched.
 */

[dir="rtl"] .ms-0{margin-right:0!important;margin-left:0!important}
[dir="rtl"] .me-0{margin-left:0!important;margin-right:0!important}
[dir="rtl"] .ps-0{padding-right:0!important;padding-left:0!important}
[dir="rtl"] .pe-0{padding-left:0!important;padding-right:0!important}
[dir="rtl"] .ms-1{margin-right:0.25rem!important;margin-left:0!important}
[dir="rtl"] .me-1{margin-left:0.25rem!important;margin-right:0!important}
[dir="rtl"] .ps-1{padding-right:0.25rem!important;padding-left:0!important}
[dir="rtl"] .pe-1{padding-left:0.25rem!important;padding-right:0!important}
[dir="rtl"] .ms-2{margin-right:0.5rem!important;margin-left:0!important}
[dir="rtl"] .me-2{margin-left:0.5rem!important;margin-right:0!important}
[dir="rtl"] .ps-2{padding-right:0.5rem!important;padding-left:0!important}
[dir="rtl"] .pe-2{padding-left:0.5rem!important;padding-right:0!important}
[dir="rtl"] .ms-3{margin-right:1rem!important;margin-left:0!important}
[dir="rtl"] .me-3{margin-left:1rem!important;margin-right:0!important}
[dir="rtl"] .ps-3{padding-right:1rem!important;padding-left:0!important}
[dir="rtl"] .pe-3{padding-left:1rem!important;padding-right:0!important}
[dir="rtl"] .ms-4{margin-right:1.5rem!important;margin-left:0!important}
[dir="rtl"] .me-4{margin-left:1.5rem!important;margin-right:0!important}
[dir="rtl"] .ps-4{padding-right:1.5rem!important;padding-left:0!important}
[dir="rtl"] .pe-4{padding-left:1.5rem!important;padding-right:0!important}
[dir="rtl"] .ms-5{margin-right:3rem!important;margin-left:0!important}
[dir="rtl"] .me-5{margin-left:3rem!important;margin-right:0!important}
[dir="rtl"] .ps-5{padding-right:3rem!important;padding-left:0!important}
[dir="rtl"] .pe-5{padding-left:3rem!important;padding-right:0!important}
[dir="rtl"] .ms-auto{margin-right:auto!important;margin-left:auto!important}
[dir="rtl"] .me-auto{margin-left:auto!important;margin-right:auto!important}
[dir="rtl"] .text-start{text-align:right!important}
[dir="rtl"] .text-end{text-align:left!important}
[dir="rtl"] .float-start{float:right!important}
[dir="rtl"] .float-end{float:left!important}
[dir="rtl"] .ms-sm-0{margin-right:0!important;margin-left:0!important}
[dir="rtl"] .me-sm-0{margin-left:0!important;margin-right:0!important}
[dir="rtl"] .ps-sm-0{padding-right:0!important;padding-left:0!important}
[dir="rtl"] .pe-sm-0{padding-left:0!important;padding-right:0!important}
[dir="rtl"] .ms-sm-1{margin-right:0.25rem!important;margin-left:0!important}
[dir="rtl"] .me-sm-1{margin-left:0.25rem!important;margin-right:0!important}
[dir="rtl"] .ps-sm-1{padding-right:0.25rem!important;padding-left:0!important}
[dir="rtl"] .pe-sm-1{padding-left:0.25rem!important;padding-right:0!important}
[dir="rtl"] .ms-sm-2{margin-right:0.5rem!important;margin-left:0!important}
[dir="rtl"] .me-sm-2{margin-left:0.5rem!important;margin-right:0!important}
[dir="rtl"] .ps-sm-2{padding-right:0.5rem!important;padding-left:0!important}
[dir="rtl"] .pe-sm-2{padding-left:0.5rem!important;padding-right:0!important}
[dir="rtl"] .ms-sm-3{margin-right:1rem!important;margin-left:0!important}
[dir="rtl"] .me-sm-3{margin-left:1rem!important;margin-right:0!important}
[dir="rtl"] .ps-sm-3{padding-right:1rem!important;padding-left:0!important}
[dir="rtl"] .pe-sm-3{padding-left:1rem!important;padding-right:0!important}
[dir="rtl"] .ms-sm-4{margin-right:1.5rem!important;margin-left:0!important}
[dir="rtl"] .me-sm-4{margin-left:1.5rem!important;margin-right:0!important}
[dir="rtl"] .ps-sm-4{padding-right:1.5rem!important;padding-left:0!important}
[dir="rtl"] .pe-sm-4{padding-left:1.5rem!important;padding-right:0!important}
[dir="rtl"] .ms-sm-5{margin-right:3rem!important;margin-left:0!important}
[dir="rtl"] .me-sm-5{margin-left:3rem!important;margin-right:0!important}
[dir="rtl"] .ps-sm-5{padding-right:3rem!important;padding-left:0!important}
[dir="rtl"] .pe-sm-5{padding-left:3rem!important;padding-right:0!important}
[dir="rtl"] .ms-sm-auto{margin-right:auto!important;margin-left:auto!important}
[dir="rtl"] .me-sm-auto{margin-left:auto!important;margin-right:auto!important}
[dir="rtl"] .text-sm-start{text-align:right!important}
[dir="rtl"] .text-sm-end{text-align:left!important}
[dir="rtl"] .float-sm-start{float:right!important}
[dir="rtl"] .float-sm-end{float:left!important}
[dir="rtl"] .ms-md-0{margin-right:0!important;margin-left:0!important}
[dir="rtl"] .me-md-0{margin-left:0!important;margin-right:0!important}
[dir="rtl"] .ps-md-0{padding-right:0!important;padding-left:0!important}
[dir="rtl"] .pe-md-0{padding-left:0!important;padding-right:0!important}
[dir="rtl"] .ms-md-1{margin-right:0.25rem!important;margin-left:0!important}
[dir="rtl"] .me-md-1{margin-left:0.25rem!important;margin-right:0!important}
[dir="rtl"] .ps-md-1{padding-right:0.25rem!important;padding-left:0!important}
[dir="rtl"] .pe-md-1{padding-left:0.25rem!important;padding-right:0!important}
[dir="rtl"] .ms-md-2{margin-right:0.5rem!important;margin-left:0!important}
[dir="rtl"] .me-md-2{margin-left:0.5rem!important;margin-right:0!important}
[dir="rtl"] .ps-md-2{padding-right:0.5rem!important;padding-left:0!important}
[dir="rtl"] .pe-md-2{padding-left:0.5rem!important;padding-right:0!important}
[dir="rtl"] .ms-md-3{margin-right:1rem!important;margin-left:0!important}
[dir="rtl"] .me-md-3{margin-left:1rem!important;margin-right:0!important}
[dir="rtl"] .ps-md-3{padding-right:1rem!important;padding-left:0!important}
[dir="rtl"] .pe-md-3{padding-left:1rem!important;padding-right:0!important}
[dir="rtl"] .ms-md-4{margin-right:1.5rem!important;margin-left:0!important}
[dir="rtl"] .me-md-4{margin-left:1.5rem!important;margin-right:0!important}
[dir="rtl"] .ps-md-4{padding-right:1.5rem!important;padding-left:0!important}
[dir="rtl"] .pe-md-4{padding-left:1.5rem!important;padding-right:0!important}
[dir="rtl"] .ms-md-5{margin-right:3rem!important;margin-left:0!important}
[dir="rtl"] .me-md-5{margin-left:3rem!important;margin-right:0!important}
[dir="rtl"] .ps-md-5{padding-right:3rem!important;padding-left:0!important}
[dir="rtl"] .pe-md-5{padding-left:3rem!important;padding-right:0!important}
[dir="rtl"] .ms-md-auto{margin-right:auto!important;margin-left:auto!important}
[dir="rtl"] .me-md-auto{margin-left:auto!important;margin-right:auto!important}
[dir="rtl"] .text-md-start{text-align:right!important}
[dir="rtl"] .text-md-end{text-align:left!important}
[dir="rtl"] .float-md-start{float:right!important}
[dir="rtl"] .float-md-end{float:left!important}
[dir="rtl"] .ms-lg-0{margin-right:0!important;margin-left:0!important}
[dir="rtl"] .me-lg-0{margin-left:0!important;margin-right:0!important}
[dir="rtl"] .ps-lg-0{padding-right:0!important;padding-left:0!important}
[dir="rtl"] .pe-lg-0{padding-left:0!important;padding-right:0!important}
[dir="rtl"] .ms-lg-1{margin-right:0.25rem!important;margin-left:0!important}
[dir="rtl"] .me-lg-1{margin-left:0.25rem!important;margin-right:0!important}
[dir="rtl"] .ps-lg-1{padding-right:0.25rem!important;padding-left:0!important}
[dir="rtl"] .pe-lg-1{padding-left:0.25rem!important;padding-right:0!important}
[dir="rtl"] .ms-lg-2{margin-right:0.5rem!important;margin-left:0!important}
[dir="rtl"] .me-lg-2{margin-left:0.5rem!important;margin-right:0!important}
[dir="rtl"] .ps-lg-2{padding-right:0.5rem!important;padding-left:0!important}
[dir="rtl"] .pe-lg-2{padding-left:0.5rem!important;padding-right:0!important}
[dir="rtl"] .ms-lg-3{margin-right:1rem!important;margin-left:0!important}
[dir="rtl"] .me-lg-3{margin-left:1rem!important;margin-right:0!important}
[dir="rtl"] .ps-lg-3{padding-right:1rem!important;padding-left:0!important}
[dir="rtl"] .pe-lg-3{padding-left:1rem!important;padding-right:0!important}
[dir="rtl"] .ms-lg-4{margin-right:1.5rem!important;margin-left:0!important}
[dir="rtl"] .me-lg-4{margin-left:1.5rem!important;margin-right:0!important}
[dir="rtl"] .ps-lg-4{padding-right:1.5rem!important;padding-left:0!important}
[dir="rtl"] .pe-lg-4{padding-left:1.5rem!important;padding-right:0!important}
[dir="rtl"] .ms-lg-5{margin-right:3rem!important;margin-left:0!important}
[dir="rtl"] .me-lg-5{margin-left:3rem!important;margin-right:0!important}
[dir="rtl"] .ps-lg-5{padding-right:3rem!important;padding-left:0!important}
[dir="rtl"] .pe-lg-5{padding-left:3rem!important;padding-right:0!important}
[dir="rtl"] .ms-lg-auto{margin-right:auto!important;margin-left:auto!important}
[dir="rtl"] .me-lg-auto{margin-left:auto!important;margin-right:auto!important}
[dir="rtl"] .text-lg-start{text-align:right!important}
[dir="rtl"] .text-lg-end{text-align:left!important}
[dir="rtl"] .float-lg-start{float:right!important}
[dir="rtl"] .float-lg-end{float:left!important}
[dir="rtl"] .ms-xl-0{margin-right:0!important;margin-left:0!important}
[dir="rtl"] .me-xl-0{margin-left:0!important;margin-right:0!important}
[dir="rtl"] .ps-xl-0{padding-right:0!important;padding-left:0!important}
[dir="rtl"] .pe-xl-0{padding-left:0!important;padding-right:0!important}
[dir="rtl"] .ms-xl-1{margin-right:0.25rem!important;margin-left:0!important}
[dir="rtl"] .me-xl-1{margin-left:0.25rem!important;margin-right:0!important}
[dir="rtl"] .ps-xl-1{padding-right:0.25rem!important;padding-left:0!important}
[dir="rtl"] .pe-xl-1{padding-left:0.25rem!important;padding-right:0!important}
[dir="rtl"] .ms-xl-2{margin-right:0.5rem!important;margin-left:0!important}
[dir="rtl"] .me-xl-2{margin-left:0.5rem!important;margin-right:0!important}
[dir="rtl"] .ps-xl-2{padding-right:0.5rem!important;padding-left:0!important}
[dir="rtl"] .pe-xl-2{padding-left:0.5rem!important;padding-right:0!important}
[dir="rtl"] .ms-xl-3{margin-right:1rem!important;margin-left:0!important}
[dir="rtl"] .me-xl-3{margin-left:1rem!important;margin-right:0!important}
[dir="rtl"] .ps-xl-3{padding-right:1rem!important;padding-left:0!important}
[dir="rtl"] .pe-xl-3{padding-left:1rem!important;padding-right:0!important}
[dir="rtl"] .ms-xl-4{margin-right:1.5rem!important;margin-left:0!important}
[dir="rtl"] .me-xl-4{margin-left:1.5rem!important;margin-right:0!important}
[dir="rtl"] .ps-xl-4{padding-right:1.5rem!important;padding-left:0!important}
[dir="rtl"] .pe-xl-4{padding-left:1.5rem!important;padding-right:0!important}
[dir="rtl"] .ms-xl-5{margin-right:3rem!important;margin-left:0!important}
[dir="rtl"] .me-xl-5{margin-left:3rem!important;margin-right:0!important}
[dir="rtl"] .ps-xl-5{padding-right:3rem!important;padding-left:0!important}
[dir="rtl"] .pe-xl-5{padding-left:3rem!important;padding-right:0!important}
[dir="rtl"] .ms-xl-auto{margin-right:auto!important;margin-left:auto!important}
[dir="rtl"] .me-xl-auto{margin-left:auto!important;margin-right:auto!important}
[dir="rtl"] .text-xl-start{text-align:right!important}
[dir="rtl"] .text-xl-end{text-align:left!important}
[dir="rtl"] .float-xl-start{float:right!important}
[dir="rtl"] .float-xl-end{float:left!important}
[dir="rtl"] .ms-xxl-0{margin-right:0!important;margin-left:0!important}
[dir="rtl"] .me-xxl-0{margin-left:0!important;margin-right:0!important}
[dir="rtl"] .ps-xxl-0{padding-right:0!important;padding-left:0!important}
[dir="rtl"] .pe-xxl-0{padding-left:0!important;padding-right:0!important}
[dir="rtl"] .ms-xxl-1{margin-right:0.25rem!important;margin-left:0!important}
[dir="rtl"] .me-xxl-1{margin-left:0.25rem!important;margin-right:0!important}
[dir="rtl"] .ps-xxl-1{padding-right:0.25rem!important;padding-left:0!important}
[dir="rtl"] .pe-xxl-1{padding-left:0.25rem!important;padding-right:0!important}
[dir="rtl"] .ms-xxl-2{margin-right:0.5rem!important;margin-left:0!important}
[dir="rtl"] .me-xxl-2{margin-left:0.5rem!important;margin-right:0!important}
[dir="rtl"] .ps-xxl-2{padding-right:0.5rem!important;padding-left:0!important}
[dir="rtl"] .pe-xxl-2{padding-left:0.5rem!important;padding-right:0!important}
[dir="rtl"] .ms-xxl-3{margin-right:1rem!important;margin-left:0!important}
[dir="rtl"] .me-xxl-3{margin-left:1rem!important;margin-right:0!important}
[dir="rtl"] .ps-xxl-3{padding-right:1rem!important;padding-left:0!important}
[dir="rtl"] .pe-xxl-3{padding-left:1rem!important;padding-right:0!important}
[dir="rtl"] .ms-xxl-4{margin-right:1.5rem!important;margin-left:0!important}
[dir="rtl"] .me-xxl-4{margin-left:1.5rem!important;margin-right:0!important}
[dir="rtl"] .ps-xxl-4{padding-right:1.5rem!important;padding-left:0!important}
[dir="rtl"] .pe-xxl-4{padding-left:1.5rem!important;padding-right:0!important}
[dir="rtl"] .ms-xxl-5{margin-right:3rem!important;margin-left:0!important}
[dir="rtl"] .me-xxl-5{margin-left:3rem!important;margin-right:0!important}
[dir="rtl"] .ps-xxl-5{padding-right:3rem!important;padding-left:0!important}
[dir="rtl"] .pe-xxl-5{padding-left:3rem!important;padding-right:0!important}
[dir="rtl"] .ms-xxl-auto{margin-right:auto!important;margin-left:auto!important}
[dir="rtl"] .me-xxl-auto{margin-left:auto!important;margin-right:auto!important}
[dir="rtl"] .text-xxl-start{text-align:right!important}
[dir="rtl"] .text-xxl-end{text-align:left!important}
[dir="rtl"] .float-xxl-start{float:right!important}
[dir="rtl"] .float-xxl-end{float:left!important}

/* Negative start margins (mt-n4 style icons pull-ups keep working; these are
   the horizontal ones the cards and sidebar use). */
[dir="rtl"] .ms-n1{margin-right:-0.25rem!important;margin-left:0!important}
[dir="rtl"] .ms-n2{margin-right:-0.5rem!important;margin-left:0!important}
[dir="rtl"] .ms-n3{margin-right:-1rem!important;margin-left:0!important}
[dir="rtl"] .ms-n4{margin-right:-1.5rem!important;margin-left:0!important}
[dir="rtl"] .me-n1{margin-left:-0.25rem!important;margin-right:0!important}
[dir="rtl"] .me-n2{margin-left:-0.5rem!important;margin-right:0!important}
[dir="rtl"] .me-n3{margin-left:-1rem!important;margin-right:0!important}
[dir="rtl"] .me-n4{margin-left:-1.5rem!important;margin-right:0!important}

/* Borders and rounding that name a side logically. */
[dir="rtl"] .border-start{border-right:1px solid #dee2e6!important;border-left:0!important}
[dir="rtl"] .border-end{border-left:1px solid #dee2e6!important;border-right:0!important}

/* Bootstrap's dropdown/alert close button is positioned physically. */
[dir="rtl"] .alert-dismissible .btn-close{left:0;right:auto}

/* The stat-card icon: give the text block room on the side the icon now
   occupies, so a long label can never slide underneath it. */
[dir="rtl"] .card .card-header .icon.position-absolute ~ .text-end{padding-right:5rem!important}
[dir="ltr"] .card .card-header .icon.position-absolute ~ .text-end{padding-left:5rem}


/*
 * Arabic type.
 *
 * The template loads Roboto only, which has no Arabic glyphs, so Arabic text
 * fell through to whatever each operating system substituted -- different
 * metrics on every machine, and headings that did not match their own tables.
 * Cairo is declared once, for the whole document, and kept ahead of the
 * inherited Roboto stack. This file is loaded only when the locale is Arabic,
 * so the English rendering is untouched.
 *
 * The second rule covers the components that hardcode their own family
 * (Material Dashboard buttons, FullCalendar, SweetAlert2, Selectize).
 */
[dir="rtl"], [dir="rtl"] body {
  font-family: "Cairo", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
[dir="rtl"] .btn, [dir="rtl"] .form-control, [dir="rtl"] .form-label,
[dir="rtl"] table, [dir="rtl"] .modal, [dir="rtl"] .sidenav,
[dir="rtl"] .fc, [dir="rtl"] .swal2-container, [dir="rtl"] .selectize-control,
[dir="rtl"] .swal2-popup {
  font-family: "Cairo", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
