/* Professional Admin Dashboard Styles with Icons and Animations */

@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

@font-face {
    font-family: 'Tajawal';
    src: url('fonts/Tajawal-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Tajawal';
    src: url('fonts/Tajawal-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Tajawal';
    src: url('fonts/Tajawal-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Tajawal';
    src: url('fonts/Tajawal-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Tajawal';
    src: url('fonts/Tajawal-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Tajawal';
    src: url('fonts/Tajawal-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
    --sidebar-width: 280px;
    --sidebar-bg: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
    --card-bg: #ffffff;
    --body-bg: #f8f9fc;
    --text-color: #5a5c69;
}

body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-color);
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    right: 0; /* RTL Support */
    background: var(--sidebar-bg);
    color: white;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.sidebar-brand {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand img {
    max-height: 50px;
    margin-left: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
}

.nav-item {
    position: relative;
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: rgba(255,255,255,0.8) !important;
    font-weight: 600;
    transition: all 0.3s;
    border-radius: 10px;
    margin: 0 10px;
}

.nav-link:hover, .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.1);
    transform: translateX(-5px);
}

.nav-link i {
    width: 30px;
    font-size: 1.1rem;
    text-align: center;
}

/* Main Content Area */
.main-content {
    margin-right: var(--sidebar-width); /* RTL Support */
    padding: 2rem;
    transition: all 0.3s ease;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    background: var(--card-bg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.25);
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    padding: 1rem 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    border-radius: 15px 15px 0 0 !important;
}

/* Stat Cards */
.stat-card {
    overflow: hidden;
    position: relative;
}

.stat-card .card-body {
    padding: 2rem;
}

.stat-card i {
    opacity: 0.3;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 4rem !important;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        right: -100%; /* Hide sidebar off-screen */
    }
    
    .sidebar.active {
        right: 0;
    }
    
    .main-content {
        margin-right: 0;
    }
}

/* Dark Mode Overrides */
body.dark-mode {
    --body-bg: #1a1a2e;
    --card-bg: #16213e;
    --text-color: #e9ecef;
    --sidebar-bg: linear-gradient(180deg, #0f3460 10%, #16213e 100%);
}

body.dark-mode .card-header {
    background-color: #0f3460;
    border-bottom-color: #2c3e50;
    color: #fff;
}

body.dark-mode .nav-link {
    color: rgba(255,255,255,0.7) !important;
}

body.dark-mode .nav-link:hover, body.dark-mode .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.1);
}

/* Utilities */
.text-gray-800 {
    color: #5a5c69 !important;
}

body.dark-mode .text-gray-800 {
    color: #f8f9fc !important;
}

.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075)!important;
}

.border-left-primary {
    border-left: .25rem solid #4e73df!important;
}

.border-left-success {
    border-left: .25rem solid #1cc88a!important;
}

.border-left-info {
    border-left: .25rem solid #36b9cc!important;
}

.border-left-warning {
    border-left: .25rem solid #f6c23e!important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}