body {
    font-family: 'Arial', sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    direction: rtl !important;
    text-align:right !important;
}

header {
    background-color: #343a40;
    color: #ffffff;
}

.header .navbar-brand {
    font-size: 1.5em;
}

.header .nav-link {
    font-size: 1.1em;
    margin-left: 15px;
}

.container {
    padding: 2em;
}

h1, h2, h3, h4 {
    color: #343a40;
    text-align: right; /* محاذاة العناوين لليمين */
    margin-bottom: 1em;
}


/* لجعل الجداول متجاوبة وتناسب عرض الهاتف المحمول */
.table-responsive {
    text-align:right !important;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* لدعم التمرير السلس على الأجهزة المحمولة */
}

.table {
    text-align:right !important;
    width: 100%;
    max-width: 100%;
    margin-bottom: 1rem;
    background-color: transparent;
    border-collapse: collapse; /* ضمان عدم وجود فجوات بين خلايا الجدول */
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
    text-align:right !important;
}

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
    text-align:right !important;
}

.table-sm th,
.table-sm td {
    padding: 0.3rem;
    text-align:right !important;
}

/* لضبط حجم الجدول وتكييفه مع عرض الشاشة */
@media (max-width: 767.98px) {
    .table-responsive {
        border: 0;
    }

    .table-responsive .table {
        margin-bottom: 0;
    }

    .table-responsive .table thead {
        display: none; /* إخفاء الرأس لجعل الجدول يبدو أكثر تنظيماً */
    }

    .table-responsive .table tbody {
        display: block;
        width: 100%;
    }

    .table-responsive .table tbody tr {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-bottom: 1rem;
    }

    .table-responsive .table tbody tr td {
        display: flex;
        justify-content: space-between;
        padding: 0.75rem;
        border-top: 1px solid #dee2e6;
        border-left: none;
        border-right: none;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }

    .table-responsive .table tbody tr td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%;
        padding-left: 0.75rem;
        font-weight: bold;
    }
}


th, td {
    padding: 0.75em;
    text-align: right; /* محاذاة النص لليمين */
}

th {
    background-color: #e9ecef;
}

.alert {
    text-align: right; /* محاذاة النص لليمين */
}

button, .btn {
    background-color: #007bff;
    color: #ffffff;
    border: none;
    cursor: pointer;
    padding: 0.5em 1em;
    border-radius: 0.25em;
    font-size: 1em;
    margin: 0.25em; /* تحسين تصميم الأزرار */
    text-align: center;
}

button:hover, .btn:hover {
    background-color: #0056b3;
}

.form-group label {
    font-weight: bold;
    margin-top: 0.5em;
    text-align: right; /* محاذاة النص لليمين */
    display: block;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.5em;
    margin-top: 0.25em;
    border: 1px solid #ced4da;
    border-radius: 0.25em;
}


.btn-block {
    font-size: 1.2em;
    padding: 0.75em;
}

.main-content {
    padding-top: 2em;
}


.card {
    margin-bottom: 1.5em;
    border: none;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #007bff;
    color: #ffffff;
    font-size: 1.2em;
    text-align: center;
}

.card-body {
    text-align: right; /* محاذاة النص لليمين */
    background-color: #ffffff;
    padding: 1.5em;
}

.alert-info {
    background-color: #e9f7ff;
    color: #333333;
    border: none;
    text-align: right; /* محاذاة النص لليمين */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

