/* Tajawal font - applied system-wide */
* {
  font-family: 'Tajawal', sans-serif !important;
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--app-primary, #258cfb);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Card styling - visual distinction */
.card {
  border-radius: 0.5rem;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08) !important;
}

/* Primary color - يستخدم متغيرات الهوية البصرية */
.bg-primary {
  background: linear-gradient(135deg, var(--app-primary, #0d6efd) 0%, var(--app-primary-dark, #0a58ca) 100%) !important;
}

/* أزرار الحفظ والإضافة - تستخدم لون الأزرار من الهوية البصرية */
.btn-primary {
  --bs-btn-bg: var(--app-button-color, var(--app-primary, #0d6efd)) !important;
  --bs-btn-border-color: var(--app-button-color, var(--app-primary, #0d6efd)) !important;
  --bs-btn-hover-bg: var(--app-button-color-dark, var(--app-primary-dark, #0a58ca)) !important;
  --bs-btn-hover-border-color: var(--app-button-color-dark, var(--app-primary-dark, #0a58ca)) !important;
  --bs-btn-active-bg: var(--app-button-color-dark, var(--app-primary-dark, #0a58ca)) !important;
  --bs-btn-active-border-color: var(--app-button-color-dark, var(--app-primary-dark, #0a58ca)) !important;
  background-color: var(--app-button-color, var(--app-primary, #0d6efd)) !important;
  border-color: var(--app-button-color, var(--app-primary, #0d6efd)) !important;
}
.btn-primary:hover {
  background-color: var(--app-button-color-dark, var(--app-primary-dark, #0a58ca)) !important;
  border-color: var(--app-button-color-dark, var(--app-primary-dark, #0a58ca)) !important;
}

.navbar-brand {
  font-weight: 700;
}

/* Badge styling */
.badge {
  font-weight: 500;
}

/* Table improvements */
.table-hover tbody tr:hover {
  background-color: rgba(var(--app-primary-rgb, 13, 110, 253), 0.05);
}

/* Form placeholder RTL */
.form-control::placeholder {
  text-align: right;
}

.form-select {
  text-align: right;
}

/* Dropdown RTL fix */
.dropdown-menu {
  text-align: right;
}

/* ===== Modals - Mobile ===== */
@media (max-width: 575.98px) {
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }
  .modal-dialog.modal-lg {
    max-width: calc(100% - 1rem);
  }
  .modal-content {
    border-radius: 0.5rem;
  }
  .modal-body {
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-footer .btn {
    min-height: 44px;
    padding: 0.5rem 1rem;
  }
}

/* ===== Forms - Mobile ===== */
@media (max-width: 575.98px) {
  .form-control, .form-select {
    font-size: 16px;
  }
  .form-control:focus, .form-select:focus {
    font-size: 16px;
  }
  .btn-primary, .btn-secondary, .btn-outline-primary, .btn-outline-secondary {
    min-height: 44px;
    padding: 0.5rem 1rem;
  }
}

/* ===== Org Structure Tree Dropdown ===== */
.org-tree-dropdown {
  position: relative;
}

.org-tree-dropdown .org-tree-toggle,
.hr-searchable-select .hr-searchable-select__toggle {
  cursor: pointer;
  min-height: 38px;
}

.org-tree-dropdown .org-tree-display.text-muted,
.hr-searchable-select .hr-searchable-select__display.text-muted {
  color: #6c757d !important;
}

.org-tree-dropdown .org-tree-menu,
.hr-searchable-select .hr-searchable-select__menu {
  max-height: min(420px, 70vh);
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  z-index: 1080;
}

.org-tree-dropdown .org-tree-container,
.hr-searchable-select .hr-searchable-select__scroll {
  max-height: min(340px, 55vh);
  overflow: auto;
}

.org-tree-dropdown .org-tree-node-row {
  cursor: default;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.org-tree-dropdown .org-tree-expand,
.org-tree-dropdown .org-tree-spacer {
  width: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.org-tree-dropdown .org-tree-expand {
  cursor: pointer;
  color: #64748b;
  border-radius: 0.35rem;
}

.org-tree-dropdown .org-tree-expand:hover {
  color: var(--app-primary, #0d6efd);
  background: rgba(13, 110, 253, 0.08);
}

.org-tree-dropdown .org-tree-selectable {
  cursor: pointer;
  border-radius: 0.35rem;
  padding: 0.1rem 0.25rem;
}

.org-tree-dropdown .org-tree-label {
  color: #64748b;
  font-weight: 600;
}

.org-tree-dropdown .org-tree-selectable:hover {
  background: rgba(15, 118, 110, 0.08);
  color: #0f766e;
}

.org-tree-dropdown .org-tree-node-text.is-selected,
.org-tree-flat-item.is-selected {
  color: #0f766e;
  font-weight: 700;
  background: rgba(15, 118, 110, 0.1);
}

.org-tree-dropdown .org-tree-children {
  border-right: 1px solid #e2e8f0;
  margin-right: 10px;
  padding-right: 4px;
}

.org-tree-flat-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.org-tree-flat-item {
  display: block;
  width: 100%;
  text-align: start;
  border: 0;
  background: transparent;
  border-radius: 0.5rem;
  padding: 0.55rem 0.75rem;
}

.org-tree-flat-item:hover {
  background: rgba(15, 118, 110, 0.08);
}

.org-tree-flat-item__title {
  display: block;
  font-size: 0.9rem;
  color: #0f172a;
}

.org-tree-flat-item__path {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.15rem;
}

/* ===== Searchable Select (HR) ===== */
.hr-searchable-select {
  position: relative;
}

.hr-searchable-select__native {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
}

.hr-searchable-select.is-disabled .hr-searchable-select__toggle {
  background-color: #e9ecef;
  cursor: not-allowed;
}

.hr-searchable-select__option {
  display: block;
  width: 100%;
  text-align: start;
  border: 0;
  background: transparent;
  border-radius: 0.5rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  color: #0f172a;
}

.hr-searchable-select__option:hover {
  background: rgba(15, 118, 110, 0.08);
  color: #0f766e;
}

.hr-searchable-select__option.is-selected {
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
  font-weight: 700;
}

/* ===== Sidebar Layout ===== */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  min-width: 260px;
  background: #f8f9fa;
  border-left: 1px solid #dee2e6;
  transition: margin 0.3s ease, min-width 0.3s ease;
  display: flex;
  flex-direction: column;
}

.sidebar.collapsed {
  margin-right: -260px;
  min-width: 0;
}

.sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
  background: white;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--app-primary, #0d6efd);
  font-weight: 700;
  font-size: 1.1rem;
}

.sidebar-brand:hover {
  color: var(--app-primary-dark, #0a58ca);
}

.sidebar-brand-text {
  white-space: nowrap;
}

.sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}

/* تباعد خفيف بين عناصر القائمة الجانبية */
.sidebar-nav .nav-item {
  margin-bottom: 0.35rem;
}

.sidebar-nav .nav-item:last-child {
  margin-bottom: 0;
}

.sidebar-nav .submenu .nav-item {
  margin-bottom: 0.25rem;
}

.sidebar-nav .submenu .nav-item:last-child {
  margin-bottom: 0;
}

.sidebar-nav .nav-link {
  color: #212529;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  margin: 0 0.5rem;
  display: flex;
  align-items: center;
  position: relative;
  transition: all 0.25s ease;
}

.sidebar-nav .nav-link:hover {
  background: rgba(var(--app-primary-rgb, 13, 110, 253), 0.08);
  color: var(--app-primary, #0d6efd);
}

/* تمييز بصري إبداعي للعنصر المحدد في القائمة الجانبية */
.sidebar-nav .nav-link.active {
  background: linear-gradient(270deg, rgba(var(--app-primary-rgb, 13, 110, 253), 0.18) 0%, rgba(var(--app-primary-rgb, 13, 110, 253), 0.08) 100%);
  color: var(--app-primary, #0d6efd);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(var(--app-primary-rgb, 13, 110, 253), 0.15);
}

/* شريط تأشير عمودي مميز على الحافة المواجهة للمحتوى (RTL) */
.sidebar-nav .nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  min-height: 24px;
  background: linear-gradient(180deg, var(--app-primary, #0d6efd) 0%, var(--app-primary-dark, #0a58ca) 100%);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 12px rgba(var(--app-primary-rgb, 13, 110, 253), 0.4);
}

/* تمييز الأيقونة في العنصر النشط */
.sidebar-nav .nav-link.active i {
  color: var(--app-primary, #0d6efd);
  background: rgba(var(--app-primary-rgb, 13, 110, 253), 0.12);
  padding: 0.35rem;
  border-radius: 0.4rem;
  transition: all 0.25s ease;
}

.sidebar-nav .submenu .nav-link {
  padding: 0.5rem 1rem 0.5rem 2rem;
  font-size: 0.9rem;
}

/* شريط أرفع للعناصر الفرعية النشطة */
.sidebar-nav .submenu .nav-link.active::before {
  height: 60%;
  width: 3px;
}

.sidebar-nav .collapse-icon {
  transition: transform 0.2s;
}

.sidebar-nav .nav-link[aria-expanded="true"] .collapse-icon {
  transform: rotate(180deg);
}

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: white;
  border-bottom: 1px solid #dee2e6;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sidebar-toggle {
  color: #495057;
  padding: 0.25rem 0.5rem;
}

.sidebar-toggle:hover {
  color: var(--app-primary, #0d6efd);
}

.topbar-spacer {
  flex: 1;
}

.main-content {
  flex: 1;
  padding: 1rem;
}

@media (min-width: 768px) {
  .main-content {
    padding: 1.25rem;
  }
}

@media (min-width: 992px) {
  .main-content {
    padding: 1.5rem;
  }
}

.main-footer {
  padding: 0.75rem 1.5rem;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
  text-align: center;
  font-size: 0.875rem;
  color: #6c757d;
}

/* Sidebar backdrop - للجوال والتابلت */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1049;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.show {
  display: block;
  opacity: 1;
}

@media (max-width: 991.98px) {
  .sidebar-backdrop.show {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    z-index: 1050;
    margin-right: 0;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    width: 260px;
  }

  .sidebar.collapsed {
    margin-right: -260px;
  }

  .sidebar-toggle {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ===== Tasks List - Mobile Card Layout ===== */
.tasks-list-mobile .task-card-mobile {
  transition: background-color 0.2s ease;
}
.tasks-list-mobile .task-card-mobile:active {
  background-color: rgba(var(--app-primary-rgb, 13, 110, 253), 0.05);
}
.tasks-list-mobile .btn {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===== Topbar - Mobile ===== */
@media (max-width: 575.98px) {
  .topbar { padding: 0.5rem 0.75rem; }
  .topbar-user-link { min-height: 44px; padding: 0.5rem; }
}

@media (min-width: 576px) {
  .topbar-username { max-width: 150px; }
}

@media (min-width: 768px) {
  .topbar-username { max-width: 200px; }
}

/* ===== Tasks View Tabs - Mobile ===== */
.tasks-view-tabs {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.tasks-view-tabs .nav-item { flex-shrink: 0; }
.tasks-view-tabs .nav-link { white-space: nowrap; }

/* ===== Kanban Board ===== */
.kanban-board { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.kanban-column { min-width: 180px; }
@media (max-width: 767.98px) {
  .kanban-board .row { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -0.5rem; padding: 0 0.5rem; }
  .kanban-board .col-12 { flex: 0 0 85%; max-width: 85%; min-width: 260px; }
}
.kanban-card.dragging { opacity: 0.5; }
.kanban-cards { min-height: 60px; }
.kanban-cards.drag-over { background: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.15); border-radius: 0.5rem; border: 2px dashed var(--bs-primary, #0d6efd); }
.kanban-card { cursor: grab; }
.kanban-card:active { cursor: grabbing; }
.kanban-card[draggable="false"] { cursor: default; }
.kanban-mobile-move .btn { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

/* ===== Strategic Pillars - Colorful Cards ===== */
.pillar-card {
  border: none;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
}
.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12) !important;
}
.pillar-card .pillar-card-accent {
  height: 4px;
  flex-shrink: 0;
}
.pillar-card .pillar-card-body {
  padding: 1.25rem;
}
.pillar-card .pillar-card-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #212529;
}
.pillar-card .pillar-card-meta {
  font-size: 0.875rem;
  color: #6c757d;
}
.pillar-card .pillar-card-meta i {
  width: 1.25rem;
  text-align: center;
  margin-left: 0.35rem;
}
.pillar-card .pillar-card-actions .btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.pillar-card .pillar-card-actions .btn:hover {
  transform: scale(1.08);
}
.pillar-card-accent.pillar-color-0 { background: linear-gradient(90deg, #0d6efd, #0a58ca); }
.pillar-card-accent.pillar-color-1 { background: linear-gradient(90deg, #198754, #146c43); }
.pillar-card-accent.pillar-color-2 { background: linear-gradient(90deg, #6f42c1, #5a32a3); }
.pillar-card-accent.pillar-color-3 { background: linear-gradient(90deg, #fd7e14, #e8590c); }
.pillar-card-accent.pillar-color-4 { background: linear-gradient(90deg, #0dcaf0, #0aa2c0); }

/* دائرة الركيزة - نفس لون الإطار مع رقم داخلها */
.pillar-card-circle {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
}
.pillar-card-circle.pillar-color-0 { background: linear-gradient(135deg, #0d6efd, #0a58ca); }
.pillar-card-circle.pillar-color-1 { background: linear-gradient(135deg, #198754, #146c43); }
.pillar-card-circle.pillar-color-2 { background: linear-gradient(135deg, #6f42c1, #5a32a3); }
.pillar-card-circle.pillar-color-3 { background: linear-gradient(135deg, #fd7e14, #e8590c); }
.pillar-card-circle.pillar-color-4 { background: linear-gradient(135deg, #0dcaf0, #0aa2c0); }

/* دائرة الوزن - بجانب دائرة الكود في كارد المؤشر */
.pillar-card-circle-weight {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: #fff;
  flex-shrink: 0;
}
.pillar-card-circle-weight.pillar-color-0 { background: linear-gradient(135deg, #0d6efd, #0a58ca); }
.pillar-card-circle-weight.pillar-color-1 { background: linear-gradient(135deg, #198754, #146c43); }
.pillar-card-circle-weight.pillar-color-2 { background: linear-gradient(135deg, #6f42c1, #5a32a3); }
.pillar-card-circle-weight.pillar-color-3 { background: linear-gradient(135deg, #fd7e14, #e8590c); }
.pillar-card-circle-weight.pillar-color-4 { background: linear-gradient(135deg, #0dcaf0, #0aa2c0); }

/* ===== Initiative Status - ألوان موحدة لحالات المبادرة ===== */
.initiative-accent.initiative-status-planned { background: linear-gradient(90deg, #6c757d, #5a6268); }
.initiative-accent.initiative-status-inprogress { background: linear-gradient(90deg, #0dcaf0, #0aa2c0); }
.initiative-accent.initiative-status-completed { background: linear-gradient(90deg, #198754, #146c43); }
.initiative-accent.initiative-status-postponed { background: linear-gradient(90deg, #fd7e14, #e8590c); }
.initiative-card-circle.initiative-status-planned { background: linear-gradient(135deg, #6c757d, #5a6268); }
.initiative-card-circle.initiative-status-inprogress { background: linear-gradient(135deg, #0dcaf0, #0aa2c0); }
.initiative-card-circle.initiative-status-completed { background: linear-gradient(135deg, #198754, #146c43); }
.initiative-card-circle.initiative-status-postponed { background: linear-gradient(135deg, #fd7e14, #e8590c); }
.initiative-status-badge.initiative-status-planned { background: #6c757d; color: #fff; }
.initiative-status-badge.initiative-status-inprogress { background: #0dcaf0; color: #212529; }
.initiative-status-badge.initiative-status-completed { background: #198754; color: #fff; }
.initiative-status-badge.initiative-status-postponed { background: #fd7e14; color: #fff; }

/* ===== Strategic Associations - Period Cards ===== */
.association-page .association-hero-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: #212529;
}
.association-page .association-hero-sub {
  color: #6c757d;
  font-size: 0.925rem;
}
.association-card {
  border: none;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
}
.association-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12) !important;
}
.association-card-accent {
  height: 4px;
}
.association-card-body {
  padding: 1.25rem;
}
.association-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
}
.association-card-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: #212529;
  line-height: 1.4;
}
.association-card-meta {
  font-size: 0.875rem;
  color: #6c757d;
}
.association-card-meta i {
  width: 1.25rem;
  text-align: center;
  margin-left: 0.35rem;
}
.association-card-actions .btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  transition: transform 0.2s ease;
}
.association-card-actions .btn:hover {
  transform: scale(1.08);
}
.association-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.association-badge {
  font-weight: 500;
  font-size: 0.75rem;
  padding: 0.35em 0.65em;
  border-radius: 0.375rem;
}
.association-badge-active { background: rgba(25, 135, 84, 0.12); color: #198754; }
.association-badge-update { background: rgba(255, 193, 7, 0.15); color: #997404; }
.association-badge-completed { background: rgba(108, 117, 125, 0.15); color: #495057; }
.association-badge-method { background: rgba(13, 110, 253, 0.1); color: #0d6efd; }
.association-card-stats {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.association-stat {
  text-align: center;
  flex: 1;
}
.association-stat-value {
  display: block;
  font-weight: 700;
  font-size: 1.1rem;
  color: #212529;
}
.association-stat-label {
  display: block;
  font-size: 0.7rem;
  color: #6c757d;
  margin-top: 0.1rem;
}
.association-empty-icon {
  font-size: 4rem;
  color: #dee2e6;
}
.assoc-color-0 { background: linear-gradient(135deg, #0d6efd, #0a58ca); }
.assoc-color-1 { background: linear-gradient(135deg, #198754, #146c43); }
.assoc-color-2 { background: linear-gradient(135deg, #6f42c1, #5a32a3); }
.assoc-color-3 { background: linear-gradient(135deg, #fd7e14, #e8590c); }
.assoc-color-4 { background: linear-gradient(135deg, #0dcaf0, #0aa2c0); }

/* ===== Association Details Page ===== */
.association-detail-hero {
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.06) 0%, rgba(25, 135, 84, 0.04) 100%);
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.association-detail-stat-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  height: 100%;
}
.association-detail-stat-icon {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}
.association-detail-stat-value {
  font-weight: 700;
  font-size: 1.5rem;
  color: #212529;
}
.association-detail-stat-label {
  font-size: 0.75rem;
  color: #6c757d;
}
.association-detail-section {
  border-radius: 0.75rem !important;
  overflow: hidden;
}
.association-detail-section-header {
  background: rgba(0, 0, 0, 0.02);
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.association-vm-block {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 0.5rem;
  padding: 1rem;
  height: 100%;
}
.association-vm-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #0d6efd;
  margin-bottom: 0.5rem;
}
.association-vm-text {
  color: #495057;
  line-height: 1.7;
  font-size: 0.925rem;
}
.association-hierarchy-accordion .accordion-button {
  font-size: 0.925rem;
  padding: 0.85rem 1.25rem;
  background: transparent;
  box-shadow: none;
}
.association-hierarchy-accordion .accordion-button:not(.collapsed) {
  background: rgba(13, 110, 253, 0.04);
  color: inherit;
}
.association-pillar-code {
  display: inline-block;
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 0.35rem;
  font-family: monospace;
}
.association-goal-block {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
}
.association-goal-block:last-child {
  margin-bottom: 0;
}
.association-goal-code {
  display: inline-block;
  background: rgba(25, 135, 84, 0.12);
  color: #198754;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
  font-family: monospace;
}
.association-kpi-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: #6c757d;
}
.association-kpi-list li {
  padding: 0.25rem 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
}
.association-kpi-list li:last-child {
  border-bottom: none;
}
.association-kpi-code {
  font-family: monospace;
  font-size: 0.75rem;
  color: #0dcaf0;
  margin-left: 0.35rem;
}
.association-values-list {
  list-style: none;
  padding: 0;
}
.association-values-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.9rem;
}
.association-values-list li:last-child {
  border-bottom: none;
}
.association-target-group:last-child {
  margin-bottom: 0 !important;
}
.association-info-dl dt {
  font-size: 0.75rem;
  color: #6c757d;
  margin-bottom: 0.15rem;
}
.association-info-dl dd {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.association-info-dl dd:last-child {
  margin-bottom: 0;
}
.association-initiatives-table {
  font-size: 0.875rem;
}

/* ===== Initiative Details Page ===== */
.initiative-details-page .initiative-detail-hero {
  background: #fff;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}
.initiative-detail-hero-accent {
  height: 5px;
}
.initiative-detail-hero-body {
  padding: 1.5rem;
}
.initiative-detail-icon {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.initiative-detail-code {
  font-weight: 700;
  font-size: 0.85rem;
  font-family: monospace;
}
.initiative-detail-title {
  font-weight: 700;
  font-size: 1.35rem;
  color: #212529;
}
.initiative-detail-sub {
  color: #6c757d;
  font-size: 0.9rem;
}
.initiative-detail-stat-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  height: 100%;
}
.initiative-detail-stat-icon {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}
.initiative-detail-stat-value {
  font-weight: 700;
  font-size: 1.5rem;
  color: #212529;
}
.initiative-detail-stat-label {
  font-size: 0.75rem;
  color: #6c757d;
}
.initiative-detail-stat-hint {
  font-size: 0.7rem;
  color: #6c757d;
  margin-top: 0.25rem;
}
.initiative-detail-section {
  border-radius: 0.75rem !important;
  overflow: hidden;
}
.initiative-detail-section-header {
  background: rgba(0, 0, 0, 0.02);
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.initiative-description {
  line-height: 1.8;
  font-size: 0.95rem;
}
.initiative-goal-link-card {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 0.5rem;
  padding: 1rem;
  border-right: 3px solid #0d6efd;
}
.initiative-goal-link-card:last-child {
  margin-bottom: 0 !important;
}
.initiative-goal-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.initiative-metric {
  font-size: 0.8rem;
  color: #6c757d;
  background: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.initiative-metric i {
  margin-left: 0.25rem;
  color: #0d6efd;
}
.initiative-kpi-table {
  font-size: 0.875rem;
}
.initiative-timeline {
  position: relative;
  padding-right: 0.5rem;
}
.initiative-timeline-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.25rem;
  position: relative;
}
.initiative-timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  right: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: rgba(0, 0, 0, 0.08);
}
.initiative-timeline-item.done:not(:last-child)::before {
  background: rgba(25, 135, 84, 0.25);
}
.initiative-timeline-item.delayed:not(:last-child)::before {
  background: rgba(220, 53, 69, 0.2);
}
.initiative-timeline-marker {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  z-index: 1;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.initiative-timeline-item.done .initiative-timeline-marker {
  background: rgba(25, 135, 84, 0.12);
}
.initiative-timeline-item.delayed .initiative-timeline-marker {
  background: rgba(220, 53, 69, 0.1);
}
.initiative-timeline-content {
  flex: 1;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
}
.initiative-budget-box {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 0.5rem;
  padding: 0.75rem;
}
.initiative-budget-label {
  font-size: 0.75rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
}
.initiative-budget-value {
  font-weight: 700;
  font-size: 1rem;
  color: #212529;
}

/* ===== Strategic Goal Details Page ===== */
.goal-details-page .goal-detail-hero {
  background: #fff;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}
.goal-detail-hero-accent {
  height: 5px;
  background: linear-gradient(90deg, #198754, #146c43);
}
.goal-detail-hero-body {
  padding: 1.5rem;
}
.goal-detail-icon {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #198754, #146c43);
}
.goal-detail-code {
  font-weight: 700;
  font-size: 0.85rem;
  font-family: monospace;
}
.goal-detail-title {
  font-weight: 700;
  font-size: 1.35rem;
  color: #212529;
}
.goal-detail-sub {
  color: #6c757d;
  font-size: 0.9rem;
}
.goal-detail-stat-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  height: 100%;
}
.goal-detail-stat-icon {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}
.goal-detail-stat-value {
  font-weight: 700;
  font-size: 1.5rem;
  color: #212529;
}
.goal-detail-stat-label {
  font-size: 0.75rem;
  color: #6c757d;
}
.goal-detail-section {
  border-radius: 0.75rem !important;
  overflow: hidden;
}
.goal-detail-section-header {
  background: rgba(0, 0, 0, 0.02);
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.goal-description {
  line-height: 1.8;
  font-size: 0.95rem;
}
.goal-kpi-table {
  font-size: 0.875rem;
}
.goal-pillar-context {
  background: rgba(25, 135, 84, 0.04);
  border-radius: 0.5rem;
  padding: 1rem;
  border-right: 3px solid #198754;
}

/* ===== Strategic KPI Details Page ===== */
.kpi-details-page .kpi-detail-hero {
  background: #fff;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}
.kpi-detail-hero-accent {
  height: 5px;
  background: linear-gradient(90deg, #0d6efd, #0a58ca);
}
.kpi-detail-hero-body {
  padding: 1.5rem;
}
.kpi-detail-icon {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
}
.kpi-detail-code {
  font-weight: 700;
  font-size: 0.85rem;
  font-family: monospace;
}
.kpi-detail-title {
  font-weight: 700;
  font-size: 1.35rem;
  color: #212529;
}
.kpi-detail-sub {
  font-size: 0.9rem;
}
.kpi-detail-stat-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  height: 100%;
}
.kpi-detail-stat-icon {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}
.kpi-detail-stat-value {
  font-weight: 700;
  font-size: 1.5rem;
  color: #212529;
}
.kpi-detail-stat-label {
  font-size: 0.75rem;
  color: #6c757d;
}
.kpi-detail-stat-hint {
  font-size: 0.7rem;
  color: #6c757d;
  margin-top: 0.25rem;
}
.kpi-detail-section {
  border-radius: 0.75rem !important;
  overflow: hidden;
}
.kpi-detail-section-header {
  background: rgba(0, 0, 0, 0.02);
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.kpi-description {
  line-height: 1.8;
  font-size: 0.95rem;
}
.kpi-config-box {
  background: rgba(13, 110, 253, 0.04);
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  height: 100%;
  border: 1px solid rgba(13, 110, 253, 0.08);
}
.kpi-config-label {
  font-size: 0.75rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
}
.kpi-config-value {
  font-weight: 600;
  font-size: 0.9rem;
  color: #212529;
}
.kpi-formula-block {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 0.5rem;
  padding: 1rem;
  font-size: 0.85rem;
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.kpi-context-chain {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.kpi-context-item {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 0.35rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

/* ===== Print - إخفاء عناصر الواجهة عند الطباعة ===== */
@media print {
  .sidebar, .sidebar-backdrop, .topbar, .main-footer { display: none !important; }
  .app-wrapper { display: block !important; }
  .main-wrapper { flex: none !important; }
  .main-content { padding: 0 !important; }
  body { margin-bottom: 0 !important; background: #fff !important; }
}
