/* Venzor System CSS - تصميم هادئ وموحد */

/* إعدادات عامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f6fa;
    color: #2c3e50;
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
}

/* الحاوي الرئيسي */
.main-container {
    display: flex;
    min-height: 100vh;
    background-color: #f5f6fa;
}

/* القائمة الجانبية */
.sidebar {
    width: 260px;
    background-color: #f5f6fa;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    border: none;
}

/* بحث القائمة الجانبية */
.sidebar-search {
    padding: 0 15px 20px;
    margin-bottom: 15px;
}

.sidebar-search input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 13px;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

.sidebar-search input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* قائمة التنقل الجانبية */
.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu li {
    margin-bottom: 2px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #7f8c8d;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-menu a:hover {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
    transform: translateX(-3px);
}

.sidebar-menu a.active {
    background-color: #3498db;
    color: white;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.sidebar-menu a i {
    margin-left: 12px;
    width: 18px;
    text-align: center;
    font-size: 16px;
}

/* المحتوى الرئيسي */
.main-content {
    flex: 1;
    margin-right: 260px;
    background-color: #f5f6fa;
    min-height: 100vh;
    position: relative;
}

/* الشريط العلوي */
.top-bar {
    background-color: #f5f6fa;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 10px 45px 10px 20px;
    border: 1px solid #ddd;
    border-radius: 25px;
    width: 320px;
    font-size: 14px;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-box i {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
    font-size: 16px;
}

/* قائمة المستخدم */
.user-menu {
    position: relative;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background-color: #ffffff;
    border: 1px solid #ecf0f1;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.user-dropdown:hover {
    background-color: #ecf0f1;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
}

.user-role {
    font-size: 12px;
    color: #7f8c8d;
}

.dropdown-arrow {
    color: #95a5a6;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.user-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* قائمة المستخدم المنسدلة */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background-color: white;
    border: 1px solid #ecf0f1;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    min-width: 220px;
    z-index: 1001;
    display: none;
    overflow: hidden;
}

.user-dropdown-menu.show {
    display: block;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.user-dropdown-menu a:hover {
    background-color: #f8f9fa;
    color: #3498db;
}

.user-dropdown-menu a i {
    margin-left: 12px;
    width: 18px;
    color: #7f8c8d;
    font-size: 16px;
}

.user-dropdown-menu .divider {
    height: 1px;
    background-color: #ecf0f1;
    margin: 5px 0;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: #ffffff;
    border: 1px solid #ecf0f1;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-switcher:hover {
    background-color: #ecf0f1;
}

.language-switcher i {
    color: #7f8c8d;
    font-size: 16px;
}

.language-switcher span {
    font-size: 13px;
    color: #2c3e50;
    font-weight: 500;
}

/* محتوى الصفحة */
.page-content {
    padding: 30px;
}

/* الرسائل */
.messages {
    margin-bottom: 25px;
}

.alert {
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 12px;
    border: none;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-right: 4px solid #28a745;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-right: 4px solid #dc3545;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-right: 4px solid #ffc107;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-right: 4px solid #17a2b8;
}

/* حقوق النظام */
.copyright {
    position: fixed;
    bottom: 20px;
    left: 25px;
    font-size: 11px;
    color: #bdc3c7;
    font-weight: 400;
    z-index: 1000;
    font-family: 'Segoe UI', sans-serif;
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
    }
    
    .search-box input {
        width: 220px;
    }
    
    .top-bar {
        padding: 15px 20px;
    }
}

/* أنماط إضافية للصفحات */
.page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ecf0f1;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.page-subtitle {
    color: #7f8c8d;
    font-size: 15px;
}

/* الأزرار */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
}

/* الجداول */
.table-container {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid #f0f0f0;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* النماذج */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* حقوق النظام */
.copyright {
    position: fixed;
    bottom: 15px;
    right: 15px;
    font-size: 11px;
    color: #999;
    opacity: 0.7;
    z-index: 1001;
}

/* إخفاء الحقوق في الطباعة */
@media print {
    .copyright {
        display: none !important;
    }
    
    .sidebar {
        display: none !important;
    }
    
    .top-bar {
        display: none !important;
    }
    
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* الاستجابة للشاشات الصغيرة */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
    }
    
    .top-bar {
        right: 0;
    }
}

/* تحسينات إضافية */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* حالات التحميل */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #999;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
