/* ================================================================
   RTL Stylesheet — Arabic & Urdu
   Applied when html[dir="rtl"]
   ================================================================ */

html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

/* Flip sidebar from left to right */
html[dir="rtl"] .admin-sidebar {
  left: auto;
  right: 0;
  transform: translateX(100%);
}
html[dir="rtl"] .admin-sidebar.open {
  transform: translateX(0);
}
html[dir="rtl"] .admin-main {
  margin-left: 0;
  margin-right: var(--sidebar-w);
}

html[dir="rtl"] .investor-sidebar {
  border-right: none;
  border-left: 1px solid var(--color-border);
}
html[dir="rtl"] .investor-nav-link.active {
  border-left: none;
  border-right: 3px solid var(--color-primary);
}

/* Table headers */
html[dir="rtl"] th { text-align: right; }

/* Flip select arrow */
html[dir="rtl"] select.form-control {
  background-position: left .85rem center;
  padding-right: .85rem;
  padding-left: 2.5rem;
}

/* Flip sidebar badge */
html[dir="rtl"] .sidebar-badge {
  margin-left: 0;
  margin-right: auto;
}

/* Footer bottom row */
html[dir="rtl"] .footer-bottom {
  flex-direction: row-reverse;
}

/* Cookie banner */
html[dir="rtl"] .cookie-banner-inner {
  flex-direction: row-reverse;
}

/* Flash messages */
html[dir="rtl"] .flash {
  flex-direction: row-reverse;
}

/* Page header row */
html[dir="rtl"] .page-header-row {
  flex-direction: row-reverse;
}

/* Pagination */
html[dir="rtl"] .pagination {
  flex-direction: row-reverse;
}

/* Public nav */
html[dir="rtl"] .public-nav .container {
  flex-direction: row-reverse;
}
html[dir="rtl"] .topbar-right {
  margin-left: 0;
  margin-right: auto;
}
html[dir="rtl"] .investor-topbar-right {
  margin-left: 0;
  margin-right: auto;
}

/* Fonts per language */
html[lang="ar"] * {
  font-family: 'Noto Sans Arabic', -apple-system, sans-serif;
}
html[lang="ur"] * {
  font-family: 'Noto Nastaliq Urdu', -apple-system, sans-serif;
  line-height: 1.9;
}

@media (max-width: 1024px) {
  html[dir="rtl"] .admin-main {
    margin-right: 0;
  }
}
