/* تنسيقات صفحة الحضور والانصراف */

/* تنسيق عنوان الصفحة */
#appointments h1 {
  font-size: 32px;
  font-weight: 800;
  color: #333;
  margin-bottom: 30px;
  position: relative;
  padding-right: 25px;
  display: inline-block;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

#appointments h1::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 35px;
  background: linear-gradient(135deg, #8e44ad, #9b59b6);
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(142, 68, 173, 0.3);
}

#appointments h1::after {
  content: '';
  position: absolute;
  bottom: -12px;
  right: 0;
  width: 120px;
  height: 5px;
  background: linear-gradient(to left, #8e44ad, transparent);
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(142, 68, 173, 0.1);
}

/* تنسيق نموذج الإدخال */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

/* تنسيق زر إضافة سجل حضور جديد */
.page-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 25px;
}

.page-actions .btn-primary {
  padding: 12px 25px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 6px 15px rgba(142, 68, 173, 0.2);
  transition: all 0.3s ease;
  border-radius: 50px;
  background: linear-gradient(45deg, #8e44ad, #9b59b6);
  border: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.page-actions .btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #9b59b6, #8e44ad);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.page-actions .btn-primary:hover {
  
  box-shadow: 0 8px 20px rgba(142, 68, 173, 0.3);
}

.page-actions .btn-primary:hover::before {
  opacity: 1;
}

.page-actions .btn-primary i {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.page-actions .btn-primary:hover i {
  transform: rotate(90deg);
}

/* تنسيق جدول سجلات الحضور */
.attendance-table-container {
  width: 100%;
  overflow-x: auto;
  margin-top: 1rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.attendance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background-color: #fff;
  border-radius: 15px;
  overflow: hidden;
}

.attendance-table th,
.attendance-table td {
  padding: 0.75rem 1rem;
  text-align: right;
  border-bottom: 1px solid #e0e0e0;
}

.attendance-table th {
  background: linear-gradient(45deg, #8e44ad, #9b59b6);
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  position: relative;
}

.attendance-table th:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
}

.attendance-table tr:hover {
  background-color: #f9f9f9;
}

.attendance-table tr:last-child td {
  border-bottom: none;
}

.attendance-table .status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
}

.attendance-table .status.on-time {
  background-color: #e6f7e6;
  color: #28a745;
  box-shadow: 0 2px 5px rgba(40, 167, 69, 0.2);
}

.attendance-table .status.late {
  background-color: #fff5f5;
  color: #dc3545;
  box-shadow: 0 2px 5px rgba(220, 53, 69, 0.2);
}

.actions-cell {
  white-space: nowrap;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.actions-cell .btn {
  padding: 0.25rem 0.5rem;
  margin-right: 0.25rem;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.btn-success {
  background-color: #28a745;
  border-color: #28a745;
  color: white;
}

.btn-success:hover {
  background-color: #218838;
  border-color: #1e7e34;
  
  box-shadow: 0 3px 8px rgba(40, 167, 69, 0.3);
}

.btn-info {
  background-color: #17a2b8;
  border-color: #17a2b8;
  color: white;
}

.btn-info:hover {
  background-color: #138496;
  border-color: #117a8b;
  
  box-shadow: 0 3px 8px rgba(23, 162, 184, 0.3);
}

.attendance-card {
  background-color: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  padding: 25px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(142, 68, 173, 0.08);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(5px);
  display: flex;
  flex-direction: column;
}

.attendance-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 100%;
  background: linear-gradient(135deg, #8e44ad, #9b59b6);
  opacity: 0.8;
  transition: all 0.4s ease;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
}

.attendance-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" fill="none"><path d="M0 0L100 100V0H0Z" fill="rgba(142,68,173,0.03)"/></svg>');
  background-size: 200px 200px;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.attendance-card:hover {
  scale(1.02);
  box-shadow: 0 15px 35px rgba(142, 68, 173, 0.2);
  border-color: rgba(142, 68, 173, 0.15);
}

.attendance-card:hover::before {
  opacity: 1;
  width: 12px;
  box-shadow: 0 0 20px rgba(142, 68, 173, 0.4);
}

.attendance-card:hover::after {
  opacity: 1;
}

.attendance-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(142, 68, 173, 0.1);
  padding-bottom: 15px;
  position: relative;
  z-index: 1;
}

.attendance-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: 0;
  width: 50%;
  height: 2px;
  background: linear-gradient(to left, #8e44ad, transparent);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.attendance-card:hover .attendance-header::after {
  width: 100%;
}

.attendance-header h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #333;
  transition: all 0.3s ease;
  position: relative;
  padding-right: 15px;
}

.attendance-header h4::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  background: linear-gradient(to bottom, #8e44ad, #9b59b6);
  border-radius: 4px;
  transition: height 0.3s ease;
}

.attendance-card:hover .attendance-header h4 {
  color: #8e44ad;
  transform: translateX(-5px);
}

.attendance-card:hover .attendance-header h4::before {
  height: 24px;
}

.attendance-body {
  color: #666;
  position: relative;
  z-index: 1;
  cursor: pointer;
  flex-grow: 1;
}

.attendance-body p {
  margin: 12px 0;
  display: flex;
  align-items: center;
  font-size: 15px;
  line-height: 1.6;
  position: relative;
  padding-right: 30px;
}

/* تنسيق أزرار الحذف */
.attendance-actions {
  display: flex;
  justify-content: flex-end;
}

.attendance-actions .btn-sm {
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.attendance-actions .btn-danger {
  background-color: #e74c3c;
  border: none;
  color: white;
  box-shadow: 0 4px 10px rgba(231, 76, 60, 0.2);
}

.attendance-actions .btn-danger:hover {
  background-color: #c0392b;
  
  box-shadow: 0 6px 15px rgba(231, 76, 60, 0.3);
}

/* تنسيق أزرار الحذف في نافذة التفاصيل */
.detail-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

.detail-actions .btn-danger {
  background-color: #e74c3c;
  border: none;
  color: white;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2);
  transition: all 0.3s ease;
}

.detail-actions .btn-danger:hover {
  background-color: #c0392b;
  
  box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3);
}

