body:not(.login-page-active) #particles-js {
  display: none !important;
  visibility: hidden !important;
}
/* ================================================== */
/* ==== بداية كود صفحة تسجيل الدخول الجديدة والآمنة ==== */
/* ================================================== */

/* تم تعديل هذا ليعمل فقط في صفحة تسجيل الدخول */
body.login-page-active {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  /* الخلفية السوداء ستُطبق فقط عندما يكون body.login-page-active موجوداً */
  background: linear-gradient(
    135deg,
    #001d3d 0%,
    #003566 25%,
    #001122 50%,
    #000814 100%
  );
  overflow: hidden;
  perspective: 1000px;
  position: relative;
}

/* تم إزالة التأثير الدوار المبالغ فيه */

body.login-page-active #particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* استخدمنا .stylish-login-wrapper كحاوية فريدة لتجنب التضارب مع .container الأصلي */
body.login-page-active .stylish-login-wrapper {
  width: 100%;
  max-width: 360px;
  padding: 20px;
  position: relative;
  z-index: 10;
  perspective: 1000px;
}

body.login-page-active .stylish-login-wrapper * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body.login-page-active .form-box {
  background: linear-gradient(
    135deg,
    rgba(0, 13, 26, 0.85) 0%,
    rgba(0, 29, 61, 0.75) 35%,
    rgba(0, 17, 34, 0.95) 60%,
    rgba(0, 8, 20, 0.9) 100%
  );
  backdrop-filter: blur(15px) brightness(0.7) saturate(120%);
  -webkit-backdrop-filter: blur(15px) brightness(0.7) saturate(120%);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(2, 85, 240, 0.2);
  position: relative;
  overflow: hidden;
  animation: formEntrance 0.5s ease-out forwards;
  opacity: 0;
}

body.login-page-active .form-box::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(90deg, #0255f0, #003566);
  border-radius: 24px;
  z-index: -1;
  opacity: 0.2;
}

body.login-page-active .form-box::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  border-radius: 24px;
  z-index: -2;
}

/* تم إزالة حركة الحدود */

@keyframes formEntrance {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* تم إزالة حركة الطفو المستمرة */

body.login-page-active .form-box:hover {
  transform: translateY(-3px);
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

body.login-page-active h2 {
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
  margin-bottom: 10px;
  font-family: "Cinzel", serif;
  font-weight: 700;
  letter-spacing: 3px;
  /* إلغاء text-shadow و animation لإزالة التوهج */
  /* text-shadow: 0 0 8px rgba(2, 85, 240, 0.5); */
  /* animation: glow 2s infinite alternate; */
  font-size: 24px;
}

/* تم تعطيل التوهج لنص تسجيل الدخول */
/*
@keyframes glow {
  from {
    text-shadow: 0 0 5px rgba(2, 85, 240, 0.4);
  }
  to {
    text-shadow: 0 0 10px rgba(2, 85, 240, 0.6);
  }
}
*/

body.login-page-active p {
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  margin-bottom: 25px;
  font-size: 14px;
  letter-spacing: 1px;
}

body.login-page-active .input-group {
  position: relative;
  margin-bottom: 25px;
  transform: translateZ(10px);
  transition: transform 0.3s ease;
}

/* تم إزالة تأثير hover المبالغ فيه */

body.login-page-active .input-field {
  width: 100%;
  padding: 12px 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(2, 85, 240, 0.3);
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  position: relative;
}

body.login-page-active .input-field::placeholder {
  color: transparent;
}

body.login-page-active .input-field:focus {
  border-bottom-color: transparent;
}

/* إخفاء glow-line تماماً من جميع حقول الباسورد */
body.login-page-active .glow-line,
body.login-page-active .input-group .glow-line,
.password-input-wrapper .glow-line {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
}

@keyframes pulse {
  0%,
  100% {
    transform: scaleX(1);
    opacity: 1;
  }
  50% {
    transform: scaleX(1.05);
    opacity: 0.8;
  }
}

@keyframes shimmer {
  0% {
    background-position: -100% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

body.login-page-active .input-group label {
  position: absolute;
  top: 12px;
  left: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 15px;
  pointer-events: none;
  transition: 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  z-index: 3;
}

body.login-page-active .input-field:focus ~ label,
body.login-page-active .input-field:valid ~ label {
  top: -12px;
  font-size: 12px;
  color: rgba(2, 85, 240, 0.9);
  text-shadow: 0 0 8px rgba(2, 85, 240, 0.6);
  letter-spacing: 1px;
}

/* تم تغيير اسم الكلاس من .login-btn إلى .stylish-login-btn لتجنب التضارب */
body.login-page-active .stylish-login-btn {
  width: 100%;
  padding: 12px 0;
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 60%, #000814 100%);
  border: 2px solid transparent;
  border-radius: 25px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  transform: translateZ(20px);
  font-family: "Cinzel", serif;
  margin-bottom: 10px;
  background-clip: padding-box;
  box-shadow: 0 4px 15px rgba(2, 85, 240, 0.3), 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.login-page-active .stylish-login-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 25px;
  padding: 2px;
  background: linear-gradient(45deg, #0255f0, #003566, #0255f0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: borderAnimation 4s ease-in-out infinite;
  z-index: -1;
}

body.login-page-active .stylish-login-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: 0.3s;
}

@keyframes borderAnimation {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

body.login-page-active .stylish-login-btn span {
  position: relative;
  z-index: 1;
  transition: 0.3s;
}

body.login-page-active .btn-glow {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(2, 85, 240, 0.3),
    rgba(0, 53, 102, 0.4),
    rgba(2, 85, 240, 0.3),
    transparent
  );
  transition: 0.5s;
}

body.login-page-active .stylish-login-btn:hover .btn-glow {
  left: 100%;
}

body.login-page-active .stylish-login-btn:hover {
  background: linear-gradient(135deg, #0255f0 5%, #001d3d 50%, #000814 100%);
  box-shadow: 0 0 30px rgba(2, 85, 240, 0.7), 0 0 60px rgba(0, 53, 102, 0.4),
    0 8px 25px rgba(2, 85, 240, 0.4), inset 0 0 10px rgba(2, 85, 240, 0.2);
  transform: translateZ(25px) scale(1.05) rotateX(-5deg);
  letter-spacing: 3px;
}

body.login-page-active .stylish-login-btn:hover::after {
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  0% {
    width: 5px;
    height: 5px;
    opacity: 0.5;
  }
  100% {
    width: 300px;
    height: 300px;
    opacity: 0;
  }
}

body.login-page-active .stylish-login-btn:hover span {
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
}

body.login-page-active .stylish-login-btn:active {
  transform: translateZ(15px) scale(0.95);
  box-shadow: 0 0 15px rgba(2, 85, 240, 0.5), inset 0 0 15px rgba(0, 0, 0, 0.3);
  transition: all 0.1s;
}

body.login-page-active .stylish-login-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 85, 240, 0.3), 0 0 30px rgba(2, 85, 240, 0.6),
    0 8px 25px rgba(2, 85, 240, 0.4);
}

/* Animations */
body.login-page-active .input-group,
body.login-page-active .remember-forgot,
body.login-page-active .stylish-login-btn,
body.login-page-active .signup-link {
  animation: fadeInUp 0.5s forwards;
  opacity: 0;
}

body.login-page-active .input-group:nth-child(1) {
  animation-delay: 0.6s;
}
body.login-page-active .input-group:nth-child(2) {
  animation-delay: 0.8s;
}
body.login-page-active .stylish-login-btn {
  animation-delay: 1.2s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================================ */
/* ==== نهاية كود صفحة تسجيل الدخول الجديدة والآمنة ==== */
/* ================================================ */

/* ================================================ */
/* ==== بداية كود Password Reveal Animation ==== */
/* ================================================ */

/* زر إظهار/إخفاء كلمة المرور في صفحة تسجيل الدخول */
body.login-page-active .password-toggle-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.6;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

body.login-page-active .password-toggle-btn:hover {
  opacity: 1;
  background: rgba(2, 85, 240, 0.1);
  transform: translateY(-50%) scale(1.1);
}

body.login-page-active .password-toggle-btn:active {
  transform: translateY(-50%) scale(0.95);
}

body.login-page-active .password-toggle-icon {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  stroke-width: 2;
}

body.login-page-active .password-toggle-btn:hover .password-toggle-icon {
  color: rgba(2, 85, 240, 0.9);
  filter: drop-shadow(0 0 4px rgba(2, 85, 240, 0.5));
}

body.login-page-active .password-toggle-btn.active .password-toggle-icon {
  color: rgba(2, 85, 240, 1);
  filter: drop-shadow(0 0 6px rgba(2, 85, 240, 0.7));
}

/* أنيميشن تبديل الأيقونات */
body.login-page-active .password-eye-icon,
body.login-page-active .password-eye-off-icon {
  position: absolute;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 21;
  transform-origin: center;
}

body.login-page-active .password-toggle-btn.active .password-eye-icon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.8);
}

body.login-page-active .password-toggle-btn.active .password-eye-off-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  display: block !important;
  animation: professionalEyeBlink 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

body.login-page-active .password-toggle-btn:not(.active) .password-eye-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

body.login-page-active .password-toggle-btn:not(.active) .password-eye-off-icon {
  opacity: 0;
  transform: rotate(90deg) scale(0.8);
  display: none !important;
}

/* أنيميشن تغميض العين احترافية وطبيعية */
@keyframes professionalEyeBlink {
  0% {
    transform: scaleY(1) scaleX(1);
    opacity: 1;
  }
  15% {
    transform: scaleY(0.4) scaleX(1);
    opacity: 0.9;
  }
  30% {
    transform: scaleY(0.1) scaleX(1);
    opacity: 0.7;
  }
  45% {
    transform: scaleY(0.05) scaleX(1);
    opacity: 0.5;
  }
  60% {
    transform: scaleY(0.1) scaleX(1);
    opacity: 0.7;
  }
  75% {
    transform: scaleY(0.4) scaleX(1);
    opacity: 0.9;
  }
  90% {
    transform: scaleY(0.85) scaleX(1);
    opacity: 0.95;
  }
  100% {
    transform: scaleY(1) scaleX(1);
    opacity: 1;
  }
}

/* تعديل padding للحقل لإفساح المجال للزر (الآن على اليمين) */
body.login-page-active .input-group .input-field {
  padding-right: 0;
}

/* Fallback for browsers that support :has() */
body.login-page-active .input-group:has(.password-toggle-btn) .input-field {
  padding-right: 40px;
}

/* Fallback for browsers that don't support :has() - using class */
body.login-page-active .input-group.password-has-toggle .input-field {
  padding-right: 40px;
}

/* اتجاه النص من الشمال لليمين في حقول تسجيل الدخول */
body.login-page-active .input-field.login-input-ltr {
  direction: ltr;
  text-align: left;
}

/* حاوية كلمة المرور في نماذج المستخدمين */
.password-input-wrapper {
  position: relative;
  width: 100%;
}

/* زر إظهار/إخفاء كلمة المرور في نماذج المستخدمين */
.password-toggle-btn.form-password-toggle {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.5;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.password-toggle-btn.form-password-toggle:hover {
  opacity: 1;
  background: rgba(2, 85, 240, 0.08);
  transform: translateY(-50%) scale(1.1);
}

.password-toggle-btn.form-password-toggle:active {
  transform: translateY(-50%) scale(0.95);
}

.password-toggle-btn.form-password-toggle .password-toggle-icon {
  width: 18px;
  height: 18px;
  color: #666;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  stroke-width: 2;
}

.password-toggle-btn.form-password-toggle:hover .password-toggle-icon {
  color: #0255f0;
}

.password-toggle-btn.form-password-toggle.active .password-toggle-icon {
  color: #0255f0;
}

/* أنيميشن تبديل الأيقونات في نماذج المستخدمين */
.password-toggle-btn.form-password-toggle .password-eye-icon,
.password-toggle-btn.form-password-toggle .password-eye-off-icon {
  position: absolute;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.password-toggle-btn.form-password-toggle.active .password-eye-icon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.8);
}

.password-toggle-btn.form-password-toggle.active .password-eye-off-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  display: block !important;
  animation: professionalEyeBlink 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.password-toggle-btn.form-password-toggle:not(.active) .password-eye-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.password-toggle-btn.form-password-toggle:not(.active) .password-eye-off-icon {
  opacity: 0;
  transform: rotate(90deg) scale(0.8);
  display: none !important;
}

/* تعديل padding للحقل لإفساح المجال للزر */
.password-input-wrapper .form-control {
  padding-left: 45px;
  padding-right: 15px;
}

/* أنيميشن سلس عند تغيير نوع الحقل */
.password-input-wrapper .form-control,
body.login-page-active .input-group .input-field {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* تأثير focus مع الزر */
.password-input-wrapper:focus-within .password-toggle-btn.form-password-toggle,
body.login-page-active .input-group:focus-within .password-toggle-btn {
  opacity: 0.8;
}

.password-input-wrapper:focus-within .password-toggle-btn.form-password-toggle .password-toggle-icon,
body.login-page-active .input-group:focus-within .password-toggle-btn .password-toggle-icon {
  color: #0255f0;
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
  body.login-page-active .password-toggle-btn {
    width: 36px;
    height: 36px;
    padding: 10px;
  }
  
  .password-toggle-btn.form-password-toggle {
    width: 36px;
    height: 36px;
    padding: 10px;
  }
  
  body.login-page-active .password-toggle-icon,
  .password-toggle-btn.form-password-toggle .password-toggle-icon {
    width: 20px;
    height: 20px;
  }
}

/* ================================================ */
/* ==== نهاية كود Password Reveal Animation ==== */
/* ================================================ */

/* === تحسينات حقول الإدخال === */
.input-wrapper {
  position: relative;
}

.form-control {
  /* مساحة للأيقونة على اليسار (لأن اتجاه الصفحة من اليمين لليسار) */
  padding-left: 35px;
  /* مساحة إضافية على اليمين لترك فراغ بين بداية الحقل والنص */
  padding-right: 15px;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 12px; /* غيرنا right إلى left */
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.input-wrapper:focus-within .input-icon {
  opacity: 1; /* زيادة وضوح الأيقونة عند التركيز على الحقل */
}

/* أيقونة المستخدم */
.user-icon {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>');
}

/* أيقونة القفل */
.lock-icon {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg>');
}
.login-btn {
  font-weight: 600; /* جعل الخط أعرض قليلاً */
}
/* ==== بداية كود زر الحذف الجديد ==== */

.button-delete {
  /* قمنا بتغيير اسم الكلاس الرئيسي ليكون أكثر تحديداً */
  --background: linear-gradient(
    135deg,
    #0255f0 0%,
    #000000 100%
  ); /* لون أحمر للحذف */
  --background-hover: linear-gradient(
    135deg,
    #7a0000 0%,
    #000000 100%
  ); /* لون أحمر أغمق عند المرور */
  --text: #fff;
  --shadow: rgba(0, 9, 61, 0.2);
  --paper: #5c86ff;
  --paper-lines: #fff;
  --trash: #fff; /* لون أيقونة سلة المهملات */
  --trash-lines: #e0e0e0; /* لون الخطوط داخل السلة */
  --check: #fff;
  --check-background: linear-gradient(
    135deg,
    #0255f0 0%,
    #000000 100%
  ); /* لون علامة الصح بالأخضر */
  position: relative;
  border: none;
  outline: none;
  background: none;
  padding: 8px 10px;
  border-radius: 7px;
  min-width: 142px;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  display: flex;
  justify-content: space-between; /* << أضف هذا السطر */
  align-items: center; /* << أضف هذا السطر */
  color: var(--text);
  background: var(--btn, var(--background));
  box-shadow: 0 var(--shadow-y, 4px) var(--shadow-blur, 8px) var(--shadow);
  transform: scale(var(--scale, 1));
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}
.button-delete .button-text {
  position: relative;
  right: 8px;
  z-index: 10;
}

.button-delete span {
  display: block;
  font-size: 14px;
  line-height: 25px;
  font-weight: 600;
  margin-right: 1px;
  opacity: var(--span-opacity, 1);
  transform: translateX(var(--span-x, 0)) translateZ(0);
  transition: transform 0.4s ease var(--span-delay, 0.2s),
    opacity 0.3s ease var(--span-delay, 0.2s);
}

.button-delete .trash {
  display: block;
  position: relative;
  right: 9px; /* << تم التعديل هنا */
  bottom: 2px;
  transform: translate(var(--trash-x, 0), var(--trash-y, 1px)) translateZ(0)
    scale(var(--trash-scale, 0.64));
  transition: transform 0.5s;
}

.button-delete .trash:before,
.button-delete .trash:after {
  content: "";
  position: absolute;
  height: 8px;
  width: 2px;
  border-radius: 1px;
  background: var(--icon, var(--trash));
  bottom: 100%;
  transform-origin: 50% 6px;
  transform: translate(var(--x, 3px), 2px) scaleY(var(--sy, 0.7))
    rotate(var(--r, 0deg));
  transition: transform 0.4s, background 0.3s;
}

.button-delete .trash:before {
  left: 1px;
}

.button-delete .trash:after {
  right: 1px;
  --x: -3px;
}

.button-delete .trash .top {
  position: absolute;
  overflow: hidden;
  left: -4px;
  right: -4px;
  bottom: 100%;
  height: 40px;
  z-index: 1;
  transform: translateY(2px);
}

.button-delete .trash .top:before,
.button-delete .trash .top:after {
  content: "";
  position: absolute;
  border-radius: 1px;
  background: var(--icon, var(--trash));
  width: var(--w, 12px);
  height: var(--h, 2px);
  left: var(--l, 8px);
  bottom: var(--b, 5px);
  transition: background 0.3s, transform 0.4s;
}

.button-delete .trash .top:after {
  --w: 28px;
  --h: 2px;
  --l: 0;
  --b: 0;
  transform: scaleX(var(--trash-line-scale, 1));
}

.button-delete .trash .top .paper {
  width: 14px;
  height: 18px;
  background: var(--paper);
  left: 7px;
  bottom: 0;
  border-radius: 1px;
  position: absolute;
  transform: translateY(-16px);
  opacity: 0;
}

.button-delete .trash .top .paper:before,
.button-delete .trash .top .paper:after {
  content: "";
  width: var(--w, 10px);
  height: 2px;
  border-radius: 1px;
  position: absolute;
  left: 2px;
  top: var(--t, 2px);
  background: var(--paper-lines);
  transform: scaleY(0.7);
  box-shadow: 0 9px 0 var(--paper-lines);
}

.button-delete .trash .top .paper:after {
  --t: 5px;
  --w: 7px;
}

.button-delete .trash .box {
  width: 20px;
  height: 25px;
  border: 2px solid var(--icon, var(--trash));
  border-radius: 1px 1px 4px 4px;
  position: relative;
  overflow: hidden;
  z-index: 2;
  transition: border-color 0.3s;
}

.button-delete .trash .box:before,
.button-delete .trash .box:after {
  content: "";
  position: absolute;
  width: 4px;
  height: var(--h, 20px);
  top: 0;
  left: var(--l, 50%);
  background: var(--b, var(--trash-lines));
}

.button-delete .trash .box:before {
  border-radius: 2px;
  margin-left: -2px;
  transform: translateX(-3px) scale(0.6);
  box-shadow: 10px 0 0 var(--trash-lines);
  opacity: var(--trash-lines-opacity, 1);
  transition: transform 0.4s, opacity 0.4s;
}

.button-delete .trash .box:after {
  --h: 16px;
  --b: var(--paper);
  --l: 1px;
  transform: translate(-0.5px, -16px) scaleX(0.5);
  box-shadow: 7px 0 0 var(--paper), 14px 0 0 var(--paper), 21px 0 0 var(--paper);
}

.button-delete .trash .check {
  padding: 4px 3px;
  border-radius: 50%;
  background: var(--check-background);
  position: absolute;
  left: 2px;
  top: 24px;
  opacity: var(--check-opacity, 0);
  transform: translateY(var(--check-y, 0)) scale(var(--check-scale, 0.2));
  transition: transform var(--check-duration, 0.2s) ease var(--check-delay, 0s),
    opacity var(--check-duration-opacity, 0.2s) ease var(--check-delay, 0s);
}

.button-delete .trash .check svg {
  width: 8px;
  height: 6px;
  display: block;
  fill: none;
  stroke-width: 1.5;
  stroke-dasharray: 9px;
  stroke-dashoffset: var(--check-offset, 9px);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke: var(--check);
  transition: stroke-dashoffset 0.4s ease var(--checkmark-delay, 0.4s);
}

.button-delete.delete {
  justify-content: center;
  --span-opacity: 0;
  --span-x: 16px; /* يمكنك تغيير هذه إلى -16px لجعل النص يختفي لليسار */
  --span-delay: 0s;
  --trash-x: 40px; /* << تم التعديل هنا */
  --trash-y: 2px;
  --trash-scale: 1;
  --trash-lines-opacity: 0;
  --trash-line-scale: 0;
  --icon: #fff;
  --check-offset: 0;
  --check-opacity: 1;
  --check-scale: 1;
  --check-y: 9px;
  --check-delay: 1.7s;
  --checkmark-delay: 2.1s;
  --check-duration: 0.55s;
  --check-duration-opacity: 0.3s;
}

.button-delete.delete .trash:before,
.button-delete.delete .trash:after {
  --sy: 1;
  --x: 0;
}

.button-delete.delete .trash:before {
  --r: 40deg;
}

.button-delete.delete .trash:after {
  --r: -40deg;
}

.button-delete.delete .trash .top .paper {
  animation: paper 1.5s linear forwards 0.5s;
}

.button-delete.delete .trash .box:after {
  animation: cut 1.5s linear forwards 0.5s;
}

.button-delete.delete,
.button-delete:hover {
  --btn: var(--background-hover);
  --shadow-y: 5px;
  --shadow-blur: 9px;
}

.button-delete:active {
  --shadow-y: 2px;
  --shadow-blur: 5px;
  --scale: 0.94;
}

@-webkit-keyframes paper {
  10%,
  100% {
    opacity: 1;
  }

  20% {
    transform: translateY(-16px);
  }

  40% {
    transform: translateY(0);
  }

  70%,
  100% {
    transform: translateY(24px);
  }
}

@keyframes paper {
  10%,
  100% {
    opacity: 1;
  }

  20% {
    transform: translateY(-16px);
  }

  40% {
    transform: translateY(0);
  }

  70%,
  100% {
    transform: translateY(24px);
  }
}

@-webkit-keyframes cut {
  0%,
  40% {
    transform: translate(-0.5px, -16px) scaleX(0.5);
  }

  100% {
    transform: translate(-0.5px, 24px) scaleX(0.5);
  }
}

@keyframes cut {
  0%,
  40% {
    transform: translate(-0.5px, -16px) scaleX(0.5);
  }

  100% {
    transform: translate(-0.5px, 24px) scaleX(0.5);
  }
}

/* ==== نهاية كود زر الحذف الجديد ==== */

/* Essential Logout Button Styles */
:root {
  --primary-dark: #1a1a1a;
  --secondary-dark: #2d2d2d;
  --accent-color: #4f46e5;
  --text-light: #ffffff;
  --text-muted: #a1a1aa;
  --border-color: #404040;
  --hover-color: #5b52f0;
  --danger-color: #ef4444;
}

.logoutButton {
  --figure-duration: 100ms;
  --transform-figure: none;
  --walking-duration: 100ms;
  --transform-arm1: none;
  --transform-wrist1: none;
  --transform-arm2: none;
  --transform-wrist2: none;
  --transform-leg1: none;
  --transform-calf1: none;
  --transform-leg2: none;
  --transform-calf2: none;

  all: unset; /* إعادة تعيين كل التنسيقات الافتراضية للزر */
  box-sizing: border-box;
  background: linear-gradient(135deg, #0255f0 0%, #000000 100%);
  border-radius: 12px;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;
  font-size: 16px;
  font-weight: 600;
  height: 50px;
  padding: 0;
  perspective: 100px;
  position: relative;
  text-align: center;
  width: 160px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
  -webkit-tap-highlight-color: transparent;
}

.logoutButton::before {
  background: linear-gradient(
    135deg,
    var(--secondary-dark),
    var(--primary-dark)
  );
  border-radius: 10px;
  content: "";
  display: block;
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  transform: none;
  transition: transform 0.2s ease;
  width: 100%;
  z-index: 2;
  opacity: 0;
}

.logoutButton:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
  background: linear-gradient(135deg, #0255f0 0%, #000000 100%);
}

.logoutButton:hover::before {
  opacity: 0.1;
}

.logoutButton:hover .door {
  transform: rotateY(25deg);
}

.logoutButton:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.3);
}

.logoutButton:active::before {
  transform: scale(0.98);
  opacity: 0.2;
}

.logoutButton:active .door {
  transform: rotateY(35deg);
}

.logoutButton.clicked::before {
  transform: none;
  opacity: 0.15;
}

.logoutButton.clicked .door {
  transform: rotateY(40deg);
}

.logoutButton.door-slammed .door {
  transform: none;
  transition: transform 150ms ease-in 300ms;
}

.logoutButton.falling {
  animation: shake 250ms linear;
}

.logoutButton.falling .bang {
  animation: flash 400ms linear;
}

.logoutButton.falling .figure {
  animation: spin 1200ms infinite linear;
  bottom: -1200px;
  opacity: 0;
  right: 1px;
  transition: transform calc(var(--figure-duration) * 1ms) linear,
    bottom calc(var(--figure-duration) * 1ms) cubic-bezier(0.7, 0.1, 1, 1) 120ms,
    opacity calc(var(--figure-duration) * 0.25ms) linear
      calc(var(--figure-duration) * 0.75ms);
  z-index: 1;
}

.logoutButton .button-text {
  color: var(--text-light);
  font-weight: 600;
  position: relative;
  z-index: 10;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  text-align: center;
  transform: translateX(-10px);
}

.logoutButton svg {
  display: block;
  position: absolute;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.logoutButton .figure {
  bottom: 6px;
  fill: var(--text-light);
  right: 20px;
  transform: var(--transform-figure);
  transition: transform calc(var(--figure-duration) * 1ms)
    cubic-bezier(0.2, 0.1, 0.8, 0.9);
  width: 32px;
  z-index: 4;
}

.logoutButton .door,
.logoutButton .doorway {
  bottom: 5px;
  fill: var(--text-muted);
  right: 14px;
  width: 34px;
}

.logoutButton .door {
  transform: rotateY(20deg);
  transform-origin: 100% 50%;
  transform-style: preserve-3d;
  transition: transform 250ms ease;
  z-index: 5;
}

.logoutButton .door path {
  fill: var(--secondary-dark);
  stroke: var(--border-color);
  stroke-width: 3;
}

.logoutButton .doorway {
  z-index: 3;
}

.logoutButton .bang {
  opacity: 0;
  fill: var(--danger-color);
}

.logoutButton .arm1,
.logoutButton .wrist1,
.logoutButton .arm2,
.logoutButton .wrist2,
.logoutButton .leg1,
.logoutButton .calf1,
.logoutButton .leg2,
.logoutButton .calf2 {
  transition: transform calc(var(--walking-duration) * 1ms) ease-in-out;
}

.logoutButton .arm1 {
  transform: var(--transform-arm1);
  transform-origin: 52% 45%;
}

.logoutButton .wrist1 {
  transform: var(--transform-wrist1);
  transform-origin: 59% 55%;
}

.logoutButton .arm2 {
  transform: var(--transform-arm2);
  transform-origin: 47% 43%;
}

.logoutButton .wrist2 {
  transform: var(--transform-wrist2);
  transform-origin: 35% 47%;
}

.logoutButton .leg1 {
  transform: var(--transform-leg1);
  transform-origin: 47% 64.5%;
}

.logoutButton .calf1 {
  transform: var(--transform-calf1);
  transform-origin: 55.5% 71.5%;
}

.logoutButton .leg2 {
  transform: var(--transform-leg2);
  transform-origin: 43% 63%;
}

.logoutButton .calf2 {
  transform: var(--transform-calf2);
  transform-origin: 41.5% 73%;
}

@keyframes spin {
  from {
    transform: rotate(0deg) scale(0.95);
  }
  to {
    transform: rotate(360deg) scale(0.95);
  }
}

@keyframes shake {
  0% {
    transform: rotate(-1.5deg);
  }
  25% {
    transform: rotate(1.5deg);
  }
  50% {
    transform: rotate(-1deg);
  }
  75% {
    transform: rotate(1deg);
  }
  100% {
    transform: rotate(-0.5deg);
  }
}

@keyframes flash {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
  }
}


/* تنسيقات عامة للصفحة */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0255f0 0%, #000000 100%);
  min-height: 100vh;
  direction: rtl;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* ==== تصميم الهيدر الجديد المحسن ==== */
.header {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 250, 251, 0.95) 100%);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 20px 30px;
  margin-bottom: 25px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 
              0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid rgba(2, 85, 240, 0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0255f0 0%, #003566 100%);
  opacity: 0.8;
}

.header:hover {
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.1), 
              0 4px 12px rgba(0, 0, 0, 0.06);
}

.notification-item {
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  background: #ffffff;
}

.notification-item:hover {
  background: linear-gradient(to left, rgba(79, 70, 229, 0.04), transparent);
  transform: translateX(-4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.notification-item:active {
  transform: translateX(-2px);
}

.notification-item.read {
  opacity: 0.65;
}

/* Pulse animation للنقطة الجديدة */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.15);
  }
}

/* Icon pop animation */
@keyframes iconPop {
  0% {
    transform: translateY(-50%) scale(0.5);
    opacity: 0;
  }
  50% {
    transform: translateY(-50%) scale(1.2);
  }
  100% {
    transform: translateY(-50%) scale(1);
    opacity: 1;
  }
}

.suggestion.note-card {
  background: white;
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border-right: 3px solid;
  border-right-color: #ddd;
}

.suggestion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
  color: #888;
}

.suggestion-sender {
  font-weight: bold;
  color: #333;
}

.suggestion-date {
  font-size: 12px;
}

.suggestion-text {
  color: #555;
  line-height: 1.6;
  margin-bottom: 15px;
}

.suggestion-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
}

.badge-boss {
  background: #e0f7fa;
  color: #006064;
}

.badge-manager {
  background: #fff3e0;
  color: #e65100;
}

.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(135deg, #0255f0 0%, #000000 100%);
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%,
  100% {
    background-position: 200% 0;
  }

  50% {
    background-position: -200% 0;
  }
}

/* ==== تصميم اللوجو المحسن ==== */
.logo-container {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 8px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(2, 85, 240, 0.05) 0%, rgba(0, 53, 102, 0.05) 100%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  opacity: 0;
  box-shadow: 0 4px 16px rgba(2, 85, 240, 0.15),
              0 2px 8px rgba(0, 0, 0, 0.08);
  animation: logoFadeIn 0.6s ease-out 0.2s forwards,
             logoPulse 3s ease-in-out 1s infinite,
             logoGlow 2.5s ease-in-out infinite;
}

.logo:hover {
  background: linear-gradient(135deg, rgba(2, 85, 240, 0.12) 0%, rgba(0, 53, 102, 0.1) 100%);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 24px rgba(2, 85, 240, 0.25),
              0 4px 12px rgba(0, 0, 0, 0.12),
              0 0 20px rgba(2, 85, 240, 0.2);
}

.logo:active {
  transform: translateY(-1px) scale(0.98);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(2, 85, 240, 0.25),
              0 2px 8px rgba(0, 0, 0, 0.1),
              0 0 0 3px rgba(2, 85, 240, 0.1);
  position: relative;
}

.logo-icon::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(2, 85, 240, 0.3), rgba(0, 53, 102, 0.2));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
  filter: blur(8px);
}

.logo:hover .logo-icon {
  transform: rotate(360deg) scale(1.12);
  box-shadow: 0 8px 28px rgba(2, 85, 240, 0.4),
              0 4px 12px rgba(0, 0, 0, 0.15),
              0 0 0 4px rgba(2, 85, 240, 0.15);
}

.logo:hover .logo-icon::before {
  opacity: 1;
}

.logo-text {
  font-size: 26px;
  font-weight: 700;
  background: linear-gradient(135deg, #0255f0 0%, #0066ff 50%, #003566 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
  font-family: 'Segoe UI', 'Cairo', sans-serif;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-shadow: 0 2px 4px rgba(2, 85, 240, 0.1);
  animation: textGradientShift 4s ease-in-out infinite;
}

.logo:hover .logo-text {
  letter-spacing: 1.2px;
  background-position: 100% 0;
  text-shadow: 0 4px 8px rgba(2, 85, 240, 0.2);
}

/* Logo Badge */
.logo-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4),
              0 0 0 2px rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0;
  transform: scale(0.8);
  animation: badgeFadeIn 0.8s ease-out 0.5s forwards,
             badgePulse 2s ease-in-out 1.5s infinite;
  z-index: 10;
  white-space: nowrap;
}

@keyframes logoFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes logoPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.01);
  }
}

@keyframes logoGlow {
  0%, 100% {
    box-shadow: 0 4px 16px rgba(2, 85, 240, 0.15),
                0 2px 8px rgba(0, 0, 0, 0.08),
                0 0 0 0 rgba(2, 85, 240, 0.1);
  }
  50% {
    box-shadow: 0 4px 16px rgba(2, 85, 240, 0.2),
                0 2px 8px rgba(0, 0, 0, 0.1),
                0 0 20px rgba(2, 85, 240, 0.15);
  }
}

@keyframes textGradientShift {
  0%, 100% {
    background-position: 0% 0;
  }
  50% {
    background-position: 100% 0;
  }
}

@keyframes badgeFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-5px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4),
                0 0 0 2px rgba(255, 255, 255, 0.9);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 3px 12px rgba(255, 107, 107, 0.6),
                0 0 0 2px rgba(255, 255, 255, 0.9);
  }
}

/* ==== معلومات المستخدم ==== */
.user-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ==== بطاقة المستخدم الجديدة ==== */
.user-profile-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(249, 250, 251, 0.8) 100%);
  border-radius: 50px;
  border: 2px solid rgba(2, 85, 240, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.user-profile-card:hover {
  border-color: rgba(2, 85, 240, 0.3);
  box-shadow: 0 4px 16px rgba(2, 85, 240, 0.15);
  transform: translateY(-2px);
}

.user-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid transparent;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, #0255f0, #003566) border-box;
  transition: all 0.3s ease;
}

.user-profile-card:hover .user-avatar {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(2, 85, 240, 0.3);
}

.user-profile-card .user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.user-profile-card .user-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a202c;
  line-height: 1.2;
  margin-top: 2px;
  text-align: center;
  width: 100%;
}

.user-profile-card .user-role {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  padding: 2px 8px;
  background: linear-gradient(135deg, rgba(2, 85, 240, 0.08) 0%, rgba(0, 53, 102, 0.08) 100%);
  border-radius: 8px;
  display: block;
  width: fit-content;
  text-align: center;
  align-self: center;
}

/* ==== شارة الإشعارات المحسنة ==== */
.notification-badge {
  position: relative;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  color: white;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
  animation: pulse-notification 2s infinite;
}

.notification-badge:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

@keyframes pulse-notification {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
  }
  50% {
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.5);
  }
}

