/**
 * ========================================
 * FilterX - Modern Dashboard Styles
 * ========================================
 * تنسيقات احترافية عصرية قابلة لإعادة الاستخدام
 * يمكن استخدامها في أي صفحة من صفحات الموقع
 */

/* ========================================
   1. CSS Variables (المتغيرات)
   ======================================== */
:root {
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-danger: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    --gradient-warning: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-info: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-purple: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    
    /* Colors */
    --color-primary: #667eea;
    --color-success: #11998e;
    --color-danger: #eb3349;
    --color-warning: #f59e0b;
    --color-info: #4facfe;
    --color-purple: #a855f7;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.12);
    --shadow-xl: 0 10px 40px rgba(102, 126, 234, 0.3);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50px;
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

/* ========================================
   2. Hero Section (قسم البطل)
   ======================================== */
.dashboard-hero {
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-xl);
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.dashboard-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* ========================================
   3. Plan Card (بطاقة الباقة)
   ======================================== */
.plan-card {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    border: 1px solid rgba(255,255,255,0.2);
}

.plan-badge {
    background: white;
    color: var(--color-primary);
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-block;
    box-shadow: var(--shadow-md);
}

.feature-check {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
    font-size: 0.95rem;
}

.feature-check i {
    color: #4ade80;
    font-size: 1.2rem;
}

/* ========================================
   4. Stats Cards (بطاقات الإحصائيات)
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, transparent 0%, rgba(102, 126, 234, 0.05) 100%);
    border-radius: 0 0 0 100px;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-footer {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-change {
    font-size: 0.85rem;
    font-weight: 600;
}

.stat-change.positive {
    color: #10b981;
}

.stat-change.negative {
    color: #ef4444;
}

/* ========================================
   5. Progress Bars (أشرطة التقدم)
   ======================================== */
.progress-custom {
    height: 8px;
    border-radius: 10px;
    background: #e5e7eb;
    overflow: hidden;
}

.progress-bar-custom {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* ========================================
   6. Quick Actions (الإجراءات السريعة)
   ======================================== */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.action-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
    color: inherit;
}

.action-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.15);
}

.action-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.action-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1f2937;
}

.action-desc {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
}

/* ========================================
   7. Alerts (التنبيهات)
   ======================================== */
.alert-custom {
    border-radius: var(--radius-md);
    border: none;
    padding: var(--spacing-md) 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.alert-custom i {
    font-size: 1.5rem;
}

/* ========================================
   8. Buttons (الأزرار)
   ======================================== */
.btn-update {
    background: white;
    color: var(--color-primary);
    border: none;
    padding: 12px 32px;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-update:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    background: #f8f9fa;
    color: var(--color-primary);
}

/* ========================================
   9. Custom Colors (الألوان المخصصة)
   ======================================== */
.text-purple {
    color: var(--color-purple) !important;
}

.btn-outline-purple {
    color: var(--color-purple);
    border-color: var(--color-purple);
}

.btn-outline-purple:hover {
    background: var(--color-purple);
    color: white;
}

.border-warning {
    border: 2px solid var(--color-warning) !important;
    animation: pulse-border 2s infinite;
}

/* ========================================
   10. Animations (الحركات)
   ======================================== */
@keyframes pulse-border {
    0%, 100% {
        border-color: #f59e0b;
    }
    50% {
        border-color: #fbbf24;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* ========================================
   11. Utility Classes (فئات مساعدة)
   ======================================== */
.gradient-primary {
    background: var(--gradient-primary);
}

.gradient-success {
    background: var(--gradient-success);
}

.gradient-danger {
    background: var(--gradient-danger);
}

.gradient-warning {
    background: var(--gradient-warning);
}

.gradient-info {
    background: var(--gradient-info);
}

.gradient-purple {
    background: var(--gradient-purple);
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.shadow-xl {
    box-shadow: var(--shadow-xl);
}

.radius-sm {
    border-radius: var(--radius-sm);
}

.radius-md {
    border-radius: var(--radius-md);
}

.radius-lg {
    border-radius: var(--radius-lg);
}

.radius-xl {
    border-radius: var(--radius-xl);
}

.radius-full {
    border-radius: var(--radius-full);
}

/* ========================================
   12. Responsive Design (التصميم المتجاوب)
   ======================================== */
@media (max-width: 768px) {
    .dashboard-hero {
        padding: 24px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .action-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
}

@media (max-width: 576px) {
    .dashboard-hero {
        padding: 20px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .action-card {
        padding: 20px;
    }
}

/* ========================================
   13. Dark Mode Support (دعم الوضع الداكن)
   ======================================== */
/* تم تعطيل Dark Mode - نستخدم Light Mode دائماً */
.stat-card {
    background: white !important;
    border-color: #f0f0f0 !important;
    color: inherit !important;
}

.stat-label {
    color: #6c757d !important;
}

.action-card {
    background: white !important;
    color: inherit !important;
}

.action-title {
    color: #1f2937 !important;
}

.action-desc {
    color: #6c757d !important;
}

/* ========================================
   14. Print Styles (أنماط الطباعة)
   ======================================== */
@media print {
    .dashboard-hero::before,
    .dashboard-hero::after,
    .stat-card::before {
        display: none;
    }
    
    .stat-card,
    .action-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .btn-update,
    .stat-footer a,
    .action-card {
        display: none;
    }
}
