
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

header {
    background-color: #6a11cb;
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

header h1 {
    margin: 0;
    font-size: 1.8em;
    display: flex;
    align-items: center;
}

header .logo {
    height: 40px;
    margin-right: 15px;
}

.navbar {
    background-color: #333;
    color: white;
    padding: 10px 0;
    border-radius: 5px;
    margin-bottom: 20px;
}

.navbar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

.navbar ul li {
    margin: 0 15px;
}

.navbar ul li a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    display: block;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.navbar ul li a:hover,
.navbar ul li a.active {
    background-color: #555;
}

h2 {
    color: #6a11cb;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-top: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1em;
    background-color: #fcfcfc;
}

.form-group input[type="submit"],
.btn {
    background-color: #6a11cb;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.form-group input[type="submit"]:hover,
.btn:hover {
    background-color: #45a049;
}

.btn-danger {
    background-color: #f44336;
}

.btn-danger:hover {
    background-color: #da190b;
}

.btn-info {
    background-color: #2196F3;
}

.btn-info:hover {
    background-color: #0b7dda;
}

.table-responsive {
    overflow-x: auto; /* هذا يضمن التمرير الأفقي */
    margin-top: 30px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    min-width: 700px; /* تمت الإضافة لضمان حد أدنى لعرض الجدول للتمرير، يمكن تعديله حسب الحاجة */
}

table th, table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    white-space: nowrap; /* يمنع التفاف النص داخل الخلايا، للحفاظ على عرض العمود */
}

table th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #555;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:hover {
    background-color: #f1f1f1;
}

.actions {
    display: flex;
    gap: 5px;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #eef;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.filter-form .form-group {
    flex: 1 1 200px; /* يسمح للعناصر بالنمو والتقلص، مع أساس 200 بكسل */
    margin-bottom: 0;
}

.filter-form input[type="submit"] {
    flex-basis: 150px;
    margin-top: 25px; /* محاذاة مع حقول الإدخال */
}

/* Specific styles for difference type dropdowns */
#difference_reason_increase,
#difference_reason_decrease {
    display: none; /* مخفية بشكل افتراضي */
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        padding-bottom: 10px;
    }

    header h1 {
        font-size: 1.5em;
        margin-bottom: 10px;
    }

    header .logo {
        height: 30px;
    }

    .navbar ul {
        flex-direction: column;
        align-items: center;
    }

    .navbar ul li {
        margin: 5px 0;
    }

    .container {
        width: 98%;
        margin: 10px auto;
        padding: 15px;
    }

    .filter-form {
        flex-direction: column;
    }

    .filter-form .form-group {
        flex-basis: auto;
    }

    .filter-form input[type="submit"] {
        margin-top: 10px;
        width: 100%;
    }
}

/* تم إزالة القاعدة التي تخفي الأعمدة على الشاشات الصغيرة، مما يسمح بالتمرير الأفقي الكامل */
/* @media (max-width: 600px) {
    table th:nth-child(n+7),
    table td:nth-child(n+7) {
        display: none;
    }
} */