/* استدعاء خط Tajawal */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap');

:root {
  --brand-primary: #4a4a4a;   /* الرمادي الداكن من الشعار */
  --brand-accent: #ff8c69;    /* البرتقالي المرجاني من الشعار */
  --sidebar-width: 280px;
  --bg-sidebar: #3d3d3d;      /* درجة رمادي أفتح قليلاً للعمق */
}

body {
    font-family: 'Tajawal', sans-serif;
    margin: 0;
    direction: rtl;
    background-color: #f0f2f5;
}

/* SIDEBAR in sidebar_content.php */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 30px 15px;
    box-sizing: border-box;
    overflow: hidden;
    z-index: 1000;
}

/* حاوية الروابط القابلة للتمرير */
.sidebar-menu-wrapper {
    flex: 1; /* تأخذ كل المساحة المتاحة وتدفع الفوتر للأسفل */
    overflow-y: auto;
    padding: 0 15px; /* إعادة البادينج هنا بدلاً من السايدبار الرئيسي */
    scrollbar-width: none; /* لإخفاء الشريط في Firefox */
}

.sidebar-menu-wrapper::-webkit-scrollbar {
    display: none; /* لإخفاء الشريط في Chrome/Safari */
}

.sidebar-footer {
    margin-top: auto; /* يضمن بقاءه في القاع */
    padding: 20px 15px;
    background: rgba(0,0,0,0.1); /* تمييز بسيط عن منطقة التمرير */
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* تنسيق الملف الشخصي في القائمة */
.user-profile {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 15px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    background: var(--brand-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: bold;
    font-size: 18px;
}

.user-info h4 { margin: 0; font-size: 14px; color: #fff; }
.user-info span { font-size: 11px; color: #888; text-transform: uppercase; }

/* عناوين المجموعات */
.menu-label {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 20px 10px 10px 0;
    font-weight: 700;
}

/* الروابط */
/* تنسيق الروابط */
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #cbd5e1;
    text-decoration: none;
    transition: 0.3s;
    border-radius: 0 25px 25px 0; /* شكل عصري للرابط المفعل */
    margin: 4px 0;
}

.sidebar-link i { margin-left: 10px; font-size: 18px; width: 25px; text-align: center; }

.sidebar-link.active {
    background: rgba(240, 90, 40, 0.1);
    color: #f05a28;
    border-right: 4px solid #f05a28;
}

.sidebar-link:hover { background: rgba(255,255,255,0.05); color: #fff; }

/* أزرار الإضافة في الأسفل */
.btn-sidebar-new {
    display: block;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    margin: 8px 15px;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    transition: 0.3s;
}

.btn-offer { background: #f05a28; color: white; }
.btn-request { border: 1px solid #475569; color: #cbd5e1; }

/* .sidebar a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 5px;
    transition: 0.2s ease;
    font-size: 14px;
}

.sidebar a i {
    margin-left: 12px;
    width: 20px;
    text-align: center;
} */

/* .sidebar a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar a.active i {
    color: var(--brand-accent);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
}

.btn-sidebar-new {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 10px;
    transition: 0.3s;
}

.btn-offer { background: rgba(255,255,255,0.1); color: white; border: 1px solid rgba(255,255,255,0.2); }
.btn-request { background: rgba(255,255,255,0.1); color: white; border: 1px solid rgba(255,255,255,0.2); } */

.main-content {
    margin-right: 270px;
    padding: 30px;
}

h1, h3 {
    color: var(--primary);
    font-weight: 700;
}

/* تنسيق الجداول المطور */
.table-container {
    background: white;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 10px; /* لضمان حواف دائرية للجدول */
}

/* تمييز العناوين بخلفية داكنة */
table thead tr {
    background-color: var(--brand-primary); /* الرمادي الداكن من الهوية */
    color: #ffffff;
    text-align: right;
}

table th {
    padding: 15px;
    font-weight: 500;
    font-size: 14px;
    border: none;
}

/* تمييز السجلات بتدرج لونين (Zebra Striping) */
table tbody tr:nth-child(even) {
    background-color: #f8f9fa; /* لون رمادي فاتح جداً للصفوف الزوجية */
}

table tbody tr:nth-child(odd) {
    background-color: #ffffff; /* لون أبيض للصفوف الفردية */
}

/* تأثير عند تمرير الفأرة على الصف */
table tbody tr:hover {
    background-color: rgba(255, 140, 105, 0.05); /* لمسة خفيفة من البرتقالي */
    transition: 0.2s;
}

table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    color: #444;
}

/* تنسيق أزرار الأكشن داخل الجداول
.btn-action {
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 12px;
    margin: 0 2px;
} */

/* فلاتر البحث */
.filter-bar {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 12px;
    color: #888;
    font-weight: bold;
}

.filter-group select, .filter-group input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Tajawal', sans-serif;
    min-width: 150px;
    outline: none;
}

.submit-btn, .btn-filter {
    background-color: var(--brand-primary);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.btn-filter:hover {
    background-color: var(--brand-accent);
}

.btn-reset {
    background-color: #eee;
    color: #555;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
}

.btn {
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 12px;
    margin: 0 2px;
    font-weight: 500;
    transition: 0.3s;
}

.btn-add {
    background: var(--accent); /* زر الإضافة برتقالي */
    color: white;
    width: 100%;
    display: block;
    text-align: center;
    margin-bottom: 20px;
}

.form-group select, .form-group input, .form-group textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Tajawal', sans-serif;
    min-width: 150px;
    outline: none;
}

.btn-add:hover { opacity: 0.9; }

.btn-delete { text-decoration: none; color: white; padding: 5px 10px; background: #e74c3c; }
.btn-edit { text-decoration: none; color: white; padding: 5px 10px; background: #3498db; }