/* أنماط مشتركة للمشروع */
:root {
  --brand-primary: #294f84;
  --brand-secondary: #348254;
  --brand-orange: #d87b2e;
  --gray-500: #8b98a7;
  --gray-100: #f2f2f2;
  --brand-accent: #294f84;
  /* استخدام اللون الرسمي الموحد */
  --surface-1: #f9fafb;
  --surface-2: #f7f9fb;
  --text-main: #1d2733;
  --text-muted: #6c7a89;
}

html,
body {
  background-color: var(--surface-1);
  /* خلفية داكنة خارج الغلاف */
  color: var(--text-main);
  font-family: 'SSTArabic', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.bg-body-outer {
  background-color: var(--surface-1);
}

/* Dashboard */
.dashboard-controls {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.dashboard-controls .filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-controls .year-inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.dashboard-controls .year-inline .select-compact {
  width: auto;
  min-width: 120px;
}

.dashboard-page {
  position: relative;
}

.dashboard-content {
  position: relative;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: #fff;
  border: 1px solid #dfe7f2;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}

.stat-card .card-header {
  padding: 6px 8px;
  border-bottom: 1px solid #e7eef6;
  margin-bottom: 10px;
  background: linear-gradient(180deg, #f7fbff, #f3f7fb);
  border-radius: 10px;
}

.stat-card .card-header .title {
  font-size: 1rem;
}

.stat-card .card-body {
  padding-top: 6px;
}

.stat-card .card-header .icon {
  background-color: rgba(41, 79, 132, .06);
  color: var(--brand-primary);
}

.stat-card.visitors .card-header .icon {
  background-color: rgba(52, 130, 84, .08);
  color: var(--brand-secondary);
}

.stat-card.logins .card-header .icon {
  background-color: rgba(41, 79, 132, .08);
  color: var(--brand-primary);
}

.stat-card.updates .card-header .icon {
  background-color: rgba(216, 123, 46, .08);
  color: var(--brand-orange);
}

.stat-card .title {
  font-weight: 800;
  color: var(--text-main);
}

.month-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 992px) {
  .month-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .month-list {
    grid-template-columns: 1fr;
  }
}

.month-item {
  background-color: #f9fbfd;
  border: 1px solid #e3ebf4;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: box-shadow .15s ease, transform .15s ease;
}

.month-item:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
  transform: translateY(-1px);
}

.month-label {
  color: var(--text-muted);
  font-weight: 700;
}

.badge-stat {
  background-color: var(--brand-primary);
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 800;
  min-width: 44px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}

.top-programs {
  align-self: start;
}

.tp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.tp-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e3ebf4;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
  transition: box-shadow .15s ease, transform .15s ease;
}

.tp-item:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  transform: translateY(-1px);
}

.tp-label {
  font-weight: 700;
  color: var(--text-main);
}

/* تحسين محاذاة حقل الشهر داخل الهيدر */
.top-programs .card-header {
  gap: 8px;
}

.top-programs .card-header .form-label {
  font-weight: 700;
  color: var(--text-muted);
}

.top-programs .card-header .form-select {
  min-width: 160px;
}

/* سطر اختيار الشهر داخل جسم البطاقة */
.top-programs .month-select-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.top-programs .month-select-row .form-label {
  white-space: nowrap;
}

.top-programs .month-select-row .select-compact {
  width: auto;
  min-width: 160px;
}

/* أزرار الشهور */
.month-filter {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.month-filter .month-btn {
  background: #f1f6fb;
  color: #21496f;
  border: 1px solid #e6eef5;
  border-radius: 8px;
  padding: .35rem .6rem;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
}

.month-filter .month-btn:hover {
  background: #e6f0fa;
}

.month-filter .month-btn.active {
  background: linear-gradient(180deg, #3a7db6, #316fa1);
  color: #fff;
  border-color: #316fa1;
}

/* sticky side card inside container */
.side-col .stat-card.top-programs {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.top-programs .card-body {
  max-height: 420px;
  overflow: auto;
}

/* New high-level layout */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 992px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }
}

.summary-card {
  background: #ffffff;
  border: 1px solid #dfe7f2;
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}

.summary-title {
  color: var(--text-muted);
  font-weight: 700;
}

.summary-value {
  color: var(--brand-primary);
  font-weight: 900;
  font-size: 1.25rem;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
}

.two-col-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: start;
  overflow: visible;
  position: relative;
}

@media (max-width: 1200px) {
  .two-col-grid {
    grid-template-columns: 1fr;
  }
}

.main-col {
  grid-column: 1;
  min-width: 0;
}

.side-col {
  grid-column: 2;
  position: relative;
  min-width: 0;
}

/* إجبار تخطيط عمود واحد عند الحاجة */
.two-col-grid.single-col {
  grid-template-columns: 1fr !important;
}

/* شريط الأخبار العلوي */
.newsbar-top {
  background-color: #f2f2f2;
  padding: 8px 0;
  color: #333;
  font-size: 12px;
  font-weight: 400;
}

.news-ticker-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
}

.news-text {
  color: #333;
}

.news-text.read-more {
  color: var(--brand-primary);
  cursor: pointer;
  margin-right: 1px;
}

.news-separator {
  color: #348254;
  opacity: 1;
  font-weight: 400;
}

/* Responsive للشريط الإخباري (مبسطة) */
@media (max-width: 1200px) {
  .newsbar-top {
    font-size: 10px;
    padding: 6px 0;
  }

  .news-ticker-wrapper {
    gap: 10px;
  }
}

@media (max-width: 800px) {
  .newsbar-top {
    font-size: 8px;
    padding: 4px 0;
  }

  .news-ticker-wrapper {
    gap: 6px;
  }

  .news-ticker-wrapper .news-text:nth-child(n+7),
  .news-ticker-wrapper .news-separator:nth-child(n+6) {
    display: none;
  }
}

@media (max-width: 480px) {
  .newsbar-top {
    font-size: 6px;
    padding: 2px 0;
  }

  .news-ticker-wrapper {
    gap: 3px;
  }

  .news-ticker-wrapper .news-text:nth-child(n+3),
  .news-ticker-wrapper .news-separator:nth-child(n+2) {
    display: none;
  }
}

/* الناف بار الرئيسي */
.main-navbar {
  background-color: white;
  border-bottom: 1px solid #e6eef5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  position: relative;
}

