/* Root Variables - Harmonious Color Palette */
:root {
  /* Primary Colors - Professional Blue */
  --primary-color: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --primary-gradient: linear-gradient(135deg, #3b82f6, #2563eb);
  
  /* Secondary Colors - Fresh Green */
  --secondary-color: #10b981;
  --secondary-dark: #059669;
  --secondary-light: #34d399;
  
  /* Accent Colors - Warm Orange */
  --accent-color: #f59e0b;
  --accent-dark: #d97706;
  --accent-light: #fbbf24;
  
  /* Success, Warning, Danger */
  --success-color: #10b981;
  --success-light: #34d399;
  --warning-color: #f59e0b;
  --warning-light: #fbbf24;
  --danger-color: #ef4444;
  --danger-light: #f87171;
  
  /* Neutral Colors - Light Theme */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Dark Theme Colors */
  --dark-bg-primary: #0f172a;
  --dark-bg-secondary: #1e293b;
  --dark-bg-tertiary: #334155;
  --dark-text-primary: #f1f5f9;
  --dark-text-secondary: #cbd5e1;
  --dark-border: #475569;
  
  /* Dynamic Colors - Light & Contrasted */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #ffffff;
  --border-color: #e2e8f0;
  --shadow-color: rgba(0, 0, 0, 0.1);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  --gradient-secondary: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
  --gradient-accent: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
  --gradient-royal: linear-gradient(135deg, #8b5cf6, #ec4899, #f59e0b);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Dark Theme - Enhanced Contrast */
[data-theme="dark"] {
  --bg-primary: #1e293b;
  --bg-secondary: #334155;
  --bg-tertiary: #475569;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-light: #ffffff;
  --border-color: #475569;
  --shadow-color: rgba(0, 0, 0, 0.4);
}

/* Ensure proper contrast in dark theme */
[data-theme="dark"] .card-gradient-primary .stat-content h3,
[data-theme="dark"] .card-gradient-primary .stat-content p,
[data-theme="dark"] .card-gradient-secondary .stat-content h3,
[data-theme="dark"] .card-gradient-secondary .stat-content p,
[data-theme="dark"] .card-gradient-accent .stat-content h3,
[data-theme="dark"] .card-gradient-accent .stat-content p {
  color: var(--text-light) !important;
}

[data-theme="dark"] .card-white-primary,
[data-theme="dark"] .card-white-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
}

[data-theme="dark"] .card-white-primary .stat-content p,
[data-theme="dark"] .card-white-secondary .stat-content p {
  color: var(--text-secondary) !important;
}

/* Arabic Language Support */
html[lang="ar"] {
  direction: rtl;
  text-align: right;
}

html[lang="ar"] body {
  font-family: 'Cairo', 'Segoe UI', 'Tahoma', 'Arial', 'Noto Sans Arabic', 'Tajawal', sans-serif;
}

/* Logo Styles */
.navbar-logo {
  transition: transform 0.3s ease;
  max-height: 40px;
  height: auto;
  width: auto;
}

.navbar-logo:hover {
  transform: scale(1.05);
}

.sidebar-logo {
  max-height: 32px;
  height: auto;
  width: auto;
  transition: transform 0.3s ease;
}

.sidebar-logo:hover {
  transform: scale(1.05);
}

/* Base Styles */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  margin: 0;
  padding: 0;
  padding-top: 80px; /* Add padding to prevent header overlap for all content */
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  background: var(--gradient-royal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Navigation */
.navbar {
  background: rgba(var(--bg-primary), 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .navbar {
  background: rgba(15, 23, 42, 0.95);
  border-bottom-color: var(--dark-border);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color) !important;
  transition: all var(--transition-normal);
}

.navbar-brand:hover {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--text-primary) !important;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  position: relative;
}

.navbar-nav .nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: all var(--transition-normal);
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color) !important;
  background-color: var(--bg-tertiary);
  transform: translateY(-2px);
}

.navbar-nav .nav-link:hover::before {
  width: 80%;
}

.navbar-nav .nav-link.btn {
  color: var(--white) !important;
  background: var(--gradient-primary);
  border: none;
  box-shadow: var(--shadow-md);
}

.navbar-nav .nav-link.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.navbar-nav .nav-link.btn::before {
  display: none;
}

/* Theme Toggle Button */
.theme-toggle {
  border-radius: 50% !important;
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 2px solid var(--border-color) !important;
  background: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  transition: all var(--transition-normal) !important;
  box-shadow: var(--shadow-sm) !important;
}

.theme-toggle:hover {
  background: var(--primary-color) !important;
  color: var(--white) !important;
  border-color: var(--primary-color) !important;
  transform: scale(1.1) rotate(15deg) !important;
  box-shadow: var(--shadow-lg) !important;
}

.theme-icon {
  font-size: 1rem;
  transition: all var(--transition-normal);
}

[data-theme="dark"] .theme-toggle {
  border-color: var(--dark-border) !important;
  background: var(--dark-bg-secondary) !important;
  color: var(--dark-text-primary) !important;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
  animation: float 6s ease-in-out infinite;
}

[data-theme="dark"] .hero-section {
  background: linear-gradient(135deg, var(--dark-bg-primary) 0%, var(--dark-bg-secondary) 100%);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.1;
  background: var(--gradient-royal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: slideInUp 1s ease-out;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.6;
  animation: slideInUp 1s ease-out 0.2s both;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-buttons .btn {
  padding: 15px 30px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--radius-xl);
  transition: all var(--transition-normal);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  animation: slideInUp 1s ease-out 0.4s both;
}

/* Enhanced Button Styles */
.btn {
  font-weight: 600;
  border-radius: var(--radius-lg);
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 2px solid transparent;
  cursor: pointer;
  user-select: none;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.btn-primary {
  background: var(--gradient-primary);
  border-color: var(--primary-color);
  color: var(--text-light);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  position: relative;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  border-color: var(--primary-dark);
  color: var(--text-light);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
  border-color: var(--secondary-color);
  color: var(--text-light);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, var(--secondary-dark), var(--secondary-color));
  color: var(--text-light);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color), var(--success-light));
  border-color: var(--success-color);
  color: var(--text-light);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
  color: var(--text-light);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger-color), var(--danger-light));
  border-color: var(--danger-color);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  filter: brightness(1.1);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning-color), var(--warning-light));
  border-color: var(--warning-color);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  filter: brightness(1.1);
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: var(--bg-primary);
  position: relative;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.btn-outline-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--gradient-primary);
  transition: width var(--transition-normal);
  z-index: -1;
  border-radius: var(--radius-md);
}

