/* =============== أنماط محسنة للتارجت اليومي وتارجتات الشهر =============== */

/* قسم التارجت اليومي */
#dailyTargetSection .card {
  background: linear-gradient(135deg, #0255f0 0%, #0041c4 100%);
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(2, 85, 240, 0.15);
  position: relative;
  overflow: hidden;
  border: none;
}

#dailyTargetSection .card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

#dailyTargetSection h3 {
  color: white;
  font-size: 24px;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#targetSection {
  background: white;
  border-radius: 15px;
  padding: 20px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* حالات التارجت */
.target-status {
  text-align: center;
  padding: 20px;
  width: 100%;
}

.target-status.completed {
  animation: fadeIn 0.5s ease;
}

.target-status.pending {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    opacity: 1;
  }
}

.target-status h3 {
  color: #0255f0 !important;
  font-size: 20px;
  margin-bottom: 15px;
}

.target-status .btn {
  margin-top: 10px;
  padding: 12px 30px;
  font-size: 16px;
  border-radius: 10px;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.target-status .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.target-status .btn-info {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  border: none;
  color: white;
}

.target-status .btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  border: none;
  color: white;
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
  }
  50% {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* قسم تارجتات الشهر */
#monthlyTargetsSection .card {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
  position: relative;
  overflow: hidden;
  border: none;
}

#monthlyTargetsSection .card::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -10%;
  width: 250px;
  height: 250px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

#monthlyTargetsSection h3 {
  color: white;
  font-size: 24px;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#monthlyTargetsContainer {
  background: white;
  border-radius: 15px;
  padding: 20px;
  min-height: 200px;
}

/* قائمة التارجتات الشهرية */
.monthly-targets {
  animation: slideIn 0.5s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.targets-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e5e7eb;
}

.targets-header h3 {
  color: #0255f0 !important;
  font-size: 20px;
  margin: 0;
}

.targets-header .stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.targets-header .stats span {
  background: linear-gradient(135deg, #0255f0 0%, #0041c4 100%);
  color: white;
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(2, 85, 240, 0.15);
}

.targets-list-wrapper {
  max-height: 60vh;
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 20px;
  padding-right: 10px;
  /* تخصيص scrollbar */
  scrollbar-width: thin;
  scrollbar-color: #0255f0 #f0f0f0;
}

.targets-list-wrapper::-webkit-scrollbar {
  width: 8px;
}

.targets-list-wrapper::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 10px;
}

.targets-list-wrapper::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #0255f0 0%, #0041c4 100%);
  border-radius: 10px;
}

.targets-list-wrapper::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #0041c4 0%, #003566 100%);
}

.targets-list {
  display: grid;
  gap: 15px;
  margin-top: 0;
}

.target-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: #f8f9fa;
  border-radius: 12px;
  border-left: 4px solid #dee2e6;
  transition: all 0.3s;
}

.target-item:hover {
  transform: translateX(-5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.target-item.success {
  border-left-color: #10b981;
  background: linear-gradient(to right, rgba(16, 185, 129, 0.05), transparent);
}

.target-item.warning {
  border-left-color: #f59e0b;
  background: linear-gradient(to right, rgba(245, 158, 11, 0.05), transparent);
}

.target-item.danger {
  border-left-color: #ef4444;
  background: linear-gradient(to right, rgba(239, 68, 68, 0.05), transparent);
}

.target-item > div {
  flex: 1;
  padding: 0 10px;
}

.target-date {
  font-weight: 600;
  color: #4b5563;
  font-size: 15px;
}

.target-item .target-status {
  color: #6b7280;
  font-size: 14px;
  text-align: right;
  padding: 0;
}

.target-percentage {
  font-weight: bold;
  color: #333;
  font-size: 16px;
}

.target-item .btn-small {
  padding: 8px 20px;
  background: linear-gradient(135deg, #0255f0 0%, #0041c4 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(2, 85, 240, 0.15);
}

.target-item .btn-small:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 85, 240, 0.25);
}

/* تحسينات عامة للتجاوب */
@media (max-width: 768px) {
  #dailyTargetSection .card,
  #monthlyTargetsSection .card {
    padding: 20px;
    border-radius: 15px;
  }
  
  .targets-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .targets-header .stats {
    justify-content: center;
  }
  
  .target-item {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  .target-item .btn-small {
    width: 100%;
  }
}

/* رسائل تنبيه خاصة بالتارجت */
.target-alert {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: white;
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
  animation: slideDown 0.5s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.target-alert i {
  font-size: 24px;
}

.target-alert-text {
  flex: 1;
}

.target-alert-text strong {
  display: block;
  font-size: 16px;
  margin-bottom: 5px;
}

.target-alert-text span {
  font-size: 14px;
  opacity: 0.95;
}

/* مؤشر التحميل للتارجت */
.target-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 20px;
}

.target-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(2, 85, 240, 0.15);
  border-top-color: #0255f0;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.target-loading-text {
  color: #6b7280;
  font-size: 16px;
}

/* إضافة أيقونات للأقسام */
#dailyTargetSection .card h3::before {
  content: '📊';
  margin-left: 10px;
  font-size: 28px;
}

#monthlyTargetsSection .card h3::before {
  content: '📈';
  margin-left: 10px;
  font-size: 28px;
}

/* تحسين الأزرار */
.btn-primary.disabled,
.btn-primary:disabled {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
  cursor: not-allowed;
  opacity: 0.6;
}

/* رسالة تحذير لتسجيل الخروج */
.checkout-warning {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  margin: 15px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
  animation: shake 0.5s;
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.checkout-warning i {
  font-size: 20px;
}

/* نهاية أنماط التارجت المحسنة */
