/* style.css - إصدار مودرن مع ألوان مريحة */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap');

* {
    font-family: 'Tajawal', sans-serif;
}

body {
    background-color: #f8fafc;
    color: #1e293b;
    direction: rtl;
}

/* ===== الشريط العلوي ===== */
.navbar {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 12px 24px;
}
.navbar-brand {
    font-weight: 700;
    color: #ffffff !important;
    font-size: 1.4rem;
    letter-spacing: 0.5px;
}
.navbar .nav-link {
    color: rgba(255,255,255,0.8) !important;
    transition: 0.3s;
}
.navbar .nav-link:hover {
    color: #ffffff !important;
}

/* ===== القائمة الجانبية ===== */
.sidebar {
    background: #ffffff;
    border-left: 1px solid rgba(0,0,0,0.05);
    box-shadow: 2px 0 12px rgba(0,0,0,0.04);
    min-height: calc(100vh - 70px);
    padding: 20px 0;
    transition: all 0.3s ease;
}
.sidebar .nav-link {
    color: #475569;
    padding: 12px 20px;
    margin: 4px 12px;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}
.sidebar .nav-link i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}
.sidebar .nav-link:hover {
    background: #f1f5f9;
    color: #0ea5e9;
    transform: translateX(-4px);
}
.sidebar .nav-link.active {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}
.sidebar .nav-link.active i {
    color: #ffffff;
}

/* ===== البطاقات (Widgets) ===== */
.dashboard-widget {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.02);
    height: 100%;
    position: relative;
    overflow: hidden;
}
.dashboard-widget:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}
.dashboard-widget .widget-icon {
    font-size: 2.2rem;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(14, 165, 233, 0.08);
    color: #0ea5e9;
    transition: 0.3s;
}
.dashboard-widget:hover .widget-icon {
    transform: scale(1.1);
}
.dashboard-widget .widget-value {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 8px 0 4px;
}
.dashboard-widget .widget-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}
/* ألوان البطاقات المخصصة */
.widget-green .widget-icon {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}
.widget-red .widget-icon {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}
.widget-blue .widget-icon {
    background: rgba(14, 165, 233, 0.12);
    color: #0ea5e9;
}
.widget-orange .widget-icon {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

/* ===== الجداول ===== */
.table {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}
.table thead th {
    color: #1e293b;
    font-weight: 600;
    padding: 12px 16px;
    font-size: 0.9rem;
}
.table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}
.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

/* ===== الرسوم البيانية ===== */
.chart-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.02);
}

/* ===== الأزرار ===== */
.btn-primary {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border: none;
    padding: 10px 24px;
    font-weight: 500;
    border-radius: 10px;
    transition: 0.3s;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35);
}
.btn-outline-light {
    border-color: rgba(255,255,255,0.3);
    color: #ffffff;
}
.btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
}

/* ===== تحسينات عامة ===== */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.badge {
    padding: 6px 14px;
    font-weight: 500;
    border-radius: 20px;
}
/* للحالات */
.badge-success { background: #10b981; }
.badge-warning { background: #f59e0b; }
.badge-danger { background: #ef4444; }
.badge-info { background: #0ea5e9; }

/* تأثيرات النوافذ المنبثقة */
.modal-content {
    border-radius: 16px;
    border: none;
}

/* ===== توافق الشاشات الصغيرة ===== */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
        border-left: none;
        border-bottom: 1px solid #e2e8f0;
    }
    .dashboard-widget {
        margin-bottom: 16px;
    }
    .navbar-brand {
        font-size: 1.1rem;
    }
}