/* ============================================================
   DevTrack - RTL overrides (loaded only when dir="rtl")
   Pairs with Bootstrap RTL; only adjusts the custom layout.
   ============================================================ */

html[dir="rtl"] body {
  font-family: 'Cairo', 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* Sidebar moves to the right edge */
html[dir="rtl"] .sidebar {
  left: auto;
  right: 0;
}

/* Main content shifts to the left of the sidebar */
html[dir="rtl"] .main-wrapper {
  margin-left: 0;
  margin-right: var(--sidebar-w);
}

/* Active nav-link indicator / icon spacing mirror */
html[dir="rtl"] .sidebar-nav .nav-link i {
  margin-right: 0;
}

html[dir="rtl"] .nav-badge {
  margin-left: 0;
  margin-right: auto;
}

/* Icon badge that was pinned top/right */
html[dir="rtl"] .icon-badge {
  right: auto;
  left: 2px;
}

/* Priority left borders become right borders */
html[dir="rtl"] tr.priority-critical td:first-child,
html[dir="rtl"] tr.priority-high td:first-child {
  border-left: none;
}
html[dir="rtl"] tr.priority-critical td:first-child { border-right: 3px solid var(--p-critical); }
html[dir="rtl"] tr.priority-high td:first-child     { border-right: 3px solid var(--p-high); }

/* Mobile: sidebar slides in from the right */
@media (max-width: 991px) {
  html[dir="rtl"] .sidebar {
    transform: translateX(100%);
  }
  html[dir="rtl"] .sidebar.open {
    transform: translateX(0);
  }
  html[dir="rtl"] .main-wrapper {
    margin-right: 0;
  }
}

/* Language switcher: caret nudges the other way in RTL (cosmetic) */
html[dir="rtl"] .lang-switch-btn .lang-caret { margin-right: 0; }
