/**
 * نظام بداية ديجتال - التصميم الرئيسي
 * Bedaya Digital Sales System - Main Stylesheet
 * 
 * التصميم RTL بالكامل مع دعم الريسبونسف
 * ألوان الهوية: تدرج بنفسجي/أزرق غامق
 */

/* ============================================
   متغيرات CSS العامة (Design Tokens)
   ============================================ */
:root {
    /* الألوان الرئيسية */
    --primary: #6C5CE7;
    --primary-dark: #5A4BD1;
    --primary-light: #A29BFE;
    --primary-gradient: linear-gradient(135deg, #6C5CE7 0%, #4834D4 100%);
    
    /* ألوان ثانوية */
    --secondary: #2D3436;
    --secondary-light: #636E72;
    
    /* ألوان الخلفية */
    --bg-main: #F8F9FD;
    --bg-card: #FFFFFF;
    --bg-sidebar: linear-gradient(180deg, #2D3436 0%, #1A1A2E 100%);
    --bg-header: #FFFFFF;
    
    /* ألوان النصوص */
    --text-primary: #2D3436;
    --text-secondary: #636E72;
    --text-light: #B2BEC3;
    --text-white: #FFFFFF;
    
    /* ألوان الحالات */
    --success: #00B894;
    --success-light: #E8F8F5;
    --danger: #E17055;
    --danger-light: #FDEDEC;
    --warning: #FDCB6E;
    --warning-light: #FEF9E7;
    --info: #74B9FF;
    --info-light: #EBF5FB;
    --dark: #2D3436;
    
    /* الظلال */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-primary: 0 4px 16px rgba(108, 92, 231, 0.3);
    
    /* الحدود */
    --border-color: #E9EBF0;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --border-radius-full: 50px;
    
    /* الأبعاد */
    --sidebar-width: 260px;
    --header-height: 70px;
    
    /* الخط */
    --font-family: 'Tajawal', 'Segoe UI', sans-serif;
    
    /* الحركة */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   إعادة تعيين وأساسيات
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-main);
    color: var(--text-primary);
    direction: rtl;
    text-align: right;
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   صفحة تسجيل الدخول / التسجيل
   ============================================ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1A1A2E 0%, #16213E 50%, #0F3460 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* خلفية متحركة بأشكال هندسية */
.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--primary);
    border-radius: 50%;
    top: -200px;
    left: -100px;
    opacity: 0.1;
    animation: float 8s ease-in-out infinite;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--primary-light);
    border-radius: 50%;
    bottom: -150px;
    right: -100px;
    opacity: 0.08;
    animation: float 6s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(10deg); }
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo h1 {
    font-size: 28px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.auth-logo p {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

/* ============================================
   عناصر النماذج (Forms)
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-card);
    transition: var(--transition);
    direction: rtl;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.form-control::placeholder {
    color: var(--text-light);
}

/* حقل مع أيقونة */
.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .form-control {
    padding-right: 44px;
}

.input-icon-wrapper .input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 18px;
}

/* Select */
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-card);
    transition: var(--transition);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23636E72' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

/* Textarea */
textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* ============================================
   الأزرار
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-white);
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.btn-success {
    background: var(--success);
    color: var(--text-white);
}

.btn-success:hover {
    background: #00A884;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: var(--text-white);
}

.btn-danger:hover {
    background: #D35B45;
    transform: translateY(-2px);
}

.btn-warning {
    background: var(--warning);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-white);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   التخطيط الرئيسي (مع الـ Sidebar)
   ============================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* القائمة الجانبية (Sidebar) */
.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    color: var(--text-white);
    z-index: 1000;
    overflow-y: auto;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, #A29BFE, #6C5CE7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-header small {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

/* روابط القائمة الجانبية */
.sidebar-nav {
    padding: 16px 0;
    flex: 1;
}

.sidebar-label {
    padding: 12px 20px 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 600;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    border-right: 3px solid transparent;
    margin: 2px 0;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-white);
    border-right-color: var(--primary-light);
}

.sidebar-link.active {
    background: rgba(108, 92, 231, 0.15);
    color: var(--primary-light);
    border-right-color: var(--primary);
}

.sidebar-link .icon {
    width: 22px;
    text-align: center;
    font-size: 18px;
}

