/* --- المتغيرات (الوضع الليلي الافتراضي) --- */
:root {
    --bg-body: #0a0a0a;
    --bg-card: #1a1a1a;
    --text-main: #f0f0f0;
    --text-muted: #b0b0b0;
    --gold: #D4AF37;
    --gold-light: #e6c158;
    --border: #333;
    --input-bg: #222;
    --shadow: rgba(0, 0, 0, 0.3);
    --success: #28a745;
    --danger: #dc3545;
    --info: #17a2b8;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --radius: 12px;
}

/* --- وضع النهار --- */
body.light-mode {
    --bg-body: #f8f9fa;
    --bg-card: #ffffff;
    --text-main: #222831;
    --text-muted: #555f77;
    --gold: #b8860b;
    --gold-light: #d4af37;
    --border: #e1e5eb;
    --input-bg: #f1f3f5;
    --shadow: rgba(0, 0, 0, 0.08);
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0;
}

body { 
    font-family: 'Tajawal', sans-serif; 
    background-color: var(--bg-body); 
    color: var(--text-main);
    transition: var(--transition);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- الهيدر --- */
header {
    background: var(--bg-card); 
    padding: 15px 5%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    border-bottom: 2px solid var(--gold); 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    box-shadow: 0 4px 20px var(--shadow);
    transition: var(--transition);
}

.logo h1 { 
    font-family: 'Amiri', serif; 
    margin: 0; 
    color: var(--gold); 
    font-size: 1.8rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.logo span {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-top: 3px;
}

.nav-icons { 
    display: flex; 
    gap: 15px; 
    align-items: center; 
}

.icon-btn {
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    color: var(--text-main);
    width: 44px; 
    height: 44px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    cursor: pointer; 
    font-size: 1.1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.icon-btn:hover { 
    background: var(--gold); 
    color: white; 
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* --- شريط الصور المتحركة في الهيرو --- */
.hero-slider {
    height: 60vh;
    position: relative;
    overflow: hidden;
}

.slider-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.slider-slide {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.slider-slide.active {
    opacity: 1;
}

.slider-slide::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(45deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
    text-align: center;
    z-index: 2;
    width: 90%;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h2 { 
    font-size: 3.5rem; 
    font-family: 'Amiri', serif; 
    margin: 0 0 20px 0; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.7); 
    color: #fff;
    animation: fadeInUp 1s ease-out;
}

.hero-content p {
    font-size: 1.3rem;
    color: #f0f0f0;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.slider-controls {
    position: absolute;
    bottom: 30px;
    right: 50%;
    transform: translateX(50%);
    display: flex;
    gap: 15px;
    z-index: 3;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background: var(--gold);
    transform: scale(1.2);
    border-color: white;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.slider-nav:hover {
    background: var(--gold);
    transform: translateY(-50%) scale(1.1);
}

.slider-prev {
    right: 20px;
}

.slider-next {
    left: 20px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- المنتجات --- */
.container { 
    padding: 60px 5%;
    flex: 1;
}

.section-title {
    color: var(--gold); 
    border-bottom: 2px solid var(--gold);
    padding-bottom: 15px;
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-family: 'Amiri', serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 30px; 
}

.card {
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    border-radius: var(--radius); 
    overflow: hidden;
    position: relative; 
    cursor: pointer; 
    transition: var(--transition); 
    box-shadow: 0 5px 15px var(--shadow);
}

.card:hover { 
    transform: translateY(-10px); 
    border-color: var(--gold);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.card-img-wrap { 
    height: 280px; 
    overflow: hidden; 
    position: relative; 
}

.card-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.6s ease; 
}

.card:hover .card-img { 
    transform: scale(1.1); 
}

.badge-multi {
    position: absolute; 
    bottom: 15px; 
    right: 15px; 
    background: rgba(0,0,0,0.8); 
    color: white;
    padding: 6px 12px; 
    border-radius: 20px; 
    font-size: 0.8rem; 
    display: flex; 
    align-items: center; 
    gap: 5px;
    backdrop-filter: blur(5px);
    z-index: 2;
}

.card-body { 
    padding: 20px; 
    text-align: center; 
}

.card-title { 
    font-size: 1.3rem; 
    margin: 10px 0; 
    font-weight: 600;
    min-height: 3em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-price { 
    color: var(--gold); 
    font-size: 1.5rem; 
    font-weight: bold;
    direction: ltr;
}

/* --- زر الإضافة للمدير --- */
.add-product-btn {
    background: var(--gold);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: var(--radius);
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
}

.add-product-btn:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.4);
}

.add-product-btn.hidden {
    display: none;
}

/* --- إصلاح مشكلة z-index للنوافذ --- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    animation: modalFadeIn 0.3s ease-out;
}

/* نافذة التأكيد تظهر فوق كل شيء */
#confirmModal {
    z-index: 20000;
}

/* نافذة تسجيل الدخول */
#loginModal {
    z-index: 15000;
}

/* نافذة المستخدمين */
#usersListModal {
    z-index: 11000;
}

/* نافذة إضافة مستخدم */
#addUserModal {
    z-index: 12000;
}

/* نافذة الإعدادات */
#settingsModal {
    z-index: 13000;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-card); 
    padding: 30px; 
    border-radius: var(--radius); 
    width: 95%; 
    max-width: 500px;
    position: relative; 
    border: 1px solid var(--gold); 
    max-height: 90vh; 
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: inherit;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-btn { 
    position: absolute; 
    left: 20px; 
    top: 20px; 
    font-size: 28px; 
    cursor: pointer; 
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    z-index: 10;
}

.close-btn:hover { 
    color: var(--danger);
    background: rgba(220, 53, 69, 0.1);
    transform: rotate(90deg);
}

.modal-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    color: var(--gold);
    font-size: 1.5rem;
    margin: 0;
}

