/* أنماط صفحة العملاء */
:root {
    --primary-dark: #006400;
    --primary: #008000;
    --primary-light: #228B22;
    --secondary: #2E8B57;
    --accent: #32CD32;
    --dark: #1a1a1a;
    --light: #f8f9fa;
    --gray: #6c757d;
    --border: #dee2e6;
    --error: #dc3545;
    --success: #28a745;
    --warning: #ffc107;
    --info: #17a2b8;
}

/* تصميم صفحة العملاء */
.clients-container {
    padding: 20px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8f5e8 100%);
    min-height: calc(100vh - 80px);
}

.clients-header {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.clients-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 100, 0, 0.1) 0%, rgba(46, 139, 87, 0.1) 100%);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 0);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.header-title h1 {
    color: var(--primary-dark);
    font-size: 2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-title p {
    color: var(--gray);
    font-size: 1.1rem;
}

.search-box {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 128, 0, 0.1);
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 1.1rem;
}

.header-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.stat-badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 10px rgba(0, 128, 0, 0.2);
}

.stat-badge i {
    font-size: 1.1rem;
}

/* بطاقة العميل */
.client-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-right: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.client-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.client-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(0, 100, 0, 0.05) 0%, rgba(46, 139, 87, 0.05) 100%);
    border-radius: 0 12px 0 50px;
}

.client-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.client-name {
    color: var(--primary-dark);
    font-size: 1.6rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.client-name i {
    color: var(--primary);
    font-size: 1.4rem;
}

.client-date {
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 5px;
}

.client-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.client-stat {
    background: var(--light);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark);
}

.client-stat i {
    color: var(--primary);
}

.client-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.info-item i {
    color: var(--primary);
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.info-label {
    font-weight: 500;
    color: var(--dark);
    min-width: 100px;
}

.info-value {
    flex: 1;
    color: var(--gray);
}

.client-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* حالة عدم وجود عملاء */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.empty-state i {
    font-size: 4rem;
    color: var(--border);
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-state h3 {
    color: var(--gray);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.empty-state p {
    color: var(--gray);
    margin-bottom: 30px;
    font-size: 1.1rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* فلاتر البحث */
.filter-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.filter-title {
    color: var(--primary-dark);
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* إحصائيات العملاء */
.clients-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
    border-top: 4px solid var(--primary);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 1.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--gray);
}

/* تصميم متجاوب */
@media (max-width: 992px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .header-stats {
        justify-content: center;
    }
    
    .client-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .client-stats {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .clients-container {
        padding: 15px;
    }
    
    .clients-header {
        padding: 20px;
    }
    
    .header-title h1 {
        font-size: 1.7rem;
    }
    
    .client-info {
        grid-template-columns: 1fr;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .info-label {
        min-width: auto;
    }
    
    .client-actions {
        justify-content: center;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .client-card {
        padding: 20px;
    }
    
    .client-name {
        font-size: 1.4rem;
    }
    
    .client-stats {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stat-badge {
        padding: 8px 15px;
    }
    
    .empty-state {
        padding: 60px 15px;
    }
    
    .empty-state h3 {
        font-size: 1.3rem;
    }
}

/* تأثيرات الرسوم المتحركة */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.client-card {
    animation: slideInUp 0.5s ease forwards;
}

.client-card:nth-child(1) { animation-delay: 0.1s; }
.client-card:nth-child(2) { animation-delay: 0.2s; }
.client-card:nth-child(3) { animation-delay: 0.3s; }
.client-card:nth-child(4) { animation-delay: 0.4s; }
.client-card:nth-child(5) { animation-delay: 0.5s; }

/* تأثيرات التحويم */
.stat-card:hover .stat-icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.search-box input:focus + i {
    color: var(--primary);
}

/* محاذاة النصوص */
.client-card .btn {
    min-width: 100px;
    justify-content: center;
}

.client-actions .btn i {
    margin-right: 5px;
}

/* تحسينات إضافية */
.client-card .btn-view {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.client-card .btn-reports {
    background: var(--info);
    color: white;
}

.client-card .btn-edit {
    background: var(--warning);
    color: #212529;
}

.client-card .btn-delete {
    background: var(--error);
    color: white;
}