body {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
}

/* =========================================
   تصميم الـ Scrollbar المخصص بالهوية الزرقاء
   ========================================= */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #4287f5;
  border-radius: 9999px;
  border: 2px solid #f1f5f9;
}
::-webkit-scrollbar-thumb:hover {
  background: #2563eb;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #4287f5 #f1f5f9;
}

/* إخفاء شريط التمرير بالكامل أثناء التحميل */
html.loading-active,
body.loading-active {
  overflow: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
html.loading-active::-webkit-scrollbar,
body.loading-active::-webkit-scrollbar {
  display: none !important;
}

/* =========================================
   لودر عادي سادة أزرق بخلفية بيضاء بالكامل
   ========================================= */
#page-loader {
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.simple-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e2e8f0;
  border-top-color: #4287f5;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* تدرجات الهيدر */
.hero-blue-gradient {
  background: radial-gradient(circle at 50% 20%, #5a98ff 0%, #4287f5 45%, #276de0 85%, #1853b8 100%);
}

.hero-single-line-text {
  font-size: clamp(1.4rem, 3.2vw, 2.75rem);
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.headline-unified-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
}

.badge-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  padding: 0.15rem 0.85rem;
}

.badge-card-plate {
  position: absolute;
  inset: 2px -4px;
  background-color: #ffd000;
  border-radius: 0.75rem;
  transform: rotate(-1.75deg);
  box-shadow: 0 8px 18px -3px rgba(10, 18, 44, 0.35), inset 0 -2px 0 rgba(0, 0, 0, 0.12);
  z-index: 1;
  pointer-events: none;
}

.badge-word {
  position: relative;
  z-index: 10;
  color: #0a122c;
  transform: none !important;
  display: inline-block;
  white-space: nowrap;
  padding: 0.1rem 0.2rem;
  user-select: text !important;
  -webkit-user-select: text !important;
  cursor: text;
  background: linear-gradient(
    110deg,
    #0a122c 0%,
    #0a122c 42%,
    #e2e8f0 49%,
    #ffffff 52%,
    #e2e8f0 55%,
    #0a122c 62%,
    #0a122c 100%
  );
  background-size: 260% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: silverWhiteShimmer 5s ease-in-out infinite;
}

.badge-word::selection {
  background-color: #2563eb !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: none !important;
}

.badge-word::-moz-selection {
  background-color: #2563eb !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: none !important;
}

.badge-wrapper:hover .badge-word {
  animation: silverWhiteShimmer 2.5s ease-in-out infinite;
}

@keyframes silverWhiteShimmer {
  0% { background-position: 160% 0; }
  22% { background-position: -60% 0; }
  100% { background-position: -60% 0; }
}

.floating-glass-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.85rem;
  color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  z-index: 2;
}

@keyframes floatGentle {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

.float-1 { animation: floatGentle 6.5s ease-in-out infinite; }
.float-2 { animation: floatGentle 5.2s ease-in-out infinite 0.8s; }
.float-3 { animation: floatGentle 5.8s ease-in-out infinite 1.6s; }
.float-4 { animation: floatGentle 6.1s ease-in-out infinite 2.4s; }
.float-5 { animation: floatGentle 5.5s ease-in-out infinite 1.2s; }
.float-6 { animation: floatGentle 6.8s ease-in-out infinite 0.4s; }

.bento-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.bento-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -8px rgba(10, 18, 44, 0.07);
}

/* =========================================
   تنسيقات لوحة الأدمن والشريط الجانبي (Sidebar)
   ========================================= */
.admin-layout-container {
  display: flex;
  min-height: 100vh;
  background-color: #f8fafc;
}

/* =========================================
   تجاوب القائمة الجانبية (Sidebar) مع الجوال
   ========================================= */
.admin-sidebar {
  width: 280px;
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 50;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* في الجوال: مخفي خارج الشاشة من جهة اليمين */
@media (max-width: 1023px) {
  .admin-sidebar {
    transform: translateX(100%);
    box-shadow: -10px 0 30px rgba(10, 18, 44, 0.15);
  }
  
  /* عندما يتم الضغط على زر البرغر ويأخذ كلاس open */
  .admin-sidebar.sidebar-open {
    transform: translateX(0);
  }
}

/* في شاشات الكمبيوتر (أكبر من 1024px): ثابت ومرئي دائماً */
@media (min-width: 1024px) {
  .admin-sidebar {
    position: sticky;
    transform: none !important;
  }
}

/* خلفية تظليل الشاشة السوداء في الجوال عند فتح القائمة */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 44, 0.45);
  backdrop-filter: blur(4px);
  z-index: 45;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

.admin-main-viewport {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
}

/* روابط وتصنيفات الشريط الجانبي */
.sidebar-category-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-category-btn:hover {
  color: #0a122c;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #475569;
  text-decoration: none;
  transition: all 0.2s ease;
}

.sidebar-nav-link:hover {
  background: #f1f5f9;
  color: #0a122c;
}

.sidebar-nav-link.active {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #dbeafe;
}

/* جداول Bento الإدارية النظيفة */
.table-clean-container {
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 4px 20px -2px rgba(10, 18, 44, 0.03);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
}

.custom-table th {
  padding: 0.95rem 1.2rem;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 800;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.custom-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  font-size: 0.88rem;
  vertical-align: middle;
}

.custom-table tbody tr:hover td {
  background: #f8fafc;
}