.btn-outline-primary:hover {
  color: var(--text-light);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-outline-primary:hover::before {
  width: 100%;
}

.btn-outline-secondary {
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
}

.btn-outline-secondary:hover {
  color: var(--white);
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline-success {
  border: 2px solid var(--success-color);
  color: var(--success-color);
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
}

.btn-outline-success:hover {
  color: var(--white);
  background: var(--success-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline-danger {
  border: 2px solid var(--danger-color);
  color: var(--danger-color);
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
}

.btn-outline-danger:hover {
  color: var(--white);
  background: var(--danger-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Button Sizes */
.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: var(--radius-xl);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--radius-md);
}

.btn-xs {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

/* Button Groups */
.btn-group .btn {
  border-radius: 0;
  margin-right: -2px;
}

.btn-group .btn:first-child {
  border-top-left-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-lg);
}

.btn-group .btn:last-child {
  border-top-right-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  margin-right: 0;
}

/* Icon Buttons */
.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.btn-icon.btn-sm {
  width: 2rem;
  height: 2rem;
}

.btn-icon.btn-lg {
  width: 3rem;
  height: 3rem;
}

/* Floating Action Button */
.btn-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-2xl);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.btn-fab:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 15px 30px rgba(139, 92, 246, 0.4);
}

.hero-image {
  position: relative;
}

.hero-placeholder, .about-placeholder {
  background: var(--bg-primary);
  border-radius: var(--radius-2xl);
  padding: 60px 40px;
  text-align: center;
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.hero-placeholder::before, .about-placeholder::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-glass);
  opacity: 0.5;
}

.placeholder-content {
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

/* Features Section */
.features-section {
  padding: 100px 0;
  background: var(--bg-primary);
  position: relative;
}

.features-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 49%, rgba(139, 92, 246, 0.03) 50%, transparent 51%);
}

.feature-card {
  text-align: center;
  padding: 40px 30px;
  border-radius: var(--radius-xl);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  height: 100%;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-glass);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-2xl);
  border-color: var(--primary-light);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--white);
  font-size: 1.8rem;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(10deg);
  box-shadow: var(--shadow-xl);
}

.feature-card h4 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* About Section */
.about-section {
  padding: 100px 0;
  background: var(--gray-100);
}

.about-content h2 {
  margin-bottom: 2rem;
}

.about-content p {
  font-size: 1.1rem;
  color: var(--secondary-color);
  line-height: 1.7;
}

/* CTA Section */
.cta-section {
  background: var(--gradient);
  padding: 100px 0;
  color: var(--white);
  text-align: center;
}

.cta-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.cta-subtitle {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

.btn-light {
  background: var(--white);
  color: var(--primary-color);
  border: none;
  font-weight: 600;
}

.btn-light:hover {
  background: var(--gray-100);
  color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(255, 255, 255, 0.3);
}

.btn-outline-light {
  border: 2px solid var(--white);
  color: var(--white);
  background: transparent;
}

.btn-outline-light:hover {
  background: var(--white);
  color: var(--primary-color);
  transform: translateY(-3px);
}

/* Contact Section */
.contact-section {
  padding: 100px 0;
  background: var(--white);
}

.contact-form {
  background: var(--gray-100);
  padding: 50px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
}

.form-control {
  padding: 15px 20px;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--white);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
  background: var(--white);
}

/* Footer */
.footer-section {
  background: var(--dark-color);
  color: var(--white);
  padding: 80px 0 40px;
}

.footer-section h5, .footer-section h6 {
  color: var(--white);
}

.footer-section .text-muted {
  color: var(--gray-300) !important;
}

.footer-section a:hover {
  color: var(--primary-light) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .cta-title {
    font-size: 2.2rem;
  }
  
  .hero-section {
    padding: 100px 0 60px;
  }
  
  .features-section,
  .about-section,
  .contact-section {
    padding: 60px 0;
  }
  
  .cta-section {
    padding: 60px 0;
  }
  
  .contact-form {
    padding: 30px 20px;
  }
  
  .hero-buttons .btn {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .navbar-brand {
    font-size: 1.3rem;
  }
}

/* Smooth animations */
* {
  transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Focus states for accessibility */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

/* Utility classes */
.text-primary {
  color: var(--primary-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.border-primary {
  border-color: var(--primary-color) !important;
}

/* Authentication Styles */
.auth-section {
  background: linear-gradient(135deg, var(--light-color) 0%, var(--gray-100) 100%);
  min-height: 100vh;
  padding: 120px 0 80px;
  display: flex;
  align-items: center;
}

.auth-card {
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--gray-200);
  max-width: 100%;
}

.auth-header {
  margin-bottom: 2rem;
}

.auth-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--white);
  font-size: 2rem;
}

.auth-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: var(--secondary-color);
  font-size: 1rem;
  margin-bottom: 0;
}

.auth-form .form-label {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.auth-form .input-group {
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--gray-200);
  transition: all 0.3s ease;
}

.auth-form .input-group:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.auth-form .input-group-text {
  background: var(--gray-100);
  border: none;
  color: var(--secondary-color);
  padding: 15px;
}

.auth-form .form-control {
  border: none;
  padding: 15px;
  background: var(--white);
  font-size: 1rem;
}

.auth-form .form-control:focus {
  box-shadow: none;
  border: none;
}

.password-toggle {
  background: var(--gray-100);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.password-toggle:hover {
  background: var(--gray-200);
  color: var(--primary-color);
}

.auth-btn {
  padding: 15px 30px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 12px;
  background: var(--gradient);
  border: none;
  transition: all 0.3s ease;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
}

.auth-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.auth-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.auth-divider {
  position: relative;
  text-align: center;
  margin: 2rem 0;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gray-200);
}

.auth-divider span {
  background: var(--white);
  color: var(--secondary-color);
  padding: 0 1rem;
  font-size: 0.9rem;
  position: relative;
}

.social-login .social-btn {
  padding: 12px 20px;
  font-weight: 500;
  border-radius: 12px;
  border: 2px solid var(--gray-200);
  color: var(--dark-color);
  transition: all 0.3s ease;
}

.social-login .social-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.form-check-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.text-danger.small {
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.2);
  color: #721c24;
  border-radius: 12px;
  padding: 15px;
}