/* تموضع زر الهامبرغر إلى اليمين والشعارات في المنتصف */
.navbar-content {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

/* إجبار ترتيب العناصر: يمين (توجلر) - وسط (شعارات) - يسار (قائمة) */
.navbar-right {
  order: 1;
  justify-self: end;
  display: block;
}

.navbar-logos {
  order: 2;
  justify-self: center;
  text-align: center;
  width: 100%;
  display: flex;
  justify-content: center;
}

.navbar-menu {
  order: 3;
  justify-self: start;
}

/* الشعارات */
.navbar-logos {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.logos-right-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-separator {
  width: 1px;
  height: 35px;
  background-color: #e0e0e0;
  opacity: 0.7;
}

.logo-info-bank {
  height: 50px;
  width: auto;
}

.logo-hrdf {
  height: 50px;
  width: auto;
}

/* قائمة التنقل */
.navbar-menu {
  display: flex;
  justify-content: center;
  width: 100%;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 25px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nav-item {
  position: relative;
  flex-shrink: 0;
}

.nav-link {
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 14px;
  transition: color 0.2s ease, background-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--brand-primary);
  background-color: rgba(41, 79, 132, 0.05);
}

/* حل مشكلة الهوفر للعناصر العادية */
.nav-item:not(.dropdown):not(.search-dropdown) {
  position: relative;
}

.nav-item:not(.dropdown):not(.search-dropdown)::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  height: 15px;
  background: transparent;
}

.nav-link i {
  font-size: 16px;
}

/* زر دليل المستخدم  */
.guide-btn {
  background-color: var(--brand-orange);
  color: white !important;
  border-radius: 18px;
  padding: 6px 12px;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1.5px solid var(--brand-orange);
  font-size: 0.9rem;
}

.guide-btn i {
  color: white !important;
  font-size: 0.9rem;
  margin-left: 0.3rem;
}

.guide-btn:hover {
  background-color: #c26b25;
  border-color: #c26b25;
  color: white !important;
  box-shadow: 0 4px 12px rgba(216, 123, 46, 0.3);
}

/* زر تسجيل الدخول ) */
.login-btn {
  background-color: var(--brand-primary);
  color: white !important;
  border-radius: 50%;
  padding: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-btn i {
  color: white !important;
  font-size: 1rem;
  margin: 0 !important;
}

.login-btn:hover {
  background-color: #294f84;
  color: white !important;
}

/* زر تسجيل الدخول مع اسم المستخدم */
.login-btn-with-name {
  border-radius: 18px;
  padding: 6px 12px;
  width: auto;
  height: auto;
  font-size: 0.9rem;
  max-width: 220px;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.login-btn.login-btn-with-name {
  width: auto !important;
  height: auto !important;
  border-radius: 18px !important;
  padding: 6px 12px;
}

.login-btn-with-name i {
  font-size: 0.9rem;
  margin-left: 0.3rem !important;
}

/* نص اسم المستخدم داخل زر الحساب */
.login-btn-with-name .username-text {
  display: inline-block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

@media (max-width: 1400px) {
  .login-btn-with-name .username-text {
    max-width: 150px;
  }
}

@media (max-width: 1200px) {
  .login-btn-with-name .username-text {
    max-width: 130px;
  }
}

@media (max-width: 1000px) {
  .login-btn-with-name .username-text {
    max-width: 110px;
  }
}

@media (max-width: 800px) {
  .login-btn-with-name .username-text {
    max-width: 90px;
  }
}

/* أيقونة المستخدم في الناف بار */
.navbar-user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 20rem;
  object-fit: cover;
}

.login-btn-with-name .navbar-user-avatar {
  width: 22px;
  height: 22px;
}

/* Dropdown */
.dropdown-toggle::after {
  display: none;
}

.dropdown-menu {
  display: none;
  background-color: white;
  border: 1px solid #e6eef5;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  margin-top: 8px;
  min-width: 220px;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  animation: dropdownSlide 0.15s ease-out;
  padding: 8px 0;
}

.dropdown-menu.show {
  display: block;
}

/* قائمة تسجيل الدخول المنسدلة */
.login-dropdown {
  position: relative;
}

.login-dropdown .dropdown-menu {
  padding: 0;
  border-radius: 12px;
  border-color: #e8eef5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
  margin-top: 0;
  overflow: hidden;
  right: auto;
  left: 0;
  transform: translateX(0);
  min-width: 240px;
  max-width: min(90vw, 320px);
}

.login-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  height: 25px;
  background: transparent;
}

.login-dropdown .dropdown-menu::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 26px;
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent #316fa1 transparent;
  z-index: 1;
}


@media (max-width: 600px) {
  .login-dropdown .dropdown-menu {
    left: auto;
    right: 0;
    max-width: 92vw;
  }

  .login-dropdown .dropdown-menu::before {
    left: auto;
    right: 26px;
  }
}

.login-dropdown .menu-header {
  font-weight: 800;
  color: #ffffff;
  background: #316fa1;
  padding: 1rem 1.25rem;
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  border-bottom: 3px solid #294f84;
}

.login-dropdown .menu-body {
  padding: 1rem 1.25rem;
}

.login-dropdown .form-label {
  font-weight: 700;
  margin-bottom: .5rem;
  color: #1d2733;
  font-size: 0.95rem;
}

.login-dropdown .form-control {
  padding: .75rem .9rem;
  border: 1px solid #e3ebf4;
  background-color: #f8fbff;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.login-dropdown .form-control:focus {
  border-color: #316fa1;
  box-shadow: 0 0 0 .2rem rgba(49, 111, 161, .15);
  background-color: #ffffff;
}

.login-dropdown .form-control::placeholder {
  color: #96a5b4;
}

.login-dropdown .menu-login .btn-primary {
  background-color: #316fa1;
  border-color: #316fa1;
  font-weight: 800;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.login-dropdown .menu-login .btn-primary:hover {
  background-color: #2e6796;
  border-color: #2e6796;
  box-shadow: 0 4px 12px rgba(49, 111, 161, 0.25);
}

.login-dropdown .dropdown-item {
  padding: .6rem .8rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.login-dropdown .dropdown-item:hover {
  background-color: #f0f6fb;
}

.login-dropdown .menu-body .small {
  color: #316fa1;
  text-decoration: none;
  font-weight: 600;
}

.login-dropdown .menu-body .small:hover {
  text-decoration: underline;
  color: #294f84;
}

/* حالة مستخدم مسجل الدخول: إظهار قسم تسجيل الخروج وإخفاء نموذج الدخول */
body.user-logged-in .login-dropdown .menu-login {
  display: none;
}

body.user-logged-in .login-dropdown .menu-logout {
  display: block;
}

body:not(.user-logged-in) .login-dropdown .menu-logout {
  display: none;
}

/* تحسينات إضافية لزر تسجيل الخروج */
.login-dropdown .btn-outline-danger {
  border-width: 2px;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.login-dropdown .btn-outline-danger:hover {
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.25);
}

.login-dropdown .dropdown-divider {
  margin: 0.75rem 0;
  border-top-width: 1px;
  opacity: 0.15;
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  color: #333;
  padding: 12px 18px;
  font-size: 14px;
  border-bottom: 1px solid #f8f9fa;
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background-color: rgba(41, 79, 132, 0.05);
  color: var(--brand-primary);
}

.dropdown-item:last-child {
  border-bottom: none;
}

/* المنطقة اليمنى */
.navbar-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* زر الهامبرغر */
.navbar-toggler {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: #333;
  z-index: 3;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.navbar-toggler:hover {
  background-color: rgba(41, 79, 132, 0.05);
}

/* رسم أيقونة الهامبرغر بثلاثة خطوط بشكل مضمون */
.navbar-toggler-icon {
  display: inline-block;
  width: 24px;
  height: 2px;
  background-color: var(--brand-primary) !important;
  position: relative;
  box-shadow: 0 -7px 0 0 var(--brand-primary), 0 7px 0 0 var(--brand-primary);
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 2px;
  background-color: var(--brand-primary);
  opacity: 0;
  transition: transform .25s ease, opacity .2s ease;
}

/* عند الفتح: إخفاء الخطوط الثلاثة واستبدالها بعلامة × */
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
  background-color: transparent !important;
  box-shadow: none !important;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
  opacity: 1;
  transform: rotate(45deg);
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
  opacity: 1;
  transform: rotate(-45deg);
}

/* القائمة المنسدلة للجوال */
.collapse {
  display: none;
}

.collapse.show {
  display: block;
}

.navbar-nav-mobile {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  background-color: white;
  border-top: 1px solid #e6eef5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 15px 20px;
  list-style: none;
  margin: 0;
  z-index: 10;
  animation: slideDown 0.3s ease-out;
  border-radius: 0 0 8px 8px;
  text-align: right;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-nav-link {
  display: block;
  color: #333;
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 14px;
  font-weight: 500;
}

.mobile-nav-link:hover {
  color: var(--brand-primary);
}

.mobile-nav-link:last-child {
  border-bottom: none;
}

/* drawer للجوال من اليمين */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: none;
}

.mobile-drawer.show {
  display: block;
}

.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.mobile-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(90vw, 360px);
  background: #fff;
  border-inline-start: 1px solid #e6eef5;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
}

.mobile-drawer.show .mobile-drawer-panel {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #e6eef5;
  background-color: #f8f9fa;
}

.btn-close-drawer {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-main);
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-close-drawer:hover {
  background: rgba(41, 79, 132, .06);
}

.mobile-drawer-title {
  font-weight: 700;
  color: var(--text-main);
}

/* معلومات المستخدم في الهيدر */
.mobile-drawer-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 20rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-user-avatar .user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20rem;
}

.mobile-user-details {
  display: flex;
  flex-direction: column;
}

.mobile-user-name {
  font-weight: 700;
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.2;
}

/* فوتر القائمة الجانبية */
.mobile-drawer-footer {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid #e6eef5;
  background-color: #f8f9fa;
}

.btn-logout-mobile-footer {
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #dc3545;
  color: #dc3545;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: 'SSTArabic', sans-serif;
}

.btn-logout-mobile-footer:hover {
  background-color: #dc3545;
  color: #ffffff;
}

.btn-logout-mobile-footer i {
  font-size: 16px;
}

/* زر تسجيل الدخول في الفوتر */
.btn-login-mobile-footer {
  width: 100%;
  padding: 12px 16px;
  background: var(--brand-primary);
  border: 1px solid var(--brand-primary);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: 'SSTArabic', sans-serif;
  text-decoration: none;
}

.btn-login-mobile-footer:hover {
  background-color: #294f84;
  color: #ffffff;
  text-decoration: none;
}

.btn-login-mobile-footer i {
  font-size: 16px;
}

/* رسالة عدم وجود بيانات */
.no-data-message {
  background-color: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.no-data-message-icon {
  font-size: 1.2rem;
  color: #ff9800;
  flex-shrink: 0;
}

.no-data-message-text {
  color: #856404;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
  font-family: 'SSTArabic', sans-serif;
}

.navbar-nav-mobile {
  list-style: none;
  margin: 0;
  padding: 10px 16px;
  overflow-y: auto;
}

.navbar-nav-mobile .mobile-nav-link {
  display: block;
  padding: 12px 0;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
}

.navbar-nav-mobile .mobile-nav-link:last-child {
  border-bottom: none;
}

/* زر تسجيل الخروج في الجوال */
.btn-logout-mobile {
  display: block;
  width: 100%;
  padding: 12px 0;
  background: none;
  border: none;
  color: #dc3545;
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
  font-size: 14px;
  font-weight: 500;
  text-align: right;
  cursor: pointer;
}

.btn-logout-mobile:hover {
  background-color: rgba(220, 53, 69, 0.1);
}

/* البحث في الجوال */
.mobile-search-submenu {
  border-bottom: 1px solid #f5f5f5;
}

.mobile-search-submenu summary {
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #333;
  font-size: 14px;
  font-weight: 500;
}

.mobile-search-submenu summary::-webkit-details-marker {
  display: none;
}

.mobile-search-submenu summary i.bi-search {
  margin-left: 8px;
}

.mobile-search-submenu summary i.bi-chevron-down {
  transition: transform 0.3s ease;
}

.mobile-search-submenu[open] summary i.bi-chevron-down {
  transform: rotate(180deg);
}

.mobile-search-content {
  padding: 15px 0 10px 0;
  background-color: #f8f9fa;
  border-radius: 8px;
  margin: 5px 0;
}

.mobile-search-form {
  padding: 0 15px;
}

.mobile-search-section {
  margin-bottom: 15px;
}

.mobile-search-section:last-child {
  margin-bottom: 0;
}

.mobile-search-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #495057;
  margin-bottom: 8px;
}

.mobile-search-input-group {
  display: flex;
  gap: 8px;
}

.mobile-search-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-size: 14px;
  background-color: #fff;
  color: #495057;
}

.mobile-search-input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(49, 111, 161, 0.1);
}