.btn {
  background: linear-gradient(135deg, #0255f0 0%, #000000 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.btn::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;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-success {
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  width: 18%;
}

.btn-success:hover {
  background: linear-gradient(135deg, #5cbf60 0%, #388e3c 100%);
}

.btn-warning {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #ffab00 0%, #ff8f00 100%);
}

.btn-info {
  background: linear-gradient(135deg, #0255f0 0%, #003566 100%);
}

.btn-info:hover {
  background: linear-gradient(135deg, #0366ff 0%, #002244 100%);
}

.btn-danger {
  background: linear-gradient(135deg, #f44336 0%, #c62828 100%);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #ff5555 0%, #d73333 100%);
}

.btn-small {
  font-size: 12px;
  padding: 5px 10px;
  margin-top: 30px;
}

.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.card::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.6s;
}

.card:hover::before {
  left: 100%;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  border-color: rgba(102, 126, 234, 0.3);
}

/* ========================================
   قواعد كروت القرارات - تصميم داكن وجميل
   ======================================== */
  
/* Grid Container للقرارات */
.decisions-grid,
#decisionsContainer.decisions-grid,
div#decisionsContainer.decisions-grid,
.card .decisions-grid,
.card #decisionsContainer.decisions-grid,
div.card div.decisions-grid,
div.card div#decisionsContainer.decisions-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)) !important;
  gap: 24px !important;
  padding: 0 !important;
  width: 100% !important;
}

/* استثناء: منع تطبيق قواعد .card العامة على .decision-card - للشاشات الكبيرة (Desktop) */
@media (min-width: 769px) {
  .decisions-grid .decision-card,
  div.decisions-grid div.decision-card,
  #decisionsContainer .decision-card,
  div#decisionsContainer.decisions-grid div.decision-card,
  .card .decisions-grid .decision-card,
  .card #decisionsContainer .decision-card,
  div.card div.decisions-grid div.decision-card,
  div.card div#decisionsContainer.decisions-grid div.decision-card {
    /* إعادة تعيين الخصائص التي قد ترثها من .card */
    margin-bottom: 0 !important;
    /* تصميم داكن وجميل - Desktop */
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
    border-radius: 16px !important;
    padding: 24px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    display: block !important;
    border: 1px solid rgba(2, 85, 240, 0.2) !important;
    color: #e0e0e0 !important;
  }
  
  .decisions-grid .decision-card:hover,
  div.decisions-grid div.decision-card:hover,
  #decisionsContainer .decision-card:hover,
  .card .decisions-grid .decision-card:hover,
  .card #decisionsContainer .decision-card:hover,
  div.card div.decisions-grid div.decision-card:hover,
  div.card div#decisionsContainer.decisions-grid div.decision-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 40px rgba(2, 85, 240, 0.25), 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(2, 85, 240, 0.4) !important;
  }
  
  .decisions-grid .decision-card::before,
  div.decisions-grid div.decision-card::before,
  #decisionsContainer .decision-card::before,
  .card .decisions-grid .decision-card::before,
  .card #decisionsContainer .decision-card::before,
  div.card div.decisions-grid div.decision-card::before,
  div.card div#decisionsContainer.decisions-grid div.decision-card::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 4px !important;
    height: 100% !important;
    background: transparent !important;
    transition: all 0.4s ease !important;
  }
  
  .decisions-grid .decision-card:hover::before,
  div.decisions-grid div.decision-card:hover::before,
  #decisionsContainer .decision-card:hover::before,
  .card .decisions-grid .decision-card:hover::before,
  .card #decisionsContainer .decision-card:hover::before,
  div.card div.decisions-grid div.decision-card:hover::before,
  div.card div#decisionsContainer.decisions-grid div.decision-card:hover::before {
    background: linear-gradient(180deg, #0255f0 0%, #003566 100%) !important;
    width: 4px !important;
  }
  
  .decisions-grid .decision-title,
  div.decisions-grid div.decision-card .decision-title,
  #decisionsContainer .decision-card .decision-title,
  .card .decisions-grid .decision-card .decision-title,
  .card #decisionsContainer .decision-card .decision-title,
  div.card div.decisions-grid div.decision-card .decision-title,
  div.card div#decisionsContainer.decisions-grid div.decision-card .decision-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #e2e8f0 !important;
    margin: 0 0 12px 0 !important;
    line-height: 1.6 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    transition: color 0.3s ease !important;
  }
  
  .decisions-grid .decision-card:hover .decision-title,
  div.decisions-grid div.decision-card:hover .decision-title,
  #decisionsContainer .decision-card:hover .decision-title,
  .card .decisions-grid .decision-card:hover .decision-title,
  .card #decisionsContainer .decision-card:hover .decision-title,
  div.card div.decisions-grid div.decision-card:hover .decision-title,
  div.card div#decisionsContainer.decisions-grid div.decision-card:hover .decision-title {
    color: #60a5fa !important;
  }
  
  .decisions-grid .decision-content,
  div.decisions-grid div.decision-card .decision-content,
  #decisionsContainer .decision-card .decision-content,
  .card .decisions-grid .decision-card .decision-content,
  .card #decisionsContainer .decision-card .decision-content,
  div.card div.decisions-grid div.decision-card .decision-content,
  div.card div#decisionsContainer.decisions-grid div.decision-card .decision-content {
    color: #cbd5e1 !important;
    font-size: 15px !important;
    line-height: 2.5 !important;
    margin-bottom: 20px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 6 !important;
    line-clamp: 6 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    max-height: 9em !important;
  }
  
  .decisions-grid .decision-card:hover .decision-content,
  div.decisions-grid div.decision-card:hover .decision-content,
  #decisionsContainer .decision-card:hover .decision-content,
  .card .decisions-grid .decision-card:hover .decision-content,
  .card #decisionsContainer .decision-card:hover .decision-content,
  div.card div.decisions-grid div.decision-card:hover .decision-content,
  div.card div#decisionsContainer.decisions-grid div.decision-card:hover .decision-content {
    display: block !important;
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
    max-height: none !important;
    overflow: visible !important;
  }
  
  .decisions-grid .decision-footer,
  div.decisions-grid div.decision-card .decision-footer,
  #decisionsContainer .decision-card .decision-footer,
  .card .decisions-grid .decision-card .decision-footer,
  .card #decisionsContainer .decision-card .decision-footer,
  div.card div.decisions-grid div.decision-card .decision-footer,
  div.card div#decisionsContainer.decisions-grid div.decision-card .decision-footer {
    border-top: 1px solid rgba(2, 85, 240, 0.2) !important;
    padding-top: 16px !important;
    margin-top: auto !important;
    position: relative !important;
  }
  
  .decisions-grid .decision-footer::before,
  div.decisions-grid div.decision-card .decision-footer::before,
  #decisionsContainer .decision-card .decision-footer::before,
  .card .decisions-grid .decision-card .decision-footer::before,
  .card #decisionsContainer .decision-card .decision-footer::before,
  div.card div.decisions-grid div.decision-card .decision-footer::before,
  div.card div#decisionsContainer.decisions-grid div.decision-card .decision-footer::before {
    content: "" !important;
    position: absolute !important;
    top: -2px !important;
    right: 0 !important;
    width: 0 !important;
    height: 2px !important;
    background: linear-gradient(90deg, #0255f0 0%, #003566 100%) !important;
    transition: width 0.4s ease !important;
  }
  
  .decisions-grid .decision-card:hover .decision-footer::before,
  div.decisions-grid div.decision-card:hover .decision-footer::before,
  #decisionsContainer .decision-card:hover .decision-footer::before,
  .card .decisions-grid .decision-card:hover .decision-footer::before,
  .card #decisionsContainer .decision-card:hover .decision-footer::before,
  div.card div.decisions-grid div.decision-card:hover .decision-footer::before,
  div.card div#decisionsContainer.decisions-grid div.decision-card:hover .decision-footer::before {
    width: 100% !important;
  }
  
  .decisions-grid .decision-meta,
  div.decisions-grid div.decision-card .decision-meta,
  #decisionsContainer .decision-card .decision-meta,
  .card .decisions-grid .decision-card .decision-meta,
  .card #decisionsContainer .decision-card .decision-meta,
  div.card div.decisions-grid div.decision-card .decision-meta,
  div.card div#decisionsContainer.decisions-grid div.decision-card .decision-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  
  .decisions-grid .decision-creator,
  div.decisions-grid div.decision-card .decision-creator,
  #decisionsContainer .decision-card .decision-creator,
  .card .decisions-grid .decision-card .decision-creator,
  .card #decisionsContainer .decision-card .decision-creator,
  div.card div.decisions-grid div.decision-card .decision-creator,
  div.card div#decisionsContainer.decisions-grid div.decision-card .decision-creator,
  .decisions-grid .decision-date,
  div.decisions-grid div.decision-card .decision-date,
  #decisionsContainer .decision-card .decision-date,
  .card .decisions-grid .decision-card .decision-date,
  .card #decisionsContainer .decision-card .decision-date,
  div.card div.decisions-grid div.decision-card .decision-date,
  div.card div#decisionsContainer.decisions-grid div.decision-card .decision-date {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 13px !important;
    color: #94a3b8 !important;
    padding: 6px 12px !important;
    background: rgba(2, 85, 240, 0.15) !important;
    border-radius: 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-weight: 500 !important;
  }
  
  .decisions-grid .decision-creator:hover,
  div.decisions-grid div.decision-card .decision-creator:hover,
  #decisionsContainer .decision-card .decision-creator:hover,
  .card .decisions-grid .decision-card .decision-creator:hover,
  .card #decisionsContainer .decision-card .decision-creator:hover,
  div.card div.decisions-grid div.decision-card .decision-creator:hover,
  div.card div#decisionsContainer.decisions-grid div.decision-card .decision-creator:hover,
  .decisions-grid .decision-date:hover,
  div.decisions-grid div.decision-card .decision-date:hover,
  #decisionsContainer .decision-card .decision-date:hover,
  .card .decisions-grid .decision-card .decision-date:hover,
  .card #decisionsContainer .decision-card .decision-date:hover,
  div.card div.decisions-grid div.decision-card .decision-date:hover,
  div.card div#decisionsContainer.decisions-grid div.decision-card .decision-date:hover {
    background: rgba(2, 85, 240, 0.25) !important;
    color: #cbd5e1 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 2px 6px rgba(2, 85, 240, 0.25) !important;
  }
  
  .decisions-grid .decision-card .btn-icon,
  div.decisions-grid div.decision-card .btn-icon,
  #decisionsContainer .decision-card .btn-icon,
  .card .decisions-grid .decision-card .btn-icon,
  .card #decisionsContainer .decision-card .btn-icon,
  div.card div.decisions-grid div.decision-card .btn-icon,
  div.card div#decisionsContainer.decisions-grid div.decision-card .btn-icon {
    background: rgba(2, 85, 240, 0.15) !important;
    border: none !important;
    cursor: pointer !important;
    padding: 10px !important;
    border-radius: 10px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 40px !important;
    min-height: 40px !important;
    color: #94a3b8 !important;
  }
  
  .decisions-grid .decision-card .btn-icon:hover,
  div.decisions-grid div.decision-card .btn-icon:hover,
  #decisionsContainer .decision-card .btn-icon:hover,
  .card .decisions-grid .decision-card .btn-icon:hover,
  .card #decisionsContainer .decision-card .btn-icon:hover,
  div.card div.decisions-grid div.decision-card .btn-icon:hover,
  div.card div#decisionsContainer.decisions-grid div.decision-card .btn-icon:hover {
    background: rgba(2, 85, 240, 0.25) !important;
    transform: scale(1.1) !important;
    color: #60a5fa !important;
  }
  
  .decisions-grid .decision-card .btn-icon:active,
  div.decisions-grid div.decision-card .btn-icon:active,
  #decisionsContainer .decision-card .btn-icon:active,
  .card .decisions-grid .decision-card .btn-icon:active,
  .card #decisionsContainer .decision-card .btn-icon:active,
  div.card div.decisions-grid div.decision-card .btn-icon:active,
  div.card div#decisionsContainer.decisions-grid div.decision-card .btn-icon:active {
    transform: scale(0.95) !important;
  }
  
  .decisions-grid .decision-card .btn-icon[style*="color: #dc3545"],
  div.decisions-grid div.decision-card .btn-icon[style*="color: #dc3545"],
  #decisionsContainer .decision-card .btn-icon[style*="color: #dc3545"],
  .card .decisions-grid .decision-card .btn-icon[style*="color: #dc3545"],
  .card #decisionsContainer .decision-card .btn-icon[style*="color: #dc3545"],
  div.card div.decisions-grid div.decision-card .btn-icon[style*="color: #dc3545"],
  div.card div#decisionsContainer.decisions-grid div.decision-card .btn-icon[style*="color: #dc3545"] {
    color: #dc3545 !important;
    background: rgba(220, 53, 69, 0.15) !important;
  }
  
  .decisions-grid .decision-card .btn-icon[style*="color: #dc3545"]:hover,
  div.decisions-grid div.decision-card .btn-icon[style*="color: #dc3545"]:hover,
  #decisionsContainer .decision-card .btn-icon[style*="color: #dc3545"]:hover,
  .card .decisions-grid .decision-card .btn-icon[style*="color: #dc3545"]:hover,
  .card #decisionsContainer .decision-card .btn-icon[style*="color: #dc3545"]:hover,
  div.card div.decisions-grid div.decision-card .btn-icon[style*="color: #dc3545"]:hover,
  div.card div#decisionsContainer.decisions-grid div.decision-card .btn-icon[style*="color: #dc3545"]:hover {
    background: rgba(220, 53, 69, 0.25) !important;
    color: #dc3545 !important;
  }
  
  .decisions-grid .decision-card .btn-icon svg,
  div.decisions-grid div.decision-card .btn-icon svg,
  #decisionsContainer .decision-card .btn-icon svg,
  .card .decisions-grid .decision-card .btn-icon svg,
  .card #decisionsContainer .decision-card .btn-icon svg,
  div.card div.decisions-grid div.decision-card .btn-icon svg,
  div.card div#decisionsContainer.decisions-grid div.decision-card .btn-icon svg {
    width: 16px !important;
    height: 16px !important;
    stroke: currentColor !important;
    fill: none !important;
    transition: all 0.3s ease !important;
  }
  
  .decisions-grid .decision-actions,
  div.decisions-grid div.decision-card .decision-actions,
  #decisionsContainer .decision-card .decision-actions,
  .card .decisions-grid .decision-card .decision-actions,
  .card #decisionsContainer .decision-card .decision-actions,
  div.card div.decisions-grid div.decision-card .decision-actions,
  div.card div#decisionsContainer.decisions-grid div.decision-card .decision-actions {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    opacity: 0.6 !important;
    transition: opacity 0.3s ease !important;
  }
  
  .decisions-grid .decision-card:hover .decision-actions,
  div.decisions-grid div.decision-card:hover .decision-actions,
  #decisionsContainer .decision-card:hover .decision-actions,
  .card .decisions-grid .decision-card:hover .decision-actions,
  .card #decisionsContainer .decision-card:hover .decision-actions,
  div.card div.decisions-grid div.decision-card:hover .decision-actions,
  div.card div#decisionsContainer.decisions-grid div.decision-card:hover .decision-actions {
    opacity: 1 !important;
  }
  
  .decisions-grid .decision-header,
  div.decisions-grid div.decision-card .decision-header,
  #decisionsContainer .decision-card .decision-header,
  .card .decisions-grid .decision-card .decision-header,
  .card #decisionsContainer .decision-card .decision-header,
  div.card div.decisions-grid div.decision-card .decision-header,
  div.card div#decisionsContainer.decisions-grid div.decision-card .decision-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 16px !important;
    gap: 12px !important;
  }
  
  .decisions-grid .decision-type-badge,
  div.decisions-grid div.decision-card .decision-type-badge,
  #decisionsContainer .decision-card .decision-type-badge,
  .card .decisions-grid .decision-card .decision-type-badge,
  .card #decisionsContainer .decision-card .decision-type-badge,
  div.card div.decisions-grid div.decision-card .decision-type-badge,
  div.card div#decisionsContainer.decisions-grid div.decision-card .decision-type-badge {
    display: inline-flex !important;
    align-items: center !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  
  .decisions-grid .decision-type-badge:hover,
  div.decisions-grid div.decision-card .decision-type-badge:hover,
  #decisionsContainer .decision-card .decision-type-badge:hover,
  .card .decisions-grid .decision-card .decision-type-badge:hover,
  .card #decisionsContainer .decision-card .decision-type-badge:hover,
  div.card div.decisions-grid div.decision-card .decision-type-badge:hover,
  div.card div#decisionsContainer.decisions-grid div.decision-card .decision-type-badge:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
  }
}

/* استثناء: منع تطبيق قواعد .card العامة على .decision-card - للشاشات الصغيرة فقط */
@media (max-width: 768px) {
  .decisions-grid .decision-card,
  div.decisions-grid div.decision-card,
  #decisionsContainer .decision-card,
  div#decisionsContainer.decisions-grid div.decision-card,
  .card .decisions-grid .decision-card,
  .card #decisionsContainer .decision-card,
  div.card div.decisions-grid div.decision-card,
  div.card div#decisionsContainer.decisions-grid div.decision-card {
    /* إعادة تعيين الخصائص التي قد ترثها من .card */
    margin-bottom: 0 !important;
    /* تصميم داكن وجميل - Mobile */
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
    border-radius: 16px !important;
    padding: 24px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(2, 85, 240, 0.2) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    display: block !important;
  }
}

/* Border جانبي ملون - للشاشات الصغيرة فقط */
@media (max-width: 768px) {
  .decisions-grid .decision-card::before,
  div.decisions-grid div.decision-card::before,
  #decisionsContainer .decision-card::before,
  .card .decisions-grid .decision-card::before,
  .card #decisionsContainer .decision-card::before,
  div.card div.decisions-grid div.decision-card::before,
  div.card div#decisionsContainer.decisions-grid div.decision-card::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 4px !important;
    height: 100% !important;
    background: transparent !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 1 !important;
  }

  /* Hover Effects - للشاشات الصغيرة فقط */
  .decisions-grid .decision-card:hover,
  div.decisions-grid div.decision-card:hover,
  #decisionsContainer .decision-card:hover,
  .card .decisions-grid .decision-card:hover,
  .card #decisionsContainer .decision-card:hover,
  div.card div.decisions-grid div.decision-card:hover,
  div.card div#decisionsContainer.decisions-grid div.decision-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 40px rgba(2, 85, 240, 0.25), 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(2, 85, 240, 0.4) !important;
  }

  .decisions-grid .decision-card:hover::before,
  div.decisions-grid div.decision-card:hover::before,
  #decisionsContainer .decision-card:hover::before,
  .card .decisions-grid .decision-card:hover::before,
  .card #decisionsContainer .decision-card:hover::before,
  div.card div.decisions-grid div.decision-card:hover::before,
  div.card div#decisionsContainer.decisions-grid div.decision-card:hover::before {
    background: linear-gradient(180deg, #0255f0 0%, #003566 100%) !important;
    width: 4px !important;
  }
}

/* Header البطاقة - للشاشات الصغيرة فقط */
@media (max-width: 768px) {
  .decisions-grid .decision-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
  }

  /* شارة النوع (قرار/تعليم) - للشاشات الصغيرة فقط */
  .decisions-grid .decision-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    flex-shrink: 0;
  }

  .decisions-grid .decision-type-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  /* أزرار الإجراءات - للشاشات الصغيرة فقط */
  .decisions-grid .decision-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    opacity: 0.6;
    transition: opacity 0.3s ease;
  }

  .decisions-grid .decision-card:hover .decision-actions {
    opacity: 1;
  }

  /* أزرار الأيقونات في البطاقة - للشاشات الصغيرة فقط */
  .decisions-grid .decision-card .btn-icon {
    background: rgba(2, 85, 240, 0.15) !important;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    color: #94a3b8 !important;
  }

  .decisions-grid .decision-card .btn-icon:hover {
    background: rgba(2, 85, 240, 0.25) !important;
    transform: scale(1.1);
    color: #60a5fa !important;
  }

  .decisions-grid .decision-card .btn-icon:active {
    transform: scale(0.95);
  }

  .decisions-grid .decision-card .btn-icon[style*="color: #dc3545"] {
    color: #dc3545 !important;
    background: rgba(220, 53, 69, 0.15) !important;
  }

  .decisions-grid .decision-card .btn-icon[style*="color: #dc3545"]:hover {
    background: rgba(220, 53, 69, 0.25) !important;
    color: #dc3545 !important;
  }

  .decisions-grid .decision-card .btn-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    transition: all 0.3s ease;
  }
}

/* عنوان القرار - للشاشات الصغيرة فقط */
@media (max-width: 768px) {
  .decisions-grid .decision-title {
    font-size: 20px;
    font-weight: 700;
    color: #e2e8f0 !important;
    margin: 0 0 12px 0;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: color 0.3s ease;
  }

  .decisions-grid .decision-card:hover .decision-title {
    color: #60a5fa !important;
  }

  /* محتوى القرار - للشاشات الصغيرة فقط */
  .decisions-grid .decision-content {
    color: #cbd5e1 !important;
    font-size: 15px;
    line-height: 2.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 9em;
  }

  .decisions-grid .decision-card:hover .decision-content {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    max-height: none;
    overflow: visible;
  }
}

/* Footer البطاقة - للشاشات الصغيرة فقط */
@media (max-width: 768px) {
  .decisions-grid .decision-footer {
    border-top: 1px solid rgba(2, 85, 240, 0.2) !important;
    padding-top: 16px;
    margin-top: auto;
    position: relative;
  }

  .decisions-grid .decision-footer::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0255f0 0%, #003566 100%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
  }

  .decisions-grid .decision-card:hover .decision-footer::before {
    width: 100%;
  }

  /* معلومات المبدع والتاريخ - للشاشات الصغيرة فقط */
  .decisions-grid .decision-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
  }

  .decisions-grid .decision-creator,
  .decisions-grid .decision-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #94a3b8 !important;
    padding: 6px 12px;
    background: rgba(2, 85, 240, 0.15) !important;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
  }

  .decisions-grid .decision-creator:hover,
  .decisions-grid .decision-date:hover {
    background: rgba(2, 85, 240, 0.25) !important;
    color: #cbd5e1 !important;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(2, 85, 240, 0.25);
  }

  .decisions-grid .decision-creator svg,
  .decisions-grid .decision-date svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
  }

  .decisions-grid .decision-creator span,
  .decisions-grid .decision-date span {
    white-space: nowrap;
  }
}

/* Responsive Design - Tablet */
@media (max-width: 768px) {
  .decisions-grid,
  #decisionsContainer.decisions-grid,
  div#decisionsContainer.decisions-grid,
  .card .decisions-grid,
  .card #decisionsContainer.decisions-grid,
  div.card div.decisions-grid,
  div.card div#decisionsContainer.decisions-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 20px !important;
  }

  .decisions-grid .decision-card,
  div.decisions-grid div.decision-card,
  #decisionsContainer .decision-card,
  div#decisionsContainer.decisions-grid div.decision-card,
  .card .decisions-grid .decision-card,
  .card #decisionsContainer .decision-card,
  div.card div.decisions-grid div.decision-card,
  div.card div#decisionsContainer.decisions-grid div.decision-card {
    padding: 20px !important;
    border-radius: 14px !important;
  }

  .decisions-grid .decision-title {
    font-size: 18px;
  }

  .decisions-grid .decision-content {
    font-size: 14px;
    -webkit-line-clamp: 5;
    line-clamp: 5;
  }

  .decisions-grid .decision-header {
    margin-bottom: 14px;
  }

  .decisions-grid .decision-type-badge {
    font-size: 12px;
    padding: 5px 12px;
  }

  .decisions-grid .decision-card .btn-icon {
    min-width: 36px;
    min-height: 36px;
    padding: 8px;
  }
}

/* Responsive Design - Mobile */
@media (max-width: 480px) {
  .decisions-grid,
  #decisionsContainer.decisions-grid,
  div#decisionsContainer.decisions-grid,
  .card .decisions-grid,
  .card #decisionsContainer.decisions-grid,
  div.card div.decisions-grid,
  div.card div#decisionsContainer.decisions-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .decisions-grid .decision-card,
  div.decisions-grid div.decision-card,
  #decisionsContainer .decision-card,
  div#decisionsContainer.decisions-grid div.decision-card,
  .card .decisions-grid .decision-card,
  .card #decisionsContainer .decision-card,
  div.card div.decisions-grid div.decision-card,
  div.card div#decisionsContainer.decisions-grid div.decision-card {
    padding: 18px !important;
    border-radius: 12px !important;
  }

  .decisions-grid .decision-card:hover,
  div.decisions-grid div.decision-card:hover,
  #decisionsContainer .decision-card:hover,
  .card .decisions-grid .decision-card:hover,
  .card #decisionsContainer .decision-card:hover,
  div.card div.decisions-grid div.decision-card:hover,
  div.card div#decisionsContainer.decisions-grid div.decision-card:hover {
    transform: translateY(-3px) !important;
  }

  .decisions-grid .decision-title {
    font-size: 17px;
    margin-bottom: 10px;
  }

  .decisions-grid .decision-content {
    font-size: 14px;
    line-height: 1.6;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    margin-bottom: 16px;
  }

  .decisions-grid .decision-header {
    margin-bottom: 12px;
    flex-wrap: wrap;
  }

  .decisions-grid .decision-type-badge {
    font-size: 11px;
    padding: 4px 10px;
  }

  .decisions-grid .decision-actions {
    opacity: 1;
    margin-right: auto;
  }

  .decisions-grid .decision-card .btn-icon {
    min-width: 36px;
    min-height: 36px;
    padding: 8px;
  }

  .decisions-grid .decision-card .btn-icon svg {
    width: 14px;
    height: 14px;
  }

  .decisions-grid .decision-meta {
    gap: 8px;
    align-items: center;
    justify-content: space-between;
  }

  .decisions-grid .decision-creator,
  .decisions-grid .decision-date {
    font-size: 12px;
    padding: 5px 10px;
  }

  .decisions-grid .decision-footer {
    padding-top: 12px;
  }
}

.login-form {
  max-width: 400px;
  margin: 100px auto;
}

.form-group {
  margin-bottom: 20px;
}

/* تعديل على تنسيق الـ Label ليتناسب مع التأثير الجديد */
.input-wrapper label {
  position: absolute;
  top: 50%;
  right: 15px; /* غيرنا 40px إلى 15px ليبدأ من نفس مكان النص */
  transform: translateY(-50%);
  color: #888;
  pointer-events: none;
  transition: all 0.2s ease-in-out;
  background-color: white;
  padding: 0 5px;
}

/* التأثير عند التركيز على الحقل أو عند وجود نص فيه */
.form-control:focus + label,
.form-control:not(:placeholder-shown) + label {
  top: 0;
  font-size: 12px;
  color: #0255f0; /* تغيير اللون ليتناسب مع لون الحدود */
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: #0255f0;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.dashboard {
  display: none;
}

.dashboard.active {
  display: block;
}

/* إخفاء محتوى لوحة التحكم عندما تكون صفحة تسجيل الدخول نشطة */
body.login-page-active .dashboard {
  display: none !important;
  visibility: hidden !important;
}

/* إخفاء أقسام المشرف عندما لا تكون لوحة التحكم نشطة */
body.login-page-active .supervisor-subsection {
  display: none !important;
  visibility: hidden !important;
}

/* التأكد من إخفاء زر إدارة إعدادات التارجت في صفحة تسجيل الدخول */
body.login-page-active #targetSettingsList,
body.login-page-active #employeesTargetList,
body.login-page-active #dailyTargetReport,
body.login-page-active #employeeMonthlyTargetReport,
body.login-page-active #targetSettingsSection,
body.login-page-active #attendanceTab,
body.login-page-active .attendance-container,
body.login-page-active .supervisor-section {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
}

/* التأكد من عدم ظهور أي محتوى من لوحة التحكم في صفحة تسجيل الدخول */
body.login-page-active .tab-content,
body.login-page-active .tabs,
body.login-page-active .nav-tabs {
  display: none !important;
  visibility: hidden !important;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: linear-gradient(135deg, #0255f0 0%, #000000 100%);
  color: white;
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.8);
    opacity: 0;
  }

  50% {
    transform: scale(1);
    opacity: 1;
  }
}

.stat-number {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 5px;
  position: relative;
  z-index: 1;
}

.stat-label {
  font-size: 14px;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.task-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border-right: 4px solid #0255f0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  min-height: 120px;
  width: 100%;
}

/* الوضع المختصر - الافتراضي */
.task-card.collapsed {
  max-height: none;
  overflow: visible;
  transition: all 0.3s ease;
}

/* ضمان عدم كسر السطر في المعلومات السريعة */
.task-card.collapsed .task-quick-info {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
}

.task-card.collapsed .task-quick-info::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* إخفاء العناصر غير الضرورية مع الحفاظ على ملاحظات الإكمال */
.task-card.collapsed
  > *:not(.task-title):not(.task-meta):not(.task-quick-info):not(
    .task-feedback
  ) {
  max-height: 0;
  overflow: hidden;
}

/* الوضع الموسع */
.task-card.expanded {
  max-height: none;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  z-index: 10;
}

/* زر التوسيع/الطي - تم إلغاؤه لأن الكارت بالكامل قابل للضغط */
/*
.expand-toggle {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 5;
}

.expand-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.expand-toggle i {
  color: white;
  font-size: 14px;
  transition: transform 0.3s ease;
}

.task-card.expanded .expand-toggle i {
  transform: rotate(180deg);
}
*/

/* العناصر التي تظهر فقط في الوضع المختصر */
.task-card.collapsed .task-description,
.task-card.collapsed .task-attachments,
.task-card.collapsed .task-comments,
.task-card.collapsed .task-actions,
.task-card.collapsed .task-rating {
  display: none;
}

/* ملاحظات الإكمال تظهر دائماً حتى في الوضع المختصر */
.task-card.collapsed .task-feedback {
  display: block !important;
  margin-top: 10px;
  padding: 10px;
  background: linear-gradient(135deg, #e7f5ff 0%, #d0ebff 100%);
  border-radius: 8px;
  border-right: 3px solid #1c7ed6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.task-card.collapsed .task-feedback .feedback-header {
  font-size: 13px;
  font-weight: bold;
  color: #1864ab;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.task-card.collapsed .task-feedback .feedback-header::before {
  content: "💬";
  font-size: 14px;
}

.task-card.collapsed .task-feedback .feedback-text {
  font-size: 12px;
  color: #0c4a6e;
  line-height: 1.5;
  max-height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* إخفاء التقييم في ملاحظات الإكمال في الوضع المختصر لتوفير المساحة */
.task-card.collapsed .task-feedback .task-rating {
  display: none;
}

/* مؤشر عدد التعليقات والمرفقات في الوضع المختصر */
.task-quick-info {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 15px;
  align-items: center;
  justify-content: flex-start;
  margin-top: 10px;
  margin-bottom: 5px;
  font-size: 13px;
  color: #888;
  width: 100%;
  min-height: 20px;
  line-height: 20px;
}

.task-quick-info .info-item {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-bottom: 0 !important;
  margin-right: 15px;
  vertical-align: middle;
}

.task-quick-info .info-item:last-child {
  margin-right: 0;
}

.task-quick-info .info-item span {
  display: inline !important;
  color: #888;
  white-space: nowrap;
  vertical-align: middle;
}

.task-quick-info .info-item i {
  color: #0255f0;
  font-size: 14px;
  display: inline-block !important;
  vertical-align: middle;
}

/* إخفاء المعلومات السريعة في الوضع الموسع */
.task-card.expanded .task-quick-info {
  display: none;
}

/* تحسينات للشاشات الصغيرة - لضمان البقاء على نفس السطر */
@media (max-width: 768px) {
  .task-quick-info {
    gap: 10px !important;
    font-size: 12px;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
  }

  .task-quick-info .info-item {
    gap: 3px;
    display: inline-flex !important;
  }

  .task-quick-info .info-item i {
    font-size: 12px;
  }

  .task-quick-info .info-item span {
    font-size: 11px;
    display: inline !important;
  }
}

/* للشاشات الصغيرة جداً */
@media (max-width: 480px) {
  .task-quick-info {
    gap: 8px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
  }

  .task-quick-info .info-item span {
    font-size: 10px;
    display: inline !important;
  }
}

/* تحسين المظهر في الوضع المختصر */
.task-card.collapsed .task-title {
  font-size: 16px;
  margin-bottom: 8px;
  padding-left: 0;
}

.task-card.collapsed .task-meta {
  margin-bottom: 8px;
  font-size: 13px;
}

.task-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(135deg, #0255f0 0%, #000000 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.task-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.02),
    rgba(118, 75, 162, 0.02)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.task-card:hover::before {
  transform: scaleX(1);
}

.task-card:hover::after {
  opacity: 1;
}

.task-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  border-color: rgba(102, 126, 234, 0.3);
}

.task-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
}

.task-description {
  color: #666;
  margin-bottom: 15px;
  line-height: 1.5;
  direction: rtl;
  text-align: right;
  font-family: 'Segoe UI', 'Cairo', 'Tahoma', Arial, sans-serif;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  unicode-bidi: embed;
}

.task-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 14px;
  color: #888;
}

.task-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-in_progress {
  background: #d1ecf1;
  color: #0c5460;
}

.status-completed {
  background: #d4edda;
  color: #155724;
}

.task-feedback {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  margin-top: 15px;
  border-left: 4px solid #28a745;
}

.feedback-header {
  font-weight: bold;
  color: #28a745;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback-header::before {
  content: "💬";
}

.feedback-text {
  color: #495057;
  margin-bottom: 10px;
}

.feedback-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attachment-item {
  background: #e9ecef;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 12px;
  color: #495057;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.attachment-item:hover {
  background: #dee2e6;
  transform: scale(1.05);
}

.modal {
  display: none; /* إخفاء افتراضي */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 30px;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close {
  color: #aaa;
  float: left;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover {
  color: #333;
}

.alert {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 8px;
  font-weight: 500;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.hidden {
  display: none !important;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.tabs {
  display: flex;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 5px;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.tab {
  flex: 1;
  padding: 12px 16px;
  text-align: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: white;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* لا نحتاج تأثير التموج القديم لأنه يتعارض مع التأثيرات الأخرى */

.tab.active {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.15) 100%
  );
  backdrop-filter: blur(10px);
  box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.1);
}

/* تحسين الأيقونات */
.tab svg {
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  position: relative;
  z-index: 2;
}

.tab:hover svg {
  transform: scale(1.15) rotate(5deg);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)) brightness(1.2);
}

.tab.active svg {
  animation: iconPulse 2s infinite;
  filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.4)) brightness(1.1);
}

/* إضافة توهج عند hover */
.tab:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* تأثير دائرة صغيرة خلف الأيقونة عند hover - فقط للتبويبات غير النشطة */
.tab:not(.active):hover {
  position: relative;
}

.tab:not(.active):hover svg {
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.5));
}

@keyframes glowPulse {
  0% {
    width: 0;
    height: 0;
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    width: 45px;
    height: 45px;
    opacity: 0;
  }
}

@keyframes iconPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

/* تأثيرات خاصة لكل تبويب */
.tab[data-tab="allTasks"]:hover svg {
  animation: checkMark 0.5s ease;
}

@keyframes checkMark {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.9) rotate(-10deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}

.tab[data-tab="notifications"]:hover svg {
  animation: bellRing 0.5s ease infinite;
}

@keyframes bellRing {
  0%,
  100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-10deg);
  }
  75% {
    transform: rotate(10deg);
  }
}

.tab[data-tab="users"]:hover svg {
  animation: usersBounce 0.5s ease;
}

@keyframes usersBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.tab[data-tab="suggestions"]:hover svg {
  animation: lightBulb 0.5s ease;
}

@keyframes lightBulb {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 transparent);
  }
  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8));
  }
}

.tab[data-tab="polls"]:hover svg {
  animation: chartGrow 0.5s ease;
}

@keyframes chartGrow {
  0% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(1.1);
  }
  100% {
    transform: scaleY(1);
  }
}

.tab[data-tab="messages"]:hover svg {
  animation: messagePop 0.5s ease;
}

@keyframes messagePop {
  0% {
    transform: scale(1) rotate(0);
  }
  25% {
    transform: scale(1.2) rotate(-5deg);
  }
  50% {
    transform: scale(1.1) rotate(5deg);
  }
  75% {
    transform: scale(1.15) rotate(-3deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}

.tab[data-tab="notes"]:hover svg {
  animation: notesFlip 0.6s ease;
}

@keyframes notesFlip {
  0% {
    transform: perspective(400px) rotateY(0);
  }
  50% {
    transform: perspective(400px) rotateY(180deg);
  }
  100% {
    transform: perspective(400px) rotateY(360deg);
  }
}

/* تأثير الخط المتوهج تحت التبويب النشط - ثابت وليس متحرك لتجنب المشاكل */
.tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 20%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0.4) 80%,
    transparent 100%
  );
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
  pointer-events: none;
  z-index: 10;
}

/* خط متحرك اختياري - يمكن تفعيله بإضافة class animated-line */
.tab.active.animated-line::after {
  animation: glowLineSubtle 3s ease-in-out infinite;
}