/* Password Strength Indicator */
.password-strength {
  margin-top: 0.5rem;
}

.password-strength .text-danger {
  color: #dc3545 !important;
}

.password-strength .text-warning {
  color: #ffc107 !important;
}

.password-strength .text-info {
  color: #17a2b8 !important;
}

.password-strength .text-success {
  color: #28a745 !important;
}

/* Responsive Auth Styles */
@media (max-width: 768px) {
  .auth-section {
    padding: 100px 0 60px;
  }
  
  .auth-card {
    padding: 30px 20px;
    margin: 0 15px;
  }
  
  .auth-title {
    font-size: 1.75rem;
  }
  
  .auth-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  .auth-card {
    padding: 25px 15px;
  }
  
  .auth-title {
    font-size: 1.5rem;
  }
}

/* Navigation Dropdown Styles */
.navbar .dropdown-menu {
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
}

.navbar .dropdown-item {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  color: var(--dark-color);
  transition: all 0.3s ease;
}

.navbar .dropdown-item:hover {
  background-color: var(--gray-100);
  color: var(--primary-color);
}

.navbar .dropdown-divider {
  margin: 0.5rem 0;
  border-color: var(--gray-200);
}

/* Alert Styles */
.alert {
  border: none;
  border-radius: 0;
  font-weight: 500;
}

.alert-success {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
}

.alert-danger {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  color: #721c24;
}

.alert-info {
  background: linear-gradient(135deg, #d1ecf1, #bee5eb);
  color: #0c5460;
}

.alert .btn-close {
  opacity: 0.7;
}

.alert .btn-close:hover {
  opacity: 1;
}

/* Dashboard Styles */
.dashboard-section {
  padding: 120px 0 80px;
  background: var(--bg-secondary);
  min-height: 100vh;
  position: relative;
}

.dashboard-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.dashboard-header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  z-index: 1;
}

.dashboard-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  background: var(--gradient-royal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: slideInUp 1s ease-out;
}

.dashboard-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  animation: slideInUp 1s ease-out 0.2s both;
}

.stat-card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-glass);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-2xl);
  border-color: var(--primary-light);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.5rem;
  margin-right: 1.5rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: all var(--transition-normal);
}

.stat-card:hover .stat-icon {
  transform: scale(1.1) rotate(10deg);
}

.stat-content {
  position: relative;
  z-index: 1;
}

.stat-content h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.stat-content p {
  color: black;
  margin-bottom: 0;
  font-weight: 500;
}

.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 2rem 1rem;
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  height: 120px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
}

.quick-action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.quick-action-card:hover {
  color: var(--white);
  transform: translateY(-5px) scale(1.05);
  box-shadow: var(--shadow-2xl);
  text-decoration: none;
  border-color: var(--primary-color);
}

.quick-action-card:hover::before {
  opacity: 1;
}

.quick-action-card i {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
  transition: all var(--transition-normal);
}

.quick-action-card:hover i {
  transform: scale(1.2) rotate(10deg);
}

.quick-action-card span {
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

/* Featured Items Styles */
.featured-items-section {
  padding: 80px 0;
  background: var(--white);
}

.item-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
  height: 100%;
}

.item-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.item-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--gray-100);
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.item-card:hover .item-image img {
  transform: scale(1.05);
}

.item-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
}

.item-content {
  padding: 1.5rem;
}

.item-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.item-description {
  color: var(--secondary-color);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.item-type {
  font-size: 0.85rem;
  color: var(--secondary-color);
  font-weight: 500;
}

.item-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-actions .btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.item-actions .btn-outline-secondary {
  width: 40px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Recent Orders Section */
.recent-orders-section {
  padding: 60px 0;
  background: var(--gray-100);
}

.order-card {
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.order-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.order-id {
  font-weight: 600;
  color: var(--dark-color);
}

.order-date {
  color: var(--secondary-color);
  font-size: 0.9rem;
}

.order-details {
  color: var(--secondary-color);
  line-height: 1.5;
}

/* Responsive Dashboard */
@media (max-width: 768px) {
  .dashboard-section {
    padding: 100px 0 60px;
  }
  
  .dashboard-title {
    font-size: 2rem;
  }
  
  .stat-card {
    padding: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .stat-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    margin-right: 1rem;
  }
  
  .stat-content h3 {
    font-size: 1.5rem;
  }
  
  .quick-action-card {
    height: 100px;
    padding: 1.5rem 1rem;
  }
  
  .quick-action-card i {
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  .item-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .item-actions .btn {
    width: 100%;
  }
  
  .item-actions .btn-outline-secondary {
    width: 100%;
    height: auto;
  }
  
  /* Mobile table actions */
  .table th.actions-column,
  .table td.actions-column {
    min-width: 160px;
    width: 160px;
  }
  
  .table-actions {
    flex-direction: column;
    gap: 0.2rem;
    min-width: 160px;
  }
  
  .table-actions .btn {
    padding: 0.25rem 0.4rem;
    font-size: 0.7rem;
    width: 100%;
  }
  
  .table-actions .btn i {
    font-size: 0.65rem;
  }
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
  border-left: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.15), -4px 0 20px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1040; /* LOWERED: Below modal-backdrop (1050) and modal (1055) */
  overflow-y: auto;
  overflow-x: hidden;
  backdrop-filter: blur(25px) saturate(180%);
  border-radius: 0 0 0 28px;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.5);
}

[data-theme="dark"] .sidebar {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.95) 100%);
  border-left: 1px solid rgba(51, 65, 85, 0.8);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.3), -4px 0 20px rgba(0, 0, 0, 0.2);
}

.sidebar.active {
  right: 0;
}

.sidebar-header {
  padding: 2rem 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(248, 250, 252, 0.05) 100%);
  position: relative;
  backdrop-filter: blur(10px);
}

.sidebar-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-glass);
  opacity: 0.5;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.sidebar-close {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.2);
  font-size: 1.1rem;
  color: #ef4444;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.sidebar-close:hover {
  background: rgba(248, 113, 113, 0.2);
  border-color: rgba(248, 113, 113, 0.4);
  color: #dc2626;
  transform: scale(1.05) rotate(90deg);
  box-shadow: 0 4px 12px rgba(248, 113, 113, 0.3);
}

.sidebar-user {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  background: var(--bg-tertiary);
  position: relative;
}

.sidebar-user::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-glass);
  opacity: 0.3;
}

