/* RTL + Flowbite overrides */
* { box-sizing: border-box; }

/* Sidebar RTL fix */
#sidebar { right: 0; left: auto; border-left: 1px solid #e5e7eb; border-right: none; }
@media (min-width: 640px) {
  #sidebar { transform: translateX(0) !important; }
  .sm\:mr-64 { margin-right: 16rem; }
}

/* Active nav item */
.nav-item.active { background-color: #eff6ff; color: #2563eb; }
.nav-item.active svg { color: #2563eb; }

/* Drawer overlay — 70% dark */
#drawer-overlay { position: fixed; inset: 0; z-index: 30; background-color: rgba(17, 24, 39, 0.7) !important; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

/* Toast */
.toast { min-width: 200px; animation: slideIn 0.3s ease; }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Dev FAB — bottom-left corner (sidebar is on the right, no conflict) */

/* Dark mode: ensure text stays readable in all elements */
.dark body                        { color: #e5e7eb; }
.dark p, .dark span, .dark td, .dark th, .dark li, .dark label, .dark dt, .dark dd { color: inherit; }
.dark input, .dark textarea, .dark select {
  background-color: #374151;
  color: #f3f4f6;
  border-color: #4b5563;
}
.dark input::placeholder, .dark textarea::placeholder { color: #9ca3af; }
.dark table { color: #d1d5db; }
.dark th { color: #d1d5db; background-color: #374151; }
.dark td { color: #d1d5db; }
.dark .bg-white { background-color: #1f2937; }
.dark .text-gray-900 { color: #f9fafb; }
.dark .text-gray-800 { color: #f3f4f6; }
.dark .text-gray-700 { color: #e5e7eb; }
.dark .text-gray-600 { color: #d1d5db; }
.dark .text-gray-500 { color: #9ca3af; }