.mobile-search-btn {
  padding: 10px 15px;
  background-color: var(--brand-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-search-btn:hover {
  background-color: #294f84;
}

.mobile-search-btn i {
  font-size: 14px;
}

/* أنماط قائمة البرامج في البحث المحمول ستكون مطابقة للأصلية */

/* إصلاح القوائم الفرعية للجوال باستخدام details/summary */
.mobile-submenu {
  border-bottom: 1px solid #f5f5f5;
}

/* إعادة تعيين الأنماط القديمة للـ details element */
details.mobile-submenu .mobile-submenu-list {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.mobile-submenu summary {
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #333;
  font-size: 14px;
  font-weight: 500;
}

.mobile-submenu summary::-webkit-details-marker {
  display: none;
}

.mobile-submenu summary i.bi-chevron-down {
  transition: transform 0.3s ease;
}

.mobile-submenu[open] summary i.bi-chevron-down {
  transform: rotate(180deg);
}

.mobile-submenu-list {
  list-style: none;
  margin: 0;
  padding: 8px 0 12px 0;
  background-color: #f8f9fa;
  border-radius: 6px;
  margin-top: 5px;
  display: block !important;
  /* إجبار الظهور للـ details element */
}

.mobile-submenu-list li {
  padding: 0 15px;
}

.mobile-submenu-list li+li {
  border-top: 1px solid #e9ecef;
}

.mobile-submenu-list a {
  display: block;
  padding: 10px 0;
  color: #495057;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.3s ease;
}

.mobile-submenu-list a:hover {
  color: var(--brand-primary);
}

/* تأكيد ظهور العناصر الفرعية */
details.mobile-submenu[open] .mobile-submenu-list {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
}

details.mobile-submenu[open] .mobile-submenu-list li {
  display: list-item !important;
}

details.mobile-submenu[open] .mobile-submenu-list a {
  display: block !important;
  visibility: visible !important;
}

/* تحسينات لموضع العناصر على الشاشات الصغيرة والمتوسطة */
@media (max-width: 1100px) {
  .navbar-menu {
    display: none;
  }

  .navbar-right {
    display: block;
  }

  .navbar-logos .logo-hrdf,
  .navbar-logos .logo-info-bank {
    height: 36px;
  }
}

/* تكيف التدريجي مع أحجام الشاشات */
@media (max-width: 1400px) {
  .nav-list {
    gap: 20px;
  }

  .nav-link {
    font-size: 13px;
    padding: 7px 10px;
  }

  .guide-btn {
    padding: 5px 10px;
    font-size: 0.85rem;
  }

  .login-btn {
    width: 32px;
    height: 32px;
    padding: 7px;
  }

  .login-btn i {
    font-size: 0.95rem;
  }

  .login-btn-with-name {
    padding: 5px 10px;
    font-size: 0.85rem;
  }

  .logo-info-bank,
  .logo-hrdf {
    height: 47px;
  }
}

@media (max-width: 1200px) {
  .nav-list {
    gap: 15px;
  }

  .nav-link {
    font-size: 12px;
    padding: 6px 8px;
  }

  .guide-btn {
    padding: 5px 10px;
    font-size: 0.8rem;
  }

  .login-btn {
    width: 31px;
    height: 31px;
    padding: 6px;
  }

  .login-btn i {
    font-size: 0.9rem;
  }

  .login-btn-with-name {
    padding: 5px 10px;
    font-size: 0.8rem;
  }

  .logo-info-bank,
  .logo-hrdf {
    height: 45px;
  }

  .logos-right-section {
    gap: 12px;
  }

  .logo-separator {
    height: 32px;
  }
}

@media (max-width: 1000px) {
  .nav-list {
    gap: 12px;
  }

  .nav-link {
    font-size: 11px;
    padding: 5px 6px;
  }

  .guide-btn {
    padding: 4px 8px;
    font-size: 0.7rem;
  }

  .guide-btn i {
    font-size: 0.75rem;
  }

  .login-btn {
    width: 30px;
    height: 30px;
    padding: 6px;
  }

  .login-btn i {
    font-size: 0.85rem;
  }

  .login-btn-with-name {
    padding: 4px 8px;
    font-size: 0.7rem;
  }

  .logo-info-bank,
  .logo-hrdf {
    height: 42px;
  }

  .logos-right-section {
    gap: 10px;
  }

  .logo-separator {
    height: 30px;
  }
}

@media (max-width: 800px) {
  .nav-list {
    gap: 4px;
  }

  .nav-link {
    font-size: 9px;
    padding: 3px 4px;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  .nav-link i {
    font-size: 10px;
    margin-left: 2px;
  }

  .guide-btn {
    padding: 3px 6px;
    font-size: 0.65rem;
  }

  .guide-btn i {
    font-size: 0.7rem;
  }

  .login-btn {
    width: 28px;
    height: 28px;
    padding: 5px;
  }

  .login-btn i {
    font-size: 0.8rem;
  }

  .login-btn-with-name {
    padding: 3px 6px;
    font-size: 0.65rem;
  }

  .logo-info-bank,
  .logo-hrdf {
    height: 36px;
  }

  .logos-right-section {
    gap: 6px;
  }

  .logo-separator {
    height: 25px;
  }
}

/* معالجة التكبير والشاشات المتوسطة */
@media (max-width: 1100px) {
  .navbar-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 10px 0;
    min-height: 50px;
    gap: 15px;
  }

  .navbar-menu {
    display: none;
  }

  .navbar-toggler {
    display: block;
    order: 2;
  }

  .navbar-logos {
    order: 1;
    justify-content: flex-start;
  }

  .logos-right-section {
    gap: 8px;
  }

  .logo-separator {
    height: 25px;
  }

  .logo-info-bank,
  .logo-hrdf {
    height: 36px;
  }

  .navbar-right {
    display: contents;
  }
}

/* تحسينات إضافية للشاشات الصغيرة */
@media (max-width: 600px) {
  .navbar-toggler {
    font-size: 18px;
  }

  .navbar-toggler-icon {
    width: 22px;
    height: 2px;
  }

  .navbar-toggler-icon::before,
  .navbar-toggler-icon::after {
    width: 22px;
    height: 2px;
  }
}

@media (max-width: 480px) {
  .navbar-content {
    padding: 8px 0;
    gap: 12px;
  }

  .logos-right-section {
    gap: 6px;
  }

  .logo-separator {
    height: 22px;
  }

  .logo-info-bank,
  .logo-hrdf {
    height: 26px;
  }

  .navbar-toggler {
    font-size: 16px;
  }

  .navbar-toggler-icon {
    width: 20px;
    height: 2px;
  }

  .navbar-toggler-icon::before,
  .navbar-toggler-icon::after {
    width: 20px;
    height: 2px;
  }


}

.app-header {
  background-color: var(--surface-1);
}

.app-shell {
  background-color: var(--surface-1);
  border-radius: 12px;
  margin-top: 12px;
  width: 100%;
}

/* تأكد أن الحاوية تمتد بكامل العرض المسموح */
.container-xxl {
  max-width: 1320px;
  width: 100%;
  margin-inline: auto;
}

/* إزالة أي قيود قد تُصغّر المساحة البيضاء عن قصد على بعض المقاسات */
@media (max-width: 576px) {
  .app-shell {
    border-radius: 10px;
  }
}

.me-1 {
  color: var(--brand-primary);
}

.section-tabs .nav-link {
  padding: .75rem 1rem;
  border: 0;
  color: var(--text-muted);
}

.section-tabs .nav-link.active {
  color: var(--text-main);
  border-bottom: 2px solid var(--brand-primary);
  font-weight: 600;
  background-color: var(--surface-1);
}

/* تبويبات صفحة البرامج */
.programs-sec-input,
.programs-status-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

/* إبراز التبويب المحدد (القسم) */
#sec-individuals:checked~.sections-bar .section-tabs label[for="sec-individuals"],
#sec-businesses:checked~.sections-bar .section-tabs label[for="sec-businesses"],
#sec-others:checked~.sections-bar .section-tabs label[for="sec-others"] {
  color: var(--text-main);
  border-bottom: 2px solid var(--brand-primary);
  font-weight: 600;
}

/* إبراز زر الفلتر المحدد */
#status-active:checked~.sections-bar .filters-strip label[for="status-active"],
#status-ended-yes:checked~.sections-bar .filters-strip label[for="status-ended-yes"],
#status-ended-no:checked~.sections-bar .filters-strip label[for="status-ended-no"],
#status-upcoming:checked~.sections-bar .filters-strip label[for="status-upcoming"] {
  color: var(--text-main);
}

#status-active:checked~.sections-bar .filters-strip label[for="status-active"]::after,
#status-ended-yes:checked~.sections-bar .filters-strip label[for="status-ended-yes"]::after,
#status-ended-no:checked~.sections-bar .filters-strip label[for="status-ended-no"]::after,
#status-upcoming:checked~.sections-bar .filters-strip label[for="status-upcoming"]::after {
  content: "";
  position: absolute;
  inset-inline-start: .5rem;
  inset-inline-end: .5rem;
  bottom: -1px;
  height: 3px;
  background-color: var(--brand-primary);
  border-radius: 2px;
}

/* إظهار/إخفاء الكروت حسب القسم والحالة (تقاطع الشرطين) */
.programs-grid>.program-card {
  display: none;
}

/* الأفراد */
#sec-individuals:checked~#status-active:checked~.programs-wrapper .sec-individuals.status-active {
  display: block;
}

#sec-individuals:checked~#status-ended-yes:checked~.programs-wrapper .sec-individuals.status-ended-yes {
  display: block;
}

#sec-individuals:checked~#status-ended-no:checked~.programs-wrapper .sec-individuals.status-ended-no {
  display: block;
}

#sec-individuals:checked~#status-upcoming:checked~.programs-wrapper .sec-individuals.status-upcoming {
  display: block;
}

/* المنشآت */
#sec-businesses:checked~#status-active:checked~.programs-wrapper .sec-businesses.status-active {
  display: block;
}

#sec-businesses:checked~#status-ended-yes:checked~.programs-wrapper .sec-businesses.status-ended-yes {
  display: block;
}

#sec-businesses:checked~#status-ended-no:checked~.programs-wrapper .sec-businesses.status-ended-no {
  display: block;
}

#sec-businesses:checked~#status-upcoming:checked~.programs-wrapper .sec-businesses.status-upcoming {
  display: block;
}

/* خدمات أخرى */
#sec-others:checked~#status-active:checked~.programs-wrapper .sec-others.status-active {
  display: block;
}

#sec-others:checked~#status-ended-yes:checked~.programs-wrapper .sec-others.status-ended-yes {
  display: block;
}

#sec-others:checked~#status-ended-no:checked~.programs-wrapper .sec-others.status-ended-no {
  display: block;
}

#sec-others:checked~#status-upcoming:checked~.programs-wrapper .sec-others.status-upcoming {
  display: block;
}

/* شريط مشترك للتبويبات + التصفية */
.sections-bar {
  border-bottom: 1px solid #e6eef5;
  padding-bottom: .25rem;
}

.sections-bar .section-tabs {
  border-bottom: 0;
}

.sections-bar .filters-strip {
  margin-top: .25rem;
}

/* إخفاء فلاتر الحالات عند اختيار تبويب السياسات والتعاميم */
#sec-others:checked~.sections-bar .filters-strip {
  display: none !important;
}

.filters-strip .btn-filter {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  padding: .6rem .95rem;
  position: relative;
  border-radius: 0;
  font-size: 14px;
}

.filters-strip .btn-filter.active,
.filters-strip .btn-filter:hover {
  color: var(--text-main);
}

.filters-strip .btn-filter.active::after,
.filters-strip .btn-filter:hover::after {
  content: "";
  position: absolute;
  inset-inline-start: .5rem;
  inset-inline-end: .5rem;
  bottom: -1px;
  height: 3px;
  background-color: var(--brand-primary);
  border-radius: 2px;
}

.quick-glance .glance-box {
  background-color: var(--surface-2);
  border: 1px solid #e6eef5;
  border-radius: 12px;
  padding: .85rem;
  text-align: center;
}

.quick-glance .glance-box .label {
  color: var(--text-muted);
  font-size: .85rem;
}

.quick-glance .glance-box .value {
  font-weight: 700;
  font-size: 1.1rem;
}

.program-card {
  background-color: #fff;
  border: 1px solid #e6eef5;
  border-radius: 12px;
  padding: 1.5rem 1.25rem 4rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  min-height: 240px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  --card-accent: var(--brand-secondary);
  transition: all .3s ease;
  position: relative;
}

.program-card .card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  text-align: right;
  max-height: 120px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.program-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background-color: #f8f9fa;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
  overflow: hidden;
}

/* تخصيص أيقونة كروت السياسات والتعاميم */
.program-card.sec-others .icon {
  background-color: rgba(41, 79, 132, .12);
  color: var(--brand-primary);
}