.user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.5rem;
  margin-right: 1rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
}

.sidebar-user:hover .user-avatar {
  transform: scale(1.1);
  box-shadow: var(--shadow-xl);
}

.user-info {
  position: relative;
  z-index: 1;
}

.user-info h6 {
  margin: 0;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.user-info small {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.sidebar-nav {
  padding: 1.5rem 0 2rem;
}

.sidebar-nav .nav {
  padding: 0;
}

.sidebar-nav .nav-item {
  margin: 0;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  color: #475569;
  text-decoration: none;
  border-radius: 0 16px 16px 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  margin: 0.25rem 0 0.25rem 1rem;
  overflow: hidden;
}

.sidebar-nav .nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.sidebar-nav .nav-link:hover {
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
  transform: translateX(-8px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.sidebar-nav .nav-link:hover::before {
  width: 100%;
}

.sidebar-nav .nav-link.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.20) 0%, rgba(139, 92, 246, 0.20) 100%);
  color: #4f46e5;
  border-right: 4px solid #4f46e5;
  transform: translateX(-8px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.25);
  font-weight: 600;
  /* تأثير hover دائم للعنصر النشط */
  position: relative;
  overflow: hidden;
}

.sidebar-nav .nav-link.active::before {
  width: 100%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
}

/* تأثير إضافي للعنصر النشط - يشبه hover لكنه دائم */
.sidebar-nav .nav-link.active::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #4f46e5 0%, #7c3aed 100%);
  box-shadow: 0 0 10px rgba(79, 70, 229, 0.4);
}

/* تحسين hover للعنصر النشط - يصبح أكثر إشراقاً */
.sidebar-nav .nav-link.active:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
  color: #3730a3;
  transform: translateX(-10px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

/* تأثير النبضة للعنصر النشط */
.sidebar-nav .nav-link.active {
  animation: activeGlow 3s ease-in-out infinite alternate;
}

/* تأثير إضافي للبرق الجانبي */
.sidebar-nav .nav-link.active {
  position: relative;
}

.sidebar-nav .nav-link.active::after {
  animation: sidePulse 2s ease-in-out infinite;
}

@keyframes sidePulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.4);
  }
  50% {
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.6);
  }
}

@keyframes activeGlow {
  0% {
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.25);
  }
  100% {
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
  }
}

/* دعم الثيم المظلم للعنصر النشط */
[data-theme="dark"] .sidebar-nav .nav-link.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
  color: #818cf8;
  border-right-color: #818cf8;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

[data-theme="dark"] .sidebar-nav .nav-link.active::before {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35) 0%, rgba(139, 92, 246, 0.35) 100%);
}

[data-theme="dark"] .sidebar-nav .nav-link.active::after {
  background: linear-gradient(180deg, #818cf8 0%, #a78bfa 100%);
  box-shadow: 0 0 15px rgba(129, 140, 248, 0.5);
}

[data-theme="dark"] .sidebar-nav .nav-link.active:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4) 0%, rgba(139, 92, 246, 0.4) 100%);
  color: #a5b4fc;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.5);
}

/* تحسين الأيقونة للعنصر النشط */
.sidebar-nav .nav-link.active i {
  transform: scale(1.1);
  text-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

[data-theme="dark"] .sidebar-nav .nav-link.active i {
  text-shadow: 0 2px 8px rgba(129, 140, 248, 0.4);
}

/* تحسين النص للعنصر النشط */
.sidebar-nav .nav-link.active span {
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(79, 70, 229, 0.2);
}

[data-theme="dark"] .sidebar-nav .nav-link.active span {
  text-shadow: 0 1px 3px rgba(129, 140, 248, 0.3);
}

/* تأثير الانتقال السلس للعناصر */
.sidebar-nav .nav-link {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-nav .nav-link i,
.sidebar-nav .nav-link span {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* تنسيق الأيقونات في القائمة الجانبية */
.sidebar-nav .nav-link i {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 12px;
  font-size: 1.1rem;
}

/* تنسيق خاص لأيقونة الواتساب */
.sidebar-nav .nav-link i.fa-whatsapp,
.sidebar-nav .nav-link .fab.fa-whatsapp {
  color: #25D366;
}

.sidebar-nav .nav-link:hover i.fa-whatsapp,
.sidebar-nav .nav-link.active i.fa-whatsapp,
.sidebar-nav .nav-link:hover .fab.fa-whatsapp,
.sidebar-nav .nav-link.active .fab.fa-whatsapp {
  color: #128C7E;
}

/* إصلاح محاذاة أيقونات FontAwesome Brands (fab) في القائمة الجانبية */
.sidebar-nav .nav-link .fab {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  width: 24px !important;
  height: 24px !important;
  margin-left: 12px !important;
  font-size: 1.1rem !important;
  line-height: 1 !important;
}

/* تأثير إضافي عند التمرير للعناصر غير النشطة */
.sidebar-nav .nav-link:not(.active):hover {
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
  transform: translateX(-6px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] .sidebar-nav .nav-link:not(.active):hover {
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

/* تأثير الموجة للعنصر النشط */
.sidebar-nav .nav-link.active::before {
  animation: wave 4s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(2px);
  }
}

/* تحسين الاستجابة للشاشات الصغيرة */
@media (max-width: 768px) {
  .sidebar-nav .nav-link.active {
    transform: translateX(-4px);
  }
  
  .sidebar-nav .nav-link.active:hover {
    transform: translateX(-6px);
  }
  
  .sidebar-nav .nav-link:not(.active):hover {
    transform: translateX(-3px);
  }
}

/* تأثير التركيز للوصولية */
.sidebar-nav .nav-link:focus {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

[data-theme="dark"] .sidebar-nav .nav-link:focus {
  outline-color: #818cf8;
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.1);
}

/* تحسين الأداء - تقليل إعادة الرسم */
.sidebar-nav .nav-link {
  will-change: transform, box-shadow;
}

.sidebar-nav .nav-link.active {
  will-change: box-shadow;
}

/* Chart Containers Styles */
.chart-container {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 0;
  transition: all var(--transition-normal);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.chart-container:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}

[data-theme="dark"] .chart-container {
  background: var(--dark-bg-secondary);
  border-color: var(--dark-border);
}

.chart-header {
  padding: 1.5rem 2rem 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(248, 250, 252, 0.02) 100%);
}

[data-theme="dark"] .chart-header {
  border-bottom-color: var(--dark-border);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.5) 0%, rgba(51, 65, 85, 0.2) 100%);
}

.chart-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
}

