/* Custom CSS for RTL support and Arabic fonts */
@font-face {
    font-family: 'Dubai';
    src: url('https://fonts.googleapis.com/css2?family=Dubai:wght@300;400;500;700&display=swap');
}

[dir="rtl"] .ml-1 {
    margin-left: 0;
    margin-right: 0.25rem;
}

[dir="rtl"] .ml-2 {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] .ml-3 {
    margin-left: 0;
    margin-right: 0.75rem;
}

[dir="rtl"] .ml-4 {
    margin-left: 0;
    margin-right: 1rem;
}

[dir="rtl"] .mr-1 {
    margin-right: 0;
    margin-left: 0.25rem;
}

[dir="rtl"] .mr-2 {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .mr-3 {
    margin-right: 0;
    margin-left: 0.75rem;
}

[dir="rtl"] .mr-4 {
    margin-right: 0;
    margin-left: 1rem;
}

[dir="rtl"] .pl-1 {
    padding-left: 0;
    padding-right: 0.25rem;
}

[dir="rtl"] .pl-2 {
    padding-left: 0;
    padding-right: 0.5rem;
}

[dir="rtl"] .pl-3 {
    padding-left: 0;
    padding-right: 0.75rem;
}

[dir="rtl"] .pl-4 {
    padding-left: 0;
    padding-right: 1rem;
}

[dir="rtl"] .pr-1 {
    padding-right: 0;
    padding-left: 0.25rem;
}

[dir="rtl"] .pr-2 {
    padding-right: 0;
    padding-left: 0.5rem;
}

[dir="rtl"] .pr-3 {
    padding-right: 0;
    padding-left: 0.75rem;
}

[dir="rtl"] .pr-4 {
    padding-right: 0;
    padding-left: 1rem;
}

/* Custom styles for the application */
.btn-primary {
    @apply bg-primary-600 text-white hover:bg-primary-700 font-medium;
}

.btn-secondary {
    @apply bg-secondary-500 text-white hover:bg-secondary-600 font-medium;
}

.card {
    @apply bg-white rounded-lg shadow-md overflow-hidden;
}

.card-header {
    @apply p-4 bg-primary-700 text-white font-bold;
}

.card-body {
    @apply p-4;
}

/* تحسين تباين النص */
.text-primary {
    @apply text-primary-700;
}

.text-secondary {
    @apply text-secondary-600;
}

.text-gray-700 {
    @apply text-gray-800;
}

.text-gray-500 {
    @apply text-gray-700;
}

/* تحسين ألوان الخلفية */
.bg-primary-50 {
    @apply bg-primary-100;
}

.hover\:bg-primary-50:hover {
    @apply hover:bg-primary-100;
}

.bg-primary-100 {
    @apply bg-primary-200;
}

/* تحسين تباين القائمة الجانبية */
.sidebar .group {
    @apply text-gray-800;
}

.sidebar svg {
    @apply text-gray-700;
}

.sidebar .group:hover {
    @apply bg-primary-100 text-primary-800;
}

.sidebar .group:hover svg {
    @apply text-primary-700;
}

.sidebar .bg-primary-100 {
    @apply bg-primary-200 text-primary-800;
}

.sidebar .text-primary-600 {
    @apply text-primary-700;
}

.sidebar .text-gray-700 {
    @apply text-gray-800;
}

.sidebar .text-gray-500 {
    @apply text-gray-700;
}

.sidebar .bg-gray-50 {
    @apply bg-gray-100;
}

.sidebar .hover\:bg-gray-100:hover {
    @apply hover:bg-gray-200;
}

/* تحسين تباين الجداول */
.permissions-table-header th {
    @apply text-gray-800 font-semibold;
}

.permissions-table-cell {
    @apply text-gray-800;
}

/* Styles for the permissions page */
.permissions-container {
    @apply container mx-auto px-4 py-6;
}

.permissions-card {
    @apply bg-white rounded-lg shadow-md overflow-hidden;
}

.permissions-header {
    @apply bg-primary-700 text-white px-6 py-4 flex justify-between items-center;
}

.permissions-title {
    @apply text-xl font-bold text-white;
}

.permissions-add-button {
    @apply bg-white text-primary-700 hover:bg-primary-50 px-4 py-2 rounded-md shadow-sm flex items-center transition-colors duration-200 font-medium;
}

.permissions-module {
    @apply border border-gray-200 rounded-md overflow-hidden mb-4 shadow-sm;
}

.permissions-module-header {
    @apply bg-gray-100 px-4 py-3 cursor-pointer hover:bg-gray-200 transition-colors duration-200 font-medium text-gray-800;
}

.permissions-table {
    @apply min-w-full divide-y divide-gray-200 border-collapse;
}

.permissions-table-header {
    @apply bg-gray-100;
}

.permissions-table-header th {
    @apply px-6 py-3 text-right text-xs font-medium text-gray-800 uppercase tracking-wider;
}

.permissions-table-row {
    @apply hover:bg-gray-50 transition-colors duration-150;
}

.permissions-table-cell {
    @apply px-6 py-4 whitespace-nowrap text-sm;
}

/* Z-index and positioning adjustments */
.main-content {
    @apply mt-16 z-10 relative;
}

.sidebar-wrapper {
    @apply z-30;
}

.navbar-wrapper {
    @apply z-40;
}

/* Additional styles for better layout */
main {
    @apply bg-gray-50;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    main {
        @apply mr-0 !important;
    }
}

.form-input {
    @apply rounded-md border-gray-300 focus:border-primary focus:ring focus:ring-primary focus:ring-opacity-50;
}

.form-label {
    @apply block text-sm font-medium text-gray-700 mb-1;
}

.alert-success {
    @apply bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded relative;
}

.alert-danger {
    @apply bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative;
}

.alert-warning {
    @apply bg-yellow-100 border border-yellow-400 text-yellow-700 px-4 py-3 rounded relative;
}

.alert-info {
    @apply bg-blue-100 border border-blue-400 text-blue-700 px-4 py-3 rounded relative;
}