/* ================= RTL overrides (loaded only for Arabic) ================= */
html[dir="rtl"] body{ direction:rtl; }

/* Sidebar flips to the right edge */
html[dir="rtl"] .sidebar{
  left:auto; right:0;
}
html[dir="rtl"] .sidebar.collapsed{ transform:translateX(100%); }

/* Main content offsets from the right instead of the left */
html[dir="rtl"] .main{
  margin-left:0; margin-right:260px;
}
html[dir="rtl"] .main.expanded{ margin-right:0; }

@media (max-width:900px){
  html[dir="rtl"] .sidebar{ transform:translateX(100%); }
  html[dir="rtl"] .sidebar.show{ transform:translateX(0); }
  html[dir="rtl"] .main{ margin-right:0; }
}

/* Nav links / icons */
html[dir="rtl"] .nav-badge{ margin-left:0; margin-right:auto; }
html[dir="rtl"] .nav-link{ flex-direction:row; }

/* Tables read right-to-left, numbers stay legible left-aligned when noted */
html[dir="rtl"] table{ direction:rtl; }
html[dir="rtl"] .text-left{ text-align:right; }
html[dir="rtl"] .text-right{ text-align:left; }

/* Floating action / print buttons mirror to the opposite corner */
html[dir="rtl"] .fab-print{ right:auto; left:24px; }

/* Forms and icons */
html[dir="rtl"] .form-group label{ text-align:right; }
html[dir="rtl"] .input-row{ direction:rtl; }

/* Keep numeric/currency values and inputs LTR for readability even in RTL mode */
html[dir="rtl"] input[type="number"],
html[dir="rtl"] .money,
html[dir="rtl"] .ltr-force{
  direction:ltr; text-align:right;
}