.chart-controls {
  display: flex;
  gap: 0.5rem;
}

.chart-controls .btn {
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  padding: 0.375rem 0.75rem;
  transition: all var(--transition-fast);
}

.chart-controls .btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.chart-body {
  padding: 1.5rem 2rem 2rem;
  position: relative;
}

.chart-legend {
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

[data-theme="dark"] .chart-legend {
  border-top-color: var(--dark-border);
  background: var(--dark-bg-tertiary);
}

.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.legend-item:last-child {
  margin-bottom: 0;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 0.75rem;
  display: inline-block;
}

.legend-text {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Section Headers for Charts */
.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header .section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-header .section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Responsive Chart Styles */
@media (max-width: 768px) {
  .chart-header {
    padding: 1rem 1.5rem 0.75rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .chart-body {
    padding: 1rem 1.5rem 1.5rem;
  }
  
  .chart-legend {
    padding: 0.75rem 1.5rem 1rem;
  }
  
  .chart-controls {
    width: 100%;
    justify-content: center;
  }
  
  .section-header .section-title {
    font-size: 1.5rem;
    flex-direction: column;
    text-align: center;
  }
}

/* Chart Animation Effects */
.chart-container {
  animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Chart Loading Effect */
.chart-body::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: chartLoading 1s linear infinite;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
}

.chart-body.loading::before {
  opacity: 1;
}

@keyframes chartLoading {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Enhanced Chart Hover Effects */
.chart-container:hover .chart-title {
  color: var(--primary-color);
  transform: translateX(5px);
}

/* Chart Gradient Backgrounds */
.chart-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.chart-container:hover::before {
  opacity: 1;
}

.sidebar-nav .nav-link.text-danger {
  color: #ef4444;
  margin-top: 1rem;
}

.sidebar-nav .nav-link.text-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  transform: translateX(-8px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.sidebar-nav .nav-link.text-danger::before {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
}

.sidebar-nav .nav-link i {
  width: 24px;
  margin-right: 1rem;
  font-size: 1.1rem;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  position: relative;
}

.sidebar-nav .nav-link span {
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  position: relative;
}

.sidebar-nav .badge {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
}

.nav-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(226, 232, 240, 0.8) 50%, transparent 100%);
  margin: 1.5rem 1.5rem;
  border-radius: 1px;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1030; /* Lower than modal-backdrop (1050) */
  opacity: 0;
  visibility: hidden;
  pointer-events: none; /* Prevent blocking clicks when not active */
  transition: all 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto; /* Allow clicks when active */
}

/* Note: Modal z-index fixes are defined below in the "BOOTSTRAP MODAL Z-INDEX FIX" section */

.sidebar-toggle {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
  border: none !important;
  color: var(--white) !important;
  padding: 0.75rem 1rem !important;
  border-radius: 12px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.1rem;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4) !important;
  display: flex !important;
  align-items: center !important;
  font-weight: 600 !important;
  min-width: 60px;
  height: 45px;
  backdrop-filter: blur(10px) !important;
}

.sidebar-toggle:hover {
  background: linear-gradient(135deg, #3730a3 0%, #6b21a8 100%) !important;
  color: var(--white);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5) !important;
}

.sidebar-toggle:focus {
  background: linear-gradient(135deg, #3730a3 0%, #6b21a8 100%) !important;
  color: var(--white);
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.5), 0 6px 20px rgba(99, 102, 241, 0.4) !important;
  outline: none;
}

/* Main Content Adjustments */
.main-content {
  transition: all 0.3s ease;
  padding-top: 80px; /* Add padding to prevent header overlap */
}

.main-content .dashboard-section {
  padding-left: 2rem;
  padding-right: 2rem;
}

.main-content .featured-items-section {
  padding-left: 2rem;
  padding-right: 2rem;
}

/* RTL Sidebar adjustments */
.main-content.sidebar-open {
  margin-right: 300px;
  margin-left: 0;
  transition: margin 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive Sidebar */
@media (min-width: 992px) {
  .sidebar-toggle {
    display: flex !important;
  }
  
  .sidebar {
    right: -300px;
  }
  
  .sidebar.active {
    right: 0;
  }
  
  .main-content.sidebar-open {
    margin-right: 300px;
  }
  
  .sidebar-overlay {
    display: none;
  }
}

@media (max-width: 991px) {
  .sidebar {
    right: -300px;
    z-index: 1040; /* Below modal z-index (1050-1057) */
    width: 280px;
  }

  .sidebar.active {
    right: 0;
  }

  .main-content {
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  .sidebar-overlay.active {
    display: block;
    z-index: 1035; /* Below sidebar */
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 280px;
    right: -280px;
  }
  
  .sidebar-header {
    padding: 1.5rem 1.25rem 1rem;
  }
  
  .sidebar-user {
    padding: 1rem;
  }
  
  .user-avatar {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .sidebar-nav .nav-link {
    padding: 0.75rem 1.25rem;
    margin: 0.2rem 0 0.2rem 0.75rem;
  }
  
  .sidebar-nav .nav-link:hover {
    transform: translateX(-6px);
  }
}

@media (max-width: 576px) {
  .sidebar {
    width: 260px;
    right: -260px;
  }
  
  .navbar .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .sidebar-toggle {
    padding: 0.375rem 0.5rem;
    margin-right: 0.75rem;
  }
}

/* Modern UI Components */

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.spinner-lg {
  width: 60px;
  height: 60px;
  border-width: 6px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Progress Bar */
.progress-modern {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 50px;
  overflow: hidden;
  position: relative;
}

.progress-bar-modern {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 50px;
  transition: width var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.progress-bar-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Toast Notifications */
.toast-modern {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-2xl);
  backdrop-filter: blur(20px);
  z-index: 9999;
  transform: translateX(400px);
  transition: transform var(--transition-normal);
}

.toast-modern.show {
  transform: translateX(0);
}

.toast-success {
  border-left: 4px solid var(--success-color);
}

.toast-error {
  border-left: 4px solid var(--danger-color);
}

.toast-info {
  border-left: 4px solid var(--primary-color);
}

.toast-warning {
  border-left: 4px solid var(--warning-color);
}

/* Modal Enhancements */
.modal-modern .modal-content {
  border: none;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  backdrop-filter: blur(20px);
  background: var(--bg-primary);
}

.modal-modern .modal-header {
  border-bottom: 1px solid var(--border-color);
  background: var(--gradient-glass);
}

.modal-modern .modal-footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

/* =====================================================
   BOOTSTRAP MODAL Z-INDEX FIX - CRITICAL!
   Ensures modals appear above ALL other elements
   ===================================================== */

/* Modal base - highest z-index */
.modal {
  z-index: 10050 !important;
  position: fixed !important;
}

/* Modal backdrop - just below modal */
.modal-backdrop {
  z-index: 10040 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
}

/* Modal dialog container */
.modal-dialog {
  z-index: 10055 !important;
  position: relative !important;
  pointer-events: auto !important;
}

/* Modal content - clickable area */
.modal-content {
  position: relative !important;
  z-index: 10060 !important;
  pointer-events: auto !important;
  background: var(--bg-primary) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

/* Modal inner elements must be clickable */
.modal-header,
.modal-body,
.modal-footer {
  position: relative !important;
  z-index: 10061 !important;
  pointer-events: auto !important;
}

.modal-body input,
.modal-body textarea,
.modal-body select,
.modal-body button,
.modal-footer button {
  position: relative !important;
  z-index: 10062 !important;
  pointer-events: auto !important;
}

/* When modal is showing, ensure it's on top */
.modal.show {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* CRITICAL: Hide ALL overlays when modal is open */
body.modal-open .sidebar {
  z-index: 100 !important;
  pointer-events: none !important;
}

body.modal-open .sidebar-overlay,
body.modal-open .sidebar-overlay.active {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  z-index: -9999 !important;
  display: none !important;
}

body.modal-open .loading-overlay {
  z-index: 1 !important;
}

/* Ensure body scroll is locked when modal is open */
body.modal-open {
  overflow: hidden !important;
  padding-right: 0 !important;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-title {
  height: 1.5rem;
  width: 60%;
  margin-bottom: 1rem;
}

.skeleton-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

/* Floating Action Button */
.fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-primary);
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  box-shadow: var(--shadow-2xl);
  transition: all var(--transition-normal);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fab:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.4);
}

/* Tooltip */
.tooltip-modern {
  position: relative;
}

.tooltip-modern::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark-bg-secondary);
  color: var(--white);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 1000;
}

.tooltip-modern::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--dark-bg-secondary);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.tooltip-modern:hover::before,
.tooltip-modern:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

/* Badge Enhancements */
.badge-modern {
  padding: 0.375rem 0.75rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.badge-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.badge-modern:hover::before {
  left: 100%;
}

/* Card Hover Effects */
.card-hover-lift {
  transition: all var(--transition-normal);
}

.card-hover-lift:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-2xl);
}

/* Glassmorphism Effect */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
}

[data-theme="dark"] .glass {
  background: rgba(15, 23, 42, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Pulse Animation */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Bounce Animation */
.bounce {
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% { transform: translateY(0); }
  40%, 43% { transform: translateY(-30px); }
  70% { transform: translateY(-15px); }
  90% { transform: translateY(-4px); }
}

/* Scroll Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animations */
.animate-on-scroll:nth-child(1) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.4s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.5s; }

/* Page transitions */
.page-enter {
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading states */
.btn.loading {
  position: relative;
  color: transparent !important;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  color: white;
}

/* Enhanced form styles */
.form-floating .form-control:focus ~ label,
.form-floating .form-control:not(:placeholder-shown) ~ label {
  transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
  color: var(--primary-color);
}

.form-control {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.15), var(--shadow-md);
  background-color: var(--bg-primary);
  transform: translateY(-1px);
}

.form-control:hover:not(:focus) {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.form-control::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

/* Enhanced Select Styling */
.form-select {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.15), var(--shadow-md);
  transform: translateY(-1px);
}

/* Form Group Enhancements */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* Input Group Styling */
.input-group {
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.input-group .form-control {
  border-radius: 0;
  box-shadow: none;
}

.input-group .form-control:first-child {
  border-top-left-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-lg);
}

.input-group .form-control:last-child {
  border-top-right-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.input-group-text {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 500;
}

.input-group:focus-within {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

/* Table enhancements */
.table {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 0;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table thead th {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--text-light);
  border: none;
  font-weight: 700;
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.table thead th::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.table thead th:hover::before {
  left: 100%;
}

.table tbody tr {
  border: none;
  transition: all var(--transition-normal);
  position: relative;
}

.table tbody tr::before {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: var(--primary-color);
  transform: scaleY(0);
  transition: transform var(--transition-normal);
  border-radius: 0 3px 3px 0;
}

.table tbody tr:hover {
  background: var(--bg-secondary);
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.table tbody tr:hover::before {
  transform: scaleY(1);
}

.table tbody tr:nth-child(even) {
  background: rgba(139, 92, 246, 0.02);
}

.table tbody tr:nth-child(even):hover {
  background: var(--bg-secondary);
}

.table tbody td {
  padding: 1.25rem 1.5rem;
  vertical-align: middle;
  border: none;
  font-weight: 500;
  color: var(--text-primary);
  position: relative;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.table tbody td:first-child {
  font-weight: 600;
  color: var(--primary-color);
}

/* Enhanced Table Layout with Perfect Alignment */
.table th,
.table td {
  text-align: center !important;
  vertical-align: middle !important;
  position: relative;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.table thead th {
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.table tbody td {
  border-bottom: 1px solid var(--border-color);
}

/* Remove borders for first and last columns */
.table th:first-child,
.table td:first-child {
  border-right: none;
}

.table th:last-child,
.table td:last-child {
  border-left: none;
}

/* Ensure consistent column widths */
.table th,
.table td {
  min-width: 120px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Special styling for action columns */
.table th.actions-col,
.table td.actions-col,
.table th.actions-column,
.table td.actions-column {
  min-width: 200px;
  max-width: none;
  width: 250px;
  white-space: nowrap;
}

/* Perfect header styling */
.table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.table thead th {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1rem 1.25rem;
  border: none;
  position: relative;
}

/* Responsive table improvements */
@media (max-width: 768px) {
  .table th,
  .table td {
    min-width: 100px;
    font-size: 0.85rem;
    padding: 0.75rem 0.5rem;
  }
  
  .table thead th {
    font-size: 0.8rem;
    padding: 0.75rem 0.5rem;
  }
  
  /* Actions column responsive */
  .table th.actions-column,
  .table td.actions-column {
    min-width: 180px;
    width: 180px;
  }
  
  .table-actions {
    gap: 0.25rem;
    min-width: 180px;
  }
  
  .table-actions .btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .table-actions .btn i {
    font-size: 0.7rem;
  }
}

/* Table Wrapper for Responsive */
.table-responsive {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
}

/* Table Search and Filter Styling */
.table-search {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem 0.75rem 3rem;
  font-size: 1rem;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.table-search:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.15), var(--shadow-md);
  transform: translateY(-1px);
}

.table-search-wrapper {
  position: relative;
}

.table-search-wrapper::before {
  content: '\f002';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  z-index: 2;
}

/* Table Actions */
.table-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  min-width: 200px;
}

.table-actions .btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.table-actions .btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Ensure actions column doesn't wrap */
.actions-column {
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: unset !important;
}

/* Ensure buttons don't break */
.table-actions .btn {
  white-space: nowrap;
  color:white;
  flex-shrink: 0;
  min-width: auto;
}

/* Table Status Badges */
.status-badge {
  padding: 0.4rem 1rem;
  border-radius: var(--radius-xl);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.status-badge.active {
  background: linear-gradient(135deg, var(--success-color), var(--success-light));
  color: var(--white);
}

.status-badge.inactive {
  background: linear-gradient(135deg, var(--danger-color), var(--danger-light));
  color: var(--white);
}

.status-badge.pending {
  background: linear-gradient(135deg, var(--warning-color), var(--warning-light));
  color: var(--white);
}

/* Empty State for Tables */
.table-empty {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
}

.table-empty i {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  opacity: 0.5;
}

.table-empty h4 {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.table-empty p {
  margin-bottom: 0;
}

/* Enhanced Card Styles */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
  overflow: hidden;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-glass);
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: 0;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-2xl);
  border-color: var(--primary-light);
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 2rem;
  position: relative;
  z-index: 1;
  font-weight: 700;
}

.card-header h3,
.card-header h4,
.card-header h5 {
  margin: 0;
  color: var(--text-primary);
  font-weight: 700;
}

.card-body {
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.card-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 1rem 2rem;
  position: relative;
  z-index: 1;
}

/* Harmonious Card Colors */
.card-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--text-light);
  border: none;
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.25);
}

.card-gradient-primary .stat-content h3,
.card-gradient-primary .stat-content p {
  color: var(--text-light) !important;
}

.card-gradient-secondary {
  background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
  color: var(--text-light);
  border: none;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.25);
}

.card-gradient-secondary .stat-content h3,
.card-gradient-secondary .stat-content p {
  color: var(--text-light) !important;
}

.card-gradient-accent {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
  color: var(--text-light);
  border: none;
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.25);
}

.card-gradient-accent .stat-content h3,
.card-gradient-accent .stat-content p {
  color: var(--text-light) !important;
}

.card-gradient-success {
  background: linear-gradient(135deg, var(--success-color), var(--success-light));
  color: var(--text-light);
  border: none;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.25);
}

.card-gradient-success .stat-content h3,
.card-gradient-success .stat-content p {
  color: var(--text-light) !important;
}

/* Clean White Cards */
.card-white-primary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 2px solid var(--primary-color);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.card-white-primary .stat-content h3 {
  color: var(--primary-color) !important;
}

.card-white-primary .stat-content p {
  color: var(--text-secondary) !important;
}

.card-white-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 2px solid var(--secondary-color);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
}