.program-card.sec-others .icon img {
  display: block;
  width: 50%;
  height: 70%;
  object-fit: contain;
  object-position: center;
  transform-origin: center;
}

.program-card .icon i {
  font-size: 1.5rem;
}

.program-card h6 {
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
  font-size: 0.95rem;
  color: var(--text-main);
  width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.program-card .subtitle {
  color: var(--text-muted);
  font-size: .9rem;
  overflow: visible;
  white-space: normal;
  word-break: break-word;
}

/* ركائز البرنامج */
.program-pillars {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
  justify-content: flex-start;
  margin-top: 0.25rem;
}

.pillar-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.4rem;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 500;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  color: #4a5568;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.pillar-tag:hover:not(.inactive) {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border-color: #d0d0d0;
}

/* الدائرة الملونة داخل التاغ */
.pillar-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #bbb;
  flex-shrink: 0;
}

.pillar-tag.inactive {
  opacity: 0.6;
  transform: scale(0.98);
}

/* ركيزة التدريب - أخضر */
.pillar-training::before {
  background-color: #2CB779;
}

.pillar-training.inactive::before {
  background-color: rgba(44, 183, 121, 0.4);
}

/* ركيزة التمكين - أزرق */
.pillar-empowerment::before {
  background-color: #3577A8;
}

.pillar-empowerment.inactive::before {
  background-color: rgba(53, 119, 168, 0.4);
}

/* ركيزة الإرشاد - برتقالي */
.pillar-guidance::before {
  background-color: #F08F48;
}

.pillar-guidance.inactive::before {
  background-color: rgba(240, 143, 72, 0.4);
}

/* تحسينات responsive للركائز */
@media (max-width: 768px) {
  .program-pillars {
    gap: 0.25rem;
  }

  .pillar-tag {
    padding: 0.1rem 0.35rem;
    font-size: 0.6rem;
  }

  .pillar-tag::before {
    width: 5px;
    height: 5px;
  }
}

@media (max-width: 480px) {
  .program-pillars {
    gap: 0.2rem;
  }

  .pillar-tag {
    padding: 0.08rem 0.3rem;
    font-size: 0.55rem;
  }

  .pillar-tag::before {
    width: 4px;
    height: 4px;
  }

  .program-card {
    padding: 1.25rem 1rem 4.5rem;
  }

  .program-card .card-content {
    max-height: 100px;
  }
}

.program-card .actions {
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: absolute;
  bottom: 0.75rem;
  inset-inline-start: 1.25rem;
  inset-inline-end: 1.25rem;
  padding-top: 1rem;
}

.program-card .actions .btn-details {
  background-color: var(--gray-500);
  border: 1px solid var(--gray-500);
  color: #ffffff;
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all .3s ease;
  text-decoration: none;
  display: inline-block;
  align-self: flex-start;
}

.program-card .actions .btn-details:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.program-card .badge-soft {
  background-color: #f2f6fb;
  color: var(--text-muted);
  border-radius: 999px;
  padding: .15rem .5rem;
  font-size: .75rem;
}

/* أدوات صغيرة */
.shadow-sm {
  box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .05) !important;
}

/* شبكة مخصصة لخمسة بطاقات */
.programs-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(1, 1fr);
  align-items: stretch;
}

@media (min-width: 576px) {
  .programs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .programs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) {
  .programs-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1400px) {
  .programs-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* واجهة الأقسام الفرعية */
.subprogram-view {
  margin-top: 1.25rem;
}

.subprogram-header .subprogram-title {
  font-weight: 800;
  font-size: 1.15rem;
}

.subprogram-icon .icon {
  color: var(--brand-secondary);
}

.sub-tabs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 992px) {
  .sub-tabs-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.sub-tabs-grid label.sub-tab-card {
  display: grid;
}

.sub-tab-card {
  background: #fff;
  border: 1px solid #e6eef5;
  border-radius: 12px;
  padding: .9rem .9rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .75rem;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.sub-tab-card .icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #e9f9f0;
  color: var(--brand-secondary);
  transition: all 0.3s ease;
}

.sub-tab-card .title {
  font-weight: 700;
  font-size: 1rem;
}

.sub-tab-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--brand-secondary);
}

.sub-tab-card.active,
.sub-tabs-grid label.sub-tab-card:hover {
  background: var(--brand-secondary);
  color: #fff;
  border-color: var(--brand-secondary);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(52, 130, 84, 0.3);
}

.sub-tab-card.active .icon,
.sub-tab-card:hover .icon {
  background: rgba(255, 255, 255, .2);
  color: #fff;
  transform: scale(1.05);
}

.sub-content {
  background: #fff;
  border: 1px solid #e6eef5;
  border-radius: 12px;
}

/* أنماط محتوى الأقسام الفرعية المحدثة */
.sub-content-header {
  border-bottom: 1px solid #e6eef5;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.sub-content-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-primary);
  margin: 0;
  font-family: 'SSTArabic', sans-serif;
}

.sub-content-body {
  margin-bottom: 2rem;
  line-height: 1.6;
}

.sub-content-actions {
  display: flex;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e6eef5;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.sub-content-actions .btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid #e6eef5;
  text-decoration: none;
  cursor: pointer;
  font-family: 'SSTArabic', sans-serif;
  background-color: white;
  color: var(--text-muted);
}

.sub-content-actions .btn i {
  font-size: 1rem;
  opacity: 0.7;
}

.sub-content-actions .btn-edit {
  border-color: #6079a1;
  color: var(--text-muted);

}

.sub-content-actions .btn-edit i {
  color: var(--brand-primary);
  opacity: 0.8;
}

