/*
 * Right-to-left layout for Arabic. Bootstrap's LTR build stays in place; the
 * rules below flip the pieces that matter — text direction, the docked
 * configuration sidebar, table alignment, margins that hug a side — so the
 * screens read naturally without a second CSS bundle. Loaded only when
 * <html dir="rtl">.
 */
html[dir="rtl"] body { direction: rtl; text-align: start; }
html[dir="rtl"] .text-end { text-align: left !important; }
html[dir="rtl"] .text-start { text-align: right !important; }
html[dir="rtl"] .ms-auto { margin-left: 0 !important; margin-right: auto !important; }
html[dir="rtl"] .me-auto { margin-right: 0 !important; margin-left: auto !important; }
html[dir="rtl"] .ms-1, html[dir="rtl"] .ms-2, html[dir="rtl"] .ms-3 { margin-left: 0 !important; }
html[dir="rtl"] .ms-1 { margin-right: .25rem !important; }
html[dir="rtl"] .ms-2 { margin-right: .5rem !important; }
html[dir="rtl"] .ms-3 { margin-right: 1rem !important; }
html[dir="rtl"] .me-1, html[dir="rtl"] .me-2, html[dir="rtl"] .me-3 { margin-right: 0 !important; }
html[dir="rtl"] .me-1 { margin-left: .25rem !important; }
html[dir="rtl"] .me-2 { margin-left: .5rem !important; }
html[dir="rtl"] .me-3 { margin-left: 1rem !important; }
html[dir="rtl"] .ps-3 { padding-left: 0 !important; padding-right: 1rem !important; }
html[dir="rtl"] .pe-3 { padding-right: 0 !important; padding-left: 1rem !important; }
html[dir="rtl"] .float-end { float: left !important; }
html[dir="rtl"] .float-start { float: right !important; }
html[dir="rtl"] .dropdown-menu-end { right: auto; left: 0; }
html[dir="rtl"] .form-select { background-position: left .75rem center; padding-right: .75rem; padding-left: 2.25rem; }
html[dir="rtl"] .input-group > :not(:first-child) { border-top-left-radius: var(--bs-border-radius); border-bottom-left-radius: var(--bs-border-radius); border-top-right-radius: 0; border-bottom-right-radius: 0; }
html[dir="rtl"] .input-group > :not(:last-child) { border-top-right-radius: var(--bs-border-radius); border-bottom-right-radius: var(--bs-border-radius); border-top-left-radius: 0; border-bottom-left-radius: 0; }
html[dir="rtl"] .table th, html[dir="rtl"] .table td { text-align: right; }
html[dir="rtl"] .table .text-end { text-align: left !important; }
html[dir="rtl"] .sidebar_wrap { order: 2; }
html[dir="rtl"] .main_body_wrap { order: 1; }
html[dir="rtl"] .sidebar-link span { margin-right: .5rem; margin-left: 0; }
html[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before { float: right; padding-right: 0; padding-left: .5rem; transform: scaleX(-1); }
html[dir="rtl"] .list-group, html[dir="rtl"] .nav { padding-right: 0; }
html[dir="rtl"] .dataTables_wrapper .dataTables_filter { float: left; text-align: left; }
html[dir="rtl"] .dataTables_wrapper .dataTables_length { float: right; }
html[dir="rtl"] .dataTables_wrapper .dataTables_paginate { float: left; }
html[dir="rtl"] .dataTables_wrapper .dataTables_info { float: right; }
html[dir="rtl"] code, html[dir="rtl"] .font-monospace, html[dir="rtl"] input[type="number"], html[dir="rtl"] input[type="date"], html[dir="rtl"] input[inputmode="decimal"] { direction: ltr; unicode-bidi: embed; }
html[dir="rtl"] .modal-header .btn-close { margin: -.5rem auto -.5rem -.5rem; }
html[dir="rtl"] .toast-container.end-0 { right: auto !important; left: 0 !important; }
/* Arabic type: a slightly larger line-height keeps diacritics and tails clear */
html[dir="rtl"] body { line-height: 1.65; }