/* تصميم عرض المنتج */
.product-view-img { 
    width: 100%; 
    height: 350px; 
    object-fit: contain; 
    background: var(--bg-body); 
    border-radius: 10px; 
    margin-bottom: 15px;
    border: 1px solid var(--border);
}

.thumbs-row { 
    display: flex; 
    gap: 10px; 
    overflow-x: auto; 
    padding: 10px 0;
    margin-bottom: 20px;
    justify-content: center;
}

.thumb-img { 
    width: 70px; 
    height: 70px; 
    object-fit: cover; 
    border-radius: 8px; 
    cursor: pointer; 
    border: 2px solid transparent; 
    opacity: 0.7;
    transition: var(--transition);
}

.thumb-img:hover { 
    opacity: 0.9;
    transform: scale(1.05);
}

.thumb-img.active { 
    border-color: var(--gold); 
    opacity: 1;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.product-info {
    margin: 20px 0;
    padding: 20px;
    background: var(--bg-body);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.product-info h2 {
    margin-bottom: 10px;
    font-size: 1.6rem;
}

.product-info h3 {
    color: var(--gold);
    font-size: 1.8rem;
    margin: 10px 0;
}

.btn-wa {
    background: #25D366; 
    color: white; 
    width: 100%; 
    padding: 16px; 
    border: none; 
    border-radius: 8px;
    font-size: 1.1rem; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 10px;
    margin-top: 20px; 
    text-decoration: none; 
    font-weight: bold;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-wa:hover {
    background: #1da851;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-edit {
    background: var(--info);
    color: white;
}

.btn-delete {
    background: var(--danger);
    color: white;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* --- تصميم رفع الصور والمعاينة --- */
.upload-area {
    border: 2px dashed var(--gold); 
    background: var(--input-bg); 
    padding: 30px; 
    border-radius: 10px;
    text-align: center; 
    cursor: pointer; 
    margin: 20px 0; 
    transition: var(--transition);
}

.upload-area:hover { 
    background: rgba(212, 175, 55, 0.1); 
    border-color: var(--gold-light);
}

.upload-area.dragover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--gold-light);
    transform: scale(1.02);
}

.upload-area i { 
    font-size: 3rem; 
    color: var(--gold); 
    margin-bottom: 15px; 
}

.preview-box { 
    display: flex; 
    gap: 10px; 
    flex-wrap: wrap; 
    margin-top: 15px; 
    justify-content: center; 
}

/* --- تنسيق حاوية الصورة المصغرة وزر الحذف --- */
.mini-preview-container {
    position: relative;
    display: inline-block;
    margin: 5px;
    transition: var(--transition);
}

.mini-preview-container:hover {
    transform: scale(1.05);
}

.mini-preview { 
    width: 70px; 
    height: 70px; 
    object-fit: cover; 
    border: 2px solid var(--gold); 
    border-radius: 8px; 
}

.delete-img-btn {
    position: absolute;
    top: -8px;
    left: -8px;
    background: var(--danger);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 10;
    transition: var(--transition);
}

.delete-img-btn:hover {
    background: #b52b3a;
    transform: scale(1.1);
}

/* --- حقول الإدخال --- */
.input-field { 
    width: 100%; 
    padding: 14px; 
    background: var(--input-bg); 
    border: 1px solid var(--border); 
    color: var(--text-main); 
    border-radius: 8px; 
    margin-bottom: 15px; 
    font-size: 1rem;
    transition: var(--transition);
}

.input-field:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-main);
    font-weight: 500;
}