.sub-content-actions .btn-edit:hover {
  background-color: rgba(41, 79, 132, 0.05);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.sub-content-actions .btn-edit:hover i {
  opacity: 1;
}

.sub-content-actions .btn-delete {
  border-color: #de727d;
  color: var(--text-muted);
}

.sub-content-actions .btn-delete i {
  color: #dc3545;
  opacity: 0.8;
}

.sub-content-actions .btn-delete:hover {
  background-color: rgba(220, 53, 69, 0.05);
  border-color: #dc3545;
  color: #dc3545;
}

.sub-content-actions .btn-delete:hover i {
  opacity: 1;
}

.sub-content-actions .btn-move {
  border-color: #dea36f;
  color: var(--text-muted);
}

.sub-content-actions .btn-move i {
  color: var(--brand-orange);
  opacity: 0.8;
}

.sub-content-actions .btn-move:hover {
  background-color: rgba(216, 123, 46, 0.05);
  border-color: var(--brand-orange);
  color: var(--brand-orange);
}

.sub-content-actions .btn-move:hover i {
  opacity: 1;
}

/* Responsive للأزرار */
@media (max-width: 768px) {
  .sub-content-actions {
    flex-direction: column;
    gap: 0.8rem;
  }

  .sub-content-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .sub-content-title {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .sub-content-actions .btn {
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
  }

  .sub-content-title {
    font-size: 1.2rem;
  }
}

.edit-question-form {
  max-width: 100%;
}

.form-section {
  background-color: #f9fafb;
  border: 1px solid #e6eef5;
  border-radius: 8px;
  padding: 1.5rem;
}

.section-title {
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-family: 'SSTArabic', sans-serif;
}

.form-label {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  font-family: 'SSTArabic', sans-serif;
}

.form-control {
  border: 1px solid #e6eef5;
  border-radius: 6px;
  padding: 0.75rem;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color .2s ease;
  font-family: 'SSTArabic', sans-serif;
  background-color: #f8f9fa45;
}

.form-control:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 0.2rem rgba(41, 79, 132, 0.1);
  outline: none;
}

.form-control[readonly] {
  background-color: #f8f9fa;
  color: var(--text-muted);
  cursor: not-allowed;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.form-note .alert {
  background-color: rgba(41, 79, 132, 0.05);
  border: 1px solid rgba(41, 79, 132, 0.2);
  color: var(--brand-primary);
  border-radius: 8px;
  padding: 1rem;
  font-family: 'SSTArabic', sans-serif;
}

.form-actions {
  text-align: right;
  padding-top: 2rem;
  border-top: 1px solid #e6eef5;
}

.form-actions .btn-primary {
  background-color: var(--brand-secondary);
  border-color: var(--brand-secondary);
  padding: 0.8rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-family: 'SSTArabic', sans-serif;
}

.form-actions .btn-primary:hover {
  background-color: var(--brand-secondary);
  border-color: var(--brand-secondary);
  transform: translateY(-1px);
}

.form-actions .btn-primary i {
  margin-left: 0.5rem;
}

/* Responsive للنموذج */
@media (max-width: 768px) {
  .edit-form-view {
    padding: 1.5rem;
  }

  .form-section {
    padding: 1rem;
  }

  .section-title {
    font-size: 1rem;
  }

  .form-actions .btn-primary {
    width: 100%;
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .edit-form-view {
    padding: 1rem;
  }

  .form-section {
    padding: 0.8rem;
  }

  .form-control {
    font-size: 0.85rem;
    padding: 0.6rem;
  }
}

/* تأثيرات الألوان والحوّم حسب حالة البرنامج */

/* برامج نشطة: أخضر */
.program-card.status-active {
  --card-accent: var(--brand-secondary);
}

.program-card.status-active .icon {
  background-color: #e9f9f0;
  color: var(--brand-secondary);
}

.program-card.status-active .actions .btn-details {
  background-color: var(--brand-secondary);
  border-color: var(--brand-secondary);
  color: #fff;
}

.program-card.status-active:hover {
  background-color: var(--brand-secondary);
  border-color: var(--brand-secondary);
  box-shadow: 0 8px 24px rgba(52, 130, 84, .15);
  transform: translateY(-2px);
}

.program-card.status-active:hover h6,
.program-card.status-active:hover .subtitle {
  color: #ffffff;
}

.program-card.status-active:hover .icon {
  background-color: rgba(255, 255, 255, .2);
  color: #ffffff;
}

.program-card.status-active:hover .actions .btn-details {
  background-color: #ffffff36;
  color: #ffffff;
}

/* برامج منتهية (يوجد مستفيدين): أزرق فاتح */
.program-card.status-ended-yes {
  --card-accent: #3577A8;
}

.program-card.status-ended-yes .icon {
  background-color: rgba(74, 158, 255, .12);
  color: #3577A8;
}

.program-card.status-ended-yes .actions .btn-details {
  background-color: #3577A8;
  border-color: #3577A8;
  color: #fff;
}

.program-card.status-ended-yes:hover {
  background-color: #3577A8;
  border-color: #3577A8;
  box-shadow: 0 8px 24px rgba(74, 158, 255, .15);
  transform: translateY(-2px);
}

.program-card.status-ended-yes:hover h6,
.program-card.status-ended-yes:hover .subtitle {
  color: #ffffff;
}

.program-card.status-ended-yes:hover .icon {
  background-color: rgba(255, 255, 255, .2);
  color: #ffffff;
}

.program-card.status-ended-yes:hover .actions .btn-details {
  background-color: #ffffff36;
  color: #ffffff;
}

/* برامج منتهية (لا يوجد مستفيدين): رمادي */
.program-card.status-ended-no {
  --card-accent: var(--gray-500);
}

.program-card.status-ended-no .icon {
  background-color: rgba(139, 152, 167, .15);
  color: var(--gray-500);
}

.program-card.status-ended-no .actions .btn-details {
  background-color: var(--gray-500);
  border-color: var(--gray-500);
  color: #fff;
}

.program-card.status-ended-no:hover {
  background-color: #f2f4f7;
  border-color: #e6eef5;
  transform: translateY(-1px);
}

.program-card.status-ended-no:hover .icon {
  background-color: rgba(139, 152, 167, .22);
}

.program-card.status-ended-no:hover .actions .btn-details {
  background-color: #7c8a98;
  border-color: #7c8a98;
  color: #fff;
}

/* برامج جديدة (ستطلق قريباً): #6279a2 */
.program-card.status-upcoming {
  --card-accent: #6279a2;
}

.program-card.status-upcoming .icon {
  background-color: rgba(98, 121, 162, .15);
  color: #6279a2;
}

.program-card.status-upcoming .actions .btn-details {
  background-color: #6279a2;
  border-color: #6279a2;
  color: #fff;
}

.program-card.status-upcoming:hover {
  background-color: #6279a2;
  border-color: #6279a2;
  box-shadow: 0 8px 24px rgba(98, 121, 162, .15);
  transform: translateY(-2px);
}

.program-card.status-upcoming:hover h6,
.program-card.status-upcoming:hover .subtitle {
  color: #ffffff;
}

.program-card.status-upcoming:hover .icon {
  background-color: rgba(255, 255, 255, .2);
  color: #ffffff;
}

.program-card.status-upcoming:hover .actions .btn-details {
  background-color: #ffffff36;
  color: #ffffff;
}

/* سياسات وتعاميم: أزرق رسمي (يتجاوز أي تعارض مع أنماط الحالة) */
.program-card.sec-others {
  --card-accent: var(--brand-primary);
}

.program-card.sec-others .icon {
  background-color: rgba(41, 79, 132, .12);
  color: var(--brand-primary);
}

.program-card.sec-others .actions .btn-details {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}

.program-card.sec-others:hover {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  box-shadow: 0 8px 24px rgba(41, 79, 132, .15);
  transform: translateY(-2px);
}

.program-card.sec-others:hover h6,
.program-card.sec-others:hover .subtitle {
  color: #ffffff;
}

.program-card.sec-others:hover .icon {
  background-color: rgba(255, 255, 255, .2);
  color: #ffffff;
}

.program-card.sec-others:hover .actions .btn-details {
  background-color: #ffffff36;
  color: #ffffff;
}

/* حالة عدم وجود بيانات */
.empty-state {
  grid-column: 1 / -1;
  padding: 2rem 3rem;
  text-align: center;
  color: #1d273361;
  font-size: 2.00rem;
  font-weight: 700;
  line-height: 3.3;
  background: var(--surface-1);
  border: 4px dashed #e6eef5;
  border-radius: 10px;
}

/* أنماط الأزرار المخصصة - تجاوز Bootstrap */
.btn-brand-primary,
.btn-brand-primary:focus,
.btn-brand-primary:active {
  background-color: #ffffff !important;
  border-color: #294f84 !important;
  color: #294f84 !important;
  transition: all 0.3s ease;
  border-radius: 8px;
  box-shadow: none !important;
}

.btn-brand-primary:hover {
  background-color: #294f84 !important;
  border-color: #294f84 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.2) !important;
}

.btn-brand-secondary,
.btn-brand-secondary:focus,
.btn-brand-secondary:active {
  background-color: #ffffff !important;
  border-color: #198754 !important;
  color: #198754 !important;
  transition: all 0.3s ease;
  border-radius: 8px;
  box-shadow: none !important;
}

.btn-brand-secondary:hover {
  background-color: #198754 !important;
  border-color: #198754 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(41, 79, 132, 0.2) !important;
}

/* زر ارسال إشعار - برتقالي */
.btn-brand-orange,
.btn-brand-orange:focus,
.btn-brand-orange:active {
  background-color: #ffffff !important;
  border-color: var(--brand-orange) !important;
  color: var(--brand-orange) !important;
  transition: all 0.3s ease;
  border-radius: 8px;
  box-shadow: none !important;
}

.btn-brand-orange:hover {
  background-color: var(--brand-orange) !important;
  border-color: var(--brand-orange) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(216, 123, 46, 0.2) !important;
}

.btn-add-question,
.btn-add-question:focus,
.btn-add-question:active {
  background-color: #ffffff !important;
  border-color: #294f84 !important;
  color: #294f84 !important;
  transition: all 0.3s ease;
  border-radius: 8px;
  box-shadow: none !important;
}

.btn-add-question:hover {
  background-color: #294f84 !important;
  border-color: #294f84 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(41, 79, 132, 0.2) !important;
}

/* زر تحرير البرنامج - أخضر 198754 */
.btn-edit-program,
.btn-edit-program:focus,
.btn-edit-program:active {
  background-color: #ffffff !important;
  border-color: #198754 !important;
  color: #198754 !important;
  transition: all 0.3s ease;
  border-radius: 8px;
  box-shadow: none !important;
}

.btn-edit-program:hover {
  background-color: #198754 !important;
  border-color: #198754 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.2) !important;
}

/* زر تصدير إلى إكسل - برتقالي موحّد مع بقية الأزرار */
.btn-export-excel,
.btn-export {
  background-color: #ffffff !important;
  border-color: var(--brand-orange) !important;
  color: var(--brand-orange) !important;
  transition: all 0.3s ease;
  border-radius: 8px;
  box-shadow: none !important;
}

.btn-export-excel:hover,
.btn-export:hover {
  background-color: var(--brand-orange) !important;
  border-color: var(--brand-orange) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(216, 123, 46, 0.2) !important;
}

.btn-export-excel:focus,
.btn-export-excel:active,
.btn-export:focus,
.btn-export:active {
  background-color: var(--brand-orange) !important;
  border-color: var(--brand-orange) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

/* حالة التعطيل لزر التصدير */
.btn-export-excel.disabled,
.btn-export-excel:disabled,
.btn-export.disabled,
.btn-export:disabled {
  background-color: #faeee033 !important;
  border-color: var(--brand-orange) !important;
  color: var(--brand-orange) !important;
  opacity: 0.85 !important;
  cursor: not-allowed;
}

/* زر رجوع - رمادي مع أبيض */
.btn-back,
.btn-back:focus,
.btn-back:active {
  background-color: #ffffff !important;
  border-color: #6c757d !important;
  color: #6c757d !important;
  transition: all 0.3s ease;
  border-radius: 8px;
  box-shadow: none !important;
}

.btn-back:hover {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2) !important;
}

/* زر تعديل عام - أزرق رسمي (نمط موحّد للاستخدام داخل الجداول وغيرها) */
.btn-edit,
.btn-edit:focus,
.btn-edit:active {
  background-color: #ffffff !important;
  border: 1px solid var(--brand-primary) !important;
  color: var(--brand-primary) !important;
  border-radius: 8px;
  transition: all 0.2s ease;
  box-shadow: none !important;
}

.btn-edit:hover {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(41, 79, 132, 0.2) !important;
}

.btn-edit.btn-sm {
  padding: .35rem .6rem;
  font-size: .85rem;
}

/* زر حذف عام - بنفس تصميم أزرار الحذف في FAQ */
.btn-delete,
.btn-delete:focus,
.btn-delete:active {
  background-color: #ffffff !important;
  border: 1px solid #de727d !important;
  color: #dc3545 !important;
  border-radius: 8px;
  transition: all 0.2s ease;
  box-shadow: none !important;
}

.btn-delete i {
  color: currentColor !important;
}

.btn-delete:hover {
  background-color: rgba(220, 53, 69, .06) !important;
  border-color: #dc3545 !important;
  color: #dc3545 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15) !important;
}

.btn-delete.btn-sm {
  padding: .35rem .6rem;
  font-size: .85rem;
}

/* ===== أنماط النماذج المنبثقة ===== */
.custom-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.custom-modal.show {
  display: flex;
}

.custom-modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
}

.custom-modal-dialog {
  position: relative;
  width: 90%;
  max-width: 480px;
  z-index: 10000;
}

.custom-modal-content {
  background-color: #ffffff;
  border: 1px solid #e6eef5;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  animation: modalSlideIn 0.25s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f3f4;
  background-color: #fafbfc;
}

.custom-modal-title {
  margin: 0;
  color: #1d2733;
  font-weight: 600;
  font-family: 'SSTArabic', sans-serif;
  font-size: 1rem;
}

.custom-modal-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #8b98a7;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.custom-modal-close:hover {
  background-color: #f1f3f4;
  color: #6c7a89;
}

.custom-modal-body {
  padding: 1.25rem;
  color: #1d2733;
  font-family: 'SSTArabic', sans-serif;
  line-height: 1.5;
}

.custom-modal-footer {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 1rem 1.25rem;
  border-top: 1px solid #f1f3f4;
  background-color: #fafbfc;
}

.custom-modal-footer .btn {
  border-radius: 6px;
  font-weight: 500;
  padding: 0.5rem 1rem;
  font-family: 'SSTArabic', sans-serif;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.custom-modal-footer .btn-secondary {
  background-color: #f8f9fa;
  border-color: #e6eef5;
  color: #dc3545;
}

.custom-modal-footer .btn-secondary:hover {
  background-color: #e9ecef;
  border-color: #dee2e6;
  color: #495057;
}

.custom-modal-footer .btn-danger {
  background-color: #f8f9fa;
  border-color: #e6eef5;
  color: #dc3545;
}

.custom-modal-footer .btn-danger:hover {
  background-color: #dc3545;
  border-color: #dc3545;
  color: #ffffff;
}

/* إصلاح لون الأيقونات داخل أزرار النموذج */
.custom-modal-footer .btn-danger i {
  color: inherit !important;
}

.custom-modal-footer .btn-secondary i {
  color: inherit !important;
}



/* ===== رسائل النظام ===== */
.alert-success {
  background-color: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.alert-success .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* أنماط صفحة عن البنك */
.breadcrumb-section {
  border-bottom: 1px solid #e6eef5;
  padding-bottom: 1rem;
}

/* تخصيص سماكة ولون الحد في صفحات محددة */
body.page-about .breadcrumb-section,
body.page-template .breadcrumb-section {
  border-bottom: 0.5px solid #0000002b;
}

.breadcrumb-share {
  order: 2;
  flex-shrink: 0;
}

.btn-share {
  background: none;
  border: 1px solid #e6eef5d3;
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--brand-secondary);
  transition: all 0.2s ease;
}

.btn-share:hover {
  background-color: var(--surface-2);
  color: var(--text-main);
}

button#editBackBtn {
  border-radius: 8px;
  background-color: var(--bs-dark-border-subtle);
  color: #ffffff;
}

button#editBackBtn:hover {
  background-color: var(--bs-btn-color);
  color: #ffffff;
}