/* تنسيق نافذة تأكيد الحذف */
.confirm-delete {
  text-align: center;
  padding: 20px;
}

.confirm-icon {
  font-size: 50px;
  color: #e74c3c;
  margin-bottom: 20px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.confirm-delete h4 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #333;
}

.confirm-delete p {
  font-size: 18px;
  color: #8e44ad;
  font-weight: 600;
  margin-bottom: 20px;
}

.warning-text {
  background-color: rgba(231, 76, 60, 0.1);
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 25px;
  color: #e74c3c;
  font-weight: 500;
}

.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.confirm-actions .btn {
  padding: 10px 25px;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.confirm-actions .btn-secondary {
  background-color: #95a5a6;
  border: none;
  color: white;
  box-shadow: 0 4px 10px rgba(149, 165, 166, 0.2);
}

.confirm-actions .btn-secondary:hover {
  background-color: #7f8c8d;
  
  box-shadow: 0 6px 15px rgba(149, 165, 166, 0.3);
}

.confirm-actions .btn-danger {
  background-color: #e74c3c;
  border: none;
  color: white;
  box-shadow: 0 4px 10px rgba(231, 76, 60, 0.2);
}

.confirm-actions .btn-danger:hover {
  background-color: #c0392b;
  
  box-shadow: 0 6px 15px rgba(231, 76, 60, 0.3);
}

.attendance-body i {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #8e44ad;
  width: 20px;
  font-size: 18px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.attendance-card:hover .attendance-body i {
  transform: translateY(-50%) scale(1.2) rotate(5deg);
  color: #9b59b6;
  text-shadow: 0 3px 5px rgba(142, 68, 173, 0.3);
}

.checkout-time {
  margin-right: 20px;
  position: relative;
  font-weight: 500;
  color: #555;
}

.checkout-time:before {
  content: '';
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background-color: #8e44ad;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(142, 68, 173, 0.2);
}

/* تنسيق المربع المنبثق */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.modal-container {
  background-color: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalFadeIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(142, 68, 173, 0.15);
  position: relative;
}

@keyframes modalFadeIn {
  from { opacity: 0; scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  border-bottom: 2px solid rgba(142, 68, 173, 0.1);
  background: linear-gradient(135deg, #8e44ad, #9b59b6);
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-header h3 {
  margin: 0;
  font-size: 22px;
  color: white;
  font-weight: 700;
  position: relative;
  padding-right: 18px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.modal-header h3::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 24px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  font-size: 18px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.close-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.modal-body {
  padding: 30px;
  background-color: #f9f9f9;
  position: relative;
}

.modal-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(to right, rgba(142, 68, 173, 0.1), rgba(155, 89, 182, 0.05));
  opacity: 0.7;
}

.modal-footer {
  padding: 20px 28px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: linear-gradient(to bottom, #f9f9f9, #f2f2f2);
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  position: sticky;
  bottom: 0;
  z-index: 10;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.03);
}

.modal-footer .btn-save {
  background: linear-gradient(45deg, #8e44ad, #9b59b6);
  color: white;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 5px 15px rgba(142, 68, 173, 0.25);
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.modal-footer .btn-save::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #9b59b6, #8e44ad);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.modal-footer .btn-save:hover {
  
  box-shadow: 0 8px 20px rgba(142, 68, 173, 0.35);
}

.modal-footer .btn-save:hover::before {
  opacity: 1;
}

.modal-footer .btn-save i {
  margin-left: 10px;
  transition: transform 0.3s ease;
}

.modal-footer .btn-save:hover i {
  transform: translateX(-3px);
}

.modal-footer .btn-cancel {
  background-color: transparent;
  color: #666;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid #ddd;
  transition: all 0.3s ease;
}

.modal-footer .btn-cancel:hover {
  background-color: #f0f0f0;
  color: #333;
  border-color: #ccc;
  
}

/* تنسيق نموذج إضافة سجل حضور */
.task-form {
  animation: formFadeIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 1;
}

@keyframes formFadeIn {
  from { opacity: 0; scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.task-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200" fill="none"><path d="M0 0L200 200V0H0Z" fill="rgba(142,68,173,0.02)"/></svg>');
  background-size: 200px 200px;
  opacity: 0.5;
  z-index: -1;
  pointer-events: none;
}

.task-form .form-group {
  margin-bottom: 28px;
  position: relative;
}

.task-form .form-group label {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  font-weight: 700;
  color: #444;
  font-size: 16px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  padding-right: 18px;
}

.task-form .form-group label::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 18px;
  background: linear-gradient(135deg, #8e44ad, #9b59b6);
  border-radius: 10px;
  opacity: 0.8;
  transition: all 0.4s ease;
  box-shadow: 0 2px 5px rgba(142, 68, 173, 0.2);
}

.task-form .form-group:focus-within label {
  color: #8e44ad;
  
  text-shadow: 0 1px 2px rgba(142, 68, 173, 0.1);
}

.task-form .form-group:focus-within label::before {
  height: 24px;
  opacity: 1;
  box-shadow: 0 3px 8px rgba(142, 68, 173, 0.3);
}

.task-form .form-group label i {
  color: #8e44ad;
  margin-left: 12px;
  font-size: 18px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background-color: rgba(142, 68, 173, 0.1);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(142, 68, 173, 0.1);
}

.task-form .form-group:focus-within label i {
  transform: scale(1.15) rotate(10deg);
  background-color: rgba(142, 68, 173, 0.2);
  color: #fff;
  background: linear-gradient(135deg, #8e44ad, #9b59b6);
  box-shadow: 0 5px 12px rgba(142, 68, 173, 0.25);
}

.task-form .form-group input,
.task-form .form-group select {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid rgba(142, 68, 173, 0.15);
  border-radius: 18px;
  font-size: 16px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background-color: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
  appearance: none;
  -webkit-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%238e44ad" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
  background-repeat: no-repeat;
  background-position: left 15px center;
  background-size: 16px;
  padding-left: 45px;
  cursor: pointer;
  font-weight: 500;
  color: #444;
}

.task-form .form-group input:focus,
.task-form .form-group select:focus {
  border-color: #8e44ad;
  box-shadow: 0 10px 25px rgba(142, 68, 173, 0.15);
  outline: none;
  scale(1.01);
  background-color: rgba(142, 68, 173, 0.02);
}

.task-form .form-group input:hover,
.task-form .form-group select:hover {
  border-color: #9b59b6;
  background-color: #fcfcfc;
  
  box-shadow: 0 8px 20px rgba(142, 68, 173, 0.08);
}

/* تنسيق حقول الوقت */
.task-form .form-group input[type="time"] {
  padding-right: 15px;
  cursor: pointer;
  position: relative;
  color: #444;
  font-weight: 500;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="%238e44ad" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>');
  background-repeat: no-repeat;
  background-position: left 15px center;
  background-size: 20px;
  padding-left: 45px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.task-form .form-group input[type="time"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(142, 68, 173, 0.05) 0%, rgba(255, 255, 255, 0) 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.task-form .form-group input[type="time"]:hover::before {
  opacity: 1;
}

.task-form .form-group input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  cursor: pointer;
  z-index: 2;
}

.task-form .form-group input[type="time"]:focus {
  background-color: rgba(142, 68, 173, 0.05);
  
  box-shadow: 0 10px 25px rgba(142, 68, 173, 0.15);
}

.task-form .form-group input[type="time"]:hover {
  background-color: #fcfcfc;
  
  box-shadow: 0 8px 20px rgba(142, 68, 173, 0.08);
}

/* تنسيق حقول التاريخ */
.task-form .form-group input[type="date"] {
  padding-right: 15px;
  cursor: pointer;
  position: relative;
  color: #444;
  font-weight: 500;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="%238e44ad" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="4" ry="4"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>');
  background-repeat: no-repeat;
  background-position: left 15px center;
  background-size: 20px;
  padding-left: 45px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.task-form .form-group input[type="date"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(142, 68, 173, 0.05) 0%, rgba(255, 255, 255, 0) 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.task-form .form-group input[type="date"]:hover::before {
  opacity: 1;
}

.task-form .form-group input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  cursor: pointer;
  z-index: 2;
}

.task-form .form-group input[type="date"]:focus {
  background-color: rgba(142, 68, 173, 0.05);
  
  box-shadow: 0 10px 25px rgba(142, 68, 173, 0.15);
}

.task-form .form-group input[type="date"]:hover {
  background-color: #fcfcfc;
  
  box-shadow: 0 8px 20px rgba(142, 68, 173, 0.08);
}

.task-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  position: relative;
  margin-bottom: 10px;
}

.task-form .form-row::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(142, 68, 173, 0), rgba(142, 68, 173, 0.2) 50%, rgba(142, 68, 173, 0));
  transition: width 0.4s ease;
  opacity: 0.5;
}

.task-form .form-row:hover::after {
  width: 80%;
}

.task-form .form-row .form-group:first-child {
  position: relative;
}

.task-form .form-row .form-group:first-child::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -15px;
  transform: translateY(-50%);
  width: 1px;
  height: 0;
  background: linear-gradient(to bottom, rgba(142, 68, 173, 0), rgba(142, 68, 173, 0.1) 50%, rgba(142, 68, 173, 0));
  transition: height 0.4s ease;
  opacity: 0.5;
}

.task-form .form-row:hover .form-group:first-child::after {
  height: 70%;
}

@media (max-width: 768px) {
  .task-form .form-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .task-form .form-row .form-group:first-child::after {
    display: none;
  }
  
  .task-form .form-row::after {
    bottom: -10px;
  }
}

/* تنسيق بطاقة تفاصيل الحضور */
.attendance-detail-card {
  background-color: #ffffff;
  border-radius: 28px;
  padding: 35px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(142, 68, 173, 0.15);
  position: relative;
  overflow: hidden;
  animation: detailCardFadeIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(10px);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 1) 100%);
}

@keyframes detailCardFadeIn {
  from { opacity: 0; scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.attendance-detail-card:hover {
  
  box-shadow: 0 25px 60px rgba(142, 68, 173, 0.15);
  border-color: rgba(142, 68, 173, 0.25);
}

.attendance-detail-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 100%;
  background: linear-gradient(to bottom, #8e44ad, #9b59b6);
  border-top-right-radius: 28px;
  border-bottom-right-radius: 28px;
  box-shadow: -2px 0 15px rgba(142, 68, 173, 0.2);
  transition: all 0.4s ease;
}

.attendance-detail-card:hover::before {
  width: 15px;
  background: linear-gradient(to bottom, #9b59b6, #8e44ad);
  box-shadow: -3px 0 20px rgba(142, 68, 173, 0.3);
}

.attendance-detail-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200" fill="none"><path d="M0 0L200 200V0H0Z" fill="rgba(142,68,173,0.02)"/></svg>');
  background-size: 200px 200px;
  opacity: 0.3;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.attendance-detail-card:hover::after {
  opacity: 0.5;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 35px;
  padding-bottom: 22px;
  border-bottom: none;
  position: relative;
  z-index: 1;
}

.detail-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(142, 68, 173, 0.2), rgba(142, 68, 173, 0.05) 70%, rgba(142, 68, 173, 0));
  border-radius: 2px;
  transition: all 0.4s ease;
  transform-origin: left;
}

.attendance-detail-card:hover .detail-header::after {
  height: 3px;
  background: linear-gradient(90deg, rgba(142, 68, 173, 0.3), rgba(142, 68, 173, 0.1) 80%, rgba(142, 68, 173, 0));
  box-shadow: 0 1px 5px rgba(142, 68, 173, 0.1);
}

.detail-header h2 {
  margin: 0;
  font-size: 26px;
  color: #333;
  font-weight: 800;
  position: relative;
  padding-right: 22px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.detail-header h2::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 30px;
  background: linear-gradient(135deg, #8e44ad, #9b59b6);
  border-radius: 10px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 2px 8px rgba(142, 68, 173, 0.2);
}

.attendance-detail-card:hover .detail-header h2 {
  color: #8e44ad;
  transform: translateX(-8px);
  text-shadow: 0 2px 5px rgba(142, 68, 173, 0.1);
}

.attendance-detail-card:hover .detail-header h2::before {
  height: 35px;
  width: 8px;
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
  box-shadow: 0 3px 12px rgba(142, 68, 173, 0.3);
}

.detail-info {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 30px;
  background-color: rgba(249, 249, 249, 0.7);
  border-radius: 24px;
  padding: 30px;
  box-shadow: inset 0 3px 15px rgba(0, 0, 0, 0.03);
  position: relative;
  z-index: 1;
  backdrop-filter: blur(5px);
}

.detail-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" fill="none"><circle cx="50" cy="50" r="50" fill="rgba(142,68,173,0.02)"/></svg>');
  background-size: 100px 100px;
  opacity: 0.5;
  z-index: -1;
  pointer-events: none;
  border-radius: 24px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  background-color: white;
  padding: 22px;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(142, 68, 173, 0.08);
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(250, 250, 250, 0.9) 100%);
}

.info-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #8e44ad, #9b59b6);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 -1px 5px rgba(142, 68, 173, 0.2);
}

.info-item:hover {
  scale(1.02);
  box-shadow: 0 15px 30px rgba(142, 68, 173, 0.15);
  border-color: rgba(142, 68, 173, 0.15);
}

.info-item:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.info-item::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(142, 68, 173, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.info-item:hover::before {
  opacity: 1;
}

.info-item i {
  font-size: 22px;
  color: #8e44ad;
  margin-left: 20px;
  margin-top: 3px;
  background-color: rgba(142, 68, 173, 0.1);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  position: relative;
  z-index: 1;
  box-shadow: 0 5px 15px rgba(142, 68, 173, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.info-item:hover i {
  background: linear-gradient(135deg, #8e44ad, #9b59b6);
  color: white;
  transform: scale(1.15) rotate(15deg);
  box-shadow: 0 8px 20px rgba(142, 68, 173, 0.25);
}

.info-item h4 {
  margin: 0 0 12px 0;
  font-size: 15px;
  color: #666;
  font-weight: 600;
  position: relative;
  padding-bottom: 8px;
  transition: all 0.3s ease;
}

.info-item h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg, rgba(142, 68, 173, 0), rgba(142, 68, 173, 0.5));
  border-radius: 2px;
  transition: width 0.4s ease;
}

.info-item:hover h4 {
  color: #555;
  transform: translateX(-3px);
}

.info-item:hover h4::after {
  width: 50px;
}

.info-item p {
  margin: 0;
  font-size: 20px;
  color: #333;
  font-weight: 700;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 1;
}

.info-item p::before {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 0;
  height: 8px;
  background-color: rgba(142, 68, 173, 0.1);
  z-index: -1;
  transition: width 0.4s ease;
  border-radius: 4px;
}

.info-item:hover p {
  color: #8e44ad;
  
  text-shadow: 0 1px 2px rgba(142, 68, 173, 0.1);
}

.info-item:hover p::before {
  width: 100%;
}

/* تنسيق حالة الحضور */
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  min-width: 90px;
  backdrop-filter: blur(5px);
  overflow: hidden;
  z-index: 1;
}

.status::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: 8px;
  animation: pulse 2.5s infinite;
  position: relative;
  z-index: 2;
}

.status::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 80%);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.status:hover::after {
  opacity: 1;
}

.status:hover {
  scale(1.05);
}

.status.on-time {
  background-color: rgba(46, 204, 113, 0.15);
  color: #27ae60;
  box-shadow: 0 5px 15px rgba(46, 204, 113, 0.2);
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.status.on-time::before {
  background-color: #27ae60;
  box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.5);
}

.status.on-time:hover {
  background-color: rgba(46, 204, 113, 0.2);
  box-shadow: 0 8px 20px rgba(46, 204, 113, 0.25);
  border-color: rgba(46, 204, 113, 0.4);
}

.status.late {
  background-color: rgba(231, 76, 60, 0.15);
  color: #c0392b;
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.2);
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.status.late::before {
  background-color: #c0392b;
  box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.5);
}

.status.late:hover {
  background-color: rgba(231, 76, 60, 0.2);
  box-shadow: 0 8px 20px rgba(231, 76, 60, 0.25);
  border-color: rgba(231, 76, 60, 0.4);
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.5);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(46, 204, 113, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
  }
}

