/* منصة إعمار - نظام التصميم */
/* خط Tajawal - أوزان مخففة للإنترنت الضعيف (400,600,700 فقط) */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;600;700&display=swap');

:root {
  --primary: #1B7A3D;
  --primary-foreground: #FFFFFF;
  --secondary: #F0FDF4;
  --secondary-foreground: #14532D;
  --accent: #22C55E;
  --accent-foreground: #FFFFFF;
  --background: #FAFAFA;
  --foreground: #1A1A1A;
  --card: #FFFFFF;
  --card-foreground: #1A1A1A;
  --muted: #F4F4F5;
  --muted-foreground: #737373;
  --border: #E5E7EB;
  --destructive: #EF4444;
  --radius: 0.5rem;
  --status-pending: #F59E0B;
  --status-approved: #22C55E;
  --status-rejected: #EF4444;
  --status-returned: #3B82F6;
}

* {
  font-family: 'Tajawal', sans-serif;
}

html {
  font-size: 14px;
  direction: rtl;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'Tajawal', sans-serif;
}

/* Primary button override */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  color: white;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(27, 122, 61, 0.3);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
}

/* Cards */
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: rgba(27, 122, 61, 0.3);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Form inputs */
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem rgba(27, 122, 61, 0.15);
}

/* Badges */
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-approved { background: #D1FAE5; color: #065F46; }
.badge-rejected { background: #FEE2E2; color: #991B1B; }
.badge-returned { background: #DBEAFE; color: #1E40AF; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-info { background: #DBEAFE; color: #1E40AF; }
.badge-draft { background: #F3F4F6; color: #374151; }
.badge-active { background: #D1FAE5; color: #065F46; }
.badge-completed { background: #DBEAFE; color: #1E40AF; }

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass effect */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Hover shadow للبطاقات */
.hover-shadow {
  transition: box-shadow 0.3s ease;
}
.hover-shadow:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--muted-foreground);
}

/* ===== القائمة الجانبية (Sidebar) ===== */
.sidebar-user-card {
  background: linear-gradient(135deg, var(--secondary) 0%, #fff 100%);
}

.sidebar-avatar {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: white;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-link {
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover {
  background: var(--muted);
  color: var(--primary) !important;
}

.sidebar-link-active {
  background: rgba(27, 122, 61, 0.12) !important;
  color: var(--primary) !important;
  font-weight: 600;
}

.sidebar-logout .logout-btn {
  color: var(--muted-foreground);
  padding: 0.5rem 0.75rem !important;
  border-radius: var(--radius);
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-logout .logout-btn:hover {
  background: rgba(239, 68, 68, 0.08);
  color: var(--destructive) !important;
}

.sidebar-logout .logout-icon {
  width: 1.25rem;
  font-size: 1.1rem;
}

/* زر الخروج خارج القائمة الجانبية (مثل لوحة المتدرب) */
.logout-btn {
  color: var(--destructive);
}

.logout-btn:hover {
  color: var(--destructive);
  opacity: 0.9;
}

.logout-btn .logout-icon {
  width: 1rem;
  font-size: 0.95rem;
}

/* ===== الشريط السفلي للموبايل ===== */
@media (max-width: 767.98px) {
  .pb-mobile-nav {
    padding-bottom: 5rem !important;
  }
}

.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1030;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0.5rem;
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.7rem;
  transition: color 0.2s ease;
}

.mobile-nav-item i {
  font-size: 1.25rem;
  margin-bottom: 0.15rem;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus {
  color: var(--primary);
}

.mobile-nav-item.active {
  color: var(--primary);
  font-weight: 600;
}

/* ===== كاردات المشاريع - تمييز لوني وتأثيرات ===== */
.project-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.project-card:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.project-card-status-active {
  border-top: 4px solid var(--status-approved);
}

.project-card-status-inprogress {
  border-top: 4px solid #3B82F6;
}

.project-card-status-completed {
  border-top: 4px solid var(--muted-foreground);
}

.project-card-status-cancelled {
  border-top: 4px solid var(--destructive);
}

.project-card-status-draft {
  border-top: 4px solid #F59E0B;
}