/* --- نافذة تسجيل الدخول المحسنة --- */
.login-modal .modal-content {
    max-width: 400px;
    padding: 40px 30px 30px;
}

.login-modal .close-btn {
    left: 15px;
    top: 15px;
}

.login-icon {
    font-size: 3.5rem;
    color: var(--gold);
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn-login {
    background: var(--gold);
    color: white;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
    font-weight: bold;
}

.btn-login:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.login-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- الفوتر والخريطة --- */
footer { 
    background: var(--bg-card); 
    color: var(--text-main); 
    padding: 50px 20px; 
    text-align: center; 
    margin-top: 50px; 
    border-top: 3px solid var(--gold);
    transition: var(--transition);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    text-align: right;
}

.footer-section h3 { 
    color: var(--gold); 
    margin-bottom: 20px;
    font-family: 'Amiri', serif;
    font-size: 1.5rem;
}

.footer-section p {
    margin-bottom: 10px;
    color: var(--text-muted);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.contact-item i {
    color: var(--gold);
    width: 20px;
}

.map-container {
    margin: 30px 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.map-frame { 
    width: 100%; 
    height: 300px; 
    border: 0; 
    border-radius: var(--radius);
    filter: grayscale(100%) invert(92%) contrast(83%);
}

body.light-mode .map-frame { 
    filter: none;
}

.btn-map {
    background: transparent; 
    border: 2px solid var(--gold); 
    color: var(--gold); 
    padding: 12px 25px;
    border-radius: 8px; 
    font-weight: bold;
    cursor: pointer; 
    display: inline-flex; 
    align-items: center;
    justify-content: center; 
    gap: 10px;
    text-decoration: none;
    transition: var(--transition);
    margin-top: 15px;
}

.btn-map:hover {
    background: var(--gold);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.copyright {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- التبليغات (Toasts) --- */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg-card);
    color: var(--text-main);
    padding: 15px 25px;
    border-radius: var(--radius);
    border-left: 4px solid var(--gold);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(150%);
    transition: transform 0.4s ease-out;
    max-width: 400px;
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    font-size: 1.5rem;
    color: var(--gold);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.error .toast-icon {
    color: var(--danger);
}

/* --- تنسيق قائمة المستخدمين --- */
.users-table-container {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

.users-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
}

.users-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.users-table th {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: white;
    padding: 18px 15px;
    text-align: right;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    position: relative;
    overflow: hidden;
}

.users-table th:after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
}

.users-table td {
    padding: 16px 15px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    text-align: right;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.users-table tbody tr {
    transition: all 0.3s ease;
    background: var(--bg-card);
}

.users-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.05);
}

.users-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.1);
}

.users-table tr:last-child td {
    border-bottom: none;
}

