/*
====================================
Modern Theme - تحسينات محدودة
====================================
تأثيرات ظل ولودر فقط
*/

:root {
  /* تأثيرات الظل فقط */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --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);
  --shadow-colored: 0 10px 15px -3px rgba(102, 126, 234, 0.4), 0 4px 6px -2px rgba(102, 126, 234, 0.05);
}

/* تحسينات الظل فقط */
.shadow-glow {
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.shadow-glow-success {
  box-shadow: 0 0 20px rgba(72, 187, 120, 0.3);
}

.shadow-glow-danger {
  box-shadow: 0 0 20px rgba(245, 101, 101, 0.3);
}

.shadow-glow-warning {
  box-shadow: 0 0 20px rgba(237, 137, 54, 0.3);
}

/* إضافة ظلال أساسية للعناصر الموجودة */
.card {
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

/* تصميم جميل للأزرار مع ظلال ونصف قطر */
.btn {
  box-shadow: var(--shadow-md);
  border-radius: 8px;
  border: none;
  padding: 10px 20px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* ألوان مختلفة للأزرار مع ظلال ملونة */
.btn-primary {
  box-shadow: 0 4px 15px 0 rgba(52, 144, 220, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 8px 25px 0 rgba(52, 144, 220, 0.4);
}

.btn-success {
  box-shadow: 0 4px 15px 0 rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
  box-shadow: 0 8px 25px 0 rgba(40, 167, 69, 0.4);
}

.btn-danger {
  box-shadow: 0 4px 15px 0 rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
  box-shadow: 0 8px 25px 0 rgba(220, 53, 69, 0.4);
}

.btn-warning {
  box-shadow: 0 4px 15px 0 rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
  box-shadow: 0 8px 25px 0 rgba(255, 193, 7, 0.4);
}

.btn-info {
  box-shadow: 0 4px 15px 0 rgba(23, 162, 184, 0.3);
}

.btn-info:hover {
  box-shadow: 0 8px 25px 0 rgba(23, 162, 184, 0.4);
}

.btn-secondary {
  box-shadow: 0 4px 15px 0 rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
  box-shadow: 0 8px 25px 0 rgba(108, 117, 125, 0.4);
}

.btn-dark {
  box-shadow: 0 4px 15px 0 rgba(52, 58, 64, 0.3);
}

.btn-dark:hover {
  box-shadow: 0 8px 25px 0 rgba(52, 58, 64, 0.4);
}

.btn-light {
  box-shadow: 0 4px 15px 0 rgba(248, 249, 250, 0.5);
  border: 1px solid #dee2e6;
}

.btn-light:hover {
  box-shadow: 0 8px 25px 0 rgba(248, 249, 250, 0.6);
}

/* أزرار صغيرة */
.btn-sm {
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 14px;
}

/* أزرار كبيرة */
.btn-lg {
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 18px;
}

/* أزرار دائرية */
.btn-rounded {
  border-radius: 50px;
}

/* أزرار مع أيقونات */
.btn i {
  margin-left: 5px;
}

.btn.btn-icon-only {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.table {
  box-shadow: var(--shadow-sm);
}

.navbar-custom {
  box-shadow: var(--shadow-md);
}

.left-sidenav {
  box-shadow: var(--shadow-lg);
}

/* تصميم جميل للقائمة الجانبية */
.left-sidenav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-right: none;
  border-radius: 0 15px 15px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

/* تحسين شعار الموقع في القائمة الجانبية */
.left-sidenav .brand {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 10px;
  margin: 15px;
  padding: 1px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

.left-sidenav .brand:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* تحسين عناصر القائمة */
.left-sidenav-menu {
  padding: 10px;
}

.left-sidenav-menu li {
  margin: 5px 0;
}

.left-sidenav-menu li > a {
  padding: 12px 15px;
  margin: 3px 5px;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #6c757d;
  font-weight: 500;
}

/* تأثير hover للعناصر */
.left-sidenav-menu li > a:hover {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea !important;
  transform: translateX(5px);
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.2);
  border-right: 3px solid #667eea;
}

/* العنصر النشط */
.left-sidenav-menu li > a.active {
  background: rgba(102, 126, 234, 0.15);
  color: #667eea !important;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
  transform: translateX(3px);
  border-right: 3px solid #667eea;
  font-weight: 600;
}

/* تحسين الأيقونات */
.left-sidenav-menu li > a i,
.left-sidenav-menu li > a .menu-icon {
  margin-left: 10px;
  font-size: 18px;
  width: 20px;
  text-align: center;
  transition: all 0.3s ease;
  color: #6c757d;
}

.left-sidenav-menu li > a:hover i,
.left-sidenav-menu li > a:hover .menu-icon,
.left-sidenav-menu li > a.active i,
.left-sidenav-menu li > a.active .menu-icon {
  color: #667eea !important;
  transform: scale(1.1);
}

/* تأثير التموج عند النقر */
.left-sidenav-menu li > a::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: 0;
}

.left-sidenav-menu li > a:active::before {
  width: 300px;
  height: 300px;
}

.left-sidenav-menu li > a span {
  position: relative;
  z-index: 1;
  font-weight: 500;
  transition: all 0.3s ease;
}

/* تحسين وضوح النصوص */
.left-sidenav-menu li > a:hover span {
  font-weight: 600;
  color: #667eea !important;
}

.left-sidenav-menu li > a.active span {
  font-weight: 700;
  color: #667eea !important;
}

/* تحسين التباين للنصوص */
.left-sidenav-menu li > a {
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.3px;
}

/* إضافة حدود جانبية للتركيز */
.left-sidenav-menu li > a::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: #667eea;
  transition: width 0.3s ease;
  border-radius: 2px 0 0 2px;
}

.left-sidenav-menu li > a:hover::after,
.left-sidenav-menu li > a.active::after {
  width: 4px;
}

/* تحسين القوائم الفرعية */
.left-sidenav-menu .has-submenu > a::after {
  content: '\f107';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  float: left;
  transition: transform 0.3s ease;
}

.left-sidenav-menu .has-submenu.active > a::after {
  transform: rotate(180deg);
}

.left-sidenav-menu .submenu {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  margin: 5px 10px;
  overflow: hidden;
}

.left-sidenav-menu .submenu li > a {
  padding: 10px 20px 10px 40px;
  font-size: 14px;
  border-radius: 8px;
  margin: 2px 5px;
  color: #6c757d;
}

.left-sidenav-menu .submenu li > a:hover {
  background: rgba(102, 126, 234, 0.08);
  color: #667eea !important;
  transform: translateX(3px);
  border-right: 2px solid #667eea;
}

.left-sidenav-menu .submenu li > a.active {
  background: rgba(102, 126, 234, 0.12);
  color: #667eea !important;
  border-right: 2px solid #667eea;
  font-weight: 600;
}

/* تحسين سكرول القائمة */
.left-sidenav::-webkit-scrollbar {
  width: 6px;
}

.left-sidenav::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.left-sidenav::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 3px;
}

.left-sidenav::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46a3 100%);
}