/* تنسيق حالة التحميل وعدم وجود بيانات */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 50px 0;
  position: relative;
  overflow: hidden;
}

.loading-spinner::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(142, 68, 173, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  z-index: 0;
  animation: pulse-bg 2s infinite ease-in-out;
}

@keyframes pulse-bg {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.3; }
}

.loading-spinner:before {
  content: '';
  width: 60px;
  height: 60px;
  border: 4px solid rgba(142, 68, 173, 0.1);
  border-radius: 50%;
  border-top-color: #8e44ad;
  border-bottom-color: #9b59b6;
  animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
  display: inline-block;
  box-shadow: 0 5px 15px rgba(142, 68, 173, 0.1);
  position: relative;
  z-index: 1;
}

@keyframes spin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1); }
}

.no-data {
  text-align: center;
  padding: 50px 0;
  color: #666;
  font-size: 17px;
  font-weight: 500;
  background-color: rgba(142, 68, 173, 0.03);
  border-radius: 20px;
  margin: 30px 0;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(142, 68, 173, 0.08);
  backdrop-filter: blur(5px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.no-data:hover {
  
  box-shadow: 0 15px 40px rgba(142, 68, 173, 0.1);
  border-color: rgba(142, 68, 173, 0.15);
}

.no-data::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" fill="none"><circle cx="50" cy="50" r="50" fill="rgba(142,68,173,0.02)"/></svg>');
  background-size: 100px 100px;
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

.no-data:before {
  content: '\f119'; /* Font Awesome sad face icon */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  display: block;
  font-size: 40px;
  color: #8e44ad;
  margin-bottom: 20px;
  opacity: 0.6;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 5px rgba(142, 68, 173, 0.2);
  transition: all 0.4s ease;
}

.no-data:hover:before {
  transform: scale(1.1) rotate(5deg);
  opacity: 0.8;
}

/* تنسيق رسائل الخطأ في النموذج */
.form-error {
  color: #e74c3c;
  font-size: 14px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  font-weight: 600;
  animation: errorShake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  padding: 8px 12px;
  border-radius: 8px;
  background-color: rgba(231, 76, 60, 0.05);
  box-shadow: 0 3px 10px rgba(231, 76, 60, 0.1);
  position: relative;
  overflow: hidden;
  transform-origin: center bottom;
}

.form-error::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, #e74c3c, #c0392b);
  border-radius: 3px 0 0 3px;
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0) rotate(0); }
  15% { transform: translateX(-6px) rotate(-1deg); }
  30% { transform: translateX(5px) rotate(1deg); }
  45% { transform: translateX(-4px) rotate(-0.5deg); }
  60% { transform: translateX(3px) rotate(0.5deg); }
  75% { transform: translateX(-2px) rotate(-0.25deg); }
  90% { transform: translateX(1px) rotate(0.25deg); }
}