/* تحسين شارات الصلاحيات */
.role-badge {
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.role-badge.admin {
    background: linear-gradient(135deg, #D4AF37 0%, #F7EF8A 100%);
    color: #000;
    border: 2px solid #D4AF37;
}

.role-badge.admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(212, 175, 55, 0.3);
}

.role-badge.employee {
    background: linear-gradient(135deg, var(--info) 0%, #6EDFF6 100%);
    color: white;
    border: 2px solid var(--info);
}

.role-badge.employee:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(23, 162, 184, 0.3);
}

/* تحسين شارات الحالة */
.status-badge {
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 100px;
    justify-content: center;
}

.status-badge.active {
    background: rgba(40, 167, 69, 0.15);
    color: var(--success);
    border: 2px solid rgba(40, 167, 69, 0.3);
}

/* تحسين أزرار الإجراءات */
.user-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-action {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    min-width: 45px;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-action.delete {
    background: linear-gradient(135deg, #dc3545 0%, #ff6b6b 100%);
    color: white;
    border: 2px solid #dc3545;
}

.btn-action.delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(220, 53, 69, 0.3);
    background: linear-gradient(135deg, #c82333 0%, #ff5252 100%);
}

.btn-action.edit {
    background: linear-gradient(135deg, var(--info) 0%, #6EDFF6 100%);
    color: white;
    border: 2px solid var(--info);
}

.btn-action.edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(23, 162, 184, 0.3);
    background: linear-gradient(135deg, #138496 0%, #4dd0e1 100%);
}

.btn-action.password {
    background: linear-gradient(135deg, var(--success) 0%, #6fcf97 100%);
    color: white;
    border: 2px solid var(--success);
}

.btn-action.password:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.3);
    background: linear-gradient(135deg, #218838 0%, #4caf50 100%);
}

/* تحسين النصوص داخل الجداول */
.users-table td:first-child {
    font-weight: bold;
    color: var(--gold);
    font-size: 1.1rem;
}

/* تحسين عرض النصوص على الجوال */
@media (max-width: 768px) {
    .action-text {
        display: none;
    }
    
    .btn-action {
        min-width: 40px;
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
    }
    
    .btn-action i {
        margin: 0;
    }
    
    .users-summary > div > div {
        min-width: 140px;
        padding: 10px 15px;
    }
    
    .role-badge {
        min-width: 90px;
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

/* --- تنسيق أزرار الصفحات (Pagination) --- */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    gap: 10px;
    flex-wrap: wrap;
}

.page-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Tajawal', sans-serif;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-2px);
}

.page-btn.active {
    background: var(--gold);
    color: white;
    border-color: var(--gold);
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.4);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* تأثير ظهور المنتجات عند تغيير الصفحة */
.fade-in-up {
    animation: fadeInUpProduct 0.5s ease-out forwards;
}

@keyframes fadeInUpProduct {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تحسين شريط التمرير */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-light);
}

/* تأثير اهتزاز */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* --- تحسينات للجوال --- */
@media (max-width: 768px) {
    .hero-content h2 { font-size: 2.5rem; }
    .hero-content p { font-size: 1.1rem; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .contact-item { justify-content: center; }
    .modal-content { padding: 20px; width: 95%; }
    .product-view-img { height: 250px; }
    .section-title { flex-direction: column; align-items: flex-start; gap: 15px; }
    .slider-nav { width: 40px; height: 40px; font-size: 1.2rem; }
    .slider-prev { right: 10px; }
    .slider-next { left: 10px; }
    .users-table th, 
    .users-table td { padding: 8px 5px; font-size: 0.9rem; }
    .btn-action { padding: 4px 8px; font-size: 0.8rem; }
}

@media (max-width: 480px) {
    .hero-content h2 { font-size: 2rem; }
    .grid { grid-template-columns: 1fr; }
    .nav-icons { gap: 10px; }
    .icon-btn { width: 40px; height: 40px; }
    .slider-controls { bottom: 15px; }
    .users-table { font-size: 0.8rem; }
    .users-summary > div > div {
        min-width: 120px;
        padding: 8px 12px;
    }
}