@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
}

body {
    background: #f0f2f8;
    direction: rtl;
}

/* ========== تنسيق القائمة الجانبية ========== */
.sidebar {
    background: linear-gradient(135deg, #1a2a3a 0%, #0d1b2a 100%);
    min-height: 100vh;
    transition: all 0.3s;
    position: fixed;
    right: 0;
    top: 0;
    width: 250px;
    z-index: 1000;
}

.sidebar .brand {
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar .brand h4 {
    color: white;
    margin: 10px 0 0;
}

.sidebar .brand small {
    color: rgba(255,255,255,0.6);
}

.sidebar a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 12px 20px;
    display: block;
    transition: 0.3s;
    margin: 5px 10px;
    border-radius: 10px;
}

.sidebar a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: translateX(-5px);
}

.sidebar a i {
    margin-left: 10px;
    width: 25px;
}

.sidebar a.active {
    background: linear-gradient(90deg, #00b4d8, #0077b6);
    color: white;
}

.sidebar hr {
    margin: 15px 10px;
    border-color: rgba(255,255,255,0.1);
}

/* ========== المحتوى الرئيسي ========== */
.main-content {
    margin-right: 250px;
    padding: 20px;
    min-height: 100vh;
}

/* ========== بطاقات الإحصائيات ========== */
.stat-card {
    border: none;
    border-radius: 20px;
    transition: all 0.3s;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.stat-card .icon {
    position: absolute;
    left: 20px;
    bottom: 20px;
    font-size: 60px;
    opacity: 0.15;
}

.stat-card h3 {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
}

/* ========== الجداول ========== */
.table-custom {
    border-radius: 15px;
    overflow: hidden;
}

.table-custom thead {
    background: linear-gradient(90deg, #1a2a3a, #2c3e50);
    color: white;
}

/* ========== البادجات ========== */
.badge-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-new { background: #17a2b8; color: white; }
.status-follow { background: #ffc107; color: black; }
.status-contact { background: #28a745; color: white; }
.status-done { background: #6c757d; color: white; }
.status-cancel { background: #dc3545; color: white; }

/* ========== شاشة التحميل ========== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.5s;
}

.loader.hide {
    opacity: 0;
    visibility: hidden;
}

/* ========== الوضع المظلم ========== */
body.dark-mode {
    background: #1a1a2e;
}

body.dark-mode .main-content,
body.dark-mode .card {
    background: #16213e !important;
    color: #eee !important;
}

body.dark-mode .table {
    color: #ddd;
}

body.dark-mode .text-muted {
    color: #aaa !important;
}

/* ========== تذييل الصفحة ========== */
.footer {
    background: white;
    border-radius: 15px;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
    color: #6c757d;
}

/* ========== وسائل مساعدة ========== */
.cursor-pointer {
    cursor: pointer;
}

.transition {
    transition: all 0.3s;
}