.breadcrumb-nav {
  order: 1;
  flex: 1;
}

.breadcrumb {
  margin: 0;
  padding: 0;
  background: none;
  font-size: 0.95rem;
  justify-content: flex-start;
  text-align: right;
}

.breadcrumb-item {
  color: var(--text-muted);
}

.breadcrumb-item+.breadcrumb-item::before {
  content: ">";
  margin: 0 8px;
  color: var(--text-muted);
}

.breadcrumb-item a {
  color: var(--brand-primary);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: var(--brand-primary);
}

.breadcrumb-item.active {
  color: var(--text-main);
  font-weight: 500;
}

.page-header {
  text-align: right;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--brand-primary);
  margin: 0;
}

.content-text {
  text-align: right;
  width: 100%;
  margin: 0;
}

.lead-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-main);
  margin: 0;
}

.bank-logo-section {
  margin-top: 3rem;
  text-align: center;
}

.bank-main-logo {
  height: 160px;
  width: auto;
}

.logo-text {
  margin-top: 2rem;
}

.logo-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--brand-primary);
  margin: 0 0 0.8rem 0;
  letter-spacing: -0.5px;
}

.logo-subtitle {
  font-size: 1.3rem;
  color: var(--text-muted);
  margin: 0;
  font-style: italic;
  font-weight: 400;
}

/* تحديد الرابط النشط في الناف بار */
.nav-link.active {
  color: var(--brand-primary);
  background-color: rgba(41, 79, 132, 0.08);
  font-weight: 600;
}

/* Responsive للصفحة */
@media (max-width: 768px) {
  .page-title {
    font-size: 1.5rem;
  }

  .lead-text {
    font-size: 1rem;
    line-height: 1.6;
  }

  .bank-main-logo {
    height: 120px;
  }

  .logo-title {
    font-size: 1.8rem;
  }

  .logo-subtitle {
    font-size: 1.1rem;
  }

  .breadcrumb {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 1.3rem;
  }

  .lead-text {
    font-size: 0.95rem;
  }

  .bank-main-logo {
    height: 90px;
  }

  .logo-title {
    font-size: 1.5rem;
  }

  .logo-subtitle {
    font-size: 1rem;
  }

  .breadcrumb {
    font-size: 0.85rem;
  }

  .btn-share {
    padding: 6px 10px;
    font-size: 14px;
  }
}

