


@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;500;600;700;800;900&display=swap');


body, html {
    font-family: 'Cairo', 'Poppins', sans-serif;
}

/* Form Elements */
.form-input {
    @apply appearance-none block w-full px-3 py-2 border border-gray-300 rounded-lg shadow-sm placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-yellow-500 focus:border-yellow-500 sm:text-sm transition-colors duration-200;
}

.form-select {
    @apply appearance-none block w-full px-3 py-2 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-yellow-500 focus:border-yellow-500 sm:text-sm transition-colors duration-200;
}

.form-checkbox {
    @apply focus:ring-yellow-500 h-4 w-4 text-yellow-600 border-gray-300 rounded transition-colors duration-200;
}

/* Buttons */
.btn-primary {
    @apply inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-lg text-white bg-gradient-to-r from-yellow-500 to-yellow-600 hover:from-yellow-600 hover:to-yellow-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-yellow-500 transition-all duration-200 shadow-sm;
}

.btn-secondary {
    @apply inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-lg text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-yellow-500 transition-all duration-200 shadow-sm;
}

/* Cards */
.card {
    @apply bg-white rounded-2xl shadow-lg overflow-hidden border border-gray-100 transition-all duration-300;
}

.card-header {
    @apply px-6 py-4 border-b border-gray-200 bg-gray-50;
}

