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

:root {
    --primary-color: #0078ff;
    --primary-dark: #0056b3;
    --primary-light: #e6f0ff;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --text-muted: #64748b;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    
    --font-en: 'Outfit', sans-serif;
    --font-ar: 'Tajawal', sans-serif;
}

body {
    background-color: #f1f5f9;
    font-size: 0.95rem;
    color: var(--dark-color);
}

[dir="ltr"] {
    font-family: var(--font-en);
}

[dir="rtl"] {
    font-family: var(--font-ar);
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    top: 0;
    z-index: 100;
    background-color: #ffffff;
    border-right: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

[dir="rtl"] .sidebar {
    border-right: none;
    border-left: 1px solid var(--border-color);
    text-align: right;
}

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

.main-content {
    margin-left: 260px;
    min-height: 100vh;
    transition: all 0.3s ease;
    padding-top: 70px;
}

[dir="rtl"] .main-content {
    margin-left: 0;
    margin-right: 260px;
}

/* Header Navbar */
.navbar-top {
    height: 70px;
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    z-index: 99;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

[dir="rtl"] .navbar-top {
    left: 0;
    right: 260px;
}

/* Cards */
.stat-card {
    border: none;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    background-color: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.stat-card .card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Sidebar Menu Items */
.nav-link-custom {
    display: flex;
    align-items: center;
    padding: 0.65rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
    font-size: 0.85rem;
}

[dir="rtl"] .nav-link-custom {
    border-left: none;
    border-right: 4px solid transparent;
}

.nav-link-custom:hover, .nav-link-custom.active {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.nav-link-custom.active {
    border-left-color: var(--primary-color);
}

[dir="rtl"] .nav-link-custom.active {
    border-right-color: var(--primary-color);
}

.nav-link-custom i {
    font-size: 1.2rem;
    margin-right: 12px;
}

[dir="rtl"] .nav-link-custom i {
    margin-right: 0;
    margin-left: 12px;
}

/* Layout adjustments for smaller screens */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    [dir="rtl"] .sidebar {
        transform: translateX(100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content, [dir="rtl"] .main-content {
        margin-left: 0;
        margin-right: 0;
    }
    .navbar-top, [dir="rtl"] .navbar-top {
        left: 0;
        right: 0;
    }
}

/* Sidebar Collapsible Sections */
.sidebar-section-header {
    cursor: pointer;
    font-size: 0.85rem !important;
    letter-spacing: 0.5px;
    padding: 0.65rem 1.5rem;
    transition: background-color 0.2s ease;
    border-radius: 0;
}
.sidebar-section-header:hover {
    background-color: var(--primary-light);
    color: var(--primary-color) !important;
}
.sidebar-section-content {
    display: none;
}
.sidebar-section-content.show {
    display: block;
}
.section-chevron {
    transition: transform 0.2s ease;
    font-size: 0.8rem;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 2rem;
}

/* RTL Dropdown Alignment overrides */
[dir="rtl"] .dropdown-menu {
    text-align: right;
}
[dir="rtl"] .dropdown-item {
    text-align: right;
}
[dir="rtl"] .dropdown-item i {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}
[dir="rtl"] .dropdown-menu-end {
    left: 0 !important;
    right: auto !important;
}
[dir="rtl"] .dropdown-header {
    text-align: right;
}

