/* ============================================================================
   لوحة المشاريع المؤسسية — شركة حمد محمد بن سعيدان العقارية
   نظام تصميم مُصقّل: حركات، ظلال، تدرّجات، تفاعلات دقيقة
   ============================================================================ */

html, body {
  scroll-behavior: smooth;
}

/* خط الهوية: Expo Arabic غير متاح للويب — بديل معتمد قريب منه: Alexandria (هندسي عريض) مع Tajawal */
* {
  font-family: 'Alexandria', 'Tajawal', 'IBM Plex Sans Arabic', sans-serif;
}

body {
  background-color: #faf8f1;
  background-image:
    radial-gradient(circle at 8% 0%, rgba(241, 205, 121, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 95% 20%, rgba(17, 91, 62, 0.05) 0%, transparent 40%);
}

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: #f4efe1; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #82bda2, #4f9c7c);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: #2a7a5b; }

::selection { background: rgba(227, 182, 91, 0.35); }

/* ============================================================================
   1) الترويسة العلوية (TopBar) — نقش زخرفي + تدرّج غني
   ============================================================================ */
.brand-header {
  background-color: #115B3E; /* الأخضر الرسمي — دليل الهوية 2022 */
  background-image:
    linear-gradient(120deg, #0b3d2a 0%, #115B3E 45%, #0e4c34 100%),
    repeating-linear-gradient(135deg, rgba(227,182,91,0.05) 0px, rgba(227,182,91,0.05) 2px, transparent 2px, transparent 14px);
}
.brand-title { text-shadow: 0 1px 8px rgba(8, 46, 32, 0.5); }
.brand-sep {
  width: 1px;
  height: 38px;
  background: linear-gradient(180deg, transparent, rgba(241,205,121,0.55), transparent);
}
.brand-header::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #E3B65B 20%, #F1CD79 50%, #E3B65B 80%, transparent);
  opacity: 0.85;
}
.brand-logo-ring {
  position: relative;
}
.brand-logo-ring::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(241,205,121,0.35) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: -1;
}
.group:hover .brand-logo-ring::before { opacity: 1; }

.topnav-link {
  position: relative;
  overflow: hidden;
}
.topnav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  transform: translateY(100%);
  transition: transform 0.25s ease;
  border-radius: inherit;
}
.topnav-link:hover::before { transform: translateY(0); }
.topnav-link > * { position: relative; z-index: 1; }

/* ============================================================================
   2) بطاقة مشروع — Dashboard grid
   ============================================================================ */
.project-card {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
  position: relative;
}
.project-card:hover {
  transform: translateY(-6px);
}
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1.5px solid transparent;
  background: linear-gradient(135deg, rgba(227,182,91,0.5), transparent 40%) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.project-card:hover::after { opacity: 1; }

.project-card-img-wrap {
  position: relative;
  isolation: isolate;
}
.project-card-img-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,46,32,0) 40%, rgba(8,46,32,0.55) 100%);
  z-index: 1;
  transition: opacity 0.3s ease;
}

/* شارة نوع المشروع بلمعة زجاجية */
.category-chip {
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.4);
}

/* ============================================================================
   3) شريط تقدّم متدرّج مع بريق متحرك
   ============================================================================ */
.progress-track {
  background: #e2eee8;
  border-radius: 999px;
  overflow: hidden;
  height: 8px;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(8,46,32,0.08);
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #115B3E, #3e8c68, #E3B65B);
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  width: 40%;
  animation: progressShine 2.6s ease-in-out infinite;
}
@keyframes progressShine {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}

/* ============================================================================
   4) شارة حالة
   ============================================================================ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px currentColor;
}

/* ============================================================================
   5) حركات الدخول العامة
   ============================================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fade-in { animation: fadeIn 0.4s ease both; }

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
.scale-in { animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both; }

.cat-btn {
  transition: transform 0.2s ease, background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.cat-btn:hover { transform: translateY(-2px); }
.cat-btn.active-cat {
  background-color: #0e4c34 !important;
  color: #fefdfb !important;
  box-shadow: 0 4px 14px -2px rgba(14, 76, 52, 0.45);
}

/* ============================================================================
   6) بوابات الحوكمة G0-G4 — شريط تقدّم متدرّج + بطاقات
   ============================================================================ */