@keyframes glowLineSubtle {
  0%,
  100% {
    opacity: 0.7;
    width: 50%;
  }
  50% {
    opacity: 1;
    width: 80%;
  }
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  }

  .tabs::-webkit-scrollbar {
    height: 4px;
  }

  .tabs::-webkit-scrollbar-track {
    background: transparent;
  }

  .tabs::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
  }

  .tab {
    min-width: 120px;
    font-size: 14px;
    padding: 10px 12px;
  }

  .tab svg {
    width: 18px;
    height: 18px;
  }
}

.file-upload-area {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  margin-top: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.file-upload-area:hover {
  border-color: #0255f0;
  background-color: #f8f9fa;
}

.file-upload-area.dragover {
  border-color: #0255f0;
  background-color: #e3f2fd;
}

.file-list {
  margin-top: 10px;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 5px;
  margin-bottom: 5px;
}

.file-item .remove-file {
  color: #dc3545;
  cursor: pointer;
  font-weight: bold;
}

.search-box {
  position: relative;
  margin-bottom: 20px;
}

.search-box input {
  width: 100%;
  padding: 12px 40px 12px 12px;
  border: 2px solid #e1e5e9;
  border-radius: 25px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: #082ac2;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-box::after {
  content: "🔍";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
}

.filter-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.priority-high {
  border-left-color: #dc3545 !important;
}

.priority-medium {
  border-left-color: #ffc107 !important;
}

.priority-low {
  border-left-color: #28a745 !important;
}

.task-priority {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
}

.priority-high-badge {
  background: #ffebee;
  color: #c62828;
}

.priority-medium-badge {
  background: #fff8e1;
  color: #f57c00;
}

.priority-low-badge {
  background: #e8f5e8;
  color: #2e7d32;
}

.rating-stars .star {
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 2px;
}

.rating-stars .star:hover,
.rating-stars .star.active {
  transform: scale(1.2);
  filter: brightness(1.2);
}

.rating-stars .star.inactive {
  opacity: 0.3;
}

.task-rating {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ===================================================== */
/* ==== بداية الكود النهائي لتنسيق الأزرار (الحل المضمون) ==== */
/* ===================================================== */

.task-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap; /* اسمح بالالتفاف في الشاشات الصغيرة جداً */
  gap: 10px; /* مسافة ثابتة بين الأزرار */
  align-items: center; /* محاذاة عمودية للأزرار */
}

/*
 * هذا هو الجزء الأهم:
 * استهداف كل الأبناء المباشرين (الأزرار) وتطبيق هذه الخصائص عليهم
 */
.task-actions > * {
  flex: 1 1 auto; /* اجعلهم مرنين في العرض */
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 40px; /* ارتفاع موحد لكل الأزرار */
  max-height: 40px; /* حد أقصى للارتفاع */
  box-sizing: border-box;
  margin: 0 !important; /* إزالة أي هوامش افتراضية بقوة */
  padding: 8px 12px; /* حشو موحد */
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap; /* منع كسر النص */
  vertical-align: middle; /* محاذاة عمودية */
}

/* تعديل خاص لأزرار btn لإزالة margin-top */
.task-actions .btn {
  margin-top: 0 !important;
}

/* تعديل بسيط لزر الحذف ليتناسب مع الأيقونة */
.task-actions .button-delete {
  padding: 8px 12px !important; /* نفس الحشو للأزرار الأخرى */
  height: 40px; /* نفس الارتفاع */
}

/* ===================================================== */
/* ====/* ==================== إعدادات التارجت للموظفين ==================== */
.target-settings-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
  margin-bottom: 25px;
  animation: slideInRight 0.3s ease;
}

.target-settings-controls .btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.target-settings-controls .btn-primary {
  background: rgba(255, 255, 255, 0.95);
  color: #0255f0;
}

.target-settings-controls .btn-primary:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* زر "إضافة إعدادات جديدة" */
.target-settings-controls .btn-success {
  display: none;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  white-space: nowrap;
  width: auto !important;
  min-width: fit-content;
  padding: 10px 20px;
  flex-shrink: 0;
}

.target-settings-controls .btn-success:hover {
  background: linear-gradient(135deg, #20c997, #28a745);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.confirm-dialog {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.confirm-dialog .confirm-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
}

.confirm-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

/* User Management Styles */
.user-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 15px;
}

.user-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.user-info-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-details {
  flex: 1;
}

.user-name {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin-bottom: 5px;
}

.user-role {
  color: #666;
  font-size: 14px;
  margin-bottom: 5px;
}

.user-status {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
}

.status-active {
  background: #0059ff;
  color: #000000;
}

.status-inactive {
  background: #f8d7da;
  color: #721c24;
}

.user-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.role-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
}

.role-boss {
  background: #e3f2fd;
  color: #1565c0;
}

.role-manager {
  background: #fff3e0;
  color: #ef6c00;
}

.role-employee {
  background: #f3e5f5;
  color: #7b1fa2;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  border: 1px solid #f5c6cb;
  text-align: center;
}

/*        .backend-status {
            background: #fff3cd;
            color: #856404;
            padding: 15px;
            border-radius: 8px;
            margin: 20px 0;
            border: 1px solid #ffeaa7;
            text-align: center;
            font-weight: 500;
        }*/

/* ==== تنسيقات responsive للموبايل ==== */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 15px;
    padding: 15px 20px;
    border-radius: 15px;
    align-items: center;
  }
  
  .logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  
  .logo-container .logo {
    padding: 8px 16px;
    gap: 12px;
  }
  
  .logo-icon {
    width: 42px;
    height: 42px;
  }
  
  .logo-text {
    font-size: 22px;
  }
  
  .logo-badge {
    font-size: 9px;
    padding: 2px 6px;
    top: -5px;
    right: -5px;
  }
  
  .user-info {
    gap: 10px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .user-profile-card {
    padding: 6px 12px;
    gap: 8px;
  }
  
  .user-avatar {
    width: 38px;
    height: 38px;
    border-width: 2px;
  }
  
  .user-profile-card .user-details {
    min-width: 90px;
    align-items: center;
    justify-content: center;
  }
  
  .user-profile-card .user-name {
    font-size: 13px;
    text-align: center;
    width: 100%;
  }
  
  .user-profile-card .user-role {
    font-size: 11px;
    padding: 1px 6px;
    align-self: center;
  }
  
  /* إخفاء notification badge من الهيدر على الموبايل */
  /* mobile nav bar يحتوي على عداد الإشعارات بالفعل */
  .header .notification-badge {
    display: none !important;
  }
  
  .logoutButton {
    padding: 8px 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  
  .logoutButton .button-text {
    transform: translateX(-5px);
    text-align: center;
    right: auto;
  }

  .stats {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .tasks-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95%;
    margin: 10% auto;
    padding: 20px;
  }

  .task-actions {
    justify-content: center;
  }

  .user-info-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .user-actions {
    width: 100%;
    justify-content: center;
  }

  /* إصلاح تنسيق أزرار إعدادات التارجت على الموبايل */
  .target-settings-controls {
    flex-direction: column;
    gap: 12px;
    padding: 15px;
  }
  
  .target-settings-controls .btn {
    width: 100%;
    margin: 0 !important;
  }
}

/* أنماط زر عرض المرفقات */
.task-attachments-summary {
  margin-top: 10px;
  text-align: center;
}

.task-attachments-summary .btn-primary {
  background-color: #007bff; /* لون أزرق مناسب */
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.task-attachments-summary .btn-primary:hover {
  background-color: #0056b3;
}

/* أنماط النافذة المنبثقة للمرفقات (attachmentsModal) */
/* هذه الأنماط ستكمل الأنماط العامة لـ .modal و .modal-content الموجودة بالفعل */
#attachmentsModal .modal-content {
  max-width: 500px; /* عرض أقصى للنافذة */
}

#attachmentsModal .file-list {
  max-height: 300px; /* ارتفاع أقصى لقائمة الملفات */
  overflow-y: auto; /* إضافة شريط تمرير إذا زادت الملفات */
  border: 1px solid #eee;
  padding: 10px;
  border-radius: 5px;
  background-color: #f9f9f9;
}

#attachmentsModal .file-item {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

#attachmentsModal .file-item:last-child {
  border-bottom: none;
}

#attachmentsModal .file-icon {
  font-size: 18px;
  margin-left: 10px; /* مسافة بين الأيقونة واسم الملف */
}

#attachmentsModal .file-name {
  flex-grow: 1;
  font-size: 15px;
  color: #333;
}

#attachmentsModal .btn-info {
  background-color: #17a2b8; /* لون أزرق فاتح لزر العرض */
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 13px;
  transition: background-color 0.3s ease;
}

#attachmentsModal .btn-info:hover {
  background-color: #138496;
}

