:root {
    --primary: #3498db;
    --secondary: #2c3e50;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #17a2b8;
    --light: #ecf0f1;
    --dark: #2c3e50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    direction: rtl;
}

/* تحسينات التصميم */
.header {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    flex-wrap: wrap;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
}

.nav-menu li {
    margin-left: 1rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-menu a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* تحسينات النماذج */
.form-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--secondary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

/* تحسينات الجداول */
.table-responsive {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

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

.data-table th {
    background: var(--light);
    font-weight: 600;
    color: var(--secondary);
    position: sticky;
    top: 0;
}

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

/* تحسينات الأزرار */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-primary { background: var(--primary); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-info { background: var(--info); color: white; }

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

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 2rem 0;
    gap: 0.5rem;
}

.pagination li a {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: var(--primary);
    transition: all 0.3s;
}

.pagination li.active a {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: var(--danger);
}

/* Filters */
.filters {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 1rem;
    }

    .nav-menu {
        margin-top: 1rem;
        justify-content: center;
    }

    .nav-menu li {
        margin: 0.25rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

/* Currency switcher */
.currency-switcher {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.currency-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.currency-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
        padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    border-left: 4px solid var(--primary);
    }
    
.stat-card.income { border-left-color: var(--success); }
.stat-card.expense { border-left-color: var(--danger); }
.stat-card.profit { border-left-color: var(--primary); }
.stat-card.distribution { border-left-color: var(--warning); }

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin: 0.5rem 0;
    }

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* إضافات جديدة للواجهة المحسنة */

.welcome-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-meta {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.recent-activities {
    max-height: 400px;
    overflow-y: auto;
}

.currency-badge {
    background: #3498db;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    display: inline-block;
}

.bank-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .welcome-section {
        padding: 1.5rem;
    }

    .stat-icon {
        font-size: 1.5rem;
    }
}
/* تنسيق بطاقة أسعار الصرف */
.exchange-rates-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.exchange-rates-card h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.rate-section {
    display: flex;
    gap: 2rem;
    text-align: center;
}

.rate-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0.25rem 0;
}

.rate-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.rate-subtext {
    font-size: 0.8rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .exchange-rates-card {
        padding: 1rem;
    }

    .rate-section {
        flex-direction: column;
        gap: 1rem;
    }

    .rate-value {
        font-size: 1.5rem;
    }
}