/* تأثيرات خاصة للشاشات الصغيرة */
@media (max-width: 768px) {
  .left-sidenav {
    border-radius: 0;
    backdrop-filter: blur(15px);
    background: rgba(255, 255, 255, 0.98);
  }
  
  .left-sidenav .brand {
    margin: 10px;
    border-radius: 8px;
  }
  
  .left-sidenav-menu li > a {
    padding: 15px;
    font-size: 16px;
  }
}

/* تأثيرات إضافية للقائمة الجانبية */
.left-sidenav .user-profile {
  padding: 15px;
  margin: 10px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.left-sidenav .user-profile img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* تحسين فواصل القائمة */
.left-sidenav-menu .menu-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.3), transparent);
  margin: 15px 20px;
  border: none;
}

/* تحسين عناوين الأقسام */
.left-sidenav-menu .menu-section-title {
  padding: 15px 20px 5px;
  font-size: 12px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* تأثير نبضة للإشعارات */
.left-sidenav-menu .notification-badge {
  position: absolute;
  top: 8px;
  left: 35px;
  background: linear-gradient(45deg, #ff4757, #ff3742);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-notification 2s infinite;
  box-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
}

@keyframes pulse-notification {
  0% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.8);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
  }
}

/* تحسين زر إغلاق/فتح القائمة */
.sidebar-toggle {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  width: 45px;
  height: 45px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
  margin: 10px;
}

.sidebar-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.sidebar-toggle i {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.sidebar-toggle:hover i {
  transform: rotate(180deg);
}

/* ============================================
   MODERN LOGIN PAGE STYLES
   ============================================ */

/* Login page body background */
.modern-login-body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.modern-login-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.08)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(1deg); }
}

/* Modern login card */
.modern-login-card {
  border: none;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
}

.modern-login-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.2);
}

/* Modern header */
.modern-header {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
  position: relative;
  overflow: hidden;
}

.modern-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
  100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
}

/* Modern logo */
.modern-logo {
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
  transition: all 0.3s ease;
}

.modern-logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 8px 25px rgba(0, 0, 0, 0.4));
}

/* Modern form container */
.modern-form-container {
  position: relative;
  background: white;
}