/* أنماط تمييز المهمة عند النقر على إشعار */
.task-card.notification-highlight {
  animation: notificationGlow 2s ease-in-out;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  border: 2px solid #7dd3fc;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.25), 0 4px 12px rgba(56, 189, 248, 0.15);
  transform: scale(1.01);
  position: relative;
  z-index: 10;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes notificationGlow {
  0% {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2), 0 2px 8px rgba(56, 189, 248, 0.1);
    border-color: #7dd3fc;
    transform: scale(1);
  }
  25% {
    background: linear-gradient(135deg, #bae6fd 0%, #7dd3fc 100%);
    box-shadow: 0 0 35px rgba(56, 189, 248, 0.35), 0 6px 16px rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    transform: scale(1.015);
  }
  50% {
    background: linear-gradient(135deg, #bae6fd 0%, #7dd3fc 100%);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.3), 0 5px 14px rgba(56, 189, 248, 0.18);
    border-color: #38bdf8;
    transform: scale(1.01);
  }
  75% {
    background: linear-gradient(135deg, #bae6fd 0%, #7dd3fc 100%);
    box-shadow: 0 0 35px rgba(56, 189, 248, 0.35), 0 6px 16px rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    transform: scale(1.015);
  }
  100% {
    background: transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: transparent;
    transform: scale(1);
  }
}

/* تمييز القرارات والتعليمات عند النقر على الإشعار */
.decision-card.notification-highlight {
  animation: decisionNotificationGlow 2s ease-in-out;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border: 2px solid #64b5f6;
  box-shadow: 0 0 25px rgba(2, 85, 240, 0.25), 0 4px 12px rgba(2, 85, 240, 0.15);
  transform: scale(1.01);
  position: relative;
  z-index: 10;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes decisionNotificationGlow {
  0% {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    box-shadow: 0 0 20px rgba(2, 85, 240, 0.2), 0 2px 8px rgba(2, 85, 240, 0.1);
    border-color: #64b5f6;
    transform: scale(1);
  }
  25% {
    background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
    box-shadow: 0 0 35px rgba(2, 85, 240, 0.35), 0 6px 16px rgba(2, 85, 240, 0.2);
    border-color: #42a5f5;
    transform: scale(1.015);
  }
  50% {
    background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
    box-shadow: 0 0 30px rgba(2, 85, 240, 0.3), 0 5px 14px rgba(2, 85, 240, 0.18);
    border-color: #42a5f5;
    transform: scale(1.01);
  }
  75% {
    background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
    box-shadow: 0 0 35px rgba(2, 85, 240, 0.35), 0 6px 16px rgba(2, 85, 240, 0.2);
    border-color: #42a5f5;
    transform: scale(1.015);
  }
  100% {
    background: transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: transparent;
    transform: scale(1);
  }
}

/* تمييز خاص للتعليمات (أخضر) */
.decision-card.notification-highlight[data-decision-type="instruction"] {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border: 2px solid #81c784;
  box-shadow: 0 0 25px rgba(40, 167, 69, 0.25), 0 4px 12px rgba(40, 167, 69, 0.15);
  animation: instructionNotificationGlow 2s ease-in-out;
}

@keyframes instructionNotificationGlow {
  0% {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.2), 0 2px 8px rgba(40, 167, 69, 0.1);
    border-color: #81c784;
    transform: scale(1);
  }
  25% {
    background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
    box-shadow: 0 0 35px rgba(40, 167, 69, 0.35), 0 6px 16px rgba(40, 167, 69, 0.2);
    border-color: #66bb6a;
    transform: scale(1.015);
  }
  50% {
    background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
    box-shadow: 0 0 30px rgba(40, 167, 69, 0.3), 0 5px 14px rgba(40, 167, 69, 0.18);
    border-color: #66bb6a;
    transform: scale(1.01);
  }
  75% {
    background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
    box-shadow: 0 0 35px rgba(40, 167, 69, 0.35), 0 6px 16px rgba(40, 167, 69, 0.2);
    border-color: #66bb6a;
    transform: scale(1.015);
  }
  100% {
    background: transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: transparent;
    transform: scale(1);
  }
}

/* تحسين مظهر عناصر الإشعارات لتكون قابلة للنقر */
.notification-item {
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.notification-item:hover {
  background-color: rgba(52, 152, 219, 0.1);
  transform: translateX(-5px);
}


/* أسلوب خاص لاسم منشئ المهمة في الإشعارات */
.notification-item .creator-name {
  color: #007bff;
  font-weight: bold;
  background: linear-gradient(45deg, #007bff, #0056b3);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 2px rgba(0, 123, 255, 0.1);
}

.notification-item .task-assignment-text {
  color: #555;
  margin-top: 5px;
  display: block;
}

/* ============================================= */
/* أنماط الهيكل التنظيمي الجديدة */
/* ============================================= */

/* العرض الهيكلي للمستخدمين */
.hierarchy-section {
  margin-bottom: 25px;
}

.hierarchy-title {
  color: #333;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 3px solid #007bff;
}

.hierarchy-card {
  background: white;
  border-radius: 10px;
  padding: 12px 15px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  margin-bottom: 10px;
  transition: all 0.3s ease;
  border: 1px solid #e0e6ed;
}

.hierarchy-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* بطاقة المدير الرئيسي */
.boss-card {
  background: linear-gradient(135deg, #0255f0 0%, #000000 100%);
  color: white;
  border: none;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.boss-card .user-name,
.boss-card .user-email {
  color: white !important;
}

/* بطاقة نائب المدير */
.deputy-card {
  background: linear-gradient(135deg, #0255f0 0%, #000000 100%);
  color: white;
  border: none;
  box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
}

.deputy-card .user-name,
.deputy-card .user-email {
  color: white !important;
}

/* بطاقة المشرف */
.manager-card {
  background: linear-gradient(135deg, #0255f0 0%, #000000 100%);
  color: white;
  border: none;
  transition: all 0.3s ease;
  padding: 10px 12px;
}

.manager-card:hover {
  box-shadow: 0 6px 15px rgba(79, 172, 254, 0.3);
}

.manager-card .user-name,
.manager-card .user-email {
  color: white !important;
}

/* رأس بطاقة المشرف */
.manager-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.manager-stats {
  display: flex;
  align-items: center;
  gap: 15px;
}

.employee-count {
  font-size: 14px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  padding: 5px 10px;
  border-radius: 20px;
}

.expand-icon {
  font-size: 16px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

/* حاوية المشرف والموظفين */
.hierarchy-manager-container {
  margin-bottom: 20px;
}

/* حاوية الموظفين */
.employees-container {
  margin-left: 30px;
  margin-top: 10px;
  padding-left: 20px;
  border-left: 3px solid #3498db;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 1000px;
  }
}

/* بطاقة الموظف */
.employee-card {
  background: #f8f9fa;
  border-left: 4px solid #0255f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.employee-card:hover {
  background: #fff;
  border-left-color: #000000;
}

/* معلومات المستخدم في الهيكل */
.hierarchy-card .user-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-grow: 1;
}

.hierarchy-card .user-name {
  font-size: 15px;
  font-weight: 600;
  color: #2c3e50;
}

.hierarchy-card .user-email {
  font-size: 12px;
  color: #7f8c8d;
  opacity: 0.9;
}

/* حالة المستخدم في الهيكل */
.hierarchy-card .user-status {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.hierarchy-card .user-status.status-active {
  background: #0059ff;
  color: black;
}

.hierarchy-card .user-status.status-inactive {
  background: #f8d7da;
  color: #721c24;
}

/* أزرار الإجراءات في الهيكل */
.hierarchy-card .user-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hierarchy-card .user-actions button {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 5px;
  white-space: nowrap;
}

.hierarchy-card .user-actions .btn-small {
  min-width: auto;
}

/* رسالة عدم وجود موظفين */
.no-employees {
  text-align: center;
  color: #95a5a6;
  font-style: italic;
  padding: 20px;
  background: #ecf0f1;
  border-radius: 8px;
}

/* زر التبديل بين العرض العادي والهيكلي */
.btn-secondary {
  background: linear-gradient(135deg, #0255f0 0%, #000000 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* تأثيرات تفاعلية */
.hierarchy-card {
  position: relative;
  overflow: hidden;
}

.hierarchy-card::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;
}
.hierarchy-card:hover::before {
  left: 100%;
}

/* تحسينات إضافية لعرض الوصف في الشاشات الصغيرة */
@media (max-width: 768px) {
  .poll-description {
    font-size: 13px;
    -webkit-line-clamp: 2; /* عدد أسطر أقل في الشاشات الصغيرة */
    line-clamp: 2;
  }

  .poll-modal-description {
    font-size: 13px;
    padding: 8px 12px;
  }

  .poll-view-modal {
    width: 95%;
    max-width: none;
  }

  .employees-container {
    margin-left: 15px;
    padding-left: 10px;
  }

  .manager-header {
    flex-direction: column;
    gap: 10px;
  }

  .hierarchy-card {
    padding: 12px 15px;
  }
}

/* ========================================
   أنماط نظام الاستفتاءات (Polls System)
   ======================================== */

/* حاوية الاستفتاءات الرئيسية */
.polls-container {
  padding: 20px;
  background: #f5f7fa;
  border-radius: 12px;
  min-height: 600px;
}

/* رأس قسم الاستفتاءات */
.polls-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e2e8f0;
}

.polls-header h2 {
  color: #2d3748;
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

/* أزرار الفلترة */
.polls-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 20px;
  color: #4a5568;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.filter-btn:hover {
  background: #f7fafc;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-btn.active {
  background: linear-gradient(135deg, #0255f0 0%, #000000 100%);
  color: white;
}

/* إحصائيات الاستفتاءات */
.polls-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.polls-stats .stat-card {
  background: white;
  border-radius: 10px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease;
}

.polls-stats .stat-card:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 5px 15px rgba(2, 85, 240, 0.25);
  z-index: 1;
}

.setting-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.polls-stats .stat-info {
  flex: 1;
}

.polls-stats .stat-number {
  font-size: 28px;
  font-weight: bold;
  color: #2d3748;
  line-height: 1;
}

.polls-stats .stat-label {
  font-size: 13px;
  color: #718096;
  margin-top: 4px;
}

/* قائمة الاستفتاءات */
.polls-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* بطاقة الاستفتاء */
.poll-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  position: relative;
  overflow: visible; /* تغيير من hidden لعرض الوصف الكامل عند hover */
}

.poll-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  z-index: 10; /* للتأكد من ظهور الوصف الموسع فوق البطاقات الأخرى */
}

.poll-card.voted {
  border-left: 4px solid #48bb78;
}

.poll-card.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #48bb78, #38a169);
}

.poll-card.closed::before {
  background: linear-gradient(90deg, #f56565, #e53e3e);
}

/* رأس البطاقة */
.poll-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 12px;
}

.poll-title {
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
  margin: 0;
  flex: 1;
}

.poll-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.poll-status.active {
  background: #c6f6d5;
  color: #22543d;
}

.poll-status.closed {
  background: #fed7d7;
  color: #742a2a;
}

/* وصف الاستفتاء */
.poll-description {
  color: #4a5568;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 15px;
  /* خصائص لكسر النص الطويل */
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  max-width: 100%;
  /* إضافة حد أقصى للأسطر في البطاقات */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3; /* الخاصية القياسية للتوافق */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  /* انتقال سلس عند التوسع */
  transition: all 0.3s ease;
}

/* عرض الوصف الكامل عند المرور بالماوس أو في الوضع الموسع */
.poll-description.expanded,
.poll-description:hover {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
  max-height: none;
}

/* معلومات الاستفتاء */
.poll-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #718096;
}

.poll-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* مؤشر التصويت المجهول */
.poll-anonymous {
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* قائمة المصوتين */
.voters-list {
  margin-top: 10px;
  padding: 10px;
  background: #f0f4f8;
  border-radius: 6px;
  border-left: 3px solid #4299e1;
}

.loading-voters {
  text-align: center;
  padding: 15px;
  color: #718096;
  font-size: 14px;
}

.voters-list-content {
  max-height: 300px;
  overflow-y: auto;
}

.voters-list-content h6,
.voters-header {
  color: #2d3748;
  font-size: 14px;
  margin-bottom: 10px;
  font-weight: 600;
}

.voters-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.voter-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
  font-size: 13px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s;
}

.voter-item:hover {
  transform: translateX(5px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.voter-item i {
  color: #4299e1;
  margin-left: 8px;
}

.voter-name {
  flex: 1;
  font-weight: 500;
  color: #2d3748;
}

.voter-date {
  color: #a0aec0;
  font-size: 11px;
  margin-right: 8px;
}

.voter-comment {
  margin-top: 5px;
  padding: 5px;
  background: #f7fafc;
  border-radius: 4px;
  color: #4a5568;
  font-size: 12px;
  font-style: italic;
}

.no-voters {
  text-align: center;
  padding: 15px;
  color: #a0aec0;
  font-style: italic;
}

.show-voters-btn {
  margin-top: 8px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  color: #4a5568;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.show-voters-btn:hover {
  background: #f7fafc;
  border-color: #4299e1;
  color: #4299e1;
  border-color: #4299e1;
  color: #2b6cb0;
}

/* نتائج الاستفتاء */
.poll-results {
  margin: 15px 0;
  padding: 15px;
  background: #f7fafc;
  border-radius: 8px;
}

.poll-result-item {
  margin-bottom: 12px;
}

.poll-result-item:last-child {
  margin-bottom: 0;
}

.result-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 14px;
}

.result-text {
  color: #2d3748;
  font-weight: 500;
}

.result-stats {
  color: #718096;
  font-size: 12px;
}

.result-bar-container {
  width: 100%;
  height: 24px;
  background: #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.result-bar {
  height: 100%;
  background: linear-gradient(90deg, #4299e1, #3182ce);
  border-radius: 12px;
  transition: width 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  color: white;
  font-size: 11px;
  font-weight: 600;
}

/* أزرار الإجراءات */
.poll-actions {
  display: flex;
  gap: 8px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e2e8f0;
}

.poll-actions .btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* نافذة إنشاء الاستفتاء */
.poll-modal {
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.poll-modal h3 {
  margin-bottom: 20px;
  color: #2d3748;
}

/* خيارات الاستفتاء */
.poll-options-container {
  margin-bottom: 10px;
}

.poll-option-item {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}

.poll-option-input {
  flex: 1;
}

.remove-option {
  padding: 6px 12px;
  font-size: 12px;
}

/* إعدادات الاستفتاء */
.poll-settings {
  background: #f7fafc;
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
}

.poll-settings h4 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #2d3748;
  font-size: 16px;
}

.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.form-row .form-group {
  flex: 1;
}

.form-check {
  margin-bottom: 8px;
}

.form-check-input {
  margin-right: 8px;
}

.form-check-label {
  cursor: pointer;
}

/* نافذة عرض الاستفتاء */
.poll-view-modal {
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.poll-modal-description {
  color: #4a5568;
  margin-bottom: 20px;
  margin-top: 15px;
  line-height: 1.8;
  /* خصائص لكسر النص الطويل */
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  max-width: 100%;
  /* السماح بعرض النص الكامل في النوافذ */
  padding: 10px 15px;
  background: #f7fafc;
  border-radius: 8px;
  border-right: 3px solid #4299e1;
  font-size: 14px;
  /* التأكد من عدم خروج النص من النافذة */
  box-sizing: border-box;
}

/* خيارات التصويت */
.poll-options-vote {
  margin: 20px 0;
}

.poll-option-label {
  display: block;
  padding: 12px 15px;
  margin-bottom: 10px;
  background: #f7fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.poll-option-label:hover {
  background: #edf2f7;
  border-color: #cbd5e0;
}

.poll-option-label input[type="radio"],
.poll-option-label input[type="checkbox"] {
  margin-right: 10px;
}

.poll-option-label input:checked + .option-text {
  font-weight: 600;
  color: #2b6cb0;
}

.option-text {
  color: #2d3748;
}

/* تفاصيل الاستفتاء */
.poll-details {
  padding: 20px;
}

.poll-info {
  background: #f7fafc;
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
}

.info-item {
  margin-bottom: 10px;
  font-size: 14px;
  color: #4a5568;
}

.info-item strong {
  color: #2d3748;
  margin-left: 5px;
}

/* رسالة عدم وجود استفتاءات */
.no-polls {
  text-align: center;
  padding: 60px 20px;
  color: #718096;
}

.no-polls p {
  font-size: 16px;
  margin-top: 10px;
}

/* أنماط التعليقات في الاستفتاءات */
.poll-comments-section {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid #e2e8f0;
}

.poll-comments-section h4 {
  color: #2d3748;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.poll-comments-container {
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 15px;
}

.comment-item {
  background: white;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

.comment-item:hover {
  transform: translateX(5px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.comment-author {
  color: #4a5568;
  font-weight: 600;
  font-size: 14px;
}

.comment-date {
  color: #a0aec0;
  font-size: 12px;
  font-style: italic;
}

.comment-text {
  color: #2d3748;
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
}

.comment-replies {
  margin-top: 10px;
  margin-right: 20px;
  padding-right: 15px;
  border-right: 2px solid #e2e8f0;
}

.add-comment-section {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.add-comment-section .form-group {
  margin-bottom: 10px;
}

.add-comment-section textarea {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px;
  font-size: 14px;
  resize: vertical;
  transition: border-color 0.3s ease;
}

.add-comment-section textarea:focus {
  border-color: #4299e1;
  outline: none;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.add-comment-section button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.add-comment-section button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* تحسينات الاستجابة */
@media (max-width: 768px) {
  .polls-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .polls-list {
    grid-template-columns: 1fr;
  }

  .polls-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row {
    flex-direction: column;
  }

  .poll-actions {
    flex-direction: column;
  }

  .poll-actions .btn {
    width: 100%;
  }
}

/* ==================== نظام الملاحظات الشخصية ==================== */
#personalNotesSection {
  display: none;
  padding: 20px;
  background: #f8f9fa;
  min-height: 500px;
}

#personalNotesSection.active {
  display: block;
}

.notes-container {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.notes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: linear-gradient(135deg, #0255f0 0%, #1a1a1a 100%);
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(2, 85, 240, 0.15);
  color: white;
}

.notes-header h2 {
  font-size: 28px;
  font-weight: 600;
  margin: 0;
}

.notes-actions {
  display: flex;
  gap: 10px;
}

.notes-search-bar {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(2, 85, 240, 0.1);
  display: none;
}

.notes-search-bar.show {
  display: block;
  animation: slideDown 0.3s ease;
}

.search-input-group {
  display: flex;
  gap: 10px;
}

.search-input-group input {
  flex: 1;
}

/* إحصائيات الملاحظات */
.notes-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.notes-stats .stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(2, 85, 240, 0.1);
}

.notes-stats .stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(2, 85, 240, 0.2);
  border-color: rgba(2, 85, 240, 0.3);
}

.notes-stats .stat-icon {
  font-size: 32px;
  -webkit-background-clip: text;
  background-clip: text;
}

.notes-stats .stat-info {
  flex: 1;
}

.notes-stats .stat-number {
  font-size: 28px;
  font-weight: bold;
  color: #333;
}

.notes-stats .stat-label {
  padding: 0 5px;
}

/* شبكة الملاحظات المثبتة */
.pinned-notes-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 15px;
  background: linear-gradient(135deg, #fff9e6 0%, #fffef8 100%);
  border-radius: 12px;
  margin-bottom: 25px;
  box-shadow: 0 3px 10px rgba(255, 193, 7, 0.15);
  position: relative;
}

.pinned-notes-grid::before {
  content: "📌 الملاحظات المثبتة";
  position: absolute;
  top: -10px;
  right: 20px;
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
  padding: 0 10px;
  font-weight: 600;
  color: white;
  font-size: 14px;
  border-radius: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.pinned-notes-grid:empty {
  display: none;
}

/* بطاقة الملاحظة - تصميم أفقي */
.note-card {
  background: white;
  border-radius: 10px;
  padding: 12px 16px 20px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  position: relative;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-right: 4px solid;
  min-height: 100px;
  max-height: 180px;
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 15px;
  overflow: visible;
  width: 100%;
}

/* البطاقة الموسعة */
.note-card.expanded {
  max-height: none;
  overflow: visible;
  padding-bottom: 35px;
}

/* زر التوسع/الطي */
.note-expand-btn {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #0255f0 0%, #0040c0 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
}

.note-card:hover .note-expand-btn {
  opacity: 1;
}

.note-expand-btn:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 3px 10px rgba(2, 85, 240, 0.25);
}

.note-expand-btn i {
  transition: transform 0.3s ease;
  font-size: 10px;
}

.note-card.expanded .note-expand-btn i {
  transform: rotate(180deg);
}

/* بطاقة الملاحظة المثبتة */
.note-card.pinned {
  background: linear-gradient(135deg, #ffffff 0%, #fffbf0 100%);
  border-right-width: 5px;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.15);
}

.note-card:hover {
  transform: translateX(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.note-card.pinned:hover {
  transform: translateX(-5px) scale(1.02);
  box-shadow: 0 6px 20px rgba(255, 193, 7, 0.3);
}

.note-card.priority-low {
  border-right-color: #4caf50;
}

.note-card.priority-normal {
  border-right-color: #2196f3;
}

.note-card.priority-high {
  border-right-color: #ff9800;
}

.note-card.priority-urgent {
  border-right-color: #f44336;
}

/* الجزء الأيسر - المحتوى الرئيسي */
.note-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  flex: 1;
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}

.note-title {
  font-size: 15px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* الجزء الأيمن - الأزرار */
.note-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-right: 2px solid #f0f0f0;
  min-width: 50px;
  position: relative;
  z-index: 10;
  /* إخفاء الأزرار بشكل افتراضي على الشاشات الكبيرة */
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* إظهار الأزرار عند hover على الشاشات الكبيرة */
.note-card:hover .note-actions {
  opacity: 1;
}

.note-actions .btn-icon {
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  color: #999;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.note-actions .btn-icon:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #333;
  transform: scale(1.1);
}

/* زر التعديل */
.note-actions .btn-icon.btn-edit:hover {
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
  color: white;
  border-color: #2196f3;
  box-shadow: 0 3px 10px rgba(33, 150, 243, 0.25);
}

/* زر الحذف */
.note-actions .btn-icon.btn-delete:hover {
  background: linear-gradient(135deg, #f44336 0%, #e53935 100%);
  color: white;
  border-color: #f44336;
  box-shadow: 0 3px 10px rgba(244, 67, 54, 0.25);
}

/* زر التثبيت */
.note-actions .btn-icon.btn-pin:hover {
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
  color: white;
  border-color: #ffc107;
  box-shadow: 0 3px 10px rgba(255, 193, 7, 0.25);
}

.note-actions .btn-icon i {
  font-size: 14px;
}

.note-actions .btn-icon i.pinned {
  color: #ffc107;
  font-size: 16px;
  transform: rotate(45deg);
}

/* Tooltip للأزرار */
.note-actions .btn-icon::after {
  content: attr(title);
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.note-actions .btn-icon:hover::after {
  opacity: 1;
}

.note-content {
  color: #555;
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  word-wrap: break-word;
  word-break: break-word;
  max-height: 60px;
  transition: max-height 0.3s ease;
}

.note-card.expanded .note-content {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  max-height: none;
  overflow: visible;
}

.note-footer {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  margin-top: auto;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.note-priority {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #777;
  padding: 2px 8px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 12px;
}

.note-tags {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  max-width: 250px;
  max-height: 22px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.note-card.expanded .note-tags {
  max-height: none;
  overflow: visible;
}

.note-tags .tag {
  background: linear-gradient(135deg, #0255f0 0%, #0040c0 100%);
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: max-width 0.3s ease;
}

.note-card.expanded .note-tags .tag {
  max-width: none;
}

.note-date {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #999;
  margin-left: auto;
}

.note-reminder {
  background: linear-gradient(135deg, #fff9e6 0%, #fffbf0 100%);
  color: #856404;
  padding: 4px 8px;
  border-radius: 15px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #ffca28;
  transition: all 0.3s ease;
}

.note-reminder:hover {
  box-shadow: 0 3px 8px rgba(255, 193, 7, 0.25);
  transform: translateY(-1px);
}

.note-reminder i {
  font-size: 14px;
  animation: bellRing 2s infinite ease-in-out;
}

@keyframes bellRing {
  0%,
  100% {
    transform: rotate(0);
  }
  10%,
  30% {
    transform: rotate(-10deg);
  }
  20%,
  40% {
    transform: rotate(10deg);
  }
  50% {
    transform: rotate(0);
  }
}

.note-reminder.urgent {
  background: linear-gradient(135deg, #fff5f5 0%, #ffebee 100%);
  color: #c62828;
  border-color: #ef5350;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.note-reminder.urgent i {
  color: #ff4444;
  animation: bellRingUrgent 1s infinite ease-in-out;
}

@keyframes bellRingUrgent {
  0%,
  100% {
    transform: rotate(0) scale(1);
  }
  25% {
    transform: rotate(-15deg) scale(1.1);
  }
  75% {
    transform: rotate(15deg) scale(1.1);
  }
}

.note-reminder.overdue {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  color: #b71c1c;
  border-color: #e53935;
}

.note-reminder.overdue i {
  color: #dc3545;
  animation: shake 0.5s infinite;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-2px);
  }
  75% {
    transform: translateX(2px);
  }
}

.note-reminder .reminder-time {
  font-weight: 600;
  color: inherit;
  margin: 0 5px;
}

.note-reminder .btn-icon.btn-sm {
  padding: 2px 6px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.note-reminder .btn-icon.btn-sm:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

/* الملاحظات المثبتة */
.pinned-notes-section {
  margin-bottom: 30px;
}

.pinned-notes-section h4 {
  color: #333;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pinned-notes-section h4 i {
  color: #ffc107;
}

/* رسالة عدم وجود ملاحظات */
.no-notes-message {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.no-notes-message i {
  background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.no-notes-message p {
  font-size: 18px;
  margin-bottom: 20px;
}

/* نافذة إضافة/تعديل الملاحظة */
.note-modal-content {
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  margin: 50px auto;
  animation: modalSlideIn 0.3s ease;
}

.note-modal-content h3 {
  color: #333;
  margin-bottom: 25px;
  font-size: 24px;
  font-weight: 600;
}

.note-modal-content .form-group {
  margin-bottom: 20px;
}

.note-modal-content label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: 500;
  font-size: 14px;
}

.note-modal-content .form-control {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.note-modal-content .form-control:focus {
  outline: none;
  border-color: #0255f0;
  box-shadow: 0 0 0 3px rgba(2, 85, 240, 0.1);
}

.note-modal-content textarea.form-control {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

/* اختيار الألوان */
.color-picker-container {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 8px;
  border: 1px solid rgba(2, 85, 240, 0.1);
}

.color-picker {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 3px solid transparent;
}

.color-picker:hover {
  transform: scale(1.1);
}

.color-picker.selected {
  border-color: #333;
  box-shadow: 0 0 0 2px white, 0 0 0 4px #333;
}

/* حقل الوسوم */
.note-modal-content input[type="text"]#noteTags {
  background: white;
}

/* checkbox تثبيت */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* أزرار النافذة */
.note-modal-content .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

/* أنيميشن */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* تجاوب الملاحظات */
@media (max-width: 768px) {
  .notes-header {
    flex-direction: column;
    gap: 15px;
  }

  .notes-header h2 {
    font-size: 22px;
  }

  .notes-header-controls {
    width: 100%;
    justify-content: space-between;
  }

  .notes-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .notes-grid,
  .pinned-notes-grid {
    grid-template-columns: 1fr;
  }

  .notes-actions-bar {
    justify-content: space-between;
  }

  /* أزرار البطاقة على الموبايل */
  .note-actions {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    border-right: none !important;
    border-left: none !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    flex-direction: row !important;
    width: calc(100% + 24px) !important;
    padding: 8px 12px !important;
    min-width: unset !important;
    max-width: none !important;
    justify-content: space-evenly;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    margin: 12px -12px -12px -12px !important;
    border-radius: 0 0 10px 10px;
    position: relative;
    z-index: 10;
    order: 2; /* وضع الأزرار في الأسفل */
    gap: 8px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
  }

  /* حجم أكبر للأزرار على الموبايل لسهولة اللمس */
  .note-actions .btn-icon {
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #fff 0%, #fafafa 100%) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06) !important;
    font-size: 14px !important;
    color: #555 !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative;
    overflow: hidden;
  }

  .note-actions .btn-icon::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
      circle at center,
      transparent 0%,
      rgba(0, 0, 0, 0.02) 100%
    );
    opacity: 0;
    transition: opacity 0.2s;
  }

  .note-actions .btn-icon:active::before {
    opacity: 1;
  }

  .note-actions .btn-icon i {
    font-size: 17px !important;
    position: relative;
    z-index: 1;
  }

  /* ألوان مميزة للأزرار على الموبايل */
  .note-actions .btn-icon.btn-pin {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%) !important;
    color: #757575 !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
  }

  .note-actions .btn-icon.btn-pin.pinned {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%) !important;
    color: #ff9800 !important;
    border: 1px solid rgba(255, 152, 0, 0.2) !important;
    box-shadow: 0 2px 6px rgba(255, 152, 0, 0.15) !important;
  }

  .note-actions .btn-icon.btn-pin.pinned i {
    transform: rotate(45deg);
  }

  .note-actions .btn-icon.btn-edit {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%) !important;
    color: #4caf50 !important;
    border: 1px solid rgba(76, 175, 80, 0.2) !important;
  }

  .note-actions .btn-icon.btn-delete {
    background: linear-gradient(135deg, #f44336 0%, #e53935 100%) !important;
    color: #f44336 !important;
    border: 1px solid rgba(244, 67, 54, 0.2) !important;
  }

  /* تأثيرات عند الضغط */
  .note-actions .btn-icon:active {
    transform: scale(0.92) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
  }

  .note-actions .btn-icon.btn-delete:active {
    background: linear-gradient(135deg, #f44336 0%, #e53935 100%) !important;
  }

  .note-actions .btn-icon.btn-edit:active {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%) !important;
  }

  .note-actions .btn-icon.btn-pin:active {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%) !important;
  }

  /* ألوان الأولوية على الموبايل */
  .note-card.priority-low .note-priority {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
  }
  .note-card.priority-normal .note-priority {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
  }

  .note-card.priority-high .note-priority {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    color: #ef6c00;
  }

  .note-card.priority-urgent .note-priority {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    color: #c62828;
  }

  /* Tooltip احترافي للأزرار */
  .note-actions .btn-icon {
    position: relative;
  }

  .note-actions .btn-icon::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 999;
    font-weight: normal;
    letter-spacing: 0.5px;
  }

  .note-actions .btn-icon:active::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
  }

  /* تعديل تخطيط البطاقة للموبايل */
  .note-card {
    display: flex !important; /* تغيير من grid إلى flex */
    flex-direction: column;
    grid-template-columns: unset !important; /* إلغاء grid columns */
    gap: 0 !important;
    padding: 12px;
    padding-bottom: 15px;
    margin-bottom: 12px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border-right-width: 3px;
    max-height: none !important;
    min-height: auto !important;
    overflow: visible !important;
    height: auto !important;
    background: white;
  }

  .note-main {
    width: 100% !important;
    padding: 0;
    margin-bottom: 0;
    overflow: visible !important;
    flex: unset !important;
    display: flex;
    flex-direction: column;
    gap: 0;
    order: 1; /* وضع المحتوى في الأعلى */
  }

  /* منع التداخل بين العناصر */
  .note-main > * {
    margin-bottom: 0;
  }

  .note-main > *:not(:last-child) {
    margin-bottom: 10px;
  }

  /* تحسين header الملاحظة على الموبايل */
  .note-header {
    display: block !important;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    clear: both;
    width: 100%;
  }

  /* نقطة زخرفية */
  .note-header::after {
    content: "";
    position: absolute;
    bottom: -1px;
    right: 0;
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, rgba(2, 85, 240, 0.3), transparent);
  }

  .note-title {
    font-size: 14px !important;
    font-weight: 600;
    margin: 0 !important;
    padding: 0 !important;
    padding-right: 2px !important;
    width: 100%;
    color: #2c3e50;
    line-height: 1.5;
    display: block;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    clear: both;
    min-height: 20px;
    max-height: none;
    text-align: right;
    direction: rtl;
  }

  /* محتوى الملاحظة */
  .note-content {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 0;
    padding: 10px;
    background: linear-gradient(135deg, #fafbfc 0%, #fff 100%);
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-line !important;
    text-align: right;
    direction: rtl;
    color: #555;
    border-left: 2px solid rgba(2, 85, 240, 0.08);
    position: relative;
    display: block;
    clear: both;
    max-height: 100px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.05);
    -webkit-overflow-scrolling: touch;
  }

  /* شريط التمرير للمحتوى */
  .note-content::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }

  .note-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
  }

  .note-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    min-height: 20px;
  }

  .note-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
  }

  .note-content::-webkit-scrollbar-thumb:active {
    background: rgba(0, 0, 0, 0.4);
  }

  /* footer الملاحظة */
  .note-footer {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
    margin-top: 10px;
    padding: 0;
    width: 100%;
    clear: both;
  }

  /* شريط المعلومات الأساسية */
  .note-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.015);
    border-radius: 6px;
    margin-top: 10px;
    border: 1px solid rgba(0, 0, 0, 0.04);
  }

  .note-priority {
    font-size: 11px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #fff 0%, #fafafa 100%);
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  }

  .note-date {
    font-size: 10px;
    color: #999;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: transparent;
    padding: 3px 6px;
    border-radius: 8px;
  }

  /* التذكيرات على الموبايل */
  .note-reminder {
    font-size: 13px;
    padding: 8px;
    margin: 8px 0;
    border-radius: 8px;
    display: block;
    width: 100%;
    box-sizing: border-box;
    clear: both;
  }

  /* التأكد من عدم تداخل العناصر داخل header */
  .note-header .note-reminder {
    margin-top: 8px;
    margin-bottom: 0;
  }

  /* الوسوم على الموبايل */
  .note-tags {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    padding-top: 12px;
    background: linear-gradient(135deg, #f9fbff 0%, #f3f7ff 100%);
    border-radius: 6px;
    border: 1px dashed rgba(2, 85, 240, 0.1);
    position: relative;
    margin-top: 10px !important;
    margin-bottom: 0;
    box-shadow: none;
    clear: both;
    box-sizing: border-box;
    min-height: 36px;
    overflow: visible !important;
  }

  /* أيقونة الوسوم */
  .note-tags::before {
    content: "🏷️";
    position: absolute;
    top: -10px;
    right: 10px;
    background: white;
    padding: 0 5px;
    font-size: 12px;
    z-index: 1;
  }

  .note-tags .tag {
    font-size: 11px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #7b8cff 0%, #6678ff 100%);
    border: none;
    border-radius: 15px;
    color: white;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(80, 97, 248, 0.15);
    transition: all 0.2s;
    display: inline-block;
    margin-bottom: 2px;
    margin-top: -2px;
    line-height: 1.2;
    white-space: nowrap;
    position: relative;
    top: -2px;
  }

  .note-tags .tag:active {
    transform: scale(0.95);
    box-shadow: 0 1px 3px rgba(80, 97, 248, 0.3);
  }

  /* إلغاء تأثير hover على الموبايل */
  .note-card:hover {
    transform: none !important;
  }

  /* زر التوسع على الموبايل */
  .note-expand-btn {
    display: none !important;
  }

  /* إلغاء البطاقة الموسعة */
  .note-card.expanded {
    max-height: none !important;
  }

  /* إضافة تأثير عند اللمس */
  .note-actions .btn-icon:active {
    transform: scale(0.95) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  }
}

/* دعم الأجهزة اللوحية (tablets) */
@media (min-width: 769px) and (max-width: 1024px) {
  /* إظهار الأزرار دائماً على التابلت */
  .note-actions {
    opacity: 1 !important;
  }

  /* حجم أكبر للأزرار على التابلت */
  .note-actions .btn-icon {
    width: 38px;
    height: 38px;
  }

  .note-actions .btn-icon i {
    font-size: 16px;
  }

  /* سطع ألوان خفيف للأزرار */
  .note-actions .btn-icon.btn-edit {
    background: rgba(33, 150, 243, 0.1);
    color: #1976d2;
  }

  .note-actions .btn-icon.btn-delete {
    background: rgba(244, 67, 54, 0.1);
    color: #d32f2f;
  }

  .note-actions .btn-icon.btn-pin {
    background: rgba(255, 193, 7, 0.1);
    color: #f57c00;
  }
}

/* دعم الأجهزة التي تدعم اللمس */
@media (pointer: coarse) {
  /* إظهار الأزرار دائماً على الأجهزة التي تعتمد على اللمس */
  .note-actions {
    opacity: 1 !important;
  }

  /* زيادة حجم منطقة اللمس */
  .note-actions .btn-icon {
    min-width: 40px;
    min-height: 40px;
  }
}

/* دعم الأجهزة بدون hover */
@media (hover: none) {
  /* إظهار زر التوسع دائماً */
  .note-expand-btn {
    opacity: 1 !important;
  }

  /* إظهار أزرار الملاحظات دائماً */
  .note-actions {
    opacity: 1 !important;
  }
}

/* ================================ */
/* ===== Modal تأكيد حذف الملاحظات ===== */
/* ================================ */

.note-confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.note-confirm-content {
  background: white;
  border-radius: 20px;
  padding: 30px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  position: relative;
}

.note-confirm-icon {
  margin-bottom: 20px;
  animation: iconPulse 0.5s ease;
}

.note-confirm-icon svg {
  filter: drop-shadow(0 3px 10px rgba(244, 67, 54, 0.3));
}

.note-confirm-title {
  color: #333;
  font-size: 24px;
  margin-bottom: 15px;
  font-weight: 600;
}

.note-confirm-message {
  color: #666;
  font-size: 16px;
  margin-bottom: 25px;
  line-height: 1.5;
}

.note-confirm-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.note-confirm-btn {
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 100px;
  justify-content: center;
}

.note-confirm-cancel {
  background: #e0e0e0;
  color: #666;
}

.note-confirm-cancel:hover {
  background: #d0d0d0;
  transform: translateY(-2px);
}

.note-confirm-delete {
  background: linear-gradient(135deg, #f44336, #d32f2f);
  color: white;
  box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.note-confirm-delete:hover {
  background: linear-gradient(135deg, #d32f2f, #c62828);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

.note-confirm-btn:active {
  transform: scale(0.98);
}

/* أنيميشن الظهور */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes iconPulse {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* تجاوب Modal على الموبايل */
@media (max-width: 480px) {
  .note-confirm-content {
    padding: 20px;
    width: 85%;
  }

  .note-confirm-title {
    font-size: 20px;
  }

  .note-confirm-message {
    font-size: 14px;
  }

  .note-confirm-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .note-confirm-btn {
    width: 100%;
    padding: 12px 20px;
  }
}

/* ================================ */
/* ===== أنماط نظام الشات ===== */
/* ================================ */

/* حاوية الشات الرئيسية */
.chat-container {
  display: flex;
  height: calc(100vh - 180px);
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(2, 85, 240, 0.08), 
              0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(2, 85, 240, 0.1);
}

/* الشريط الجانبي للمحادثات */
.chat-sidebar {
  width: 320px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  border-left: 1px solid rgba(2, 85, 240, 0.08);
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.02);
}

.chat-sidebar-header {
  padding: 20px 24px;
  background: linear-gradient(135deg, #0255f0 0%, #003566 50%, #001d3d 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(2, 85, 240, 0.2);
  position: relative;
  overflow: hidden;
}

.chat-sidebar-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.chat-sidebar-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chat-sidebar-header .btn-icon {
  color: white;
  transition: all 0.3s ease;
}

.chat-sidebar-header .btn-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

/* البحث في المحادثات */
.chat-search {
  padding: 16px;
  background: rgba(2, 85, 240, 0.02);
  border-bottom: 1px solid rgba(2, 85, 240, 0.08);
}

.chat-search-input {
  width: 100%;
  padding: 12px 18px;
  border: 1.5px solid rgba(2, 85, 240, 0.12);
  border-radius: 12px;
  font-size: 14px;
  background: white;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(2, 85, 240, 0.04);
}

.chat-search-input:focus {
  outline: none;
  border-color: #0255f0;
  box-shadow: 0 0 0 4px rgba(2, 85, 240, 0.1), 
              0 4px 12px rgba(2, 85, 240, 0.15);
  transform: translateY(-1px);
}

.chat-search-input::placeholder {
  color: #94a3b8;
}

/* قائمة المجموعات */
.chat-groups-list {
  flex: 1;
  overflow-y: auto;
  background: white;
  scrollbar-width: thin;
  scrollbar-color: rgba(2, 85, 240, 0.2) transparent;
}

.chat-groups-list::-webkit-scrollbar {
  width: 6px;
}

.chat-groups-list::-webkit-scrollbar-track {
  background: transparent;
}

.chat-groups-list::-webkit-scrollbar-thumb {
  background: rgba(2, 85, 240, 0.2);
  border-radius: 3px;
}

.chat-groups-list::-webkit-scrollbar-thumb:hover {
  background: rgba(2, 85, 240, 0.3);
}

.chat-group-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid rgba(2, 85, 240, 0.05);
  position: relative;
  animation: fadeInUp 0.3s ease-out;
}

.chat-group-item::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(2, 85, 240, 0.1) 100%);
  transition: width 0.3s ease;
}

.chat-group-item:hover {
  background: linear-gradient(90deg, rgba(2, 85, 240, 0.04) 0%, transparent 100%);
  transform: translateX(-2px);
}

.chat-group-item:hover::before {
  width: 4px;
}

.chat-group-item.active {
  background: linear-gradient(90deg, rgba(2, 85, 240, 0.08) 0%, rgba(2, 85, 240, 0.02) 100%);
  border-right: 3px solid #0255f0;
  box-shadow: inset 0 0 20px rgba(2, 85, 240, 0.05);
}

.chat-group-item.active::before {
  width: 4px;
  background: linear-gradient(90deg, transparent 0%, rgba(2, 85, 240, 0.2) 100%);
}

.chat-group-avatar {
  width: 48px;
  height: 48px;
  margin-left: 12px;
  position: relative;
}

/* تمييز المحادثات المباشرة */
.chat-direct-item {
  background: linear-gradient(90deg, rgba(2, 85, 240, 0.02) 0%, transparent 100%);
}

.chat-direct-item:hover {
  background: linear-gradient(90deg, rgba(2, 85, 240, 0.06) 0%, transparent 100%);
}

/* قائمة المستخدمين للمحادثة المباشرة */
.new-chat-users-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px;
  background-color: #f9f9f9;
}

.new-chat-user-item {
  display: flex;
  align-items: center;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  border: 1px solid #e0e0e0;
}

.new-chat-user-item:hover {
  background: linear-gradient(90deg, rgba(2, 85, 240, 0.08) 0%, rgba(2, 85, 240, 0.02) 100%);
  border-color: #0255f0;
  transform: translateX(-2px);
  box-shadow: 0 2px 8px rgba(2, 85, 240, 0.1);
}

.new-chat-user-item:last-child {
  margin-bottom: 0;
}

.new-chat-user-avatar {
  width: 40px;
  height: 40px;
  margin-left: 12px;
  flex-shrink: 0;
}

.new-chat-user-avatar .avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #0255f0 0%, #003566 50%, #001d3d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 16px;
}

.new-chat-user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.new-chat-user-info {
  flex: 1;
  min-width: 0;
}

.new-chat-user-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  font-size: 15px;
}

.new-chat-user-role {
  font-size: 12px;
  color: #666;
  text-transform: capitalize;
}

/* أزرار الموبايل - مخفية افتراضياً */
.mobile-menu-btn,
.mobile-close-sidebar {
  display: none;
}

.chat-group-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #0255f0 0%, #003566 50%, #001d3d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(2, 85, 240, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.chat-group-info {
  flex: 1;
  min-width: 0;
}

.chat-group-name {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
  font-size: 15px;
  letter-spacing: 0.2px;
}

.chat-group-last-message {
  font-size: 13px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

.chat-group-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.chat-group-time {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.chat-unread-badge {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border-radius: 12px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
  min-width: 20px;
  text-align: center;
  line-height: 1.4;
}

/* منطقة المحادثة الرئيسية */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  position: relative;
}

/* رأس المحادثة */
.chat-header {
  padding: 20px 24px;
  background: linear-gradient(135deg, #0255f0 0%, #003566 50%, #001d3d 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(2, 85, 240, 0.15);
  position: relative;
  z-index: 10;
}

.chat-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.chat-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-header-info h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chat-members-count {
  font-size: 13px;
  opacity: 0.92;
  margin-top: 2px;
  font-weight: 400;
}

.chat-header-actions {
  display: flex;
  gap: 8px;
}

.chat-header-actions .btn-icon {
  color: white;
  transition: all 0.3s ease;
}

.chat-header-actions .btn-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

/* منطقة الرسائل */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(2, 85, 240, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(2, 85, 240, 0.02) 0%, transparent 50%);
  scrollbar-width: thin;
  scrollbar-color: rgba(2, 85, 240, 0.2) transparent;
}

.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(2, 85, 240, 0.2);
  border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(2, 85, 240, 0.3);
}

/* رسالة الترحيب */
.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: #64748b;
  padding: 40px;
}

.chat-welcome svg {
  margin-bottom: 24px;
  opacity: 0.4;
  filter: drop-shadow(0 4px 8px rgba(2, 85, 240, 0.1));
}

.chat-welcome h3 {
  color: #1e293b;
  margin-bottom: 12px;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.chat-welcome p {
  color: #64748b;
  font-size: 15px;
  line-height: 1.6;
}

/* الرسائل */
.chat-message {
  display: flex;
  margin-bottom: 20px;
  animation: messageSlide 0.3s ease-out;
}

.chat-message.own {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 36px;
  height: 36px;
  margin: 0 12px;
  position: relative;
}

.message-avatar .avatar-placeholder {
  font-size: 14px;
}

.message-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(2, 85, 240, 0.1);
}

.message-content {
  max-width: 65%;
  display: flex;
  flex-direction: column;
}

.message-header {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
  font-size: 12px;
  color: #7f8c8d;
  gap: 8px;
}

.chat-message.own .message-header {
  flex-direction: row-reverse;
}

.message-sender {
  font-weight: 600;
  color: #2c3e50;
}

.message-time {
  opacity: 0.7;
}

.message-text {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  padding: 12px 18px;
  border-radius: 18px 18px 18px 4px;
  word-wrap: break-word;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08),
              0 1px 2px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(2, 85, 240, 0.08);
  line-height: 1.5;
  position: relative;
}

.chat-message.own .message-text {
  background: linear-gradient(135deg, #0255f0 0%, #003566 50%, #001d3d 100%);
  color: white;
  border-radius: 18px 18px 4px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(2, 85, 240, 0.25),
              0 2px 4px rgba(2, 85, 240, 0.15);
}

.message-image {
  max-width: 280px;
  max-height: 220px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12),
              0 2px 4px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  object-fit: cover;
  border: 1px solid rgba(2, 85, 240, 0.1);
}

.message-image:hover {
  transform: scale(1.03) translateY(-2px);
  box-shadow: 0 8px 20px rgba(2, 85, 240, 0.2),
              0 4px 8px rgba(0, 0, 0, 0.15);
  border-color: rgba(2, 85, 240, 0.2);
}

/* Modal لعرض الصور المكبرة */
.image-view-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-view-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.image-view-container {
  position: relative;
  z-index: 10001;
  max-width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.image-view-close {
  position: absolute;
  top: -40px;
  right: -40px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.image-view-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.image-view-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.image-view-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
  cursor: grab;
}

.image-view-content img:active {
  cursor: grabbing;
}

.image-view-actions {
  display: flex;
  gap: 10px;
}

.image-view-actions .btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #4b5563;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.image-view-actions .btn:hover {
  background: #374151;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(75, 85, 99, 0.4);
}

.message-audio {
  width: 250px;
}

.message-file {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  padding: 12px 18px;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08),
              0 1px 2px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(2, 85, 240, 0.08);
  transition: all 0.3s ease;
}

.chat-message.own .message-file {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.file-link {
  color: #0255f0;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.file-link:hover {
  color: #003566;
  text-decoration: underline;
  transform: translateX(-2px);
}

.message-edited {
  font-size: 11px;
  color: #95a5a6;
  margin-top: 4px;
}

/* مؤشرات حالة القراءة */
.read-status-icon {
  display: inline-block;
  margin-left: 6px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  vertical-align: middle;
  user-select: none;
  transition: opacity 0.2s ease;
}

.read-status-icon.sent {
  color: #94a3b8;
  opacity: 1;
}

.read-status-icon.read,
.read-status-icon.read-all {
  color: #4fc3f7;
  opacity: 1;
}

/* في الرسائل الخاصة بالمستخدم */
.chat-message.own .message-time .read-status-icon {
  margin-left: 4px;
}

/* تحسين العرض على الرسائل الخاصة */
.chat-message.own .message-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.message-actions {
  display: none;
  gap: 5px;
  margin-top: 5px;
}

.chat-message:hover .message-actions {
  display: flex;
}

.btn-icon-small {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.btn-icon-small:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

/* مؤشر الكتابة */
.typing-indicator {
  padding: 10px 20px;
  color: #7f8c8d;
  font-size: 13px;
  font-style: italic;
  animation: pulse 1.5s infinite;
}

/* منطقة إدخال الرسالة */
.chat-input-container {
  padding: 20px 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  border-top: 1px solid rgba(2, 85, 240, 0.1);
  box-shadow: 0 -2px 8px rgba(2, 85, 240, 0.05);
  position: relative;
  z-index: 10;
}

.chat-attachments-preview {
  margin-bottom: 12px;
}

.chat-input-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.chat-input {
  flex: 1;
  padding: 12px 20px;
  border: 1.5px solid rgba(2, 85, 240, 0.12);
  border-radius: 24px;
  resize: none;
  font-size: 14px;
  max-height: 120px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  box-shadow: 0 2px 4px rgba(2, 85, 240, 0.04);
  line-height: 1.5;
}

.chat-input:focus {
  outline: none;
  border-color: #0255f0;
  box-shadow: 0 0 0 4px rgba(2, 85, 240, 0.1), 
              0 4px 12px rgba(2, 85, 240, 0.15);
  transform: translateY(-1px);
}

.chat-input::placeholder {
  color: #94a3b8;
}

.btn-icon {
  background: rgba(2, 85, 240, 0.05);
  border: none;
  cursor: pointer;
  padding: 12px;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.btn-icon:hover {
  background: rgba(2, 85, 240, 0.1);
  transform: scale(1.05);
}

.btn-icon:active {
  transform: scale(0.95);
}

.btn-icon svg {
  stroke: #0255f0;
  transition: stroke 0.3s;
}

.btn-icon:hover svg {
  stroke: #003566;
}

.btn-send {
  background: linear-gradient(135deg, #0255f0 0%, #003566 50%, #001d3d 100%);
  box-shadow: 0 4px 12px rgba(2, 85, 240, 0.3);
}

.btn-send:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(2, 85, 240, 0.4);
}

.btn-send:active {
  transform: scale(0.95);
}

.btn-send svg {
  stroke: white;
}

.recording {
  background: #e74c3c !important;
  animation: pulse 1s infinite;
}

/* الشريط الجانبي لمعلومات المحادثة */
.chat-info-sidebar {
  width: 300px;
  height: 100%;
  max-height: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  border-right: 1px solid rgba(2, 85, 240, 0.08);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.02);
}

.chat-info-header {
  padding: 20px 24px;
  background: linear-gradient(135deg, #0255f0 0%, #003566 50%, #001d3d 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(2, 85, 240, 0.2);
  position: relative;
}

.chat-info-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.chat-info-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chat-info-header .btn-icon {
  color: white;
  transition: all 0.3s ease;
}

.chat-info-header .btn-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

.chat-info-content {
  flex: 1 1 auto;
  overflow-y: scroll;
  overflow-x: hidden;
  padding: 20px;
  padding-bottom: 40px;
  height: 100%;
  max-height: calc(100% - 80px);
  scrollbar-width: thin;
  scrollbar-color: #cbd5e0 #f7fafc;
}

/* تخصيص شريط التمرير للمتصفحات الأخرى */
.chat-info-content::-webkit-scrollbar {
  width: 8px;
  display: block !important;
}

.chat-info-content::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 4px;
}

.chat-info-content::-webkit-scrollbar-thumb {
  background: rgba(2, 85, 240, 0.2);
  border-radius: 4px;
  transition: background 0.3s;
}

.chat-info-content::-webkit-scrollbar-thumb:hover {
  background: rgba(2, 85, 240, 0.3);
}

.chat-info-section {
  margin-bottom: 28px;
}

.chat-info-section:last-child {
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.chat-info-section h4 {
  color: #1e293b;
  margin-bottom: 16px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  opacity: 0.8;
}

/* أزرار الإعدادات */
.chat-info-section .btn-danger {
  width: 100%;
  padding: 10px 16px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s;
}

.chat-info-section .btn-danger:hover {
  background: #c82333;
}

.chat-info-section .btn-danger:active {
  transform: scale(0.98);
}

/* معلومات المجموعة */
.group-info-details {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
}

.info-item {
  margin-bottom: 12px;
  font-size: 14px;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-item strong {
  color: #495057;
  display: inline-block;
  margin-bottom: 4px;
}

.info-item span,
.info-item p {
  color: #212529;
  display: block;
}

.group-description-text {
  margin: 0;
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 150px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e0 transparent;
}

.group-description-text::-webkit-scrollbar {
  width: 4px;
}

.group-description-text::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 2px;
}

/* قائمة الأعضاء */
.group-members-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.member-item {
  display: flex;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  transition: background-color 0.3s;
}

.member-item:hover {
  background-color: #f8f9fa;
}

.member-avatar {
  width: 36px;
  height: 36px;
  margin-left: 12px;
  position: relative;
}

.member-avatar .avatar-placeholder {
  font-size: 14px;
}

.member-status {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid white;
}

.member-status.online {
  background: #27ae60;
}

.member-status.offline {
  background: #95a5a6;
}

.member-info {
  flex: 1;
  min-width: 0;
}

.member-item {
  position: relative;
}

.btn-remove-member {
  margin-right: auto;
  color: #dc3545;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-remove-member:hover {
  background: rgba(220, 53, 69, 0.1);
  color: #c82333;
}

.member-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* معلومات المستخدم في المحادثة المباشرة */
.user-info-details {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}

.user-avatar-large {
  width: 80px;
  height: 80px;
  margin: 0 auto 15px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #0255f0;
}

.user-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* أزرار التعديل في معلومات المحادثة */
.chat-info-section .info-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.chat-info-section .info-item:last-child {
  margin-bottom: 0;
}

.chat-info-section .info-item strong {
  color: #495057;
  display: inline-block;
  margin-bottom: 0;
  flex-shrink: 0;
}

.chat-info-section .info-item span,
.chat-info-section .info-item p {
  color: #212529;
  display: block;
  flex: 1;
}

.chat-info-section .info-item .btn-icon-small {
  margin-right: 0;
  margin-left: auto;
  flex-shrink: 0;
}

/* Checkbox في modal إضافة الأعضاء */
.member-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin-right: auto;
}

.new-chat-user-item {
  position: relative;
}

.new-chat-user-item input[type="checkbox"] {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.member-name {
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
}

.member-role {
  font-size: 12px;
  color: #7f8c8d;
}

/* شارة الشات في القائمة */
.chat-badge {
  background: #ef4444;
  color: white;
  border-radius: 12px;
  padding: 2px 6px;
  font-size: 10px;
  margin-right: 5px;
  font-weight: bold;
}

/* قائمة المستخدمين للإضافة */
.users-checkbox-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  padding: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
  border-radius: 4px;
}

.checkbox-label:hover {
  background-color: #f8f9fa;
}

.checkbox-label input[type="checkbox"] {
  margin-left: 10px;
}

/* الأنيميشن */
@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

/* Overlay للموبايل */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.visible {
  display: block;
  opacity: 1;
}

/* إخفاء overlay على الشاشات الكبيرة */
@media (min-width: 769px) {
  .mobile-overlay {
    display: none !important;
  }
}

/* عنوان الشات الدائم للموبايل */
.mobile-chat-header {
  display: none;
}

/* التجاوب - تحسينات شاملة للموبايل */
@media (max-width: 768px) {
  /* العناوين الرئيسية */
  .tabs {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 5px;
    padding: 10px 5px;
    justify-content: flex-start;
  }

  /* محتوى الشات */
  #chatTab {
    padding: 0;
    height: calc(100vh - 120px);
    overflow: hidden;
  }

  .chat-container {
    display: flex;
    flex-direction: row;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
  }

  /* الشريط الجانبي للمحادثات */
  .chat-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    border-left: none;
    background: white;
    z-index: 1000;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  }

  .chat-sidebar.mobile-visible {
    right: 0;
  }

  .chat-sidebar-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #0255f0 0%, #003566 50%, #001d3d 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(2, 85, 240, 0.2);
  }

  .chat-sidebar-header h3 {
    font-size: 18px;
    margin: 0;
  }

  /* إضافة زر العودة في الشريط الجانبي */
  .mobile-close-sidebar {
    display: inline-flex !important;
    background: transparent;
    border: none;
    color: white;
    padding: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
  }

  /* إظهار أزرار المحادثة الجديدة وإنشاء المجموعة في الموبايل */
  .chat-sidebar-header .btn-icon {
    display: inline-flex !important;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
  }

  .chat-sidebar-header .btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
  }

  .chat-sidebar-header .btn-icon:active {
    transform: scale(0.95);
  }

  /* البحث في المحادثات */
  .chat-search {
    padding: 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
  }

  .chat-groups-list {
    flex: 1;
    padding: 5px;
    overflow-y: auto;
    background: white;
  }

  .chat-group-item {
    padding: 12px;
    margin: 4px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
  }

  .chat-group-item:hover,
  .chat-group-item:active {
    background-color: #f3f4f6;
  }

  .chat-group-item.active {
    background: linear-gradient(90deg, rgba(2, 85, 240, 0.12) 0%, rgba(2, 85, 240, 0.04) 100%);
    border-right: 3px solid #0255f0;
  }

  .chat-group-avatar {
    width: 40px;
    height: 40px;
    font-size: 16px;
    margin-left: 12px;
  }

  .chat-group-info {
    flex: 1;
    min-width: 0;
  }

  .chat-group-name {
    font-size: 15px;
    font-weight: 500;
  }

  .chat-group-last-message {
    font-size: 13px;
    color: #6b7280;
  }

  /* منطقة المحادثة الرئيسية */
  .chat-main {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
  }

  /* عنوان الشات الدائم للموبايل */
  .mobile-chat-header {
    display: flex !important;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(135deg, #0255f0 0%, #003566 50%, #001d3d 100%);
    color: white;
    border-bottom: none;
    gap: 12px;
    min-height: 56px;
    box-shadow: 0 2px 8px rgba(2, 85, 240, 0.15);
  }

  .mobile-chat-header h3 {
    font-size: 18px;
    margin: 0;
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  }

  .mobile-chat-header .mobile-menu-btn {
    color: white;
  }

  .mobile-chat-header .mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.15);
  }

  /* إظهار رسالة الترحيب عند عدم وجود محادثة */
  .chat-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    text-align: center;
  }

  /* زر فتح قائمة المحادثات في الموبايل */
  .mobile-menu-btn {
    display: inline-flex !important;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #4b5563;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background-color 0.2s;
  }

  /* رأس المحادثة في الموبايل */
  .chat-welcome h3 {
    font-size: 18px;
  }

  .chat-welcome p {
    font-size: 14px;
  }

  /* رأس المحادثة في الموبايل */
  .chat-header {
    display: flex !important;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(135deg, #0255f0 0%, #003566 50%, #001d3d 100%);
    color: white;
    border-bottom: none;
    min-height: 56px;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(2, 85, 240, 0.15);
  }

  .chat-header-info {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 10px;
  }

  .chat-header-info h3#chatTitle {
    font-size: 18px !important;
    margin: 0 !important;
    color: white !important;
    display: block !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  }

  .chat-header-actions {
    display: flex;
    gap: 8px;
  }

  .chat-members-count {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9) !important;
    white-space: nowrap;
    opacity: 0.92;
  }

  .chat-header h3 {
    font-size: 16px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .chat-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
  }

  .message {
    margin: 8px 0;
  }

  .message-content {
    max-width: 85%;
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 12px;
  }

  .message-time {
    font-size: 11px;
  }

  /* منطقة الإدخال */
  .chat-input-container {
    padding: 8px;
    background: white;
    border-top: 1px solid #e0e0e0;
    position: relative;
  }

  .chat-input-form {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .chat-input {
    flex: 1;
    min-height: 40px;
    max-height: 100px;
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 22px;
    border: 1.5px solid rgba(2, 85, 240, 0.12);
    resize: none;
    background: white;
    box-shadow: 0 2px 4px rgba(2, 85, 240, 0.04);
    transition: all 0.3s ease;
  }

  .chat-input:focus {
    border-color: #0255f0;
    box-shadow: 0 0 0 3px rgba(2, 85, 240, 0.1), 
                0 4px 12px rgba(2, 85, 240, 0.15);
  }

  /* الأزرار */
  .btn-icon {
    width: 40px;
    height: 40px;
    padding: 8px;
    flex-shrink: 0;
    min-width: 40px;
    min-height: 40px;
  }

  .btn-send {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0255f0 0%, #003566 50%, #001d3d 100%);
    box-shadow: 0 4px 12px rgba(2, 85, 240, 0.3);
  }

  .btn-send:active {
    transform: scale(0.95);
  }

  /* زر التسجيل الصوتي */
  .voice-record-btn {
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: 50%;
    background: rgba(2, 85, 240, 0.08);
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    transition: all 0.3s ease;
  }

  .voice-record-btn:active {
    background: linear-gradient(135deg, #0255f0 0%, #003566 100%);
    transform: scale(0.95);
    color: white;
  }

  .voice-record-btn:active svg {
    stroke: white;
  }

  /* شريط التسجيل الصوتي */
  .voice-recording-bar {
    padding: 10px 14px;
    gap: 12px;
    border-radius: 14px;
    height: 68px;
  }

  .recording-timer {
    font-size: 18px;
    min-width: 50px;
    padding: 5px 10px;
  }

  .recording-wave {
    gap: 3px;
    height: 32px;
  }

  .recording-wave span {
    width: 3px;
  }

  .recording-text {
    font-size: 12px;
    display: none; /* إخفاء النص على الموبايل */
  }

  .cancel-recording {
    width: 40px;
    height: 40px;
  }

  .send-recording {
    width: 44px;
    height: 44px;
  }

  /* معلومات المحادثة */
  .chat-info-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: white;
  }

  .chat-info-sidebar.open {
    transform: translateX(0);
  }

  /* تحسينات الموبايل للعناصر الجديدة */
  .user-avatar-large {
    width: 70px;
    height: 70px;
  }

  .chat-info-section .info-item {
    flex-wrap: wrap;
  }

  .chat-info-section .info-item .btn-icon-small {
    margin-right: 0;
    margin-left: auto;
  }

  .member-item {
    padding: 12px 8px;
  }

  .btn-remove-member {
    padding: 6px;
  }

  .member-checkbox {
    width: 20px;
    height: 20px;
  }

  /* نافذة إنشاء المجموعة */
  .modal-content {
    width: 95%;
    margin: 10px auto;
    max-height: 90vh;
    overflow-y: auto;
  }

  /* إخفاء tooltip على الموبايل */
  .voice-record-btn::after {
    display: none;
  }

  /* تحسين الكتابة */
  .typing-indicator {
    font-size: 12px;
    padding: 5px 10px;
  }

  /* تحسين مشغل الصوت للموبايل */
  .audio-message-container {
    min-width: 240px;
    max-width: 280px;
    padding: 10px;
    gap: 8px;
  }

  .audio-play-btn {
    width: 40px;
    height: 40px;
  }

  .audio-waveform {
    height: 35px;
  }

  .waveform-bars .bar {
    width: 2px;
  }

  .audio-duration {
    font-size: 12px;
  }

  /* إخفاء التمرير الأفقي */
  body,
  html {
    overflow-x: hidden;
  }

  /* تحسين حجم النص للقراءة */
  body {
    -webkit-text-size-adjust: 100%;
  }
}

