/* ملف الثيمات الرئيسي */
:root {
    --primary-color: #D4AF37;
    --secondary-color: #B8860B;
    --accent-color: #FFD700;
    --background-color: #F5F5F5;
    --text-color: #333333;
    --card-background: #FFFFFF;
    --border-color: #E5E5E5;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --error-color: #EF4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* الثيم الذهبي */
.theme-gold {
    --primary-color: #D4AF37;
    --secondary-color: #B8860B;
    --accent-color: #FFD700;
    --background-color: #F5F5F5;
    --text-color: #333333;
}

/* الثيم الأزرق */
.theme-blue {
    --primary-color: #1E3A8A;
    --secondary-color: #3B82F6;
    --accent-color: #60A5FA;
    --background-color: #F8FAFC;
    --text-color: #1F2937;
}

/* الثيم الأخضر */
.theme-green {
    --primary-color: #059669;
    --secondary-color: #10B981;
    --accent-color: #34D399;
    --background-color: #F0FDF4;
    --text-color: #064E3B;
}

/* الأنماط الأساسية */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    direction: rtl;
}

body[dir="ltr"] {
    direction: ltr;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* الهيدر */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* البطاقات */
.card {
    background: var(--card-background);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* الأزرار */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* النماذج */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    background-color: white;
}

/* الجداول */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: rgba(212, 175, 55, 0.05);
}

/* الشبكة */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

.col-1 { flex: 0 0 8.333333%; }
.col-2 { flex: 0 0 16.666667%; }
.col-3 { flex: 0 0 25%; }
.col-4 { flex: 0 0 33.333333%; }
.col-6 { flex: 0 0 50%; }
.col-8 { flex: 0 0 66.666667%; }
.col-9 { flex: 0 0 75%; }
.col-12 { flex: 0 0 100%; }

/* التنبيهات */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #D1FAE5;
    border-color: var(--success-color);
    color: #065F46;
}

.alert-warning {
    background-color: #FEF3C7;
    border-color: var(--warning-color);
    color: #92400E;
}

.alert-danger {
    background-color: #FEE2E2;
    border-color: var(--error-color);
    color: #991B1B;
}

/* الصور */
.img-fluid {
    max-width: 100%;
    height: auto;
}

.img-thumbnail {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 0.25rem;
}

/* التحميل */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* الاستجابة */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .row {
        flex-direction: column;
    }
    
    .col {
        margin-bottom: 1rem;
    }
}

/* تأثيرات إضافية */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