/* معلومات المستخدم أسفل القائمة */
.sidebar-user {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.sidebar-user-info {
    overflow: hidden;
}

.sidebar-user-info h4 {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-info span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* المحتوى الرئيسي */
.main-content {
    flex: 1;
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* الهيدر */
.header {
    background: var(--bg-header);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 900;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-title h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.header-title p {
    font-size: 13px;
    color: var(--text-secondary);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* زر القائمة للموبايل */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
}

/* ============================================
   محتوى الصفحة
   ============================================ */
.page-content {
    padding: 30px;
    flex: 1;
}

/* عنوان الصفحة مع زر الأكشن */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 24px;
    font-weight: 700;
}

/* ============================================
   الكروت (Cards)
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 18px;
    font-weight: 700;
}

/* كروت الإحصائيات */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    border-radius: 0 4px 4px 0;
}

.stat-card.primary::before { background: var(--primary); }
.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.danger::before { background: var(--danger); }
.stat-card.info::before { background: var(--info); }

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-icon.primary { background: rgba(108, 92, 231, 0.1); color: var(--primary); }
.stat-icon.success { background: var(--success-light); color: var(--success); }
.stat-icon.warning { background: var(--warning-light); color: #E67E22; }
.stat-icon.danger { background: var(--danger-light); color: var(--danger); }
.stat-icon.info { background: var(--info-light); color: #2980B9; }

.stat-info h4 {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
}

.stat-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ============================================
   الجداول
   ============================================ */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--border-radius);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table thead th {
    background: var(--bg-main);
    padding: 14px 16px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: rgba(108, 92, 231, 0.03);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   الشارات (Badges)
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--border-radius-full);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-family);
    white-space: nowrap;
}

.badge-primary { background: rgba(108, 92, 231, 0.12); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: #E67E22; }
.badge-info { background: var(--info-light); color: #2980B9; }
.badge-dark { background: rgba(45, 52, 54, 0.1); color: var(--dark); }
.badge-secondary { background: rgba(99, 110, 114, 0.1); color: var(--secondary-light); }

/* ============================================
   التنبيهات (Alerts)
   ============================================ */
.alert {
    padding: 14px 20px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success { background: var(--success-light); color: #1B7A5A; border-right: 4px solid var(--success); }
.alert-danger { background: var(--danger-light); color: #C0392B; border-right: 4px solid var(--danger); }
.alert-warning { background: var(--warning-light); color: #856404; border-right: 4px solid var(--warning); }
.alert-info { background: var(--info-light); color: #2471A3; border-right: 4px solid var(--info); }

.alert-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.5;
    padding: 0 4px;
}

.alert-close:hover {
    opacity: 1;
}

/* ============================================
   المودال (Modal)
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    line-height: 1;
}

/* ============================================
   بيانات فارغة
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state .icon {
    font-size: 60px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 20px;
}

/* ============================================
   أدوات مساعدة (Utilities)
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: #E67E22; }
.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 13px; }
.text-lg { font-size: 18px; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex-wrap { flex-wrap: wrap; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.w-100 { width: 100%; }

/* divider */
.divider {
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}

/* ============================================
   مخطط/رسوم بيانية
   ============================================ */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* ============================================
   الفوتر
   ============================================ */
.footer {
    padding: 20px 30px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* ============================================
   Responsive Design - موبايل وتابلت
   ============================================ */

/* تابلت */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

/* موبايل */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 260px;
    }
    
    .sidebar {
        transform: translateX(100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    /* أوفرلاي لما القائمة مفتوحة */
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .main-content {
        margin-right: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .page-content {
        padding: 20px 16px;
    }
    
    .header {
        padding: 0 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .auth-card {
        padding: 28px 20px;
    }
    
    .stat-card {
        padding: 18px;
    }
    
    .stat-info h4 {
        font-size: 22px;
    }
}

/* شاشات صغيرة جداً */
@media (max-width: 480px) {
    .table {
        font-size: 13px;
    }
    
    .table thead th,
    .table tbody td {
        padding: 10px 8px;
    }
    
    .btn {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .card {
        padding: 18px;
    }
}

/* ============================================
   سكرولبار مخصص
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(108, 92, 231, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(108, 92, 231, 0.4);
}

/* ============================================
   Loading Spinner
   ============================================ */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   أزرار الأكشن في الجداول
   ============================================ */
.action-btns {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

.action-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--border-radius-sm);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.action-btn.view { background: var(--info-light); color: #2980B9; }
.action-btn.edit { background: var(--warning-light); color: #E67E22; }
.action-btn.delete { background: var(--danger-light); color: var(--danger); }

.action-btn:hover {
    transform: scale(1.1);
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination .active {
    background: var(--primary-gradient);
    color: white;
    border-color: var(--primary);
}

/* ============================================
   مكون البحث والفلترة
   ============================================ */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-full);
    font-size: 14px;
    font-family: var(--font-family);
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--primary);
    outline: none;
}

.search-box .search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}