/* أنماط التسجيل الصوتي الجديدة - WhatsApp Style */
.voice-recording-bar {
  position: relative;
  width: 100%;
  height: 72px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
  display: flex;
  align-items: center;
  padding: 12px 20px;
  gap: 16px;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  border-radius: 16px;
  box-sizing: border-box;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35),
              0 4px 12px rgba(220, 38, 38, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.voice-recording-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.4) 0%, 
    rgba(255, 255, 255, 0.2) 50%, 
    rgba(255, 255, 255, 0.4) 100%);
  animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cancel-recording {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.25);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.cancel-recording::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

.cancel-recording:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.35);
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.cancel-recording:hover::before {
  width: 100%;
  height: 100%;
}

.cancel-recording:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.recording-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  color: white;
  min-width: 0;
}

.recording-timer {
  font-size: 20px;
  font-weight: 700;
  min-width: 56px;
  font-family: "SF Mono", "Monaco", "Courier New", monospace;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.15);
  padding: 6px 12px;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.recording-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 36px;
  flex: 1;
  min-width: 0;
  padding: 0 8px;
}

.recording-wave span {
  display: inline-block;
  width: 4px;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(255, 255, 255, 0.85) 50%, 
    rgba(255, 255, 255, 0.95) 100%);
  border-radius: 2px;
  animation: wave 1.4s ease-in-out infinite;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.recording-wave span:nth-child(1) {
  animation-delay: 0s;
  height: 8px;
}
.recording-wave span:nth-child(2) {
  animation-delay: 0.1s;
  height: 24px;
}
.recording-wave span:nth-child(3) {
  animation-delay: 0.2s;
  height: 16px;
}
.recording-wave span:nth-child(4) {
  animation-delay: 0.3s;
  height: 32px;
}
.recording-wave span:nth-child(5) {
  animation-delay: 0.4s;
  height: 20px;
}
.recording-wave span:nth-child(6) {
  animation-delay: 0.5s;
  height: 28px;
}
.recording-wave span:nth-child(7) {
  animation-delay: 0.6s;
  height: 12px;
}
.recording-wave span:nth-child(8) {
  animation-delay: 0.7s;
  height: 36px;
}
.recording-wave span:nth-child(9) {
  animation-delay: 0.8s;
  height: 18px;
}
.recording-wave span:nth-child(10) {
  animation-delay: 0.9s;
  height: 26px;
}

@keyframes wave {
  0%, 100% {
    transform: scaleY(0.4);
    opacity: 0.7;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.recording-text {
  font-size: 13px;
  opacity: 0.95;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  flex-shrink: 0;
}

.send-recording {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4),
              0 3px 10px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.send-recording::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.send-recording:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5),
              0 4px 12px rgba(0, 0, 0, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.4);
}

.send-recording:hover::before {
  width: 100%;
  height: 100%;
}

.send-recording:active {
  transform: scale(0.92);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3),
              inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* تحسين زر التسجيل الصوتي */
.voice-record-btn {
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.voice-record-btn.recording {
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  color: white;
  animation: recordPulse 1.5s infinite;
}

/* حالات الضغط للكمبيوتر */
.voice-record-btn:hover {
  background: #e0e0e0;
  transform: scale(1.05);
}

.voice-record-btn:active {
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  transform: scale(0.95);
  color: white;
}

@keyframes recordPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
  }
}

.voice-record-btn:active {
  transform: scale(0.95);
}

/* Tooltip للتسجيل الصوتي */
.voice-record-btn::after {
  content: "اضغط باستمرار للتسجيل";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  margin-bottom: 5px;
}

.voice-record-btn:hover::after {
  opacity: 1;
}

/* أنماط الرسائل الصوتية الاحترافية */
.audio-message-container {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  min-width: 320px;
  max-width: 380px;
  position: relative;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.chat-message.own .audio-message-container {
  background: linear-gradient(135deg, #0255f0 0%, #0041c4 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(2, 85, 240, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.audio-message-container:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.chat-message.own .audio-message-container:hover {
  box-shadow: 0 8px 25px rgba(2, 85, 240, 0.35);
}

/* زر التشغيل/الإيقاف الاحترافي */
.audio-controls {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.audio-play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #e6e6e6);
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.1),
    -3px -3px 8px rgba(255, 255, 255, 0.8), inset 0 0 0 rgba(2, 85, 240, 0);
  color: #0255f0;
  position: relative;
  overflow: hidden;
}

.audio-play-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(2, 85, 240, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.audio-play-btn:hover::before {
  width: 100%;
  height: 100%;
}

.chat-message.own .audio-play-btn {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.95),
    rgba(255, 255, 255, 0.85)
  );
  color: #ffffff;
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.2),
    -3px -3px 8px rgba(255, 255, 255, 0.1);
}

.audio-play-btn:hover {
  transform: scale(1.08);
  box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.15),
    -5px -5px 12px rgba(255, 255, 255, 0.9);
}

.chat-message.own .audio-play-btn:hover {
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3),
    -3px -3px 10px rgba(255, 255, 255, 0.2);
}

.audio-play-btn:active {
  transform: scale(0.96);
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.1),
    inset -2px -2px 5px rgba(255, 255, 255, 0.8);
}

.audio-play-btn.playing {
  animation: audioPlaying 2s infinite;
  background: linear-gradient(145deg, #0255f0, #0041c4);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.chat-message.own .audio-play-btn.playing {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 1),
    rgba(255, 255, 255, 0.9)
  );
  color: #0255f0;
}

@keyframes audioPlaying {
  0% {
    box-shadow: 0 0 0 0 rgba(2, 85, 240, 0.4), 3px 3px 8px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(2, 85, 240, 0.1),
      5px 5px 12px rgba(0, 0, 0, 0.15);
  }
  100% {
    box-shadow: 0 0 0 16px rgba(2, 85, 240, 0), 3px 3px 8px rgba(0, 0, 0, 0.1);
  }
}

/* منطقة الموجات الصوتية المحسنة */
.audio-waveform {
  flex: 1;
  position: relative;
  height: 45px;
  display: flex;
  align-items: center;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.03) 0%,
    rgba(0, 0, 0, 0.05) 100%
  );
  border-radius: 12px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.chat-message.own .audio-waveform {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.12) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.waveform-bars {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 100%;
  width: 100%;
  padding: 8px 0;
}

.waveform-bars .bar {
  width: 4px;
  background: linear-gradient(
    180deg,
    rgba(2, 85, 240, 0.3) 0%,
    rgba(2, 85, 240, 0.5) 100%
  );
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chat-message.own .waveform-bars .bar {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0.6) 100%
  );
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.waveform-bars .bar:hover {
  transform: scaleY(1.2);
  background: linear-gradient(
    180deg,
    rgba(2, 85, 240, 0.5) 0%,
    rgba(2, 85, 240, 0.7) 100%
  );
}

.chat-message.own .waveform-bars .bar:hover {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.6) 0%,
    rgba(255, 255, 255, 0.8) 100%
  );
}

.audio-play-btn.playing ~ .audio-waveform .bar {
  animation: soundWave 1.2s ease-in-out infinite;
}

.audio-play-btn.playing ~ .audio-waveform .bar:nth-child(1) {
  animation-delay: 0s;
}
.audio-play-btn.playing ~ .audio-waveform .bar:nth-child(2) {
  animation-delay: 0.1s;
}
.audio-play-btn.playing ~ .audio-waveform .bar:nth-child(3) {
  animation-delay: 0.2s;
}
.audio-play-btn.playing ~ .audio-waveform .bar:nth-child(4) {
  animation-delay: 0.3s;
}
.audio-play-btn.playing ~ .audio-waveform .bar:nth-child(5) {
  animation-delay: 0.4s;
}
.audio-play-btn.playing ~ .audio-waveform .bar:nth-child(6) {
  animation-delay: 0.3s;
}
.audio-play-btn.playing ~ .audio-waveform .bar:nth-child(7) {
  animation-delay: 0.2s;
}
.audio-play-btn.playing ~ .audio-waveform .bar:nth-child(8) {
  animation-delay: 0.1s;
}
.audio-play-btn.playing ~ .audio-waveform .bar:nth-child(9) {
  animation-delay: 0s;
}
.audio-play-btn.playing ~ .audio-waveform .bar:nth-child(10) {
  animation-delay: 0.1s;
}
.audio-play-btn.playing ~ .audio-waveform .bar:nth-child(11) {
  animation-delay: 0.2s;
}
.audio-play-btn.playing ~ .audio-waveform .bar:nth-child(12) {
  animation-delay: 0.3s;
}
.audio-play-btn.playing ~ .audio-waveform .bar:nth-child(13) {
  animation-delay: 0.4s;
}
.audio-play-btn.playing ~ .audio-waveform .bar:nth-child(14) {
  animation-delay: 0.3s;
}
.audio-play-btn.playing ~ .audio-waveform .bar:nth-child(15) {
  animation-delay: 0.2s;
}
.audio-play-btn.playing ~ .audio-waveform .bar:nth-child(16) {
  animation-delay: 0.1s;
}
.audio-play-btn.playing ~ .audio-waveform .bar:nth-child(17) {
  animation-delay: 0s;
}
.audio-play-btn.playing ~ .audio-waveform .bar:nth-child(18) {
  animation-delay: 0.1s;
}
.audio-play-btn.playing ~ .audio-waveform .bar:nth-child(19) {
  animation-delay: 0.2s;
}
.audio-play-btn.playing ~ .audio-waveform .bar:nth-child(20) {
  animation-delay: 0.3s;
}

@keyframes soundWave {
  0%,
  100% {
    transform: scaleY(0.5);
    opacity: 0.5;
  }
  50% {
    transform: scaleY(1.5);
    opacity: 1;
  }
}

/* شريط التقدم الأنيق */
.audio-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(2, 85, 240, 0.2),
    rgba(2, 85, 240, 0.4)
  );
  border-radius: 12px;
  width: 0%;
  transition: width 0.1s linear;
  backdrop-filter: blur(5px);
}

.audio-progress::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #0255f0;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.chat-message.own .audio-progress {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.35)
  );
}

.chat-message.own .audio-progress::after {
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* عرض الوقت المحسن */
.audio-time {
  display: flex;
  align-items: center;
  min-width: 50px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.chat-message.own .audio-time {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.audio-duration {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  font-family: "SF Pro Display", "Segoe UI", "Roboto", sans-serif;
  letter-spacing: 0.5px;
  text-align: center;
  width: 100%;
}

.chat-message.own .audio-duration {
  color: rgba(255, 255, 255, 0.95);
}

/* إضافة تأثير hover للوقت */
.audio-time:hover {
  background: rgba(2, 85, 240, 0.05);
}

.chat-message.own .audio-time:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ============================================ */
/* أنماط نظام الحضور والانصراف */
/* ============================================ */

/* Dashboard الحضور */
.attendance-dashboard {
  margin: 20px 0 30px 0;
  padding: 0 15px;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.dashboard-card {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.dashboard-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #0255f0, #00a8ff);
}

.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.dashboard-card .card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #0255f0, #00a8ff);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  font-size: 24px;
  color: white;
}

.dashboard-card .card-content h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 16px;
  font-weight: 600;
}

/* بطاقة الحالة */
.status-card .status-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 25px;
  font-weight: 600;
  margin-bottom: 10px;
  min-width: 120px;
  text-align: center;
}

.status-badge.present {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
}

.status-badge.present.late {
  background: linear-gradient(135deg, #ffc107, #ff9800);
  color: white;
}

.status-badge.late {
  background: linear-gradient(135deg, #ffc107, #ff9800);
  color: white;
}

.status-badge.absent {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
}

.status-badge.leave {
  background: linear-gradient(135deg, #17a2b8, #138496);
  color: white;
}

.time-info {
  font-size: 14px;
  color: #666;
  margin-top: 5px;
}

/* بطاقة العداد */
.timer-card .timer-display {
  font-size: 36px;
  font-weight: bold;
  color: #0255f0;
  font-family: 'Courier New', monospace;
  margin: 10px 0;
}

.timer-subtitle {
  font-size: 12px;
  color: #888;
}

/* بطاقة رصيد الإجازات */
.balance-display {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.balance-item {
  text-align: center;
}

.balance-label {
  display: block;
  font-size: 12px;
  color: #888;
  margin-bottom: 5px;
}

.balance-value {
  font-size: 24px;
  font-weight: bold;
  color: #333;
}

.progress-bar-container {
  height: 8px;
  background: #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #28a745, #20c997);
  border-radius: 10px;
  transition: width 0.5s ease;
  position: relative;
}

.progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

/* بطاقة الإحصائيات */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.stat-item {
  text-align: center;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 10px;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: bold;
  color: #0255f0;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
}

/* جدول آخر 5 أيام */
.dashboard-recent-days {
  margin-top: 20px;
}

.dashboard-recent-days .card {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.dashboard-recent-days h4 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.recent-days-table {
  width: 100%;
}

.recent-days-table table {
  width: 100%;
  border-collapse: collapse;
}

.recent-days-table th {
  background: #f8f9fa;
  padding: 10px;
  text-align: right;
  font-weight: 600;
  color: #666;
  font-size: 14px;
  border-bottom: 2px solid #e9ecef;
}

.recent-days-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}

.recent-days-table tr:hover {
  background: #f8f9fa;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* الرسوم البيانية */
.dashboard-charts {
  margin-top: 30px;
}

.charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.chart-card {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.chart-card.full-width {
  grid-column: 1 / -1;
}

.chart-card h4 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
  padding: 10px;
  min-height: 200px;
}

.chart-container canvas {
  max-width: 100% !important;
  width: 100% !important;
  height: 280px !important;
  display: block;
}

/* ===================================
   تحسينات شاملة لتبويب الحضور على الموبايل
   =================================== */
@media (max-width: 768px) {
  /* الحاوية الرئيسية */
  .attendance-container {
    padding: 5px;
    margin: 0;
  }
  
  /* Header الحضور */
  .attendance-header {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
  }
  
  .attendance-header h2 {
    font-size: 18px;
    margin: 0;
  }
  
  /* Dashboard Cards - تحسين العرض */
  .dashboard-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 5px;
  }
  
  .dashboard-card {
    padding: 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: auto;
  }
  
  .dashboard-card .card-icon {
    width: 45px;
    height: 45px;
    min-width: 45px;
    font-size: 18px;
    margin-bottom: 0;
    border-radius: 10px;
  }
  
  .dashboard-card .card-content {
    flex: 1;
    min-width: 0;
  }
  
  .dashboard-card .card-content h4 {
    font-size: 13px;
    margin-bottom: 8px;
  }
  
  /* بطاقة الحالة */
  .status-card .status-badge {
    font-size: 12px;
    padding: 6px 12px;
    min-width: auto;
  }
  
  .time-info {
    font-size: 11px;
    margin-top: 3px;
  }
  
  /* بطاقة العداد */
  .timer-card .timer-display {
    font-size: 20px;
    margin: 5px 0;
  }
  
  .timer-subtitle {
    font-size: 11px;
  }
  
  /* بطاقة رصيد الإجازات */
  .balance-display {
    gap: 10px;
    margin-bottom: 10px;
  }
  
  .balance-value {
    font-size: 18px;
  }
  
  .balance-label {
    font-size: 11px;
  }
  
  .progress-bar-container {
    height: 6px;
  }
  
  /* بطاقة الإحصائيات */
  .stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }
  
  .stat-item {
    flex: 1;
    min-width: calc(50% - 5px);
    padding: 6px;
    border-radius: 6px;
  }
  
  .stat-value {
    font-size: 16px;
    margin-bottom: 2px;
  }
  
  .stat-label {
    font-size: 10px;
  }
  
  /* جدول آخر 5 أيام */
  .dashboard-recent-days {
    margin-top: 15px;
  }
  
  .dashboard-recent-days .card {
    padding: 12px;
    border-radius: 10px;
  }
  
  .dashboard-recent-days h4 {
    font-size: 14px;
    margin-bottom: 12px;
  }
  
  .recent-days-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .recent-days-table table {
    font-size: 11px;
    min-width: 100%;
  }
  
  .recent-days-table th,
  .recent-days-table td {
    padding: 6px 4px;
    white-space: nowrap;
  }
  
  /* Charts - تحسين الرسوم البيانية */
  .dashboard-charts {
    margin-top: 20px;
  }
  
  .charts-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .chart-card {
    padding: 12px;
    border-radius: 10px;
  }
  
  .chart-card h4 {
    font-size: 14px;
    margin-bottom: 12px;
    padding-bottom: 8px;
  }
  
  .chart-container {
    height: 180px;
    padding: 5px;
  }
  
  .chart-container canvas {
    height: 170px !important;
  }
  
  /* View Toggle */
  .section-header {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
  }
  
  .section-header h3 {
    font-size: 16px;
    margin: 0;
  }
  
  .view-toggle {
    order: 2;
    align-self: center;
  }
  
  .view-btn {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .month-selector {
    order: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  
  #currentMonthDisplay {
    font-size: 14px;
    min-width: 100px;
    text-align: center;
    order: 2;
    width: 100%;
    margin: 5px 0;
  }
  
  #prevMonthBtn,
  #nextMonthBtn {
    padding: 8px 12px;
    font-size: 13px;
    min-width: 70px;
    flex: 1;
    max-width: 120px;
  }
  
  .month-nav-btn .btn-text {
    font-size: 12px;
  }
  
  .month-nav-btn i {
    font-size: 11px;
  }
}

/* Timeline View */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.view-toggle {
  display: flex;
  gap: 5px;
  background: #f0f0f0;
  border-radius: 25px;
  padding: 4px;
}

.view-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: #666;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.view-btn:hover {
  background: rgba(2, 85, 240, 0.1);
  color: #0255f0;
}

.view-btn.active {
  background: #0255f0;
  color: white;
}

.view-content {
  display: none;
}

.view-content.active {
  display: block;
}

.timeline-filters {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-group label {
  margin: 0;
  font-weight: 600;
  color: #666;
  font-size: 14px;
}

.filter-group select {
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid #ddd;
  background: white;
  font-size: 14px;
}

/* Timeline Container */
.timeline-container {
  position: relative;
  padding: 20px 0;
  max-height: 600px;
  overflow-y: auto;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #0255f0, #00a8ff);
  opacity: 0.3;
}

/* Timeline Items */
.timeline-item {
  position: relative;
  padding: 20px;
  margin-bottom: 30px;
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}

.timeline-item:nth-child(odd) {
  padding-right: 50%;
  text-align: right;
}

.timeline-item:nth-child(even) {
  padding-left: 50%;
  text-align: left;
}

.timeline-content {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Timeline Dots */
.timeline-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  border: 3px solid white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.timeline-dot.present {
  background: #28a745;
}

.timeline-dot.late {
  background: #ffc107;
}

.timeline-dot.absent {
  background: #dc3545;
}

.timeline-dot.leave {
  background: #17a2b8;
}

/* Timeline Content */
.timeline-date {
  font-size: 14px;
  color: #888;
  margin-bottom: 10px;
}

.timeline-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.timeline-details {
  display: grid;
  gap: 8px;
}

.timeline-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #666;
}

.timeline-detail i {
  color: #0255f0;
  width: 16px;
}

.timeline-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 10px;
}

.timeline-badge.present {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.timeline-badge.late {
  background: rgba(255, 193, 7, 0.1);
  color: #ff9800;
}

.timeline-badge.absent {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.timeline-badge.leave {
  background: rgba(23, 162, 184, 0.1);
  color: #17a2b8;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .timeline-container::before {
    left: 30px;
  }
  
  .timeline-item {
    padding-left: 60px !important;
    padding-right: 20px !important;
    text-align: left !important;
  }
  
  .timeline-dot {
    left: 30px;
  }
  
  .timeline-filters {
    flex-direction: column;
    gap: 10px;
  }
}

/* Mobile Touch Enhancements */
@media (hover: none) and (pointer: coarse) {
  /* أزرار أكبر للمس لكن ليس مبالغ فيها */
  .btn, button {
    min-height: 40px;
    font-size: 14px;
    padding: 10px 16px;
  }
  
  .attendance-buttons {
    flex-direction: column;
    gap: 10px;
  }
  
  .attendance-buttons button {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
  }
  
  /* مسافات مناسبة */
  .dashboard-card {
    padding: 15px;
    margin-bottom: 10px;
  }
  
  /* منع التكبير غير المرغوب */
  input, select, textarea {
    font-size: 16px !important;
  }
  
  /* تحسين اللمس للبطاقات */
  .timeline-content,
  .dashboard-card,
  .chart-card {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
  }
}

/* تحسينات خاصة للشاشات الصغيرة */
@media (max-width: 480px) {
  /* عنوان أصغر */
  .attendance-header h2 {
    font-size: 24px;
  }
  
  /* بطاقات Dashboard مضغوطة */
  .dashboard-card {
    padding: 12px;
  }
  
  .dashboard-card .card-content h4 {
    font-size: 14px;
  }
  
  .balance-value {
    font-size: 18px;
  }
  
  /* جداول مبسطة */
  .table {
    font-size: 12px;
  }
  
  .table th,
  .table td {
    padding: 8px 5px;
  }
  
  /* أزرار أصغر */
  .btn-secondary {
    padding: 8px 12px;
    font-size: 14px;
  }
  
  /* Timeline محسّن */
  .timeline-container {
    padding: 10px 0;
  }
  
  .timeline-item {
    padding: 10px;
    margin-bottom: 20px;
  }
  
  .timeline-content {
    padding: 15px;
  }
  
  /* إخفاء بعض العناصر غير الضرورية */
  .timeline-dot {
    width: 16px;
    height: 16px;
  }
}

/* Swipe Gestures Support */
.swipeable {
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.swipe-indicator {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 1000;
}

@media (max-width: 768px) {
  .swipe-indicator.show {
    display: block;
    animation: fadeInOut 2s ease;
  }
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* أقسام الحضور على الموبايل */
@media (max-width: 768px) {
  /* قسم تسجيل الحضور اليومي */
  .attendance-section {
    margin: 10px 0;
  }
  
  /* استثناء قسم إدارة الإجازات من التنسيقات العامة */
  .attendance-section:not(#leaveManagementSection) .card {
    padding: 12px;
    border-radius: 10px;
    margin: 0 5px;
  }
  
  .attendance-section:not(#leaveManagementSection) h3 {
    font-size: 16px;
    margin-bottom: 12px;
    text-align: center;
  }
  
  /* أزرار الحضور والانصراف */
  .attendance-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 5px;
  }
  
  .btn-large {
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 8px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }
  
  .btn-large i {
    font-size: 16px;
  }
  
  /* حالة الحضور */
  .attendance-status {
    margin-top: 12px;
    padding: 10px;
    font-size: 13px;
    line-height: 1.5;
  }
  
  /* جدول الحضور الشهري */
  #monthlyAttendanceSection .card {
    padding: 12px;
  }
  
  #monthlyAttendanceTable {
    margin-top: 10px;
  }
  
  #monthlyAttendanceTable table {
    font-size: 11px;
  }
  
  #monthlyAttendanceTable th,
  #monthlyAttendanceTable td {
    padding: 6px 4px;
    font-size: 11px;
  }
  
  #monthlyAttendanceTable .badge {
    padding: 2px 5px;
    font-size: 10px;
    border-radius: 8px;
  }
  
  /* Timeline View */
  .timeline-filters {
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }
  
  .filter-group {
    width: 100%;
  }
  
  .filter-group select {
    width: 100%;
    padding: 6px 8px;
    font-size: 13px;
  }
  
  .timeline-container {
    padding: 10px 0;
    max-height: 400px;
  }
  
  .timeline-container::before {
    display: none;
  }
  
  .timeline-item {
    padding: 10px;
    margin-bottom: 15px;
  }
  
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    padding-left: 10px;
    padding-right: 10px;
    text-align: right;
  }
  
  .timeline-content {
    padding: 12px;
    border-radius: 10px;
  }
  
  .timeline-dot {
    display: none;
  }
  
  .timeline-date {
    font-size: 12px;
  }
  
  .timeline-title {
    font-size: 14px;
  }
  
  .timeline-detail {
    font-size: 12px;
  }
}

/* ============================================
   تحسينات إضافية لتبويب الحضور على الموبايل
   ============================================ */

/* wrapper للجداول القابلة للتمرير */
.table-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  margin: 0 -5px;
  padding: 0 5px;
}

.table-wrapper::-webkit-scrollbar {
  height: 6px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* تحسينات للأزرار على الموبايل */
@media (max-width: 768px) {
  .touch-optimized {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
  }
  
  /* تحسين مساحات اللمس */
  .btn, button {
    position: relative;
  }
  
  .btn::before, button::before {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    bottom: -5px;
    left: -5px;
  }
  
  /* البطاقات المضغوطة للشاشات الصغيرة جداً */
  .dashboard-card.mobile-compact {
    padding: 8px;
  }
  
  .dashboard-card.mobile-compact .card-icon {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }
  
  .dashboard-card.mobile-compact h4 {
    font-size: 12px;
  }
  
  /* تحسين قسم الإجازات */
  .leave-section {
    margin: 10px 0;
  }
  
  .leave-form {
    padding: 12px;
  }
  
  .leave-form .form-group {
    margin-bottom: 10px;
  }
  
  .leave-form label {
    font-size: 13px;
    margin-bottom: 5px;
  }
  
  .leave-form input,
  .leave-form select,
  .leave-form textarea {
    font-size: 14px;
    padding: 8px;
  }
  
  /* تحسين القوائم */
  .leave-requests-list,
  .employees-list {
    max-height: 400px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* تحسين الـ modals */
  .modal-content {
    margin: 10px;
    max-height: calc(100vh - 20px);
    overflow-y: auto;
  }
  
  /* تحسين التنبيهات */
  .alert {
    font-size: 13px;
    padding: 10px;
    margin: 5px;
  }
  
  /* تحسين شريط التنقل العلوي */
  .attendance-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(135deg, #0255f0 0%, #000000 100%);
  }
  
  /* تحسين العرض في الوضع الأفقي */
  @media (orientation: landscape) {
    .dashboard-cards {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 8px;
    }
    
    .chart-container {
      height: 150px !important;
    }
    
    .attendance-header {
      padding: 10px;
    }
    
    .attendance-header h2 {
      font-size: 16px;
    }
  }
}

/* تحسينات الأداء */
@media (max-width: 768px) {
  .mobile-optimized * {
    -webkit-tap-highlight-color: transparent;
  }
  
  .mobile-optimized input,
  .mobile-optimized select,
  .mobile-optimized textarea {
    font-size: 16px; /* منع التكبير التلقائي في iOS */
  }
  
  /* تحسين الانتقالات */
  .mobile-optimized .dashboard-card,
  .mobile-optimized .btn,
  .mobile-optimized button {
    transition: transform 0.1s ease;
  }
  
  .mobile-optimized .dashboard-card:active,
  .mobile-optimized .btn:active,
  .mobile-optimized button:active {
    transform: scale(0.98);
  }
}

/* ============================================
   Mobile Bottom Navigation - Professional Design
   ============================================ */

/* إخفاء التبويبات العادية على الموبايل */
@media (max-width: 768px) {
  .tabs {
    display: none !important;
  }
  
  /* تعديل padding للمحتوى */
  .tab-content {
    padding: 5px;
  }
  
  #attendanceTab {
    padding: 0;
  }
}

/* Mobile Navigation Container - Premium Glass Design */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #000000;
  z-index: 1000;
  border-top: none;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* حالة الإظهار للـ Mobile Nav */
.mobile-nav.ready {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .mobile-nav.logged-in {
    display: block;
  }
  
  /* تعديل padding للمحتوى ليترك مساحة للـ navigation */
  body {
    padding-bottom: 75px;
  }
}

/* Navigation Container */
.mobile-nav-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 65px;
  padding: 0 10px;
  position: relative;
}

/* Navigation Items */
.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  border: none;
  background: transparent;
  color: #ffffff;
  padding: 8px 5px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  outline: none;
  font-family: 'Cairo', sans-serif;
}

/* Hidden state for mobile nav items */
.mobile-nav-item.hidden {
  display: none !important;
}

/* Icon Wrapper with Badge */
.nav-icon-wrapper {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Navigation Icon */
.nav-icon {
  width: 24px;
  height: 24px;
  stroke-width: 2;
  fill: none;
  transition: all 0.3s ease;
}

/* Navigation Label */
.nav-label {
  font-size: 11px;
  font-weight: 500;
  margin-top: 4px;
  transition: all 0.3s ease;
  white-space: nowrap;
  opacity: 1;
  color: #ffffff;
}

/* Active Indicator Line */
.nav-indicator {
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: linear-gradient(90deg, #0255f0, #00a8ff);
  border-radius: 0 0 3px 3px;
  opacity: 0;
  transform: scaleX(0);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Notification Badge */
.nav-badge {
  position: absolute;
  top: -5px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: linear-gradient(135deg, #ff5252, #ff1744);
  color: white;
  font-size: 10px;
  font-weight: bold;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(255, 23, 68, 0.4);
  animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Active State - Modern Style */
.mobile-nav-item.active {
  color: #0255f0;
}

.mobile-nav-item.active .nav-icon-wrapper {
  transform: translateY(-3px) scale(1.1);
  background: linear-gradient(135deg, rgba(2, 85, 240, 0.1), rgba(0, 168, 255, 0.1));
  border-radius: 12px;
  padding: 4px;
}

.mobile-nav-item.active .nav-icon {
  stroke: #0255f0;
  stroke-width: 2.5;
  filter: drop-shadow(0 2px 4px rgba(2, 85, 240, 0.2));
}

.mobile-nav-item.active .nav-label {
  color: #0255f0;
  font-weight: 600;
  opacity: 1;
  transform: translateY(-2px);
}

.mobile-nav-item.active .nav-indicator {
  opacity: 1;
  transform: scaleX(1);
  background: linear-gradient(90deg, #0255f0, #00a8ff);
  height: 2px;
  box-shadow: 0 -2px 8px rgba(2, 85, 240, 0.4);
}

/* Hover/Touch Effects */
.mobile-nav-item:active {
  transform: scale(0.95);
}

.mobile-nav-item:active .nav-icon-wrapper {
  transform: scale(1.2) translateY(-4px);
}

/* Ripple Effect on Click */
.mobile-nav-item::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.5s ease;
}

.mobile-nav-item:active::after {
  transform: translate(-50%, -50%) scale(2);
}

/* Special Menu Button */
#mobileMenuBtn {
  position: relative;
}

#mobileMenuBtn .nav-icon-wrapper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#mobileMenuBtn:hover .nav-icon-wrapper::before {
  opacity: 1;
}

/* Animation for Page Changes */
@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.mobile-nav.show {
  animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Landscape Mode Adjustments */
@media (max-width: 768px) and (orientation: landscape) {
  .mobile-nav-container {
    height: 55px;
  }
  
  .nav-icon-wrapper {
    width: 24px;
    height: 24px;
  }
  
  .nav-icon {
    width: 20px;
    height: 20px;
  }
  
  .nav-label {
    font-size: 10px;
  }
  
  body {
    padding-bottom: 60px;
  }
}

/* Small Phone Adjustments */
@media (max-width: 360px) {
  .nav-label {
    font-size: 10px;
  }
  
  .nav-icon {
    width: 22px;
    height: 22px;
  }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
  .mobile-nav {
    background: rgba(30, 30, 30, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .mobile-nav-item {
    color: rgba(255, 255, 255, 0.7);
  }
  
  .mobile-nav-item.active {
    color: #4da3ff;
  }
  
  .mobile-nav-item.active .nav-icon {
    stroke: #4da3ff;
  }
  
  .mobile-nav-item.active .nav-label {
    color: #4da3ff;
  }
}

/* ============================================
   Mobile Menu Overlay - Professional Design
   ============================================ */

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 2000;
  transition: background 0.3s ease;
}

.mobile-menu-overlay.show {
  display: block;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.mobile-menu {
  position: absolute;
  bottom: -100%;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
  border-radius: 30px 30px 0 0;
  padding: 15px;
  padding-top: 10px;
  max-height: 70vh;
  overflow-y: auto;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 -20px 60px rgba(2, 85, 240, 0.3),
    0 -10px 30px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(2, 85, 240, 0.2);
}

.mobile-menu-overlay.show .mobile-menu {
  bottom: 0;
}

/* Menu Header */
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px 5px 15px;
  border-bottom: 1px solid rgba(2, 85, 240, 0.3);
  position: relative;
}

.mobile-menu-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #0255f0, transparent);
  opacity: 0.5;
}

.mobile-menu-header h3 {
  margin: 0;
  font-size: 22px;
  color: #0255f0;
  font-weight: 700;
}

.mobile-menu-close {
  width: 38px;
  height: 38px;
  border: none;
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.mobile-menu-close svg {
  width: 30px;
  height: 30px;
  stroke: #999;
}

.mobile-menu-close:hover {
  background: linear-gradient(135deg, #ff5252, #ff1744);
  transform: rotate(-90deg);
}

.mobile-menu-close:hover svg {
  stroke: white;
}

.mobile-menu-close:active {
  transform: scale(0.9) rotate(-90deg);
}

/* Menu Items */
.mobile-menu-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px;
  background: linear-gradient(135deg, 
    rgba(26, 26, 26, 0.9) 0%, 
    rgba(20, 20, 20, 0.9) 100%);
  border: 1px solid rgba(2, 85, 240, 0.3);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  font-family: 'Cairo', sans-serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.mobile-menu-item:hover {
  background: linear-gradient(135deg, 
    rgba(40, 40, 40, 1) 0%, 
    rgba(30, 30, 30, 1) 100%);
  border-color: rgba(2, 85, 240, 0.5);
  transform: translateX(-2px);
  box-shadow: 0 4px 12px rgba(2, 85, 240, 0.3);
}

.mobile-menu-item:active {
  transform: scale(0.98);
  background: linear-gradient(135deg, 
    rgba(50, 50, 50, 1) 0%, 
    rgba(40, 40, 40, 1) 100%);
}

.mobile-menu-item.hidden {
  display: none;
}

.menu-item-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #0255f0, #00a8ff);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 4px 12px rgba(2, 85, 240, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.mobile-menu-item:hover .menu-item-icon {
  transform: rotate(-5deg) scale(1.05);
  box-shadow: 
    0 6px 16px rgba(2, 85, 240, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.menu-item-icon svg {
  width: 24px;
  height: 24px;
  stroke: white;
  stroke-width: 2;
  fill: none;
}

.menu-item-label {
  flex: 1;
  text-align: right;
  font-size: 16px;
  font-weight: 500;
  color: #e0e0e0;
}

.menu-item-arrow {
  width: 20px;
  height: 20px;
  stroke: #888;
  transition: transform 0.3s ease;
}

.mobile-menu-item:hover .menu-item-arrow {
  transform: translateX(-3px);
}

/* Menu Divider */
.mobile-menu-divider {
  height: 1px;
  background: rgba(2, 85, 240, 0.3);
  margin: 15px 0;
}

/* Logout Item Special Styling */
.logout-item {
  background: #fff3e0;
  margin-top: 10px;
}

.logout-item .menu-item-icon {
  background: #ff5252;
}

.logout-item .menu-item-icon svg {
  stroke: white;
}

.logout-item .menu-item-label {
  color: #ff5252;
  font-weight: 600;
}

/* Animation Classes */
@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.mobile-menu.animate-in {
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Drag Handle */
.mobile-menu::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 100px;
}

/* Smooth Scrollbar */
.mobile-menu::-webkit-scrollbar {
  width: 6px;
}

.mobile-menu::-webkit-scrollbar-track {
  background: transparent;
}

.mobile-menu::-webkit-scrollbar-thumb {
  background: rgba(2, 85, 240, 0.2);
  border-radius: 3px;
}

.mobile-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(2, 85, 240, 0.3);
}

/* إخفاء تبويب الحضور من المدير ونائب المدير */
#attendanceTabButton.hidden {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  left: -9999px !important;
}

/* إخفاء التبويب للمدير ونائب المدير بناءً على data attribute */
body[data-user-role="boss"] #attendanceTabButton,
body[data-user-role="deputy_manager"] #attendanceTabButton {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  left: -9999px !important;
}

body[data-user-role="boss"] #attendanceTab,
body[data-user-role="deputy_manager"] #attendanceTab {
  display: none !important;
  visibility: hidden !important;
}

.alert {
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  position: relative;
  animation: slideInDown 0.3s ease;
}

.alert-info {
  color: #31708f;
  background-color: #d9edf7;
  border-color: #bce8f1;
}

.alert-success {
  color: #3c763d;
  background-color: #dff0d8;
  border-color: #d6e9c6;
}

.alert-warning {
  color: #8a6d3b;
  background-color: #fcf8e3;
  border-color: #faebcc;
}

.alert-danger {
  color: #a94442;
  background-color: #f2dede;
  border-color: #ebccd1;
}

.alert-dismissible .close {
  position: absolute;
  top: 0;
  right: 0;
  padding: 15px;
  color: inherit;
  background: none;
  border: none;
  font-size: 21px;
  cursor: pointer;
  opacity: 0.5;
}

.alert-dismissible .close:hover {
  opacity: 0.75;
}

.attendance-container {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* تحسينات إضافية للموبايل */
@media (max-width: 480px) {
  /* شاشات صغيرة جداً */
  .dashboard-card {
    flex-direction: column;
    text-align: center;
    padding: 10px;
  }
  
  .dashboard-card .card-icon {
    margin: 0 auto 8px;
  }
  
  .stats-grid {
    flex-direction: column;
  }
  
  .stat-item {
    width: 100%;
  }
  
  .balance-display {
    flex-direction: column;
    gap: 8px;
  }
  
  .balance-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
  }
  
  .balance-item:last-child {
    border-bottom: none;
  }
  
  /* جعل الجداول قابلة للتمرير */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -5px;
  }
  
  .table-responsive table {
    min-width: 300px;
  }
}

/* تحسينات لواجهة المشرف على الموبايل */
@media (max-width: 768px) {
  .supervisor-section .card {
    padding: 12px;
  }
  
  .supervisor-tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 5px;
    padding: 5px 0;
    margin-bottom: 15px;
  }
  
  .supervisor-tabs .btn {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 12px;
    padding: 6px 12px;
  }
  
  /* جدول الموظفين */
  .employees-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .employees-table table {
    font-size: 11px;
    min-width: 500px;
  }
  
  .employees-table th,
  .employees-table td {
    padding: 6px 4px;
  }
  
  /* إحصائيات الفريق */
  .team-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .team-stat-card {
    padding: 10px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
  }
  
  .team-stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #0255f0;
  }
  
  .team-stat-label {
    font-size: 11px;
    color: #666;
  }
  
  /* ============================================
     تحسينات قسم إدارة الإجازات للموبايل
     ============================================ */
  
  /* الكارد الرئيسي */
  #leaveManagementSection .card {
    padding: 20px 15px;
    border-radius: 16px;
    margin-bottom: 20px;
  }
  
  #leaveManagementSection .card h3 {
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 12px;
  }
  
  /* الأقسام الفرعية */
  .leave-subsection {
    padding: 18px 15px;
    margin-bottom: 25px;
    border-radius: 14px;
  }
  
  .leave-subsection h4 {
    font-size: 17px;
    margin-bottom: 18px;
    padding-bottom: 10px;
  }
  
  .leave-subsection h4::before {
    display: none; /* إخفاء الخط الجانبي على الموبايل */
  }
  
  /* الرصيد المتاح */
  .leave-balance {
    padding: 14px 16px;
    font-size: 15px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .leave-balance .badge {
    padding: 8px 16px;
    font-size: 15px;
    width: 100%;
    text-align: center;
  }
  
  /* حقول النموذج */
  #leaveManagementSection .form-group {
    margin-bottom: 18px;
  }
  
  #leaveManagementSection .form-group label {
    font-size: 14px;
    margin-bottom: 6px;
  }
  
  #leaveManagementSection .form-control {
    padding: 14px 16px;
    font-size: 16px; /* منع التكبير التلقائي في iOS */
    border-radius: 10px;
  }
  
  #leaveManagementSection textarea.form-control {
    min-height: 90px;
  }
  
  /* Checkbox */
  #leaveManagementSection .custom-control {
    padding: 14px 16px;
    margin-bottom: 16px;
  }
  
  #leaveManagementSection .custom-control-label {
    font-size: 14px;
  }
  
  #leaveManagementSection .custom-control-label small {
    font-size: 12px;
    margin-top: 5px;
  }
  
  /* الأزرار */
  #leaveManagementSection .btn {
    padding: 14px 24px;
    font-size: 15px;
    width: 100%;
    border-radius: 10px;
  }
  
  /* بطاقات الطلبات */
  .request-card {
    padding: 16px;
    margin-bottom: 14px;
    border-radius: 12px;
  }
  
  .request-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .request-dates {
    font-size: 15px;
  }
  
  .request-body {
    font-size: 13px;
  }
  
  .rejection-reason {
    padding: 12px 14px;
    font-size: 13px;
  }
  
  /* قائمة الطلبات */
  .leave-requests-list {
    max-height: 400px;
    padding: 6px;
  }
  
  /* رسائل الحالة */
  .status-message {
    padding: 12px 16px;
    font-size: 13px;
    margin-top: 15px;
  }
  
  /* صفوف النموذج */
  .form-row {
    flex-direction: column;
    gap: 15px;
  }
}