/* Modern navigation pills */
.modern-nav-pills {
  background: rgba(102, 126, 234, 0.05);
  border-radius: 15px;
  margin: 20px;
  padding: 5px;
}

.modern-nav-link {
  border-radius: 12px !important;
  padding: 12px 24px !important;
  transition: all 0.3s ease !important;
  color: #667eea !important;
  font-weight: 600 !important;
}

.modern-nav-link.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3) !important;
}

/* Modern language selector */
.modern-language-selector {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Modern form styles */
.modern-login-form {
  position: relative;
}

.modern-label {
  font-weight: 600 !important;
  color: #495057 !important;
  margin-bottom: 8px !important;
  font-size: 14px !important;
}

.modern-input-group {
  position: relative;
  margin-bottom: 5px;
}

.modern-input-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: none !important;
  color: white !important;
  border-radius: 12px 0 0 12px !important;
  width: 50px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.2) !important;
}

.modern-input {
  border: 2px solid #e9ecef !important;
  border-left: none !important;
  border-radius: 0 12px 12px 0 !important;
  padding: 12px 16px !important;
  font-size: 14px !important;
  transition: all 0.3s ease !important;
  background: white !important;
}

.modern-input:focus {
  border-color: #667eea !important;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
  background: rgba(102, 126, 234, 0.02) !important;
}

.modern-password-toggle {
  background: #f8f9fa !important;
  border: 2px solid #e9ecef !important;
  border-left: none !important;
  border-radius: 0 12px 12px 0 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  color: #6c757d !important;
}

.modern-password-toggle:hover {
  background: #e9ecef !important;
  color: #667eea !important;
}

/* Modern checkbox */
.modern-checkbox {
  display: flex;
  align-items: center;
}

.modern-checkbox-label {
  margin-left: 8px !important;
  font-size: 14px !important;
  cursor: pointer !important;
}

/* Modern forgot password link */
.modern-forgot-link {
  transition: all 0.3s ease !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

.modern-forgot-link:hover {
  color: #667eea !important;
  transform: translateX(-3px) !important;
}

/* Modern login button */
.modern-login-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 14px 24px !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3) !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  overflow: hidden !important;
}

.modern-login-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4) !important;
  background: linear-gradient(135deg, #5a67d8 0%, #6b46a3 100%) !important;
}

.modern-login-btn:active {
  transform: translateY(0) !important;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3) !important;
}

.modern-login-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.modern-login-btn:active::before {
  width: 300px;
  height: 300px;
}

/* Modern footer */
.modern-footer {
  background: rgba(248, 249, 250, 0.8) !important;
  border-radius: 0 0 20px 20px !important;
  padding: 20px !important;
  border-top: 1px solid rgba(102, 126, 234, 0.1) !important;
}

/* Floating animation for decorative elements */
.modern-login-card::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 100px;
  height: 100px;
  background: linear-gradient(45deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  border-radius: 50%;
  animation: float-decoration 6s ease-in-out infinite;
}

@keyframes float-decoration {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

/* Responsive design for mobile */
@media (max-width: 768px) {
  .modern-login-card {
    margin: 20px;
    border-radius: 15px;
  }
  
  .modern-header {
    padding: 30px 20px !important;
  }
  
  .modern-nav-pills {
    margin: 15px;
  }
  
  .modern-input-group {
    flex-direction: column;
  }
  
  .modern-input-icon {
    border-radius: 12px 12px 0 0 !important;
    width: 100% !important;
    height: 45px !important;
  }
  
  .modern-input,
  .modern-password-toggle {
    border-radius: 0 0 12px 12px !important;
    border: 2px solid #e9ecef !important;
    border-top: none !important;
  }
}

/* Loading animation */
.modern-loading {
  position: relative;
}

.modern-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================
   RTL SUPPORT FOR LOGIN PAGE
   ============================================ */

/* RTL Input Groups */
.rtl-input-group {
  direction: rtl;
  display: flex;
}

/* RTL Input Icons - positioned on the right */
.rtl-input-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: none !important;
  color: white !important;
  border-radius: 0 12px 12px 0 !important;
  width: 50px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.2) !important;
  order: 3 !important; /* Always last in RTL */
}

/* RTL Input Field */
.rtl-input {
  border: 2px solid #e9ecef !important;
  border-left: none !important;
  border-right: none !important;
  border-radius: 0 !important;
  padding: 12px 16px !important;
  font-size: 14px !important;
  transition: all 0.3s ease !important;
  background: white !important;
  text-align: right !important;
  direction: rtl !important;
  order: 2 !important; /* Middle in RTL */
}