.card-white-secondary .stat-content h3 {
  color: var(--secondary-color) !important;
}

.card-white-secondary .stat-content p {
  color: var(--text-secondary) !important;
}

/* Glass Cards */
.card-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .card-glass {
  background: rgba(15, 23, 42, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Card with Icon */
.card-with-icon {
  position: relative;
  padding-top: 3rem;
}

.card-icon {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.25rem;
  z-index: 2;
}

/* Card Animations */
.card-fade-in {
  animation: cardFadeIn 0.6s ease-out forwards;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card Loading State */
.card-loading {
  position: relative;
  overflow: hidden;
}

.card-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Enhanced Spacing and Layout */
.page-header {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-title i {
  color: var(--primary-color);
  font-size: 1.75rem;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin: 0;
  font-weight: 500;
}

/* Enhanced Section Spacing */
.section-spacing {
  margin: 3rem 0;
}

.section-spacing-sm {
  margin: 1.5rem 0;
}

.section-spacing-lg {
  margin: 4rem 0;
}

/* Content Containers */
.content-container {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.content-container-sm {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.content-container-lg {
  padding: 3rem;
  margin-bottom: 3rem;
}

/* Enhanced Grid Spacing */
.row-spacing {
  margin-bottom: 2rem;
}

.row-spacing-sm {
  margin-bottom: 1rem;
}

.row-spacing-lg {
  margin-bottom: 3rem;
}

.col-spacing > * {
  margin-bottom: 1.5rem;
}

.col-spacing > *:last-child {
  margin-bottom: 0;
}

/* Enhanced Typography Hierarchy */
.display-1 {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
}

.display-2 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
}

.display-3 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.lead {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-secondary);
}

.text-gradient {
  background: var(--gradient-royal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Enhanced Badges - Blue, Green, White Theme */
.badge {
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-xl);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.badge-secondary {
  background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.badge-success {
  background: linear-gradient(135deg, var(--success-color), var(--success-light));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: linear-gradient(135deg, var(--warning-color), var(--warning-light));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.badge-danger {
  background: linear-gradient(135deg, var(--danger-color), var(--danger-light));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.badge-white {
  background: var(--white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.badge-white-green {
  background: var(--white);
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

/* Enhanced Progress Bars */
.progress {
  height: 0.75rem;
  border-radius: var(--radius-xl);
  background: var(--bg-secondary);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: var(--radius-xl);
  transition: width var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.progress-bar-secondary {
  background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
}

.progress-bar-success {
  background: linear-gradient(135deg, var(--success-color), var(--success-light));
}

.progress-bar-warning {
  background: linear-gradient(135deg, var(--warning-color), var(--warning-light));
}

.progress-bar-danger {
  background: linear-gradient(135deg, var(--danger-color), var(--danger-light));
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.2) 50%, transparent 60%);
  animation: progressShine 2s infinite;
}

@keyframes progressShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Enhanced Visual Effects */
.glow-effect {
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
  transition: box-shadow var(--transition-normal);
}

.glow-effect:hover {
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
}

.pulse-animation {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.fade-in {
  animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.bounce-in {
  animation: bounceIn 0.8s ease-out;
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

/* Hover Effects */
.hover-lift {
  transition: transform var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-5px);
}

.hover-scale {
  transition: transform var(--transition-normal);
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-rotate {
  transition: transform var(--transition-normal);
}

.hover-rotate:hover {
  transform: rotate(5deg);
}

/* Enhanced Borders */
.border-gradient {
  border: 2px solid transparent;
  background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box,
              var(--gradient-primary) border-box;
  border-radius: var(--radius-lg);
}

.border-animated {
  position: relative;
  overflow: hidden;
}

.border-animated::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: var(--gradient-primary);
  animation: borderSlide 3s infinite;
}

@keyframes borderSlide {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* Text Effects */
.text-shadow {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.text-glow {
  text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.text-typing {
  overflow: hidden;
  border-right: 3px solid var(--primary-color);
  white-space: nowrap;
  animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  from, to { border-color: transparent; }
  50% { border-color: var(--primary-color); }
}

/* Loading States */
.loading-skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.spinner {
  border: 3px solid var(--bg-tertiary);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Enhanced Notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-left: 4px solid var(--primary-color);
  z-index: 9999;
  animation: slideInRight 0.5s ease-out;
  color: var(--text-primary);
}

.notification.success {
  border-left-color: var(--success-color);
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.notification.error {
  border-left-color: var(--danger-color);
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.notification.warning {
  border-left-color: var(--warning-color);
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.notification.info {
  border-left-color: var(--primary-color);
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
}

/* Consistent Text Colors */
.text-primary-custom {
  color: var(--primary-color) !important;
}

.text-secondary-custom {
  color: var(--secondary-color) !important;
}

.text-accent-custom {
  color: var(--accent-color) !important;
}

.text-muted-custom {
  color: var(--text-muted) !important;
}

/* Background Utilities */
.bg-primary-light {
  background-color: rgba(59, 130, 246, 0.1) !important;
}

.bg-secondary-light {
  background-color: rgba(16, 185, 129, 0.1) !important;
}

.bg-accent-light {
  background-color: rgba(245, 158, 11, 0.1) !important;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Dark theme scrollbar */
[data-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--dark-bg-secondary);
}

/* Enhanced Dashboard Specific Styles */
.dashboard-section {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  position: relative;
  overflow: hidden;
}

.dashboard-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 25% 75%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 75% 25%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
  animation: dashboardFloat 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes dashboardFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-30px) rotate(120deg); }
  66% { transform: translateY(15px) rotate(240deg); }
}

/* Enhanced Stat Cards */
.stat-card {
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s;
}

.stat-card:hover::after {
  left: 100%;
}

.stat-icon {
  position: relative;

  margin:10px;
  z-index: 2;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-content {
  position: relative;
  z-index: 2;
}

/* Enhanced Progress Bars */
.progress-modern {
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: visible;
}

.progress-bar {
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.3) 50%, transparent 60%);
  animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Enhanced Quick Action Cards */
.quick-action-card {
  background: var(--bg-primary);
  border: 2px solid transparent;
  background-clip: padding-box;
  position: relative;
  overflow: hidden;
}

.quick-action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  z-index: -1;
  border-radius: inherit;
  margin: -2px;
}

.quick-action-card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Enhanced Table Styles */
.table-responsive {
  background: var(--bg-primary);
  backdrop-filter: blur(20px);
}

.table tbody tr {
  transition: all 0.3s ease;
}

.table tbody tr:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(16, 185, 129, 0.05));
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Enhanced Badges */
.status-badge {
  position: relative;
  overflow: hidden;
}

.status-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.status-badge:hover::before {
  left: 100%;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
  .stat-card {
    margin-bottom: 1.5rem;
  }
  
  .dashboard-title {
    font-size: 1.8rem;
  }
  
  .dashboard-subtitle {
    font-size: 1rem;
  }
  
  .quick-action-card {
    height: 80px;
    font-size: 0.85rem;
  }
  
  .quick-action-card i {
    font-size: 1.2rem;
  }
  
  .content-container {
    padding: 1.5rem;
  }
}

@media (max-width: 576px) {
  .stat-card {
    padding: 1.5rem;
  }
  
  .stat-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    margin-right: 1rem;
  }
  
  .stat-content h3 {
    font-size: 1.5rem;
  }
  
  .dashboard-section {
    padding: 80px 0 60px;
  }
  
  .table-responsive {
    font-size: 0.85rem;
  }
  
  .table th,
  .table td {
    padding: 0.5rem;
  }
}

/* Dark Theme Enhancements */
[data-theme="dark"] .dashboard-section {
  background: linear-gradient(135deg, var(--dark-bg-primary) 0%, var(--dark-bg-secondary) 100%);
}

[data-theme="dark"] .stat-card {
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--dark-border);
}

[data-theme="dark"] .quick-action-card {
  background: var(--dark-bg-secondary);
  color: var(--dark-text-primary);
}

[data-theme="dark"] .content-container {
  background: var(--dark-bg-secondary);
  border-color: var(--dark-border);
}

[data-theme="dark"] .table {
  background: var(--dark-bg-secondary);
  color: var(--dark-text-primary);
}

[data-theme="dark"] .table thead th {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

[data-theme="dark"] .table tbody tr:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.1));
}

/* Loading States */
.stat-card.loading {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: cardLoading 1.5s infinite;
}

@keyframes cardLoading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Accessibility Enhancements */
.stat-card:focus-within {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.quick-action-card:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .stat-card {
    border: 2px solid var(--text-primary);
  }
  
  .stat-icon {
    border: 2px solid var(--white);
  }
  
  .quick-action-card {
    border: 2px solid var(--text-primary);
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .stat-card,
  .quick-action-card,
  .progress-bar,
  .dashboard-section::before {
    animation: none;
    transition: none;
  }
  
  .stat-card:hover,
  .quick-action-card:hover {
    transform: none;
  }
}

/* Print styles */
@media print {
  .sidebar,
  .navbar,
  .fab,
  .toast-modern {
    display: none !important;
  }
  
  body {
    padding-top: 0;
    background: white;
    color: black;
  }
  
  .main-content {
    margin-left: 0 !important;
  }
  
  .dashboard-section {
    background: white;
    color: black;
  }
  
  .stat-card {
    border: 1px solid black;
    background: white;
  }
}