/* تحسين مظهر حقل رفع الملفات ليتماشى مع باقي الحقول */
.file-input::-webkit-file-upload-button {
  background-color: var(--brand-primary);
  color: #fff;
  border: 1px solid var(--brand-primary);
  border-radius: 6px;
  padding: 0.45rem 0.9rem;
  margin-inline-start: 0.5rem;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.file-input::file-selector-button {
  background-color: var(--brand-primary);
  color: #fff;
  border: 1px solid var(--brand-primary);
  border-radius: 6px;
  padding: 0.45rem 0.9rem;
  margin-inline-start: 0.5rem;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.file-input:hover::-webkit-file-upload-button,
.file-input:hover::file-selector-button {
  background-color: #316fa1;
  border-color: #316fa1;
}

/* حالة التركيز على الحقل ذاته لتمييز الزر بدون تعارض لوني */
.file-input:focus-visible::-webkit-file-upload-button,
.file-input:focus-visible::file-selector-button {
  outline: 2px solid #316fa1;
  outline-offset: 2px;
}

/* تحسينات إضافية للمرفقات */
.attachments-list:empty {
  display: none;
}

.attachments-list:not(:empty) {
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* تحسين عرض المرفقات على الشاشات الصغيرة */
@media (max-width: 768px) {
  .attachments-item {
    grid-template-columns: 1fr;
    gap: .75rem;
    text-align: center;
  }

  .attachment-icon {
    justify-self: center;
  }

  .attachment-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .attachment-btn {
    min-width: 70px;
    padding: .4rem .6rem;
    font-size: .8rem;
  }
}

.file-upload-field {
  background: #fff;
  border: 1px solid #e6eef5;
  border-radius: 8px;
  padding: .75rem;
  transition: all 0.3s ease;
}

.file-upload-field:hover {
  border-color: var(--brand-primary);
  box-shadow: 0 2px 8px rgba(49, 111, 161, 0.1);
}

.file-upload-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.file-hint {
  margin-top: .5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* قائمة عرض المرفقات المختارة */
.attachments-list {
  margin-top: .75rem;
  display: grid;
  gap: .75rem;
}

.attachments-item {
  background: #fff;
  border: 1px solid #e6eef5;
  border-radius: 12px;
  padding: 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.attachments-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-color: var(--brand-primary);
  transform: translateY(-1px);
}

/* أيقونة نوع الملف */
.attachment-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #f8f9fa;
  border: 1px solid #e6eef5;
  transition: all 0.3s ease;
}

.attachment-icon.pdf {
  background: #fff5f5;
  border-color: #fed7d7;
  color: #e53e3e;
}

.attachment-icon.doc {
  background: #f0fff4;
  border-color: #c6f6d5;
  color: #38a169;
}

.attachment-icon.image {
  background: #faf5ff;
  border-color: #d6bcfa;
  color: #805ad5;
}

.attachment-icon.video {
  background: #fffaf0;
  border-color: #fbd38d;
  color: #d69e2e;
}

.attachment-icon.excel {
  background: #f0f9ff;
  border-color: #bfdbfe;
  color: #3182ce;
}

.attachment-icon i {
  font-size: 1.5rem;
}

/* معلومات الملف */
.attachment-info {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  min-width: 0;
}

.attachment-name {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.95rem;
  line-height: 1.4;
  word-break: break-word;
}

.attachment-meta {
  color: var(--text-muted);
  font-size: .85rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.attachment-type {
  background: #f1f5f9;
  color: var(--text-muted);
  padding: .2rem .5rem;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 500;
}

.attachment-size {
  color: var(--text-muted);
  font-size: .8rem;
}

/* أزرار الإجراءات */
.attachment-actions {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.attachment-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .75rem;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid;
  min-width: 80px;
  justify-content: center;
}

.attachment-btn-view {
  background: #fff;
  border-color: #6c757d;
  color: #6c757d;
}

.attachment-btn-view:hover {
  background: #6c757d;
  border-color: #6c757d;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2);
}

.attachment-btn-remove {
  background: #fff;
  border-color: #e53e3e;
  color: #e53e3e;
}

.attachment-btn-remove:hover {
  background: #e53e3e;
  border-color: #e53e3e;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(229, 62, 62, 0.2);
}

.attachment-btn i {
  font-size: .9rem;
}

/* زر عربي مخصص لاختيار الملفات بدلاً من زر المتصفح */
.file-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background-color: var(--brand-primary);
  border: 1px solid var(--brand-primary);
  color: #fff;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.file-trigger-btn:hover {
  background-color: #316fa1;
  border-color: #316fa1;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(49, 111, 161, 0.2);
}

.file-trigger-btn:active {
  transform: translateY(0);
}

.file-trigger-btn:focus-visible {
  outline: 2px solid #316fa1;
  outline-offset: 2px;
}

/* إخفاء المدخل الأصلي مع الحفاظ على الإمكانية للوصول عبر الوسوم */
.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

/* منع تمرير الصفحة عند فتح درج الجوال */
body.drawer-open {
  overflow: hidden;
}

/* تهيئة عناصر قائمة الجوال داخل الدرج وتجاوز الأنماط القديمة */
.mobile-drawer .navbar-nav-mobile {
  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 10px 16px !important;
  margin: 0 !important;
}

.mobile-drawer .mobile-nav-link {
  display: block;
  color: #333;
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid #f1f1f1;
  font-size: 14px;
}

.mobile-drawer .mobile-nav-link:hover {
  color: var(--brand-primary);
  background-color: rgba(41, 79, 132, .05);
}

.mobile-drawer .mobile-nav-link:last-child {
  border-bottom: none;
}

/* زر دليل المستخدم في قائمة الموبايل */
.mobile-drawer .mobile-guide-link {
  background-color: var(--brand-orange) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  margin: 0.5rem 0 !important;
  padding: 10px 12px !important;
  font-size: 0.95rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  border: 0 !important;
  gap: 8px !important;
}

.mobile-drawer .mobile-guide-link span {
  color: #ffffff !important;
}

.mobile-drawer .mobile-guide-link i {
  font-size: 1.1rem;
  color: #ffffff !important;
  margin: 0;
}

.mobile-drawer .mobile-guide-link:hover {
  background-color: #c26b25 !important;
  color: #ffffff !important;
}

/* قائمة فرعية داخل درج الجوال */
.mobile-submenu {
  margin-top: 6px;
}

.mobile-submenu-toggle {
  width: 100%;
  background: none;
  border: 0;
  text-align: right;
  padding: 12px 0;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.mobile-submenu-toggle i {
  transition: transform .2s ease;
}

.mobile-submenu.open .mobile-submenu-toggle i {
  transform: rotate(180deg);
}

/* CSS قديم معطل للـ mobile-submenu-list - يستخدم الآن details/summary */
/* .mobile-submenu-list { list-style: none; margin: 0; padding: 0 0 8px; display: none; } */
/* .mobile-submenu.open .mobile-submenu-list { display: block; } */
.mobile-submenu-list li a {
  display: block;
  padding: 10px 0 10px 0;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #f1f1f1;
}

.mobile-submenu-list li:last-child a {
  border-bottom: 0;
}

/* تحسين تنسيق عناصر درج الجوال مع فواصل واضحة بين الصفحات */
.mobile-drawer-panel {
  padding: 6px 0;
}

.mobile-drawer .navbar-nav-mobile {
  padding: 8px 16px !important;
  gap: 0;
}

.mobile-drawer .navbar-nav-mobile>li {
  margin: 0;
}

.mobile-drawer .navbar-nav-mobile>li+li {
  border-top: 1px solid #e6eef5;
}

/* إلغاء أي حدود سابقة على الرابط نفسه والاكتفاء بفاصل العناصر */
.mobile-drawer .mobile-nav-link {
  border: 0 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 2px;
  color: #1d2733;
  text-decoration: none;
  font-weight: 500;
}

.mobile-drawer .mobile-nav-link:hover {
  background-color: rgba(41, 79, 132, 0.05);
  color: var(--brand-primary);
}

.mobile-drawer .mobile-nav-link.active {
  color: var(--brand-primary);
  font-weight: 600;
}

/* القائمة الفرعية داخل الدرج مع تمييز وفواصل */
.mobile-submenu {
  margin: 0;
}

.mobile-submenu+li {
  border-top: 1px solid #e6eef5;
}

.mobile-submenu-toggle {
  padding: 12px 0;
  border-bottom: 1px solid #e6eef5;
}

.mobile-submenu-list {
  padding: 4px 0 8px 0;
  margin: 0;
  border-top: 1px dashed #eef2f7;
}

.mobile-submenu-list li {
  padding-right: 12px;
}

.mobile-submenu-list li+li {
  border-top: 1px solid #f1f4f8;
}

.mobile-submenu-list a {
  display: block;
  padding: 10px 0;
  color: #333;
  text-decoration: none;
}

.mobile-submenu-list a:hover {
  color: var(--brand-primary);
  background-color: rgba(41, 79, 132, 0.05);
}

/* مسافات عمودية تفصل شريط الأخبار عن الشعارات وتمنع الالتصاق */
.newsbar-top {
  padding: 5px 0;
}

.main-navbar {
  padding: 5px 0;
}

/* مساحة إضافية داخل الحاويات */
.main-navbar>.container-xxl {
  padding-top: 5px;
  padding-bottom: 5px;
}

.newsbar-top>.container-xxl {
  padding-top: 5px;
  padding-bottom: 5px;
}

@media (min-width: 1200px) {
  .main-navbar>.container-xxl {
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .newsbar-top>.container-xxl {
    padding-top: 5px;
    padding-bottom: 5px;
  }
}

@media (min-width: 1400px) {
  .main-navbar>.container-xxl {
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .newsbar-top>.container-xxl {
    padding-top: 5px;
    padding-bottom: 5px;
  }
}

/* إظهار قائمة الدروب داون عند التحويم */
.navbar-menu .dropdown:hover>.dropdown-menu {
  display: block;
}

/* حل مشكلة الهوفر لجميع عناصر الناف بار */
.navbar-menu .dropdown {
  position: relative;
}

.navbar-menu .dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  height: 20px;
  background: transparent;
}

.navbar-menu .dropdown-menu {
  margin-top: 0;
  padding-top: 0.5rem;
}

.navbar-menu .dropdown-menu::before {
  content: "";
  position: absolute;
  top: 0;
  right: 20px;
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent #ffffff transparent;
}

/* ===== أنماط البحث المخصص ===== */
.search-dropdown {
  position: relative;
}

.search-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #ffffff;
  border: 1px solid #e6eef5;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 1.25rem;
  display: none;
  z-index: 1000;
  margin-top: 0;
  padding-top: 1.5rem;
  /* منع إغلاق القائمة عند التفاعل مع محتوياتها */
  pointer-events: auto;
}

/* إزالة hover effect واستبداله بكلاس show */
.search-dropdown.show .search-dropdown-menu {
  display: block;
}

/* إضافة منطقة ربط غير مرئية - غير مستخدمة الآن */
/* .search-dropdown::after تم إلغاؤها لأننا نستخدم الآن click event */

.search-dropdown-menu::before {
  content: "";
  position: absolute;
  top: 0;
  right: 20px;
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent #ffffff transparent;
}

.search-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.search-label {
  font-weight: 600;
  color: #1d2733;
  font-size: 0.9rem;
  margin: 0;
}

.search-input-group {
  display: flex;
  align-items: center;
  border: 1px solid #e6eef5;
  border-radius: 8px;
  overflow: hidden;
  background: #f8f9fa;
}

.search-input {
  flex: 1;
  border: none;
  padding: 0.75rem;
  background: transparent;
  font-size: 0.9rem;
  color: #1d2733;
}

.search-input:focus {
  outline: none;
  background: #ffffff;
}

.search-input::placeholder {
  color: #8b98a7;
}

.search-btn {
  background: #316fa1;
  border: none;
  color: #ffffff;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-btn:hover {
  background: #2e6796;
}

.programs-dropdown {
  position: relative;
}

.programs-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: #f8f9fa;
  border: 1px solid #e6eef5;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  color: #1d2733;
  position: relative;
  z-index: 1001;
}

.programs-toggle:hover {
  background: #e9ecef;
  border-color: #dee2e6;
}

.programs-toggle i {
  transition: transform 0.2s ease;
}

.programs-dropdown:hover .programs-toggle i {
  transform: rotate(180deg);
}

.programs-list {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  background: #ffffff;
  border: 1px solid #e6eef5;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  display: none;
  z-index: 1002;
  max-height: 200px;
  overflow-y: auto;
}

.programs-list2 {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  background: #ffffff;
  border: 1px solid #e6eef5;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  display: none;
  z-index: 1001;
  max-height: 200px;
  overflow-y: auto;
}

.programs-dropdown:hover .programs-list {
  display: block;
}

.program-item {
  display: block;
  padding: 0.5rem 1rem;
  color: #1d2733;
  text-decoration: none;
  font-size: 0.85rem;
  transition: background-color 0.2s ease;
}

.program-item:hover {
  background: #f8f9fa;
  color: #316fa1;
}

/* Responsive للبحث */
@media (max-width: 768px) {
  .search-dropdown-menu {
    width: 320px;
    right: -50px;
    margin-top: 0;
  }

  .search-dropdown-menu::before {
    right: 70px;
  }

  /* إخفاء مناطق الربط في الجوال */
  .navbar-menu .dropdown::after,
  .navbar-menu .nav-item::after,
  .search-dropdown::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .search-dropdown-menu {
    width: 280px;
    right: -80px;
    margin-top: 0;
  }

  .search-dropdown-menu::before {
    right: 100px;
  }
}



/* وضع مدمج للنموذج لتقليل الفراغات وجعل الحقول متقاربة */

.compact-form .form-section {
  background: transparent;
  border: 0;
  padding: 0;
  margin-bottom: .75rem;
}

.compact-form .section-title {
  display: none !important;
}

.compact-form .form-label {
  margin-bottom: .25rem;
  font-size: .9rem;
}

.compact-form .form-control {
  padding: .6rem .7rem;
}

.compact-form textarea.form-control {
  min-height: 80px;
}

.compact-form .row>[class^="col-"],
.compact-form .row>[class*=" col-"] {
  margin-bottom: .5rem;
}

.compact-form .form-note .alert {
  padding: .5rem .75rem;
  font-size: .9rem;
}

.compact-form .form-actions {
  padding-top: 1rem;
}

.compact-form .form-actions .btn-primary {
  padding: .7rem 1.25rem;
}

/* عناصر راديو كأزرار اختيار */
.segmented-radio {
  display: inline-grid;
  grid-auto-flow: column;
  gap: .35rem;
  background: #fff;
  border: 1px solid #e6eef5;
  border-radius: 10px;
  padding: .25rem;
}

.segmented-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-radio label {
  margin: 0;
  padding: .5rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  color: #21496f;
  background: #f1f6fb;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
  font-weight: 600;
}

.segmented-radio label i {
  margin-left: .35rem;
  opacity: .85;
}

.segmented-radio label:hover {
  background: #e6f0fa;
}

.segmented-radio input[type="radio"]:focus+label {
  box-shadow: 0 0 0 2px rgba(49, 111, 161, .25);
}

.segmented-radio input[type="radio"]:checked+label {
  background: linear-gradient(180deg, #3a7db6, #316fa1);
  border-color: #316fa1;
  color: #fff;
}

/* شيك بوكس مخصص متناسق */
.custom-check .form-check-input {
  width: 1.15rem;
  height: 1.15rem;
  border: 1px solid #bcd0e2;
  cursor: pointer;
}

.custom-check .form-check-input:checked {
  background-color: #316fa1;
  border-color: #316fa1;
}

.custom-check .form-check-input:focus {
  box-shadow: 0 0 0 .2rem rgba(49, 111, 161, .15);
}

.custom-check .form-check-label {
  margin-right: .5rem;
  font-weight: 600;
  color: #1d2733;
}

/* FAQ accordion styles */
.faq-accordion {
  display: grid;
  gap: .75rem;
}

.faq-item {
  border: 1px solid #e6eef5;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.faq-item>summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .9rem 1rem;
  cursor: pointer;
  background: #f0f6fb;
  border-bottom: 1px solid #eef2f7;
  color: #000;
  font-weight: 700;
}

.faq-item>summary::-webkit-details-marker {
  display: none;
}

.faq-item .faq-index {
  color: var(--brand-primary);
  font-weight: 800;
}

.faq-item .faq-title {
  flex: 1;
}

.faq-item .faq-actions,
.faq-question .faq-actions {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .6rem;
  border-bottom: 1px solid #f2f4f7;
}

.faq-item .faq-actions .btn,
.faq-question .faq-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .55rem;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid #e6eef5;
  background-color: #fff;
  color: var(--text-muted);
  position: relative;
  overflow: hidden;
}

.faq-item .faq-actions .btn i,
.faq-question .faq-actions .btn i {
  font-size: .95rem;
  opacity: .9;
  color: currentColor;
}

/* ألوان الأزرار مثل التصميم السابق */
.faq-item .faq-actions .btn-edit,
.faq-question .faq-actions .btn-edit {
  background-color: #fff;
  border-color: #6079a1;
  color: var(--text-muted);
}

.faq-item .faq-actions .btn-edit i,
.faq-question .faq-actions .btn-edit i {
  color: #316fa1;
  opacity: .9;
}

.faq-item .faq-actions .btn-edit:hover,
.faq-question .faq-actions .btn-edit:hover {
  background-color: rgba(49, 111, 161, .06);
  border-color: #316fa1;
  color: #316fa1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(49, 111, 161, 0.15);
}

.faq-item .faq-actions .btn-delete,
.faq-question .faq-actions .btn-delete {
  background-color: #fff;
  border-color: #de727d;
  color: #dc3545;
}

.faq-item .faq-actions .btn-delete i,
.faq-question .faq-actions .btn-delete i {
  color: #dc3545;
  opacity: .9;
}

.faq-item .faq-actions .btn-delete:hover,
.faq-question .faq-actions .btn-delete:hover {
  background-color: rgba(220, 53, 69, .06);
  border-color: #dc3545;
  color: #dc3545;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
}

.faq-item .faq-actions .btn-move,
.faq-question .faq-actions .btn-move {
  background-color: #fff;
  border-color: #dea36f;
  color: var(--text-muted);
}

.faq-item .faq-actions .btn-move i,
.faq-question .faq-actions .btn-move i {
  color: var(--brand-orange);
  opacity: .9;
}

.faq-item .faq-actions .btn-move:hover,
.faq-question .faq-actions .btn-move:hover {
  background-color: rgba(216, 123, 46, .06);
  border-color: var(--brand-orange);
  color: var(--brand-orange);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(216, 123, 46, 0.15);
}

.faq-item .toggle-icon {
  margin-right: .5rem;
  transition: transform .2s ease;
}

.faq-item[open] .toggle-icon {
  transform: rotate(180deg);
}

.faq-item .faq-body {
  padding: 1rem;
  background: #ffffff;
}

.faq-item .answer-label {
  color: var(--brand-secondary);
  font-weight: 800;
  margin-bottom: .25rem;
}

.faq-item p {
  margin-bottom: .75rem;
}

.faq-item ul {
  padding-right: 1.1rem;
}

/* تبويبات التصنيفات: إظهار قسم واحد فقط حسب الاختيار */
.subtab-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.sub-content-section {
  display: none;
}

/* إظهار الأقسام حسب الاختيار - مرقمة من 1 إلى 20 */
#tab-1:checked~.sub-content .section-1 {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#tab-2:checked~.sub-content .section-2 {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#tab-3:checked~.sub-content .section-3 {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#tab-4:checked~.sub-content .section-4 {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#tab-5:checked~.sub-content .section-5 {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#tab-6:checked~.sub-content .section-6 {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#tab-7:checked~.sub-content .section-7 {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#tab-8:checked~.sub-content .section-8 {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#tab-9:checked~.sub-content .section-9 {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#tab-10:checked~.sub-content .section-10 {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#tab-11:checked~.sub-content .section-11 {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#tab-12:checked~.sub-content .section-12 {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#tab-13:checked~.sub-content .section-13 {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#tab-14:checked~.sub-content .section-14 {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#tab-15:checked~.sub-content .section-15 {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#tab-16:checked~.sub-content .section-16 {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#tab-17:checked~.sub-content .section-17 {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#tab-18:checked~.sub-content .section-18 {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#tab-19:checked~.sub-content .section-19 {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#tab-20:checked~.sub-content .section-20 {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* إبراز التبويب المحدد عند الاختيار */
#tab-1:checked~.sub-tabs-grid label[for="tab-1"],
#tab-2:checked~.sub-tabs-grid label[for="tab-2"],
#tab-3:checked~.sub-tabs-grid label[for="tab-3"],
#tab-4:checked~.sub-tabs-grid label[for="tab-4"],
#tab-5:checked~.sub-tabs-grid label[for="tab-5"],
#tab-6:checked~.sub-tabs-grid label[for="tab-6"],
#tab-7:checked~.sub-tabs-grid label[for="tab-7"],
#tab-8:checked~.sub-tabs-grid label[for="tab-8"],
#tab-9:checked~.sub-tabs-grid label[for="tab-9"],
#tab-10:checked~.sub-tabs-grid label[for="tab-10"],
#tab-11:checked~.sub-tabs-grid label[for="tab-11"],
#tab-12:checked~.sub-tabs-grid label[for="tab-12"],
#tab-13:checked~.sub-tabs-grid label[for="tab-13"],
#tab-14:checked~.sub-tabs-grid label[for="tab-14"],
#tab-15:checked~.sub-tabs-grid label[for="tab-15"],
#tab-16:checked~.sub-tabs-grid label[for="tab-16"],
#tab-17:checked~.sub-tabs-grid label[for="tab-17"],
#tab-18:checked~.sub-tabs-grid label[for="tab-18"],
#tab-19:checked~.sub-tabs-grid label[for="tab-19"],
#tab-20:checked~.sub-tabs-grid label[for="tab-20"] {
  background: var(--brand-secondary);
  color: #fff;
  border-color: var(--brand-secondary);
}

.sub-content .sub-content-section {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.sub-content .sub-content-section.active {
  opacity: 1;
  transform: translateY(0);
}

/* تم إزالة القواعد القديمة - جميع التبويبات تستخدم الآن النظام المرقم من 1 إلى 20 */
/* تصنيفات رئيسية تقبل الفتح/الإغلاق - تصميم محسّن للوضوح */
.faq-category {
  background: #fff;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #aacae4;
  border-radius: 12px;
  margin-bottom: 1.25rem;
  box-shadow: 0 3px 12px rgba(49, 111, 161, 0.15);
}

.faq-category:hover {
  box-shadow: 0 6px 20px rgba(49, 111, 161, 0.25);
  border-color: #294f84;
}

.faq-category>summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  cursor: pointer;
  background: #4b8f67;
  font-weight: 800;
  font-size: 1.15rem;
  color: #ffffff;
  transition: all 0.3s ease;
  line-height: 1.6;
  border-radius: 10px 10px 0 0;
  position: relative;
}

.faq-category>summary::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: #d87b2e;
  border-radius: 10px 0 0 0;
}

.faq-category>summary:hover {
  background: #326c4a;
}

.faq-category>summary::-webkit-details-marker {
  display: none;
}

.faq-category>summary .h6 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  color: #ffffff;
}