.rtl-input:focus {
  border-color: #e9ecef !important;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
  background: rgba(102, 126, 234, 0.02) !important;
}

/* RTL Password Toggle - positioned on the left */
.rtl-password-toggle {
  background: #f8f9fa !important;
  border: 2px solid #e9ecef !important;
  border-right: none !important;
  border-radius: 12px 0 0 12px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  color: #6c757d !important;
  order: 1 !important; /* First in RTL (appears on left) */
  width: 50px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.rtl-password-toggle:hover {
  background: #e9ecef !important;
  color: #667eea !important;
}

/* Fix LTR Password Toggle */
.modern-password-toggle:not(.rtl-password-toggle) {
  border-left: none !important;
  border-radius: 0 12px 12px 0 !important;
}

/* RTL Forgot Password Link */
[dir="rtl"] .modern-forgot-link:hover,
[dir="RTL"] .modern-forgot-link:hover {
  transform: translateX(3px) !important;
}

/* RTL Label Alignment */
[dir="rtl"] .modern-label,
[dir="RTL"] .modern-label {
  text-align: right !important;
}

/* RTL Checkbox Alignment */
[dir="rtl"] .modern-checkbox,
[dir="RTL"] .modern-checkbox {
  justify-content: flex-end !important;
}

[dir="rtl"] .modern-checkbox-label,
[dir="RTL"] .modern-checkbox-label {
  margin-right: 8px !important;
  margin-left: 0 !important;
}

/* RTL Navigation Pills */
[dir="rtl"] .modern-nav-pills,
[dir="RTL"] .modern-nav-pills {
  direction: rtl;
}

[dir="rtl"] .modern-language-selector,
[dir="RTL"] .modern-language-selector {
  direction: rtl;
}

/* RTL Text Alignment */
[dir="rtl"] .text-end,
[dir="RTL"] .text-end {
  text-align: left !important;
}

[dir="rtl"] .col-sm-6:last-child,
[dir="RTL"] .col-sm-6:last-child {
  text-align: left !important;
}

/* RTL Icon Positioning in Button */
[dir="rtl"] .modern-login-btn i,
[dir="RTL"] .modern-login-btn i {
  margin-left: 0 !important;
  margin-right: 8px !important;
}

/* RTL Mobile Responsive */
@media (max-width: 768px) {
  .rtl-input-group {
    flex-direction: column;
  }
  
  .rtl-input-icon {
    border-radius: 12px 12px 0 0 !important;
    width: 100% !important;
    height: 45px !important;
    order: 0;
  }
  
  .rtl-input {
    border-radius: 0 !important;
    border: 2px solid #e9ecef !important;
    border-top: none !important;
    order: 1;
  }
  
  .rtl-password-toggle {
    border-radius: 0 0 12px 12px !important;
    border: 2px solid #e9ecef !important;
    border-top: none !important;
    order: 2;
  }
}

/* Fix for mixed LTR/RTL layouts */
.modern-input-group:not(.rtl-input-group) .modern-input {
  border-left: none !important;
  border-radius: 0 12px 12px 0 !important;
}

.modern-input-group:not(.rtl-input-group) .modern-input-icon {
  border-radius: 12px 0 0 12px !important;
}

.modern-input-group:not(.rtl-input-group) .modern-password-toggle {
  border-left: none !important;
  border-radius: 0 12px 12px 0 !important;
}

/* ============================================
   GLOBAL INPUT SHADOWS FOR ALL FORMS
   ============================================ */

/* تأثيرات الظل لجميع عناصر الإدخال */
.form-control, 
input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="number"], 
input[type="tel"], 
input[type="url"], 
input[type="search"], 
input[type="date"], 
input[type="datetime-local"], 
input[type="time"], 
input[type="file"],
input[type="color"],
input[type="range"],
input[type="month"],
input[type="week"],
textarea, 
select,
.form-select {
  box-shadow: var(--shadow-sm) !important;
  transition: box-shadow 0.3s ease !important;
  border: 1px solid #e9ecef !important;
}

/* تأثيرات الظل عند التركيز */
.form-control:focus, 
input:focus, 
textarea:focus, 
select:focus,
.form-select:focus {
  box-shadow: var(--shadow-md) !important;
  border-color: #667eea !important;
  outline: none !important;
}

/* تحسين الـ TextArea */
textarea.form-control {
  box-shadow: var(--shadow-sm) !important;
  resize: vertical !important;
  min-height: 80px !important;
}

textarea.form-control:focus {
  box-shadow: var(--shadow-md) !important;
}