/* حالة اليوم - التأخير والحضور */
.status-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 20px;
  border-left: 4px solid #28a745;
}

.status-card.late {
  border-left-color: #ffc107;
  background: linear-gradient(135deg, #fffef5, #fff);
}

.status-card.on-time {
  border-left-color: #28a745;
  background: linear-gradient(135deg, #f0fff4, #fff);
}

.late-badge {
  display: inline-block;
  padding: 4px 8px;
  background: linear-gradient(135deg, #ffc107, #ff9800);
  color: white;
  border-radius: 20px;
  font-size: 12px;
  margin-left: 10px;
  font-weight: 600;
  animation: pulse 2s infinite;
}

.on-time-badge {
  display: inline-block;
  padding: 4px 8px;
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border-radius: 20px;
  font-size: 12px;
  margin-left: 10px;
  font-weight: 600;
}

/* معلومات التأخير */
.late-info-card {
  background: linear-gradient(135deg, #fff3cd, #ffe4b5);
  border: 1px solid #ffc107;
  border-radius: 10px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  animation: slideInLeft 0.5s ease;
}

.late-info-card i {
  font-size: 24px;
  color: #ff9800;
  animation: shake 0.5s;
}

.late-info-card strong {
  color: #d84315;
  display: block;
  margin-bottom: 5px;
}

.late-info-card p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

/* بطاقات طلبات الإجازة */
.request-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  border-left: 4px solid #ddd;
}

.request-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* حالات الإجازات */
.leave-status-approved {
  border-left-color: #28a745;
  background: linear-gradient(135deg, #f0fff4, #fff);
}

.leave-status-rejected {
  border-left-color: #dc3545;
  background: linear-gradient(135deg, #fff5f5, #fff);
}

.leave-status-pending {
  border-left-color: #ffc107;
  background: linear-gradient(135deg, #fffef5, #fff);
}

/* شارات الحالة */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.status-badge i {
  font-size: 14px;
}

.status-approved {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
}

.status-rejected {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
}

.status-pending {
  background: linear-gradient(135deg, #ffc107, #ff9800);
  color: white;
}

/* رسالة الرفض */
.rejection-reason {
  margin-top: 15px;
  padding: 12px;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 8px;
  color: #721c24;
  font-size: 14px;
}

.rejection-reason i {
  margin-left: 5px;
  color: #dc3545;
}

/* معلومات الموافقة */
.approval-info {
  margin-top: 15px;
  padding: 10px;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 8px;
  color: #155724;
  font-size: 13px;
}

.approval-info i {
  margin-left: 5px;
  color: #28a745;
}

/* جدول الحضور للتأخير */
.table tr.status-late {
  background-color: #fff3cd;
}

.table tr.status-present {
  background-color: #d4edda;
}

.table tr.status-absent {
  background-color: #f8d7da;
}

/* جدول الحضور الشهري */
#monthlyAttendanceTable {
  overflow-x: auto;
  margin-top: 20px;
}

#monthlyAttendanceTable table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#monthlyAttendanceTable th {
  background: linear-gradient(135deg, #0255f0, #0040c0);
  color: white;
  padding: 12px;
  text-align: right;
  font-weight: 600;
  border: none;
}

#monthlyAttendanceTable td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  text-align: right;
}

#monthlyAttendanceTable tbody tr:hover {
  background-color: #f0f4ff !important;
}

#monthlyAttendanceTable .badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

#monthlyAttendanceTable .badge.badge-present {
  background: #28a745;
  color: white;
}

#monthlyAttendanceTable .badge.badge-late {
  background: #ffc107;
  color: #333;
}

#monthlyAttendanceTable .badge.badge-absent {
  background: #dc3545;
  color: white;
}

/* أنيميشن */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-2px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(2px);
  }
}

.attendance-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 25px;
  background: linear-gradient(135deg, #0255f0 0%, #000000 100%);
  border-radius: 15px;
  color: white;
  box-shadow: 0 10px 30px rgba(2, 85, 240, 0.3);
  position: relative;
  overflow: hidden;
}

.attendance-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shimmerHeader 3s infinite;
}

@keyframes shimmerHeader {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.attendance-header h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

.attendance-section {
  margin-bottom: 30px;
}

.attendance-section .card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(2, 85, 240, 0.1);
  border: 1px solid rgba(2, 85, 240, 0.1);
  transition: all 0.3s ease;
}

.attendance-section .card:hover {
  box-shadow: 0 8px 25px rgba(2, 85, 240, 0.15);
  transform: translateY(-2px);
}

.attendance-section h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  font-size: 22px;
  border-bottom: 2px solid #0255f0;
  padding-bottom: 10px;
}

/* أزرار الحضور والانصراف */
.attendance-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
}

.btn-large {
  padding: 15px 40px;
  font-size: 18px;
  border-radius: 50px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-large::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 ease;
}

.btn-large:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.btn-large:hover::before {
  left: 100%;
}

.btn-large:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-large:disabled::before {
  display: none;
}

/* حالة الحضور */
.attendance-status {
  margin-top: 20px;
}

.status-card {
  background: linear-gradient(135deg, #e6f1ff 0%, #cce3ff 100%);
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid #0255f0;
}

.status-card h4 {
  margin-top: 0;
  color: #333;
}

.status-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.status-item:last-child {
  border-bottom: none;
}

.status-label {
  font-weight: 600;
  color: #555;
}

.status-value {
  color: #333;
  font-weight: 500;
}

/* سجل الحضور الشهري */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.month-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.month-selector button {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  min-width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 2px solid #0255f0;
  background: white;
  color: #0255f0;
  transition: all 0.3s ease;
}

.month-selector button:hover {
  background: #0255f0;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(2, 85, 240, 0.3);
}

.month-selector button:active {
  transform: translateY(0);
}

.month-selector .btn-text {
  font-size: 13px;
  font-weight: 500;
}

.month-selector button i {
  font-size: 12px;
}

#currentMonthDisplay {
  font-size: 18px;
  font-weight: 600;
  color: #0255f0;
  min-width: 150px;
  text-align: center;
}

.attendance-table {
  overflow-x: auto;
  margin: 20px 0;
}

.attendance-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.attendance-table th {
  background: linear-gradient(135deg, #0255f0 0%, #003566 100%);
  color: white;
  padding: 12px;
  text-align: right;
  font-weight: 600;
}

.attendance-table td {
  padding: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.attendance-table tr:hover {
  background: #f8f9fa;
}

.attendance-table tr.status-present {
  background: rgba(76, 175, 80, 0.05);
}

.attendance-table tr.status-late {
  background: rgba(255, 193, 7, 0.05);
}

.attendance-table tr.status-absent {
  background: rgba(244, 67, 54, 0.05);
}

/* الإحصائيات */
.attendance-statistics {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #f0f7ff 0%, #e6f1ff 100%);
  border-radius: 10px;
  border: 1px solid rgba(2, 85, 240, 0.1);
}

.stat-item {
  text-align: center;
  padding: 10px;
  background: white;
  border-radius: 8px;
  min-width: 120px;
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(2, 85, 240, 0.2);
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #0255f0;
}

/* ============================================
   قسم إدارة الإجازات - تصميم احترافي محسّن
   ============================================ */

/* تحسين الكارد الرئيسي لقسم الإجازات */
#leaveManagementSection .card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 35px;
  margin-bottom: 30px;
  box-shadow: 
    0 10px 40px rgba(2, 85, 240, 0.12),
    0 4px 15px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(2, 85, 240, 0.15);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#leaveManagementSection .card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #0255f0 0%, #003566 50%, #0255f0 100%);
  background-size: 200% 100%;
  animation: shimmer-border 3s linear infinite;
}

@keyframes shimmer-border {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

#leaveManagementSection .card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(2, 85, 240, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

#leaveManagementSection .card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 15px 50px rgba(2, 85, 240, 0.18),
    0 6px 20px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border-color: rgba(2, 85, 240, 0.25);
}

#leaveManagementSection .card h3 {
  margin-top: 0;
  margin-bottom: 30px;
  color: #0255f0;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
  text-shadow: 0 2px 4px rgba(2, 85, 240, 0.1);
}

#leaveManagementSection .card h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #0255f0, transparent);
  border-radius: 2px;
}

/* الأقسام الفرعية للإجازات - تصميم احترافي */
.leave-subsection {
  margin-bottom: 35px;
  padding: 28px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 16px;
  border: 1px solid rgba(2, 85, 240, 0.12);
  box-shadow: 
    0 4px 20px rgba(2, 85, 240, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.leave-subsection::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #0255f0 0%, #003566 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.leave-subsection:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 30px rgba(2, 85, 240, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border-color: rgba(2, 85, 240, 0.2);
}

.leave-subsection:hover::before {
  opacity: 1;
}

.leave-subsection h4 {
  margin-top: 0;
  color: #0255f0;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(2, 85, 240, 0.1);
}

.leave-subsection h4::before {
  content: '';
  width: 4px;
  height: 20px;
  background: linear-gradient(135deg, #0255f0 0%, #003566 100%);
  border-radius: 2px;
  position: absolute;
  right: -28px;
  top: 50%;
  transform: translateY(-50%);
}

/* تحسين عرض الرصيد المتاح */
.leave-balance {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
  font-size: 17px;
  font-weight: 500;
  color: #334155;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(2, 85, 240, 0.05) 0%, rgba(0, 53, 102, 0.03) 100%);
  border-radius: 12px;
  border: 1px solid rgba(2, 85, 240, 0.1);
}

.leave-balance span:first-child {
  color: #475569;
  font-weight: 600;
}

.leave-balance .badge {
  padding: 10px 20px;
  font-size: 17px;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 
    0 4px 12px rgba(76, 175, 80, 0.25),
    0 2px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.leave-balance .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 ease;
}

.leave-balance .badge:hover::before {
  left: 100%;
}

.leave-balance .badge:hover {
  transform: scale(1.05);
  box-shadow: 
    0 6px 18px rgba(76, 175, 80, 0.35),
    0 3px 9px rgba(0, 0, 0, 0.15);
}

.badge-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.badge-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.badge-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

/* ============================================
   تحسين نماذج طلبات الإجازة
   ============================================ */

/* تحسين حقول النموذج في قسم الإجازات */
#leaveManagementSection .form-group {
  margin-bottom: 20px;
}

#leaveManagementSection .form-group label {
  display: block;
  margin-bottom: 8px;
  color: #334155;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.3s ease;
}

#leaveManagementSection .form-group label:hover {
  color: #0255f0;
}

#leaveManagementSection .form-control {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  border: 2px solid rgba(2, 85, 240, 0.15);
  border-radius: 12px;
  background: #ffffff;
  color: #1e293b;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(2, 85, 240, 0.05);
}

#leaveManagementSection .form-control:focus {
  outline: none;
  border-color: #0255f0;
  box-shadow: 
    0 0 0 4px rgba(2, 85, 240, 0.1),
    0 4px 12px rgba(2, 85, 240, 0.15);
  background: #ffffff;
  transform: translateY(-1px);
}

#leaveManagementSection .form-control:hover:not(:focus) {
  border-color: rgba(2, 85, 240, 0.25);
  box-shadow: 0 2px 8px rgba(2, 85, 240, 0.08);
}

#leaveManagementSection textarea.form-control {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  line-height: 1.6;
}

#leaveManagementSection select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230255f0' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 16px center;
  padding-left: 40px;
}

/* تحسين Checkbox في قسم الإجازة الأسبوعية */
#leaveManagementSection .custom-control {
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.8) 100%);
  border-radius: 12px;
  border: 2px solid rgba(2, 85, 240, 0.1);
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

#leaveManagementSection .custom-control:hover {
  border-color: rgba(2, 85, 240, 0.2);
  background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(248, 250, 252, 0.95) 100%);
  box-shadow: 0 4px 12px rgba(2, 85, 240, 0.1);
}

#leaveManagementSection .custom-control-input:checked ~ .custom-control-label {
  color: #0255f0;
}

#leaveManagementSection .custom-control-label {
  cursor: pointer;
  font-size: 15px;
  line-height: 1.6;
  color: #334155;
}

#leaveManagementSection .custom-control-label strong {
  color: #0255f0;
  font-weight: 600;
}

#leaveManagementSection .custom-control-label small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

/* تحسين الأزرار في قسم الإجازات */
#leaveManagementSection .btn {
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 4px 12px rgba(2, 85, 240, 0.2),
    0 2px 6px rgba(0, 0, 0, 0.1);
}

#leaveManagementSection .btn::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 ease;
}

#leaveManagementSection .btn:hover::before {
  left: 100%;
}

#leaveManagementSection .btn-primary {
  background: linear-gradient(135deg, #0255f0 0%, #003566 100%);
  color: white;
}

#leaveManagementSection .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(2, 85, 240, 0.35),
    0 4px 12px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #0366ff 0%, #0041c4 100%);
}

#leaveManagementSection .btn-primary:active {
  transform: translateY(0);
  box-shadow: 
    0 2px 8px rgba(2, 85, 240, 0.25),
    0 1px 4px rgba(0, 0, 0, 0.1);
}

/* تحسين صفوف النموذج */
.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.form-row .form-group {
  flex: 1;
}

@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 15px;
  }
}

/* ============================================
   بطاقات طلبات الإجازة - تصميم احترافي
   ============================================ */

.request-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  padding: 22px;
  border-radius: 14px;
  margin-bottom: 18px;
  border-right: 4px solid #cbd5e1;
  border-left: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 2px 8px rgba(2, 85, 240, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.request-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: #cbd5e1;
  transition: all 0.3s ease;
}

.request-card.status-pending {
  border-right-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.request-card.status-pending::before {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.request-card.status-approved {
  border-right-color: #10b981;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.request-card.status-approved::before {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.request-card.status-rejected {
  border-right-color: #ef4444;
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

.request-card.status-rejected::before {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.request-card:hover {
  transform: translateX(-4px) translateY(-2px);
  box-shadow: 
    0 8px 24px rgba(2, 85, 240, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.08);
  border-right-width: 5px;
}

.request-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.request-dates {
  font-weight: 700;
  color: #0255f0;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.request-dates::before {
  content: '📅';
  font-size: 18px;
}

.request-body {
  color: #475569;
  line-height: 1.7;
  font-size: 14px;
  margin-bottom: 12px;
}

.request-body strong {
  color: #334155;
  font-weight: 600;
}

.rejection-reason {
  margin-top: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
  border-radius: 10px;
  color: #dc2626;
  border-right: 3px solid #ef4444;
  font-size: 14px;
  line-height: 1.6;
  position: relative;
}

.rejection-reason::before {
  content: '⚠️';
  margin-left: 8px;
}

/* قائمة طلبات الإجازة */
.leave-requests-list {
  max-height: 500px;
  overflow-y: auto;
  padding: 8px;
  margin-top: 15px;
}

.leave-requests-list::-webkit-scrollbar {
  width: 8px;
}

.leave-requests-list::-webkit-scrollbar-track {
  background: rgba(2, 85, 240, 0.05);
  border-radius: 10px;
}

.leave-requests-list::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #0255f0 0%, #003566 100%);
  border-radius: 10px;
}

.leave-requests-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #0366ff 0%, #0041c4 100%);
}

/* رسالة الحالة الفارغة */
.leave-requests-list:empty::before {
  content: 'لا توجد طلبات سابقة';
  display: block;
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
  font-size: 16px;
  font-style: italic;
}

/* رسائل الحالة (Status Messages) */
.status-message {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  animation: slideDown 0.3s ease;
  position: relative;
  overflow: hidden;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.status-message.success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
  color: #059669;
  border-right: 3px solid #10b981;
}

.status-message.error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
  color: #dc2626;
  border-right: 3px solid #ef4444;
}

.status-message.info {
  background: linear-gradient(135deg, rgba(2, 85, 240, 0.1) 0%, rgba(0, 53, 102, 0.05) 100%);
  color: #0255f0;
  border-right: 3px solid #0255f0;
}

.status-message.warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.05) 100%);
  color: #d97706;
  border-right: 3px solid #f59e0b;
}

/* ============================================
   شارات الحالة لطلبات الإجازة
   ============================================ */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.status-badge i {
  font-size: 12px;
}