/* Animations */
.animate-slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Animation */
.loading {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Fix for RTL layout */
[dir="rtl"] .flex-row {
    flex-direction: row-reverse;
}

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

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

[dir="rtl"] .text-left {
    text-align: right !important;
}

[dir="rtl"] .text-right {
    text-align: left !important;
}

/* User dropdown menu */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white !important;
    color: #374151 !important;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 50;
    border: 1px solid #e5e7eb !important;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Fix all dropdown menus globally (except navbar dropdowns) */
.dropdown-menu:not(#notif-dropdown):not(#user-menu), 
.dropdown-content:not(#notif-dropdown):not(#user-menu), 
.menu-dropdown, .status-dropdown, .filter-dropdown, .action-dropdown,
select, .form-select, .select {
    background: white !important;
    color: #374151 !important;
    border: 1px solid #e5e7eb !important;
}

/* Keep navbar dropdowns dark */
#notif-dropdown, #user-menu {
    background: rgb(30 41 59 / 0.95) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgb(71 85 105 / 0.5) !important;
}

.dropdown-item {
    background: white !important;
    color: #374151 !important;
}

.dropdown-item:hover {
    background: #f9fafb !important;
    color: #111827 !important;
}

/* Fix select elements */
select option {
    background: white !important;
    color: #374151 !important;
} 

/* === RTL Layout for Arabic Only === */
/* These styles only apply when html has dir="rtl" (Arabic language) */

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

[dir="rtl"] .flex {
    flex-direction: row-reverse;
}

[dir="rtl"] .flex-row {
    flex-direction: row-reverse !important;
}

[dir="rtl"] .flex-col {
    flex-direction: column !important;
}

/* Flip spacing classes for RTL */
[dir="rtl"] .space-x-1 > * + * {
    margin-right: 0.25rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .space-x-2 > * + * {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .space-x-3 > * + * {
    margin-right: 0.75rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .space-x-4 > * + * {
    margin-right: 1rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .space-x-6 > * + * {
    margin-right: 1.5rem !important;
    margin-left: 0 !important;
}

/* Flip margin classes for RTL */
[dir="rtl"] .ml-2 { margin-left: 0 !important; margin-right: 0.5rem !important; }
[dir="rtl"] .ml-3 { margin-left: 0 !important; margin-right: 0.75rem !important; }
[dir="rtl"] .ml-4 { margin-left: 0 !important; margin-right: 1rem !important; }
[dir="rtl"] .mr-2 { margin-right: 0 !important; margin-left: 0.5rem !important; }
[dir="rtl"] .mr-3 { margin-right: 0 !important; margin-left: 0.75rem !important; }
[dir="rtl"] .mr-4 { margin-right: 0 !important; margin-left: 1rem !important; }

/* Flip padding classes for RTL */
[dir="rtl"] .pl-2 { padding-left: 0 !important; padding-right: 0.5rem !important; }
[dir="rtl"] .pl-3 { padding-left: 0 !important; padding-right: 0.75rem !important; }
[dir="rtl"] .pl-4 { padding-left: 0 !important; padding-right: 1rem !important; }
[dir="rtl"] .pr-2 { padding-right: 0 !important; padding-left: 0.5rem !important; }
[dir="rtl"] .pr-3 { padding-right: 0 !important; padding-left: 0.75rem !important; }
[dir="rtl"] .pr-4 { padding-right: 0 !important; padding-left: 1rem !important; }

/* Flip text alignment for RTL */
[dir="rtl"] .text-left { text-align: right !important; }
[dir="rtl"] .text-right { text-align: left !important; }

/* Flip justify content for RTL */
[dir="rtl"] .justify-start { justify-content: flex-end !important; }
[dir="rtl"] .justify-end { justify-content: flex-start !important; }

/* Flip items alignment for RTL */
[dir="rtl"] .items-start { align-items: flex-end !important; }
[dir="rtl"] .items-end { align-items: flex-start !important; }

/* Flip border radius for RTL */
[dir="rtl"] .rounded-l-md { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; border-top-right-radius: 0.375rem !important; border-bottom-right-radius: 0.375rem !important; }
[dir="rtl"] .rounded-r-md { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; border-top-left-radius: 0.375rem !important; border-bottom-left-radius: 0.375rem !important; }

/* Flip absolute positioning for RTL */
[dir="rtl"] .right-0 { right: auto !important; left: 0 !important; }
[dir="rtl"] .left-0 { left: auto !important; right: 0 !important; }

/* Flip order for RTL */
[dir="rtl"] .order-1 { order: 2 !important; }
[dir="rtl"] .order-2 { order: 1 !important; }

/* Ensure proper RTL layout for containers */
[dir="rtl"] .container {
    direction: rtl;
}

[dir="rtl"] .grid {
    direction: rtl;
}

/* RTL specific hover effects */
[dir="rtl"] .hover\:bg-primary-600:hover {
    background-color: rgb(202 138 4) !important;
}

/* RTL specific transitions */
[dir="rtl"] .transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke !important;
}

/* === Modern Sidebar Styles === */
.sidebar {
    background: #1A202C;
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(234, 179, 8, 0.2);
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: fixed;
    top: 64px;
    height: calc(100vh - 64px);
    overflow: hidden;
}


.sidebar:hover {
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 12px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}





/* Sidebar Navigation */
.sidebar-nav {
    padding: 0;
    margin: 0;
    list-style: none;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section-title {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    padding: 0 1rem;
    position: relative;
}

.sidebar-section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 1rem;
    right: 1rem;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), transparent);
}

/* Sidebar Menu Items */
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 2;
}

.sidebar-item {
    margin-bottom: 0.5rem;
    position: relative;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-radius: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-weight: 500;
    font-size: 0.9rem;
    margin: 0 0.5rem;
    border: 1px solid transparent;
    backdrop-filter: blur(10px);
}

.sidebar-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(234, 179, 8, 0.2), 
        rgba(234, 179, 8, 0.1), 
        transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.sidebar-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(234, 179, 8, 0.1) 0%, 
        rgba(234, 179, 8, 0.05) 50%, 
        transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.sidebar-link:hover::before {
    left: 100%;
}

.sidebar-link:hover::after {
    opacity: 1;
}

.sidebar-link:hover {
    background: rgba(234, 179, 8, 0.15);
    color: #fbbf24;
    transform: translateX(8px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(234, 179, 8, 0.3),
        0 0 0 1px rgba(234, 179, 8, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(234, 179, 8, 0.3);
}

.sidebar-link.active {
    background: linear-gradient(135deg, 
        rgba(234, 179, 8, 0.25) 0%, 
        rgba(234, 179, 8, 0.15) 100%);
    color: #fbbf24;
    border-left: 4px solid #eab308;
    box-shadow: 
        0 8px 25px rgba(234, 179, 8, 0.4),
        0 0 0 1px rgba(234, 179, 8, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateX(8px);
    border-color: rgba(234, 179, 8, 0.4);
}

.sidebar-link.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, #eab308, #fbbf24);
    border-radius: 2px 0 0 2px;
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.5);
}

/* Sidebar Icons */
.sidebar-icon {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

.sidebar-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, 
        rgba(234, 179, 8, 0.1) 0%, 
        rgba(234, 179, 8, 0.05) 100%);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: -1;
}

.sidebar-link:hover .sidebar-icon {
    transform: scale(1.15) rotate(5deg);
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.sidebar-link:hover .sidebar-icon::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
    background: linear-gradient(135deg, 
        rgba(234, 179, 8, 0.2) 0%, 
        rgba(234, 179, 8, 0.1) 100%);
}

.sidebar-link.active .sidebar-icon {
    color: #fbbf24;
    transform: scale(1.1);
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
}

.sidebar-link.active .sidebar-icon::before {
    opacity: 1;
    background: linear-gradient(135deg, 
        rgba(234, 179, 8, 0.25) 0%, 
        rgba(234, 179, 8, 0.15) 100%);
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.3);
}

/* Sidebar Footer */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile Sidebar Toggle */
.sidebar-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    display: none;
}

