/* Tailwind CSS */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* استایل‌های پایه */
body {
    font-family: 'Vazir', sans-serif !important;
    @apply bg-gray-100 text-gray-800;
}

/* استایل‌های هدر */
.navbar {
    @apply bg-blue-900 text-white shadow-md;
}
.navbar-brand {
    @apply text-xl font-bold;
}
.navbar-nav .nav-link {
    @apply px-4 py-2 hover:bg-blue-800 rounded;
}

/* استایل‌های فرم */
.form-control {
    @apply border-gray-300 focus:border-blue-500 focus:ring focus:ring-blue-200 focus:ring-opacity-50 rounded-md;
}
.btn {
    @apply px-4 py-2 rounded-md transition duration-200;
}
.btn-primary {
    @apply bg-blue-600 text-white hover:bg-blue-700;
}
.btn-success {
    @apply bg-green-600 text-white hover:bg-green-700;
}
.invalid-feedback {
    @apply text-red-500 text-sm mt-1;
}

/* استایل‌های jstree */
.jstree-container {
    @apply bg-white p-4 rounded-lg shadow-md;
}
.jstree-node {
    @apply text-gray-700;
}
.jstree-anchor {
    @apply hover:bg-gray-100 rounded px-2 py-1;
}
.jstree-icon {
    @apply text-blue-600;
}

/* استایل‌های جدول (برای جستجو) */
.grid-view table {
    @apply w-full border-collapse;
}
.grid-view th {
    @apply bg-gray-200 text-gray-700 font-semibold py-2 px-4 border;
}
.grid-view td {
    @apply py-2 px-4 border;
}
.grid-view .pagination {
    @apply mt-4 flex justify-center;
}
.grid-view .pagination li a {
    @apply px-3 py-1 mx-1 bg-white border rounded hover:bg-blue-100;
}
.grid-view .pagination li.active a {
    @apply bg-blue-600 text-white;
}

/* استایل‌های ریسپانسیو */
@media (max-width: 640px) {
    .site-login .max-w-md {
        @apply w-full mx-4;
    }
    .navbar-nav {
        @apply flex-col;
    }
    .navbar-nav .nav-link {
        @apply py-1;
    }
}

/* Pagination Styling */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    animation: fadeIn 1s ease-out;
}

.pagination li {
    list-style: none;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.5rem;
    border-radius: 8px;
    background: #e5e7eb;
    color: #1f2937;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.pagination .active a {
    background: #2563eb;
    color: white;
    font-weight: 600;
}

.pagination .disabled span {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}