.status-badge.status-pending {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.status-badge.status-approved {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.status-badge.status-rejected {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

/* تحسين بطاقات الطلبات حسب الحالة */
.request-card.leave-status-pending {
  border-right-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.request-card.leave-status-pending::before {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.request-card.leave-status-approved {
  border-right-color: #10b981;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.request-card.leave-status-approved::before {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.request-card.leave-status-rejected {
  border-right-color: #ef4444;
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

.request-card.leave-status-rejected::before {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* تحسين النصوص في بطاقات الطلبات */
.request-body .text-muted {
  color: #64748b !important;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.request-body .text-muted i {
  color: #0255f0;
  font-size: 12px;
}

.request-body p {
  margin: 0 0 8px 0;
  color: #475569;
  line-height: 1.7;
}

/* تحسين alert في بطاقات الطلبات */
.request-card .alert {
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: 10px;
  border: none;
  border-right: 3px solid;
  font-size: 14px;
  line-height: 1.6;
}

.request-card .alert-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
  color: #dc2626;
  border-right-color: #ef4444;
}

.request-card .alert-danger i {
  margin-left: 6px;
}

.request-card .alert-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
  color: #059669;
  border-right-color: #10b981;
}

.request-card .alert-success i {
  margin-left: 6px;
}

/* تحسين الأيقونات في التواريخ */
.request-dates i {
  color: #0255f0;
  font-size: 14px;
  margin-left: 6px;
}

/* قسم المشرف */
.supervisor-section {
  background: linear-gradient(135deg, #001d3d 0%, #003566 100%);
  padding: 30px;
  border-radius: 15px;
  margin-top: 40px;
  box-shadow: 0 10px 30px rgba(2, 85, 240, 0.2);
}

.supervisor-section h3 {
  color: #0255f0;
  font-size: 24px;
  margin-bottom: 30px;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.supervisor-subsection {
  background: rgba(255, 255, 255, 0.98);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.supervisor-subsection h4 {
  margin-top: 0;
  color: #0255f0;
  border-bottom: 2px solid #0255f0;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

/* تقرير الحضور اليومي */
.date-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.date-selector input[type="date"] {
  padding: 10px 12px;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  font-size: 14px;
  transition: all 0.3s ease;
  background: white;
  flex: 1;
  min-width: 120px;
}

.date-selector input[type="date"]:focus {
  border-color: #0255f0;
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 85, 240, 0.1);
}

.date-selector button {
  padding: 10px 18px;
  background: linear-gradient(135deg, #0255f0 0%, #003566 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.date-selector button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(2, 85, 240, 0.3);
}

/* الإحصائيات المحسنة */
.report-summary-enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.summary-card {
  background: white;
  border-radius: 15px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
}

.summary-card.present-card::before {
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
}

.summary-card.late-card::before {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.summary-card.absent-card::before {
  background: linear-gradient(135deg, #f44336 0%, #c62828 100%);
}

.summary-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.summary-card.present-card:hover {
  border-color: #4caf50;
}

.summary-card.late-card:hover {
  border-color: #ff9800;
}

.summary-card.absent-card:hover {
  border-color: #f44336;
}

.summary-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.present-card .summary-icon {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
}

.late-card .summary-icon {
  background: rgba(255, 152, 0, 0.1);
  color: #ff9800;
}

.absent-card .summary-icon {
  background: rgba(244, 67, 54, 0.1);
  color: #f44336;
}

.summary-content {
  flex: 1;
}

.summary-number {
  font-size: 32px;
  font-weight: 700;
  color: #333;
  line-height: 1;
}

.summary-label {
  font-size: 14px;
  color: #666;
  margin-top: 5px;
  font-weight: 500;
}

.summary-percentage {
  font-size: 18px;
  font-weight: 600;
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
}

.present-card .summary-percentage {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
}

.late-card .summary-percentage {
  background: rgba(255, 152, 0, 0.1);
  color: #ff9800;
}

.absent-card .summary-percentage {
  background: rgba(244, 67, 54, 0.1);
  color: #f44336;
}

/* الجدول المحسن */
.table-responsive {
  overflow-x: auto;
  background: white;
  border-radius: 15px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  padding: 0;
}

.attendance-report-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
}

.attendance-report-table thead {
  background: linear-gradient(135deg, #0255f0 0%, #003566 100%);
}

.attendance-report-table th {
  color: white;
  padding: 18px 20px;
  text-align: right;
  font-weight: 600;
  border: none;
  position: relative;
  white-space: nowrap;
}

.attendance-report-table th:first-child {
  border-radius: 15px 0 0 0;
}

.attendance-report-table th:last-child {
  border-radius: 0 15px 0 0;
}

.attendance-report-table th i {
  margin-left: 8px;
  opacity: 0.8;
}

.attendance-report-table tbody tr {
  transition: all 0.3s ease;
  border-bottom: 1px solid #f5f5f5;
}

.attendance-report-table tbody tr:hover {
  background: rgba(2, 85, 240, 0.03);
  transform: scale(1.01);
}

.attendance-report-table tbody tr.even-row {
  background: #fafafa;
}

.attendance-report-table tbody tr.odd-row {
  background: white;
}

.attendance-report-table td {
  padding: 15px 20px;
  vertical-align: middle;
  border: none;
}

/* معلومات الموظف */
.employee-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.employee-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0255f0 0%, #003566 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}

/* خلايا الوقت */
.time-cell {
  text-align: center;
}

.time-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.time-badge.in-time {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
}

.time-badge.out-time {
  background: rgba(33, 150, 243, 0.1);
  color: #2196f3;
}

.time-badge i {
  font-size: 12px;
}

.no-data {
  color: #bbb;
  font-size: 18px;
}

/* ساعات العمل */
.hours-cell {
  text-align: center;
}

.hours-display {
  position: relative;
  background: #f0f0f0;
  border-radius: 20px;
  height: 30px;
  overflow: hidden;
  max-width: 150px;
  margin: 0 auto;
}

.hours-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  border-radius: 20px;
  transition: width 0.5s ease;
}

.hours-text {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #333;
  font-weight: 600;
  font-size: 13px;
  z-index: 1;
}

/* شارات الحالة */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-badge i {
  font-size: 14px;
}

.badge-success {
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  color: white;
}

.badge-warning {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: white;
}

.badge-danger {
  background: linear-gradient(135deg, #f44336 0%, #c62828 100%);
  color: white;
}

.badge-secondary {
  background: linear-gradient(135deg, #9e9e9e 0%, #616161 100%);
  color: white;
}

/* حالة الجدول الفارغ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state i {
  margin-bottom: 20px;
  color: #ddd;
}

.empty-state p {
  font-size: 18px;
  margin: 0;
}

.report-summary {
  display: none;
}

.summary-item {
  display: none;
}

.summary-item strong {
  display: none;
}

/* Modal للإعدادات */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
  backdrop-filter: blur(5px);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: white;
  padding: 40px 30px 30px;
  border-radius: 20px;
  min-width: 500px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.3s ease;
  position: relative;
  margin: 20px;
}

/* خط رأسي للتمرير */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #0255f0 0%, #003566 100%);
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #0366ff 0%, #002244 100%);
}

@keyframes slideIn {
  from {
    transform: translateY(-50px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-content h3 {
  margin: 0 0 25px 0;
  color: white;
  font-size: 24px;
  text-align: center;
  border-bottom: 2px solid #0255f0;
  padding-bottom: 15px;
  font-weight: 600;
}

.modal-content .form-group {
  margin-bottom: 20px;
}

.modal-content label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: 500;
  font-size: 14px;
}

.modal-content .form-control {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.modal-content .form-control:focus {
  outline: none;
  border-color: #0255f0;
  box-shadow: 0 0 0 3px rgba(2, 85, 240, 0.1);
}

.modal-content .form-row {
  display: flex;
  gap: 15px;
}

.modal-content .form-row .form-group {
  flex: 1;
}

.modal-content .col-md-6 {
  flex: 1;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.modal-buttons button {
  min-width: 120px;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.modal-buttons .btn-primary {
  background: linear-gradient(135deg, #0255f0 0%, #003566 100%);
  color: white;
}

.modal-buttons .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(2, 85, 240, 0.3);
}

.modal-buttons .btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: white;
}

.modal-buttons .btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

/* زر الإغلاق للنافذة */
.modal-close-btn {
  position: absolute;
  top: 15px;
  left: 15px;
  background: transparent;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  transition: all 0.3s ease;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #f44336;
}

/* نافذة تأكيد الحذف */
#confirmDeletePollModal .modal-content {
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#confirmDeletePollModal .btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

/* تعديلات للشاشات الصغيرة */
@media (max-width: 768px) {
  .modal-content {
    min-width: unset;
    width: 95%;
    padding: 30px 20px 20px;
    margin: 10px;
  }

  .modal-content h3 {
    font-size: 20px;
  }

  .modal-content .form-row {
    flex-direction: column;
  }

  .modal-buttons {
    flex-direction: column;
  }

  .modal-buttons button {
    width: 100%;
  }

  .modal-buttons .btn-primary {
    width: 100%;
  }
}

/* إحصائيات الموظفين */
.stat-card-2 {
  background: linear-gradient(135deg, #0255f0 0%, #003566 100%);
  color: white;
  padding: 8px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  position: relative;
  overflow: hidden;
  width: 110px;
  height: 95px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.stats-grid,
.settings-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.stat-card-2,
.setting-card-2 {
  font-size: 12px;
  font-weight: 600;
  color: white;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.stat-details-2,
.setting-details {
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.4;
  font-size: 10px;
  margin: 0;
}

.stat-details-2 div {
  padding: 2px 0;
}

/* طلبات الإجازة المعلقة */
.pending-request-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 15px;
  border: 2px solid #0255f0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.pending-request-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.pending-request-card:hover {
  box-shadow: 0 5px 20px rgba(255, 152, 0, 0.2);
}

.request-info h5 {
  margin-top: 0;
  color: #333;
  font-size: 18px;
}

.request-info p {
  color: #666;
  margin: 10px 0;
}

.request-reason {
  font-style: italic;
  background: #f8f9fa;
  padding: 10px;
  border-radius: 5px;
}

.request-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.request-actions button {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
}

/* عرض الإجازات الأسبوعية */
.week-navigation {
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
}

.week-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.current-week-display {
  font-size: 16px;
  font-weight: 600;
  color: #0255f0;
  min-width: 200px;
  text-align: center;
  padding: 8px 15px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#prevWeekBtn,
#nextWeekBtn {
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.3s ease;
  min-width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 2px solid #0255f0;
  background: white;
  color: #0255f0;
}

#prevWeekBtn:hover,
#nextWeekBtn:hover {
  background: #0255f0;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(2, 85, 240, 0.3);
}

#prevWeekBtn:active,
#nextWeekBtn:active {
  transform: translateY(0);
}

.week-nav-btn .btn-text {
  font-size: 13px;
  font-weight: 500;
}

.week-nav-btn i {
  font-size: 12px;
}

#currentWeekBtn {
  padding: 8px 20px;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

#currentWeekBtn:hover {
  background: #003566;
  transform: scale(1.05);
}

/* تحسينات الموبايل لأزرار التبديل بين الأسابيع */
@media (max-width: 768px) {
  .week-navigation {
    padding: 12px;
    margin-bottom: 15px;
  }

  /* استخدام grid layout لترتيب الأزرار بشكل أفضل */
  .week-selector {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
  }

  /* زر الأسبوع الحالي في صف منفصل أسفل الأزرار */
  #currentWeekBtn {
    grid-column: 1 / -1;
    order: 10;
    width: 100%;
    margin-right: 0;
    margin-top: 8px;
    justify-self: stretch;
  }

  /* تقليل عرض عرض التاريخ على الموبايل */
  .current-week-display {
    min-width: unset;
    font-size: 14px;
    padding: 6px 10px;
    text-align: center;
  }

  /* تحسين حجم أزرار التنقل */
  #prevWeekBtn,
  #nextWeekBtn {
    padding: 8px 12px;
    font-size: 13px;
    min-width: 70px;
    flex: 1;
    max-width: 120px;
  }
  
  .week-nav-btn .btn-text {
    font-size: 12px;
  }
  
  .week-nav-btn i {
    font-size: 11px;
  }
  
  .current-week-display {
    order: 2;
    width: 100%;
    margin: 5px 0;
    font-size: 14px;
    min-width: unset;
  }
}

.holidays-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.holiday-day {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
}

.holiday-day h5 {
  margin-top: 0;
  color: #0255f0;
  font-size: 16px;
  margin-bottom: 10px;
}

.employee-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.employee-tag {
  background: linear-gradient(135deg, #0255f0 0%, #003566 100%);
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 14px;
  display: inline-block;
  transition: all 0.3s ease;
}

.employee-tag:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(2, 85, 240, 0.3);
}

/* التنبيهات */
.attendance-alerts-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1000;
  max-width: 400px;
}

.attendance-alert {
  margin-bottom: 10px;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* تحسينات للشاشات الصغيرة جداً */
@media (max-width: 480px) {
  .date-selector {
    flex-direction: column;
    padding: 8px;
  }
  
  .date-selector input[type="date"],
  .date-selector button {
    width: 100%;
  }
  
  .stat-card-2 {
    width: 85px;
    height: 80px;
    padding: 6px;
  }
  
  .stat-card-2 h5 {
    font-size: 10px;
  }
  
  .stat-details-2 {
    font-size: 8px;
  }
}

/* تحسينات الموبايل لخانة التقرير اليومي وكروت الإحصائيات */
@media (max-width: 768px) {
  /* تحسين date-selector للموبايل */
  .date-selector {
    padding: 10px;
    gap: 8px;
  }
  
  .date-selector input[type="date"] {
    font-size: 16px; /* منع التكبير التلقائي في iOS */
    padding: 12px;
    width: 100%;
    min-width: unset;
  }
  
  .date-selector button {
    width: 100%;
    padding: 12px;
    font-size: 14px;
  }
  
  /* كروت الإحصائيات الأسبوعية أصغر */
  .stat-card-2 {
    width: 95px;
    height: 85px;
    padding: 7px;
  }
  
  .stat-card-2 h5 {
    font-size: 11px;
    margin-bottom: 5px;
  }
  
  .stat-details-2 {
    font-size: 9px;
  }
  
  .stats-grid {
    gap: 8px;
    justify-content: space-evenly;
  }
  
  .attendance-buttons {
    flex-direction: column;
  }

  .btn-large {
    width: 100%;
  }

  .form-row {
    flex-direction: column;
  }

  .holidays-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .settings-grid {
    display: block;
  }

  .attendance-statistics {
    flex-direction: column;
    gap: 15px;
  }

  .report-summary {
    flex-direction: column;
    gap: 10px;
  }

  .request-actions {
    flex-direction: column;
  }

  .attendance-alerts-container {
    right: 10px;
    left: 10px;
    max-width: none;
  }

  /* إصلاح تنسيق زر إرسال الاقتراح في الموبايل */
  #suggestionForm .btn-success,
  #suggestionsTab .btn-success {
    width: 100%;
    padding: 12px 20px;
    text-align: center;
    font-size: 16px;
    margin-top: 10px;
    display: block;
  }
}

/* إخفاء عنصر الصوت الأصلي */
.message-audio-element {
  display: none;
}

/* تحسينات الموبايل للرسائل الصوتية - نفس التصميم لكن بأحجام مناسبة */
@media (max-width: 768px) {
  .audio-message-container {
    min-width: 280px;
    max-width: 340px;
    padding: 15px 17px;
    gap: 13px;
    /* التأكد من الترتيب الصحيح: play button - waveform - duration */
    flex-direction: row;
    display: flex;
    align-items: center;
  }

  /* التأكد من ترتيب العناصر */
  .audio-controls {
    order: 1;
    flex-shrink: 0;
  }

  .audio-waveform {
    order: 2;
    flex: 1;
    height: 42px;
  }

  .audio-time {
    order: 3;
    flex-shrink: 0;
    min-width: 48px;
    padding: 7px 11px;
  }

  .audio-play-btn {
    width: 44px;
    height: 44px;
  }

  .audio-play-btn svg {
    width: 26px;
    height: 26px;
  }

  .waveform-bars {
    gap: 2.5px;
  }

  .waveform-bars .bar {
    width: 3.5px;
  }

  .audio-duration {
    font-size: 13.5px;
  }
}

/* تحسينات إضافية للرسائل الصوتية */
.audio-message-container.loading {
  opacity: 0.7;
  pointer-events: none;
}

.audio-message-container.loading .audio-play-btn {
  animation: loadingPulse 1s infinite;
}

@keyframes loadingPulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

/* مؤشر التشغيل المتحرك */
.audio-play-btn.playing::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  border-radius: 50%;
  border: 2px solid currentColor;
  transform: translate(-50%, -50%);
  animation: ripple 1.5s infinite;
  pointer-events: none;
}

@keyframes ripple {
  0% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(0.6);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

/* تأثير التفاعل مع الموجات الصوتية */
.audio-waveform:hover .waveform-bars .bar {
  transition: transform 0.2s ease;
}

.audio-waveform:hover .waveform-bars .bar:hover {
  transform: scaleY(1.3);
}

/* مؤشر القدرة على النقر */
.audio-waveform {
  cursor: pointer;
}

.audio-waveform:active {
  transform: scale(0.98);
}

/* أنماط رسائل الملفات */
.message-file {
  padding: 12px 16px;
  background: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 100%);
  border-radius: 12px;
  margin: 8px 0;
  transition: all 0.3s ease;
}

.chat-message.own .message-file {
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
}

.message-file:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.file-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  word-break: break-word;
}

.chat-message.own .file-link {
  color: white;
}

.file-link:hover {
  text-decoration: underline;
}

/* أنماط نافذة إنشاء مجموعة الشات */
#createGroupModal .modal-content {
  max-width: 500px;
  width: 90%;
  margin: 10% auto;
}

#createGroupModal h3 {
  color: #333;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

#createGroupModal .form-group {
  margin-bottom: 1.5rem;
}

#createGroupModal .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #555;
}

#createGroupModal .form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

#createGroupModal .form-control:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

#createGroupModal textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

/* قائمة المستخدمين */
.users-checkbox-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px;
  background-color: #f9f9f9;
}

.users-checkbox-list .checkbox-label {
  display: flex;
  align-items: center;
  padding: 8px;
  margin-bottom: 5px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.users-checkbox-list .checkbox-label:hover {
  background-color: #f0f0f0;
}

.users-checkbox-list input[type="checkbox"] {
  margin-left: 10px;
  margin-right: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.users-checkbox-list .checkbox-label span {
  flex: 1;
  margin-right: 10px;
  color: #333;
}

#createGroupAlert {
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 6px;
  display: none;
}

#createGroupAlert.show {
  display: block;
}

#createGroupAlert.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

#createGroupAlert.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Chat Modal System */
.chat-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  backdrop-filter: blur(5px);
  animation: modalFadeIn 0.3s ease-out;
}

.chat-modal-overlay.show {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: modalFadeIn 0.3s ease-out;
}

.chat-modal {
  background: white;
  border-radius: 16px;
  min-width: 400px;
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: modalSlideIn 0.3s ease-out;
  position: relative;
}

.chat-modal-header {
  padding: 20px;
  background: linear-gradient(135deg, #0255f0, #003566);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-modal-title {
  font-size: 18px;
  font-weight: 600;
  text-align: right;
  flex: 1;
}

.chat-modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
  line-height: 1;
  margin-left: 15px;
}

.chat-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.chat-modal-body {
  padding: 25px;
  max-height: 400px;
  overflow-y: auto;
}

.chat-modal-message {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  text-align: right;
  margin: 0;
}

.chat-modal-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
  margin-top: 15px;
  font-family: inherit;
  direction: rtl;
}

.chat-modal-input:focus {
  border-color: #0255f0;
  box-shadow: 0 0 0 3px rgba(2, 85, 240, 0.1);
}

.chat-modal-footer {
  padding: 15px 20px;
  background: #f8f9fa;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #e0e0e0;
}

.chat-modal-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.chat-modal-btn-primary {
  background: linear-gradient(135deg, #0255f0, #003566);
  color: white;
}

.chat-modal-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 85, 240, 0.3);
}

.chat-modal-btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chat-modal-btn-secondary:hover {
  background: linear-gradient(135deg, #7d8690 0%, #5a6268 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.chat-modal-btn-danger {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
}

.chat-modal-btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Icons in Modal */
.chat-modal-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.chat-modal-icon-info {
  background: rgba(2, 85, 240, 0.1);
  color: #0255f0;
}

.chat-modal-icon-success {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.chat-modal-icon-warning {
  background: rgba(255, 193, 7, 0.1);
  color: #ffc107;
}

.chat-modal-icon-error {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

/* Animations */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideIn {
  from {
    transform: scale(0.9) translateY(-20px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .chat-modal {
    min-width: 90%;
    margin: 20px;
  }

  .chat-modal-body {
    padding: 20px;
  }

  .chat-modal-footer {
    flex-direction: column-reverse;
  }
}

/* ================== أنماط نظام التارجت اليومي ================== */

/* بطاقة حالة التارجت */
.target-status {
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  margin: 15px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.target-status:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.target-status.completed {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border: 2px solid #28a745;
  color: #155724;
}

.target-status.pending {
  background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
  border: 2px solid #ffc107;
  color: #856404;
}

.target-status h3 {
  margin: 0 0 15px 0;
  font-size: 1.2em;
}

/* نموذج التارجت */
.target-modal .modal-content {
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
}

.target-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.target-fields .form-group {
  margin-bottom: 0;
}

/* قائمة التارجتات الشهرية */
.monthly-targets {
  padding: 15px;
}

.targets-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
}

.targets-header h3 {
  margin: 0;
  color: #0255f0;
}

.targets-header .stats {
  display: flex;
  gap: 20px;
  font-size: 0.9em;
}

.targets-header .stats span {
  padding: 5px 10px;
  background: #f8f9fa;
  border-radius: 15px;
  font-weight: 500;
}

.targets-list {
  display: grid;
  gap: 10px;
}

.target-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  border-right: 4px solid transparent;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.target-item:hover {
  transform: translateX(-5px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.target-item.success {
  border-right-color: #28a745;
  background: linear-gradient(90deg, rgba(40,167,69,0.05) 0%, white 100%);
}

.target-item.warning {
  border-right-color: #ffc107;
  background: linear-gradient(90deg, rgba(255,193,7,0.05) 0%, white 100%);
}

.target-item.danger {
  border-right-color: #dc3545;
  background: linear-gradient(90deg, rgba(220,53,69,0.05) 0%, white 100%);
}

.target-date {
  font-weight: 600;
  color: #495057;
  min-width: 100px;
}

.target-percentage {
  font-weight: bold;
  font-size: 1.1em;
  color: #007bff;
}

/* تقرير المشرف */
.daily-report {
  padding: 20px;
}

.report-header {
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  color: white;
  padding: 20px;
  border-radius: 12px 12px 0 0;
  margin: -20px -20px 20px -20px;
}

.report-header h3 {
  margin: 0 0 15px 0;
  font-size: 1.3em;
}

.report-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  font-size: 0.9em;
}

.stat-item.success {
  background: rgba(40,167,69,0.3);
}

.stat-item.warning {
  background: rgba(255,193,7,0.3);
}

.employees-targets {
  display: grid;
  gap: 15px;
}

.employee-target-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: white;
  border-radius: 10px;
  border-right: 4px solid transparent;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.employee-target-card:hover {
  transform: translateX(-5px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.employee-target-card.submitted {
  border-right-color: #28a745;
}

.employee-target-card.pending {
  border-right-color: #ffc107;
}

.employee-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.employee-name {
  font-weight: 600;
  color: #333;
  font-size: 1.1em;
}

.target-actions {
  display: flex;
  gap: 10px;
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.85em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.btn-small.btn-info {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  
  color: white;
}

.btn-small.btn-info:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(23,162,184,0.3);
}

.btn-small.btn-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
}

.btn-small.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0,123,255,0.3);
}

/* ==================== إعدادات التارجت - تصميم محسن ==================== */
.target-settings-modal {
  animation: fadeIn 0.3s ease;
}

.target-settings-modal .modal-content {
  max-width: 900px;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.target-settings-modal .modal-header {
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  color: white;
  padding: 30px;
  border-radius: 20px 20px 0 0;
  position: relative;
  overflow: hidden;
}

.target-settings-modal .modal-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.target-settings-modal .modal-header::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.target-settings-modal .modal-header h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 24px;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.target-settings-modal .modal-close {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 28px;
  color: white;
  border: none;
  z-index: 10 !important;
  pointer-events: auto !important;
}

.target-settings-modal .modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.target-settings-modal .modal-close:active {
  transform: scale(0.95);
}

.target-settings-modal .modal-body {
  padding: 30px;
  overflow-y: auto;
  max-height: calc(90vh - 200px);
  background: #f8f9fa;
}

.target-settings-modal .settings-section {
  margin-bottom: 30px;
  padding: 25px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(102, 126, 234, 0.1);
  position: relative;
  overflow: hidden;
}

.target-settings-modal .settings-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}

.target-settings-modal .settings-section h4 {
  color: #2d3748;
  border-bottom: 3px solid #e9ecef;
  padding-bottom: 15px;
  margin-bottom: 25px;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.target-settings-modal .form-group {
  background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
  padding: 15px;
  border-radius: 12px;
  border: 1px solid rgba(102, 126, 234, 0.1);
  transition: all 0.3s ease;
  margin-bottom: 15px;
}

.target-settings-modal .form-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.target-settings-modal .form-control {
  padding: 10px 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  width: 100%;
  font-size: 14px;
  transition: all 0.3s ease;
  background: white;
}

.target-settings-modal .form-control:focus {
  border-color: #0255f0;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  outline: none;
}

.target-settings-modal label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #4a5568;
  font-size: 14px;
}

.target-settings-modal input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #0255f0;
}

.target-settings-modal .custom-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.target-settings-modal .custom-checkbox span {
  font-weight: 600;
  color: #2d3748;
  font-size: 14px;
}

.target-settings-modal .modal-footer {
  padding: 25px;
  background: white;
  border-top: 2px solid #e9ecef;
  display: flex;
  justify-content: center;
  gap: 15px;
  border-radius: 0 0 20px 20px;
}

.target-settings-modal .btn {
  padding: 12px 35px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.target-settings-modal .btn-primary {
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  color: white;
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.target-settings-modal .btn-primary:hover {
  background: linear-gradient(135deg, #001d3d 0%, #0255f0 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.target-settings-modal .btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: white;
  box-shadow: 0 5px 20px rgba(108, 117, 125, 0.3);
}

.target-settings-modal .btn-secondary:hover {
  background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
}

/* الأنيميشن */
@keyframes fadeIn {
  from { 
    opacity: 0; 
  }
  to { 
    opacity: 1; 
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* تحسينات إضافية للحقول */
.target-settings-modal select {
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px;
  padding-right: 40px;
}

.target-settings-modal input[type="text"]:focus,
.target-settings-modal select:focus {
  background-color: #f8f9fa;
}

/* أيقونات للحقول */
.target-settings-modal .fa-bullseye { color: #0255f0; }
.target-settings-modal .fa-calendar-alt { color: #003566; }
.target-settings-modal .fa-chart-line { color: #00d2ff; }
.target-settings-modal .fa-calculator { color: #3a47d5; }
.target-settings-modal .fa-paperclip { color: #0255f0; }
.target-settings-modal .fa-power-off { color: #00d2ff; }

/* تحسينات الاستجابة */
@media (max-width: 768px) {
  .target-settings-modal .modal-content {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    height: 100vh;
    max-height: 100vh;
  }
  
  .target-settings-modal .modal-header {
    border-radius: 0;
    padding: 20px;
  }
  
  .target-settings-modal .modal-body {
    padding: 20px;
    max-height: calc(100vh - 180px);
  }
  
  .target-settings-modal .modal-footer {
    border-radius: 0;
    flex-direction: column;
  }
  
  .target-settings-modal .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==================== نافذة اختيار الموظفين ==================== */
.employee-selection-modal {
  animation: fadeIn 0.3s ease;
}

.employee-selection-modal .modal-content {
  background: white;
  border-radius: 20px;
  max-width: 600px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.employee-selection-modal .modal-header {
  background: linear-gradient(135deg, #00d2ff 0%, #3a47d5 100%);
  color: white;
  padding: 25px;
  border-radius: 20px 20px 0 0;
  position: relative;
  overflow: hidden;
}

.employee-selection-modal .modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.employee-selection-list {
  max-height: 400px;
  overflow-y: auto;
  padding: 20px;
  background: #f8f9fa;
}

.employee-selection-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: white;
  border-radius: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.employee-selection-item:hover {
  border-color: #0255f0;
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
  transform: translateX(5px);
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.employee-name {
  font-weight: 600;
  color: #2d3748;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.employee-name::before {
  content: '👤';
  font-size: 20px;
}

.employee-role {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  color: white;
}

.settings-section {
  margin-bottom: 25px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.settings-section h4 {
  margin-top: 0;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
  padding-bottom: 10px;
}

/* أنماط أساسية لكروت الموظفين في تارجتات الموظفين الشهرية */
.employee-target-item {
  box-sizing: border-box;
  overflow: hidden;
}

.employee-target-item .employee-target-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

.employee-target-item .employee-target-info {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
}

.employee-target-item .employee-target-avatar {
  flex-shrink: 0;
  box-sizing: border-box;
}

.employee-target-item .employee-target-details {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
}

.employee-target-item .employee-target-details h5 {
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.employee-target-item .employee-target-button {
  flex-shrink: 0;
  box-sizing: border-box;
}

/* موبايل */
@media (max-width: 768px) {
  .target-fields {
    grid-template-columns: 1fr;
  }
  
  .targets-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .targets-header .stats {
    width: 100%;
    justify-content: space-between;
  }
  
  .target-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 15px 10px;
  }
  
  .employee-target-card {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .target-actions {
    width: 100%;
  }
  
  /* إصلاح كروت الموظفين في تارجتات الموظفين الشهرية */
  .employee-target-item {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    padding: 15px !important;
    margin: 10px 0 !important;
    border-right: 4px solid !important;
    border-left: none !important;
    border-top: none !important;
    border-bottom: none !important;
  }
  
  .employee-target-item .employee-target-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  
  .employee-target-item .employee-target-info {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  
  .employee-target-item .employee-target-avatar {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    flex-shrink: 0 !important;
    box-sizing: border-box;
  }
  
  .employee-target-item .employee-target-details {
    flex: 1 !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }
  
  .employee-target-item .employee-target-details h5 {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    margin-bottom: 8px !important;
  }
  
  .employee-target-item .target-settings-badge {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    display: inline-block !important;
  }
  
  .employee-target-item .employee-target-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    margin: 0 !important;
    white-space: normal !important;
    text-align: center;
  }
  
  /* إصلاح container */
  #employeesTargetList {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow-x: hidden !important;
  }
  
  #employeesTargetList .employees-target-list {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    padding: 10px !important;
  }
  
  .supervisor-subsection:has(#employeesTargetList) {
    padding-left: 5px !important;
    padding-right: 5px !important;
    overflow-x: hidden !important;
  }
}

.employee-selection-item {
  padding: 15px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.employee-selection-item:hover {
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  color: white;
  transform: translateX(5px);
}

.employee-name {
  font-weight: bold;
  font-size: 1.1rem;
}

.employee-role {
  background: rgba(107, 114, 128, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #6b7280;
}

.employee-selection-item:hover .employee-role {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}


/* ==================== أنماط نماذج التارجت ==================== */
.target-details-modal {
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
}

.target-details-modal .modal-content {
  background: white;
  border-radius: 12px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.target-details-modal .modal-header {
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  color: white;
  padding: 20px;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.target-details {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid #0255f0;
}

.detail-item label {
  font-weight: bold;
  color: #495057;
  font-size: 0.9em;
}

.detail-value {
  color: #212529;
  padding: 5px 0;
  line-height: 1.5;
}

.target-status-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: linear-gradient(45deg, #f8f9fa, #e9ecef);
  border-radius: 8px;
  margin-top: 10px;
}

.status-badge {
  padding: 6px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9em;
}

.status-badge.pending {
  background: #ffc107;
  color: #212529;
}

.status-badge.achieved {
  background: #28a745;
  color: white;
}

.status-badge.partial {
  background: #17a2b8;
  color: white;
}

.status-badge.failed {
  background: #dc3545;
  color: white;
}

.attachments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  text-decoration: none;
  color: #495057;
  transition: all 0.3s;
}

.attachment-link:hover {
  background: #0255f0;
  color: white;
  border-color: #0255f0;
  transform: translateX(-5px);
}

.supervisor-review {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #28a745;
  border-radius: 10px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.1);
}

.supervisor-review .review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dee2e6;
}

.supervisor-review .review-header h4 {
  color: #28a745;
  margin: 0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.supervisor-review .review-header h4 i {
  font-size: 1.2rem;
}

.supervisor-review .review-badge {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 600;
}

.supervisor-review .review-content {
  background: white;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
  border-right: 3px solid #28a745;
}

.supervisor-review .review-content p {
  color: #495057;
  line-height: 1.8;
  margin: 0;
  font-size: 1rem;
}

.supervisor-review .review-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid #dee2e6;
}

.supervisor-review .reviewer-info,
.supervisor-review .review-date {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6c757d;
  font-size: 0.9rem;
}

.supervisor-review .reviewer-info i,
.supervisor-review .review-date i {
  color: #28a745;
  font-size: 0.85rem;
}

/* تحسينات إضافية للأزرار */
.modal-footer button {
  transition: all 0.3s ease;
}

.modal-footer button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* أنماط responsive */
@media (max-width: 768px) {
  .target-details-modal .modal-content {
    width: 95%;
    margin: 10px;
  }
  
  .detail-item {
    padding: 10px;
  }
  
  /* تعديل Toast notifications على الموبايل */
  .notification-toast {
    max-width: calc(100vw - 40px) !important;
    right: 20px !important;
    left: 20px !important;
    font-size: 13px !important;
  }
}

/* =================================
   Toast Notifications Styling
   ================================= */
.notification-toast {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  will-change: transform, opacity;
  pointer-events: auto;
  user-select: none;
}

/* تحسين الأيقونات */
.toast-icon {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* تأثير hover على Toast */
.notification-toast:hover {
  transform: scale(1.02) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), 0 4px 10px rgba(0, 0, 0, 0.18) !important;
  cursor: default;
}

/* تأثير الإغلاق */
.notification-toast.closing {
  animation: slideOutRight 0.3s ease forwards !important;
}

@keyframes slideOutRight {
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

.target-setting-card .btn-success,
.setting-card-2 .btn-success,
.setting-card .btn-success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
}

.target-setting-card .btn-primary,
.setting-card-2 .btn-primary,
.setting-card .btn-primary {
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  color: white;
}

.target-setting-card .btn-danger,
.setting-card-2 .btn-danger,
.setting-card .btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
}

/* منع الأزرار من الخروج من الحاوية */
.target-setting-card,
.setting-card-2,
.setting-card {
  overflow: hidden;
  position: relative;
}

.target-setting-card .btn:hover,
.setting-card-2 .btn:hover,
.setting-card .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ==================== تحسينات إضافية لبطاقات إعدادات التارجت ==================== */
#employeeTargetSettingsList {
  padding: 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 15px;
  min-height: 200px;
}

#employeeTargetSettingsList .settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
  padding: 10px;
}

#employeeTargetSettingsList .target-setting-card {
  background: white;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

#employeeTargetSettingsList .target-setting-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 85, 240, 0.12);
}

/* إزالة الشريط العلوي للحصول على تصميم أنظف */

#employeeTargetSettingsList .target-setting-card h5 {
  color: #2d3748;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 20px 0;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 10px;
}

#employeeTargetSettingsList .target-setting-card h5::before {
  content: '👤';
  font-size: 24px;
}

#employeeTargetSettingsList .setting-details {
  margin: 20px 0;
  background: #f8f9fa;
  padding: 15px;
  border-radius: 10px;
  border-right: 4px solid #0255f0;
}

#employeeTargetSettingsList .setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e9ecef;
}

#employeeTargetSettingsList .setting-row:last-child {
  border-bottom: none;
}

#employeeTargetSettingsList .setting-label {
  color: #6c757d;
  font-size: 14px;
  font-weight: 600;
}

#employeeTargetSettingsList .setting-value {
  color: #2d3748;
  font-size: 14px;
  font-weight: 500;
  background: white;
  padding: 5px 12px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#employeeTargetSettingsList .setting-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #e9ecef;
  justify-content: center;
}

#employeeTargetSettingsList .target-setting-card .btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

#employeeTargetSettingsList .target-setting-card .btn i {
  font-size: 14px;
}

#employeeTargetSettingsList .target-setting-card .btn-primary {
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  color: white;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

#employeeTargetSettingsList .target-setting-card .btn-primary:hover {
  background: linear-gradient(135deg, #001d3d 0%, #0255f0 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

#employeeTargetSettingsList .target-setting-card .btn-danger {
  background: linear-gradient(135deg, #fc5c7d 0%, #e73c7e 100%);
  color: white;
  box-shadow: 0 3px 10px rgba(252, 92, 125, 0.3);
}

#employeeTargetSettingsList .target-setting-card .btn-danger:hover {
  background: linear-gradient(135deg, #e73c7e 0%, #fc5c7d 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(252, 92, 125, 0.4);
}

#employeeTargetSettingsList .target-setting-card .btn-success {
  background: linear-gradient(135deg, #00d2ff 0%, #3a47d5 100%);
  color: white;
  box-shadow: 0 3px 10px rgba(0, 210, 255, 0.3);
  white-space: nowrap !important;
  width: auto !important;
  min-width: fit-content !important;
  max-width: none !important;
  overflow: visible !important;
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

#employeeTargetSettingsList .target-setting-card .btn-success:hover {
  background: linear-gradient(135deg, #3a47d5 0%, #00d2ff 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 210, 255, 0.4);
}

#employeeTargetSettingsList .text-muted {
  color: #8792a2;
  font-size: 14px;
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 2px dashed #dee2e6;
  margin: 10px 0;
}

#employeeTargetSettingsList .alert-info {
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 30px;
  font-size: 16px;
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

#employeeTargetSettingsList .alert-info i {
  font-size: 24px;
  margin-bottom: 10px;
  display: block;
}

/* تحسينات للعنوان الرئيسي */
.supervisor-subsection h4 {
  color: #0255f0;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 15px;
}

.supervisor-subsection h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

/* تحسينات الاستجابة */
@media (max-width: 768px) {
  #employeeTargetSettingsList .settings-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  #employeeTargetSettingsList .target-setting-card {
    padding: 0;
  }
  
  #employeeTargetSettingsList .setting-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  #employeeTargetSettingsList .target-setting-card .btn {
    width: 100%;
    justify-content: center;
    padding: 8px;
    font-size: 13px;
  }
  
  .target-setting-card.collapsed .card-header {
    padding: 10px 12px;
  }
  
  .target-setting-card.expanded .card-header {
    padding: 10px 12px;
  }
  
  .target-setting-card.expanded .card-body {
    padding: 12px;
  }

  /* إصلاح تجاوز البطاقات لحدود الـ container */
  .supervisor-subsection,
  #targetSettingsSection {
    overflow-x: hidden !important;
    max-width: 100% !important;
    box-sizing: border-box;
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
  }
  
  /* إصلاح عرض بطاقات الموظفين على الموبايل */
  #employeeTargetSettingsList {
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
    padding: 5px !important;
    margin: 0;
  }
  
  #employeeTargetSettingsList .settings-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    padding: 5px !important;
    gap: 10px !important;
  }
  
  /* إصلاحات إضافية للبطاقات */
  #employeeTargetSettingsList .target-setting-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow: hidden;
    min-width: 0;
    margin: 0;
  }
  
  #employeeTargetSettingsList .target-setting-card.collapsed .card-header {
    max-width: 100% !important;
    box-sizing: border-box;
    overflow: hidden;
    padding: 12px;
    min-width: 0;
    width: 100%;
  }
  
  #employeeTargetSettingsList .target-setting-card.collapsed .card-header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow: hidden;
    min-width: 0;
    flex: 1;
  }
  
  #employeeTargetSettingsList .target-setting-card.collapsed .card-header h5 {
    width: 100% !important;
    min-width: 0;
    max-width: 100% !important;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    box-sizing: border-box;
  }
  
  #employeeTargetSettingsList .target-setting-card.collapsed .card-header h5 i {
    max-width: 100%;
    box-sizing: border-box;
  }
  
  #employeeTargetSettingsList .target-setting-card.collapsed .settings-status {
    width: 100% !important;
    max-width: 100% !important;
    text-align: center;
    font-size: 12px;
    padding: 6px 12px;
    box-sizing: border-box;
  }
  
  #employeeTargetSettingsList .target-setting-card.collapsed .expand-icon {
    flex-shrink: 0;
    margin-right: 8px;
  }
  
  /* إصلاحات للبطاقات المفتوحة (expanded) */
  #employeeTargetSettingsList .target-setting-card.expanded {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow: hidden;
    min-width: 0;
    margin: 0;
  }
  
  #employeeTargetSettingsList .target-setting-card.expanded .card-header {
    max-width: 100% !important;
    box-sizing: border-box;
    overflow: hidden;
    padding: 12px;
    min-width: 0;
    width: 100%;
  }
  
  #employeeTargetSettingsList .target-setting-card.expanded .card-header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow: hidden;
    min-width: 0;
    flex: 1;
  }
  
  #employeeTargetSettingsList .target-setting-card.expanded .card-header h5 {
    width: 100% !important;
    min-width: 0;
    max-width: 100% !important;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    box-sizing: border-box;
  }
  
  #employeeTargetSettingsList .target-setting-card.expanded .card-header h5 i {
    max-width: 100%;
    box-sizing: border-box;
  }
  
  #employeeTargetSettingsList .target-setting-card.expanded .settings-status {
    width: 100% !important;
    max-width: 100% !important;
    text-align: center;
    font-size: 12px;
    padding: 6px 12px;
    box-sizing: border-box;
    white-space: normal;
  }
  
  #employeeTargetSettingsList .target-setting-card.expanded .card-body {
    max-width: 100% !important;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 12px;
    width: 100%;
  }
  
  #employeeTargetSettingsList .target-setting-card.expanded .expand-icon {
    flex-shrink: 0;
    margin-right: 8px;
  }
  
  /* إصلاح container تقرير التارجت اليومي */
  #dailyTargetReport {
    overflow-x: hidden !important;
    max-width: 100% !important;
    box-sizing: border-box;
    width: 100%;
    padding: 5px !important;
    margin: 0;
  }
  
  /* إصلاح أي container داخل dailyTargetReport */
  #dailyTargetReport > div {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  
  /* إصلاح grid container للكروت على الموبايل */
  #dailyTargetReport .employees-targets {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
  
  /* إصلاح بطاقات الموظفين في تقرير التارجت */
  #dailyTargetReport .employee-target-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden;
    min-width: 0;
    margin: 0 !important;
    padding: 15px !important;
    border-right: 4px solid !important;
    border-left: none !important;
    border-top: none !important;
    border-bottom: none !important;
  }
  
  /* إصلاح تخطيط employee-info على الموبايل */
  #dailyTargetReport .employee-info {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    gap: 12px;
  }
  
  /* إصلاح قسم الاسم والصورة */
  #dailyTargetReport .employee-name-section {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    margin-bottom: 0 !important;
  }
  
  /* إصلاح Avatar - حجم ثابت */
  #dailyTargetReport .employee-avatar {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    flex-shrink: 0 !important;
    box-sizing: border-box;
  }
  
  /* إصلاح اسم الموظف */
  #dailyTargetReport .employee-name {
    flex: 1 !important;
    min-width: 0 !important;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    box-sizing: border-box;
  }
  
  /* إصلاح حالة التارجت */
  #dailyTargetReport .target-status {
    display: inline-block !important;
    width: auto !important;
    max-width: 100% !important;
    box-sizing: border-box;
    margin: 0 !important;
    text-align: center;
    white-space: normal;
  }
  
  /* إصلاح الأزرار */
  #dailyTargetReport .target-actions {
    width: 100% !important;
    flex-direction: column !important;
    gap: 10px;
  }
  
  #dailyTargetReport .target-actions button {
    width: 100% !important;
    margin: 0 !important;
  }
  
  /* إصلاح container الأساسي */
  .supervisor-subsection:has(#dailyTargetReport),
  .supervisor-subsection #dailyTargetReport {
    overflow: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  
  .supervisor-subsection:has(#dailyTargetReport) {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
  
  #dailyTargetReport * {
    box-sizing: border-box !important;
  }
}

/* ==================== أنماط البطاقات القابلة للطي ==================== */
.target-setting-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: top center;
}

.target-setting-card.collapsed {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  max-width: 100%;
}

.target-setting-card.collapsed .card-header {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #e0e0e0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.target-setting-card.collapsed .card-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(2, 85, 240, 0.05), transparent);
  transition: left 0.5s ease;
}

