/* ═══════════════════════════════════════════════════════════
   RTL Overrides
   ═══════════════════════════════════════════════════════════ */

[dir="rtl"] .cms-sidebar { left: auto; right: 0; }
[dir="rtl"] .cms-sidebar.collapsed { transform: translateX(var(--sidebar-width)); }
[dir="rtl"] .cms-main { margin-left: 0; margin-right: var(--sidebar-width); }
[dir="rtl"] .cms-main.expanded { margin-right: 0; }

[dir="rtl"] .sidebar-link i:first-child { margin-left: 10px; margin-right: 0; }
[dir="rtl"] .sidebar-chevron { margin-left: 0 !important; margin-right: auto; }
[dir="rtl"] .sidebar-submenu { padding-right: 1rem; padding-left: 0; }

[dir="rtl"] .me-1 { margin-right: 0 !important; margin-left: 0.25rem !important; }
[dir="rtl"] .me-2 { margin-right: 0 !important; margin-left: 0.5rem !important; }
[dir="rtl"] .me-3 { margin-right: 0 !important; margin-left: 1rem !important; }
[dir="rtl"] .ms-auto { margin-right: auto !important; margin-left: 0 !important; }
[dir="rtl"] .ms-3 { margin-right: 1rem !important; margin-left: 0 !important; }

[dir="rtl"] .card.border-primary,
[dir="rtl"] .card.border-success,
[dir="rtl"] .card.border-warning,
[dir="rtl"] .card.border-danger,
[dir="rtl"] .card.border-info {
    border-left: 1px solid #e2e8f0 !important;
    border-right-width: 4px !important;
}

[dir="rtl"] .dropdown-menu-end { --bs-position: end; }

[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before { float: right; padding-left: 0.5rem; padding-right: 0; }

@media (max-width: 991.98px) {
    [dir="rtl"] .cms-sidebar { transform: translateX(var(--sidebar-width)); }
    [dir="rtl"] .cms-sidebar.show { transform: translateX(0); }
    [dir="rtl"] .cms-main { margin-right: 0; }
}