.form-error i {
  margin-left: 8px;
  font-size: 16px;
  color: #e74c3c;
  background-color: rgba(231, 76, 60, 0.1);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(231, 76, 60, 0.2);
}

.task-form .form-group input.error,
.task-form .form-group select.error {
  border-color: #e74c3c;
  background-color: rgba(231, 76, 60, 0.05);
  box-shadow: 0 0 0 1px rgba(231, 76, 60, 0.2);
}

.task-form .form-group input.error:focus,
.task-form .form-group select.error:focus {
  box-shadow: 0 8px 20px rgba(231, 76, 60, 0.15);
  
}

/* تنسيق رسائل النجاح */
.form-success {
  color: #27ae60;
  font-size: 14px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  font-weight: 600;
  animation: successFadeIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding: 8px 12px;
  border-radius: 8px;
  background-color: rgba(39, 174, 96, 0.05);
  box-shadow: 0 3px 10px rgba(39, 174, 96, 0.1);
  position: relative;
  overflow: hidden;
}

.form-success::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, #27ae60, #2ecc71);
  border-radius: 3px 0 0 3px;
}

@keyframes successFadeIn {
  from { opacity: 0; scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.form-success i {
  margin-left: 8px;
  font-size: 16px;
  color: #27ae60;
  background-color: rgba(39, 174, 96, 0.1);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(39, 174, 96, 0.2);
}

.task-form .form-group input.success,
.task-form .form-group select.success {
  border-color: #27ae60;
  background-color: rgba(39, 174, 96, 0.05);
  box-shadow: 0 0 0 1px rgba(39, 174, 96, 0.2);
}

.task-form .form-group input.success:focus,
.task-form .form-group select.success:focus {
  box-shadow: 0 8px 20px rgba(39, 174, 96, 0.15);
  
}

/* تنسيق أزرار النموذج */
.task-form .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 30px;
  position: relative;
}

.task-form .form-actions::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(142, 68, 173, 0), rgba(142, 68, 173, 0.2) 50%, rgba(142, 68, 173, 0));
  opacity: 0.5;
}

