/* تحسينات التصميم المتجاوب للغة العربية */
:root {
    --primary-color: #1E88E5;
    --secondary-color: #757575;
    --success-color: #2E7D32;
    --warning-color: #FFA000;
    --danger-color: #D32F2F;
}

/* إعدادات عامة */
body {
    font-family: "Tajawal", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    direction: rtl;
}

/* تحسينات البطاقات */
.card {
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 1rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* تحسينات لوحة المعلومات */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
}

.stat-card .icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* تحسينات الجداول */
.table-responsive {
    margin-bottom: 1.5rem;
    border-radius: 10px;
    overflow: hidden;
}

.table {
    width: 100%;
    margin-bottom: 0;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    padding: 1rem;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

/* تحسينات الأزرار */
.btn {
    border-radius: 5px;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* تحسينات القوائم الجانبية */
.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    height: 100%;
    width: 260px;
    background: #fff;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: all 0.3s;
}

/* تحسينات الإشعارات */
.toast {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
}

/* تحسينات المخططات البيانية */
.chart-container {
    position: relative;
    margin: auto;
    height: 300px;
    width: 100%;
}

/* تحسينات التجاوب */
@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
    }

    .sidebar {
        transform: translateX(100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-right: 0;
    }

    .card-body {
        padding: 1rem;
    }

    .table-responsive {
        margin: 0 -1rem;
        width: calc(100% + 2rem);
    }
}

/* تحسينات الألوان للوضع المظلم */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #ffffff;
    }

    .card {
        background-color: #2d2d2d;
    }

    .table th {
        background-color: #2d2d2d;
    }

    .table td {
        border-color: #404040;
    }
}

/* تحسينات الحركة */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}