.sidebar-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

@media (max-width: 1024px) {
    .sidebar-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
}

/* Sidebar Backdrop */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Enhanced Animations for sidebar items */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.sidebar-item {
    animation: slideInLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: both;
}

.sidebar-item:nth-child(1) { animation-delay: 0.1s; }
.sidebar-item:nth-child(2) { animation-delay: 0.15s; }
.sidebar-item:nth-child(3) { animation-delay: 0.2s; }
.sidebar-item:nth-child(4) { animation-delay: 0.25s; }
.sidebar-item:nth-child(5) { animation-delay: 0.3s; }
.sidebar-item:nth-child(6) { animation-delay: 0.35s; }
.sidebar-item:nth-child(7) { animation-delay: 0.4s; }
.sidebar-item:nth-child(8) { animation-delay: 0.45s; }
.sidebar-item:nth-child(9) { animation-delay: 0.5s; }
.sidebar-item:nth-child(10) { animation-delay: 0.55s; }

/* Enhanced section titles */
.sidebar-section-title {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.sidebar-section:nth-child(1) .sidebar-section-title { animation-delay: 0.2s; }
.sidebar-section:nth-child(2) .sidebar-section-title { animation-delay: 0.4s; }
.sidebar-section:nth-child(3) .sidebar-section-title { animation-delay: 0.6s; }

/* Loading state animation */
.sidebar-loading {
    animation: pulse 2s infinite;
}

/* Shimmer effect for loading items */
.sidebar-shimmer {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Micro-interactions and smooth transitions */
.sidebar-link {
    will-change: transform, box-shadow, background-color;
}

.sidebar-link:active {
    transform: translateX(4px) scale(0.98);
    transition: all 0.1s ease;
}

/* Enhanced focus states for accessibility */
.sidebar-link:focus {
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(234, 179, 8, 0.3),
        0 8px 25px rgba(234, 179, 8, 0.3);
    border-color: rgba(234, 179, 8, 0.5);
}

/* Smooth transitions for all interactive elements */
.sidebar-toggle {
    will-change: transform, box-shadow;
}

.sidebar-toggle:active {
    transform: scale(0.95);
}

/* Enhanced mobile responsiveness */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 
            0 0 0 1px rgba(255, 255, 255, 0.1),
            0 20px 60px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    
    .sidebar-link {
        margin: 0 0.25rem;
        padding: 0.75rem 1rem;
    }
    
    .sidebar-link:hover {
        transform: translateX(4px) scale(1.01);
    }
}

/* RTL Support for enhanced sidebar */
[dir="rtl"] .sidebar {
    right: 0;
    left: auto;
    border-right: none;
    border-left: 1px solid rgba(234, 179, 8, 0.2);
}

[dir="rtl"] .sidebar-link:hover {
    transform: translateX(-8px) scale(1.02);
}

[dir="rtl"] .sidebar-link.active {
    transform: translateX(-8px);
    border-left: none;
    border-right: 4px solid #eab308;
}

[dir="rtl"] .sidebar-link.active::after {
    right: auto;
    left: 0;
    border-radius: 0 2px 2px 0;
}

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

/* Performance optimizations */
.sidebar * {
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .sidebar-link,
    .sidebar-icon,
    .sidebar-brand,
    .sidebar-item {
        animation: none;
        transition: none;
    }
    
    .sidebar-link:hover {
        transform: none;
    }
} 