/* تحسين Custom Select */
.form-select {
  box-shadow: var(--shadow-sm) !important;
  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='%23667eea' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e") !important;
  padding-right: 40px !important;
}

.form-select:focus {
  box-shadow: var(--shadow-md) !important;
  border-color: #667eea !important;
}

/* تأثيرات الظل المحسنة لـ Select2 */
.select2-container .select2-selection {
  box-shadow: var(--shadow-sm) !important;
  transition: box-shadow 0.3s ease !important;
  border: 1px solid #e9ecef !important;
  border-radius: 6px !important;
}

.select2-container--default .select2-selection--single {
  box-shadow: var(--shadow-sm) !important;
  border: 1px solid #e9ecef !important;
  height: 40px !important;
  line-height: 38px !important;
  border-radius: 6px !important;
}

.select2-container--default .select2-selection--multiple {
  box-shadow: var(--shadow-sm) !important;
  border: 1px solid #e9ecef !important;
  min-height: 40px !important;
  border-radius: 6px !important;
}

.select2-container--default.select2-container--focus .select2-selection,
.select2-container--default.select2-container--open .select2-selection {
  box-shadow: var(--shadow-md) !important;
  border-color: #667eea !important;
}

/* تأثيرات الظل لقائمة Select2 المنسدلة */
.select2-dropdown {
  box-shadow: var(--shadow-lg) !important;
  border: 1px solid #e9ecef !important;
  border-radius: 8px !important;
  margin-top: 2px !important;
}

/* تحسين العناصر المحددة في Select2 */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
  box-shadow: var(--shadow-sm) !important;
  border-radius: 6px !important;
  background: rgba(102, 126, 234, 0.1) !important;
  border: 1px solid rgba(102, 126, 234, 0.2) !important;
  color: #667eea !important;
  margin: 2px !important;
}

/* تحسين البحث في Select2 */
.select2-container--default .select2-search--inline .select2-search__field {
  box-shadow: none !important;
  border: none !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  box-shadow: var(--shadow-sm) !important;
  border: 1px solid #e9ecef !important;
  border-radius: 6px !important;
}

/* تحسين Input Groups مع الظلال */
.input-group:not(.modern-input-group) .form-control {
  box-shadow: var(--shadow-sm) !important;
}

.input-group:not(.modern-input-group) .form-control:focus {
  box-shadow: var(--shadow-md) !important;
}

.input-group:not(.modern-input-group) .input-group-text {
  box-shadow: var(--shadow-sm) !important;
  border: 1px solid #e9ecef !important;
}

/* تحسين Floating Labels */
.form-floating > .form-control,
.form-floating > .form-select {
  box-shadow: var(--shadow-sm) !important;
}

.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
  box-shadow: var(--shadow-md) !important;
}

/* تحسين File Input */
.form-control[type="file"] {
  padding: 8px 12px !important;
  box-shadow: var(--shadow-sm) !important;
}

.form-control[type="file"]:focus {
  box-shadow: var(--shadow-md) !important;
}

/* تحسين Range Input */
.form-range {
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  height: 8px !important;
  background: #e9ecef !important;
  border-radius: 4px !important;
}

.form-range:focus {
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

/* تحسين Color Input */
.form-control[type="color"] {
  height: 40px !important;
  padding: 4px !important;
  box-shadow: var(--shadow-sm) !important;
}

.form-control[type="color"]:focus {
  box-shadow: var(--shadow-md) !important;
}

/* تحسين Checkbox و Radio */
.form-check-input {
  box-shadow: var(--shadow-sm) !important;
  border: 1px solid #dee2e6 !important;
}

.form-check-input:focus {
  box-shadow: var(--shadow-md) !important;
  border-color: #667eea !important;
}

.form-check-input:checked {
  background-color: #667eea !important;
  border-color: #667eea !important;
  box-shadow: var(--shadow-md) !important;
}

/* تحسين Switch */
.form-switch .form-check-input {
  box-shadow: var(--shadow-sm) !important;
}

.form-switch .form-check-input:focus {
  box-shadow: var(--shadow-md) !important;
}

/* تحسين البحث العام */
input[type="search"] {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

/* تأثيرات خاصة للعناصر المعطلة */
.form-control:disabled,
.form-select:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  background-color: #f8f9fa !important;
}

/* تحسين ظلال الـ Validation */
.is-valid .form-control,
.is-valid .form-select {
  box-shadow: var(--shadow-sm), 0 0 0 2px rgba(40, 167, 69, 0.1) !important;
}

.is-invalid .form-control,
.is-invalid .form-select {
  box-shadow: var(--shadow-sm), 0 0 0 2px rgba(220, 53, 69, 0.1) !important;
}
