:root {
    /* الألوان الرئيسية */
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --primary-bg: rgba(79, 70, 229, 0.1);

    /* الألوان الثانوية */
    --secondary: #64748b;
    --secondary-dark: #475569;
    --secondary-light: #94a3b8;

    /* ألوان الحالة */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* ألوان محايدة */
    --dark: #1e293b;
    --light: #f1f5f9;
    --border: #e2e8f0;

    /* الظلال */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* التنسيقات الأساسية */
body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    min-height: 100vh;
}

/* الحاوية الرئيسية */
.main-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
    background-color: var(--light);
}

/* المحتوى الرئيسي */
.main-content {
    flex: 1;
    margin-right: 280px;
    min-height: 100vh;
    background-color: var(--light);
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* الهيدر */
.header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background-color: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    z-index: 1020;
}

/* منطقة المحتوى */
.content-wrapper {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    max-width: 100%;
}

/* السايدبار */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background-color: var(--dark);
    color: #fff;
    z-index: 1030;
    transition: all 0.3s ease;
    overflow-y: auto;
}

/* تجاوب الشاشات الصغيرة */
@media (max-width: 991.98px) {
    .main-content {
        margin-right: 0;
        width: 100%;
    }

    .sidebar {
        transform: translateX(100%);
    }

    .sidebar-show .sidebar {
        transform: translateX(0);
    }

    .sidebar-show::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1025;
    }

    .content-wrapper {
        padding: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .content-wrapper {
        padding: 1rem;
    }

    .header {
        height: 60px;
    }
}

/* تنسيقات الداشبورد */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.dashboard-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* تنسيق الجداول في الداشبورد */
.dashboard-table {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
}

.dashboard-table .table {
    margin: 0;
}

.dashboard-table th {
    background-color: var(--light);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.dashboard-table td {
    vertical-align: middle;
}

/* التنسيقات العامة */
.card {
    border: none;
    border-radius: 1rem;
    background-color: #fff;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: none;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.card-title {
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.card-subtitle {
    color: var(--secondary);
    font-size: 0.875rem;
}

/* الأزرار */
.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-soft-primary {
    background-color: var(--primary-bg);
    color: var(--primary);
    border: none;
}

.btn-soft-primary:hover {
    background-color: var(--primary);
    color: #fff;
}

/* الشارات */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    border-radius: 0.5rem;
}

.bg-soft-primary {
    background-color: var(--primary-bg);
    color: var(--primary);
}

.bg-soft-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.bg-soft-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.bg-soft-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* التدرجات اللونية */
.bg-gradient-primary {
    background: linear-gradient(45deg, var(--primary), var(--primary-light));
}

.bg-gradient-secondary {
    background: linear-gradient(45deg, var(--secondary-dark), var(--secondary));
}

/* الجداول */
.table {
    margin-bottom: 0;
}

.table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem;
    background-color: var(--light);
    border-bottom: 2px solid var(--border);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}

/* تأثيرات الحركة */
.hover-lift {
    transition: transform 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
}

/* Custom CSS */
.btn-group > .btn {
    margin: 0 2px;
}
.btn-group .btn {
    border-radius: 4px !important;
}
.action-buttons .btn {
    padding: 0.375rem 0.5rem;
    line-height: 1;
}
.btn i {
    font-size: 0.9rem;
}
.table > :not(caption) > * > * {
    padding: 0.75rem 0.75rem;
}

/* Toastr Customization */
#toast-container {
    font-family: 'Cairo', sans-serif;
    padding: 15px;
}
#toast-container .toast {
    background-image: none !important;
    padding: 15px !important;
    width: 400px !important;
    max-width: 100% !important;
    border-radius: 15px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15) !important;
}
#toast-container > div {
    padding: 20px 20px 20px 50px !important;
    opacity: 1 !important;
    box-shadow: none !important;
}
.toast-success {
    background-color: #1e6641 !important;
    border-right: 6px solid #25b565 !important;
}
.toast-error {
    background-color: #991b1b !important;
    border-right: 6px solid #ef4444 !important;
}
.toast-warning {
    background-color: #854d0e !important;
    border-right: 6px solid #eab308 !important;
}
.toast-info {
    background-color: #0c4a6e !important;
    border-right: 6px solid #0ea5e9 !important;
}
#toast-container > .toast:before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 20px;
    line-height: 20px;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
}
#toast-container > .toast-success:before {
    content: "\f00c";
}
#toast-container > .toast-error:before {
    content: "\f00d";
}
#toast-container > .toast-warning:before {
    content: "\f071";
}
#toast-container > .toast-info:before {
    content: "\f129";
}
.toast-close-button {
    font-size: 20px !important;
    font-weight: 400 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: 12px !important;
    text-shadow: none !important;
    opacity: 0.6 !important;
}
.toast-close-button:hover {
    opacity: 1 !important;
}
.toast-message {
    font-size: 15px !important;
    line-height: 1.5 !important;
    padding-right: 15px !important;
    padding-left: 10px !important;
}
.toast-progress {
    height: 4px !important;
    opacity: 0.5 !important;
    background-color: rgba(255, 255, 255, 0.7) !important;
}
.badge-success {
    color: #ffffff !important;
    font-weight: bold !important;
}
.badge-danger {
    color: #000000 !important;
    font-weight: bold !important;
}
.badge-info {
    color: #ffffff !important;
    font-weight: bold !important;
    background-color: #10b981 !important;
}
.badge-success {
    background-color: #3b82f6 !important;
}

.badge-warning {
    color: #ffffff !important;
    font-weight: bold !important;
    background-color: #10b981 !important;
}
/* تنسيقات البطاقات الإحصائية */
.stat-card {
    border: none;
    border-radius: 0.75rem;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.primary {
    background: linear-gradient(45deg, var(--primary), var(--primary-dark));
}

.stat-card.success {
    background: linear-gradient(45deg, var(--success), #0d9488);
}

.stat-card.info {
    background: linear-gradient(45deg, var(--info), #2563eb);
}

.stat-card.warning {
    background: linear-gradient(45deg, var(--warning), #d97706);
}

.stat-card.danger {
    background: linear-gradient(45deg, var(--danger), #dc2626);
}

.stat-card.purple {
    background: linear-gradient(45deg, #8b5cf6, #7c3aed);
}

.icon-shape {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* تنسيقات الرسوم البيانية */
.chart-container {
    position: relative;
    height: 350px;
    width: 100%;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
}

.card-header h6 {
    font-size: 1rem;
    font-weight: 600;
}

/* تنسيقات التنبيهات */
.notifications-container::-webkit-scrollbar {
    width: 6px;
}

.notifications-container::-webkit-scrollbar-track {
    background: var(--light);
}

.notifications-container::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 3px;
}

.alert {
    border: none;
    border-radius: 0.5rem;
}

/* تنسيقات شريط التقدم */
.progress {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.progress-bar {
    border-radius: 2px;
}
/* تنسيقات الإحصائيات */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: var(--white);
    border-radius: 0.5rem;
    padding: 1.25rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
    margin: 0;
}

.stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.stat-subtitle {
    font-size: 0.875rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
}

.trend-up {
    background: var(--success-light);
    color: var(--success);
}

.trend-down {
    background: var(--danger-light);
    color: var(--danger);
}

/* تنسيقات الرسوم البيانية المحسنة */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-wrapper {
    background: var(--white);
    border-radius: 0.5rem;
    padding: 1.25rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.chart-actions {
    display: flex;
    gap: 0.5rem;
}

.chart-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.chart-btn:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}