.gate-seg {
  transition: filter 0.2s ease, transform 0.2s ease;
  position: relative;
}
.gate-seg:hover {
  filter: brightness(1.15);
  transform: scaleY(1.15);
  z-index: 2;
}
.gate-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, background-color 0.25s ease;
}
.gate-card:hover { transform: translateY(-3px); }
.gate-card.gate-current {
  animation: gatePulse 2.4s ease-in-out infinite;
}
@keyframes gatePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(227, 182, 91, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(227, 182, 91, 0.06); }
}
.gate-dot {
  transition: transform 0.25s ease;
}
.gate-card:hover .gate-dot { transform: scale(1.25); }

/* ============================================================================
   7) مؤشّر التقدّم الدائري (Radial Progress) — نظرة عامة
   ============================================================================ */
.radial-progress {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.radial-progress svg { transform: rotate(-90deg); }
.radial-progress circle.rp-fg {
  transition: stroke-dashoffset 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  stroke-linecap: round;
}
.radial-progress .rp-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ============================================================================
   8) نوافذ منبثقة (Modals)
   ============================================================================ */
#project-modal, #weekly-modal, #milestone-modal, #image-modal, #quick-progress-modal {
  transition: opacity 0.2s ease;
}
#milestone-modal:not(.hidden) > div,
#image-modal:not(.hidden) > div,
#quick-progress-modal:not(.hidden) > div,
#project-modal:not(.hidden) > div,
#weekly-modal:not(.hidden) > div {
  animation: modalPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============================================================================
   9) التنقل الفرعي الثابت (Sticky Sub-nav)
   ============================================================================ */
#project-subnav { scrollbar-width: none; }
#project-subnav::-webkit-scrollbar { display: none; }
.subnav-link {
  position: relative;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.subnav-link i { transition: transform 0.25s ease; }
.subnav-link:hover i { transform: translateY(-1px); }

/* ============================================================================
   10) أزرار الإجراءات السريعة
   ============================================================================ */
#btn-quick-progress {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, color 0.2s ease;
}
#btn-quick-progress:hover { transform: rotate(60deg) scale(1.08); }

#btn-add-milestone, #btn-add-image {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, box-shadow 0.2s ease;
}
#btn-add-milestone:hover, #btn-add-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px -2px rgba(8, 46, 32, 0.18);
}

.btn-hero-action {
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.btn-hero-action:hover { transform: translateY(-2px); }
.btn-hero-action:active { transform: translateY(0); }

/* ============================================================================
   11) الجدول الزمني للمعالم — تصميم غني
   ============================================================================ */
.timeline-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px currentColor, 0 2px 6px rgba(0,0,0,0.15);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.milestone-row .group:hover .timeline-dot { transform: scale(1.15); }
.milestone-row .group {
  transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}
.milestone-row .group:hover {
  background-color: #fefdfb;
  box-shadow: 0 4px 16px -4px rgba(8, 46, 32, 0.15);
}
.milestone-row .group:hover .milestone-edit-btn,
.milestone-row .group:hover .milestone-del-btn { opacity: 1; }

/* ============================================================================
   12) معرض الصور — تفاعلات hover غنية
   ============================================================================ */
.gallery-item {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
.gallery-item:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 24px -6px rgba(8, 46, 32, 0.28);
  z-index: 5;
}
.gallery-item:hover .image-edit-btn,
.gallery-item:hover .image-del-btn { opacity: 1; }
.gallery-item .image-type-tag {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* ============================================================================
   13) عدّاد النسبة الكلية
   ============================================================================ */
.counter-value {
  display: inline-block;
  min-width: 3.4ch;
  transition: color 0.3s ease;
  background: linear-gradient(90deg, #0e4c34, #2a7a5b);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ============================================================================
   14) بطاقات سجل التحديثات الأسبوعية
   ============================================================================ */
.weekly-card {
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}
.weekly-card:hover { box-shadow: 0 6px 20px -6px rgba(8, 46, 32, 0.2); }
.weekly-edit-btn { opacity: 0.55; }
.weekly-card:hover .weekly-edit-btn { opacity: 1; }
.weekly-latest-badge {
  background: linear-gradient(135deg, #E3B65B, #F1CD79);
}

/* ============================================================================
   15) نماذج الإدخال (Forms)
   ============================================================================ */
input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(227, 182, 91, 0.35);
  border-color: #E3B65B !important;
}
.form-input {
  width: 100%;
  border: 1px solid #c3dcd0;
  border-radius: 0.65rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.875rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  background: #fefdfb;
}
.form-input:focus { transform: translateY(-1px); }
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #0e4c34;
  margin-bottom: 0.32rem;
}

/* ============================================================================
   16) إشعارات Toast
   ============================================================================ */
@keyframes toastSlideDown {
  from { opacity: 0; transform: translate(-50%, -18px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.toast-notice {
  animation: toastSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
  transform: translate(-50%, 0);
}

/* ============================================================================
   17) هيرو صفحة المشروع — تفاصيل دقيقة
   ============================================================================ */
#project-hero {
  isolation: isolate;
}
.hero-brand-seal {
  top: 22px;
  inset-inline-end: 26px;
  width: 74px;
  opacity: 0.85;
  filter: drop-shadow(0 3px 12px rgba(8, 46, 32, 0.6));
  z-index: 3;
  animation: sealIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) both 0.3s;
}
@keyframes sealIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.85); }
  to { opacity: 0.85; transform: translateY(0) scale(1); }
}
#hero-img {
  transition: transform 8s ease-out;
}
#project-hero:hover #hero-img { transform: scale(1.12); }

