body {
    font-family: Arial, sans-serif;
    direction: rtl; /* اتجاه النص من اليمين إلى اليسار */
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

h1, h2, h3 {
    color: #333;
    text-align: center;
}

nav {
    background-color: #333;
    color: #fff;
    padding: 10px 0;
    text-align: center;
}

nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

nav ul li {
    display: inline;
    margin: 0 15px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
}

#content {
    padding: 20px;
    margin: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: right; /* محاذاة النص في الجدول إلى اليمين */
}

th {
    background-color: #f2f2f2;
}

form {
    margin-bottom: 20px;
    text-align: right; /* محاذاة النموذج إلى اليمين */
    display: flex; /* استخدام Flexbox للنموذج */
    flex-direction: column; /* ترتيب العناصر عموديا */
    align-items: flex-end; /* محاذاة العناصر إلى اليمين */
}

form label {
    display: block; /* جعل label عنصر block */
    margin-bottom: 5px; /* إضافة مسافة أسفل label */
    text-align: right;
    width: 100%; /* جعل label بعرض 100% */
}

form input[type="text"],
form input[type="number"],
form input[type="date"],
form select,
form textarea {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%; /* جعل الحقول بعرض 100% */
    box-sizing: border-box;
    margin-bottom: 10px; /* إضافة مسافة أسفل الحقول */
}

form input[type="submit"] {
    background-color: #5cb85c;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    align-self: flex-start; /* محاذاة زر الإرسال إلى اليمين */
    margin: 0 auto;
    margin-top: 0px;
    margin-bottom: 0px;
    margin-top: 14px;
    margin-bottom: 14px;
    width: 100%;
}

form input[type="submit"]:hover {
    background-color: #4cae4c;
    margin: 0 auto;
    margin-top: 0px;
    margin-bottom: 0px;
    margin-top: 14px;
    margin-bottom: 14px;
    width: 100%;
}

.error {
    color: red;
}
.success {
    color: green;
}

/* تنسيقات إضافية لواجهة التقارير */
.reports-nav {
    text-align: center; /* توسيط القائمة */
    margin-bottom: 20px;
}

.reports-nav ul {
    display: inline-block; /* لجعل القائمة في المنتصف */
}

.reports-nav ul li {
    display: block; /* عرض العناصر بشكل عمودي */
    margin: 10px 0;
}

.reports-nav ul li a {
    display: block; /* جعل الروابط تملأ المساحة */
    padding: 10px 15px;
    background-color: #f2f2f2;
    color: #333;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.reports-nav ul li a:hover {
    background-color: #ddd;
}

/* استعلامات الوسائط للتجاوب */
@media screen and (min-width: 768px) {
    form {
        max-width: 700px; /* تحديد أقصى عرض للنموذج على الشاشات الكبيرة */
        margin-right: auto;
        margin-left: auto;
    }

    form label {
        width: 150px; /* تحديد عرض ثابت لـ label على الشاشات الكبيرة */
        display: inline-block; /* جعل label عنصر inline-block */
        text-align: right;
        margin-left: 10px;
    }

    form input[type="text"],
    form input[type="number"],
    form input[type="date"],
    form select,
    form textarea {
        width: calc(100% - 10px); /* تقليل عرض الحقول لترك مساحة لـ label */
        display: inline-block; /* جعل الحقول عنصر inline-block */
        margin-bottom: 10px;
    }
}