.target-setting-card.collapsed .card-header:hover {
  background: linear-gradient(135deg, #f0f8ff 0%, #e1ecf4 100%);
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 3px 10px rgba(2, 85, 240, 0.15);
  border-color: #0255f0;
}

.target-setting-card.collapsed .card-header:hover::before {
  left: 100%;
}

.target-setting-card.collapsed .card-header-content {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.target-setting-card.collapsed .card-header h5 {
  margin: 0;
  font-size: 14px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.target-setting-card.collapsed .card-header h5 i {
  color: #0255f0;
  font-size: 18px;
}

.target-setting-card.collapsed .settings-status {
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.target-setting-card.collapsed .settings-status.active {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
}

.target-setting-card.collapsed .settings-status.inactive {
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
  color: white;
}

.target-setting-card.collapsed .expand-icon {
  color: #999;
  font-size: 14px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.target-setting-card.collapsed .card-header:hover .expand-icon {
  color: #0255f0;
  transform: translateY(2px);
}

.target-setting-card.collapsed .card-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 16px;
  transform: translateY(-10px);
}

/* البطاقة في حالة التوسع */
.target-setting-card.expanded {
  background: white;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(2, 85, 240, 0.15);
  border: 1.5px solid #0255f0;
  transform: translateY(-2px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.target-setting-card.expanded .card-header {
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  padding: 12px 16px;
  border-radius: 12px 12px 0 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(2, 85, 240, 0.2);
}

.target-setting-card.expanded .card-header-content {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.target-setting-card.expanded .card-header h5 {
  margin: 0;
  font-size: 15px;
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.target-setting-card.expanded .card-header h5 i {
  color: white;
  font-size: 18px;
}

.target-setting-card.expanded .settings-status {
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  white-space: nowrap;
}

.target-setting-card.expanded .expand-icon {
  color: white;
  font-size: 14px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: rotate(180deg);
}

.target-setting-card.expanded .card-body {
  max-height: 800px;
  opacity: 1;
  padding: 16px;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}

@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  50% {
    transform: translateY(-5px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==================== أنماط نماذج التارجت ==================== */
.target-details-modal {
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
}

.target-details-modal .modal-content {
  background: white;
  border-radius: 12px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.target-details-modal .modal-header {
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  color: white;
  padding: 20px;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.target-details {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid #0255f0;
}

.detail-item label {
  font-weight: bold;
  color: #495057;
  font-size: 0.9em;
}

.detail-value {
  color: #212529;
  padding: 5px 0;
  line-height: 1.5;
}

.target-status-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: linear-gradient(45deg, #f8f9fa, #e9ecef);
  border-radius: 8px;
  margin-top: 10px;
}

.status-badge {
  padding: 6px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9em;
}

.status-badge.pending {
  background: #ffc107;
  color: #212529;
}

.status-badge.achieved {
  background: #28a745;
  color: white;
}

.status-badge.partial {
  background: #17a2b8;
  color: white;
}

.status-badge.failed {
  background: #dc3545;
  color: white;
}

.attachments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  text-decoration: none;
  color: #495057;
  transition: all 0.3s;
}

.attachment-link:hover {
  background: #0255f0;
  color: white;
  border-color: #0255f0;
  transform: translateX(-5px);
}

.supervisor-review {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #28a745;
  border-radius: 10px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.1);
}

.supervisor-review .review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dee2e6;
}

.supervisor-review .review-header h4 {
  color: #28a745;
  margin: 0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.supervisor-review .review-header h4 i {
  font-size: 1.2rem;
}

.supervisor-review .review-badge {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 600;
}

.supervisor-review .review-content {
  background: white;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
  border-right: 3px solid #28a745;
}

.supervisor-review .review-content p {
  color: #495057;
  line-height: 1.8;
  margin: 0;
  font-size: 1rem;
}

.supervisor-review .review-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid #dee2e6;
}

.supervisor-review .reviewer-info,
.supervisor-review .review-date {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6c757d;
  font-size: 0.9rem;
}

.supervisor-review .reviewer-info i,
.supervisor-review .review-date i {
  color: #28a745;
  font-size: 0.85rem;
}

/* تحسينات إضافية للأزرار */
.modal-footer button {
  transition: all 0.3s ease;
}

.modal-footer button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* أنماط responsive */
@media (max-width: 768px) {
  .target-details-modal .modal-content {
    width: 95%;
    margin: 10px;
  }
  
  .detail-item {
    padding: 10px;
  }
  
  /* تعديل Toast notifications على الموبايل */
  .notification-toast {
    max-width: calc(100vw - 40px) !important;
    right: 20px !important;
    left: 20px !important;
    font-size: 13px !important;
  }
}

/* =================================
   Toast Notifications Styling
   ================================= */
.notification-toast {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  will-change: transform, opacity;
  pointer-events: auto;
  user-select: none;
}

/* تحسين الأيقونات */
.toast-icon {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* تأثير hover على Toast */
.notification-toast:hover {
  transform: scale(1.02) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), 0 4px 10px rgba(0, 0, 0, 0.18) !important;
  cursor: default;
}

/* تأثير الإغلاق */
.notification-toast.closing {
  animation: slideOutRight 0.3s ease forwards !important;
}

@keyframes slideOutRight {
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

/* ============= أنماط نظام الاستراحة والعمل الإضافي ============= */

/* نظام الاستراحة */
#breakManagementSection {
  margin-top: 20px;
}

.break-status-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #f8f9fa, #fff);
  border-radius: 12px;
  border: 2px solid #e9ecef;
}

.break-status-indicator {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 25px;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.break-status-indicator.at-work {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.break-status-indicator.on-break {
  background: linear-gradient(135deg, #ffc107, #ff9800);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
  animation: pulse 2s infinite;
}

.break-status-indicator .status-icon {
  font-size: 24px;
}

.break-status-indicator .status-text {
  font-size: 18px;
  font-weight: 600;
}

.break-timer-container {
  text-align: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  min-width: 200px;
}

.timer-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.break-timer {
  font-size: 32px;
  font-weight: 700;
  color: #0255f0;
  font-family: 'Courier New', monospace;
}

.break-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 20px;
}

.break-buttons .btn {
  min-width: 150px;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.break-buttons .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.break-list-container {
  margin-top: 25px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
}

.break-list-container h4 {
  margin-bottom: 15px;
  color: #333;
}

.breaks-list-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.break-item {
  background: white;
  padding: 15px;
  border-radius: 10px;
  border-left: 4px solid #0255f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.break-item:hover {
  transform: translateX(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.break-item.active {
  border-left-color: #ffc107;
  background: linear-gradient(135deg, #fffef5, #fff);
  animation: pulse 2s infinite;
}

.break-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.break-time,
.break-duration,
.break-type {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #666;
}

.break-time i,
.break-duration i,
.break-type i {
  color: #0255f0;
  width: 20px;
}

/* نظام العمل الإضافي */
.overtime-card {
  background: linear-gradient(135deg, #fff3e0, #fff);
  border-left: 4px solid #ff9800;
}

.overtime-display {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

.overtime-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: rgba(255, 152, 0, 0.1);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.overtime-item:hover {
  background: rgba(255, 152, 0, 0.15);
  transform: translateX(-5px);
}

.overtime-label {
  font-weight: 600;
  color: #666;
}

.overtime-value {
  font-size: 18px;
  font-weight: 700;
  color: #ff9800;
}

/* تقارير المشرف */
.report-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 25px;
  padding: 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 15px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.report-controls:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.period-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
  flex: 0 0 auto;
}

.date-range-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.period-selector label,
.date-range-selector label {
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.period-selector label::before {
  content: '';
  width: 3px;
  height: 16px;
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  border-radius: 2px;
}

/* تحسين تصميم القائمة المنسدلة في التقارير */
.report-controls .period-selector select.form-control,
.report-controls .date-range-selector select.form-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: white;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  padding: 12px 50px 12px 20px;
  font-size: 15px;
  font-weight: 500;
  color: #2d3748;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 150px;
  text-align: right;
  direction: rtl;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%230255f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 16px;
}

.report-controls .period-selector select.form-control:hover {
  border-color: #0255f0;
  box-shadow: 0 2px 8px rgba(2, 85, 240, 0.15);
  transform: translateY(-1px);
}

.report-controls .period-selector select.form-control:focus {
  outline: none;
  border-color: #0255f0;
  box-shadow: 0 0 0 4px rgba(2, 85, 240, 0.1), 0 4px 12px rgba(2, 85, 240, 0.2);
  background-color: #ffffff;
}

.report-controls .period-selector select.form-control:active {
  transform: translateY(0);
}

/* تحسين مظهر الخيارات داخل القائمة المنسدلة */
.report-controls .period-selector select.form-control option {
  padding: 12px 15px;
  font-size: 15px;
  color: #2d3748;
  background: white;
  border: none;
}

.report-controls .period-selector select.form-control option:hover {
  background: #f0f4ff;
}

.report-controls .period-selector select.form-control option:checked {
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  color: white;
  font-weight: 600;
}

/* تحسين زر عرض التقرير */
.report-controls .btn-primary {
  padding: 12px 30px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(2, 85, 240, 0.3);
  white-space: nowrap;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-controls .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 85, 240, 0.4);
  background: linear-gradient(135deg, #0348d1 0%, #001a35 100%);
}

.report-controls .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(2, 85, 240, 0.3);
}

.report-controls .btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(2, 85, 240, 0.2), 0 6px 20px rgba(2, 85, 240, 0.4);
}

.date-range-selector {
  display: flex;
  flex-direction: row;
  gap: 15px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.date-range-selector > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 150px;
  flex: 1 1 auto;
}

.date-range-selector input.form-control {
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  padding: 12px 15px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: white;
}

.date-range-selector input.form-control:hover {
  border-color: #0255f0;
  box-shadow: 0 2px 8px rgba(2, 85, 240, 0.15);
}

.date-range-selector input.form-control:focus {
  outline: none;
  border-color: #0255f0;
  box-shadow: 0 0 0 4px rgba(2, 85, 240, 0.1), 0 4px 12px rgba(2, 85, 240, 0.2);
}

.overtime-report-container,
.break-report-container {
  margin-top: 20px;
}

.overtime-summary,
.break-summary {
  margin-bottom: 20px;
}

.summary-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 15px;
}

.summary-card h5 {
  margin-bottom: 15px;
  color: #333;
  font-weight: 600;
}

.summary-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.summary-stats .stat-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stat-label {
  font-size: 14px;
  color: #666;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #0255f0;
}

.overtime-table-container,
.break-table-container {
  overflow-x: auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.overtime-table-container table,
.break-table-container table {
  width: 100%;
  min-width: 600px;
}

.overtime-table-container th,
.break-table-container th {
  background: linear-gradient(135deg, #0255f0, #0040c0);
  color: white;
  padding: 12px;
  text-align: right;
  font-weight: 600;
}

.overtime-table-container td,
.break-table-container td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  text-align: right;
}

.overtime-table-container tbody tr:hover,
.break-table-container tbody tr:hover {
  background-color: #f0f4ff;
}

/* Responsive Design */
@media (max-width: 768px) {
  .break-status-container {
    padding: 15px;
  }
  
  .break-buttons {
    flex-direction: column;
  }
  
  .break-buttons .btn {
    width: 100%;
  }
  
  .report-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 18px;
    margin-bottom: 20px;
    border-radius: 12px;
  }
  
  .period-selector {
    min-width: 100%;
    width: 100%;
  }
  
  .report-controls .period-selector select.form-control,
  .report-controls .date-range-selector select.form-control {
    width: 100%;
    min-width: 100%;
    padding: 16px 50px 16px 20px;
    font-size: 16px;
    font-weight: 600;
    min-height: 54px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    background-position: right 20px center;
    background-size: 18px;
    text-align: right;
    direction: rtl;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  }
  
  .report-controls .period-selector select.form-control:focus,
  .report-controls .date-range-selector select.form-control:focus {
    border-color: #0255f0;
    box-shadow: 0 0 0 4px rgba(2, 85, 240, 0.15), 0 4px 12px rgba(2, 85, 240, 0.2);
    background-color: #ffffff;
  }
  
  .report-controls .period-selector select.form-control:active {
    transform: scale(0.98);
  }
  
  .report-controls .period-selector label,
  .report-controls .date-range-selector label {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #2d3748;
  }
  
  .report-controls .period-selector label::before {
    width: 4px;
    height: 18px;
  }
  
  .date-range-selector {
    flex-direction: column;
    width: 100%;
  }
  
  .report-controls .btn-primary {
    width: 100%;
    padding: 16px 30px;
    font-size: 16px;
    font-weight: 700;
    min-height: 54px;
    margin-top: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(2, 85, 240, 0.3);
  }
  
  .report-controls .btn-primary:active {
    transform: scale(0.98);
  }
  
  .summary-stats {
    flex-direction: column;
  }
  
  .overtime-display {
    gap: 10px;
  }
}

/* تحسينات إضافية للشاشات الصغيرة جداً */
@media (max-width: 480px) {
  .report-controls {
    padding: 15px;
    gap: 15px;
    border-radius: 10px;
  }
  
  .report-controls .period-selector select.form-control,
  .report-controls .date-range-selector select.form-control {
    padding: 14px 45px 14px 18px;
    font-size: 15px;
    min-height: 52px;
    border-radius: 10px;
    background-size: 16px;
    background-position: right 18px center;
  }
  
  .report-controls .period-selector label,
  .report-controls .date-range-selector label {
    font-size: 14px;
    margin-bottom: 8px;
  }
  
  .report-controls .btn-primary {
    padding: 14px 25px;
    font-size: 15px;
    min-height: 52px;
    border-radius: 10px;
  }
}

/* ==================== أنماط نافذة تفاصيل العمل الإضافي ==================== */
.overtime-details-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1050;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.overtime-modal-dialog {
  margin: 0;
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overtime-modal-content {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  animation: slideUp 0.3s ease;
  position: relative;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.overtime-modal-header {
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  color: white;
  padding: 25px 30px;
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.overtime-modal-header .modal-title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.overtime-modal-header .modal-title i {
  font-size: 24px;
}

.overtime-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1;
  background: #f8f9fa;
}

.overtime-summary-card {
  background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 2px solid #e3f2fd;
  text-align: center;
}

.overtime-summary-card .summary-header {
  color: #495057;
  font-size: 16px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overtime-summary-card .summary-header i {
  color: #0255f0;
  font-size: 20px;
}

.overtime-summary-card .summary-value {
  font-size: 32px;
  font-weight: 700;
  color: #0255f0;
  margin-top: 10px;
}

.overtime-records-container {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.overtime-records-container .records-header {
  color: #2d3748;
  font-size: 18px;
  display: flex;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 2px solid #e9ecef;
}

.overtime-records-container .records-header i {
  color: #0255f0;
}

.overtime-details-table {
  margin-top: 20px;
  border-collapse: separate;
  border-spacing: 0;
}

.overtime-details-table thead th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #2d3748;
  font-weight: 600;
  padding: 15px 12px;
  text-align: right;
  border-bottom: 2px solid #dee2e6;
  font-size: 14px;
  white-space: nowrap;
}

.overtime-details-table thead th i {
  color: #0255f0;
  margin-left: 5px;
}

.overtime-details-table tbody tr {
  transition: all 0.2s ease;
}

.overtime-details-table tbody tr:hover {
  background-color: #f0f4ff;
  transform: translateX(-2px);
}

.overtime-details-table tbody td {
  padding: 15px 12px;
  border-bottom: 1px solid #e9ecef;
  text-align: right;
  vertical-align: middle;
  font-size: 14px;
}

.overtime-details-table tbody tr:last-child td {
  border-bottom: none;
}

.overtime-details-table .date-cell {
  color: #495057;
  font-weight: 500;
}

.overtime-details-table .time-cell {
  color: #6c757d;
  font-family: 'Courier New', monospace;
}

.overtime-details-table .overtime-cell {
  color: #0255f0;
}

.overtime-details-table .overtime-cell strong {
  font-size: 16px;
  font-weight: 700;
}

.overtime-details-table .regular-cell {
  color: #28a745;
}

.overtime-details-table .regular-cell strong {
  font-size: 16px;
  font-weight: 700;
}

.overtime-details-table .unit {
  font-size: 12px;
  color: #6c757d;
  font-weight: normal;
  margin-right: 5px;
}

.overtime-modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #e9ecef;
  background: white;
  display: flex;
  justify-content: center;
  border-radius: 0 0 20px 20px;
}

.overtime-modal-footer .btn-close-modal {
  padding: 12px 40px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  border: none;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(2, 85, 240, 0.3);
}

.overtime-modal-footer .btn-close-modal:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 85, 240, 0.4);
  background: linear-gradient(135deg, #0348d1 0%, #001a35 100%);
}

.overtime-modal-footer .btn-close-modal:active {
  transform: translateY(0);
}

/* Responsive Design للنافذة المنبثقة */
@media (max-width: 768px) {
  .overtime-details-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
  }
  
  .overtime-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 100%;
    max-height: 95vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .overtime-modal-content {
    width: 100%;
    max-height: 95vh;
    border-radius: 15px;
    margin: 0;
  }
  
  .overtime-modal-header {
    padding: 15px 20px;
  }
  
  .overtime-modal-header .modal-title {
    font-size: 16px;
  }
  
  .overtime-modal-header .modal-title i {
    font-size: 18px;
  }
  
  .overtime-modal-body {
    padding: 15px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: calc(95vh - 140px);
  }
  
  .overtime-summary-card {
    padding: 15px;
    margin-bottom: 15px;
  }
  
  .overtime-summary-card .summary-header {
    font-size: 14px;
    margin-bottom: 10px;
  }
  
  .overtime-summary-card .summary-header i {
    font-size: 16px;
  }
  
  .overtime-summary-card .summary-value {
    font-size: 24px;
    margin-top: 5px;
  }
  
  .overtime-records-container {
    padding: 15px;
  }
  
  .overtime-records-container .records-header {
    font-size: 16px;
    padding-bottom: 10px;
  }
  
  .overtime-details-table {
    font-size: 12px;
    margin-top: 15px;
  }
  
  .overtime-details-table thead th,
  .overtime-details-table tbody td {
    padding: 8px 6px;
    font-size: 12px;
  }
  
  .overtime-details-table thead th i,
  .overtime-details-table tbody td .unit {
    display: none;
  }
  
  .overtime-modal-footer {
    padding: 12px 15px;
  }
  
  .overtime-modal-footer .btn-close-modal {
    width: 100%;
    padding: 12px 20px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .overtime-modal-dialog {
    max-height: 98vh;
  }
  
  .overtime-modal-content {
    max-height: 98vh;
    border-radius: 12px;
  }
  
  .overtime-modal-header {
    padding: 12px 15px;
  }
  
  .overtime-modal-header .modal-title {
    font-size: 15px;
  }
  
  .overtime-modal-body {
    padding: 12px;
    max-height: calc(98vh - 120px);
  }
  
  .overtime-summary-card {
    padding: 12px;
    margin-bottom: 12px;
  }
  
  .overtime-summary-card .summary-header {
    font-size: 13px;
  }
  
  .overtime-summary-card .summary-value {
    font-size: 20px;
  }
  
  .overtime-records-container {
    padding: 12px;
    background: transparent;
    box-shadow: none;
  }
  
  .overtime-records-container .records-header {
    font-size: 15px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
  }
  
  .overtime-details-table {
    display: block;
    overflow-x: visible;
    -webkit-overflow-scrolling: touch;
    margin-top: 10px;
  }
  
  .overtime-details-table thead {
    display: none;
  }
  
  .overtime-details-table tbody {
    display: block;
  }
  
  .overtime-details-table tbody tr {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    padding: 0;
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .overtime-details-table tbody tr:active {
    transform: scale(0.98);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }
  
  .overtime-details-table tbody tr:last-child {
    margin-bottom: 0;
  }
  
  /* التاريخ في الأعلى بشكل بارز */
  .overtime-details-table tbody tr .date-cell {
    order: 1;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 14px 15px;
    border-bottom: 2px solid #dee2e6;
    font-weight: 700;
    font-size: 16px;
    color: #2d3748;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .overtime-details-table tbody tr .date-cell::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6c757d;
    margin-left: 8px;
    font-size: 13px;
    opacity: 0.8;
  }
  
  /* الأوقات معاً */
  .overtime-details-table tbody tr .time-cell {
    order: 2;
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-family: 'Courier New', monospace;
  }
  
  .overtime-details-table tbody tr .time-cell::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6c757d;
    margin-left: 10px;
    font-size: 13px;
    min-width: 40px;
    font-family: inherit;
  }
  
  /* تحسين عرض الأوقات - جعل "من" و"إلى" متجاورين */
  .overtime-details-table tbody tr .time-cell:first-of-type {
    border-bottom: 1px solid #f0f0f0;
  }
  
  .overtime-details-table tbody tr .time-cell:last-of-type {
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 5px;
  }
  
  /* العمل الإضافي */
  .overtime-details-table tbody tr .overtime-cell {
    order: 3;
    padding: 14px 15px;
    border-bottom: 1px solid #e3f2fd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9ff 0%, #e3f2fd 100%);
  }
  
  .overtime-details-table tbody tr .overtime-cell::before {
    content: attr(data-label);
    font-weight: 600;
    color: #0255f0;
    margin-left: 10px;
    font-size: 13px;
    min-width: 100px;
  }
  
  .overtime-details-table tbody tr .overtime-cell strong {
    font-size: 18px;
    color: #0255f0;
    font-weight: 700;
  }
  
  /* الساعات الرسمية */
  .overtime-details-table tbody tr .regular-cell {
    order: 4;
    padding: 14px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  }
  
  .overtime-details-table tbody tr .regular-cell::before {
    content: attr(data-label);
    font-weight: 600;
    color: #28a745;
    margin-left: 10px;
    font-size: 13px;
    min-width: 100px;
  }
  
  .overtime-details-table tbody tr .regular-cell strong {
    font-size: 18px;
    color: #28a745;
    font-weight: 700;
  }
  
  /* إخفاء الوحدة على الموبايل */
  .overtime-details-table tbody tr .overtime-cell .unit,
  .overtime-details-table tbody tr .regular-cell .unit {
    display: none;
  }
  
  .overtime-modal-footer {
    padding: 10px 12px;
  }
  
  .overtime-modal-footer .btn-close-modal {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* ==================== أنماط سجل الحضور الشهري للمشرف ==================== */

/* أنماط قائمة الموظفين */
.employee-attendance-item {
  display: flex;
  align-items: center;
  padding: 20px;
  margin: 15px 0;
  background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
  border-radius: 12px;
  border-right: 4px solid #0255f0;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.employee-attendance-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(2, 85, 240, 0.15);
}

.employee-attendance-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 20px;
}

.employee-attendance-info {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.employee-attendance-avatar {
  width: 50px;
  height: 50px;
  min-width: 50px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #0255f0 0%, #003566 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3em;
  font-weight: bold;
  box-shadow: 0 3px 10px rgba(2, 85, 240, 0.3);
}

.employee-attendance-details {
  flex: 1;
  min-width: 0;
}

.employee-attendance-details h5 {
  margin: 0 0 8px 0;
  color: #2c3e50;
  font-size: 1.2em;
  word-break: break-word;
}

.employee-attendance-button {
  padding: 12px 25px;
  background: linear-gradient(135deg, #0255f0, #001d3d);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s;
  box-shadow: 0 3px 10px rgba(2, 85, 240, 0.3);
  white-space: nowrap;
  cursor: pointer;
}

.employee-attendance-button:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(2, 85, 240, 0.4);
}

/* أنماط تقرير الحضور */
.employee-attendance-report-header {
  margin-top: 20px;
  padding: 15px;
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  color: white;
  border-radius: 10px;
  margin-bottom: 20px;
}

.employee-attendance-report-header h5 {
  margin: 0;
  color: white !important;
}

/* تحسينات الجدول */
#employeeMonthlyAttendanceTable {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

#employeeMonthlyAttendanceTable table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#employeeMonthlyAttendanceTable th {
  background: linear-gradient(135deg, #0255f0 0%, #001d3d 100%);
  color: white;
  padding: 14px 12px;
  text-align: right;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

#employeeMonthlyAttendanceTable td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

#employeeMonthlyAttendanceTable tr:hover {
  background: #f8f9fa;
  transition: background 0.2s ease;
}

#employeeMonthlyAttendanceTable tr:last-child td {
  border-bottom: none;
}

/* تحسينات الإحصائيات */
#employeeAttendanceStatistics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
  padding: 15px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

#employeeAttendanceStatistics .stat-item {
  background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
  padding: 18px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

#employeeAttendanceStatistics .stat-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(2, 85, 240, 0.15);
  border-color: #0255f0;
}

#employeeAttendanceStatistics .stat-label {
  display: block;
  color: #6c757d;
  font-size: 0.95em;
  margin-bottom: 10px;
  font-weight: 500;
}

#employeeAttendanceStatistics .stat-value {
  display: block;
  color: #0255f0;
  font-size: 1.8em;
  font-weight: bold;
  line-height: 1.2;
}

/* تحسينات للشاشات الصغيرة (الموبايل) */
@media (max-width: 768px) {
  /* تحسينات قائمة الموظفين */
  .employee-attendance-item {
    flex-direction: column;
    align-items: stretch;
    padding: 15px;
  }
  
  .employee-attendance-content {
    flex-direction: column;
    gap: 15px;
  }
  
  .employee-attendance-info {
    width: 100%;
    flex-direction: row;
    align-items: center;
  }
  
  .employee-attendance-avatar {
    width: 45px;
    height: 45px;
    min-width: 45px;
    font-size: 1.1em;
  }
  
  .employee-attendance-details {
    flex: 1;
    min-width: 0;
    margin-right: 10px;
  }
  
  .employee-attendance-details h5 {
    font-size: 1em;
    margin-bottom: 6px;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
  }
  
  .employee-attendance-details > div {
    flex-direction: column;
    gap: 8px;
  }
  
  .employee-attendance-details > div > span {
    width: 100%;
    text-align: center;
    padding: 6px 8px;
    font-size: 0.8em;
  }
  
  .employee-attendance-button {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    white-space: normal;
    text-align: center;
    padding: 10px 15px;
  }
  
  /* إصلاح container */
  #employeesAttendanceList {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  
  #employeesAttendanceList .employees-attendance-list {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px;
  }
  
  .supervisor-subsection:has(#employeesAttendanceList) {
    padding-left: 5px;
    padding-right: 5px;
    overflow-x: hidden;
  }
  
  /* تحسينات جدول الحضور */
  #employeeMonthlyAttendanceTable {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 15px -10px;
    padding: 0 10px;
  }
  
  #employeeMonthlyAttendanceTable table {
    font-size: 12px;
    min-width: 700px;
  }
  
  #employeeMonthlyAttendanceTable th {
    padding: 10px 8px;
    font-size: 12px;
  }
  
  #employeeMonthlyAttendanceTable td {
    padding: 10px 8px;
    font-size: 12px;
  }
  
  #employeeMonthlyAttendanceTable th,
  #employeeMonthlyAttendanceTable td {
    white-space: nowrap;
  }
  
  /* تحسينات الإحصائيات */
  #employeeAttendanceStatistics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  #employeeAttendanceStatistics .stat-item {
    padding: 12px 8px;
    text-align: center;
    box-sizing: border-box;
    min-width: 0;
  }
  
  #employeeAttendanceStatistics .stat-label {
    font-size: 0.85em;
    margin-bottom: 8px;
  }
  
  #employeeAttendanceStatistics .stat-value {
    font-size: 1.4em;
  }
  
  /* تحسينات عنوان التقرير */
  .employee-attendance-report-header {
    padding: 12px;
  }
  
  .employee-attendance-report-header h5 {
    font-size: 1.1em;
    margin-bottom: 10px;
  }
  
  .employee-attendance-report-header button {
    width: 100%;
    padding: 8px;
    font-size: 0.9em;
  }
  
  /* تحسينات منتقي الشهر */
  .supervisor-subsection .month-selector {
    flex-direction: row;
    gap: 8px;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .supervisor-subsection .month-selector span {
    order: 2;
    width: 100%;
    text-align: center;
    font-size: 0.9em;
    margin: 5px 0;
  }
  
  .supervisor-subsection .month-selector button {
    flex: 1;
    min-width: 70px;
    max-width: 120px;
    padding: 8px 10px;
    font-size: 12px;
  }
  
  .supervisor-subsection .month-nav-btn .btn-text {
    font-size: 11px;
  }
  
  .supervisor-subsection .month-nav-btn i {
    font-size: 10px;
  }
}

/* تحسينات للشاشات الصغيرة جداً (الهواتف الصغيرة) */
@media (max-width: 480px) {
  /* تحسينات الإحصائيات - عمود واحد */
  #employeeAttendanceStatistics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  #employeeAttendanceStatistics .stat-item {
    padding: 12px 10px;
    text-align: center;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }
  
  #employeeAttendanceStatistics .stat-label {
    font-size: 0.8em;
    margin-bottom: 6px;
  }
  
  #employeeAttendanceStatistics .stat-value {
    font-size: 1.3em;
  }
}

/* ============================================
   Flatpickr Calendar - Mobile Support
   ============================================ */

/* تنسيقات عامة للتقويم - بدون إجبار الظهور */
.flatpickr-calendar {
  z-index: 999999 !important;
  position: fixed !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  font-family: inherit !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 250, 251, 0.95) 100%) !important;
  border: 2px solid rgba(2, 85, 240, 0.15) !important;
  min-width: 280px !important;
  box-sizing: border-box !important;
}

/* التقويم المفتوح - يظهر في منتصف الشاشة بالضبط */
.flatpickr-calendar.open,
.flatpickr-calendar.flatpickr-open {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
}

/* إصلاح overflow للعناصر الداخلية */
.flatpickr-calendar .flatpickr-innerContainer {
  overflow: visible !important;
}

.flatpickr-calendar .flatpickr-rContainer {
  overflow: visible !important;
}

/* تحسين رأس التقويم */
.flatpickr-calendar .flatpickr-month {
  background: linear-gradient(135deg, #0255f0 0%, #003566 100%) !important;
  color: #ffffff !important;
  padding: 15px 10px !important;
  border-radius: 0 !important;
  position: relative !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 50px !important;
}

.flatpickr-calendar .flatpickr-month .flatpickr-current-month {
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex: 1 !important;
  text-align: center !important;
  padding: 0 10px !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.flatpickr-calendar .flatpickr-month .flatpickr-monthDropdown-months {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 6px !important;
  padding: 4px 8px !important;
  overflow: visible !important;
  white-space: nowrap !important;
}

/* إصلاح عرض السنة والشهر */
.flatpickr-calendar .flatpickr-month .flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-calendar .flatpickr-month .flatpickr-current-month .cur-year {
  display: inline-block !important;
  overflow: visible !important;
  white-space: nowrap !important;
  max-width: none !important;
}

/* إصلاح container التقويم لضمان عدم قطع المحتوى */
.flatpickr-calendar .flatpickr-wrapper {
  overflow: visible !important;
  position: relative !important;
}

.flatpickr-calendar .flatpickr-months {
  overflow: visible !important;
  position: relative !important;
}

/* إصلاح عرض الوقت */
.flatpickr-calendar .flatpickr-time .flatpickr-time-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  overflow: visible !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.flatpickr-calendar .flatpickr-time .flatpickr-hour,
.flatpickr-calendar .flatpickr-time .flatpickr-minute {
  overflow: visible !important;
  white-space: nowrap !important;
}

/* تحسين أيام الأسبوع */
.flatpickr-calendar .flatpickr-weekdays {
  background: linear-gradient(135deg, rgba(2, 85, 240, 0.1) 0%, rgba(0, 53, 102, 0.05) 100%) !important;
  padding: 10px 0 !important;
  border-bottom: 2px solid rgba(2, 85, 240, 0.1) !important;
}

.flatpickr-calendar .flatpickr-weekday {
  color: #0255f0 !important;
  font-weight: 600 !important;
  font-size: 13px !important;
}

/* تحسين الأيام */
.flatpickr-calendar .flatpickr-day {
  color: #1e293b !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
  font-weight: 500 !important;
}

.flatpickr-calendar .flatpickr-day:hover {
  background: linear-gradient(135deg, rgba(2, 85, 240, 0.1) 0%, rgba(0, 53, 102, 0.05) 100%) !important;
  border: 1px solid rgba(2, 85, 240, 0.3) !important;
  color: #0255f0 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 8px rgba(2, 85, 240, 0.15) !important;
}

.flatpickr-calendar .flatpickr-day.selected,
.flatpickr-calendar .flatpickr-day.startRange,
.flatpickr-calendar .flatpickr-day.endRange {
  background: linear-gradient(135deg, #0255f0 0%, #003566 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(2, 85, 240, 0.4) !important;
  font-weight: 600 !important;
}

.flatpickr-calendar .flatpickr-day.today {
  border: 2px solid #0255f0 !important;
  color: #0255f0 !important;
  background: rgba(2, 85, 240, 0.05) !important;
  font-weight: 600 !important;
}

.flatpickr-calendar .flatpickr-day.today:hover {
  background: linear-gradient(135deg, rgba(2, 85, 240, 0.15) 0%, rgba(0, 53, 102, 0.1) 100%) !important;
}

.flatpickr-calendar .flatpickr-day.flatpickr-disabled,
.flatpickr-calendar .flatpickr-day.prevMonthDay,
.flatpickr-calendar .flatpickr-day.nextMonthDay {
  color: #cbd5e1 !important;
  opacity: 0.5 !important;
}

/* تحسين أزرار التنقل */
.flatpickr-calendar .flatpickr-prev-month,
.flatpickr-calendar .flatpickr-next-month {
  color: #ffffff !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
  background: rgba(255, 255, 255, 0.2) !important;
}

.flatpickr-calendar .flatpickr-prev-month:hover,
.flatpickr-calendar .flatpickr-next-month:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.1) !important;
}

.flatpickr-calendar .flatpickr-prev-month svg,
.flatpickr-calendar .flatpickr-next-month svg {
  fill: #ffffff !important;
}

/* تحسين اختيار الوقت */
.flatpickr-calendar .flatpickr-time {
  padding: 15px 10px !important;
  border-top: 2px solid rgba(2, 85, 240, 0.1) !important;
  background: linear-gradient(135deg, rgba(249, 250, 251, 0.5) 0%, rgba(255, 255, 255, 0.8) 100%) !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 60px !important;
}

.flatpickr-calendar .flatpickr-time input {
  border: 2px solid rgba(2, 85, 240, 0.15) !important;
  border-radius: 8px !important;
  color: #1e293b !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
}

.flatpickr-calendar .flatpickr-time input:hover {
  border-color: rgba(2, 85, 240, 0.3) !important;
  background: rgba(2, 85, 240, 0.05) !important;
}

.flatpickr-calendar .flatpickr-time input:focus {
  border-color: #0255f0 !important;
  box-shadow: 0 0 0 4px rgba(2, 85, 240, 0.1) !important;
  background: #ffffff !important;
}

.flatpickr-calendar .flatpickr-time .flatpickr-time-separator {
  color: #0255f0 !important;
  font-weight: 600 !important;
}

/* تحسين أزرار الوقت */
.flatpickr-calendar .flatpickr-time .arrowUp,
.flatpickr-calendar .flatpickr-time .arrowDown {
  color: #0255f0 !important;
  transition: all 0.2s ease !important;
}

.flatpickr-calendar .flatpickr-time .arrowUp:hover,
.flatpickr-calendar .flatpickr-time .arrowDown:hover {
  color: #003566 !important;
  transform: scale(1.2) !important;
}

/* تحسينات خاصة بالجوال */
@media (max-width: 768px) {
  /* تنسيقات التقويم على الموبايل - بدون إجبار الظهور */
  .flatpickr-calendar {
    max-width: calc(100vw - 20px) !important;
    min-width: 280px !important;
    width: auto !important;
    position: fixed !important;
    z-index: 999999 !important;
    pointer-events: auto !important;
    display: none !important;
  }
  
  /* التقويم المفتوح على الموبايل - يظهر في منتصف الشاشة بالضبط */
  .flatpickr-calendar.open,
  .flatpickr-calendar.flatpickr-open {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    left: 50% !important;
    right: auto !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  /* إصلاح overflow على الموبايل */
  .flatpickr-calendar .flatpickr-innerContainer {
    overflow: visible !important;
  }
  
  .flatpickr-calendar .flatpickr-rContainer {
    overflow: visible !important;
  }
  
  /* إصلاح رأس التقويم على الموبايل */
  .flatpickr-calendar .flatpickr-month {
    overflow: visible !important;
    flex-wrap: nowrap !important;
    min-width: 100% !important;
  }
  
  .flatpickr-calendar .flatpickr-month .flatpickr-current-month {
    font-size: 14px !important;
    padding: 0 5px !important;
    flex-shrink: 0 !important;
  }
  
  /* إصلاح الوقت على الموبايل */
  .flatpickr-calendar .flatpickr-time {
    overflow: visible !important;
    padding: 12px 8px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  
  .flatpickr-calendar .flatpickr-time .flatpickr-time-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    overflow: visible !important;
    width: 100% !important;
  }

  /* تحسين حجم الخط على الموبايل */
  .flatpickr-calendar .flatpickr-month {
    padding: 10px !important;
  }

  .flatpickr-calendar .flatpickr-weekdays {
    padding: 8px 0 !important;
  }

  .flatpickr-calendar .flatpickr-days {
    padding: 5px !important;
  }

  .flatpickr-calendar .flatpickr-day {
    height: 40px !important;
    line-height: 40px !important;
    font-size: 14px !important;
    margin: 2px !important;
    border-radius: 8px !important;
  }

  /* تحسين أزرار التنقل */
  .flatpickr-calendar .flatpickr-prev-month,
  .flatpickr-calendar .flatpickr-next-month {
    height: 35px !important;
    width: 35px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    touch-action: manipulation !important;
  }

  /* تحسين اختيار الوقت */
  .flatpickr-calendar .flatpickr-time {
    padding: 10px !important;
    border-top: 1px solid #e6e6e6 !important;
  }

  .flatpickr-calendar .flatpickr-time input {
    height: 40px !important;
    font-size: 16px !important;
    padding: 0 10px !important;
    border-radius: 8px !important;
    touch-action: manipulation !important;
  }

  /* تحسين الأزرار */
  .flatpickr-calendar .flatpickr-time .flatpickr-time-separator {
    margin: 0 5px !important;
  }

  /* ضمان أن التقويم يظهر داخل الـ modal */
  .modal .flatpickr-calendar {
    z-index: 10000 !important;
  }

/* تحسين اللمس على الأيام */
.flatpickr-calendar .flatpickr-day:active {
  transform: scale(0.95) !important;
  transition: transform 0.1s ease !important;
}

/* تحسين عرض التقويم في الوضع الأفقي */
@media (orientation: landscape) {
  .flatpickr-calendar {
    max-height: 90vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}


/* تحسينات إضافية للشاشات الصغيرة جداً */
@media (max-width: 480px) {
  .flatpickr-calendar {
    max-width: calc(100vw - 10px) !important;
    font-size: 12px !important;
  }

  .flatpickr-calendar .flatpickr-day {
    height: 35px !important;
    line-height: 35px !important;
    font-size: 12px !important;
    margin: 1px !important;
  }

  .flatpickr-calendar .flatpickr-prev-month,
  .flatpickr-calendar .flatpickr-next-month {
    height: 30px !important;
    width: 30px !important;
  }
}

/* ضمان عمل التقويم مع RTL */
.flatpickr-calendar.rtl {
  direction: rtl !important;
}

/* تنسيقات footer مع زر الموافق */
.flatpickr-calendar .flatpickr-footer {
  padding: 12px 15px !important;
  border-top: 2px solid rgba(2, 85, 240, 0.1) !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  background: linear-gradient(135deg, rgba(249, 250, 251, 0.95) 0%, rgba(255, 255, 255, 1) 100%) !important;
  border-radius: 0 0 12px 12px !important;
  margin-top: 0 !important;
}

.flatpickr-calendar .flatpickr-footer button {
  padding: 10px 20px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  border: none !important;
  outline: none !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
}

.flatpickr-calendar .flatpickr-cancel-btn {
  background: #ffffff !important;
  color: #666666 !important;
  border: 2px solid #e0e0e0 !important;
}

.flatpickr-calendar .flatpickr-cancel-btn:hover {
  background: #f5f5f5 !important;
  border-color: #d0d0d0 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.flatpickr-calendar .flatpickr-cancel-btn:active {
  transform: translateY(0) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.flatpickr-calendar .flatpickr-confirm-btn {
  background: linear-gradient(135deg, #0255f0 0%, #003566 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(2, 85, 240, 0.3) !important;
}

.flatpickr-calendar .flatpickr-confirm-btn:hover {
  opacity: 0.95 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(2, 85, 240, 0.4) !important;
}

.flatpickr-calendar .flatpickr-confirm-btn:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 6px rgba(2, 85, 240, 0.3) !important;
}

/* تحسينات footer على الموبايل */
@media (max-width: 768px) {
  .flatpickr-calendar .flatpickr-footer {
    padding: 10px 12px !important;
    gap: 8px !important;
    flex-direction: row-reverse !important;
  }

  .flatpickr-calendar .flatpickr-footer button {
    padding: 10px 18px !important;
    font-size: 14px !important;
    flex: 1 !important;
    min-width: 0 !important;
  }
}

/* تحسينات footer على الشاشات الصغيرة جداً */
@media (max-width: 480px) {
  .flatpickr-calendar .flatpickr-footer {
    padding: 8px 10px !important;
    gap: 6px !important;
  }

  .flatpickr-calendar .flatpickr-footer button {
    padding: 8px 14px !important;
    font-size: 13px !important;
  }
}

/* تحسين مظهر التقويم في الوضع المظلم (إن كان موجود) */
@media (prefers-color-scheme: dark) {
  .flatpickr-calendar {
    background: #1e293b !important;
    color: #ffffff !important;
  }

  .flatpickr-calendar .flatpickr-footer {
    background: #1e293b !important;
    border-top-color: rgba(255, 255, 255, 0.1) !important;
  }

  .flatpickr-calendar .flatpickr-cancel-btn {
    background: #2d3748 !important;
    color: #e2e8f0 !important;
    border-color: #4a5568 !important;
  }

  .flatpickr-calendar .flatpickr-cancel-btn:hover {
    background: #374151 !important;
  }
}

}