/* ============================================================================
   18) سكيلتون تحميل نابض بلمعة
   ============================================================================ */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton-shine {
  background: linear-gradient(90deg, #e2eee8 25%, #f4efe1 50%, #e2eee8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

/* ============================================================================
   19) خطوط فاصلة زخرفية
   ============================================================================ */
.divider-ornate {
  position: relative;
  text-align: center;
}
.divider-ornate::before, .divider-ornate::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #c3dcd0);
}
.divider-ornate::before { right: 0; }
.divider-ornate::after { left: 0; transform: scaleX(-1); }

/* ============================================================================
   19-ب) التذييل المؤسسي — أخضر الهوية مع الشعار الذهبي (دليل الهوية ص6)
   ============================================================================ */
.brand-footer {
  background-color: #115B3E;
  background-image: linear-gradient(160deg, #115B3E 0%, #0e4c34 60%, #0b3d2a 100%);
  border-top: 3px solid;
  border-image: linear-gradient(90deg, transparent, #E3B65B 25%, #F1CD79 50%, #E3B65B 75%, transparent) 1;
}
.brand-footer-pattern {
  background-image:
    repeating-linear-gradient(45deg, rgba(241,205,121,0.04) 0px, rgba(241,205,121,0.04) 1.5px, transparent 1.5px, transparent 16px),
    repeating-linear-gradient(-45deg, rgba(241,205,121,0.04) 0px, rgba(241,205,121,0.04) 1.5px, transparent 1.5px, transparent 16px);
  mask-image: radial-gradient(ellipse 100% 100% at 50% 0%, #000 30%, transparent 95%);
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at 50% 0%, #000 30%, transparent 95%);
}
.footer-logo {
  filter: drop-shadow(0 4px 18px rgba(241, 205, 121, 0.25));
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}
.footer-logo:hover {
  transform: scale(1.04);
  filter: drop-shadow(0 6px 26px rgba(241, 205, 121, 0.4));
}
.brand-footer .divider-ornate::before,
.brand-footer .divider-ornate::after {
  background: linear-gradient(90deg, transparent, rgba(241,205,121,0.45));
}
.footer-gem { background: transparent; }
.footer-line {
  display: inline-block;
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(241,205,121,0.5), transparent);
}

/* ============================================================================
   20) استجابة للحركة المخفّفة (Accessibility)
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================================
   21) بيانات المشروع — بطاقات مصقولة (صفحة تفاصيل المشروع)
   ============================================================================ */
.info-section { padding-top: 0.15rem; }
.info-section-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: #4f9c7c;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.55rem;
}
.info-section-title i { color: #E3B65B; font-size: 0.7rem; }

.info-tile {
  background: #f6faf7;
  border: 1px solid #e5efe9;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.info-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -6px rgba(8, 46, 32, 0.18);
  border-color: #E3B65B55;
}
.info-tile-icon {
  background: linear-gradient(135deg, #e8f2ec, #d7e9df);
  color: #115B3E;
  font-size: 0.85rem;
}

.info-stat-tile {
  --stat-accent: #E3B65B;
  background: linear-gradient(180deg, #fff, #fbfaf4);
  border: 1px solid #e5efe9;
  border-top: 2.5px solid var(--stat-accent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.info-stat-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px -6px rgba(8, 46, 32, 0.2);
}
.info-stat-icon {
  color: var(--stat-accent);
  font-size: 1.05rem;
  display: block;
}

.info-timeline-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #f6faf7;
  border: 1px solid #e5efe9;
  border-radius: 0.85rem;
  padding: 0.7rem 0.85rem;
}
.info-timeline-point { display: flex; align-items: center; gap: 0.55rem; flex: 1; min-width: 0; }
.info-timeline-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.9), 0 0 0 4px currentColor;
}
.info-timeline-line {
  flex: 0 0 auto;
  width: 28px;
  height: 1.5px;
  background: repeating-linear-gradient(90deg, #c3dcd0 0 4px, transparent 4px 8px);
}

/* ============================================================================
   22) مركز قيادة المشاريع — هيرو + بطاقات KPI مصقولة
   ============================================================================ */
.command-hero {
  isolation: isolate;
  background-color: #115B3E; /* الأخضر الرسمي — دليل الهوية 2022 */
  background-image: linear-gradient(150deg, #0b3d2a 0%, #115B3E 48%, #0e4c34 100%);
}
.hero-watermark {
  inset-inline-start: -60px;
  top: 50%;
  transform: translateY(-50%) rotate(-6deg);
  width: 380px;
  opacity: 0.07;
  filter: saturate(0.6) brightness(1.4);
  animation: watermarkFloat 9s ease-in-out infinite;
}
@keyframes watermarkFloat {
  0%, 100% { transform: translateY(-50%) rotate(-6deg); }
  50% { transform: translateY(-54%) rotate(-4deg); }
}
.hero-title-glow { text-shadow: 0 2px 24px rgba(241, 205, 121, 0.3); }
.command-hero-grid {
  background-image:
    linear-gradient(rgba(227,182,91,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(227,182,91,0.06) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 30%, #000 40%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 30%, #000 40%, transparent 90%);
}
.hero-eyebrow {
  position: relative;
  padding-inline-start: 0;
}
.hero-eyebrow i { animation: pulseGlow 2.2s ease-in-out infinite; }
@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.kpi-card {
  background: #fff;
  border: 1px solid #e5efe9;
  border-bottom: 3px solid var(--kpi-accent, #E3B65B);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
.kpi-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 28px -10px rgba(8, 46, 32, 0.25);
}
.kpi-card::before {
  content: '';
  position: absolute;
  inset-inline-end: -20px;
  top: -20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--kpi-accent, #E3B65B) 0%, transparent 70%);
  opacity: 0.08;
}
.kpi-card-icon {
  background: color-mix(in srgb, var(--kpi-accent, #E3B65B) 14%, white);
  color: var(--kpi-accent, #E3B65B);
}
.kpi-card-tag {
  color: var(--kpi-accent, #E3B65B);
  font-weight: 700;
}

.panel-accent { border-top: 3px solid var(--panel-accent, #115B3E); }
.panel-icon-badge {
  width: 26px; height: 26px; border-radius: 0.5rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: #e8f2ec; color: #115B3E; font-size: 0.7rem;
}
.panel-icon-badge-gold { background: #f9efd4; color: #c69440; }

.section-marker {
  display: inline-block;
  width: 5px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #E3B65B, #115B3E);
}

/* ==========================================================================
   §20 — سلايدر الهيرو في صفحة المشروع (يتغذى من معرض الصور)
   ========================================================================== */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1s ease, transform 6s linear;
  pointer-events: none;
}
.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.hero-slide.slide-broken img { display: none; }
.hero-slide.slide-broken {
  background:
    radial-gradient(circle at 30% 30%, rgba(241, 205, 121, 0.15), transparent 50%),
    linear-gradient(135deg, #0b3d2a, #115B3E);
}

.slider-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(241, 205, 121, 0.4);
  color: #fff;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  transition: all 0.25s ease;
}
.slider-arrow:hover {
  background: #E3B65B;
  color: #082e20;
  border-color: #E3B65B;
  transform: translateY(-50%) scale(1.08);
}

.slider-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  cursor: pointer;
}
.slider-dot.is-active {
  width: 26px;
  background: #E3B65B;
  border-color: #E3B65B;
  box-shadow: 0 0 10px rgba(227, 182, 91, 0.6);
}

.slider-caption-chip {
  top: 1.15rem;
  right: 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: min(70vw, 420px);
  background: rgba(8, 46, 32, 0.6);
  border: 1px solid rgba(241, 205, 121, 0.35);
  color: #F1CD79;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.slider-caption-chip .chip-caption {
  color: #f7f3e8;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slider-counter {
  bottom: 1.1rem;
  left: 1.15rem;
  background: rgba(8, 46, 32, 0.55);
  color: #f7f3e8;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
}

/* Lightbox — عارض صور المعرض */
#lightbox { animation: lightboxIn 0.25s ease; }
@keyframes lightboxIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
#lightbox-img { animation: lightboxImgIn 0.3s ease; }
@keyframes lightboxImgIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   §21 — إثراء مركز القيادة: شريط النبض الحي + رسم البوابات + لوحة الأسبوع
   ========================================================================== */
.live-ticker {
  display: flex;
  align-items: stretch;
  background: linear-gradient(90deg, #0b3d2a, #115B3E 60%, #0e4c34);
  border: 1px solid rgba(227, 182, 91, 0.35);
  box-shadow: 0 8px 22px -10px rgba(8, 46, 32, 0.45);
}
.live-ticker-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  background: rgba(227, 182, 91, 0.14);
  color: #F1CD79;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
  border-inline-end: 1px solid rgba(241, 205, 121, 0.25);
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #E3B65B;
  box-shadow: 0 0 0 0 rgba(227, 182, 91, 0.7);
  animation: livePulse 1.8s infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(227, 182, 91, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(227, 182, 91, 0); }
  100% { box-shadow: 0 0 0 0 rgba(227, 182, 91, 0); }
}
.live-ticker-viewport {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.live-ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 1.2rem;
  white-space: nowrap;
  padding-inline: 1.2rem;
  animation: tickerScroll 45s linear infinite;
}
.live-ticker:hover .live-ticker-track { animation-play-state: paused; }
@keyframes tickerScroll {
  /* في RTL يتحرك الشريط نحو اليسار بقيم موجبة */
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #f7f3e8;
  font-size: 0.74rem;
  transition: color 0.2s;
}
.ticker-item:hover { color: #F1CD79; }
.ticker-progress {
  background: rgba(241, 205, 121, 0.18);
  color: #F1CD79;
  font-weight: 800;
  font-size: 0.68rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}
.ticker-sep { color: rgba(241, 205, 121, 0.45); font-size: 0.5rem; }

/* مركز رسم البوابات الدائري */
.gates-chart-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.gates-center-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: #115B3E;
  line-height: 1;
}
.gates-center-label {
  font-size: 0.62rem;
  color: #6b8f80;
  margin-top: 0.2rem;
}

/* بطاقات المعالم القادمة */
.upcoming-milestone-card {
  display: block;
  background: linear-gradient(180deg, #ffffff, #fdfbf4);
}
.upcoming-milestone-card:hover {
  box-shadow: 0 10px 24px -12px rgba(17, 91, 62, 0.28);
  transform: translateY(-2px);
}
.gate-mini-chip {
  display: inline-flex;
  align-items: center;
  background: #115B3E;
  color: #F1CD79;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.06em;
}
.milestone-days-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* لوحة ملخص نشاط الأسبوع (داكنة بهوية الشركة) */
.command-side-panel {
  background:
    radial-gradient(circle at 85% 12%, rgba(241, 205, 121, 0.14), transparent 45%),
    linear-gradient(160deg, #0b3d2a, #115B3E 70%, #0e4c34);
  border: 1px solid rgba(227, 182, 91, 0.28);
}
.week-pulse-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.8rem;
  padding: 0.6rem 0.8rem;
  transition: background 0.25s ease, transform 0.25s ease;
}
.week-pulse-row:hover {
  background: rgba(241, 205, 121, 0.12);
  transform: translateX(-3px);
}
.week-pulse-icon {
  width: 30px;
  height: 30px;
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.week-pulse-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: #F1CD79;
  min-width: 26px;
  text-align: center;
}

/* ==========================================================================
   §23 — غرفة العمليات التنفيذية (إعادة تصميم صفحة تفاصيل المشروع)
   ========================================================================== */

/* --- شريط الملخص التنفيذي تحت الهيرو --- */
.exec-summary-strip {
  margin-top: -2.4rem;
  margin-bottom: 0.4rem;
}
.exec-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}
@media (min-width: 768px) { .exec-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .exec-summary-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.exec-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 0.85rem 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  box-shadow: 0 10px 28px -12px rgba(17, 91, 62, 0.28), 0 2px 8px rgba(17, 91, 62, 0.06);
  border: 1px solid rgba(17, 91, 62, 0.08);
  border-top: 3px solid var(--exec-accent, #115B3E);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: fadeInUp 0.5s ease both;
}
.exec-card:nth-child(2) { animation-delay: 60ms; }
.exec-card:nth-child(3) { animation-delay: 120ms; }
.exec-card:nth-child(4) { animation-delay: 180ms; }
.exec-card:nth-child(5) { animation-delay: 240ms; }
.exec-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -12px rgba(17, 91, 62, 0.35); }
.exec-card-link { cursor: pointer; }
.exec-card-icon {
  width: 34px; height: 34px;
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--exec-accent, #115B3E) 12%, #ffffff);
  color: var(--exec-accent, #115B3E);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.85rem; flex-shrink: 0;
}
.exec-card-value { font-size: 0.95rem; font-weight: 800; color: #1b3a2d; line-height: 1.25; }
.exec-card-value small { font-size: 0.6rem; font-weight: 700; color: #6b8f80; }
.exec-card-label { font-size: 0.64rem; font-weight: 700; color: #6b8f80; margin-top: 0.15rem; }
.exec-card-sub { font-size: 0.6rem; color: #9AA6AE; margin-top: 0.2rem; line-height: 1.4; }

/* --- شريط التقدم داخل المرحلة الحالية --- */
.phase-progress-card {
  background: #f6faf7;
  border: 1px solid #e2eee8;
  border-radius: 0.85rem;
  padding: 0.8rem 0.95rem;
}
.phase-progress-track {
  height: 9px;
  background: #e2eee8;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}
.phase-progress-fill {
  height: 100%;
  border-radius: 999px;
  position: relative;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
  background-image: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.28) 50%, rgba(255,255,255,0) 100%);
  background-size: 200% 100%;
  animation: phaseShimmer 2.6s linear infinite;
}
@keyframes phaseShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* --- منحنى التقدم الزمني (Sparkline) --- */
.sparkline-box {
  background: #f6faf7;
  border: 1px solid #e2eee8;
  border-radius: 0.85rem;
  padding: 0.5rem 0.4rem 0.2rem;
}
.sparkline-svg { width: 100%; height: 128px; display: block; }
.sparkline-empty {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 1.6rem 1rem; color: #9AA6AE; font-size: 0.72rem;
}
.sparkline-empty i { font-size: 1.1rem; color: #cdddd4; }

/* --- تبديل عرض الجدول الزمني (جانت/قائمة) --- */
.timeline-view-toggle {
  display: inline-flex;
  background: #eef7f2;
  border: 1px solid #dcebe2;
  border-radius: 0.7rem;
  padding: 0.18rem;
  gap: 0.18rem;
}
.tv-btn {
  font-size: 0.68rem; font-weight: 700;
  color: #6b8f80;
  padding: 0.32rem 0.75rem;
  border-radius: 0.55rem;
  transition: all 0.2s ease;
}
.tv-btn.is-active { background: #115B3E; color: #F1CD79; box-shadow: 0 2px 6px rgba(17, 91, 62, 0.3); }
.tv-btn:not(.is-active):hover { color: #115B3E; background: #ffffff; }

/* --- مخطط جانت أفقي مضغوط (RTL) --- */
.gantt-wrap { direction: rtl; }
.gantt-grid { display: grid; grid-template-columns: 190px 1fr; gap: 0; }
@media (max-width: 640px) { .gantt-grid { grid-template-columns: 130px 1fr; } }
.gantt-labels { display: flex; flex-direction: column; }
.gantt-axis-spacer { height: 26px; }
.gantt-label {
  height: 34px;
  display: flex; align-items: center; gap: 0.45rem;
  padding-left: 0.7rem;
  border-bottom: 1px dashed #eef4f0;
  min-width: 0;
}
.gantt-gate-chip {
  font-size: 0.56rem; font-weight: 800;
  padding: 0.1rem 0.4rem; border-radius: 999px; flex-shrink: 0;
}
.gantt-label-text {
  font-size: 0.68rem; font-weight: 700; color: #2c4a3c;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gantt-chart { position: relative; min-width: 0; }
.gantt-axis { position: relative; height: 26px; }
.gantt-tick {
  position: absolute; top: 4px;
  transform: translateX(50%);
  font-size: 0.56rem; font-weight: 700; color: #8aa396;
  white-space: nowrap;
}
.gantt-body { position: relative; }
.gantt-gridline {
  position: absolute; top: 0; bottom: 0; width: 1px;
  background: #eaf2ed;
}
.gantt-today {
  position: absolute; top: -20px; bottom: 0; width: 2px;
  background: #B4483A; z-index: 5; border-radius: 2px;
}
.gantt-today span {
  position: absolute; top: 0; right: 50%; transform: translateX(50%);
  background: #B4483A; color: #fff;
  font-size: 0.52rem; font-weight: 800;
  padding: 0.08rem 0.4rem; border-radius: 999px;
  white-space: nowrap;
}
.gantt-row {
  position: relative; height: 34px;
  border-bottom: 1px dashed #eef4f0;
}
.gantt-bar {
  position: absolute; top: 50%; transform: translateY(-50%);
  height: 13px; border-radius: 999px;
  background: color-mix(in srgb, var(--bar-color, #115B3E) 18%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--bar-color, #115B3E) 32%, #ffffff);
  overflow: hidden;
}
.gantt-bar-fill {
  height: 100%;
  background: var(--bar-color, #115B3E);
  border-radius: 999px;
  opacity: 0.85;
}
.gantt-diamond {
  position: absolute; top: 50%;
  width: 10px; height: 10px;
  transform: translateY(-50%) rotate(45deg);
  background: #ffffff;
  border: 2.5px solid var(--bar-color, #115B3E);
  border-radius: 2px; z-index: 4;
}
.gantt-diamond.is-done { background: var(--bar-color, #115B3E); }
.gantt-footer {
  display: flex; flex-wrap: wrap; gap: 1rem;
  margin-top: 0.9rem; padding-top: 0.7rem;
  border-top: 1px solid #eef4f0;
}
.gantt-key { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.6rem; font-weight: 700; color: #6b8f80; }
.gantt-key-bar { width: 22px; height: 9px; border-radius: 999px; background: #cfe3d8; border: 1px solid #b7d4c5; }
.gantt-key-diamond { width: 9px; height: 9px; transform: rotate(45deg); background: #fff; border: 2.5px solid #115B3E; border-radius: 2px; }
.gantt-key-today { width: 2px; height: 14px; background: #B4483A; border-radius: 2px; }
.gantt-key-fill { width: 22px; height: 9px; border-radius: 999px; background: #115B3E; opacity: 0.85; }

/* --- بطاقة آخر تحديث أسبوعي البارزة --- */
.latest-update-card {
  background:
    radial-gradient(circle at 88% 8%, rgba(241, 205, 121, 0.13), transparent 42%),
    linear-gradient(155deg, #0b3d2a, #115B3E 68%, #0e4c34);
  border: 1px solid rgba(227, 182, 91, 0.3);
}
.lu-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.3rem 0.9rem;
}
.lu-head-icon {
  width: 40px; height: 40px; border-radius: 0.8rem; flex-shrink: 0;
  background: linear-gradient(140deg, #E3B65B, #F1CD79);
  color: #0b3d2a; font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(227, 182, 91, 0.35);
}
.lu-title { font-size: 0.9rem; font-weight: 800; color: #ffffff; }
.lu-sub { font-size: 0.66rem; color: rgba(241, 230, 202, 0.75); margin-top: 0.2rem; }
.lu-progress {
  display: inline-flex; align-items: baseline; gap: 0.35rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(241, 205, 121, 0.35);
  color: #F1CD79; font-size: 1rem; font-weight: 800;
  padding: 0.3rem 0.75rem; border-radius: 0.7rem;
}
.lu-progress em { font-style: normal; font-size: 0.6rem; font-weight: 800; }
.lu-delta-up { color: #8fd9b6; }
.lu-delta-down { color: #f0a79b; }
.lu-action {
  width: 32px; height: 32px; border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(241, 230, 202, 0.8);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.72rem; transition: all 0.2s ease;
}
.lu-action:hover { background: rgba(241, 205, 121, 0.2); color: #F1CD79; }
.lu-summary {
  margin: 0 1.3rem 0.4rem;
  font-size: 0.74rem; line-height: 1.7;
  color: rgba(241, 230, 202, 0.85);
}
.lu-cols {
  display: grid; grid-template-columns: 1fr;
  gap: 0.7rem; padding: 0.8rem 1.3rem 1.2rem;
}
@media (min-width: 900px) { .lu-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lu-col {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top: 3px solid var(--lu-accent, #E3B65B);
  border-radius: 0.9rem;
  padding: 0.85rem 0.95rem;
}
.lu-col-head {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.7rem; font-weight: 800; color: #F1CD79;
  margin-bottom: 0.6rem;
}
.lu-col-head i { color: var(--lu-accent, #E3B65B); filter: brightness(1.5); }
.lu-count {
  margin-right: auto;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(241, 230, 202, 0.9);
  font-size: 0.58rem; font-weight: 800;
  min-width: 20px; text-align: center;
  padding: 0.1rem 0.4rem; border-radius: 999px;
}
.lu-list { display: flex; flex-direction: column; gap: 0.55rem; }
.lu-list li { display: flex; align-items: flex-start; gap: 0.5rem; }
.lu-list li i { margin-top: 0.2rem; font-size: 0.68rem; filter: brightness(1.6); flex-shrink: 0; }
.lu-list li span { font-size: 0.7rem; line-height: 1.65; color: rgba(255, 255, 255, 0.92); }
.lu-extra { display: block; font-style: normal; font-size: 0.62rem; color: rgba(241, 230, 202, 0.6); margin-top: 0.15rem; line-height: 1.5; }
.lu-empty { font-size: 0.66rem; color: rgba(241, 230, 202, 0.55); padding: 0.4rem 0; }

/* --- معرض الصور: بلاطات موحّدة الارتفاع + بلاطة "+N" --- */
.gallery-tile { height: 9rem; }
@media (min-width: 1024px) { .gallery-tile { height: 10rem; } }
.gallery-more-tile { cursor: pointer; }
.gallery-more-tile img { filter: blur(2px) brightness(0.55); transform: scale(1.06); }
.gallery-more-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem;
  background: rgba(11, 61, 42, 0.55);
  color: #F1CD79; font-size: 1.5rem; font-weight: 800;
  transition: background 0.25s ease;
}
.gallery-more-overlay small { font-size: 0.62rem; font-weight: 700; color: rgba(241, 230, 202, 0.85); }
.gallery-more-tile:hover .gallery-more-overlay { background: rgba(11, 61, 42, 0.72); }