.task-form .btn-submit {
  padding: 12px 30px;
  background: linear-gradient(135deg, #8e44ad, #9b59b6);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 5px 15px rgba(142, 68, 173, 0.2);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.task-form .btn-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
  transform: skewX(-25deg);
  transition: all 0.6s ease;
  z-index: -1;
}

.task-form .btn-submit:hover {
  
  box-shadow: 0 10px 25px rgba(142, 68, 173, 0.3);
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.task-form .btn-submit:hover::before {
  left: 100%;
}

.task-form .btn-cancel {
  padding: 12px 30px;
  background-color: transparent;
  color: #666;
  border: 2px solid rgba(142, 68, 173, 0.2);
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.task-form .btn-cancel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: rgba(142, 68, 173, 0.05);
  transition: all 0.4s ease;
  z-index: -1;
}

.task-form .btn-cancel:hover {
  color: #8e44ad;
  border-color: rgba(142, 68, 173, 0.4);
  
}

.task-form .btn-cancel:hover::before {
  width: 100%;
}

/* تنسيق البطاقة الرئيسية */
.card {
  background-color: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 12px 30px rgba(142, 68, 173, 0.1);
  
}

.card-header {
  padding: 20px 25px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: linear-gradient(to left, rgba(142, 68, 173, 0.05), rgba(155, 89, 182, 0.02));
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #333;
  position: relative;
  padding-right: 15px;
}

.card-header h3::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 22px;
  background: linear-gradient(to bottom, #8e44ad, #9b59b6);
  border-radius: 3px;
}

.card-body {
  padding: 25px;
}

/* تأثيرات إضافية للصفحة */
#appointments {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* تنسيق الأزرار */
.btn {
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
  z-index: -1;
}

.btn:hover::before {
  transform: translateX(0);
}

.btn i {
  margin-left: 10px;
  transition: transform 0.3s ease;
}

.btn:hover i {
  transform: translateX(-3px);
}

.btn-primary {
  background: linear-gradient(45deg, #8e44ad, #9b59b6);
  color: white;
  box-shadow: 0 5px 15px rgba(142, 68, 173, 0.25);
}

.btn-primary:hover {
  
  box-shadow: 0 8px 20px rgba(142, 68, 173, 0.35);
}

.btn-secondary {
  background-color: #f5f5f5;
  color: #555;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e0e0e0;
}

.btn-secondary:hover {
  background-color: #efefef;
  color: #333;
  
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.btn-danger {
  background: linear-gradient(45deg, #e74c3c, #c0392b);
  color: white;
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.25);
}

.btn-danger:hover {
  
  box-shadow: 0 8px 20px rgba(231, 76, 60, 0.35);
}

/* تنسيق حالة التحميل */
.loading-spinner {
  display: block;
  width: 50px;
  height: 50px;
  margin: 25px auto;
  border: 4px solid rgba(142, 68, 173, 0.15);
  border-top-color: #8e44ad;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 5px 15px rgba(142, 68, 173, 0.1);
}

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

.no-data {
  text-align: center;
  padding: 30px;
  color: #666;
  font-style: normal;
  font-weight: 600;
  background-color: #f9f9f9;
  border-radius: 15px;
  margin: 25px 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
  border: 1px dashed rgba(142, 68, 173, 0.2);
}

.no-data::before {
  content: '\f119'; /* Font Awesome sad face icon */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  display: block;
  font-size: 35px;
  color: #8e44ad;
  margin-bottom: 15px;
  opacity: 0.6;
}

/* تنسيق الرسائل التنبيهية */
.alert {
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  animation: alertSlideIn 0.4s ease-out;
}

@keyframes alertSlideIn {
  from { opacity: 0;  }
  to { opacity: 1; transform: translateY(0); }
}

.alert::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 100%;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.alert i {
  margin-left: 12px;
  font-size: 18px;
}

.alert-success {
  background-color: rgba(39, 174, 96, 0.1);
  color: #27ae60;
  border: 1px solid rgba(39, 174, 96, 0.2);
}

.alert-success::before {
  background-color: #27ae60;
}

.alert-success i {
  color: #27ae60;
}

.alert-warning {
  background-color: rgba(241, 196, 15, 0.1);
  color: #f39c12;
  border: 1px solid rgba(241, 196, 15, 0.2);
}

.alert-warning::before {
  background-color: #f39c12;
}

.alert-warning i {
  color: #f39c12;
}

.alert-danger {
  background-color: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.2);
}

.alert-danger::before {
  background-color: #e74c3c;
}

.alert-danger i {
  color: #e74c3c;
}

.alert-info {
  background-color: rgba(52, 152, 219, 0.1);
  color: #3498db;
  border: 1px solid rgba(52, 152, 219, 0.2);
}

.alert-info::before {
  background-color: #3498db;
}

.alert-info i {
  color: #3498db;
}

/* تنسيق التقويم في القائمة المنبثقة */
.calendar-container {
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(142, 68, 173, 0.1);
  overflow: hidden;
  animation: calendarFadeIn 0.3s ease-out;
}

@keyframes calendarFadeIn {
  from { opacity: 0;  }
  to { opacity: 1; transform: translateY(0); }
}

.calendar-header {
  background: linear-gradient(135deg, #8e44ad, #9b59b6);
  color: white;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calendar-header button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.calendar-header button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  padding: 15px;
}

.calendar-day {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.calendar-day:hover {
  background-color: rgba(142, 68, 173, 0.1);
}

.calendar-day.selected {
  background-color: #8e44ad;
  color: white;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(142, 68, 173, 0.3);
}

.calendar-day.today {
  border: 2px solid #8e44ad;
  font-weight: 700;
}

/* تنسيقات للأجهزة المحمولة */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .attendance-grid {
    grid-template-columns: 1fr;
  }
  
  .detail-info {
    grid-template-columns: 1fr;
  }
  
  .modal-container {
    width: 95%;
    max-height: 80vh;
  }
  
  .calendar-days {
    gap: 2px;
    padding: 10px;
  }
  
  .calendar-day {
    height: 35px;
    font-size: 13px;
  }
  
  .attendance-table th,
  .attendance-table td {
    padding: 0.5rem;
    font-size: 0.85rem;
  }
  
  .actions-cell {
    display: flex;
    flex-direction: row;
    gap: 0.25rem;
  }
  
  .actions-cell .btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
  }
  
  #appointments h1 {
    font-size: 24px;
  }
  
  .page-actions .btn-primary {
    padding: 10px 20px;
    font-size: 14px;
  }
}