.faq-category .toggle-icon {
  transition: transform 0.3s ease;
  transform-origin: center;
  font-size: 1.3rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}

.faq-category[open] .toggle-icon {
  transform: rotate(180deg);
  background: rgba(255, 255, 255, 0.3);
}

.faq-category-body {
  padding: 1.5rem;
  background: #fafbfd;
}

.faq-category-body .faq-list {
  display: grid;
  gap: 1rem;
}

/* faq-list المباشر داخل faq-category (بدون details/summary) */
.faq-category > .faq-list {
  display: grid;
  gap: 1.2rem;
  padding: 0;
}

/* سؤال/جواب ثابت داخل التصنيف (غير قابل للطي) */
.faq-question {
  border: 2px solid #e6eef5;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.faq-question:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-color: #c5d7e8;
}

.faq-question .question-header {
  background: #f0f6fb;
  border-bottom: 2px solid #dfe7f2;
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #294f84;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.6;
  transition: all 0.3s ease;
}

.faq-question:hover .question-header {
  background: #e6f0fa;
}

.faq-question .faq-body {
  padding: 1.25rem;
  background: #ffffff;
  font-size: 1rem;
  line-height: 1.7;
}

.faq-question .faq-body .answer-label {
  color: #000000;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.faq-question .faq-body p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* Responsive للعناوين على الشاشات الصغيرة */
@media (max-width: 768px) {
  .page-title {
    font-size: 1.5rem;
  }

  .subprogram-header .subprogram-title {
    font-size: 1.05rem;
  }

  .faq-category>summary {
    font-size: 1.05rem;
    padding: 1.1rem 1.2rem;
  }

  .faq-category>summary .h6 {
    font-size: 1.05rem;
  }

  .faq-category .toggle-icon {
    width: 35px;
    height: 35px;
    font-size: 1.3rem;
  }

  .faq-question .question-header {
    font-size: 0.95rem;
    padding: 0.85rem 1rem;
  }

  .sub-tab-card .title {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 1.3rem;
  }

  .subprogram-header .subprogram-title {
    font-size: 1rem;
  }

  .faq-category>summary {
    font-size: 1rem;
    padding: 1rem 1rem;
  }

  .faq-category>summary .h6 {
    font-size: 1rem;
  }

  .faq-category .toggle-icon {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
  }

  .faq-question .question-header {
    font-size: 0.9rem;
    padding: 0.8rem 0.9rem;
  }

  .sub-tab-card .title {
    font-size: 0.9rem;
  }
}

/* ===== جداول البيانات الموحدة ===== */
.data-table-container {
  background: #fff;
  border: 1px solid #e6eef5;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
}

.data-table-container {
  direction: rtl;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.data-table thead th {
  background: #f0f6fb;
  color: #000;
  font-weight: 800;
  text-align: center;
  padding: .85rem 1rem;
  border-bottom: 1px solid #e6eef5;
}

.data-table tbody td {
  padding: .85rem 1rem;
  border-bottom: 1px solid #f2f4f7;
  color: var(--text-main);
  word-break: break-word;
  text-align: center;
}

.data-table tbody tr:nth-child(even) td {
  background: #fafbfd;
}

.data-table tbody tr:hover td {
  background: #f4f8fc;
}

/* تحسين الاستجابة على الشاشات الصغيرة */
@media (max-width: 576px) {
  .data-table thead {
    display: none;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table tr {
    border-bottom: 1px solid #eef2f7;
  }

  .data-table td {
    padding: .7rem 1rem;
  }
}

/* ذيل الجدول (معلومات + ترقيم) */
.data-table-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .85rem 1rem;
  background: #fff;
  border: 1px solid #e6eef5;
  border-top: 0;
  border-radius: 0 0 12px 12px;
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
}

.data-table-footer .datatable-info {
  color: var(--text-muted);
  font-size: .95rem;
  text-align: center;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.data-table-footer .datatable-info .count-number {
  font-weight: 800;
  color: var(--brand-primary);
  font-size: 1rem;
}

.data-table-footer .datatable-length {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--text-muted);
  justify-content: center;
}

.data-table-footer .datatable-length select {
  border: 1px solid #e6eef5;
  border-radius: 8px;
  padding: .35rem .5rem;
  background: #f8f9fa;
}

.datatable-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}

.datatable-pagination .page-btn,
.datatable-pagination .page-num {
  background: #fff;
  border: 1px solid #e6eef5;
  color: var(--text-main);
  padding: .35rem .65rem;
  border-radius: 8px;
  cursor: pointer;
  min-width: 36px;
}

.datatable-pagination .page-btn:hover,
.datatable-pagination .page-num:hover {
  background: #f4f8fc;
}

.datatable-pagination .page-num.active {
  background: #316fa1;
  border-color: #316fa1;
  color: #fff;
}

.datatable-pagination .page-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* محاذاة LTR للنصوص داخل خلايا معينة مثل الإيميل */
td.ltr {
  direction: ltr;
  text-align: left;
}

/* ===== NotiUsers: أزرار التحكم داخل الجدول ===== */
.table-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}

.table-actions .btn.btn-sm {
  padding: .35rem .6rem;
  font-size: .85rem;
}

/* مسافة بين الأيقونة والنص داخل الأزرار */
.table-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

/* ===== NotiUsers: شريط البحث أعلى الجدول ===== */
#notiSearchBar {
  background-color: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
}

#notiSearchBar .datatable-search {
  max-width: 360px;
  width: 100%;
}

#notiSearchBar .input-with-icon .search-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  pointer-events: none;
  font-size: 1rem;
}

#notiSearchInput {
  padding-right: 2rem;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  background-color: #fff;
}

#notiSearchInput:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}